/* ==========================================================
   AzotCar — Connexion et inscription
   Chargé par auth/connexion.blade.php et auth/inscription.blade.php
   (préfixe .au-). Ces pages s'affichent sans navbar ni pied de page.
   ========================================================== */

.au {
    --au-ink: #0b1528;
    --au-ink-soft: #16284a;
    --au-blue: #1a5ec6;
    --au-blue-hover: #174fa8;
    --au-sky: var(--color-primary-accent, #38bdf8);
    --au-line: #d5dde8;
    --au-text: #334155;
    --au-muted: #5b6b82;
    --au-red: #c62828;
    --au-display: 'Barlow Semi Condensed', 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --au-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--au-text);
    background: #ffffff;
}

.au a:focus-visible,
.au button:focus-visible {
    outline: 2px solid var(--au-blue);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ==============================================
   LOGO
   ============================================== */
.au .logo-box {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: none;
    border-radius: 0;
    font-family: var(--au-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
    color: var(--au-ink);
}

.au .logo-box::before {
    content: '';
    width: 28px;
    height: 28px;
    margin-right: 9px;
    flex-shrink: 0;
    border-radius: 7px;
    background: var(--au-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.6 3.6 7.4-8.2' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 17px no-repeat;
}

.au .logo-box span {
    color: var(--color-primary, #267df0);
}

/* Logo clair, sur le panneau bleu nuit */
.au-panneau .logo-box {
    color: #ffffff;
}

.au-panneau .logo-box::before {
    background-color: var(--color-primary, #267df0);
}

.au-panneau .logo-box span {
    color: var(--au-sky);
}

/* ==============================================
   PANNEAU DE MARQUE (bureau)
   ============================================== */
.au-panneau {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: 40px 56px 44px;
    color: #c6d2e2;
    background:
        radial-gradient(760px 520px at 0% 0%, #1a3462 0%, rgba(26, 52, 98, 0) 66%),
        var(--au-ink);
}

.au-guilloche {
    position: absolute;
    right: -300px;
    bottom: -300px;
    width: 820px;
    height: 820px;
    color: var(--au-sky);
    opacity: 0.16;
    pointer-events: none;
}

.au-panneau > :not(.au-guilloche) {
    position: relative;
}

.au-panneau-logo {
    align-self: flex-start;
    display: inline-flex;
}

.au-kicker {
    margin-bottom: 18px;
    font-family: var(--au-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--au-sky);
}

.au-slogan {
    max-width: 560px;
    font-family: var(--au-display);
    font-size: clamp(32px, 3.2vw, 48px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-wrap: balance;
}

.au-slogan span {
    color: var(--au-sky);
}

.au-panneau-texte {
    max-width: 420px;
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.65;
}

.au-retour {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: #e6edf7;
}

.au-retour svg {
    transition: transform 0.2s ease;
}

.au-retour:hover svg {
    transform: translateX(-3px);
}

.au-panneau .au-retour:focus-visible,
.au-panneau .au-panneau-logo:focus-visible {
    outline-color: var(--au-sky);
}

/* ==============================================
   ZONE DU FORMULAIRE
   ============================================== */
.au-zone {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Barre du haut : visible seulement sur mobile */
.au-entete {
    display: none;
}

.au-centre {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 32px;
}

.au-form-bloc {
    width: 100%;
    max-width: 400px;
}

.au-titre {
    font-family: var(--au-display);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.08;
    color: var(--au-ink);
}

.au-sous-titre {
    margin-top: 8px;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--au-muted);
}

/* --- Messages --- */
.au-alerte {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 10px;
}

.au-alerte svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.au-alerte--erreur {
    color: #8f1d1d;
    background: #fdf1f1;
    border: 1px solid #f3c4c4;
}

.au-alerte--succes {
    color: #0b5e37;
    background: #ecf8f1;
    border: 1px solid #b4e3c9;
}

/* --- Champs --- */
.au-champ {
    margin-bottom: 18px;
}

.au-label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: var(--au-ink);
}

.au-input {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    font-family: inherit;
    font-size: 16px;
    color: var(--au-ink);
    background: #ffffff;
    border: 1px solid var(--au-line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.au-input::placeholder {
    color: #9aa6b6;
}

.au-input:focus {
    border-color: var(--au-blue);
    box-shadow: 0 0 0 3px rgba(26, 94, 198, 0.18);
}

.au-input[aria-invalid="true"] {
    border-color: var(--au-red);
}

.au-aide {
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--au-muted);
}

/* Champ téléphone +243 (composant x-champ-telephone), aligné sur les autres champs */
.au .tel-groupe {
    height: 52px;
    border: 1px solid var(--au-line);
    border-radius: 10px;
}

.au .tel-groupe:focus-within {
    border-color: var(--au-blue);
    box-shadow: 0 0 0 3px rgba(26, 94, 198, 0.18);
}

.au .tel-groupe:has(.tel-input[aria-invalid="true"]) {
    border-color: var(--au-red);
}

.au .tel-indicatif {
    padding: 0 14px 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--au-ink);
    background: #f3f5f9;
    border-right: 1px solid var(--au-line);
}

.au .tel-input {
    padding: 0 15px;
    font-family: var(--au-mono);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--au-ink);
}

.au .tel-input::placeholder {
    color: #9aa6b6;
}

/* Mot de passe avec bouton Afficher / Masquer */
.au-mdp {
    position: relative;
}

.au-mdp .au-input {
    padding-right: 52px;
}

.au-oeil {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--au-muted);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.au-oeil:hover {
    color: var(--au-ink);
    background: #f3f5f9;
}

.au-oeil .au-oeil-ferme,
.au-oeil[aria-pressed="true"] .au-oeil-ouvert {
    display: none;
}

.au-oeil[aria-pressed="true"] .au-oeil-ferme {
    display: block;
}

/* --- Bouton principal --- */
.au-envoyer {
    width: 100%;
    height: 54px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    background: var(--au-blue);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.au-envoyer:hover {
    background: var(--au-blue-hover);
}

.au-envoyer svg {
    transition: transform 0.2s ease;
}

.au-envoyer:hover svg {
    transform: translateX(3px);
}

/* ==============================================
   VÉRIFICATION DU NUMÉRO (code WhatsApp)
   ============================================== */
.au-etape {
    margin-bottom: 10px;
    font-family: var(--au-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--au-blue);
}

.au-sous-titre strong {
    font-weight: 600;
    white-space: nowrap;
    color: var(--au-ink);
}

.au-alerte--info {
    color: #0b3d7a;
    background: #eef4fe;
    border: 1px solid #c7dbf9;
}

/* Un seul champ (collage et remplissage automatique fiables), chiffres espacés */
.au-code {
    height: 64px;
    padding: 0 0 0 0.5em;
    font-family: var(--au-mono);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.5em;
    text-align: center;
}

.au-code::placeholder {
    letter-spacing: 0.5em;
    color: #c3ccd8;
}

.au-renvoi {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 6px;
    margin-top: 20px;
    font-size: 15px;
    color: var(--au-muted);
}

.au-lien-bouton {
    padding: 4px 2px;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    color: var(--au-blue);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.15s ease;
}

.au-lien-bouton:hover:not(:disabled) {
    text-decoration-color: currentColor;
}

.au-lien-bouton:disabled {
    font-variant-numeric: tabular-nums;
    color: var(--au-muted);
    cursor: default;
}

/* --- Bascule connexion / inscription --- */
.au-bascule {
    margin-top: 28px;
    padding-top: 22px;
    font-size: 15px;
    text-align: center;
    color: var(--au-muted);
    border-top: 1px solid #e7ecf2;
}

.au-bascule a {
    margin-left: 4px;
    font-weight: 600;
    color: var(--au-blue);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.15s ease;
}

.au-bascule a:hover {
    text-decoration-color: currentColor;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1100px) {
    .au-panneau {
        padding: 36px 40px 40px;
    }
}

/* Tablette et mobile : le panneau disparaît, une barre légère le remplace */
@media (max-width: 900px) {
    .au {
        grid-template-columns: 1fr;
    }

    .au-panneau {
        display: none;
    }

    .au-entete {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        height: 60px;
        padding: 0 18px;
        border-bottom: 1px solid #e7ecf2;
    }

    .au-entete .logo-box {
        font-size: 22px;
    }

    .au-entete .logo-box::before {
        width: 26px;
        height: 26px;
        margin-right: 8px;
        background-size: 16px;
    }

    .au-entete .au-retour {
        align-self: center;
        color: var(--au-muted);
        font-size: 14px;
    }

    .au-centre {
        align-items: flex-start;
        padding: 44px 24px 56px;
    }
}

@media (max-width: 600px) {
    .au-centre {
        padding: 32px 18px 44px;
    }

    .au-titre {
        font-size: 30px;
    }

    .au-sous-titre {
        margin-bottom: 24px;
        font-size: 15px;
    }

    .au-champ {
        margin-bottom: 16px;
    }

    .au-input,
    .au .tel-groupe {
        height: 50px;
    }

    .au-oeil {
        top: 3px;
    }

    .au-envoyer {
        height: 52px;
        font-size: 15.5px;
    }

    .au-bascule {
        margin-top: 24px;
        padding-top: 20px;
        font-size: 14.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .au-retour svg,
    .au-envoyer svg,
    .au-input,
    .au-envoyer {
        transition: none;
    }
}
