/* CONNEXION SANS SMS (décision d'Adhem, 13/10) — js/compte-connexion.js.
 *
 * Chargée par les SIX pages qui chargent compte-connexion.js (Compte, Panier,
 * Réservation, Reprise, Détail des tarifs, Pro), juste après leurs autres
 * feuilles : tests/connexion-sans-sms-navigateur.test.mjs le vérifie. Les
 * styles de base de l'écran (.saa-cnx-etape, .saa-cnx-ligne, .saa-cnx-lien…)
 * restent dans style.css ; ici, seulement ce qui est nouveau :
 *   - le bloc « Recevoir un code par e-mail » et son code à 8 caractères ;
 *   - le lien discret « Déjà client avec votre numéro ? » (SMS secondaire) ;
 *   - « Numéro de mobile : à confirmer » dans le bloc connecté ;
 *   - la fenêtre « Confirmez votre numéro de mobile » (premier acte).
 * Cibles tactiles : 44 px au moins partout (iPad en boutique). */

/* ── Le code par e-mail ─────────────────────────────────────────────────── */
.saa-cnx-etape-email .saa-cnx-titre,
.saa-cnx-etape-code-email .saa-cnx-titre { font-size: 1.05rem; }
.saa-cnx-indesirables { margin: 0 0 12px; }
/* Le code se lit en majuscules espacées : « ABCD2345 », sans confusion. */
.saa-cnx-etape input.saa-cnx-code-email {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 18px;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.saa-cnx-etape input.saa-cnx-code-email::placeholder { color: #9CA3AF; letter-spacing: .16em; }
.saa-cnx-etape-email .saa-cnx-erreur,
.saa-cnx-etape-code-email .saa-cnx-erreur,
.saa-cnx-etape-tel .saa-cnx-erreur { margin: 10px 0 0; color: #B91C1C; font-weight: 600; }

/* ── Le SMS, porte secondaire ───────────────────────────────────────────── */
.saa-cnx-sms {
    margin: 16px 0 0;
    padding-top: 6px;
    border-top: 1px solid var(--border, #E5E7EB);
}
.saa-cnx-sms[hidden] { display: none; }
.saa-cnx-sms-lien {
    display: block;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    text-align: left;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.saa-cnx-sms + .saa-cnx-etape-tel { margin-top: 8px; }

/* ── Bloc connecté : numéro à confirmer ─────────────────────────────────── */
.saa-cnx-a-confirmer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 14px;
    padding: 12px 14px;
    background: #F8FAFC;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 10px;
    text-align: left;
}
.saa-cnx-a-confirmer[hidden] { display: none; }
.saa-cnx-a-confirmer-texte { margin: 0; flex: 1 1 220px; min-width: 0; color: #0B1F33; line-height: 1.45; }
.saa-cnx-etape-connecte .saa-cnx-a-confirmer .btn { margin: 0; white-space: normal; }

/* ── La fenêtre « Confirmez votre numéro de mobile » ────────────────────── */
html.saa-num-ouverte,
html.saa-num-ouverte body { overflow: hidden; }
.saa-num-voile {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(11, 31, 51, .55);
    overflow-y: auto;
    box-sizing: border-box;
}
.saa-num-voile[hidden] { display: none; }
.saa-num-fenetre {
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 24px;
    background: #fff;
    color: #0B1F33;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(11, 31, 51, .28);
    text-align: left;
}
.saa-num-fenetre:focus { outline: none; }
.saa-num-titre { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.3; color: #0B1F33; }
.saa-num-texte { margin: 0 0 18px; color: #475569; line-height: 1.5; }
.saa-num-etape[hidden] { display: none; }
.saa-num-label { display: block; margin: 0 0 6px; font-weight: 600; }
.saa-num-fenetre input.saa-num-champ {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    font: inherit;
    font-size: 16px;
    box-sizing: border-box;
}
.saa-num-fenetre input.saa-num-code {
    font-size: 22px;
    letter-spacing: .32em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.saa-num-aide { margin: 8px 0 0; color: #5B6472; font-size: .88rem; line-height: 1.45; }
.saa-num-rappel { margin: 0 0 12px; line-height: 1.45; }
.saa-num-bouton { display: flex; width: 100%; min-height: 48px; margin-top: 14px; justify-content: center; white-space: normal; }
.saa-num-erreur { margin: 10px 0 0; color: #B91C1C; font-weight: 600; line-height: 1.45; }
.saa-num-erreur[hidden] { display: none; }
.saa-num-actions { margin-top: 14px; }
.saa-num-plus-tard { display: block; margin: 12px auto 0; }
@media (max-width: 360px) {
    .saa-num-voile { padding: 10px; align-items: flex-start; }
    .saa-num-fenetre { padding: 18px 16px; max-height: calc(100vh - 20px); }
}

/* « Mes connexions » et la fenêtre « Connectez-vous sans attendre de SMS » (14/10, js/compte-cles.js). */
.saa-cnx-cles[hidden] { display: none; }
.saa-cles-choix .saa-cles-bouton:first-child { margin-top: 0; }
.saa-cles-liste { list-style: none; margin: 10px 0 0; padding: 0; }
.saa-cles-ligne {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
    padding: 10px 0; border-top: 1px solid #E5E7EB;
}
.saa-cles-ligne:first-child { border-top: 0; }
.saa-cles-nom { font-weight: 600; color: #0B1F33; }
.saa-cles-date { color: #5B6472; font-size: .92rem; }
.saa-cles-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.saa-cles-actions .saa-cles-ajout { min-height: 44px; margin: 0; white-space: normal; }
