/* RESET & BASE */
:root {
    --primary: #27ae60; /* Vert Jardin */
    --primary-dark: #219150;
    --secondary: #2c3e50; /* Gris foncé pro */
    --bg-light: #f8f9fa;
    --text: #333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}
body { font-family: 'Segoe UI', Roboto, Helvetica, sans-serif; color: var(--text); line-height: 1.6; margin: 0; background: var(--bg-light); }
a { text-decoration: none; color: inherit; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
.main-header { background: var(--white); border-bottom: 1px solid #ddd; padding: 15px 0; position: sticky; top:0; z-index: 100; }
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.2rem; font-weight: bold; color: var(--secondary); }
.cta-header { background: var(--primary); color: white; padding: 8px 15px; border-radius: 4px; font-weight: 600; font-size: 0.9rem; }

/* HERO HOME */
.hero-home { background: var(--secondary); color: white; padding: 60px 0; text-align: center; }
.hero-home h1 { margin: 0 0 10px; }
.btn-primary { display: inline-block; background: var(--primary); color: white; padding: 12px 25px; border-radius: 5px; font-weight: bold; margin-top: 20px; }

/* LAYOUT VILLE */
.layout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-top: 30px; }
@media (max-width: 768px) { .layout-grid { grid-template-columns: 1fr; } }

/* TYPO & BADGES */
h1 { color: var(--secondary); margin-bottom: 10px; font-size: 1.8rem; }
.badge-dispo { display: inline-block; background: #e8f5e9; color: var(--primary-dark); padding: 5px 10px; border-radius: 4px; font-size: 0.9rem; font-weight: 600; margin-bottom: 20px; }
.breadcrumbs { list-style: none; padding: 0; font-size: 0.85rem; color: #777; display: flex; gap: 8px; }
.breadcrumbs a { text-decoration: underline; }

/* BOXES */
.features-box { background: white; padding: 20px; border-radius: 8px; border-left: 4px solid var(--primary); margin: 20px 0; box-shadow: var(--shadow); }
.features-box ul { padding-left: 20px; }
.features-box li { margin-bottom: 8px; }

.calc-box { background: #eef2f5; padding: 20px; border-radius: 8px; margin: 20px 0; }
.calc-input-group { margin: 10px 0; }
.calc-input-group input { padding: 8px; width: 60px; border: 1px solid #ccc; border-radius: 4px; }
.btn-calc { background: var(--secondary); color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; }
.hidden { display: none; }
#resultat { margin-top: 15px; font-size: 0.95rem; color: var(--primary-dark); background: white; padding: 10px; border-radius: 4px; }

.alert-box { background: #fff3cd; color: #856404; padding: 15px; border-radius: 5px; font-size: 0.9rem; border: 1px solid #ffeeba; }

/* FORMULAIRE STICKY */
.lead-card { background: white; padding: 25px; border-radius: 8px; box-shadow: var(--shadow); position: sticky; top: 80px; border-top: 5px solid var(--primary); }
.lead-header h3 { margin: 0; color: var(--secondary); }
.lead-header p { font-size: 0.85rem; color: #666; margin-top: 5px; }
form label { display: block; margin: 15px 0 5px; font-weight: 600; font-size: 0.9rem; }
form input, form select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.btn-submit { width: 100%; background: var(--primary); color: white; border: none; padding: 15px; font-size: 1rem; font-weight: bold; border-radius: 4px; margin-top: 20px; cursor: pointer; transition: background 0.3s; }
.btn-submit:hover { background: var(--primary-dark); }
.rgpd { font-size: 0.7rem; color: #999; text-align: center; margin-top: 10px; }

/* LISTINGS */
.grid-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dept-card { background: white; padding: 10px; border: 1px solid #eee; border-radius: 4px; display: flex; gap: 10px; align-items: center; }
.d-code { font-weight: bold; color: var(--primary); background: #e8f5e9; padding: 2px 6px; border-radius: 3px; font-size: 0.8rem; }
.grid-villes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.grid-villes a { display: block; padding: 5px 0; color: #555; }
.grid-villes a:hover { color: var(--primary); }

.tags-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.tags-cloud a { background: #e1e8ed; padding: 5px 10px; border-radius: 20px; font-size: 0.85rem; color: var(--secondary); }
.tags-cloud a:hover { background: var(--secondary); color: white; }

/* FOOTER */
.main-footer { text-align: center; padding: 40px 0; color: #777; font-size: 0.9rem; margin-top: 50px; border-top: 1px solid #eee; }

/* BARRE DE RECHERCHE */
.search-container { position: relative; max-width: 500px; margin: 20px auto; }
#citySearch {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    outline: none;
}
.results-box {
    position: absolute;
    top: 55px;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none; /* Caché par défaut */
    text-align: left;
}
.result-item {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    color: #333;
    display: block; /* Pour que le lien prenne toute la largeur */
}
.result-item:hover { background-color: #f1f1f1; color: #27ae60; }
.result-item strong { color: #27ae60; }
.result-item small { color: #999; float: right; }

/* DESIGN CARTE GOOGLE */
.map-box {
    margin: 30px 0;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.map-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--secondary);
}

.map-responsive {
    overflow: hidden;
    border-radius: 6px;
    background: #eee; /* Couleur de fond pendant le chargement */
}

.map-caption {
    font-size: 0.85rem;
    color: #777;
    margin-top: 10px;
    text-align: center;
    font-style: italic;
}

.grid-villes a {
    display: flex;
    flex-direction: column; /* Empile le nom et le mot clé */
    padding: 10px;
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    text-align: center;
    transition: 0.2s;
}
.grid-villes a:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.kw-tag {
    font-size: 0.75rem;
    color: #999;
    font-weight: normal;
    margin-top: 2px;
}

h2 {
    color: var(--secondary);
    font-size: 1.4rem; /* Un peu plus petit que le H1 */
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee; /* Petit trait de séparation sympa */
    padding-bottom: 10px;
    display: block;
}

h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-top: 20px;
}