/* ============================================
   sr-auth.css - Page de connexion aux couleurs du tableau de bord (17/10/2026)
   DA : ROUGE #FF0000 / #CC0000 + NOIR (barre latérale), cartes blanches arrondies 1rem
   Chargé après app.css sur pages/auth/login.php
   ============================================ */

body.sr-auth {
    min-height: 100vh; margin: 0; padding: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    background: #f3f4f6; font-family: 'Inter', system-ui, sans-serif; color: #0f172a;
}

.sr-auth-shell {
    width: 100%; max-width: 980px; min-height: 600px;
    display: grid; grid-template-columns: 1fr 1fr;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 1.25rem;
    box-shadow: 0 20px 50px -20px rgba(15,23,42,.25); overflow: hidden;
}

/* --- Panneau noir (comme la barre latérale) --- */
.sr-auth-brand {
    position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(160deg, #000 0%, #1a1a1a 60%, #262626 100%);
    padding: 2.5rem; display: flex; flex-direction: column;
}
.sr-auth-brand::before {
    content: ''; position: absolute; width: 360px; height: 360px; right: -140px; top: -140px;
    border-radius: 50%; background: radial-gradient(circle, rgba(255,0,0,.45) 0%, rgba(255,0,0,0) 70%);
}
.sr-auth-brand::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
    background: linear-gradient(90deg, #FF0000, #CC0000);
}
.sr-auth-brand > * { position: relative; z-index: 1; }
.sr-auth-logo img { max-height: 42px; width: auto; }
.sr-auth-pitch { margin-top: auto; }
.sr-auth-pill {
    display: inline-flex; align-items: center; gap: .35rem; padding: 4px 12px; border-radius: 999px;
    font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    background: linear-gradient(135deg, #FF0000, #CC0000); color: #fff; margin-bottom: 1rem;
}
.sr-auth-pitch h2 { color: #fff; font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .75rem; }
.sr-auth-pitch p { color: rgba(255,255,255,.7); font-size: .95rem; line-height: 1.5; margin: 0 0 1.5rem; }
.sr-auth-feats { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .65rem; }
.sr-auth-feats li { display: flex; align-items: center; gap: .75rem; font-size: .9rem; color: rgba(255,255,255,.88); }
.sr-auth-feats i {
    width: 34px; height: 34px; border-radius: .6rem; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,0,0,.16); color: #FF3333; font-size: 1rem;
}

/* --- Formulaire --- */
.sr-auth-main { padding: 2.75rem 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.sr-auth-main .sr-auth-logo-mobile { display: none; text-align: center; margin-bottom: 1.5rem; }
.sr-auth-main .sr-auth-logo-mobile img { max-height: 40px; }
.sr-auth-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .3rem; }
.sr-auth-subtitle { color: #6b7280; font-size: .92rem; margin: 0 0 1.75rem; }
.sr-auth .form-label { font-size: .82rem; font-weight: 600; color: #374151; margin-bottom: .35rem; }
.sr-auth-link { font-size: .8rem; font-weight: 600; color: #CC0000; text-decoration: none; }
.sr-auth-link:hover { color: #FF0000; }

/* Champ avec icône intégrée (un seul contour) */
.sr-field {
    display: flex; align-items: center; background: #fff;
    border: 1px solid #d1d5db; border-radius: .75rem; transition: border-color .15s, box-shadow .15s;
}
.sr-field:focus-within { border-color: #FF0000; box-shadow: 0 0 0 3px rgba(255,0,0,.12); }
.sr-field > i { padding-left: .95rem; color: #9ca3af; font-size: 1rem; }
.sr-field:focus-within > i { color: #FF0000; }
.sr-field input {
    flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent; box-shadow: none;
    padding: .72rem .9rem; font-size: .95rem; color: #0f172a;
}
.sr-field input::placeholder { color: #9ca3af; }
.sr-field .sr-field-btn {
    border: 0; background: transparent; color: #6b7280; padding: 0 .95rem; align-self: stretch; cursor: pointer;
}
.sr-field .sr-field-btn:hover { color: #0f172a; }

.sr-auth .form-check-input:checked { background-color: #FF0000; border-color: #FF0000; }
.sr-auth .form-check-input:focus { box-shadow: 0 0 0 3px rgba(255,0,0,.12); border-color: #FF0000; }
.sr-auth .form-check-label { font-size: .88rem; color: #4b5563; }

.sr-auth-btn {
    display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%;
    border: 0; border-radius: .75rem; padding: .85rem 1rem; font-weight: 700; font-size: 1rem; color: #fff;
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    box-shadow: 0 6px 16px -6px rgba(255,0,0,.55); transition: transform .12s ease, box-shadow .12s ease;
}
.sr-auth-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(255,0,0,.6); color: #fff; }
.sr-auth-btn:disabled { opacity: .75; transform: none; }

.sr-auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 1.1rem; color: #9ca3af; font-size: .8rem; }
.sr-auth-divider::before, .sr-auth-divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }

.sr-auth-alt {
    display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%;
    border: 1px solid #0f172a; border-radius: .75rem; padding: .75rem 1rem;
    font-weight: 600; font-size: .95rem; color: #0f172a; text-decoration: none; background: #fff;
    transition: background .15s, color .15s;
}
.sr-auth-alt:hover { background: #0f172a; color: #fff; }

.sr-auth .alert { border-radius: .75rem; font-size: .88rem; }

/* --- Mobile : panneau noir masqué, logo au-dessus du formulaire --- */
@media (max-width: 860px) {
    body.sr-auth { padding: 1rem; align-items: flex-start; }
    .sr-auth-shell { grid-template-columns: 1fr; min-height: 0; max-width: 460px; }
    .sr-auth-brand { display: none; }
    .sr-auth-main { padding: 2rem 1.5rem; }
    .sr-auth-main .sr-auth-logo-mobile { display: block; }
}

/* ============================================
   Champs Bootstrap dans les pages en deux colonnes (inscription)
   ============================================ */
.sr-auth .form-control, .sr-auth .form-select {
    border: 1px solid #d1d5db; border-radius: .75rem; padding: .72rem .95rem; font-size: .95rem;
}
.sr-auth .form-control:focus, .sr-auth .form-select:focus { border-color: #FF0000; box-shadow: 0 0 0 3px rgba(255,0,0,.12); }
.sr-auth .form-control.is-invalid, .sr-field.is-invalid { border-color: #dc3545; }
.sr-field input:first-child { padding-left: .95rem; }
.sr-auth .sr-phone { border-radius: .75rem; }
.sr-auth .sr-phone:focus-within { box-shadow: 0 0 0 3px rgba(255,0,0,.12); }
.sr-auth .btn-group .btn-outline-secondary {
    border-color: #d1d5db; color: #374151; font-weight: 600; font-size: .9rem; padding: .65rem .75rem; background: #fff;
}
.sr-auth .btn-group .btn-outline-secondary:first-of-type { border-radius: .75rem 0 0 .75rem; }
.sr-auth .btn-group .btn-outline-secondary:last-of-type  { border-radius: 0 .75rem .75rem 0; }
.sr-auth .btn-check:checked + .btn-outline-secondary {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%); border-color: #CC0000; color: #fff;
}
.sr-auth .btn-check:focus-visible + .btn-outline-secondary { box-shadow: 0 0 0 3px rgba(255,0,0,.15); }
.sr-auth a:not(.sr-auth-alt):not(.sr-auth-logo):not(.sr-auth-link) { color: #CC0000; }

/* Inscription : formulaire plus long, panneau noir fixe pendant le défilement */
.sr-auth-shell-wide { max-width: 1060px; }
.sr-auth-shell-wide .sr-auth-main { justify-content: flex-start; }
@media (min-width: 861px) {
    body.sr-auth:has(.sr-auth-shell-wide) { align-items: flex-start; padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .sr-auth-shell-wide .sr-auth-pitch { margin-top: 4rem; }
}

/* ============================================
   Autres pages d'authentification (mot de passe oublié, réinitialisation,
   vérification, inscription réussie, choix du compte) : même habillage
   ============================================ */
body.auth-page { background: #f3f4f6; font-family: 'Inter', system-ui, sans-serif; }
body.auth-page .auth-card {
    position: relative; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 1.25rem;
    box-shadow: 0 20px 50px -20px rgba(15,23,42,.25); padding-top: 2.75rem;
}
body.auth-page .auth-card::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px;
    background: linear-gradient(90deg, #000 0%, #000 35%, #FF0000 35%, #CC0000 100%);
}
body.auth-page .auth-title { font-weight: 800; letter-spacing: -.02em; color: #0f172a; }
body.auth-page .auth-subtitle { color: #6b7280; }
body.auth-page .form-label { font-size: .82rem; font-weight: 600; color: #374151; }
body.auth-page .form-control, body.auth-page .form-select { border-color: #d1d5db; border-radius: .75rem; padding: .72rem .95rem; }
body.auth-page .form-control:focus, body.auth-page .form-select:focus { border-color: #FF0000; box-shadow: 0 0 0 3px rgba(255,0,0,.12); }
/* groupes icône + champ : un seul contour */
body.auth-page .input-group { flex-wrap: nowrap; border: 1px solid #d1d5db; border-radius: .75rem; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
body.auth-page .input-group:focus-within { border-color: #FF0000; box-shadow: 0 0 0 3px rgba(255,0,0,.12); }
body.auth-page .input-group > .form-control, body.auth-page .input-group > .input-group-text, body.auth-page .input-group > .btn {
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent;
}
body.auth-page .input-group > .input-group-text { color: #9ca3af; padding-left: .95rem; }
body.auth-page .input-group:focus-within > .input-group-text { color: #FF0000; }
body.auth-page .input-group > .btn { color: #6b7280; }
body.auth-page .btn-primary {
    border: 0; border-radius: .75rem; font-weight: 700;
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    box-shadow: 0 6px 16px -6px rgba(255,0,0,.55);
}
body.auth-page .btn-primary:hover, body.auth-page .btn-primary:focus { background: linear-gradient(135deg, #FF0000 0%, #B30000 100%); color: #fff; }
body.auth-page .btn-outline-primary { border-radius: .75rem; border-color: #0f172a; color: #0f172a; font-weight: 600; }
body.auth-page .btn-outline-primary:hover { background: #0f172a; color: #fff; }
body.auth-page .alert { border-radius: .75rem; }
body.auth-page a:not(.btn) { color: #CC0000; }
body.auth-page .form-check-input:checked { background-color: #FF0000; border-color: #FF0000; }

/* Sélecteur de langue en haut à droite */
.sr-auth-lang { position: fixed; top: 1rem; right: 1rem; z-index: 1050; }
.sr-auth-lang-btn {
    display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem;
    background: #fff; color: #0f172a; border: 1px solid #e5e7eb; border-radius: 999px;
    font-size: .85rem; font-weight: 600; box-shadow: 0 1px 2px rgba(15,23,42,.06); transition: border-color .15s;
}
.sr-auth-lang-btn:hover, .sr-auth-lang-btn[aria-expanded="true"] { border-color: #FF0000; }
.sr-auth-lang-btn i { color: #FF0000; }
.sr-auth-lang .dropdown-menu { border-radius: .85rem; border-color: #e5e7eb; box-shadow: 0 12px 30px -12px rgba(15,23,42,.25); padding: .35rem; min-width: 210px; }
.sr-auth-lang .dropdown-item { border-radius: .55rem; font-size: .9rem; padding: .45rem .7rem; color: #0f172a !important; }
.sr-auth-lang .dropdown-item.active, .sr-auth-lang .dropdown-item:active { background: #FEE2E2; color: #CC0000 !important; font-weight: 600; }
@media (max-width: 860px) {
    body.sr-auth { padding-top: 4rem; }
    .sr-auth-lang { position: absolute; }
}

/* Type de client compact (inscription) */
.sr-type-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.sr-seg { display: inline-flex; padding: 3px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 999px; }
.sr-seg label {
    margin: 0; padding: .32rem .85rem; border-radius: 999px; cursor: pointer;
    font-size: .82rem; font-weight: 600; color: #4b5563; white-space: nowrap; transition: background .15s, color .15s;
}
.sr-seg label:hover { color: #0f172a; }
.sr-seg .btn-check:checked + label { background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%); color: #fff; box-shadow: 0 2px 6px -2px rgba(255,0,0,.5); }
.sr-seg .btn-check:focus-visible + label { box-shadow: 0 0 0 3px rgba(255,0,0,.15); }
.sr-type-row.is-invalid .sr-seg { border-color: #dc3545; }
