/* ==========================================================================
   coquille.css — T1 : entrer, barre du haut, barre des onglets, bande
   ==========================================================================
   Ne le 2026-09-24. Spec : docs/design/SPEC-2026-09-24-t1-interventions-
   ouvertes.md, § 4, § 5 et § 7 (charte). La maquette du designer est un
   dessin : ses valeurs sont reprises ici, pas son code.

   Charte (spec, § 7) : bleu nuit #10243E, ivoire, texte secondaire #56616C
   (5,5:1), vert #0F9F70, ambre #D78A00. AUCUN ROUGE, blocage compris.
   Police : Montserrat, EMBARQUEE (polices/), aucune ressource distante.
   Cibles : 64 px sur telephone (onglets, touches, boutons), 48 px au
   minimum ailleurs. Aucune animation : les cartes grises sont fixes.

   UNE SEULE LARGEUR DE BASCULE : 1024px, la meme que
   `CONFIG.acces.largeur_portable`. tests/test_app_t1_regles.py rougit si
   elles divergent.
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../polices/montserrat-latin.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+2074,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                 U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../polices/montserrat-latin-ext.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-20C0,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --nuit-fonce: #0A1828;
  --nuit-charte: #10243E;
  --nuit-clair: #1A3556;
  --texte2: #56616C;
  --ligne: rgba(124, 135, 146, .30);
  --ombre: 0 20px 50px rgba(16, 36, 62, .08), 0 2px 8px rgba(16, 36, 62, .05);
  --degrade-nuit: linear-gradient(160deg, var(--nuit-fonce) 0%, var(--nuit-charte) 55%, var(--nuit-clair) 100%);
}

html, body { font-family: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

svg.icone {
  width: 20px; height: 20px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.forme-disque {
  display: inline-block; flex: none; width: 10px; height: 10px;
  border-radius: 50%; background: var(--vert);
}
.forme-losange {
  display: inline-block; flex: none; width: 10px; height: 10px;
  border-radius: 2px; background: var(--ambre); transform: rotate(45deg);
}

/* Le logo de Maxence, 25.09 (SPEC-2026-09-25-t1-icone-et-reserve.md, § 4.3) :
   38 px de haut dans une carte de 132 x 49, 10 px de marge de chaque cote.
   Cadre a 2 px : « arrondi du cadre plus petit », Maxence, 25.09, 23h24. */
.logo {
  flex: none; width: 132px; height: 49px; border-radius: 2px;
  background: #FFFFFF url("../img/logo-helvecad.svg") no-repeat center / auto 38px;
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

/* ================================================= entrer : 01 a 05 ===== */
hc-acces {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: var(--ivoire);
}
.verrou-panneau { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.verrou-haut {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: calc(28px + var(--haut)) 24px 22px;
  color: #FFFFFF; background: var(--degrade-nuit); text-align: center;
}
.verrou-titre { margin: 14px 0 0; font-size: 23px; letter-spacing: -.3px; }
.verrou-texte { margin: 0; font-size: 14.5px; line-height: 1.4; opacity: .86; }
.verrou-etape { margin: 0; font-size: 12px; font-weight: 650; opacity: .7; }
.grand-losange {
  width: 30px; height: 30px; border-radius: 5px; margin: 10px 0 4px;
  background: var(--ambre); transform: rotate(45deg);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9);
}
.code-points { display: flex; gap: 16px; margin: 16px 0 4px; }
.code-points i {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(243, 239, 231, .6);
}
.code-points i.plein { background: #F3EFE7; border-color: #F3EFE7; }
.code-points.faux i { border-color: var(--ambre); }
.code-alerte {
  display: flex; align-items: center; gap: 9px; margin: 6px 0 0; padding: 8px 12px;
  border-radius: 12px; background: rgba(215, 138, 0, .14);
  border: 1px solid rgba(215, 138, 0, .55); color: #FFE3AE;
  font-size: 13.5px; font-weight: 700;
}
.code-pave {
  flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 16px 16px 8px;
}
.code-touche {
  height: var(--cible); border-radius: 14px;
  border: 1px solid rgba(124, 135, 146, .35);
  background: linear-gradient(180deg, #FFFFFF, #ECE9E2);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 3px 7px rgba(16, 36, 62, .06);
  font-size: 26px; font-weight: 650; color: var(--nuit);
}
.code-touche.mot { font-size: 13px; font-weight: 700; }
.code-trou { visibility: hidden; }
.verrou-redemande, .verrou-lien, .verrou-clavier {
  flex: none; min-height: 48px; margin: 0 16px calc(18px + var(--bas));
  display: grid; place-items: center; text-align: center;
  font-size: 13px; font-weight: 650; color: var(--texte2);
}
.verrou-lien { border: 0; background: transparent; text-decoration: underline; }
.verrou-clavier { min-height: 0; margin-top: -8px; font-size: 12px; font-weight: 500; }
.verrou-bas {
  flex: none; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  padding: 16px 16px calc(30px + var(--bas));
}

/* 01 a 01e : le code d'enregistrement, a chasse fixe, trois groupes. */
.champ-code {
  box-sizing: border-box; width: 100%; height: var(--cible); margin: 12px 0 10px; padding: 0 12px;
  border: 2px solid var(--nuit); border-radius: 14px; background: #FFFFFF; color: var(--nuit);
  text-align: center; font: 700 25px/1 ui-monospace, Consolas, "Courier New", monospace; letter-spacing: 2px;
  user-select: text; -webkit-user-select: text;
}
/* Passe 6 : le champ vide montre la forme du code, dans sa police a chasse fixe. */
.champ-code::placeholder { font: 600 16px/1 ui-monospace, Consolas, "Courier New", monospace; letter-spacing: 1px; color: var(--texte2); }
.champ-code.faux { border-color: var(--ambre); background: var(--ambre-fond); }
.champ-code:disabled { opacity: .55; }
.code-alerte-claire {
  display: flex; align-items: center; gap: 9px; margin: 0 0 10px; padding: 8px 12px;
  border-radius: 12px; border: 1px solid rgba(215, 138, 0, .55); background: var(--ambre-fond);
  color: var(--ambre-texte); font-size: 13px; font-weight: 700;
}
.bouton-plein {
  width: 100%; min-height: var(--cible); border: 0; border-radius: 16px; background: var(--nuit);
  color: #FFFFFF; font-size: 16px; font-weight: 700; box-shadow: 0 12px 24px rgba(16, 36, 62, .2);
}
.bouton-plein:disabled { opacity: .4; box-shadow: none; }
#acces-autre-code { margin-top: 12px; }
.verrou-pastille {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #FFFFFF;
  font-size: 11px; font-weight: 750;
}
.verrou-pastille .forme-losange { box-shadow: 0 0 0 2px #FFFFFF; }
.verrou-alerte-suite { margin: 0; font-size: 13px; line-height: 1.4; opacity: .9; }
/* 01f : les trois gestes, et le code en grand. */
.gestes { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.45; color: #2B3B50; }
.gestes li + li { margin-top: 8px; }
.bloc-message .code-affiche {
  margin: 14px 0 6px; text-align: center; color: var(--nuit);
  font: 800 28px/1.2 ui-monospace, Consolas, "Courier New", monospace; letter-spacing: 2px;
}

/* 05 : la note, sans bouton. */
.verrou-note {
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ligne);
  background: rgba(255, 254, 251, .96); color: #2B3B50; font-size: 13px; line-height: 1.45;
}
.verrou-note p { margin: 0; }
.verrou-note p + p { margin-top: 8px; font-weight: 700; color: var(--ambre-texte); }
.verrou-note b { color: var(--nuit); }

/* ====================================================== blocs communs ==== */
.bloc-message {
  background: rgba(255, 254, 251, .96); border: 1px solid var(--ligne);
  border-radius: 20px; box-shadow: var(--ombre); padding: 22px 18px; text-align: left;
}
.bloc-message h2 { margin: 0 0 6px; font-size: 16px; }
.bloc-message p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: #2B3B50; }
.bloc-icone {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 12px;
  background: var(--brume); display: grid; place-items: center;
}
.bloc-icone svg.icone { width: 24px; height: 24px; }
.bloc-icone.attention { background: var(--ambre-fond); }
.bloc-icone.attention .forme-losange { width: 14px; height: 14px; }
.bouton-second {
  width: 100%; min-height: var(--cible); border-radius: 16px;
  border: 1px solid rgba(124, 135, 146, .4);
  background: linear-gradient(180deg, #FFFFFF, #ECE9E2); color: var(--nuit);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 3px 7px rgba(16, 36, 62, .06);
  font-size: 16px; font-weight: 700;
}

/* ================================================= l'application ======== */
.application { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.haut {
  flex: none; min-height: 66px; display: flex; align-items: center; gap: 8px;
  padding: var(--haut) 10px 0 12px; color: #FFFFFF;
  background: linear-gradient(135deg, var(--nuit-fonce) 0%, var(--nuit-charte) 55%, var(--nuit-clair) 100%);
  box-shadow: 0 10px 28px rgba(10, 24, 40, .18);
}
.espace { flex: 1; }
.pastille-reseau {
  flex: none; min-height: 48px; padding: 0 2px; border: 0;
  background: transparent; color: #FFFFFF;
}
.pastille-corps {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font-size: 11px; font-weight: 750; white-space: nowrap;
}
.pastille-forme {
  width: 10px; height: 10px; border-radius: 50%; background: var(--vert);
  box-shadow: 0 0 0 2px #FFFFFF;
}
.pastille-reseau.hors-ligne .pastille-forme, .pastille-reseau.alerte .pastille-forme {
  background: var(--ambre); border-radius: 2px; transform: rotate(45deg);
}
.pastille-corps .etat-compte:empty { display: none; }
/* 06c : une feuille qui monte du bas, par-dessus la page assombrie. */
.voile { position: fixed; inset: 0; z-index: 8; background: rgba(10, 24, 40, .48); }
.menu-compte {
  position: fixed; z-index: 9; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 10px; padding: 10px 16px calc(22px + var(--bas));
  background: #FFFEFB; border-radius: 26px 26px 0 0; box-shadow: 0 -18px 40px rgba(10, 24, 40, .25);
}
.poignee { align-self: center; width: 44px; height: 5px; margin-bottom: 6px; border-radius: 3px; background: rgba(124, 135, 146, .5); }
.menu-qui { margin: 0; padding: 2px 2px 4px; font-size: 17px; font-weight: 800; color: var(--nuit); }
.menu-qui strong { display: block; }
.menu-qui small { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--texte2); }
.ligne-soleil {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: var(--cible); padding: 8px 12px; border: 1px solid var(--ligne); border-radius: 16px;
  background: #FFFFFF; color: var(--nuit); text-align: left; font-size: 15px; font-weight: 700;
}
.ligne-soleil-texte small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--texte2); }
.etat-soleil { display: inline-flex; flex: none; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--texte2); }
.interrupteur { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; background: rgba(124, 135, 146, .45); }
.interrupteur::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
#soleil[aria-pressed="true"] .interrupteur { background: var(--nuit); }
#soleil[aria-pressed="true"] .interrupteur::after { left: 25px; }
#soleil[aria-pressed="true"] .etat-soleil { color: var(--nuit); }
.menu-fermer { min-height: 48px; border: 0; background: transparent; color: var(--texte2); font-size: 14px; font-weight: 700; }
.compte-rond {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1);
  color: #FFFFFF; font-size: 14px; font-weight: 750;
}

/* La bande de la copie : toujours visible, jamais dans ce qui defile. */
.bande {
  flex: none; display: flex; gap: 9px; align-items: flex-start; padding: 9px 14px;
  background: #FFFEFB; border-bottom: 1px solid var(--ligne);
  font-size: 13px; font-weight: 650; color: var(--nuit);
}
.bande .forme-disque, .bande .forme-losange { margin-top: 4px; }
.bande small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; }
.bande.bande-attention {
  background: var(--ambre-fond); color: var(--ambre-texte);
  border-bottom-color: rgba(215, 138, 0, .45);
}
.bande.bande-neutre { color: var(--texte2); }

/* La barre des quatre onglets, EN BAS sur telephone : au pouce. */
.barre-onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px;
  padding: 8px 8px calc(14px + var(--bas));
  background: linear-gradient(180deg, #FAF8F3, #E4E0D8);
  border-top: 1px solid rgba(124, 135, 146, .38); border-bottom: 0;
  box-shadow: 0 -16px 38px rgba(16, 36, 62, .14), inset 0 1px 0 #FFFFFF;
}
.barre-onglets .onglet {
  min-height: var(--cible); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; padding: 6px 2px;
  border-radius: 14px; border: 1px solid rgba(124, 135, 146, .34);
  background: linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(225, 222, 214, .72));
  color: #56616C; font-size: 10.5px; font-weight: 720; line-height: 1.1; text-align: center;
}
.barre-onglets .onglet[aria-selected="true"] {
  color: var(--nuit); border-color: rgba(16, 36, 62, .3);
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F7F3 62%, #EDEBE5 100%);
  box-shadow: 0 9px 18px rgba(16, 36, 62, .13), 0 2px 5px rgba(16, 36, 62, .08), inset 0 1px 0 #FFFFFF;
  transform: translateY(-2px);
}
.barre-onglets .onglet.onglet-vide { background: transparent; border-style: dashed; color: #7C8792; }
.barre-onglets .onglet.onglet-vide[aria-selected="true"] {
  background: linear-gradient(180deg, #FFFFFF, #F3F1EC); color: var(--nuit); border-style: dashed;
}

.application .vue { flex: 1; min-height: 0; }
.application .ecran { padding: 14px 12px calc(112px + var(--bas)); }
.colonne { width: 100%; }

/* Un bouton d'action dans la moitie basse, au-dessus des onglets. */
.pied-action { position: fixed; left: 12px; right: 12px; bottom: calc(100px + var(--bas)); z-index: 4; }
.onglet-vide-message { margin-top: 36px; }

/* ================================== ordinateur portable, 1366 et 1440 ==== */
@media (min-width: 1024px) {
  hc-acces { display: grid; place-items: center; background: var(--degrade-nuit); }
  .verrou-panneau {
    flex: none; width: 440px; overflow: hidden; border-radius: 24px;
    background: var(--ivoire); box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
  }
  .verrou-haut { flex: none; padding: 26px 24px 20px; }
  .verrou-haut .verrou-titre { margin-top: 10px; font-size: 22px; }
  .code-pave { padding: 16px 22px 4px; }
  .code-touche { height: 52px; font-size: 22px; }
  .code-touche.mot { font-size: 13px; }
  .verrou-redemande, .verrou-lien { margin: 4px 16px 12px; }
  .verrou-clavier { margin: 0 16px 14px; }
  .verrou-bas { padding: 18px 22px 22px; }

  .haut { min-height: 78px; padding: 0 28px; gap: 12px; }
  .haut .logo { width: 174px; height: 64px; border-radius: 2px; background-size: auto 50px; }
  .pastille-corps { padding: 8px 12px; font-size: 12px; }
  .voile { background: rgba(10, 24, 40, .18); }
  .menu-compte {
    left: auto; right: 28px; bottom: auto; top: 84px; width: 340px; padding: 14px 16px 10px;
    border-radius: 18px; box-shadow: 0 24px 50px rgba(10, 24, 40, .28);
  }
  .menu-compte .poignee { display: none; }
  .menu-compte .bouton-plein, .menu-compte .ligne-soleil { min-height: 52px; }
  .barre-onglets {
    position: static; grid-auto-columns: minmax(0, 230px);
    justify-content: center; gap: 12px; padding: 10px 28px 12px;
    background: linear-gradient(180deg, #FCFBF8 0%, #E8E4DC 100%);
    border-top: 0; border-bottom: 1px solid rgba(124, 135, 146, .38);
    box-shadow: inset 0 1px 0 #FFFFFF, 0 10px 24px rgba(16, 36, 62, .08);
  }
  .barre-onglets .onglet { min-height: 52px; flex-direction: row; gap: 10px; padding: 0 14px; font-size: 14px; }
  .bande { padding: 10px 28px; font-size: 13.5px; }
  .application .ecran { padding: 22px 28px 28px; }
  .colonne { max-width: 1320px; margin: 0 auto; }
  .bloc-message { max-width: 620px; }
  .onglet-vide-message { margin-top: 20px; }
  .pied-action { position: static; margin-top: 16px; max-width: 620px; }
}
