@font-face { font-family: "Gloock"; src: url("fonts/gloock.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Jost"; src: url("fonts/jost-var.woff2") format("woff2"); font-weight: 300 600; font-display: swap; }

:root {
  --vin: #59001d;
  --nuit: #1d060f;
  --sable: #d7b286;
  --perle: #ecebe8;
  --braise: #b8402a;
  --encre: #2a0a14;
  --gouttiere: clamp(16px, 4.5vw, 72px);
  --serif: "Gloock", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--nuit); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font: 400 clamp(1.05rem, .98rem + .3vw, 1.25rem)/1.6 var(--sans); color: var(--perle); background: var(--nuit); overflow-x: clip; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; text-wrap: balance; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--sable); outline-offset: 3px; }
.composer :focus-visible, .metiers :focus-visible, .manifeste :focus-visible { outline-color: var(--vin); }

.evitement { position: fixed; left: 16px; top: -60px; z-index: 50; padding: 8px 16px; background: var(--perle); color: var(--encre); }
.evitement:focus { top: 40px; }

/* En-tête */
.bandeau-maquette { position: fixed; inset: 0 0 auto; z-index: 30; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0 16px; background: var(--sable); color: var(--encre); font-size: .85rem; line-height: 1.2; text-align: center; white-space: nowrap; }
.tete { position: fixed; inset: 28px 0 auto; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px var(--gouttiere); color: var(--sable); transition: color .35s; }
.tete.sur-clair { color: var(--vin); }
.marque { font: 400 1.3rem/1 var(--serif); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; }
.tete nav { display: flex; gap: clamp(16px, 2.4vw, 36px); align-items: center; font-size: 1rem; }
.tete nav a { text-decoration: none; }
.tete nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.tete-cta { padding: 7px 16px; border: 1px solid currentColor; }
.tete nav .tete-cta:hover { text-decoration: none; background: currentColor; }
.tete nav .tete-cta:hover { color: var(--sable); background: var(--vin); border-color: var(--vin); }

/* Ouverture : un voile s'ouvre sur une arche */
.lever { position: relative; height: 340vh; background: var(--nuit); }
.lever-scene { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.arche { --l: min(36vw, 60vh); position: absolute; left: 50%; bottom: 0; width: var(--l); height: min(calc(var(--l) * 1.4), 84%); transform: translateX(-50%); border-radius: 50vw 50vw 0 0; overflow: hidden; background: #111; }
.arche img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arche-2 { opacity: 0; object-position: 50% 20%; }
#voile { position: absolute; inset: 0; width: 100%; height: 100%; }
.pan { display: none; position: absolute; inset: 0 50% 0 0; background: repeating-linear-gradient(90deg, #3a0718 0 26px, #5e0f2a 52px, #3a0718 80px); }
.pan-d { inset: 0 0 0 50%; }
.sans-gl #voile { display: none; }
.sans-gl .pan { display: block; }

.titre { position: absolute; inset: 0; margin: 0; font: 400 clamp(3rem, 8.6vw, 8.8rem)/1 var(--serif); color: var(--sable); pointer-events: none; }
.titre-a { position: absolute; left: var(--gouttiere); right: var(--gouttiere); top: 50%; transform: translateY(-50%); text-align: center; text-wrap: balance; }
.titre-b { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding-inline: var(--gouttiere); font-size: clamp(2.6rem, 5.8vw, 6rem); opacity: 0; color: var(--perle); }
.titre-b span { max-width: calc(50vw - min(18vw, 30vh) - var(--gouttiere) - 12px); }
.titre-b span:last-child { text-align: right; }
.lever-note { position: absolute; left: var(--gouttiere); bottom: 24px; max-width: 32ch; color: var(--perle); font-size: 1rem; line-height: 1.4; }
.lever-invite { position: absolute; right: var(--gouttiere); bottom: 24px; color: var(--sable); font-size: 1rem; }

/* Manifeste, repris du surlignage des visuels Mirakao */
.manifeste { background: var(--perle); color: var(--encre); padding: clamp(96px, 16vh, 200px) var(--gouttiere); }
.manifeste-ligne { font: 400 clamp(2.6rem, 7.4vw, 9rem)/1.2 var(--serif); }
.manifeste-ligne:nth-child(2) { margin-left: 5vw; }
.manifeste-ligne:nth-child(3) { margin-left: 10vw; }
.hl { --p: 100%; padding: 0 .12em; background: linear-gradient(var(--sable), var(--sable)) 0 62% / var(--p) 74% no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.manifeste-suite { max-width: 34ch; margin: clamp(48px, 8vh, 96px) 0 0 auto; }

/* Jour J : le scroll fait tourner l'horloge, du jour à la nuit */
.jourj { --bg: var(--sable); --fg: var(--encre); background: var(--bg); color: var(--fg); padding: clamp(72px, 12vh, 120px) var(--gouttiere); }
.jourj h2 { font-size: clamp(2rem, 4vw, 3.6rem); }
.horloge { display: none; }
.jourj-etapes { display: grid; gap: 56px; margin-top: 40px; }
.etape img { width: 100%; max-width: 760px; }
.etape h3 { margin-top: 16px; font-size: 2.2rem; }
.etape p { max-width: 42ch; }
.piste { display: none; }

.fx .jourj { height: 600vh; padding: 0; }
.fx .jourj-scene { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; padding: clamp(84px, 13vh, 120px) var(--gouttiere) 28px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); grid-template-rows: auto 1fr auto; column-gap: clamp(24px, 4vw, 72px); }
.fx .jourj-entete { grid-column: 1; }
.fx .horloge { display: block; grid-column: 1; align-self: end; font: 400 clamp(5rem, 15vw, 16rem)/.95 var(--serif); font-variant-numeric: lining-nums; white-space: nowrap; padding-bottom: .1em; }
.fx .jourj-etapes { grid-column: 2; grid-row: 1 / 3; position: relative; margin: 0; display: block; }
.fx .etape { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .45s, visibility .45s; }
.fx .etape.est-active { opacity: 1; visibility: visible; }
.fx .etape img { max-width: none; aspect-ratio: 2.35; object-fit: cover; }
.fx .etape-bande img { aspect-ratio: 5.1; }
.fx .etape:first-child img { aspect-ratio: 1.73; }
.fx .etape h3 { display: none; }
.fx .etape p { margin-top: 18px; }
.fx .piste { display: block; grid-column: 1 / -1; margin-top: 24px; font-size: 1rem; }
.piste-ligne { display: block; height: 1px; background: color-mix(in srgb, var(--fg) 35%, transparent); }
.piste-ligne i { display: block; height: 3px; margin-top: -1px; width: 100%; background: var(--fg); transform: scaleX(0); transform-origin: left; }
.piste-reperes { display: flex; justify-content: space-between; margin-top: 8px; }
.piste-reperes b { font-weight: 400; }

/* Réalisations */
.realisations { padding: clamp(96px, 16vh, 180px) var(--gouttiere); }
.realisations > h2 { max-width: 16ch; font-size: clamp(2.4rem, 6vw, 6rem); color: var(--sable); margin-bottom: clamp(64px, 12vh, 140px); }
.projet { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(88px, 16vh, 180px); }
.projet:last-child { margin-bottom: 0; }
.projet-inverse .projet-images { order: 2; }
.projet-images { position: relative; padding-bottom: 12%; }
.projet-images .grande { width: 66%; max-width: 470px; aspect-ratio: 3 / 4; object-fit: cover; }
.projet-images .petite { position: absolute; right: 0; bottom: 0; width: 44%; max-width: 320px; aspect-ratio: 4 / 5; object-fit: cover; border: 6px solid var(--nuit); }
.projet-quand { color: var(--sable); margin-bottom: 12px; }
.projet h3 { font-size: clamp(1.9rem, 3.4vw, 3.2rem); margin-bottom: 16px; }
.projet-texte p:last-child { max-width: 44ch; }

/* Métiers */
.metiers { background: var(--perle); color: var(--encre); padding: clamp(88px, 14vh, 160px) var(--gouttiere); }
.bascule h2 { max-width: 20ch; font-size: clamp(2.2rem, 5vw, 4.8rem); color: var(--vin); }
.bascule-choix { display: inline-flex; margin-top: 40px; border: 1px solid var(--vin); }
.bascule-choix button { padding: 10px 24px; min-height: 44px; color: var(--vin); }
.bascule-choix button[aria-selected="true"] { background: var(--vin); color: var(--sable); }
.bascule-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; margin-top: 40px; }
.bascule-corps > img { grid-column: 2; grid-row: 1; width: 100%; }
.bascule-corps > div { grid-column: 1; grid-row: 1; max-width: 40ch; }
.bascule-phrase { font: 400 clamp(2.4rem, 5.4vw, 5rem)/1.08 var(--serif); margin-bottom: 16px; }
.offres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 5vw, 80px); margin-top: clamp(64px, 12vh, 120px); }
.offres > div { padding: 24px 0 32px; border-top: 1px solid color-mix(in srgb, var(--vin) 40%, transparent); }
.offres dt { font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1.15 var(--serif); color: var(--vin); margin-bottom: 8px; }

/* Mirana */
.mirana { background: var(--vin); padding: clamp(88px, 14vh, 160px) var(--gouttiere); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 120px); align-items: center; }
.mirana figure { position: relative; max-width: 520px; }
.mirana figcaption { position: absolute; left: 0; bottom: 20px; padding: 8px 14px; background: var(--perle); color: var(--encre); line-height: 1.25; font-size: 1rem; }
.mirana figcaption strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; color: var(--vin); }
.mirana-grand { font: 400 clamp(2.3rem, 5vw, 5rem)/1.1 var(--serif); color: var(--sable); margin-bottom: 32px; text-wrap: balance; }
.mirana ul { margin-bottom: 24px; }

/* Configurateur */
.composer { background: var(--perle); color: var(--encre); padding: clamp(88px, 14vh, 160px) var(--gouttiere); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.composer h2 { font-size: clamp(2.6rem, 6vw, 6rem); color: var(--vin); }
.composer-intro { max-width: 42ch; margin-top: 16px; }
.pas { display: flex; gap: 8px; margin: 40px 0 28px; }
.pas li { flex: 1; height: 3px; background: color-mix(in srgb, var(--vin) 20%, transparent); }
.pas li.fait { background: var(--vin); }
.question-titre { font: 400 clamp(1.6rem, 2.6vw, 2.3rem)/1.15 var(--serif); margin-bottom: 20px; }
.options { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0; }
.options legend { padding: 0; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option span { display: block; padding: 10px 18px; min-height: 44px; border: 1px solid var(--vin); color: var(--vin); }
.option input:hover + span { background: color-mix(in srgb, var(--sable) 40%, transparent); }
.option input:checked + span { background: var(--vin); color: var(--sable); }
.option input:focus-visible + span { outline: 2px solid var(--vin); outline-offset: 3px; }
.curseur label { display: block; font: 400 clamp(2.4rem, 5vw, 4rem)/1.1 var(--serif); color: var(--vin); margin-bottom: 8px; }
.curseur input { width: 100%; accent-color: var(--vin); height: 44px; }
.brief-actions { display: flex; gap: 16px; align-items: center; margin-top: 32px; flex-wrap: wrap; }
.bouton { padding: 12px 26px; min-height: 48px; background: var(--vin); color: var(--sable); }
.bouton:hover:not(:disabled) { background: var(--encre); }
.bouton:disabled { opacity: .4; cursor: not-allowed; }
.bouton-discret { padding: 12px 0; min-height: 48px; color: var(--vin); text-decoration: underline; text-underline-offset: 5px; }
.message { padding: 16px 20px; border-left: 3px solid var(--vin); background: #e1dfda; white-space: pre-line; font-size: 1.02rem; }
.demo-note { margin-top: 16px; color: var(--vin); }

.planche { position: sticky; top: 116px; background: var(--nuit); color: var(--perle); padding: clamp(14px, 1.6vw, 22px); }
.planche-grille { position: relative; display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; gap: 8px; aspect-ratio: 5 / 4; }
.planche-grille img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.planche-grille img:first-of-type { grid-row: 1 / 3; }
.planche-vide { grid-column: 1 / -1; grid-row: 1 / 3; place-self: center; max-width: 26ch; text-align: center; color: var(--sable); }
.planche-teintes { display: flex; height: 40px; margin-top: 8px; }
.planche-teintes:empty { display: none; }
.planche-teintes span { flex: 1; }
.planche-fiche { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin-top: 16px; font-size: 1rem; line-height: 1.3; }
.planche-fiche:empty { display: none; }
.planche-fiche dt { color: var(--sable); }

/* Pied */
.pied { background: var(--nuit); padding: clamp(80px, 14vh, 160px) var(--gouttiere) 32px; }
.pied-grand { font: 400 clamp(3rem, 11.4vw, 13rem)/1 var(--serif); color: var(--sable); }
.pied-coord { display: flex; flex-wrap: wrap; gap: 24px clamp(40px, 8vw, 120px); margin-top: 56px; }
.pied-coord address { font-style: normal; }
.pied-coord a { text-underline-offset: 4px; }
.pied-note { margin-top: 56px; max-width: 70ch; font-size: .95rem; color: #bda9a6; }

/* Sans animation : tout est lisible d'emblée */
html.calme .lever { height: 100vh; }
html.calme #voile, html.calme .titre-a, html.calme .lever-invite { display: none; }
html.calme .titre-b { opacity: 1; }
html.calme .arche-2 { opacity: 1; }

@media (max-width: 860px) {
  .bandeau-long { display: none; }
  .bandeau-maquette { font-size: .8rem; }
  .tete nav a:not(.tete-cta) { display: none; }
  .tete-cta { font-size: .95rem; padding: 6px 12px; }
  .marque { font-size: 1.1rem; }
  .lever-invite { display: none; }
  .arche { --l: min(78vw, 52vh); }
  .titre-a { font-size: clamp(3rem, 15vw, 6rem); }
  .titre-b { flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 0; padding-block: 92px 0; font-size: clamp(2.5rem, 12vw, 4.4rem); color: var(--sable); }
  .titre-b span { max-width: none; }
  .titre-b span:last-child { text-align: left; }
  .lever-note { bottom: 20px; right: var(--gouttiere); max-width: none; }
  .manifeste-ligne:nth-child(2), .manifeste-ligne:nth-child(3) { margin-left: 0; }
  .manifeste-suite { margin-left: 0; }

  .fx .jourj-scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; }
  .fx .horloge { grid-row: 2; font-size: clamp(5rem, 28vw, 9rem); margin-top: 12px; }
  .fx .jourj-etapes { grid-column: 1; grid-row: 3; }
  .fx .etape { justify-content: flex-start; padding-top: 16px; }

  .projet, .bascule-corps, .mirana, .composer, .offres { grid-template-columns: minmax(0, 1fr); }
  .projet-inverse .projet-images { order: 0; }
  .bascule-corps > img, .bascule-corps > div { grid-column: 1; grid-row: auto; }
  .planche { position: static; order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
