/* Pages d'accès (connexion, changement de code, refus) — s'appuie sur les variables de theme.css */
.ecran-acces { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
[data-style="lanceur"] .ecran-acces { background-image: radial-gradient(circle at 15% -10%, var(--halo1), transparent 45%), radial-gradient(circle at 100% 110%, var(--halo2), transparent 45%); background-attachment: fixed; }
[data-style="console"] .ecran-acces { background-image: linear-gradient(var(--trait) 1px, transparent 1px), linear-gradient(90deg, var(--trait) 1px, transparent 1px); background-size: 48px 48px; }
[data-style="affiche"] .ecran-acces { background: linear-gradient(var(--bandeau) 0 0) top / 100% 46vh no-repeat, var(--fond); }

.carte-acces { width: min(420px, 100%); padding: 36px 32px 28px; text-align: center; color: var(--texte);
  background: var(--surface2); border: 1px solid var(--trait); border-radius: 22px; box-shadow: 0 30px 70px -34px var(--ombre); }
[data-style="lanceur"] .carte-acces { background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
[data-style="atelier"] .carte-acces { border-radius: 4px; border-top: 3px solid var(--accent); text-align: left; }
[data-style="console"] .carte-acces { border-radius: 10px; }
[data-style="affiche"] .carte-acces { border-radius: 4px; border-bottom: 6px solid var(--accent); }

.carte-acces .renard { width: 72px; margin: 0 auto; }
[data-style="atelier"] .carte-acces .renard { margin: 0; width: 44px; }
.carte-acces .marque { margin-top: 10px; font: 700 14px/1 Quicksand, sans-serif; letter-spacing: .22em; color: var(--doux); }
.carte-acces h1 { margin: 22px 0 6px; font: 600 30px/1.15 Dosis, sans-serif; }
[data-style="atelier"] .carte-acces h1 { font: 400 34px/1.1 Fraunces, Georgia, serif; letter-spacing: -.01em; }
[data-style="console"] .carte-acces h1 { font: 600 24px/1.2 "JetBrains Mono", ui-monospace, monospace; }
.carte-acces .intro { color: var(--doux); font-size: 15px; margin-bottom: 22px; }

.formulaire { display: grid; gap: 14px; text-align: left; }
.champ { display: grid; gap: 6px; }
.champ > span:first-child { font: 700 12px/1 Quicksand, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--doux); }
.champ input { width: 100%; padding: 13px 16px; font: 500 17px Quicksand, system-ui, sans-serif; color: var(--texte);
  background: var(--fond); border: 1px solid var(--trait); border-radius: 12px; }
[data-style="console"] .champ input { font-family: "JetBrains Mono", ui-monospace, monospace; border-radius: 8px; }
[data-style="atelier"] .champ input, [data-style="affiche"] .champ input { border-radius: 4px; }
.champ input:focus { outline: none; border-color: var(--accent2); box-shadow: 0 0 0 4px var(--halo1); }
.avec-oeil { position: relative; display: block; }
.avec-oeil input { padding-right: 52px; }
.voir { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--doux); cursor: pointer; }
.voir svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.voir[aria-pressed="true"] { color: var(--accent2); }
.voir:focus-visible { outline: 2px solid var(--accent2); }

.bouton { display: inline-block; width: 100%; margin-top: 6px; padding: 14px 18px; cursor: pointer; text-align: center; text-decoration: none;
  font: 700 17px/1 Quicksand, sans-serif; color: #fff; border: 0; border-radius: 999px;
  background: linear-gradient(145deg, var(--accent2), var(--accent)); box-shadow: 0 14px 28px -16px var(--ombre); }
[data-style="atelier"] .bouton, [data-style="affiche"] .bouton { border-radius: 4px; background: var(--accent); }
[data-style="console"] .bouton { border-radius: 8px; background: var(--accent); font-family: "JetBrains Mono", ui-monospace, monospace; }
.bouton:hover { filter: brightness(1.06); }
.bouton:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; }
.bouton:disabled { opacity: .7; cursor: progress; }

.alerte, .info { padding: 11px 14px; margin-bottom: 16px; border-radius: 12px; font-weight: 600; font-size: 15px; text-align: left; }
.alerte { color: var(--ko); background: color-mix(in srgb, var(--ko) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ko) 35%, transparent); }
.info { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.regles { color: var(--doux); font-size: 13px; }
.bas { margin-top: 20px; color: var(--doux); font-size: 13px; }
.bas a { color: var(--accent2); font-weight: 700; text-decoration: none; }

/* ── Second facteur et page Sécurité */
.carte-acces.carte-large { width: min(640px, 100%); text-align: left; }
.carte-large .renard { margin: 0; width: 48px; }
.carte-large .marque { text-align: left; }
.bouton .ico { width: 22px; height: 22px; margin: -4px 8px -6px 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.bouton.secondaire { color: var(--accent2); background: transparent; border: 1px solid var(--accent2); box-shadow: none; }
.bouton.danger { background: var(--ko); }
.lien { padding: 6px 8px; border: 0; background: transparent; cursor: pointer; font: 700 14px/1 Quicksand, sans-serif; color: var(--accent2); }
.lien:hover, .lien:focus-visible { outline: none; text-decoration: underline; }
.separateur { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--doux); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--trait); }
.code-otp { font: 600 24px/1.2 "JetBrains Mono", ui-monospace, monospace !important; letter-spacing: .2em; text-align: center; }
.bloc { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--trait); }
.bloc h2, .codes h2 { margin-bottom: 8px; font: 600 21px/1.2 Dosis, sans-serif; }
[data-style="atelier"] .bloc h2, [data-style="atelier"] .codes h2 { font: 500 23px/1.2 Fraunces, Georgia, serif; }
.bloc .formulaire { margin-top: 12px; }
.etat-ok { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ok); }
.etat-ok::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.etapes { display: grid; gap: 18px; padding-left: 22px; margin: 12px 0 0; }
.etapes li { padding-left: 4px; }
.qr { width: min(230px, 100%); margin: 12px 0; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--trait); }
.qr svg { display: block; width: 100%; height: auto; }
.cle-manuelle code, .liste-codes code { font: 600 16px/1.4 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .06em; user-select: all; }
.cle-manuelle { padding: 10px 14px; border-radius: 10px; background: var(--fond); border: 1px dashed var(--trait); overflow-wrap: anywhere; }
.appareils { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.appareils li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 8px; padding: 12px 14px; border: 1px solid var(--trait); border-radius: 12px; background: var(--fond); }
.appareils small { display: block; color: var(--doux); font-size: 13px; }
.ajout-cle { display: grid; gap: 10px; margin-top: 12px; }
.ajout-cle[hidden] { display: none; }
.retirer { margin-top: 10px; }
.retirer summary { cursor: pointer; color: var(--doux); font-weight: 700; font-size: 14px; }
.appareils .retirer { margin-top: 0; }
.appareils .retirer[open] { flex-basis: 100%; }
.codes { margin-top: 18px; padding: 18px; border-radius: 14px; border: 2px dashed var(--accent2); background: color-mix(in srgb, var(--accent2) 6%, transparent); }
.codes[hidden], .bloc[hidden] { display: none; }
.liste-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 24px; margin: 12px 0; padding-left: 26px; }
.liens-bas { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.bas .lien { font-size: 13px; }
@media (max-width: 520px) { .liste-codes { grid-template-columns: 1fr; } }
@media print { .ecran-acces { background: #fff !important; } .bloc, .bas, .renard, .intro, .info, #btn-copier-codes { display: none !important; } .codes { border: 1px solid #000; } }
/* Style Affiche : le renard est blanc (bandeau) ; sur la carte blanche il prend la couleur d'accent */
[data-style="affiche"] .carte-acces .renard { background: var(--accent); }
