/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Identité Visuelle */
    --primary: #2e7d32;       /* Vert Forêt (Logo) */
    --primary-light: #e8f5e9; /* Fond vert très clair */
    --primary-dark: #1b5e20;  /* Vert foncé (Hover) */
    
    --secondary: #e67e22;     /* Orange (Action/CTA) */
    --secondary-dark: #d35400;
    
    --text-main: #333333;
    --text-light: #666666;
    
    --bg-body: #f4f6f8;
    --bg-card: #ffffff;
    
    --border: #e0e0e0;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    background: var(--bg-body);
    color: var(--text-main);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.main-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Menu Principal */
.top-menu > ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.top-menu > ul > li { position: relative; }

.top-menu a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 0 15px;
    height: 70px;
    display: flex;
    align-items: center;
    transition: color 0.2s, background 0.2s;
}

.top-menu a:hover {
    color: var(--primary);
    background-color: #f9f9f9;
    text-decoration: none;
}

/* Dropdown */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 240px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    border-top: 3px solid var(--primary);
    padding: 10px 0;
    flex-direction: column;
}

.dropdown li { width: 100%; display: block; }

.dropdown a {
    height: auto;
    padding: 10px 20px;
    display: block;
    font-size: 0.95rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown a:hover {
    background: var(--bg-body);
    color: var(--primary);
    padding-left: 25px;
}

.has-children:hover .dropdown { display: flex; }

/* =========================================
   3. STRUCTURE & CARDS
   ========================================= */
h1 { font-size: 1.8rem; margin-bottom: 10px; color: #2c3e50; }
.intro { font-size: 1.1rem; color: var(--text-light); margin-bottom: 30px; }

.card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.decheterie-box h2 { margin-top: 0; color: var(--primary); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* Horaires */
.horaires-table { width: 100%; border-collapse: collapse; }
.horaires-table td { padding: 6px 0; border-bottom: 1px solid #eee; }
.horaires-table tr:last-child td { border-bottom: none; }

/* Services (Tags) */
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 5px;
}
.waste-icon { font-size: 1.2em; margin-right: 5px; }

/* Avis */
.rating { margin-top: 10px; font-weight: bold; }
.avis-highlight {
    background: #fffbf0;
    padding: 15px;
    border-left: 4px solid #ffb300;
    margin-top: 20px;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}
.avis-highlight h3 { font-size: 1rem; margin-top: 0; font-style: normal; }

/* =========================================
   4. MAPS & BUTTONS
   ========================================= */
.btn-map {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: 500;
}
.btn-map:hover { background: #dcedc8; text-decoration: none; }

.map-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
    border-radius: var(--radius);
    background: #eee;
}
.map-responsive iframe {
    left: 0; top: 0; height: 100%; width: 100%; position: absolute;
}

/* =========================================
   5. LEAD GEN (Devis Benne)
   ========================================= */
.cta-benne { /* Fallback simple */
    background: #2c3e50; color: #fff; padding: 25px; border-radius: var(--radius); text-align: center;
}
.btn-cta {
    display: inline-block; background: var(--secondary); color: #fff;
    padding: 10px 20px; border-radius: 5px; text-decoration: none;
    font-weight: bold; margin-top: 10px;
}

/* Formulaire avancé */
.lead-section { margin: 40px 0; }
.lead-card {
    background: #2c3e50;
    color: #fff;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.lead-header h3 { margin: 0 0 5px 0; color: #fff; }
.lead-header p { margin: 0 0 20px 0; color: #bdc3c7; font-size: 0.9rem; }

.lead-card label { display: block; font-size: 0.9rem; margin-bottom: 5px; color: #ecf0f1; font-weight: bold; }
.lead-card input, .lead-card select {
    width: 100%; padding: 12px; margin-bottom: 15px; border: none; border-radius: 5px;
    font-size: 1rem; box-sizing: border-box; font-family: inherit;
}
.lead-card input:focus, .lead-card select:focus { outline: 2px solid var(--secondary); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.btn-submit {
    width: 100%; background: var(--secondary); color: #fff; border: none; padding: 15px;
    font-size: 1.1rem; font-weight: bold; border-radius: 5px; cursor: pointer;
    transition: background 0.2s;
}
.btn-submit:hover { background: var(--secondary-dark); }
.btn-submit:disabled { background: #95a5a6; cursor: not-allowed; }

.rgpd { text-align: center; font-size: 0.75rem; color: #95a5a6; margin-top: 15px; }
.success-message { text-align: center; padding: 30px; color: #2ecc71; }

/* =========================================
   6. ALTERNATIVES & MAILLAGE
   ========================================= */
.badge-best {
    background: var(--primary-light); color: var(--primary);
    display: inline-block; padding: 4px 10px; border-radius: 12px;
    font-weight: bold; font-size: 0.8rem; margin-bottom: 15px;
    border: 1px solid #c8e6c9;
}
.main-box { border: 2px solid var(--primary); }

.section-title {
    margin-top: 50px; margin-bottom: 25px;
    border-bottom: 2px solid #eee; padding-bottom: 10px; color: #333;
}

.grid-others { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.alt-card {
    padding: 20px; border: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); margin-bottom: 0;
    display: flex; flex-direction: column; justify-content: space-between;
}
.alt-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 5px; }
.alt-card h4 { margin: 0; font-size: 1.1rem; color: #2c3e50; width: 80%; }

.dist-badge { background: #eee; color: #555; font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }

.status-text { font-size: 0.9rem; font-weight: bold; margin: 5px 0 10px 0; }
.status-text.open { color: #27ae60; }
.status-text.closed { color: #e74c3c; }

.mini-services { margin: 10px 0; font-size: 0.85rem; color: #666; background: #f9f9f9; padding: 8px; border-radius: 6px; }
.mini-services small { display: block; margin-bottom: 3px; font-weight: bold; color: #888; }

.alt-actions { margin-top: 15px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f0f0f0; padding-top: 10px; }

.btn-small { text-decoration: none; color: #555; background: #f0f0f0; padding: 5px 10px; border-radius: 4px; font-size: 0.8rem; transition: 0.2s; }
.btn-small:hover { background: #ddd; text-decoration: none; }
.btn-route { background: var(--primary); color: white; font-weight: bold; }
.btn-route:hover { background: var(--primary-dark); }

details { margin-top: 0; color: var(--primary); font-size: 0.9rem; cursor: pointer; }
summary { outline: none; }
.horaires-mini { margin-top: 10px; font-size: 0.85rem; color: #444; }
.horaires-mini table { width: 100%; }
.horaires-mini td { padding: 2px 0; border: none; }

/* Maillage interne */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.city-tag {
    background-color: #fff; border: 1px solid var(--border); color: #555;
    padding: 8px 15px; border-radius: 20px; text-decoration: none;
    font-size: 0.9rem; transition: all 0.2s ease;
}
.city-tag:hover {
    background-color: var(--primary-light); border-color: var(--primary);
    color: var(--primary); transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* =========================================
   7. PAGES DÉPARTEMENT & INDEX
   ========================================= */
.top-dept-block {
    background: #f8f9fa; padding: 25px; border-radius: 12px; margin: 30px 0; border: 1px solid #e9ecef;
}
.top-dept-block h2 { margin-top: 0; font-size: 1.4rem; color: #2c3e50; margin-bottom: 20px; }

.grid-top-villes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }

.card-top {
    background: #fff; padding: 15px; border-radius: 8px; text-decoration: none; color: #333;
    border: 1px solid #ddd; text-align: center; transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.card-top:hover { transform: translateY(-3px); border-color: var(--primary); color: var(--primary); box-shadow: 0 4px 8px rgba(0,0,0,0.08); }
.card-top strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.card-top small { color: #777; font-size: 0.8rem; }

/* Liste standard (A-Z) */
.grid-villes-dept, .city-columns { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 20px; 
}
.grid-villes-dept a, .city-columns a { 
    background: #fff; padding: 8px 12px; font-size: 0.85rem; text-decoration: none; color: #555;
    border: 1px solid #eee; border-radius: 4px; display: block;
}
.grid-villes-dept a:hover, .city-columns a:hover { 
    border-color: var(--primary); color: var(--primary); background: #fcfcfc;
}

/* =========================================
   8. RESPONSIVE & PRINT
   ========================================= */
@media (max-width: 768px) {
    .nav-flex { flex-direction: column; height: auto; padding: 15px 0; }
    .top-menu > ul { flex-wrap: wrap; justify-content: center; }
    .top-menu a { height: 40px; }
    .dropdown { position: static; box-shadow: none; border: 1px solid #eee; display: none; }
    .has-children:hover .dropdown { display: flex; }
    
    .grid-2, .grid-others, .form-grid { grid-template-columns: 1fr; }
}

@media print {
    header, footer, .cta-benne, .lead-section, .btn-map, .alt-actions, .near-places, .map-section { display: none !important; }
    body { background: #fff; color: #000; }
    .card, .alt-card { box-shadow: none; border: 1px solid #000; break-inside: avoid; }
    h1 { font-size: 1.5rem; }
    a { text-decoration: none; color: #000; }
}

/* =========================================
   9. FOOTER GLOBAL
   ========================================= */
.main-footer {
    background-color: #2c3e50; /* Bleu nuit pro */
    color: #ecf0f1;
    padding: 60px 0 20px 0;
    margin-top: 60px;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* La 1ère colonne est plus large */
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: #2ecc71; /* Vert clair */
    margin-bottom: 15px;
    display: inline-block;
}

.footer-desc {
    color: #bdc3c7;
    line-height: 1.6;
    max-width: 350px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e67e22; /* Souligné orange */
    display: inline-block;
    padding-bottom: 5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr; /* Une seule colonne */
        gap: 30px;
        text-align: center;
    }
    .footer-desc { max-width: 100%; }
}

/* --- ARTICLE SEO HOME --- */
.article-content {
    background: #fff;
    padding: 40px 30px;
    border-radius: var(--radius);
    margin-top: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    color: #444;
}

.article-content h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-top: 0;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.article-content h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-top: 35px;
    margin-bottom: 15px;
}

.article-content h4 {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-top: 25px;
    margin-bottom: 10px;
}

.article-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.article-content ul {
    background: #f9f9f9;
    padding: 20px 20px 20px 40px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.article-content li {
    margin-bottom: 10px;
}

/* Tableau */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.article-content th, .article-content td {
    border: 1px solid #eee;
    padding: 12px;
    text-align: left;
}

.article-content th {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-weight: bold;
}

.article-content tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* FAQ Block */
.faq-block {
    margin-top: 20px;
}
.faq-block h4 {
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}
.faq-block h4::before {
    content: "❓";
    margin-right: 10px;
    font-size: 0.9rem;
}

.mobile-sticky-bar {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: white; border-top: 1px solid #ddd;
    display: flex; z-index: 1000; box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}
.sticky-btn {
    flex: 1; text-align: center; padding: 15px;
    font-weight: bold; text-decoration: none; font-size: 1rem;
}
.btn-tel { background: #f9f9f9; color: #333; }
.btn-gps { background: #2e7d32; color: white; }
/* On cache ça sur ordinateur */
@media (min-width: 768px) { .mobile-sticky-bar { display: none; } }
/* On ajoute un padding au body pour pas que le footer soit caché */
@media (max-width: 767px) { body { padding-bottom: 60px; } }

.faq-list details { background: #fff; margin-bottom: 10px; border: 1px solid #eee; border-radius: 4px; padding: 15px; }
.faq-list summary { font-weight: bold; cursor: pointer; list-style: none; }
.faq-answer { margin-top: 10px; color: #555; line-height: 1.5; }
.report-error {
    margin-top: 15px;
    font-size: 0.8rem;
    text-align: right;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}
.report-error a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.report-error a:hover {
    color: #d32f2f; /* Rouge au survol */
    text-decoration: underline;
}

.week-viz-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    background: #fdfdfd;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #eee;
}
.viz-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    font-weight: bold;
}
.week-viz {
    display: flex;
    gap: 4px;
    flex: 1;
}
.day-dot {
    flex: 1;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: help; /* Petit curseur ? au survol */
}