/* ============================================================================
   LogiFlotte — pages d'authentification (login, register, forgot, reset).
   HTML : app/Views/layouts/auth.php

   Sur ordinateur, deux volets côte à côte :

     <div class="auth-shell auth-shell--duo">
       <div class="auth-volet">      formulaire + signature éditeur
         <div class="auth-card">…</div>
         <footer class="auth-footer">…</footer>
       </div>
       <aside class="av">…</aside>     vitrine (partials/auth_vitrine.php)
     </div>

   Sur mobile la vitrine disparaît : posée au-dessus du formulaire, elle
   repousserait le champ e-mail et le bouton hors du premier écran — elle
   coûterait plus qu'elle ne rapporte. La porte super-admin (`--sobre`) ne
   l'affiche jamais : elle ne se présente pas.
   ============================================================================ */

.auth-body {
    min-height: 100vh;
    /* Le dégradé de marque : de l'indigo du logotype au magenta du
       pictogramme. C'est le trajet visuel du logo lui-même. */
    background: linear-gradient(135deg, #14103c 0%, #2e2482 55%, #a5195b 100%);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-6) var(--space-4);
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

/* ---- Deux volets, à partir du tactile large -------------------------- */

@media (min-width: 900px) {
    .auth-shell--duo {
        display: grid;
        /* Le formulaire garde une largeur de lecture fixe ; c'est la vitrine
           qui absorbe l'espace restant. L'inverse étirerait les champs sur
           toute la largeur d'un écran 27 pouces. */
        grid-template-columns: minmax(0, 27rem) minmax(0, 1fr);
        align-items: center;
        gap: clamp(2rem, 5vw, 5rem);
        max-width: 74rem;
        padding: var(--space-8);
    }

    .auth-shell--duo .auth-volet { width: 100%; }
}

.auth-volet {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    width: 100%;
}

.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-8) var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.auth-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    margin-bottom: var(--space-2);
}

/* Le partial logo porte deja sa taille : la forcer ici ecraserait le
   pictogramme et desalignerait le logotype. */
.auth-brand img { max-height: 40px; width: auto; flex-shrink: 0; }

.auth-section-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.auth-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.auth-lead {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-align: center;
    margin: 0;
}

.auth-form,
.auth-card form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.auth-form .btn,
.auth-card form .btn {
    margin-top: var(--space-2);
}

/* ---- Formulaire dense (inscription) ---------------------------------- */

/* Deux champs par ligne dès qu'il y a la place. En dessous, l'empilement
   reste la seule mise en page lisible sur un téléphone. */
.auth-grille {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}

.auth-grille__pleine { grid-column: 1 / -1; margin: 0; }

@media (min-width: 560px) {
    .auth-grille { grid-template-columns: 1fr 1fr; }
}

/* Le formulaire dense resserre l'interligne : sur l'inscription, six champs
   à l'écartement habituel repoussaient le bouton hors de l'écran. */
.auth-form--dense { gap: var(--space-3); }
.auth-form--dense .auth-section-title { margin-top: var(--space-2); }

.auth-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    text-align: center;
    font-size: var(--font-size-sm);
}

.auth-links a {
    color: var(--color-primary);
}

.auth-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    padding-top: var(--space-4);
}

.auth-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, .35);
}
.auth-footer a:hover { border-bottom-color: #fff; }

.auth-footer__legal { color: rgba(255, 255, 255, 0.5); }

@media (max-width: 480px) {
    .auth-card { padding: var(--space-5) var(--space-4); }
}

/* La marque est desormais un lien contenant le partial logo : on neutralise
   les reglages de texte herites de l'ancien titre. */
.auth-brand { font-size: inherit; font-weight: inherit; color: inherit; }
.auth-brand:hover { opacity: .85; }

/* ---- Lien de réinitialisation expiré ---------------------------------- */
.auth-expire { text-align: center; }
.auth-expire__ico {
    display: grid; place-items: center;
    width: 46px; height: 46px; margin: 0 auto var(--space-4);
    border-radius: 50%;
    background: var(--color-warning-light);
    color: var(--color-warning);
    font-size: 1.4rem; font-weight: 700;
}
.auth-expire__titre {
    margin: 0 0 var(--space-3);
    font-size: var(--font-size-lg); font-weight: 700;
    color: var(--color-text);
}
.auth-expire__txt {
    margin: 0 0 var(--space-5);
    font-size: var(--font-size-sm); line-height: 1.6;
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Deux chemins de récupération : WhatsApp d'abord, e-mail ensuite.
   Le séparateur dit qu'il s'agit d'une alternative, pas d'une suite d'étapes.
   -------------------------------------------------------------------------- */
.auth-separateur {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.auth-separateur::before,
.auth-separateur::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-code {
  font-size: 1.4rem;
  letter-spacing: .35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
