/* ============================================================
 *  Sama_Boutique — Pages d'authentification (login / register)
 *  ------------------------------------------------------------
 *  Refonte « Pan-African Tech Chic », niveau fintech :
 *   - scène sombre #020617 / #0F172A avec halos lumineux Or
 *     #D97706, Émeraude #059669 et Terracotta #C25E00 ;
 *   - carte en verre dépoli (backdrop-filter blur 20px),
 *     bordures semi-transparentes dorées, liseré supérieur
 *     tricolore ;
 *   - champs à icônes SVG intégrées, focus lumineux, labels en
 *     « overline », micro-animations et zones tactiles ≥ 44px ;
 *   - jauge de force de mot de passe, œil afficher/masquer,
 *     bannières d'alerte flottantes ;
 *   - double colonne (vitrine de marque + formulaire) sur
 *     ordinateur, empilement fluide sur mobile.
 * ============================================================ */

/* ---------- Polices auto-hébergées (CSP font-src 'self') ---------- */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/plus-jakarta-sans.woff2') format('woff2');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

/* ---------- Scène plein écran ---------- */
.auth-page {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #e2e8f0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background:
        /* Halos lumineux : or en haut à droite, émeraude en bas
           à gauche, terracotta diffus au centre */
        radial-gradient(720px 480px at 88% -120px, rgb(217 119 6 / .16), transparent 62%),
        radial-gradient(760px 520px at -8% 112%, rgb(5 150 105 / .14), transparent 62%),
        radial-gradient(1000px 700px at 50% 50%, rgb(194 94 0 / .05), transparent 70%),
        linear-gradient(180deg, #0f172a 0%, #020617 55%, #020617 100%);
    background-attachment: fixed;
}

/* Motif géométrique discret (inspiration africaine moderne) */
.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M16 20l12 12-12 12-12-12z' fill='none' stroke='%23D97706' stroke-opacity='.06' stroke-width='1.2'/%3E%3Ccircle cx='48' cy='14' r='2.6' fill='%23059669' fill-opacity='.07'/%3E%3Ccircle cx='50' cy='50' r='2' fill='%23D97706' fill-opacity='.06'/%3E%3C/svg%3E");
    opacity: .9;
}

.auth-grille {
    position: relative;
    z-index: 1;
    width: min(1120px, 100% - 32px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px 0 48px;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 44px;
    align-items: center;
}
.auth-grille--login { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* ---------- Vitrine de marque (colonne gauche) ---------- */
.auth-vitrine { color: #cbd5e1; }
.auth-vitrine__logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #f8fafc;
}
.auth-vitrine__logo img { filter: drop-shadow(0 6px 16px rgb(217 119 6 / .35)); }
.auth-vitrine__logo strong {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.35rem;
    letter-spacing: -.02em;
}
.auth-vitrine__logo strong em { color: #fbbf24; font-style: normal; }

.auth-vitrine h2 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -.03em;
    color: #f8fafc;
    margin: 26px 0 14px;
}
.auth-vitrine h2 span {
    background: linear-gradient(92deg, #fbbf24, #d97706 55%, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-vitrine__accroche {
    font-size: 1.02rem;
    color: #94a3b8;
    max-width: 42ch;
    margin: 0 0 30px;
}

.auth-vitrine__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-vitrine__points li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border: 1px solid rgb(148 163 184 / .14);
    border-radius: 16px;
    background: rgb(15 23 42 / .45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform .2s ease, border-color .2s ease;
}
.auth-vitrine__points li:hover { transform: translateX(6px); border-color: rgb(217 119 6 / .35); }
.auth-vitrine__points svg { flex-shrink: 0; }
.auth-vitrine__points strong { display: block; color: #f1f5f9; font-size: .92rem; }
.auth-vitrine__points small { color: #94a3b8; font-size: .78rem; }

.auth-vitrine__confiance {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.auth-vitrine__confiance span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: #a7f3d0;
    border: 1px solid rgb(5 150 105 / .3);
    background: rgb(5 150 105 / .1);
    border-radius: 999px;
    padding: 7px 13px;
}
.auth-vitrine__confiance span:nth-child(2) { color: #fcd34d; border-color: rgb(217 119 6 / .35); background: rgb(217 119 6 / .1); }
.auth-vitrine__confiance span:nth-child(3) { color: #fdba74; border-color: rgb(194 94 0 / .4); background: rgb(194 94 0 / .1); }

/* ---------- Carte en verre dépoli ---------- */
.auth-carte {
    position: relative;
    border: 1px solid rgb(217 119 6 / .22);
    border-radius: 26px;
    padding: 34px 34px 28px;
    background: linear-gradient(165deg, rgb(15 23 42 / .82), rgb(2 6 23 / .9));
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    box-shadow:
        0 34px 70px -24px rgb(0 0 0 / .75),
        0 0 0 1px rgb(148 163 184 / .06) inset;
    overflow: hidden;
    animation: auth-apparition .5s cubic-bezier(.21, 1.02, .73, 1) both;
}
/* Liseré supérieur tricolore : or → terracotta → émeraude */
.auth-carte::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d97706, #c25e00 48%, #059669);
    opacity: .95;
}
@keyframes auth-apparition {
    from { opacity: 0; transform: translateY(16px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-carte__logo-mobile { display: none; }

.auth-carte h1 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(1.4rem, 1.2rem + 1vw, 1.7rem);
    letter-spacing: -.02em;
    color: #f8fafc;
    margin: 0 0 6px;
}
.auth-carte__sous-titre { color: #94a3b8; font-size: .9rem; margin: 0 0 22px; }
.auth-carte__sous-titre a { color: #fbbf24; font-weight: 700; text-decoration: none; }
.auth-carte__sous-titre a:hover { text-decoration: underline; }

.auth-carte h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fbbf24;
    margin: 26px 0 14px;
}
.auth-carte h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgb(217 119 6 / .4), transparent);
}
.auth-carte h3:first-of-type { margin-top: 6px; }

/* ---------- Bannières flottantes (flash, erreurs, CSRF) ---------- */
.auth-alerte {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 15px;
    margin-bottom: 14px;
    border-radius: 16px;
    font-size: .87rem;
    line-height: 1.5;
    border: 1px solid;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: auth-alerte-in .35s cubic-bezier(.21, 1.02, .73, 1) both;
}
@keyframes auth-alerte-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.auth-alerte svg { flex-shrink: 0; margin-top: 2px; }
.auth-alerte > div { flex: 1; min-width: 0; }
.auth-alerte strong { display: block; margin-bottom: 2px; }
.auth-alerte p { margin: 0; }
.auth-alerte ul { margin: 4px 0 0; padding-left: 18px; }

.auth-alerte--erreur {
    background: rgb(227 27 35 / .1);
    border-color: rgb(248 113 113 / .4);
    color: #fecaca;
}
.auth-alerte--succes {
    background: rgb(5 150 105 / .1);
    border-color: rgb(52 211 153 / .4);
    color: #a7f3d0;
}
.auth-alerte--info,
.auth-alerte--csrf {
    background: rgb(217 119 6 / .1);
    border-color: rgb(251 191 36 / .4);
    color: #fde68a;
}
.auth-alerte__bouton {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    padding: 8px 15px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d97706, #c25e00);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 14px -5px rgb(194 94 0 / .6);
    transition: filter .18s, transform .18s;
}
.auth-alerte__bouton:hover { filter: brightness(1.1); transform: translateY(-1px); }
.auth-alerte__fermer {
    border: 0;
    background: none;
    color: inherit;
    opacity: .65;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    min-width: 34px;
    min-height: 34px;
    border-radius: 8px;
    padding: 0;
}
.auth-alerte__fermer:hover { opacity: 1; background: rgb(255 255 255 / .08); }

/* ---------- Champs : label « overline » + contrôle à icône ---------- */
.champ-auth { margin-bottom: 15px; }
.champ-auth__label {
    display: block;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 7px;
    transition: color .18s;
}
.champ-auth:focus-within > .champ-auth__label { color: #fbbf24; }

.champ-controle {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid rgb(148 163 184 / .22);
    border-radius: 14px;
    background: rgb(2 6 23 / .55);
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.champ-controle:hover { border-color: rgb(148 163 184 / .4); }
.champ-controle:focus-within {
    border-color: #d97706;
    background: rgb(2 6 23 / .75);
    box-shadow:
        0 0 0 4px rgb(217 119 6 / .15),
        0 0 24px -4px rgb(217 119 6 / .25);
}
.champ-controle:focus-within .champ-controle__icone { color: #fbbf24; }

.champ-controle__icone {
    flex-shrink: 0;
    margin-left: 13px;
    color: #64748b;
    transition: color .18s;
    pointer-events: none;
}

.champ-controle input,
.champ-controle select,
.champ-controle textarea {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    color: #f1f5f9;
    font-family: inherit;
    font-size: .95rem;
    padding: 13px 14px;
    min-height: 48px; /* zone tactile confortable */
}
.champ-controle textarea { min-height: 84px; resize: vertical; }
.champ-controle input::placeholder,
.champ-controle textarea::placeholder { color: #475569; }
.champ-controle input:focus,
.champ-controle select:focus,
.champ-controle textarea:focus { outline: none; }

/* Champ « secret » : bouton œil afficher/masquer (44px tactile) */
.champ-oeil {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: 2px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: #64748b;
    cursor: pointer;
    transition: color .16s, background .16s;
}
.champ-oeil:hover { color: #fbbf24; background: rgb(217 119 6 / .1); }

/* Champ téléphone : indicatif préfixé */
.champ-controle .indicatif {
    flex-shrink: 0;
    padding: 0 11px;
    color: #fbbf24;
    font-weight: 750;
    font-size: .9rem;
    border-right: 1px solid rgb(148 163 184 / .18);
}

/* Select : drapeau + flèche décorative */
.champ-controle select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    cursor: pointer;
}
.champ-controle select option { background: #0f172a; color: #f1f5f9; }
.champ-controle__fleche {
    position: absolute;
    right: 13px;
    color: #64748b;
    pointer-events: none;
}
.champ-controle .drapeau-apercu {
    flex-shrink: 0;
    margin-left: 11px;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgb(148 163 184 / .3);
}

/* Grille deux colonnes dans le formulaire */
.grille-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

/* Indice sous champ (aide, correspondance mdp) */
.champ-hint { font-size: .76rem; color: #64748b; margin: 6px 2px 0; }
.champ-hint--ok { color: #34d399; }
.champ-hint--ko { color: #f87171; }
.aide-sombre { font-size: .78rem; color: #64748b; margin: 5px 2px 0; }
.aide-sombre strong { color: #fbbf24; }

/* ---------- Jauge de force du mot de passe ---------- */
.force-mdp {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 2px 0;
}
.force-mdp__barres {
    display: flex;
    gap: 5px;
    flex: 1;
    max-width: 190px;
}
.force-mdp__barres i {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: rgb(148 163 184 / .18);
    transition: background .25s, box-shadow .25s;
}
.force-mdp--1 .force-mdp__barres i:nth-child(-n+1) { background: #e31b23; box-shadow: 0 0 10px rgb(227 27 35 / .5); }
.force-mdp--2 .force-mdp__barres i:nth-child(-n+2) { background: #d97706; box-shadow: 0 0 10px rgb(217 119 6 / .5); }
.force-mdp--3 .force-mdp__barres i:nth-child(-n+3) { background: #fbbf24; box-shadow: 0 0 10px rgb(251 191 36 / .5); }
.force-mdp--4 .force-mdp__barres i { background: #059669; box-shadow: 0 0 10px rgb(5 150 105 / .55); }
.force-mdp__texte { font-size: .74rem; font-weight: 700; color: #64748b; transition: color .2s; }
.force-mdp--1 .force-mdp__texte { color: #f87171; }
.force-mdp--2 .force-mdp__texte { color: #fbbf24; }
.force-mdp--3 .force-mdp__texte { color: #fcd34d; }
.force-mdp--4 .force-mdp__texte { color: #34d399; }

/* ---------- Moyens de paiement (chips informatives) ---------- */
.auth-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-chips label,
.auth-chips .passerelle-info {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1.5px solid rgb(5 150 105 / .3);
    background: rgb(5 150 105 / .08);
    color: #6ee7b7;
    font-size: .78rem;
    font-weight: 700;
    cursor: default;
}
.auth-chips input[type="checkbox"] { accent-color: #059669; width: 15px; height: 15px; }

/* ---------- Bouton de soumission ---------- */
.auth-bouton {
    position: relative;
    width: 100%;
    min-height: 52px;
    margin-top: 18px;
    border: 0;
    border-radius: 15px;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, #d97706, #c25e00 60%, #9a3412);
    color: #fff;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 14px 28px -10px rgb(194 94 0 / .65);
    transition: transform .18s, box-shadow .18s, filter .18s;
}
.auth-bouton::after {
    /* Reflet balayant au survol */
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -70%;
    width: 45%;
    background: linear-gradient(100deg, transparent, rgb(255 255 255 / .22), transparent);
    transform: skewX(-18deg);
    transition: left .5s ease;
}
.auth-bouton:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 20px 36px -10px rgb(194 94 0 / .75); }
.auth-bouton:hover::after { left: 130%; }
.auth-bouton:active { transform: translateY(0) scale(.99); }

/* ---------- Pied de carte ---------- */
.auth-carte__pied {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgb(148 163 184 / .12);
    text-align: center;
    font-size: .84rem;
    color: #94a3b8;
}
.auth-carte__pied a { color: #fbbf24; font-weight: 700; text-decoration: none; }
.auth-carte__pied a:hover { text-decoration: underline; }
.auth-carte__pied .separateur { margin: 0 8px; color: #334155; }

.auth-lien-retour {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: #94a3b8;
    font-size: .8rem;
    font-weight: 650;
    text-decoration: none;
    transition: color .16s;
}
.auth-lien-retour:hover { color: #fbbf24; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .auth-grille,
    .auth-grille--login {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 22px 0 34px;
        align-items: start;
    }
    /* La vitrine de marque devient un en-tête compact. */
    .auth-vitrine { text-align: center; }
    .auth-vitrine h2 { font-size: 1.5rem; margin: 16px 0 8px; }
    .auth-vitrine__accroche { margin: 0 auto; font-size: .9rem; max-width: 46ch; }
    .auth-vitrine__corps { display: none; } /* points + badges masqués */
}
@media (max-width: 560px) {
    .auth-carte { padding: 24px 18px 20px; border-radius: 20px; }
    .grille-auth { grid-template-columns: 1fr; }
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
    .auth-carte, .auth-alerte { animation: none; }
    .auth-bouton, .auth-bouton::after, .champ-controle,
    .auth-vitrine__points li { transition: none; }
}
