/* La page de la clé, charte v3 « Escalier » (00-Systeme/Referentiels/charte-ui.md ; maquette validée le 18/11,
   écrans 5 et 6) : fond papier, noir, un seul jaune (le mot clé du titre), polices PP servies d'ici, angles à 2 px,
   aucune ombre, espacements multiples de 8, un bloc centré ; mouvement discret par paliers (§5.4). */
@font-face { font-family: "Mondwest"; src: url("PPMondwest-Regular.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "NeueBit"; src: url("PPNeueBit-Bold.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Montreal"; src: url("PPNeueMontreal-Regular.woff2") format("woff2"); font-weight: 400;
             font-display: block; }
@font-face { font-family: "Montreal"; src: url("PPNeueMontreal-Semibold.woff2") format("woff2"); font-weight: 600;
             font-display: block; }

:root { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; background: #E4E4E4; color: #000000; }
body { font: 400 16px/1.4 "Montreal", system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
.ecran { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 16px 16px 24px;
         display: flex; flex-direction: column; }
.tete { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.tete-gauche { display: flex; align-items: center; gap: 16px; }
.marque, .lieu, .label, .etat { font-family: "NeueBit", ui-monospace, monospace; letter-spacing: .04em;
                                text-transform: uppercase; }
.marque { font-size: 22px; }
.lieu { font-size: 18px; color: #555555; }
.centre { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding-bottom: 48px; }
.escalier { margin: 0; font: 400 44px/1.18 "Mondwest", serif; }
.escalier > span { background: #000000; color: #FFFFFF; box-decoration-break: clone; -webkit-box-decoration-break: clone;
                   padding: .1em .22em .14em; }
.escalier u { color: #CFFE04; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.carte { border: 1px solid #000000; border-radius: 2px; display: flex; flex-direction: column; }
.carte-tete { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px;
              border-bottom: 1px solid #000000; }
.label { font-size: 16px; color: #555555; }
.numero { font: 24px/1 "NeueBit", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.carte-code { padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.code { font: 64px/.9 "NeueBit", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.etapes { list-style: none; margin: 0; padding: 0; }
.etapes li { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 16px;
             border-bottom: 1px solid #B4B4B4; }
.etapes li > span:first-child { display: flex; align-items: center; gap: 16px; }
.etat { font-size: 18px; }
.bande { margin: 0; padding: 8px 16px; background: #F4F4F4; text-align: center; font-size: 15px; white-space: pre-line; }
.message { margin: 0; min-height: 0; text-align: center; font-size: 15px; white-space: pre-line; }
.message:empty { display: none; }
.principal { width: 100%; height: 48px; padding: 0 16px; border: 1px solid #000000; border-radius: 2px;
             background: #000000; color: #FFFFFF; font: 20px/1 "NeueBit", ui-monospace, monospace; letter-spacing: .04em;
             text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 16px;
             text-decoration: none; cursor: pointer; }
.principal .fl { display: inline-block; }
.principal:active { background: #FFFFFF; color: #000000; }
@media (hover: hover) {                     /* au doigt, un survol reste collé après le toucher (recette du 18/11) */
  .principal:hover { background: #FFFFFF; color: #000000; }
  .principal:hover .fl { transform: translateX(6px); }
}
.principal:disabled { background: #F4F4F4; color: #555555; border-color: #B4B4B4; cursor: default; }
.principal:focus-visible { outline: 2px solid #000000; outline-offset: 2px; }
[hidden] { display: none !important; }

@keyframes monte { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes revele { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.escalier { animation: revele 1.4s steps(20) both; }
.carte { animation: monte .9s cubic-bezier(.16, .8, .24, 1) .12s both; }
.centre > .principal { animation: monte .9s cubic-bezier(.16, .8, .24, 1) .24s both; }
@media (prefers-reduced-motion: reduce) { .escalier, .carte, .centre > .principal { animation: none; } }

/* Le cockpit (lot D3, écran 1 de la maquette) : le brief en rubriques, le code en pied de carte. */
.brief { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.brief:empty { display: none; }
.carte.seule .carte-tete { border-bottom: 0; }
.brief .label { margin-top: 12px; }
.brief .label:first-child { margin-top: 0; }
.brief p { margin: 0; font-size: 16px; line-height: 1.4; }
.carte-pied { border-bottom: 0; border-top: 1px solid #000000; }

/* Le cockpit du menu (lot D2, écrans 2 à 4 de la maquette) : le chrono, les étapes, les deux cellules du compte rendu,
   l'historique, la capsule (charte §4 : flottante, noire à 86 %, une pastille qui glisse). */
.chrono { display: flex; align-items: baseline; gap: 16px; }
.chrono-valeur { font: 96px/.9 "NeueBit", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.etapes { border-top: 2px solid #000000; }
.etapes .fait-carre, .etapes .encours-carre, .etapes .avenir-carre { width: 12px; height: 12px; display: inline-block;
                                                                     box-sizing: border-box; }
.fait-carre { background: #000000; }
.encours-carre { background: #000000; animation: clignote 1.2s steps(1) infinite; }
.avenir-carre { border: 1px solid #555555; }
.etapes li.avenir { color: #555555; }
.etapes li.encours { font-weight: 600; }
@keyframes clignote { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .15; } }
.cellules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cellule { border: 1px solid #000000; border-radius: 2px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.cellule .label { margin: 0; }
.cellule-valeur { margin: 0; font: 32px/1 "NeueBit", ui-monospace, monospace; text-transform: uppercase; }
.historique { flex: 1; display: flex; flex-direction: column; gap: 24px; padding: 24px 0 120px; }
.titre-simple { margin: 0; font: 400 40px/1.1 "Mondwest", serif; }
.travaux { list-style: none; margin: 0; padding: 0; border-top: 2px solid #000000; }
.travaux li { border-bottom: 1px solid #B4B4B4; }
.travaux button { width: 100%; background: none; border: 0; padding: 16px 8px; display: flex; flex-direction: column;
                  gap: 8px; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.travaux .meta { display: flex; justify-content: space-between; font: 16px/1 "NeueBit", ui-monospace, monospace;
                 letter-spacing: .04em; text-transform: uppercase; color: #555555; }
.travaux .meta span:last-child { color: #000000; }
.travaux .ligne-titre { display: flex; justify-content: space-between; gap: 16px; font-size: 17px; line-height: 1.35; }
.travaux .fl { font: 24px/1 "NeueBit", ui-monospace, monospace; flex: none; }
.travaux .detail { font-size: 14px; color: #555555; }
.capsule { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; height: 52px;
           padding: 0 6px; align-items: center; background: rgba(0, 0, 0, .86); border: 1px solid rgba(255, 255, 255, .16);
           border-radius: 26px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.capsule button { width: 64px; height: 40px; border: 0; border-radius: 20px; background: transparent;
                  color: rgba(255, 255, 255, .6); display: flex; align-items: center; justify-content: center;
                  cursor: pointer; transition: background-color .5s; }
.capsule button[aria-current="page"] { background: rgba(255, 255, 255, .2); color: #FFFFFF; }
@media (prefers-reduced-motion: reduce) { .encours-carre { animation: none; } .capsule button { transition: none; } }
