/* ==========================================================================
   ZONES D'INTERVENTION - Stylesheet
   Styles specifiques a la page zones d'intervention
   ========================================================================== */

/* ==========================================================================
   1. Zones Hero
   ========================================================================== */
.zones-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.zones-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.zones-hero::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.zones-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

.zones-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   2. Zones Stats (hero-stats / stat-item)
   ========================================================================== */
.zones-stats,
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    margin-top: 10px;
}

.zones-stat,
.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px 30px;
    min-width: 130px;
}

.zones-stat .stat-number,
.stat-item .stat-number {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.zones-stat .stat-label,
.stat-item .stat-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 3px;
}

/* ==========================================================================
   3. Cantons Section Wrapper
   ========================================================================== */
.cantons-section {
    padding: 60px 0;
}

.cantons-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
}

/* ==========================================================================
   4. Canton Card / Canton Section
   ========================================================================== */
.canton-section,
.canton-card {
    background: var(--white);
    border-radius: 12px;
    padding: 35px 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border-left: 5px solid var(--primary-color);
    transition: box-shadow 0.3s ease;
}

.canton-section:hover,
.canton-card:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.canton-section:nth-child(2n),
.canton-card:nth-child(even) {
    border-left-color: var(--secondary-color);
}

.canton-section:nth-child(3n),
.canton-card:nth-child(3n) {
    border-left-color: var(--accent-color);
}

.canton-section:nth-child(4n),
.canton-card:nth-child(4n) {
    border-left-color: var(--success-color);
}

/* ==========================================================================
   5. Canton Header
   ========================================================================== */
.canton-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.canton-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    margin-bottom: 0;
    color: var(--dark-color);
}

.canton-header h2::after {
    display: none;
}

.canton-header .commune-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--light-color);
    color: var(--dark-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Canton h3 (used in zones-intervention.html) */
.canton-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.canton-card h3::after {
    display: none;
}

.canton-count {
    display: inline-flex;
    align-items: center;
    background: var(--light-color);
    color: var(--dark-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==========================================================================
   6. Communes Grid
   ========================================================================== */
.communes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

/* ==========================================================================
   7. Commune Card (wrapped version)
   ========================================================================== */
.commune-card {
    background: var(--light-color);
    border-radius: 8px;
    padding: 14px 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.commune-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    border-color: rgba(192, 57, 43, 0.15);
}

.commune-card a {
    display: block;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.commune-card a:hover {
    color: var(--primary-color);
}

.commune-card .commune-cp {
    display: block;
    font-size: 0.8rem;
    color: #888;
    font-weight: 400;
    margin-top: 3px;
}

/* --- Featured commune card --- */
.commune-card.featured {
    background: linear-gradient(135deg, var(--dark-color), #34495e);
    color: var(--white);
    border-color: transparent;
}

.commune-card.featured a {
    color: var(--white);
}

.commune-card.featured a:hover {
    color: var(--accent-color);
}

.commune-card.featured .commune-cp {
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   7b. Commune Link (direct <a> version - zones-intervention.html)
   ========================================================================== */
a.commune-link {
    display: block;
    background: var(--light-color);
    border-radius: 8px;
    padding: 14px 18px;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    border: 1px solid transparent;
}

a.commune-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    border-color: rgba(192, 57, 43, 0.15);
    color: var(--primary-color);
}

/* ==========================================================================
   8. Zone Services / Services Zone
   ========================================================================== */
.zone-services,
.services-zone {
    padding: 60px 0;
    background: var(--light-color);
}

.zone-services .section-title,
.services-zone h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.zone-service-card,
.service-zone-card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zone-service-card:hover,
.service-zone-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.zone-service-card .service-icon,
.service-zone-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}

.zone-service-card h3,
.service-zone-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.zone-service-card p,
.service-zone-card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

/* ==========================================================================
   9. Zone Guarantees / Garanties Section
   ========================================================================== */
.zone-guarantees,
.garanties-section {
    padding: 60px 0;
    background: var(--white);
}

.garanties-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.zone-guarantees .guarantees-grid,
.garanties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 2rem;
}

.guarantee-item,
.garantie-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: var(--light-color);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.guarantee-item:hover,
.garantie-item:hover {
    transform: translateY(-2px);
}

.guarantee-item .guarantee-icon,
.garantie-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.guarantee-item h4,
.garantie-item h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.guarantee-item p,
.garantie-item p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0;
}

/* ==========================================================================
   10. CTA Section
   ========================================================================== */
.cta-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.cta-buttons .btn:hover {
    transform: translateY(-2px);
}

.cta-buttons .btn-primary {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-buttons .btn-primary:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.cta-buttons .btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-buttons .btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* ==========================================================================
   11. Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .zones-hero {
        padding: 60px 0 45px;
    }

    .zones-hero h1 {
        font-size: 2rem;
    }

    .zones-stats,
    .hero-stats {
        gap: 20px;
    }

    .canton-section,
    .canton-card {
        padding: 25px 20px;
    }

    .cta-section h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .zones-hero h1 {
        font-size: 1.7rem;
    }

    .zones-stats,
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .zones-stat,
    .stat-item {
        width: 100%;
        max-width: 280px;
    }

    .canton-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .communes-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 10px;
    }

    .zone-guarantees .guarantees-grid,
    .garanties-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .zones-hero h1 {
        font-size: 1.4rem;
    }

    .communes-grid {
        grid-template-columns: 1fr;
    }

    .canton-section,
    .canton-card {
        padding: 20px 15px;
        border-left-width: 4px;
    }

    .canton-header h2,
    .canton-card h3 {
        font-size: 1.2rem;
    }

    .commune-card,
    a.commune-link {
        padding: 12px 14px;
    }
}
