/* ==========================================================================
   Améliorations mobile des pages d'authentification (Connexion / Inscription).
   Fichier dédié, chargé APRÈS site.css par _LayoutNoNavigation, pour ne pas
   toucher au site.css compilé (les styles .auth-card n'existent pas en LESS).
   Sélecteurs limités à body.no-navigation (pages d'auth) — sans impact sur l'app.
   ========================================================================== */

/* Empêche le zoom automatique iOS au focus d'un champ (déclenché si < 16px). */
.no-navigation .auth-card input:not([type=checkbox]):not([type=radio]),
.no-navigation .auth-card select,
.no-navigation .auth-card textarea,
.no-navigation .auth-card .editor input,
.no-navigation .auth-card .s-StringEditor,
.no-navigation .auth-card .s-PasswordEditor {
    font-size: 16px !important;
}

/* Cibles tactiles confortables (bouton principal, options). */
.no-navigation .auth-card .btn,
.no-navigation .auth-card button[type=submit] {
    min-height: 50px;
    font-size: 16px;
    font-weight: 700;
}
.no-navigation .auth-card input,
.no-navigation .auth-card .editor {
    min-height: 46px;
}

/* Liens d'auth : zone tactile plus grande. */
.no-navigation .auth-links a,
.no-navigation .auth-link {
    display: inline-block;
    padding: 10px 6px;
}

/* Tablette / petit écran : carte fluide, marges resserrées. */
@media (max-width: 768px) {
    .no-navigation .auth-main { padding: 20px 14px; }
}

/* Mobile : plus d'air, champs plus grands, CGU lisible. */
@media (max-width: 480px) {
    .no-navigation .auth-main { padding: 12px 10px 24px; min-height: auto; }
    .no-navigation .auth-card { box-shadow: none; border: 1px solid #eef1f6; }
    .no-navigation .auth-card-header h2 { font-size: 20px; }
    .no-navigation .auth-terms { font-size: 13px; line-height: 1.5; }
    .no-navigation .auth-card-logo img { max-height: 44px; }
}

/* Très petits écrans : sélecteur de type de compte en UNE colonne (au lieu de 2
   colonnes tassées), en ligne icône + titre pour gagner de la hauteur. */
@media (max-width: 400px) {
    .no-navigation .signup-type-picker { grid-template-columns: 1fr; gap: 10px; }
    .no-navigation .signup-type-option {
        display: flex; align-items: center; gap: 12px;
        text-align: left; padding: 14px 14px;
    }
    .no-navigation .signup-type-option .signup-type-icon { margin: 0; font-size: 20px; }
    .no-navigation .signup-type-option .signup-type-title { margin: 0; }
    .no-navigation .signup-type-option .signup-type-desc { display: none; }
    .no-navigation .signup-type-option .signup-type-check { top: 12px; right: 12px; }
}

/* ==========================================================================
   Refonte inscription/connexion sans friction (HANDOFF_Signup_Sans_Friction).
   Styles de base (tous écrans) + ajustements mobile ciblés.
   ========================================================================== */

/* Champs de confirmation retirés du parcours (§4.1c) : saisie unique du PIN /
   de l'email. On masque EN DUR ConfirmPassword et ConfirmEmail. Le sélecteur
   d'ID #SignUpPanel prime sur les règles « display: flex !important » de
   site.css, ce qui garantit le masquage quel que soit l'état du JS.
   (EntrepriseName reste VISIBLE : champ « Nom de la boutique » optionnel.) */
#SignUpPanel .field.ConfirmPassword,
#SignUpPanel .field.ConfirmEmail {
    display: none !important;
}
/* Code de parrainage masqué par défaut (déroulé par le lien « J'ai un code »).
   site.css force TOUS les .field en « display:flex !important » : on masque donc
   en !important (l'ID prime), et on révèle via la classe .affilie-open (ajoutée
   par le lien) avec une spécificité supérieure. */
#SignUpPanel .field.CodeAffilie {
    display: none !important;
}
#SignUpPanel .field.CodeAffilie.affilie-open {
    display: flex !important;
}

/* Espacement des champs ≥ 14px + focus visible (contour navy). */
.no-navigation .auth-card .field { margin-bottom: 14px; }
.no-navigation .auth-card input:not([type=checkbox]):not([type=radio]):focus,
.no-navigation .auth-card .pin-digit:focus {
    outline: 2px solid #233b6e;
    outline-offset: 1px;
}

/* Champ téléphone : préfixe « 🇸🇳 +221 » accolé à gauche du champ. */
.no-navigation .auth-card .phone-input-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
}
.no-navigation .auth-card .phone-prefix {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    white-space: nowrap;
    background: #f5f7fa;
    border: 1px solid #d6dce6;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.no-navigation .auth-card .phone-input-wrap input {
    flex: 1 1 auto;
    min-width: 0;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Œil « afficher le mot de passe » (mode email). */
.no-navigation .auth-card .has-eye .editor { position: relative; }
.no-navigation .auth-card .pin-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #8892a6;
    cursor: pointer;
    z-index: 3;
    padding: 6px;
}
.no-navigation .auth-card .has-eye .editor input { padding-right: 38px !important; }

/* Réassurance + mention CGU en click-wrap (sous le bouton). */
.no-navigation .signup-reassurance {
    text-align: center;
    color: #2f9e57;
    font-size: 13px;
    font-weight: 600;
    margin: 10px 0 4px;
}
.no-navigation .auth-terms-clickwrap {
    text-align: center;
    color: #8892a6;
    font-size: 12px;
    line-height: 1.5;
    margin: 2px 0 6px;
}
.no-navigation .auth-terms-clickwrap a { color: #233b6e; text-decoration: underline; }

/* Bouton en cours d'appel (spinner). */
.no-navigation .auth-card .btn.is-loading { opacity: .85; pointer-events: none; }

/* Page d'activation : destination masquée, renvoi, WhatsApp. */
.no-navigation .activation-dest {
    color: #233b6e;
    font-weight: 600;
    font-size: 14px;
    margin-top: 6px;
}
.no-navigation .activation-resend {
    text-align: center;
    margin: 14px 0 4px;
    font-size: 14px;
}
.no-navigation .activation-resend-hint { color: #8892a6; margin-right: 6px; }
.no-navigation .activation-resend-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 6px;
}
.no-navigation .activation-resend-btn.disabled,
.no-navigation .activation-resend-btn:disabled { color: #b6bdca; cursor: default; }
.no-navigation .activation-resend-countdown { color: #8892a6; margin-left: 4px; }
.no-navigation .activation-whatsapp { text-align: center; margin: 6px 0 2px; }
.no-navigation .activation-whatsapp a { color: #1faa53; font-weight: 600; }

/* Mobile : cases PIN ≥ 48px, bouton principal collant, carte fluide. */
@media (max-width: 480px) {
    .no-navigation .pin-digit {
        width: 48px !important;
        height: 52px !important;
        font-size: 22px !important;
    }
    .no-navigation .pin-input-group { gap: 8px; justify-content: center; }

    /* Bouton « Créer mon compte » collant en bas quand le formulaire dépasse. */
    .no-navigation.register-page .auth-card .btn-primary.btn-block {
        position: sticky;
        bottom: 8px;
        z-index: 5;
        box-shadow: 0 4px 14px rgba(35, 59, 110, .18);
    }
}

/* ===== Bloc de réassurance signup — visuel (handoff réassurance §3) ===== */
.signup-reassure h2 { font-size: 23px; line-height: 1.2; }
.signup-reassure h2 .hl { color: #00377D; background: linear-gradient(transparent 58%, rgba(255, 218, 55, .6) 58%); padding: 0 3px; border-radius: 2px; }
.signup-reassure > p { font-size: 14px; color: #475569; margin-top: 6px; }
.signup-reassure .reassure-list {
    list-style: none;
    margin: 14px auto 8px;
    padding: 12px 14px;
    max-width: 340px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 9px;
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
}
.signup-reassure .reassure-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: #334155; line-height: 1.35; }
.signup-reassure .reassure-list .rk { flex: none; width: 20px; height: 20px; border-radius: 50%; background: #16a34a; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.signup-reassure .reassure-list a { color: #00377D; font-weight: 700; text-decoration: underline; }
.signup-reassure .reassure-proof { font-size: 12.5px; color: #64748b; margin-top: 6px; }
.signup-reassure .reassure-proof b { color: #334155; }

/* ===== Formulaire progressif (handoff réassurance §4) ===== */
.wiz-progress { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.wiz-progress .wiz-step-label { font-size: 12.5px; font-weight: 700; color: #64748b; }
.wiz-dots { display: inline-flex; gap: 6px; }
.wiz-dots i { width: 20px; height: 6px; border-radius: 6px; background: #e2e8f0; display: inline-block; transition: background .2s; }
.wiz-dots i.on { background: #00377D; }
.wiz-micro { font-size: 12.5px; color: #64748b; margin: 2px 0 12px; }
.wiz-micro.wiz-error { color: #b91c1c; font-weight: 600; }
/* Bouton « Précédent » : discret mais net, sous le bouton principal. */
.wiz-back { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; padding: 6px 4px; font-size: 13.5px; font-weight: 600; color: #64748b; background: none; border: none; cursor: pointer; }
.wiz-back:hover { color: #00377D; }
/* Champs masqués par le wizard (bat le !important de site.css qui force les .field visibles). */
#SignUpPanel .field.wiz-off { display: none !important; }

/* Visibilité des boutons pilotée par l'étape courante (classe sur #SignUpPanel).
   En !important pour battre un éventuel forçage d'affichage dans site.css.
   Sans classe wiz-step-* (wizard inactif / échec) : comportement par défaut =
   bouton final visible, ce qui préserve le formulaire empilé de repli. */
#SignUpPanel.wiz-step-1 button[type="submit"],
#SignUpPanel.wiz-step-2 button[type="submit"],
#SignUpPanel.wiz-step-3 button[type="submit"] { display: none !important; }
#SignUpPanel.wiz-step-4 .wiz-continue { display: none !important; }
#SignUpPanel.wiz-step-1 .wiz-back { display: none !important; }
