/* Écran de connexion (D9), style « cadran en volume » validé par l'admin le 2026-11-29.
   Porté de docs/design/maquettes/connexion.html : mêmes valeurs, sans rien en ligne (CSP stricte). */
/* « :root[data-style] » : la feuille des graphes (chargée avant, pour la vitrine) ne reprend pas la page. */
:root, :root[data-style] {
  color-scheme: light;
  --fond-a: #FFFFFF; --fond-b: #ECEAE5; --fond-c: #D6D2CA;
  --carte: rgba(255,255,255,.6); --filet: rgba(18,24,32,.14);
  --texte: #121820; --texte2: #47515E; --discret: #5F6975;
  --titre-a: #121820; --titre-b: #4A5563;
  --bouton-a: #2C3746; --bouton-b: #0B1118; --bouton-texte: #FFFFFF; --bouton-reflet: rgba(255,255,255,.18);
  --ombre: rgba(40,34,24,.38);
  --erreur: #A3303A;
  --cuivre: #C8743C; --cadran-texte: #E9EDF2; --cadran-texte2: #A9B4C2;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --d: min(340px, 76vw);
}
@media (prefers-color-scheme: dark) {
  :root, :root[data-style] {
    --fond-a: #1B2A3C; --fond-b: #0A1017; --fond-c: #05080C;
    --carte: rgba(255,255,255,.05); --filet: rgba(255,255,255,.14);
    --texte: #E9EDF2; --texte2: #A9B4C2; --discret: #8391A3;
    --titre-a: #FFFFFF; --titre-b: #9DA9B8;
    --bouton-a: #FFFFFF; --bouton-b: #B9C2CE; --bouton-texte: #0B1118; --bouton-reflet: rgba(255,255,255,.9);
    --ombre: rgba(0,0,0,.85);
    --erreur: #EE9499; color-scheme: dark;
  }
}

html, body { min-height: 100%; margin: 0; }
body {
  background: var(--fond-b) radial-gradient(circle at 72% 46%, var(--fond-a) 0%, var(--fond-b) 46%, var(--fond-c) 100%) fixed;
  color: var(--texte); font: 400 15px/1.55 var(--sans);
  display: grid; grid-template-rows: auto 1fr auto; min-height: 100dvh; overflow-x: hidden;
}
.bande { width: 100%; max-width: 1240px; margin-inline: auto; box-sizing: border-box; padding-inline: 24px; }
.surtitre { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--discret); margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--texte); outline-offset: 3px; }

.entete .bande { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-block: 24px; }

.scene { display: flex; align-items: center; }
.scene .bande {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 72px; row-gap: 24px;
  grid-template-areas: "titre cadran" "suite cadran"; align-items: center; padding-block: 40px 56px;
}
h1 {
  grid-area: titre; align-self: end; max-width: 680px; margin: 0;
  font: 400 clamp(56px, 8.6vw, 96px)/1 var(--serif); letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere;
  background: linear-gradient(180deg, var(--titre-a) 12%, var(--titre-b) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .1em;
}
.colonne { grid-area: suite; align-self: start; display: flex; flex-direction: column; gap: 20px; min-width: 0; max-width: 620px; }
.chapo { font-size: 20px; line-height: 1.4; color: var(--texte2); margin: 0; max-width: 28em; }
.chapo strong { font-weight: 500; color: var(--texte); overflow-wrap: anywhere; }
.aide { color: var(--texte2); margin: 0; max-width: 34em; }
form { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.champ { display: flex; flex-direction: column; gap: 8px; max-width: 440px; }
.champ input {
  min-height: 56px; box-sizing: border-box; width: 100%; padding: 0 20px; font-size: 20px;
  background: var(--carte); border: 1px solid var(--filet); border-radius: 14px;
  box-shadow: inset 0 3px 8px rgba(0,0,0,.14); transition: border-color .2s, box-shadow .2s;
}
.champ input::placeholder { color: var(--discret); }
.champ input:focus-visible { outline: 0; border-color: var(--cuivre); box-shadow: inset 0 3px 8px rgba(0,0,0,.14), 0 0 0 4px rgba(200,116,60,.28); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.actions form { flex-direction: row; }
.principal {
  min-height: 52px; padding: 0 30px; cursor: pointer; font-weight: 600; border: 0; border-radius: 14px;
  color: var(--bouton-texte); background: linear-gradient(180deg, var(--bouton-a), var(--bouton-b));
  box-shadow: 0 14px 26px -10px var(--ombre), inset 0 1px 0 var(--bouton-reflet);
  transition: transform .18s ease-out, box-shadow .18s ease-out;
}
.principal:hover { transform: translateY(-2px); box-shadow: 0 20px 30px -12px var(--ombre), inset 0 1px 0 var(--bouton-reflet); }
.principal:active { transform: translateY(1px) scale(.99); }
.lien {
  min-height: 44px; padding: 0; cursor: pointer; background: none; border: 0; color: var(--texte2);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--discret);
  display: inline-flex; align-items: center;
}
.lien:hover { color: var(--texte); }
.message { margin: 0; min-height: 1.55em; color: var(--texte2); max-width: 34em; }
.message.erreur { color: var(--erreur); }
.message b { font-weight: 600; font-variant-numeric: tabular-nums; }
.js .sans-js { display: none; }

/* Cadran de face : l'inclinaison 3D le déformait (375 x 390 px mesurés, couches décentrées de 13 px, 2026-12-01). */
.cadran {
  grid-area: cadran; position: relative; width: var(--d); height: var(--d); margin: calc(var(--d) * .06);
}
.cadran > * { position: absolute; inset: 0; border-radius: 50%; }
.lunette {
  inset: -5%;
  background: conic-gradient(from 210deg, #F4F6F9, #7C8794 12%, #E4E8EE 24%, #4E5865 38%, #D5DAE1 52%, #6B7582 66%, #F4F6F9 80%, #8892A0 92%, #F4F6F9);
  box-shadow: 0 50px 70px -18px var(--ombre), 0 18px 28px rgba(0,0,0,.3), inset 0 2px 2px rgba(255,255,255,.7), inset 0 -3px 5px rgba(0,0,0,.45);
}
.face { inset: 1.5%; background: radial-gradient(circle at 38% 30%, #223246, #0C1219 72%); box-shadow: inset 0 10px 26px rgba(0,0,0,.8), inset 0 -2px 6px rgba(255,255,255,.06); }
.cadran svg { width: 100%; height: 100%; overflow: visible; border-radius: 0; }
.piste { fill: none; stroke: rgba(0,0,0,.45); stroke-width: 10; }
.reste { fill: none; stroke: var(--cuivre); stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(200,116,60,.7)) drop-shadow(0 4px 4px rgba(0,0,0,.6)); }
.grad { stroke: #6F7C8C; stroke-width: 1; }
.grad.fort { stroke: #C9D1DB; stroke-width: 2; }
.aiguille { stroke: #fff; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 4px 3px rgba(0,0,0,.7)); }
.coeur { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 0; color: var(--cadran-texte); }
.mode-code { display: flex; flex-direction: column; align-items: center; gap: calc(var(--d) * .035); padding-top: calc(var(--d) * .06); }
.mode-heure { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.heure { font: 400 calc(var(--d) * .2)/1 var(--serif); font-variant-numeric: tabular-nums; }
.coeur .surtitre { color: var(--cadran-texte2); }
.cases { display: flex; gap: calc(var(--d) * .025); }
.cases input {
  width: calc(var(--d) * .165); height: calc(var(--d) * .22); box-sizing: border-box; padding: 0; text-align: center;
  font: 400 calc(var(--d) * .14)/1 var(--serif); color: var(--cadran-texte);
  background: linear-gradient(180deg, #05080C, #121B26); border: 1px solid rgba(255,255,255,.14); border-radius: 10px;
  box-shadow: inset 0 4px 8px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.12); transition: border-color .2s, box-shadow .2s;
}
.cases input:focus-visible { outline: 0; border-color: var(--cuivre); box-shadow: inset 0 4px 8px rgba(0,0,0,.8), 0 0 18px rgba(200,116,60,.5); }
.cases.erreur input { border-color: #EE9499; }
.cases.secoue { animation: secoue .4s; }
.cases input:disabled { color: #6F7C8C; opacity: .6; }
.decompte { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.temps { font-size: calc(var(--d) * .062); font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; }
.reflet { inset: 1.5%; pointer-events: none; background: linear-gradient(125deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.05) 28%, transparent 46%); }

.pied .bande { padding-block: 24px; color: var(--discret); font-size: 13px; }
.pied .bande + .bande { padding-block: 0 20px; }
.liens-publics { display: flex; flex-wrap: wrap; gap: 0 24px; }
.liens-publics a { display: inline-flex; align-items: center; min-height: 44px; color: var(--texte2); text-underline-offset: 4px; }

@keyframes secoue { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
@keyframes monte { from { opacity: 0; transform: translateY(18px); } }

@media (max-width: 820px) {
  .scene { align-items: start; }
  .scene .bande { grid-template-columns: minmax(0, 1fr); grid-template-areas: "titre" "cadran" "suite"; padding-block: 16px 48px; }
  .cadran { justify-self: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .scene h1, .scene .colonne > * { animation: monte .6s cubic-bezier(.2,.7,.2,1) both; }
  .scene .colonne > :nth-child(1) { animation-delay: .06s; } .scene .colonne > :nth-child(2) { animation-delay: .12s; }
  .scene .colonne > :nth-child(3) { animation-delay: .18s; } .scene .colonne > :nth-child(4) { animation-delay: .24s; }
  .scene .colonne > :nth-child(5) { animation-delay: .3s; }
  .reste, .aiguille { transition: stroke-dashoffset .9s linear, stroke-dasharray .9s linear, transform .9s linear; }
}
@media (prefers-reduced-motion: reduce) {
  /* Hors de la vitrine : elle suit la règle des graphes, « raccourci, pas supprimé » (vitrine.css, charts.css). */
  *:not(.vitrine, .vitrine *), *:not(.vitrine, .vitrine *)::before, *:not(.vitrine, .vitrine *)::after {
    animation: none !important; transition: none !important;
  }
}
[hidden] { display: none !important; }
