/* --- VARIABLES & RESET --- */
:root {
    --primary: #2ecc71;       /* Vert Émeraude Vif */
    --primary-dark: #27ae60;  /* Vert Foncé pour Hover */
    --accent: #f1c40f;        /* Jaune Solaire subtil */
    --text-main: #2c3e50;     /* Bleu Nuit (plus doux que noir) */
    --text-light: #7f8c8d;    /* Gris texte secondaire */
    --bg-light: #f8f9fa;      /* Gris très clair fond */
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.1);
    --radius: 12px;
    --container: 900px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #fdfdfd;
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* --- LAYOUT --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- TYPOGRAPHIE --- */
h1, h2, h3 { color: var(--text-main); letter-spacing: -0.5px; font-weight: 700; }
h1 { font-size: 2.5rem; margin-bottom: 1rem; line-height: 1.2; }
h2 { font-size: 1.8rem; margin: 3rem 0 1.5rem; position: relative; display: inline-block; }
h2::after {
    content: ''; display: block; width: 40px; height: 4px; 
    background: var(--primary); margin-top: 8px; border-radius: 2px;
}
p { margin-bottom: 1.5rem; color: #4a5568; }
strong { color: var(--text-main); font-weight: 600; }

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    padding: 60px 40px;
    border-radius: 24px;
    text-align: center;
    margin: 40px auto;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(46, 204, 113, 0.1);
}
.hero p { font-size: 1.1rem; color: var(--text-light); max-width: 600px; margin: 0 auto 30px; }

/* --- STATS BOX (Les badges) --- */
.stats-box {
    display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px;
}
.stat {
    background: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.95rem;
}

/* --- BOUTONS --- */
.cta-button {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    border: none; cursor: pointer; font-size: 1rem;
}
.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
}

/* --- CALCULATOR --- */
.calc-box {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid #eee;
    margin: 40px 0;
}
.calc-input-group { display: flex; gap: 10px; margin-top: 15px; }
.calc-input {
    flex: 1; padding: 12px 15px;
    border: 2px solid #e2e8f0; border-radius: 8px;
    font-size: 1rem; transition: border-color 0.2s;
}
.calc-input:focus { border-color: var(--primary); outline: none; }
.calc-btn {
    background: var(--text-main); color: white;
    padding: 0 25px; border-radius: 8px; font-weight: 600;
    border: none; cursor: pointer; transition: background 0.2s;
}
.calc-btn:hover { background: #1a252f; }
.calc-res {
    margin-top: 20px; padding: 15px;
    background: #fff8e1; color: #b7791f;
    border-radius: 8px; font-weight: 500; display: none;
    border-left: 4px solid #f6e05e;
}

/* --- FAQ --- */
details {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.2s;
}
details:hover { border-color: #cbd5e0; }
summary {
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    list-style: none; /* Cache la flèche par défaut */
    position: relative;
    padding-right: 40px;
}
summary::after {
    content: '+'; position: absolute; right: 20px; top: 50%;
    transform: translateY(-50%); font-size: 1.2rem; color: var(--primary);
}
details[open] summary::after { content: '-'; }
details[open] summary { border-bottom: 1px solid #eee; background: #fcfcfc; }
details p { padding: 20px; margin: 0; font-size: 0.95rem; line-height: 1.7; }

/* --- BREADCRUMBS --- */
.breadcrumbs {
    padding: 20px 0; font-size: 0.9rem; color: var(--text-light);
}
.breadcrumbs a { color: var(--text-light); text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--primary); }

/* --- GRID VILLES --- */
.grid-villes, .grid-depts, .list-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
.card-link {
    display: block;
    background: var(--white);
    padding: 15px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}
.card-link:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.card-meta { display: block; font-size: 0.8rem; color: var(--text-light); margin-top: 5px; }

/* --- KPI CARDS (Page Dept) --- */
.kpi-container { display: flex; gap: 20px; margin: 30px 0; }
.kpi-card {
    flex: 1; background: var(--white); padding: 25px;
    border-radius: var(--radius); text-align: center;
    box-shadow: var(--shadow-sm); border: 1px solid #eee;
}
.kpi-val { font-size: 2rem; font-weight: 800; color: var(--primary); display: block; line-height: 1; margin-bottom: 5px; }
.kpi-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); font-weight: 600; }

/* --- FOOTER --- */
footer {
    margin-top: 80px; padding: 40px 0;
    text-align: center; border-top: 1px solid #eee;
    color: var(--text-light); font-size: 0.9rem;
}
footer a { color: var(--text-light); text-decoration: underline; }

/* --- MOBILE --- */
@media (max-width: 600px) {
    h1 { font-size: 1.8rem; }
    .hero { padding: 30px 20px; }
    .kpi-container { flex-direction: column; }
    .calc-input-group { flex-direction: column; }
    .calc-btn { padding: 12px; margin-top: 10px; }
}


/* --- CORRECTIF LISTES (Accueil & Départements) --- */

/* Alignement Grid Accueil & Dept */
.grid-depts, .list-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* Cartes un peu plus larges */
    gap: 15px;
    margin-top: 20px;
    padding: 0; /* Reset UL padding */
    list-style: none;
}

/* Style des liens Départements (Accueil) */
.dept-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 20px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid #eee;
    border-radius: var(--radius); /* 12px */
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    font-weight: 600;
}
.dept-link:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Badge compteur (Accueil) */
.badge {
    background: #eefbf3;
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Style des liens Villes (Page Département) */
.list-group li a {
    display: block;
    background: var(--white);
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid #eee;
    border-radius: 8px; /* Un peu moins rond que les dept */
    border-left: 4px solid var(--primary); /* Liseré vert à gauche */
    transition: all 0.2s ease;
}
.list-group li a:hover {
    background: #f0fdf4; /* Fond vert très pâle */
    transform: translateX(5px); /* Petite animation vers la droite */
    box-shadow: var(--shadow-sm);
}

/* Meta info sous le nom de ville */
.meta {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
    font-weight: 400;
}

/* Titres sections accueil */
h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-top: 50px;
}

.top-cities {
    background: #f0fdf4;
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    border: 1px solid #bbf7d0;
}
.top-cities ul { margin: 0; padding-left: 20px; color: var(--text-main); }
.top-cities li { margin-bottom: 8px; }

header img {
    max-width: 250px; /* Sur mobile on le réduit un peu */
    height: auto;
}

@media (min-width: 768px) {
    header img {
        max-width: 350px; /* Taille réelle sur PC */
    }
}

/* Gestion du bouton header */
.header-cta {
    display: none; /* Caché par défaut (Mobile First) */
}

@media (min-width: 768px) {
    .header-cta {
        display: block; /* Affiché sur Tablette/PC */
    }
}

/* --- SOCIAL PROOF CARD --- */
.social-proof-card {
    background: linear-gradient(to right, #ffffff, #f9fffb);
    border-left: 5px solid var(--primary); /* Liseré vert */
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    gap: 20px;
    align-items: center;
    border: 1px solid #eee;
}

.social-icon {
    font-size: 2.5rem;
    background: #eefbf3;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0; /* Empêche l'icône de s'écraser sur mobile */
}

.social-content p {
    margin: 8px 0;
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.5;
}

.social-badge {
    display: inline-block;
    background: #27ae60;
    color: white;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.social-stars {
    color: #f1c40f; /* Jaune étoile */
    font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .social-proof-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .social-icon {
        margin-bottom: 10px;
    }
}