/* === ATELIER v2 : styles du portfolio LBN (version vitrine, sans vente). 1. Tokens · 2. Compléments · 3. Composants · 4. Mouvement · 5. Contraste forcé === */

/* === 1. TOKENS (design/tokens.css, chemins des polices adaptés) === */
/* --- Polices : fonts.css, chargé par le script de tête d’index.html (repli <noscript>) --- */

:root {
  /* --- Couleurs : fond clair (contraste sur --paper) --- */
  --paper: #F6F2EA;
  --sand: #EDE6DA;
  --card: #FFFDF9;
  --ink: #1D1B18; /* 15,4:1 */
  --ink-muted: #655D53; /* 5,8:1 · 5,2:1 */
  --line: rgb(29 27 24 / .14);
  --line-strong: #8C8377; /* 3,3:1 */
  --accent: #163D57; /* 10,2:1 · 11,4:1 */
  --accent-hover: #0F2C40;
  --accent-tint: #E3EAEE;
  --danger: #9C3D22; /* 6,1:1 */

  /* --- Couleurs : récapitulatif (bleu nuit) --- */
  --deep: #13324A;
  --deep-raised: #1A3D57;
  --deep-text: #F6F2EA; /* 11,9:1 */
  --deep-muted: #A9BCCB; /* 6,8:1 */
  --deep-line: rgb(246 242 234 / .2);
  --deep-warm: #F0C9A0; /* 8,6:1 */

  /* --- Couleurs : pied de page --- */
  --night: #1D1B18;
  --night-text: #F6F2EA; /* 15,4:1 */
  --night-muted: #A39A8E; /* 6,2:1 */
  --night-line: rgb(246 242 234 / .16);

  /* --- Typographie --- */
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-label: .75rem;
  --fs-small: .9375rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.1875rem, 1.05rem + .45vw, 1.375rem);
  --fs-h3: clamp(1.5rem, 1.3rem + .6vw, 1.875rem);
  --fs-h2: clamp(2.25rem, 1.55rem + 2.6vw, 3.75rem);
  --fs-h1: clamp(2.75rem, 1.55rem + 4.4vw, 5.5rem);
  --fs-price: clamp(2rem, 1.5rem + 1.8vw, 3rem);

  --lh-h1: 1.02;
  --lh-h2: 1.06;
  --lh-h3: 1.2;
  --lh-body: 1.6;

  --track-h1: -.022em;
  --track-h2: -.015em;
  --track-label: .14em;

  /* --- Grille et espacements (base 4 px) --- */
  --container: 77.5rem;
  --cols: 12;
  --gutter: clamp(1rem, .7rem + 1vw, 1.75rem);
  --margin: clamp(1.25rem, .8rem + 2vw, 2.5rem);
  --measure: 60ch;

  --s-1: .25rem;  --s-2: .5rem;  --s-3: .75rem;  --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;   --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;    --s-10: 8rem;
  --section-y: clamp(5rem, 3rem + 7vw, 9rem);

  /* --- Formes --- */
  --r-s: 4px;
  --r-m: 8px;
  --r-pill: 999px;
  --hair: 1px;

  /* --- Mouvement --- */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-ui: cubic-bezier(.25, .8, .25, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --dur-press: 120ms;
  --dur-hover: 200ms;
  --dur-ui: 300ms;
  --dur-move: 650ms;
  --dur-reveal: 900ms;
  --dur-draw: 800ms;
  --dur-map: 2400ms;
  --stagger: 70ms;
  --stagger-draw: 160ms;
  --rise: 18px;

  /* --- Divers --- */
  --focus-ring: 2px solid var(--accent);
  --focus-offset: 3px;
  --z-header: 50;
  --z-overlay: 80;

  color-scheme: light;
}

/* === 2. COMPLÉMENTS === */
:root {
  --on-accent: #fff; /* sur --accent : 11,4:1 */
  --dur-fade: 200ms; --dur-step-out: 260ms; --dur-step-in: 480ms; --dur-zoom: 1200ms;
  --dur-wipe: 1300ms; --dur-line: 1400ms; --dur-settle: 1800ms;
  --dur-ping: 2.6s; --dur-ring: 2.8s; --stagger-line: 80ms;
}

/* === 3. COMPOSANTS (planche v2) === */
/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
ul[role="list"], ol[role="list"] { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
[tabindex="-1"]:focus { outline: none; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: var(--s-3); left: var(--s-3); z-index: var(--z-overlay); padding: var(--s-3) var(--s-4); border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }

/* --- Typographie --- */
.h1, .h2, .h3 { font-family: var(--font-serif); font-weight: 400; text-wrap: balance; }
.h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--track-h1); }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--track-h2); }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: -.01em; font-weight: 500; }
.h1 em, .h2 em, .h3 em { font-style: italic; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink); max-width: 38ch; text-wrap: pretty; }
.prose { max-width: var(--measure); color: var(--ink-muted); text-wrap: pretty; }
.prose p + p { margin-top: var(--s-4); }
.label { font-family: var(--font-sans); font-size: var(--fs-label); font-weight: 600; line-height: 1.4; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-muted); }
.small { font-size: var(--fs-small); color: var(--ink-muted); }

/* À remplir : discret */
.todo { color: var(--ink-muted); text-decoration: underline dotted var(--line-strong) 1.5px; text-underline-offset: .22em; }

/* --- Mise en page --- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--margin)); margin-inline: auto; padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gutter); }
@media (min-width: 60rem) { .grid { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); } }
.section { padding-block: var(--section-y); }
.section--sand { background: var(--sand); }
.section-head { display: grid; gap: var(--s-4); margin-bottom: clamp(var(--s-7), 5vw, var(--s-9)); max-width: 46rem; }
.section-head .prose { margin-top: var(--s-2); }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-3); text-wrap: balance; }
.eyebrow::before { content: ""; width: 1.75rem; height: var(--hair); background: currentColor; }

/* --- Boutons et liens --- */
.btn { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-bd: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3); min-height: 3.125rem; padding: 0 var(--s-6); border: var(--hair) solid var(--btn-bd); border-radius: var(--r-pill); background: var(--btn-bg); color: var(--btn-fg); font-size: var(--fs-small); font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-hover) var(--ease-ui), color var(--dur-hover) var(--ease-ui), border-color var(--dur-hover) var(--ease-ui), transform var(--dur-press) var(--ease-ui); }
.btn:hover { --btn-bg: var(--accent-hover); --btn-bd: var(--accent-hover); }
.btn:active { transform: scale(.98); }
.btn__arrow { width: 1em; height: 1em; flex: none; transition: transform var(--dur-ui) var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.link { color: inherit; text-decoration: underline; text-decoration-thickness: var(--hair); text-underline-offset: .25em; text-decoration-color: var(--line-strong); transition: text-decoration-color var(--dur-hover) var(--ease-ui); }
.link:hover { text-decoration-color: currentColor; }
.nav-link { position: relative; color: var(--ink); font-size: var(--fs-small); text-decoration: none; padding-block: var(--s-2); }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: var(--hair); background: currentColor; transform: scaleX(0); transform-origin: 100% 50%; transition: transform var(--dur-ui) var(--ease-out); }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after,
.nav-link[aria-current="true"]::after { transform: scaleX(1); transform-origin: 0 50%; }

/* --- En-tête --- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: var(--paper); border-bottom: var(--hair) solid var(--line); }
@media (max-height: 30rem) { .site-header { position: static; } html { scroll-padding-top: var(--s-4); } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: 4.5rem; }
.brand { display: grid; line-height: 1.15; color: var(--ink); text-decoration: none; }
.brand__name { font-family: var(--font-serif); font-size: 1.375rem; font-weight: 500; letter-spacing: -.01em; }
.brand__tag { white-space: nowrap; font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.site-nav { display: none; }
@media (min-width: 64rem) { .site-nav { display: flex; gap: var(--s-6); } }

/* --- Hero --- */
.hero { padding-top: clamp(var(--s-6), 4vw, var(--s-8)); padding-bottom: var(--section-y); }
.hero__grid { row-gap: var(--s-7); align-items: center; }
.hero__text { grid-column: 1 / -1; display: grid; gap: var(--s-5); justify-items: start; }
.hero__visual { grid-column: 1 / -1; display: grid; gap: var(--s-5); justify-items: center; width: 100%; max-width: 34rem; margin-inline: auto; }
@media (min-width: 64rem) {
  .hero__text { grid-column: 1 / span 7; }
  .hero__visual { grid-column: 8 / span 5; max-width: none; margin: 0; }
}

/* Pile de fenêtres d'exemples (hero). Positions : 0 = devant, 1 = milieu, 2 = derrière.
   Ombre légère : exception documentée (DESIGN-SYSTEM § 14), comme la fenêtre pop-up. */
.pile { position: relative; width: 100%; aspect-ratio: 16 / 13.6; margin: 0; padding: 0; }
.pile__item { position: absolute; left: 0; bottom: 0; width: 84%; transform-origin: 30% 100%;
  transition: transform 900ms var(--ease-inout), opacity 900ms var(--ease-inout), box-shadow var(--dur-hover) var(--ease-ui); }
.pile__item[data-pos="0"] { z-index: 3; transform: translate(0, 0) rotate(-1.5deg); }
.pile__item[data-pos="1"] { z-index: 2; transform: translate(8%, -15.5%) rotate(1.5deg) scale(.95); }
.pile__item[data-pos="2"] { z-index: 1; transform: translate(16%, -31%) rotate(3.5deg) scale(.9); opacity: .9; }
.pile__lien { display: block; overflow: hidden; border: var(--hair) solid var(--line-strong); border-radius: var(--r-m);
  background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 0 .75rem 2rem rgb(29 27 24 / .14); }
.pile__item[data-pos="0"] .pile__lien { box-shadow: 0 1.25rem 3rem rgb(29 27 24 / .2); }
.pile__lien:hover { border-color: var(--ink); }
.pile__lien:focus-visible { outline: var(--focus-ring); outline-offset: 4px; }
.pile__barre { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-3); background: var(--sand); border-bottom: var(--hair) solid var(--line); font-size: var(--fs-small); line-height: 1.3; }
.pile__barre > * { position: relative; z-index: 1; }
.pile__pastilles { display: inline-flex; gap: 5px; flex: none; }
.pile__pastilles i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); opacity: .55; }
.pile__etiquette { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pile__etiquette strong { font-weight: 600; }
.pile__lien img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.pile__barre::after { content: ""; position: absolute; inset: -40% 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(112deg, transparent 41%, rgb(255 255 255 / .95) 43.5%, rgb(255 255 255 / .95) 45%, transparent 46.5%,
                            transparent 48.5%, rgb(255 255 255 / .8) 49.3%, transparent 50.3%),
    linear-gradient(112deg, transparent 28%, rgb(255 253 249 / .7) 45%, transparent 62%);
  filter: blur(.4px); transform: translateX(-120%); }
@media (prefers-reduced-motion: no-preference) {
  html[data-motion="full"] .pile__item[data-pos="0"] .pile__barre::after { animation: apercu-reflet 4.5s cubic-bezier(.45, 0, .55, 1) 1.2s infinite; }
}
@media (max-width: 79.99rem) {
  /* Pile plus étroite : on écarte davantage les fenêtres pour que chaque barre reste lisible */
  .pile { aspect-ratio: 16 / 15; }
  .pile__item[data-pos="1"] { transform: translate(7%, -19%) rotate(1.5deg) scale(.95); }
  .pile__item[data-pos="2"] { transform: translate(14%, -38%) rotate(3deg) scale(.9); }
}
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .pile { aspect-ratio: 16 / 13.6; }
  .pile__item[data-pos="1"] { transform: translate(8%, -15.5%) rotate(1.5deg) scale(.95); }
  .pile__item[data-pos="2"] { transform: translate(16%, -31%) rotate(3.5deg) scale(.9); }
}
@media (max-width: 39.99rem) {
  .pile__item { width: 86%; }
  .pile__etiquette { font-size: .8125rem; }
  .pile__barre { padding: var(--s-1) var(--s-3); }
}
@media (forced-colors: active) {
  .pile__barre::after { display: none; }
  .pile__lien { border: 1px solid CanvasText; }
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); margin-top: var(--s-2); }
.hero__facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-5); padding-top: var(--s-5); border-top: var(--hair) solid var(--line); font-size: var(--fs-small); color: var(--ink-muted); }
.hero__facts li { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero__facts svg { width: 1rem; height: 1rem; color: var(--accent); }
.frame { position: relative; overflow: hidden; border-radius: var(--r-s); background: var(--sand); }
.frame--wide { aspect-ratio: 16 / 10; }
.frame__inner { position: absolute; inset: 0; }
.frame__inner > img { width: 100%; height: 100%; object-fit: cover; }

/* --- Menu mobile --- */
.menu-toggle { display: none; }
@media (max-width: 63.99rem) {
  [data-js] .menu-toggle { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 2.75rem; margin-left: auto; padding: 0 var(--s-4); border: var(--hair) solid var(--line-strong); border-radius: var(--r-pill); background: transparent; font-size: var(--fs-small); font-weight: 600; line-height: 1; cursor: pointer; transition: border-color var(--dur-hover) var(--ease-ui), background-color var(--dur-hover) var(--ease-ui); }
  [data-js] .menu-toggle::after { content: ""; width: .45rem; height: .45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.125rem) rotate(45deg); transition: transform var(--dur-ui) var(--ease-out); }
  [data-js] .menu-toggle[aria-expanded="true"]::after { transform: translateY(.125rem) rotate(-135deg); }
  [data-js] .menu-toggle:hover { border-color: var(--ink); }
  .site-header__inner { gap: var(--s-3); }
  .site-nav.is-open { position: absolute; top: 100%; left: 0; right: 0; display: grid; padding: var(--s-2) var(--margin) var(--s-5); background: var(--paper); border-bottom: var(--hair) solid var(--line); }
  .site-nav.is-open .nav-link { display: flex; align-items: center; min-height: 3rem; font-size: var(--fs-body); border-bottom: var(--hair) solid var(--line); }
  .site-nav.is-open .nav-link::after { bottom: -1px; }
  [data-motion="full"] .site-nav.is-open { animation: menu-in var(--dur-ui) var(--ease-out) both; }
}
@media (max-width: 29.99rem) {
  .site-header__inner > .btn { display: none; }
}

/* --- Réalisations --- */
.projects { display: grid; gap: var(--s-8) var(--gutter); }
@media (min-width: 48rem) { .projects { grid-template-columns: 1fr 1fr; } }
.project { display: grid; gap: var(--s-4); align-content: start; color: inherit; }
.project { position: relative; }
.project__link { color: inherit; text-decoration: none; }
.project__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-m); }
.project__link:hover { text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: var(--hair); }
.project__link:focus-visible { outline: none; }
.project__link:focus-visible::after { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.projects__note { max-width: var(--measure); margin-top: var(--s-6); color: var(--ink-muted); }
.project .frame__inner { transition: transform var(--dur-zoom) var(--ease-out); }
.project:hover .frame__inner { transform: scale(1.03); }
.project__meta { display: flex; justify-content: space-between; gap: var(--s-4); align-items: baseline; }
.project__title { display: inline-flex; align-items: center; gap: var(--s-3); }
.project__result { color: var(--ink-muted); }
.small, .project__result, .principles li, .type p { text-wrap: pretty; }
/* --- À propos + carte de Corse --- */
.about { row-gap: var(--s-8); align-items: center; }
.about__text { grid-column: 1 / -1; display: grid; gap: var(--s-5); }
.about__map { grid-column: 1 / -1; justify-self: center; width: min(100%, 17rem); }
@media (min-width: 60rem) {
  .about__text { grid-column: 1 / span 6; }
  .about__map { grid-column: 8 / span 5; }
}
.principles { display: grid; gap: 0; counter-reset: p; border-top: var(--hair) solid var(--line); }
.principles li { display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--s-3); padding-block: var(--s-4); border-bottom: var(--hair) solid var(--line); }
.principles li::before { counter-increment: p; content: counter(p) "."; font-family: var(--font-serif); font-style: italic; color: var(--accent); font-size: 1.25rem; line-height: 1.3; }
.map svg { width: 100%; height: auto; overflow: visible; }
.map__island { fill: var(--paper); stroke: var(--accent); stroke-width: 1.2; stroke-linejoin: round; }
.map__town circle { fill: var(--ink); }
.map__town text { font-family: var(--font-sans); font-size: 11px; fill: var(--ink-muted); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.map__town--home circle { fill: var(--accent); }
.map__town--home text { fill: var(--ink); font-weight: 600; }
.map__ring { fill: none; stroke: var(--accent); stroke-width: 1; }
.map figcaption { margin-top: var(--s-4); text-align: center; }

/* --- Pied de page --- */
.site-footer { background: var(--night); color: var(--night-text); padding-block: var(--s-7) var(--s-6); }
.site-footer .label, .site-footer .small { color: var(--night-muted); }
.site-footer :focus-visible { outline-color: var(--night-text); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--s-4); color: var(--night-muted); font-size: var(--fs-small); }
.site-footer__bottom a { color: inherit; }
.legal summary { cursor: pointer; text-decoration: underline; text-underline-offset: .2em; list-style: none; }
.legal summary::-webkit-details-marker { display: none; }
.legal { order: 9; flex-basis: 100%; }
.legal dl { display: grid; gap: var(--s-2); margin-top: var(--s-3); }
.legal dl div { display: grid; gap: 0 var(--s-4); }
@media (min-width: 40rem) { .legal dl div { grid-template-columns: 8rem 1fr; } }
.legal dt { color: var(--night-text); }
.site-footer .todo { color: var(--night-muted); text-decoration-color: var(--night-muted); }
.toggle { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 1.5rem; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.toggle__track { position: relative; width: 2.25rem; height: 1.25rem; border: var(--hair) solid currentColor; border-radius: var(--r-pill); }
.toggle__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.25rem - 6px); height: calc(1.25rem - 6px); border-radius: 50%; background: currentColor; transition: transform var(--dur-ui) var(--ease-out); }
.toggle[aria-pressed="true"] .toggle__track::after { transform: translateX(1rem); }

/* --- Types de sites réalisables --- */
.types { display: grid; gap: var(--gutter); margin: 0; padding: 0; list-style: none; }
@media (min-width: 40rem) { .types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .types { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.type { display: grid; grid-template-rows: auto 1fr auto; gap: var(--s-3); padding: var(--s-6); border: var(--hair) solid var(--line); border-radius: var(--r-m); background: var(--card); }
.type p { color: var(--ink-muted); }
.type__temps { display: grid; gap: var(--s-1); margin-top: var(--s-2); padding-top: var(--s-4); border-top: var(--hair) solid var(--line); font-size: var(--fs-small); }
.type__temps dt { color: var(--ink-muted); }
.type__temps dd { margin: 0; color: var(--ink); font-weight: 600; }
.types__note { max-width: var(--measure); margin-top: var(--s-6); }
.project__temps { font-size: var(--fs-small); color: var(--ink); }
.project__temps strong { font-weight: 600; }

/* === 4. MOUVEMENT : data-motion absent (sans JS) = immobile ; reduce = fondus ; full = tout.
   Seulement transform, opacity, clip-path, stroke-dashoffset. === */

/* M1. Titres découpés en lignes */
.split-line { display: block; overflow: clip; padding-bottom: .12em; margin-bottom: -.12em; }
.split-line__in { display: block; }
[data-motion="full"] :is([data-split], [data-split-dyn]):not(.is-in) .split-line__in { transform: translateY(70%); opacity: 0; }
[data-motion="full"] :is([data-split], [data-split-dyn]) .split-line__in { transition: transform var(--dur-reveal) var(--ease-out), opacity var(--dur-reveal) var(--ease-out); transition-delay: calc(var(--line, 0) * var(--stagger-line)); }
[data-motion="full"] [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(var(--rise)); }
[data-motion="full"] [data-reveal] { transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: calc(var(--d, 0) * var(--stagger)); }
[data-motion="reduce"] [data-reveal]:not(.is-in),
[data-motion="reduce"] :is([data-split], [data-split-dyn]):not(.is-in) { opacity: 0; }
[data-motion="reduce"] [data-reveal],
[data-motion="reduce"] :is([data-split], [data-split-dyn]) { transition: opacity var(--dur-fade) linear; }
[data-motion="full"] [data-draw]:not(.is-in) { transform: scaleX(0); }
[data-motion="full"] [data-draw] { transition: transform var(--dur-line) var(--ease-inout) var(--dur-hover); }
/* M13. Carte de Corse */
[data-motion="full"] .map:not(.is-in) .map__island { stroke-dashoffset: 1; fill-opacity: 0; }
[data-motion="full"] .map .map__island { stroke-dasharray: 1; transition: stroke-dashoffset var(--dur-map) var(--ease-inout), fill-opacity var(--dur-reveal) var(--ease-ui) 1800ms; }
[data-motion="full"] .map:not(.is-in) .map__town { opacity: 0; transform: translateY(4px); }
[data-motion="full"] .map .map__town { transition: opacity 500ms var(--ease-ui), transform 500ms var(--ease-out); transition-delay: calc(1900ms + var(--i, 0) * 90ms); }
[data-motion="full"] .map .map__ring { transform-box: fill-box; transform-origin: center; animation: ring var(--dur-ring) var(--ease-out) 3s infinite; }
@keyframes ring { 0% { transform: scale(.6); opacity: .9; } 80%, 100% { transform: scale(2.4); opacity: 0; } }

/* M4, M11. Défilement, si pris en charge */
@supports (animation-timeline: view()) {
  [data-motion] .site-header { animation: header-line linear both; animation-timeline: scroll(root); animation-range: 0 6rem; }
  [data-motion="full"] .project .frame__inner > * { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
}
@keyframes header-line { from { border-bottom-color: transparent; } to { border-bottom-color: var(--line); } }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }

@keyframes menu-in { from { opacity: 0; transform: translateY(-.5rem); } }

/* === 5. CONTRASTE FORCÉ (Windows) === */
@media (forced-colors: active) {
  .btn, .type { border: var(--hair) solid CanvasText; }
  .todo { text-decoration-color: CanvasText; }
  .map__island { stroke: CanvasText; }
}

/* === Aperçu des exemples (fenêtre par-dessus le portfolio) ===
   Exception au § 12 du design system : une ombre portée légère, seule façon de détacher la fenêtre du fond assombri. */
html:has(.apercu[open]) { overflow: hidden; }
.apercu {
  width: min(92vw, 1400px); height: min(88vh, 960px); height: min(88dvh, 960px);
  max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: var(--r-m);
  background: transparent; color: var(--ink); overflow: visible;
}
.apercu::backdrop { background: rgb(29 27 24 / .62); }
.apercu__fenetre {
  display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%;
  border: var(--hair) solid var(--line-strong); border-radius: var(--r-m); overflow: hidden;
  background: var(--card); box-shadow: 0 1.5rem 4rem rgb(29 27 24 / .28);
}
.apercu__barre {
  display: flex; align-items: center; gap: var(--s-3) var(--s-4); flex-wrap: wrap;
  padding: var(--s-2) var(--s-3) var(--s-2) var(--s-4); background: var(--sand); border-bottom: var(--hair) solid var(--line);
}
.apercu__pastilles { display: inline-flex; gap: 6px; flex: none; }
.apercu__pastilles i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); opacity: .55; }
.apercu__titre { flex: 1 1 18rem; min-width: 0; margin: 0; font-size: var(--fs-small); line-height: 1.35; text-wrap: pretty; }
.apercu__titre strong { font-weight: 600; }
.apercu__court { display: none; }
.apercu__plein { white-space: nowrap; }
.apercu__precision { color: var(--ink-muted); }
.apercu__outils { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.apercu__vues { display: inline-flex; padding: 2px; border: var(--hair) solid var(--line-strong); border-radius: var(--r-pill); }
.apercu__vue, .apercu__plein, .apercu__fermer {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  font: inherit; font-size: var(--fs-small); color: var(--ink); cursor: pointer;
}
.apercu__vue { min-height: 2.5rem; padding: 0 var(--s-3); border: 0; border-radius: var(--r-pill); background: transparent; }
.apercu__vue[aria-pressed="true"] { background: var(--accent); color: #fff; }
.apercu__plein { padding: 0 var(--s-3); border-radius: var(--r-pill); text-decoration: underline; text-underline-offset: .2em; }
.apercu__fermer { width: 2.75rem; padding: 0; border: var(--hair) solid var(--line-strong); border-radius: 50%; background: var(--card); font-size: 1.5rem; line-height: 1; }
.apercu__fermer:hover, .apercu__vue:not([aria-pressed="true"]):hover { background: var(--paper); }
:is(.apercu__vue, .apercu__plein, .apercu__fermer):focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.apercu__scene { position: relative; display: grid; justify-items: center; min-height: 0; background: var(--paper); }
.apercu__cadre { display: block; width: 100%; height: 100%; border: 0; background: var(--card); }
.apercu[data-vue="mobile"] .apercu__cadre { width: 390px; max-width: 100%; border-inline: var(--hair) solid var(--line); }
/* Ouverture : fondu + léger zoom (mouvement complet seulement) */
[data-motion="full"] .apercu[open] { animation: apercu-entree var(--dur-ui) var(--ease-out); }
[data-motion="full"] .apercu[open]::backdrop { animation: apercu-fond var(--dur-ui) linear; }
@keyframes apercu-entree { from { opacity: 0; transform: scale(.97); } }
@keyframes apercu-fond { from { opacity: 0; } }
@media (max-width: 47.99rem) {
  .apercu { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
  .apercu__fenetre { border: 0; border-radius: 0; box-shadow: none; }
  .apercu__pastilles, .apercu__precision, .apercu__vues { display: none; }
  .apercu__barre { flex-wrap: nowrap; padding-left: var(--s-3); }
  .apercu__titre { flex: 1 1 auto; }
  .apercu__titre strong { display: block; font-size: .875rem; }
  .apercu__plein { font-size: .875rem; padding: 0 var(--s-2); }
  .apercu__long { display: none; }
  .apercu__court { display: inline; }
}
/* Reflet sur la barre du cadre (même geste que le bandeau des exemples) : un éclat diagonal lent (≈ 3 s) toutes les 4,5 s */
.apercu__barre { position: relative; overflow: hidden; isolation: isolate; }
.apercu__barre > * { position: relative; z-index: 1; } /* le reflet passe sous le texte et les boutons */
.apercu__barre::after {
  content: ""; position: absolute; inset: -40% 0; z-index: 0; pointer-events: none;
  /* Reflet de verre : halo large et doux + deux filets nets (un épais, un fin), sous le texte et les boutons : seul le fond s'illumine */
  background:
    linear-gradient(112deg, transparent 41%, rgb(255 255 255 / .95) 43.5%, rgb(255 255 255 / .95) 45%, transparent 46.5%,
                            transparent 48.5%, rgb(255 255 255 / .8) 49.3%, transparent 50.3%),
    linear-gradient(112deg, transparent 28%, rgb(255 253 249 / .7) 45%, transparent 62%);
  filter: blur(.4px);
  transform: translateX(-120%);
}
@media (prefers-reduced-motion: no-preference) {
  html[data-motion="full"] .apercu[open] .apercu__barre::after { animation: apercu-reflet 4.5s cubic-bezier(.45, 0, .55, 1) .6s infinite; }
}
@keyframes apercu-reflet { 0% { transform: translateX(-120%); } 70%, 100% { transform: translateX(120%); } }
@media (forced-colors: active) { .apercu__barre::after { display: none; } }
@media (forced-colors: active) { .apercu__fenetre { border: 1px solid CanvasText; } .apercu__vue[aria-pressed="true"] { outline: 2px solid Highlight; } }
