@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/6NU78FyLNQOQZAnv9bYEvDiIdE9Ea92uemAk_WBq8U_9v0c2Wa0KxCFTeO-U.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/6NU78FyLNQOQZAnv9bYEvDiIdE9Ea92uemAk_WBq8U_9v0c2Wa0KxC9TeA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/6NU78FyLNQOQZAnv9bYEvDiIdE9Ea92uemAk_WBq8U_9v0c2Wa0KxCFTeO-U.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/6NU78FyLNQOQZAnv9bYEvDiIdE9Ea92uemAk_WBq8U_9v0c2Wa0KxC9TeA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
#couloir{--mur:#211e27;--mur-bas:#2b2630;--lambris:#3b2f27;--sol:#4a372a;--lampe:#ffd696}
body.dans-piece,#voile{--fond:#f4efe6;--encre:#1f2a40;--doux:#5d6578;--accent:#2f3e5c;--formation:#b0703a;--police-titres:"Fraunces";--police-texte:"Inter"}
/* ---------- Le couloir, commun aux trois domaines ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: #17151b;
  color: #ece6da;
  -webkit-font-smoothing: antialiased;
}
body.au-couloir { overflow: hidden; }
[hidden] { display: none !important; }
button { font: inherit; }

#couloir {
  --l: clamp(88px, 21vw, 180px);   /* largeur d'une porte */
  --h: calc(var(--l) * 2.2);
  --brun: #3a2a1d;
  --laiton: #d9b25f;
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: 1fr auto minmax(18vh, 26vh);
  overflow: hidden;
  overflow: clip;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 46px),
    linear-gradient(var(--mur), var(--mur-bas) 70%, color-mix(in srgb, var(--mur-bas) 85%, black));
  transition: transform 1.05s cubic-bezier(.6,.05,.4,1), opacity .5s ease .55s;
}
/* lambris */
.portes::before {
  content: ""; position: absolute; z-index: -1; left: -100vw; right: -100vw; bottom: 0;
  height: calc(var(--h) * .42);
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 2px, transparent 2px 120px),
    linear-gradient(var(--lambris), color-mix(in srgb, var(--lambris) 80%, black));
  border-top: 6px solid #4a3a2e;
  box-shadow: 0 -1px 0 rgba(255,255,255,.06);
}
.lampe {
  position: absolute; top: 0; left: 50%; width: 140vmax; height: 90vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 40% 55% at 50% 0%, color-mix(in srgb, var(--lampe) 20%, transparent), transparent 70%);
  pointer-events: none;
}
.lampe::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 38px; background: #111; transform: translateX(-50%);
}
.lampe::after {
  content: ""; position: absolute; top: 36px; left: 50%; width: 46px; height: 18px;
  transform: translateX(-50%);
  border-radius: 46px 46px 6px 6px;
  background: #1c1a1e;
  box-shadow: 0 10px 30px 6px color-mix(in srgb, var(--lampe) 35%, transparent);
}

.enseigne {
  align-self: center; justify-self: center; text-align: center;
  position: relative; z-index: 2; padding: 0 16px 36px; margin-top: 56px;
}
.enseigne .nom {
  margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: clamp(30px, 6.5vw, 64px); letter-spacing: -.01em; line-height: 1.05;
  color: #f3ead9; text-shadow: 0 2px 30px rgba(255,200,120,.18);
}
.enseigne .sous-titre {
  margin: 10px 0 0; font-size: clamp(14px, 2.2vw, 17px); color: #b9ad9b; letter-spacing: .02em;
}

/* sol en perspective */
.sol {
  position: relative; z-index: 0; overflow: hidden;
  background: linear-gradient(#2a211b, #15110e);
}
.sol::before {
  content: ""; position: absolute; left: -50%; right: -50%; top: 0; height: 220%;
  transform-origin: top; transform: perspective(300px) rotateX(62deg);
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 2px, transparent 2px 70px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 2px, transparent 2px 70px),
    linear-gradient(var(--sol), color-mix(in srgb, var(--sol) 60%, black));
}

/* ---------- Les portes ---------- */
.portes {
  position: relative; z-index: 3;
  display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(16px, 6vw, 80px);
  padding: 0 16px;
}
.emplacement { position: relative; display: flex; flex-direction: column; align-items: center; }

.plaque {
  margin-bottom: 14px; padding: 4px 10px;
  font-size: clamp(10px, 1.7vw, 13px); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: #2b1f12; white-space: nowrap;
  background: linear-gradient(#ecd08a, #b98f3f);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 2px 6px rgba(0,0,0,.5);
}
.fermee .plaque { filter: saturate(.55) brightness(.75); }

.cadre {
  position: relative; width: var(--l); height: var(--h);
  background: #060507;
  box-shadow: 0 0 0 clamp(5px, 1vw, 9px) #4b3a2c, 0 0 0 calc(clamp(5px, 1vw, 9px) + 2px) #2a1f17, 0 18px 40px rgba(0,0,0,.6);
  perspective: 900px;
}
.au-dela { position: absolute; inset: 0; background: #060507; }
.ouverte .au-dela {
  background: radial-gradient(ellipse 120% 90% at 85% 55%, var(--lumiere), transparent 80%), #2a1c10;
  animation: veille 4s ease-in-out infinite;
}
@keyframes veille { 50% { filter: brightness(1.15); } }

.porte {
  position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer;
  transform-origin: left center;
  transition: transform .7s cubic-bezier(.3,.7,.3,1);
  backface-visibility: hidden;
  background: var(--teinte);
  box-shadow: inset -6px 0 12px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.4);
  -webkit-tap-highlight-color: transparent;
}
.porte:focus-visible { outline: 3px solid var(--laiton); outline-offset: 6px; }
.panneau {
  position: absolute; left: 14%; right: 14%;
  border-radius: 2px;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.35), inset -2px -2px 0 rgba(255,255,255,.08), 0 0 0 3px rgba(0,0,0,.08);
}
.panneau.haut { top: 7%; height: 38%; }
.panneau.bas { top: 52%; height: 41%; }
.poignee {
  position: absolute; right: 9%; top: 50%; width: 13%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff2c4, var(--laiton) 45%, #7a5a22);
  box-shadow: 0 2px 3px rgba(0,0,0,.5);
}
.cadenas {
  position: absolute; right: 5%; top: calc(50% + 9%); width: 19%;
  color: #8c8a86; transform-origin: 50% 0;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.6));
}

/* teintes par pièce */
.porte { background: linear-gradient(100deg, var(--teinte), color-mix(in srgb, var(--teinte) 72%, black)); }
/* planches : lames verticales */
.style-planches .porte {
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), color-mix(in srgb, var(--teinte) 60%, black) calc(25% - 1px) 25%),
    linear-gradient(100deg, var(--teinte), color-mix(in srgb, var(--teinte) 78%, black));
}
.style-planches .panneau { display: none; }
/* lisse : porte plate, poignée barre, liseré lumineux */
.style-lisse .porte {
  background: linear-gradient(100deg, var(--teinte), color-mix(in srgb, var(--teinte) 86%, black));
  box-shadow: inset -2px 0 0 rgba(0,0,0,.08), inset 0 0 0 1px rgba(0,0,0,.12);
}
.style-lisse .panneau { display: none; }
.style-lisse .poignee {
  width: 5%; aspect-ratio: auto; height: 22%; top: 40%; right: 10%;
  border-radius: 3px; background: linear-gradient(90deg, #cfd3d8, #8b9097);
}
.style-lisse .porte::after {
  content: ""; position: absolute; left: 50%; top: 6%; bottom: 6%; width: 2px; transform: translateX(-50%);
  background: color-mix(in srgb, var(--lumiere) 70%, transparent); opacity: .0; transition: opacity .4s;
}
.style-lisse.ouverte .porte::after { opacity: .55; }
.style-lisse .cadenas { right: 4%; top: calc(62% + 2%); }

/* porte ouverte : entrebâillée, lumière qui filtre */
.ouverte .porte { transform: rotateY(16deg); }
.ouverte .porte:hover, .ouverte .porte:focus-visible { transform: rotateY(28deg); }
.filet { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.ouverte .filet { background: var(--lumiere); box-shadow: 0 0 16px 5px var(--lumiere); opacity: .75; }
.halo {
  position: absolute; top: 100%; left: 50%; width: calc(var(--l) * 1.9); height: calc(var(--l) * .9);
  transform: translateX(-50%); pointer-events: none;
}
.ouverte .halo {
  background: radial-gradient(ellipse 50% 60% at 50% 0%, var(--lumiere), transparent 70%);
  opacity: .28; transition: opacity .6s;
}
.ouverte:hover .halo { opacity: .45; }
.paillasson {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) perspective(200px) rotateX(40deg);
  width: calc(var(--l) * 1.05); padding: 6px 0;
  font-family: "Fraunces", Georgia, serif; font-size: clamp(10px, 1.6vw, 14px); font-weight: 600;
  text-align: center; letter-spacing: .08em; color: #3a2a14; cursor: pointer;
  background: repeating-linear-gradient(90deg, #a07b44 0 3px, #8f6c3a 3px 6px);
  border-radius: 4px; box-shadow: 0 6px 10px rgba(0,0,0,.45);
}

/* porte fermée : secouée */
.secoue .porte { animation: secoue .45s ease; }
.secoue .cadenas { animation: balance .8s ease; }
@keyframes secoue {
  0%,100% { transform: none; }
  20% { transform: translateX(-3px) rotate(-.4deg); }
  40% { transform: translateX(3px) rotate(.4deg); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}
@keyframes balance {
  0%,100% { transform: rotate(0); }
  20% { transform: rotate(22deg); }
  45% { transform: rotate(-16deg); }
  70% { transform: rotate(8deg); }
}
.bulle {
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: max-content; max-width: 46vw; padding: 7px 12px;
  font-size: 13px; color: #241a10; text-align: center;
  background: #f3ead9; border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.bulle::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #f3ead9;
}
.parle .bulle { opacity: 1; transform: translateX(-50%) translateY(0); }

/* entrée : la porte s'ouvre, on avance dans l'encadrement */
body.entree .ouverte:not([data-href]) .porte, body.entree .franchie .porte { transform: rotateY(105deg); transition-duration: .55s; }
body.entree .ouverte[data-href]:not(.franchie) .porte { transform: none; }
body.entree #couloir { transform: scale(4.2); opacity: 0; }
#voile {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: var(--fond-piece, #000); opacity: 0;
}
#voile.leve { animation: voile .6s ease forwards; }
@keyframes voile { from { opacity: 1; } to { opacity: 0; } }

/* petit écran : portes plus serrées, enseigne plus haute */
@media (max-width: 520px) {
  #couloir { grid-template-rows: 1fr auto 20vh; }
  .portes { gap: 14px; }
  .enseigne { margin-top: 24px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  #couloir { --l: clamp(70px, 13vh, 120px); grid-template-rows: auto auto 1fr; }
  .enseigne { margin: 16px 0; }
}

/* ---------- Commun aux pièces ---------- */
.a-remplir {
  background: #fff1a8; color: #5a4300; padding: 0 .3em; border-radius: 3px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.sortie {
  position: sticky; top: 0; z-index: 10;
  padding: 12px 16px;
}
#sortir {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--trait, rgba(0,0,0,.15));
  background: var(--fond-bouton, rgba(255,255,255,.7));
  color: var(--encre, #222);
  backdrop-filter: blur(8px);
}
#sortir:hover { border-color: currentColor; }
.mini-porte {
  width: 10px; height: 16px; border-radius: 1px;
  background: var(--accent, #555); position: relative;
}
.mini-porte::after { content: ""; position: absolute; right: 2px; top: 8px; width: 2px; height: 2px; border-radius: 50%; background: #d9b25f; }
.contenu { padding: 0 16px 48px; }
.pied { padding: 24px 16px 40px; text-align: center; font-size: 13px; opacity: .6; }
.carte-lien { display: block; height: 100%; color: inherit; text-decoration: none; }

/* ---------- Couloir 3D ---------- */
#scene3d { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; opacity: 0; transition: opacity 1s ease; }
#scene3d.pret { opacity: 1; }
#parcours3d { display: none; }
body.mode-3d #parcours3d { display: block; height: 260vh; }
body.mode-3d.au-couloir { overflow-y: auto; overflow-x: hidden; }
body.mode-3d #couloir { background: none; pointer-events: none; z-index: 2; transform: none !important; opacity: 1 !important; }
body.mode-3d #couloir::before, body.mode-3d .lampe, body.mode-3d .sol { display: none; }
body.mode-3d .portes {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
body.mode-3d .enseigne {
  grid-row: 1; align-self: start; margin-top: 9vh;
  opacity: calc(1 - var(--p, 0) * 3.5); transform: translateY(calc(var(--p, 0) * -40px));
}
body.mode-3d .enseigne .nom { text-shadow: 0 2px 24px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.5); }
body.mode-3d .enseigne .sous-titre { color: #e6dccb; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
body.mode-3d .lien-mentions.coin { position: fixed; pointer-events: auto; color: #d6cbb8; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
body.dans-piece #scene3d, body.dans-piece #parcours3d { display: none; }
.indice3d {
  position: fixed; left: 50%; bottom: 28px; width: 22px; height: 36px; margin-left: -11px;
  border: 2px solid rgba(240,230,215,.75); border-radius: 12px; pointer-events: none; transition: opacity .3s;
}
.indice3d::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: rgba(240,230,215,.85); animation: molette 1.6s ease-in-out infinite;
}
@keyframes molette { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }
.bulle3d {
  position: fixed; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); pointer-events: none;
  padding: 7px 12px; font-size: 13px; color: #241a10; background: #f3ead9; border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,.4); opacity: 0; transition: opacity .2s;
}
.bulle3d.visible { opacity: 1; }
#voile.plein { opacity: 1; transition: opacity .35s ease; }

/* ---------- Pièce en travaux ---------- */
.pancarte {
  position: absolute; z-index: 4; left: 50%; top: 30%; width: 92%;
  transform: translateX(-50%) rotate(-6deg);
  padding: 6px 4px; text-align: center;
  font-size: clamp(10px, 1.7vw, 14px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #2a1a0a; background: repeating-linear-gradient(-45deg, #f0c33c 0 12px, #e6b42a 12px 24px);
  border-radius: 2px; box-shadow: 0 4px 10px rgba(0,0,0,.45);
  pointer-events: none;
}
.pancarte::before, .pancarte::after {
  content: ""; position: absolute; top: -30px; width: 2px; height: 30px; background: #6b5a48;
}
.pancarte::before { left: 22%; transform: rotate(14deg); transform-origin: bottom; }
.pancarte::after { right: 22%; transform: rotate(-14deg); transform-origin: bottom; }
.secoue .pancarte { animation: balance-pancarte .8s ease; }
@keyframes balance-pancarte { 30% { transform: translateX(-50%) rotate(-1deg); } 60% { transform: translateX(-50%) rotate(-9deg); } }

/* ---------- Mentions légales ---------- */
.lien-mentions {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.lien-mentions.coin {
  position: absolute; right: 16px; bottom: 12px; z-index: 5;
  font-size: 12px; color: #8f8578;
}
.lien-mentions.coin:hover { color: #ece6da; }
#mentions {
  max-width: min(520px, calc(100vw - 32px)); padding: 24px 26px;
  border: 0; border-radius: 12px;
  background: #f6f1e7; color: #2a241c;
  font-family: "Inter", system-ui, sans-serif; font-size: 14px; line-height: 1.55;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
#mentions::backdrop { background: rgba(10,8,12,.6); }
#mentions h2 { margin: 0 0 10px; font-family: "Fraunces", Georgia, serif; font-size: 22px; }
#mentions h3 { margin: 16px 0 2px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #7a6f60; }
#mentions p { margin: 0; }
#mentions form { margin-top: 20px; text-align: right; }
#mentions form button {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 8px 18px; border-radius: 8px; border: 1px solid #cfc4b1; background: #fff; color: #2a241c;
}

@media (prefers-reduced-motion: reduce) {
  .porte, #couloir { transition: none !important; }
  .secoue .porte, .secoue .cadenas { animation: none; }
}

/* ---------- Bureau : frise chronologique ---------- */
body.dans-piece {
  --carte: color-mix(in srgb, var(--fond) 70%, white);
  --trait: color-mix(in srgb, var(--encre) 14%, transparent);
  --fond-bouton: color-mix(in srgb, var(--fond) 85%, transparent);
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police-texte), system-ui, sans-serif;
}
#voile { background: var(--fond); }

.bureau { max-width: 1100px; margin: 0 auto; }
.carte { padding: 24px 0 8px; max-width: 760px; }
.carte h1 {
  margin: 0; font-family: var(--police-titres), Georgia, serif; font-weight: 600;
  font-size: clamp(38px, 8vw, 68px); line-height: 1.02; letter-spacing: -.02em;
}
.metier { margin: 12px 0 0; font-size: 20px; color: var(--accent); font-weight: 500; }
.accroche { margin: 16px 0 0; font-size: 17px; line-height: 1.6; max-width: 58ch; color: var(--doux); }
.ville { margin: 10px 0 0; font-size: 14px; color: var(--doux); }
.ville::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }

/* --- La frise --- */
.frise-zone { position: relative; margin: 0 -16px; }
.frise-collant {
  position: sticky; top: 0; height: 100vh; min-height: 560px;
  display: flex; flex-direction: column; justify-content: center; overflow: hidden;
}
.frise-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 16px; flex-wrap: wrap; }
.bureau h2 {
  margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--doux);
}
.frise-legende { display: flex; gap: 16px; font-size: 13px; color: var(--doux); }
.frise-legende span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.l-exp::before { background: var(--accent); }
.l-form::before { background: var(--formation); }

.frise-fenetre { overflow: hidden; outline: none; }
.frise-fenetre.natif { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.frise-fenetre.natif::-webkit-scrollbar { display: none; }
.frise-piste {
  position: relative; display: flex; width: max-content; margin: 0; padding: 0 16px 0 max(16px, 6vw); list-style: none;
  will-change: transform;
}
.frise-piste::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--trait) 6%, var(--trait) 94%, transparent);
}
.jalon { position: relative; flex: none; width: clamp(220px, 24vw, 280px); height: min(62vh, 440px); scroll-snap-align: start; }
.jalon-point {
  position: absolute; left: 22px; top: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 5px var(--fond);
  transition: transform .25s;
}
.jalon-formation .jalon-point { background: var(--formation); }
.jalon-carte {
  position: absolute; left: 0; width: calc(100% - 24px);
  bottom: calc(50% + 26px);
  padding: 14px 16px; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 8px 24px -16px rgba(0,0,0,.25);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.jalon-carte::after {
  content: ""; position: absolute; left: 21px; top: 100%; width: 2px; height: 26px; background: var(--trait);
}
.jalon-formation .jalon-carte { bottom: auto; top: calc(50% + 26px); }
.jalon-formation .jalon-carte::after { top: auto; bottom: 100%; }
.jalon-carte:hover, .jalon-carte:focus-visible, .jalon-carte.active {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: 0 16px 34px -18px rgba(0,0,0,.35);
  outline: none;
}
.jalon-formation .jalon-carte:hover, .jalon-formation .jalon-carte.active { border-color: var(--formation); transform: translateY(4px); }
.jalon:has(.jalon-carte:hover) .jalon-point, .jalon:has(.active) .jalon-point { transform: translate(-50%, -50%) scale(1.35); }
.jalon-dates { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--doux); }
.jalon-titre { display: block; margin-top: 6px; font-family: var(--police-titres), Georgia, serif; font-size: 20px; font-weight: 600; line-height: 1.2; }
.jalon-lieu { display: block; margin-top: 4px; font-size: 14px; color: var(--accent); }
.jalon-formation .jalon-lieu { color: var(--formation); }
.jalon-fin { width: 80px; }
.jalon-fin .jalon-point {
  width: 0; height: 0; border-radius: 0; background: none; box-shadow: none;
  border-left: 12px solid var(--trait); border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}
.frise-progres { margin: 0 16px; height: 3px; border-radius: 3px; background: var(--trait); overflow: hidden; }
.frise-progres span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* --- Fiche de poste --- */
.fiche-panneau {
  position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  padding: 72px 32px 32px; overflow-y: auto;
  background: var(--fond); border-left: 1px solid var(--trait);
  box-shadow: -30px 0 80px -30px rgba(0,0,0,.4);
  transform: translateX(105%); transition: transform .4s cubic-bezier(.3,.7,.3,1);
}
.fiche-panneau.ouvert { transform: none; }
.fiche-fermer {
  position: absolute; top: 18px; right: 20px; cursor: pointer;
  font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px;
  background: transparent; color: var(--encre); border: 1px solid var(--trait);
}
.fiche-type { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); }
.fiche h3 { margin: 10px 0 0; font-family: var(--police-titres), Georgia, serif; font-size: 30px; line-height: 1.1; }
.fiche-lieu { margin: 8px 0 0; color: var(--accent); font-weight: 500; }
.fiche-dates { margin: 4px 0 0; color: var(--doux); font-size: 14px; }
.fiche-resume { margin: 22px 0 0; font-size: 17px; line-height: 1.55; }
.fiche-missions { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.fiche-missions li { position: relative; padding-left: 20px; line-height: 1.5; }
.fiche-missions li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 2px; background: var(--accent); }

/* --- Blocs du bas --- */
.bloc-info p { margin: 0; max-width: 60ch; font-size: 17px; line-height: 1.6; }
.lien-fleche { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.lien-fleche span { display: inline-block; transition: transform .2s; }
.lien-fleche:hover span { transform: translateX(4px); }
.bloc { padding: 34px 0; border-top: 1px solid var(--trait); max-width: 760px; }
.bloc h2 { margin-bottom: 18px; }
.competences { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.competences li { padding: 6px 12px; border: 1px solid var(--trait); border-radius: 999px; font-size: 15px; background: var(--carte); }
.qualites { margin: 14px 0 0; color: var(--doux); font-style: italic; }
.langues { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 20px; }
.langues strong { display: block; font-family: var(--police-titres), Georgia, serif; font-size: 18px; font-weight: 600; }
.langues span { font-size: 14px; color: var(--doux); }

.contact { display: grid; gap: 14px; max-width: 560px; }
.contact .champs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .contact .champs { grid-template-columns: 1fr; } }
.contact label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--doux); }
.contact input, .contact textarea {
  font: inherit; font-size: 16px; color: var(--encre);
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--trait); background: var(--carte);
}
.contact input:focus, .contact textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.contact textarea { resize: vertical; }
.contact .pot { position: absolute; left: -9999px; }
.envoi { display: flex; align-items: center; gap: 14px; }
.contact button { font: inherit; font-weight: 600; cursor: pointer; padding: 10px 22px; border-radius: 8px; border: 0; background: var(--accent); color: var(--fond); }
.contact button:disabled { opacity: .6; cursor: default; }
.etat-envoi { font-size: 14px; color: var(--doux); }

@media (max-width: 760px) {
  .frise-collant { position: relative; height: auto; min-height: 0; padding: 30px 0; }
  .jalon { height: 400px; }
}
