/* ==========================================================================
 * vehiclefeaturesearch — CSS du bandeau cascade (sous-palier 2c, v0.3.0)
 * --------------------------------------------------------------------------
 * Source : mockup v6.1 validé visuellement par Steve (uniquement le bloc
 * .vfs-cascade-*, le chrome de démonstration du mockup est exclu).
 *
 * Conventions :
 *  - Préfixe .vfs-cascade-* (évite tout conflit avec vehiclesearch voisin
 *    qui utilise .vehiclesearch-*)
 *  - Pattern visuel "encart à valeur ajoutée" de la charte PAP : fond cream
 *    #FAF7EE + bordure-gauche or 5px (signature .callout)
 *  - Couleurs codées en dur (pas de variables CSS) — KISS pour le palier 2c.
 *    Si un système de tokens devient nécessaire plus tard, refacto à ce
 *    moment-là.
 *  - Police Manrope chargée via @import Google Fonts (cohérence stricte avec
 *    le mockup validé). Ajoute une requête réseau mais respecte la charte.
 *
 * Couleurs charte PAP utilisées :
 *  - #0F1923 : noir profond (titres, fond bouton)
 *  - #9A7B0A : or bronze (accents, bordures, séparateur, eyebrow)
 *  - #FAF7EE : cream (fond bandeau)
 *  - #3D3D3D : gris texte (corps, hints)
 *  - #CDC69C : champagne (texte sur fond noir UNIQUEMENT, label bouton)
 *  - #C8860A : orange warn (état "aucun résultat")
 *  - #FEF9E7 : fond warn (état "aucun résultat")
 * ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ─── Wrapper racine ────────────────────────────────────────────────────── */

.vfs-cascade {
    font-family: 'Manrope', Arial, sans-serif;
    color: #3D3D3D;
    letter-spacing: -0.01em;
}

.vfs-cascade *,
.vfs-cascade *::before,
.vfs-cascade *::after {
    box-sizing: border-box;
    font-family: 'Manrope', Arial, sans-serif;
}

/* ─── Bandeau principal cream + bordure-gauche or ────────────────────────── */

.vfs-cascade-banner {
    width: 100%;
    padding: 28px 28px 32px;
    background: #FAF7EE;
    border-left: 5px solid #9A7B0A;
    border-radius: 3px;
    margin: 0 auto 16px;
    max-width: 1180px;
}

/* ─── Header titre + sous-titre ─────────────────────────────────────────── */

.vfs-cascade-header {
    text-align: center;
    margin-bottom: 24px;
}

.vfs-cascade-eyebrow {
    color: #9A7B0A;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 6px;
}

.vfs-cascade-title {
    color: #0F1923;
    font-size: 1.4em;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
}

.vfs-cascade-title__accent {
    color: #9A7B0A;
    font-style: italic;
}

.vfs-cascade-subtitle {
    color: #3D3D3D;
    font-size: 0.95em;
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}

/* ─── Grille des 3 étapes (cartes blanches bordure or fine) ─────────────── */

.vfs-cascade-steps {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.vfs-cascade-step {
    text-align: center;
    background: #FFFFFF;
    border: 1px solid rgba(154, 123, 10, 0.3);
    border-radius: 3px;
    padding: 20px 14px 18px;
    box-shadow: 0 1px 2px rgba(15, 25, 35, 0.04);
    position: relative;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.vfs-cascade-step:hover {
    border-color: #9A7B0A;
    box-shadow: 0 2px 8px rgba(154, 123, 10, 0.12);
}

/* État "désactivé" — étapes non encore débloquées */
.vfs-cascade-step--locked {
    opacity: 0.55;
}

.vfs-cascade-step--locked:hover {
    border-color: rgba(154, 123, 10, 0.3);
    box-shadow: 0 1px 2px rgba(15, 25, 35, 0.04);
}

.vfs-cascade-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0F1923;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    margin: 0 auto 10px;
}

.vfs-cascade-step__question {
    color: #0F1923;
    font-size: 0.93em;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Petit séparateur or sous la question (signature visuelle PAP — ajouté
   en v6.1 du mockup après retour Steve) */
.vfs-cascade-step__question::after {
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    background: #9A7B0A;
    margin: 8px auto 10px;
    border-radius: 1px;
}

.vfs-cascade-step__hint {
    color: #3D3D3D;
    font-size: 0.82em;
    margin: 0 0 12px;
    line-height: 1.45;
    min-height: 32px;
    font-weight: 500;
}

.vfs-cascade-step__select {
    width: 100%;
    height: 44px;
    padding: 0 32px 0 12px;
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A7B0A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    border: 1px solid rgba(154, 123, 10, 0.4);
    border-radius: 3px;
    color: #0F1923;
    font-family: inherit;
    font-size: 0.88em;
    font-weight: 500;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.vfs-cascade-step__select:focus {
    outline: 2px solid #9A7B0A;
    outline-offset: 1px;
    border-color: #9A7B0A;
}

.vfs-cascade-step__select:disabled {
    background-color: #F9F9F9;
    color: #AAAAAA;
    cursor: not-allowed;
    border-color: rgba(154, 123, 10, 0.15);
}

/* État loading : remplace la flèche or par un spinner pendant l'AJAX */
.vfs-cascade-step__select--loading {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' stroke='%239A7B0A' stroke-width='5' stroke-linecap='round' fill='none'%3E%3Ccircle cx='25' cy='25' r='20' opacity='0.25'/%3E%3Cpath d='M25 5 a20 20 0 0 1 20 20'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    background-size: 16px;
}

/* État "aucun résultat" : affiché en lieu et place du select si pool vide */
.vfs-cascade-step__empty {
    display: none;
    color: #C8860A;
    font-size: 0.82em;
    font-style: italic;
    background: #FEF9E7;
    border-left: 3px solid #C8860A;
    padding: 10px 12px;
    text-align: left;
    border-radius: 2px;
    line-height: 1.5;
}

.vfs-cascade-step--empty .vfs-cascade-step__select { display: none; }
.vfs-cascade-step--empty .vfs-cascade-step__empty { display: block; }

/* État "erreur réseau" : variante visuelle de --empty avec un message
   différent. Les classes CSS sont identiques, c'est le texte qui change
   côté JS (cf vehiclefeaturesearch.js). */

/* ─── CTA — fond noir + texte champagne ─────────────────────────────────── */

.vfs-cascade-cta {
    display: flex;
    justify-content: center;
}

.vfs-cascade-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 36px;
    background: #0F1923;
    color: #CDC69C;
    border: none;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.92em;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s ease, opacity 0.18s ease;
}

.vfs-cascade-submit:hover:not(:disabled) {
    background: #1a2935;
}

.vfs-cascade-submit:focus-visible {
    outline: 2px solid #9A7B0A;
    outline-offset: 2px;
}

.vfs-cascade-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #3D3D3D;
}

.vfs-cascade-submit__icon {
    width: 18px;
    height: 18px;
    color: #9A7B0A;
}

/* ─── Responsive mobile ─ cartes empilées + trait or entre cartes ───────── */

@media (max-width: 720px) {
    .vfs-cascade-banner {
        padding: 24px 18px 28px;
    }

    .vfs-cascade-title {
        font-size: 1.2em;
    }

    .vfs-cascade-steps {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .vfs-cascade-step {
        padding: 18px 14px 16px;
    }

    .vfs-cascade-step:not(:last-child)::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -14px;
        width: 1px;
        height: 14px;
        background: #9A7B0A;
        opacity: 0.4;
        transform: translateX(-0.5px);
    }

    .vfs-cascade-step__hint {
        min-height: 0;
        margin-bottom: 10px;
    }

    .vfs-cascade-step__question {
        font-size: 0.95em;
    }

    .vfs-cascade-submit {
        height: 48px;
        padding: 0 24px;
        font-size: 0.85em;
    }
}
