/* --- VARIABLES --- */
:root {
    --primary-orange: #f97316;
    --primary: #f97316;
    --primary-dark: #d35e13;
    --success: #16a34a;
    --error: #dc2626;
    --bg-light: #f5f6f8;
}

/* --- RESET & BASE --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; 
}

body { 
    background-color: var(--bg-light); 
    color: #333; 
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- HERO (UNIFIÉ ET COMPACT) --- */
.hero { 
    background-color: var(--primary-orange); 
    padding: 40px 0; /* Hauteur réduite pour la cohérence */
    width: 100%;
    color: white; 
}

/* Unification des deux noms de classes que tu utilises selon les pages */
.container-hero, .container-header { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 40px; 
}

.back-link-pill {
    display: inline-block;
    color: white;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.15);
    padding: 8px 22px; 
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px; /* Espace réduit entre bouton et titre */
    transition: 0.3s;
}

.back-link-pill:hover { 
    background: rgba(0, 0, 0, 0.3); 
    transform: translateX(-5px);
}

.hero h1 { 
    font-size: clamp(28px, 5vw, 48px); 
    font-weight: 800; 
    margin: 0; /* Supprime la marge par défaut qui agrandissait le bloc orange */
    letter-spacing: -1px; 
    line-height: 1.1;
}

.subtitle{
    font-size: clamp(14px, 2vw, 17px);
    opacity: 0.9; 
    margin-top: 8px;
    margin-bottom: 10px;
}

/* --- CONTENU PRINCIPAL --- */
.container { 
    max-width: 1200px; 
    margin: 50px auto; 
    padding: 0 20px; 
}

.main-grid { 
    display: grid; 
    grid-template-columns: 1fr 1.6fr; 
    gap: 30px; 
    align-items: start; 
}

.card { 
    background: white; 
    border-radius: 20px; 
    padding: 35px; 
    /* Border redondante ici */
    border: 1px solid #e5e7eb; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); 
}

.card h2 { 
    margin-bottom: 30px; 
    font-size: 26px; 
    font-weight: 700; 
    border-bottom: 3px solid var(--primary); 
    display: inline-block; 
    padding-bottom: 5px; 
}

/* --- SECTION FORMULES --- */
.formula { 
    background: #fffaf5; 
    padding: 20px; 
    border-radius: 15px; 
    /* Border spécifique pour les formules */
    border: 1px solid #fed7aa; 
    margin-bottom: 25px; 
}

.formula h3 { 
    color: var(--primary-dark); 
    margin-bottom: 8px; 
    font-size: 20px; 
}



.formula ul { list-style: none; }
.formula li { 
    margin-bottom: 12px; 
    display: flex; 
    align-items: center; 
    font-size: 15px;
}

.formula li::before { 
    content: "✓"; 
    color: var(--success); 
    font-weight: bold; 
    margin-right: 12px; 
}

/* --- FORMULAIRE ET INPUTS --- */
.input-group { 
    position: relative; 
    width: 100%; 
}

.grid-2 { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}

input, select { 
    width: 100%; 
    padding: 15px; 
    border-radius: 12px; 
    /* Border redondante pour les inputs */
    border: 1px solid #d1d5db; 
    background: #f9fafb; 
    margin-bottom: 20px; 
    font-size: 16px; 
    outline: none; 
    transition: border-color 0.2s, background-color 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary);
    background: white;
}

/* États de validation avec borders spécifiques */
input.valid, select.valid { 
    border-color: #16a34a; 
    background-color: #f0fdf4; 
}

input.invalid, select.invalid { 
    border-color: #dc2626; 
    background-color: #fef2f2; 
    margin-bottom: 5px; 
}

.error-text { 
    color: var(--error); 
    font-size: 12px; 
    font-weight: 600; 
    margin-bottom: 15px; 
    display: block; 
}

/* --- BOUTON ET CAPTCHA --- */
button[type="submit"] { 
    width: 100%; 
    padding: 18px; 
    background: #cbd5e1; 
    color: white; 
    border: none; 
    border-radius: 12px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: not-allowed; 
    transition: 0.3s;
}

button[type="submit"]:not(:disabled) { 
    background: var(--primary); 
    cursor: pointer; 
}

button[type="submit"]:not(:disabled):hover {
    background: var(--primary-dark);
}

.capcha-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.form-info { 
    text-align: center; 
    font-size: 13px; 
    color: #6b7280;
    margin-top: 15px;
    line-height: 1.4;
}

/* --- RESPONSIVE 900px (Tablettes) --- */
@media (max-width: 900px) {
    .main-grid { 
        grid-template-columns: 1fr; 
    }

    .grid-2 { 
        grid-template-columns: 1fr; 
        gap: 0; 
    }

    .hero {
        text-align: center;
    }
}

/* --- RESPONSIVE 600px (Smartphones) --- */
@media (max-width: 600px) {
    .container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .card {
        padding: 25px 18px;
        border-radius: 15px;
    }

    .container-header {
        padding: 0 20px;
    }

    .hero {
        padding: 30px 0;
    }

    .back-btn {
        margin-bottom: 20px;
        padding: 10px 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .card h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
}

/* --- RESPONSIVE 400px (Petits mobiles) --- */
@media (max-width: 400px) {
    .g-recaptcha {
        transform: scale(0.8);
        transform-origin: 0 0;
    }
    
    .capcha-container {
        justify-content: flex-start;
        height: 65px; 
    }
}







/* CONTENEUR INPUT (obligatoire pour positionnement liste) */
.input-group {
    position: relative;
}

/* BLOC DES SUGGESTIONS */
#suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;

    background: #fff;
    border-radius: 12px;

    max-height: 240px;
    overflow-y: auto;

    z-index: 9999;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

    /* animation légère (optionnel mais clean) */
    opacity: 1;
}

/* ITEM DE LA LISTE */
.suggestion-item {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #333;

    transition: background 0.15s ease, transform 0.05s ease;
    border-bottom: 1px solid #f3f4f6;
}

/* dernier item */
.suggestion-item:last-child {
    border-bottom: none;
}

/* hover */
.suggestion-item:hover {
    background: #f97316;
    color: white;
}

/* clic */
.suggestion-item:active {
    transform: scale(0.98);
}
