/* ==========================================================================
   Iris Vandel — feuille de style unique
   Maquette WebnexLab. Aucune dépendance, aucun build.

   Registre : galerie. Plein cadre, typographie Didot surdimensionnée,
   habillage discret pour laisser les images parler.

   Note : les « photos » (.shot--01 … --10) gardent leurs propres couleurs quelle
   que soit l'ambiance choisie — comme de vraies photographies, qui ne changent
   pas de teinte parce que le site change de fond.
   ========================================================================== */

/* --- 1. Jetons de couleur (une ambiance = un bloc) ----------------------- */

:root,
[data-palette="nocturne"] {
  --bg: #0b0b0c;
  --surface: #141416;
  --ink: #ece9e3;
  --muted: #8d8a84;
  --line: #26262a;
  --accent: #e4e1da;
  --accent-fg: #0b0b0c;
  --scrim: 6 6 7;
}

[data-palette="papier"] {
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #141414;
  --muted: #6e6a63;
  --line: #e4e0d7;
  --accent: #141414;
  --accent-fg: #faf9f6;
  --scrim: 20 20 20;
}

[data-palette="sepia"] {
  --bg: #1b1512;
  --surface: #241c17;
  --ink: #f0e5d8;
  --muted: #9c8877;
  --line: #33281f;
  --accent: #c7a17a;
  --accent-fg: #1b1512;
  --scrim: 12 9 7;
}

[data-palette="outremer"] {
  --bg: #0a1020;
  --surface: #101829;
  --ink: #e6ecfa;
  --muted: #8391b0;
  --line: #1c2739;
  --accent: #8fa9e8;
  --accent-fg: #0a1020;
  --scrim: 5 8 16;
}

/* --- 2. Jetons non colorés ---------------------------------------------- */

:root {
  --display: "Bodoni Moda", "Didot", "Bodoni MT", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --wide: 1440px;
  --gutter: clamp(1.15rem, 4vw, 3.5rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --ease: cubic-bezier(.2,.7,.3,1);
}

/* --- 3. Base ------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; font-weight: 300; line-height: 1.7;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  transition: background-color .6s var(--ease), color .6s var(--ease);
}
body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* L'attribut `hidden` du HTML doit toujours gagner : sans ce garde-fou, un
   `display: grid` posé plus bas (fenêtre modale, panneau de menu, champ
   conditionnel) laisse l'élément visible alors qu'il est marqué caché. */
[hidden] { display: none !important; }

/* Vignette intégrée dans le site WebnexLab (`?apercu=1`) : pas de commandes de
   démonstration, pas de défilement, contenu affiché tout de suite. */
.is-apercu, .is-apercu body { overflow: hidden; }
.is-apercu .palette-picker,
.is-apercu .demo-flag { display: none; }
.is-apercu .reveal { opacity: 1; transform: none; transition: none; }
p { margin: 0; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.04; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

.skip-link {
  position: fixed; top: .6rem; left: 50%; transform: translate(-50%, -200%);
  z-index: 300; padding: .6rem 1.1rem; background: var(--ink); color: var(--bg); font-size: .85rem;
}
.skip-link:focus { transform: translate(-50%, 0); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.wide { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

/* --- 4. Apparition ------------------------------------------------------ */

.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .9s var(--ease) var(--d, 0ms), transform .9s var(--ease) var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* --- 5. Compositions tenant lieu de photographies ----------------------- */
/* Elles ne dépendent pas de l'ambiance : une photo ne change pas de couleur
   parce que le site passe en clair. Elles sont remplacées par les vraies
   images à la livraison.                                                    */

.shot { display: block; width: 100%; height: 100%; background-color: #2a2a2e; position: relative; }
.shot::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / .05) 1px, transparent 1px);
  background-size: 3px 3px; mix-blend-mode: overlay;
}

.shot--01 { background:
  radial-gradient(120% 80% at 20% 10%, #4a5b6e 0%, transparent 60%),
  linear-gradient(160deg, #1d2733 0%, #55402f 58%, #b98b5e 100%); }
.shot--02 { background:
  linear-gradient(200deg, #9a958b 0%, #5c5a55 40%, #23231f 100%),
  repeating-linear-gradient(75deg, rgb(0 0 0 / .12) 0 12px, transparent 12px 30px); }
.shot--03 { background:
  radial-gradient(80% 70% at 60% 30%, #d8b49a 0%, #8c5f4a 45%, #2e1d18 100%); }
.shot--04 { background:
  linear-gradient(180deg, #cfd6d2 0%, #7f9088 45%, #2b3a34 100%),
  repeating-linear-gradient(0deg, rgb(255 255 255 / .06) 0 2px, transparent 2px 9px); }
.shot--05 { background:
  linear-gradient(115deg, #e0dbcf 0%, #a09585 38%, #4a453c 72%, #191713 100%),
  repeating-linear-gradient(115deg, rgb(0 0 0 / .1) 0 20px, transparent 20px 48px); }
.shot--06 { background:
  radial-gradient(70% 60% at 40% 35%, #f0d9c0 0%, #a3705a 48%, #241611 100%); }
.shot--07 { background:
  radial-gradient(90% 70% at 50% 90%, #3d6f86 0%, #17303e 55%, #070c11 100%); }
.shot--08 { background:
  linear-gradient(170deg, #f2e5cf 0%, #d3a17d 35%, #8e4f4a 70%, #3b1f24 100%); }
.shot--09 { background:
  linear-gradient(145deg, #2c2f3a 0%, #59606f 45%, #b9b0a2 100%),
  repeating-linear-gradient(45deg, rgb(0 0 0 / .1) 0 8px, transparent 8px 22px); }
.shot--10 { background:
  radial-gradient(85% 75% at 30% 25%, #cfc7b8 0%, #6f6656 50%, #201d18 100%); }

/* --- 6. Sélecteur de palette (sous l'en-tête, à gauche) ----------------- */

.palette-picker { position: fixed; top: 5.6rem; left: 1rem; z-index: 120; }
.palette-picker__toggle {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem .5rem .8rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  transition: border-color .25s var(--ease);
}
.palette-picker__toggle:hover { border-color: var(--accent); }
.palette-picker__panel {
  margin-top: .5rem; width: 15.5rem; padding: 1rem;
  background: var(--surface); border: 1px solid var(--line); animation: pop .28s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) } }
.palette-picker__title { font-size: .64rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); margin-bottom: .7rem; }
.palette-picker__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.palette-picker__grid button {
  display: flex; align-items: center; gap: .5rem; padding: .5rem;
  border: 1px solid var(--line); font-size: .76rem;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.palette-picker__grid button:hover { border-color: var(--accent); }
.palette-picker__grid button[aria-checked="true"] { border-color: var(--accent); color: var(--accent); }
.palette-picker__grid button span {
  width: 1.1rem; height: 1.1rem; flex: none;
  background: linear-gradient(135deg, var(--sw1) 0 33%, var(--sw2) 33% 66%, var(--sw3) 66%);
  box-shadow: inset 0 0 0 1px rgb(128 128 128 / .35);
}
.palette-picker__note { margin-top: .8rem; font-size: .7rem; line-height: 1.5; color: var(--muted); }

/* --- 7. Bandeau démonstration ------------------------------------------ */

.demo-flag { position: fixed; right: 1rem; bottom: 1rem; z-index: 120; max-width: min(23rem, calc(100vw - 2rem)); }
.demo-flag__btn {
  display: flex; align-items: center; gap: .5rem; margin-left: auto;
  padding: .55rem 1rem .55rem .8rem; background: var(--accent); color: var(--accent-fg);
  font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
  transition: transform .25s var(--ease);
}
.demo-flag__btn:hover { transform: translateY(-2px); }
.demo-flag__note {
  margin-top: .6rem; padding: 1.05rem 1.15rem; background: var(--surface);
  border: 1px solid var(--line); font-size: .8rem; line-height: 1.6; color: var(--muted);
  animation: pop .28s var(--ease);
}
.demo-flag__note p + p { margin-top: .6rem; }
.demo-flag__note strong { color: var(--ink); font-weight: 500; }

/* --- 8. En-tête --------------------------------------------------------- */

.head {
  position: sticky; top: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
}
.head__in { display: flex; align-items: center; gap: 1.5rem; min-height: 4.6rem; }

.brand {
  margin-right: auto; font-family: var(--display); font-size: 1.15rem;
  letter-spacing: .02em; display: flex; align-items: baseline; gap: .7rem;
}
.brand span { font-family: var(--sans); font-size: .62rem; text-transform: uppercase; letter-spacing: .22em; color: var(--muted); }

.nav { display: flex; gap: 1.8rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; }
.nav a { color: var(--muted); transition: color .25s var(--ease); }
.nav a:hover { color: var(--ink); }

.burger { display: none; width: 2.4rem; height: 2.4rem; place-items: center; border: 1px solid var(--line); }

/* --- 9. Ouverture ------------------------------------------------------- */

.opening { position: relative; padding-block: clamp(3rem, 8vw, 6rem) 0; }

.opening__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 7rem); line-height: .98; letter-spacing: -.02em;
  max-width: 15ch;
}
.opening__title span { display: block; }
.opening__title em { font-style: italic; color: var(--accent); }

.opening__meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 2.5rem;
  margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
}

.link-arrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--accent); margin-left: auto; }
.link-arrow .ico { transition: transform .3s var(--ease); }
.link-arrow:hover .ico { transform: translateX(4px); }

.opening__frame { margin-top: clamp(2.5rem, 6vw, 4rem); height: clamp(16rem, 46vh, 30rem); }

/* --- 10. Filets de section ---------------------------------------------- */

.rule {
  display: flex; align-items: baseline; gap: 1.2rem;
  padding-bottom: 1.1rem; margin-bottom: 2.2rem; border-bottom: 1px solid var(--line);
}
.rule span { font-size: .72rem; letter-spacing: .18em; color: var(--accent); }
.rule h2 { margin-right: auto; }
.rule p { font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.rule--tight { margin-bottom: 1.6rem; }

/* --- 11. Filtres -------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-bottom: 2rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; }
.filters button { color: var(--muted); padding-bottom: .25rem; border-bottom: 1px solid transparent; transition: color .25s var(--ease), border-color .25s var(--ease); }
.filters button:hover { color: var(--ink); }
.filters button.is-on { color: var(--accent); border-bottom-color: var(--accent); }

/* --- 12. Galerie -------------------------------------------------------- */

.gallery { display: grid; gap: clamp(.6rem, 1.4vw, 1.1rem); grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 13rem; }
.frame { grid-row: span 1; }
.frame--tall { grid-row: span 2; }
.frame--wide { grid-column: span 2; }
.frame[hidden] { display: none; }

.frame > button {
  position: relative; display: block; width: 100%; height: 100%; overflow: hidden;
  cursor: zoom-in; padding: 0;
}
.frame .shot { transition: transform .8s var(--ease), filter .5s var(--ease); }
.frame > button:hover .shot { transform: scale(1.045); filter: brightness(.72); }

.frame__cap {
  position: absolute; inset: auto 0 0; z-index: 1; padding: 1rem 1.1rem;
  display: grid; gap: .15rem; text-align: left;
  background: linear-gradient(transparent, rgb(0 0 0 / .72));
  color: #fff; opacity: 0; transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.frame > button:hover .frame__cap,
.frame > button:focus-visible .frame__cap { opacity: 1; transform: none; }
.frame__cap strong { font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.frame__cap em { font-style: normal; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; opacity: .75; }

/* --- 13. Séries --------------------------------------------------------- */

.series { border-top: 1px solid var(--line); }
.serie {
  display: grid; grid-template-columns: 3rem 1fr auto; gap: 1.5rem; align-items: baseline;
  padding-block: 1.8rem; border-bottom: 1px solid var(--line);
  transition: padding-left .4s var(--ease);
}
.serie:hover { padding-left: .8rem; }
.serie__no { font-family: var(--display); font-size: 1.2rem; color: var(--accent); }
.serie p { color: var(--muted); font-size: .94rem; margin-top: .4rem; max-width: 62ch; }
.serie__year { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); white-space: nowrap; }

/* --- 14. À propos ------------------------------------------------------- */

.about__in { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
.about__shot { height: clamp(18rem, 40vw, 30rem); }
.about__lede { font-family: var(--display); font-size: clamp(1.2rem, 2.2vw, 1.55rem); line-height: 1.4; margin-bottom: 1.2rem; }
.about__text > p { color: var(--muted); }
.about__facts { margin: 2.2rem 0 0; border-top: 1px solid var(--line); }
.about__facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding-block: .9rem; border-bottom: 1px solid var(--line); }
.about__facts dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.about__facts dd { margin: 0; font-size: .92rem; }

/* --- 15. Écrire --------------------------------------------------------- */

.write__in { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.write__lede { color: var(--muted); max-width: 44ch; }
.write__mail { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.1rem); margin-top: 2rem; color: var(--accent); }
.write__note { margin-top: .6rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem 0; font: inherit; font-size: .95rem;
  background: none; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field select option { background: var(--surface); color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  justify-self: start; padding: .85rem 1.8rem;
  background: var(--accent); color: var(--accent-fg);
  font-size: .74rem; text-transform: uppercase; letter-spacing: .14em;
  transition: transform .28s var(--ease), filter .28s var(--ease);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

.form-status { font-size: .82rem; line-height: 1.6; color: var(--accent); }
.form-status:empty { display: none; }

/* --- 16. Pied de page --------------------------------------------------- */

.foot { border-top: 1px solid var(--line); padding-block: 2.6rem 2rem; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.foot__brand { font-family: var(--display); font-size: 1.1rem; margin-right: auto; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.foot__nav a:hover { color: var(--ink); }
.foot__legal { flex: 1 0 100%; font-size: .72rem; color: var(--muted); opacity: .8; }
.foot__legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin-top: .85rem; }
.foot__legal-links a { font-size: .85rem; opacity: .85; padding-block: .35rem; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: currentColor; }
.foot__legal-links a:hover, .foot__legal-links a:focus-visible { opacity: 1; }

/* --- 17. Visionneuse ---------------------------------------------------- */

.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.lightbox__scrim { position: absolute; inset: 0; width: 100%; height: 100%; background: rgb(var(--scrim) / .94); cursor: zoom-out; animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0 } }

.lightbox__fig {
  position: relative; margin: 0; z-index: 1;
  width: min(72rem, calc(100vw - 7rem)); animation: rise .4s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) } }

.lightbox__fig .shot { height: min(72vh, 42rem); }
.lightbox__fig figcaption {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem;
  margin-top: 1rem; color: #efece6;
}
.lightbox__fig strong { font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.lightbox__fig em { font-style: normal; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; opacity: .6; }

.lightbox__nav, .lightbox__x {
  position: absolute; z-index: 2; display: grid; place-items: center;
  width: 3rem; height: 3rem; color: #efece6; border: 1px solid rgb(239 236 230 / .28);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.lightbox__nav:hover, .lightbox__x:hover { background: rgb(239 236 230 / .12); border-color: #efece6; }
.lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__x { top: 1rem; right: 1rem; }

/* --- 18. Adaptations ---------------------------------------------------- */

@media (max-width: 1000px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 11rem; }
  .about__in, .write__in { grid-template-columns: 1fr; }
  .about__shot { height: 16rem; }
}

@media (max-width: 760px) {
  .burger { display: grid; }
  .nav {
    position: fixed; inset: 4.6rem 0 auto; z-index: 88; flex-direction: column; gap: 0;
    padding: .5rem var(--gutter) 1.4rem; background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform .35s var(--ease);
  }
  .nav.is-open { transform: none; }
  .nav a { padding-block: .9rem; border-bottom: 1px solid var(--line); }

  .palette-picker { top: 5.4rem; }
  .demo-flag { max-width: calc(100vw - 9.5rem); }
  .demo-flag__note { max-height: 55vh; overflow-y: auto; }

  .frame--wide { grid-column: span 2; }
  .frame--tall { grid-row: span 1; }
  .serie { grid-template-columns: 2rem 1fr; }
  .serie__year { grid-column: 2; }
  .about__facts div { grid-template-columns: 1fr; gap: .2rem; }

  .lightbox__fig { width: calc(100vw - 2rem); }
  .lightbox__nav { top: auto; bottom: 1rem; transform: none; }
  .lightbox__nav--prev { left: 1rem; }
  .lightbox__nav--next { right: 1rem; }
}

@media (max-width: 420px) {
  .palette-picker__toggle span, .demo-flag__btn span { display: none; }
  .palette-picker__panel { width: min(17rem, calc(100vw - 2rem)); }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 13rem; }
  .frame--wide { grid-column: span 1; }
}
