
/* ==========================================================================
   ORELKA — styles.css (consolidated, light refonte)
   - Merges main.css + noscript bits, keeps existing class names where possible
   - Cleans vendor prefixes, adds CSS variables, responsive rules, and utilities
   - Palette kept from legacy: bg #242629, accent #34a58e, text #a0a0a1, border #36383c
   - You can safely remove main.css + noscript.css after switching to this file
   ========================================================================== */

/* ------------------------------
   0) Root tokens & base
---------------------------------*/
:root {
  /* Colors */
  --bg: #242629;
  --surface: #34363b;
  --text: #a0a0a1;
  --text-weak: #707071;
  --heading: #ffffff;
  --border: #36383c;
  --accent: #34a58e;
  --accent-600: #287e6d;
  --accent-400: #47c5ab;

  /* Typography */
  --font-sans: "Source Sans Pro", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --fs-base: 16px;         /* previously ~15pt; normalize to 16px for readability */
  --lh-base: 1.65;
  --ls-base: 0.025em;
  --ls-up: 0.1em;

  /* Sizing */
  --radius: 10px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --container: 1200px;

  /* Effects */
  --focus: 0 0 0 2px var(--accent);
  --shadow-inset: inset 0 0 0 2px var(--border);
}

/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Box sizing & reset-lite */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  letter-spacing: var(--ls-base);
  -webkit-text-size-adjust: 100%;
}

/* Media elements */
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  font-weight: 300;
  letter-spacing: var(--ls-up);
  line-height: 1.5;
  margin: 0 0 1em 0;
  text-transform: uppercase;
}
h1 { font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem); }
h2 { font-size: clamp(1.125rem, 1.2vw + .75rem, 1.35rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 2em; }
strong, b { color: var(--heading); font-weight: 600; }
em, i { font-style: italic; }
a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s ease-in-out, border-color .2s ease-in-out, background-color .2s ease-in-out;
}
a:hover { color: var(--accent); }

/* Lists */
ul, ol { margin: 0 0 2em; padding-left: 1.1em; }
ul { list-style: disc; }
ol { list-style: decimal; }
ul.alt { list-style: none; padding-left: 0; }
ul.alt li { border-top: 1px solid var(--border); padding: .5em 0; }
ul.alt li:first-child { border-top: 0; padding-top: 0; }

/* Code & blockquote */
code {
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .9em;
  padding: .25em .65em;
}
pre code {
  display: block;
  line-height: 1.75;
  padding: 1em 1.5em;
  overflow-x: auto;
}
blockquote {
  border-left: 4px solid var(--border);
  margin: 0 0 2em;
  padding: .5em 0 .5em 2em;
  font-style: italic;
}
hr { border: 0; border-bottom: 1px solid var(--border); margin: 2em 0; }
hr.major { margin: 3em 0; }

/* Text alignment helpers */
.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }

/* ------------------------------
   1) Layout
---------------------------------*/
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}
.section { padding: var(--space-7) 0; }
.section--tight { padding: var(--space-6) 0; }

header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(36,38,41,0.9);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: .75rem 1rem;
}
.brand { color: var(--heading); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

nav.primary ul { display: flex; gap: var(--space-4); list-style: none; padding: 0; margin: 0; }
nav.primary a { color: var(--text); }
nav.primary a:hover, nav.primary a[aria-current="page"] { color: var(--heading); }

footer.site-footer {
  margin-top: var(--space-7);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border);
  color: var(--text-weak);
}

/* ------------------------------
   2) Components
---------------------------------*/
/* Button: keep legacy .button class */
.button, button, [type="button"], [type="submit"], [type="reset"] {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: var(--shadow-inset);
  color: var(--heading);
  cursor: pointer;
  display: inline-block;
  font-size: .9em;
  font-weight: 500;
  letter-spacing: var(--ls-up);
  line-height: 3.05556em;
  height: 3.05556em;
  padding: 0 2.2em;
  text-transform: uppercase;
  transition: background-color .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}
.button:hover { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.button:active { background: color-mix(in oklab, var(--accent) 15%, transparent); }
.button.primary { background: var(--accent); box-shadow: none; color: #fff; }
.button.primary:hover { background: var(--accent-400); color: #fff; }
.button.primary:active { background: var(--accent-600); }
.button.small { font-size: .8em; }
.button.large { font-size: 1.15em; }
.button.fit { width: 100%; }

/* Forms */
label { color: var(--heading); font-size: .9em; font-weight: 500; margin: 0 0 .75em; display: block; }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="url"],
input[type="password"], select, textarea {
  background: var(--surface);
  border: 1px solid transparent;
  color: var(--text);
  outline: 0;
  padding: 0 1em;
  width: 100%;
  transition: box-shadow .2s, border-color .2s;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="url"],
input[type="password"], select { height: 2.75em; }
textarea { min-height: 8rem; padding: .75rem 1rem; resize: vertical; }
input:focus, select:focus, textarea:focus { box-shadow: var(--focus); border-color: var(--accent); }

/* Placeholder */
::placeholder { color: var(--text-weak); opacity: 1; }

/* Checkbox/Radio (accessible visuals) */
input[type="checkbox"], input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
input[type="checkbox"] + label, input[type="radio"] + label {
  position: relative; padding-left: 2.4em; cursor: pointer; color: var(--text);
}
input[type="checkbox"] + label::before, input[type="radio"] + label::before {
  content: ""; position: absolute; left: 0; top: .15em; width: 2.0625em; height: 2.0625em;
  background: var(--surface); border: 1px solid var(--border);
}
input[type="radio"] + label::before { border-radius: 50%; }
input[type="checkbox"]:checked + label::before, input[type="radio"]:checked + label::before {
  background: var(--accent); border-color: var(--accent);
}
input[type="checkbox"]:focus + label::before, input[type="radio"]:focus + label::before { box-shadow: var(--focus); }

/* Actions list */
ul.actions { display: flex; gap: 1em; list-style: none; padding: 0; margin: 0; align-items: center; }
ul.actions.stacked { flex-direction: column; align-items: stretch; }
ul.actions.fit > * { flex: 1 1 auto; }

/* Icons (Font Awesome still works) */
.icon { text-decoration: none; border-bottom: none; position: relative; line-height: 1; }
.icon > .label { display: none; }
/* if FA 5 is loaded, weight will apply automatically */

/* ------------------------------
   3) Gallery (grid)
---------------------------------*/
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}
/* thumbs that used to be .thumb */
.thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.thumb img { width: 100%; height: auto; display: block; }
.thumb:hover { transform: translateY(-2px); border-color: var(--accent); }

/* Responsive breakpoints */
@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 680px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* Utility sizes for grid items (map to old size classes if any) */
.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }

/* ------------------------------
   4) Hero section
---------------------------------*/
.hero {
  padding: calc(var(--space-7) + 2rem) 0 var(--space-6);
  text-align: center;
}
.hero p { max-width: 60ch; margin-inline: auto; color: var(--text); }
.hero .actions { justify-content: center; margin-top: var(--space-5); }

/* ------------------------------
   5) Cards
---------------------------------*/
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.card--ghost { background: transparent; border-style: dashed; }

/* ------------------------------
   6) Utilities
---------------------------------*/
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.pad-4 { padding: var(--space-4) !important; }
.pad-6 { padding: var(--space-6) !important; }
.text-weak { color: var(--text-weak) !important; }
.center { text-align: center !important; }

/* ------------------------------
   7) "noscript" equivalents
   (show content gracefully when animations were used)
---------------------------------*/
body.is-preload #wrapper::before { display: none; }
body.is-preload #main .thumb { pointer-events: auto; opacity: 1; }
body.is-preload #header { transform: none; }

/* ------------------------------
   8) Legacy helpers (to reduce HTML diffs)
---------------------------------*/
#wrapper { position: relative; }
#main { position: relative; }
#header { will-change: transform; }

/* Barre de filtres — mobile */
.actions.filters {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .5rem;
  margin: .5rem 0 1rem;
}
.actions.filters li { flex: 0 0 auto; }

/* Boutons compacts sur mobile */
@media (max-width: 640px) {
  .actions.filters .button {
    line-height: 2.1em;
    height: 2.1em;
    padding: 0 0.4em;
    font-size: .6em;
    letter-spacing: .04em;
  }
  .grid { gap: .75rem; }
}

/* Select de secours : caché par défaut, visible <480px */
.filters-select { display: none; }
@media (max-width: 480px) {
  .actions.filters { display: none; }
  .filters-select { display: block; width: 100%; height: 2.6em; }
}
ul.actions.filters { gap: .35rem; }
ul.actions.filters li a.button {
  font-size: .80em;
  padding: 0 .55em;
  line-height: 2.05em;
  height: 2.05em;
  letter-spacing: 0;
}
