/* Structure fixe : bascule de scène (wipe), header, sceau, menu plein écran, pastilles, barre de progression, marqueur de travail. */

.wipe {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  visibility: hidden;
  will-change: clip-path;
}

.progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 70;
  width: 100%;
  height: 3px;
  background: var(--display);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(14px, 2vw, 28px) var(--gutter);
  pointer-events: none;
  transition: transform .5s var(--ease-out);
}
.header.is-hidden { transform: translateY(-130%); }
.header > * { pointer-events: auto; }

.seal { display: block; width: clamp(64px, 6.4vw, 92px); transition: transform .4s var(--ease-out); }
.seal svg { width: 100%; height: auto; }
.seal__bg { fill: var(--bubble); }
.seal__ring { transform-origin: 50% 50%; animation: seal-spin 40s linear infinite; }
.seal__ring text { font: 600 7px/1 var(--font); letter-spacing: .14em; fill: var(--ink); }
.seal__mono { font: 700 21px/1 var(--font); letter-spacing: -.02em; fill: var(--ink); }
@keyframes seal-spin { to { transform: rotate(360deg); } }
@media (hover: hover) { .seal:hover { transform: scale(1.06); } }

.header__actions { display: flex; align-items: center; gap: .6rem; }
/* Pastille « Photos » : l'appareil à portée de pouce sur mobile ; masquée sur grand écran (le menu y mène) et pendant que le menu est ouvert */
.photo-pill {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .85em 1.1em;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background .35s var(--ease-out), color .35s var(--ease-out), transform .4s var(--ease-out);
}
@media (min-width: 900px) { .photo-pill { display: none; } }
body.is-locked .photo-pill { display: none; }

/* Volant : mène au petit jeu (conduire la voiture) */
.wheel-btn {
  display: inline-grid; place-items: center; width: 2.9em; height: 2.9em; border-radius: var(--radius-pill);
  background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: background .35s var(--ease-out), color .35s var(--ease-out), transform .5s var(--ease-out), rotate .6s var(--ease-out);
}
@media (hover: hover) { .wheel-btn:hover { rotate: 90deg; background: var(--ink); color: var(--bg); } }
body.is-locked .wheel-btn { display: none; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: .8em;
  padding: .85em 1.3em;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  transition: background .35s var(--ease-out), color .35s var(--ease-out), transform .4s var(--ease-out);
}
.menu-btn__icon { position: relative; width: 18px; height: 10px; }
.menu-btn__icon i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform .35s var(--ease-out), top .35s var(--ease-out);
}
.menu-btn__icon i:first-child { top: 0; }
.menu-btn__icon i:last-child { top: 8px; }
.menu-btn[aria-expanded="true"] { background: var(--bg); color: var(--ink); }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:first-child { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:last-child { top: 4px; transform: rotate(-45deg); }
@media (hover: hover) { .menu-btn:hover { transform: scale(1.05); } }

/* ---------- Menu plein écran ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(120px, 15vh, 160px) var(--gutter) 32px;
  background: var(--ink);
  color: var(--bg);
  clip-path: circle(0 at calc(100% - 90px) 50px);
  visibility: hidden;
  transition: clip-path .75s var(--ease-io), visibility 0s .75s;
}
.menu.is-open {
  clip-path: circle(150% at calc(100% - 90px) 50px);
  visibility: visible;
  transition: clip-path .75s var(--ease-io), visibility 0s;
}
.menu__list { counter-reset: m; display: grid; gap: .1em; }
.menu__list li { counter-increment: m; overflow: hidden; }
.menu__list a {
  display: inline-flex;
  align-items: baseline;
  gap: .6em;
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(1.9rem, min(5.4vw, 5.6vh), 4.4rem); /* la hauteur compte : 9 sections + 2 pages + pied doivent tenir sans défiler */
  line-height: 1.12;
  opacity: 0;
  transform: translateY(60%);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out), color .3s;
}
.menu__list a::before {
  content: "0" counter(m);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .12em;
  opacity: .7;
}
.menu__list a[aria-current="true"] { font-style: italic; }
.menu.is-open .menu__list a { opacity: 1; transform: none; transition-delay: calc(.25s + var(--i, 0) * 45ms); }
@media (hover: hover) { .menu__list a:hover { color: var(--display); } }
/* Entrées qui ouvrent une autre page (appareil photo, galerie) : en pastilles, distinctes des sections de la page */
.menu__pages { margin-top: clamp(18px, 4vh, 40px); display: grid; gap: .7rem; }
.menu__pages-title { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.menu__pages ul { display: flex; flex-wrap: wrap; gap: .7rem; }
.menu__page {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .85em 1.4em;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  opacity: 0;
  transform: translateY(40%);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out), background .3s;
}
.menu.is-open .menu__page { opacity: 1; transform: none; transition-delay: .65s; }
@media (hover: hover) { .menu__page:hover { background: var(--display); color: var(--ink); } }
.menu__foot { margin-top: clamp(24px, 5vh, 56px); font-size: .9rem; opacity: .8; }

/* ---------- Pastilles de section (desktop) ---------- */
.dots { display: none; }
@media (min-width: 1024px) {
  .dots {
    position: fixed;
    right: clamp(14px, 1.7vw, 28px);
    top: 50%;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 2px;
    translate: 0 -50%;
  }
  .dots button {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
  }
  .dots button::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink);
    opacity: .35;
    transition: transform .35s var(--ease-out), opacity .35s;
  }
  .dots button[aria-current="true"]::before { opacity: 1; transform: scale(1.75); }
  .dots button:hover::before { opacity: 1; }
}

/* ---------- Marqueur « version de travail » (retiré par ?clean) ---------- */
.wip {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 90;
  padding: .55em 1em;
  border-radius: var(--radius-pill);
  background: #151515;
  color: #fff;
  font-size: .78rem;
  line-height: 1.2;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
body.show-todos [data-todo] {
  outline: 2px dashed #ff2d95;
  outline-offset: 6px;
}
