/* LA PORTE DE GIA, COMME CELLE DU KIOSQUE (v1.6.4 ; Vhiny par hodologic-27, arbitré par c0, 26/10).
   Lue par v2.html (la porte, js/v2-compte.js) et par reset_password.html (« Nouveau mot de
   passe », le même bandeau). Elle ne lit que les jetons --gia-* de css/marque.css : la page du mot
   de passe ne charge pas css/v2.css.

   LES VALEURS SONT CELLES DU KIOSQUE, frontend/src/styles/auth.css (K) : la carte (l.65-75, et
   .auth-modal-entry l.271), la croix (l.273), le bandeau (l.275-279), les onglets (l.280-282),
   ce que le compte ouvre (l.263-266), les champs et l'envoi (l.285-286), Google et « ou »
   (l.293-298), la mention (l.287). Le voile et sa marge de 20 px sont dans css/v2.css
   (.porte-hote, K l.53-62).

   AU TÉLÉPHONE, PAS DE PLEIN ÉCRAN (c0, d'après kiosque_login_m.png) : la même carte, presque
   pleine page dans la marge de 20 px du voile, 400 px au plus, 92dvh au plus et défilement
   interne. test_porte_kiosque.py la mesure à 320, 390 et 1440. */

.porte {
    position: relative; box-sizing: border-box;
    width: 100%; min-width: 0; max-width: 400px;                       /* K l.70 */
    max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;  /* K l.271 */
    padding: 0 0 24px;
    background: var(--gia-papier); color: var(--gia-encre);
    border-radius: 12px; border-top: 4px solid var(--gia-bordeaux);     /* K l.67, 271 */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);                        /* K l.74 */
}
.porte[hidden] { display: none; }

/* LA CROIX, RONDE, 36 PX (K l.273). COLLÉE AU HAUT DE LA CARTE quand celle-ci défile : posée en
   absolu, elle partait avec le bandeau dès qu'on descendait vers « Se connecter » (320 px). Dans
   le flux, à droite, puis rendue à sa place par une marge négative, au-dessus du bandeau. */
.porte-fermer {
    position: sticky; top: 10px; z-index: 2;
    margin: 10px 10px -46px auto;
    display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
    border: 0; border-radius: 50%; background: none; color: var(--gia-secondaire); cursor: pointer;
}
.porte-fermer:hover { background: var(--gia-bordeaux-voile); color: var(--gia-bordeaux); }
.porte-fermer:focus-visible { outline: 2px solid var(--gia-bordeaux); outline-offset: 2px; }

/* LE BANDEAU DE LA MARQUE (K l.275-279) : le logo de 56 px, « GIA » en titre souligné de
   bordeaux, l'accroche ; ou, quand une page a envoyé ici, la raison à sa place. */
.porte-marque {
    display: grid; justify-items: center; text-align: center;
    padding: 28px 24px 22px; margin-bottom: 18px;
    background: var(--gia-heros); border-bottom: 1px solid var(--gia-filet);
}
.porte-marque img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 6px 18px rgba(15, 42, 58, 0.16); }
.porte-nom { margin-top: 12px; font: 600 1.6rem/1.1 var(--gia-titre); color: var(--gia-encre); }
.porte-filet { display: block; width: 96px; height: 2px; margin-top: 8px; background: var(--gia-bordeaux); }
.porte-accroche { margin: 10px 0 0; font: 400 0.98rem/1.4 var(--gia-texte); color: var(--gia-encre-douce); text-wrap: balance; }
.porte-accroche.raison { color: var(--gia-encre); font-weight: 500; }

.porte-corps { display: flex; flex-direction: column; gap: 12px; padding: 0 24px; }
.porte-corps [hidden] { display: none !important; }

/* LES DEUX ONGLETS (K l.280-282). */
.porte-onglets {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
    border-radius: 10px; background: var(--gia-brume);
}
.porte-onglet {
    min-height: 40px; border: 0; border-radius: var(--gia-coin-imbrique); background: none; cursor: pointer;
    font: 500 0.88rem/1 var(--gia-texte); color: var(--gia-secondaire);
    padding: 0 8px; white-space: nowrap;
}
/* « Créer un compte » sur une ligne à 320 (c0, 26/10). */
@media (max-width: 359.98px) { .porte-onglet { font-size: 0.82rem; padding: 0 4px; } }
.porte-onglet.actif {
    background: var(--gia-papier); color: var(--gia-encre); font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 42, 58, 0.12);
}
.porte-onglet:focus-visible, .porte-oubli:focus-visible, .porte-retour:focus-visible {
    outline: 2px solid var(--gia-bordeaux); outline-offset: 2px;
}

/* Le titre de l'onglet se lit aux lecteurs d'écran ; celui de l'oubli est le titre de l'étape. */
.porte-titre-lu, .porte-libelle {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.porte-titre-etape { margin: 4px 0 0; font: 600 1.15rem/1.3 var(--gia-texte); color: var(--gia-encre); }
.porte-etape { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--gia-encre-douce); }

/* CE QUE LE COMPTE OUVRE (K l.263-266), deux lignes. */
.porte-apports {
    list-style: none; display: grid; gap: 10px; margin: 0; padding: 14px;
    border-radius: 10px; background: var(--gia-teinte);
}
.porte-apports li { font-size: 0.86rem; line-height: 1.45; color: var(--gia-encre-douce); }
.porte-apports b { color: var(--gia-encre); font-weight: 600; }

/* GOOGLE, EN PREMIER, PLEINE LARGEUR (K l.293-295) : sa marque sur un bouton blanc. */
.porte-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; width: 100%; cursor: pointer;
    border: 1px solid var(--gia-filet-fort); border-radius: var(--gia-coin-bouton);
    background: #FFFFFF; color: var(--gia-encre); font: 600 0.95rem/1 var(--gia-texte);
}
.porte-google:hover { background: var(--gia-brume); }
.porte-google:focus-visible { outline: 2px solid var(--gia-bordeaux); outline-offset: 2px; }
.porte-google:disabled { opacity: .6; cursor: default; }
.porte-ou { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 0.8rem; color: var(--gia-secondaire); }
.porte-ou::before, .porte-ou::after { content: ''; flex: 1; height: 1px; background: var(--gia-filet); }

/* LES CHAMPS ET L'ENVOI (K l.285-286). 16 px : en dessous, iOS agrandit la page. */
.porte-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.porte-champ { display: block; margin: 0; }
.porte-champ input {
    display: block; box-sizing: border-box; width: 100%; min-height: 48px; padding: 11px 14px;
    font: 400 16px/1.2 var(--gia-texte); color: var(--gia-encre); background: var(--gia-brume);
    border: 1px solid var(--gia-filet); border-radius: var(--gia-coin-champ);
}
.porte-champ input::placeholder { color: var(--gia-secondaire); opacity: 1; }
/* UN SEUL FILET AU FOCUS (c0, 26/10) : le double anneau bordeaux se lisait comme une erreur.
   55 % et non 40 : à 40 % le filet fait 2,2:1 sur la brume, sous le 3:1 de WCAG 1.4.11. */
/* La carte reçoit le focus au doigt (js/v2-compte.js, viser) : sans anneau, elle n'est pas un contrôle. */
.porte:focus { outline: none; }
.porte-champ input:focus {
    outline: 2px solid color-mix(in srgb, var(--gia-bordeaux) 55%, transparent); outline-offset: -1px;
    border-color: transparent;
}
.porte-envoi {
    min-height: 50px; margin-top: 2px; width: 100%; cursor: pointer;
    font: 600 0.98rem/1 var(--gia-texte); color: var(--gia-sur-bordeaux);
    background: var(--gia-bordeaux); border: 1px solid var(--gia-bordeaux); border-radius: var(--gia-coin-bouton);
}
.porte-envoi:hover:not(:disabled) { background: var(--gia-bordeaux-survol); border-color: var(--gia-bordeaux-survol); }
.porte-envoi:disabled { opacity: .55; cursor: default; }
.porte-envoi:focus-visible { outline: 2px solid var(--gia-encre); outline-offset: 2px; }

/* « MOT DE PASSE OUBLIÉ ? » SOUS LE CHAMP, en lien, et « Retour à la connexion » (K .auth-switch). */
.porte-oubli, .porte-retour {
    align-self: center; min-height: 32px; padding: 4px 8px; border: 0; background: none; cursor: pointer;
    font: 500 0.82rem/1.2 var(--gia-texte); color: var(--gia-secondaire);
    text-decoration: underline; text-underline-offset: 3px;
}
.porte-oubli { align-self: flex-end; margin-top: -6px; }
.porte-oubli:hover, .porte-retour:hover { color: var(--gia-bordeaux); }

/* LE MESSAGE : lisible sans la couleur — la feuille imprimable l'exige ailleurs, et un écran
   en niveaux de gris n'est pas un cas rare. */
.porte-message { margin: 0; font-size: .85rem; color: var(--gia-encre); }
.porte-message:empty { display: none; }
.porte-message.refus { font-weight: 600; color: var(--gia-negatif); }
.porte-message.refus::before { content: '— '; }
.porte-message.ok::before { content: '✓ '; }

/* LA MENTION DU BAS (K l.287) : ce qui est vrai, et seulement ça (c0). */
.porte-mention { margin: 0; text-align: center; font-size: 0.78rem; color: var(--gia-secondaire); }
