/* css/programme.css */

:root {
    /* Palette Officielle */
    --primary-green: #2E7D32;
    --primary-purple: #6A1B9A;
    --light-green: #4CAF50;
    --light-purple: #9C27B0;
    
    /* Text and Backgrounds */
    --dark-text: #2C3E50;
    --light-bg: #F5F7FA;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 15px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Navigation links — flex row on desktop */
.programme-page nav:not(.programme-nav) .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
}

/* ============================================
   HAMBURGER BUTTON
   ============================================ */

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(46, 125, 50, 0.2);
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    z-index: 300;
    position: relative;
}

.hamburger-btn:hover {
    background: rgba(46, 125, 50, 0.08);
    border-color: rgba(46, 125, 50, 0.4);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--primary-green);
    border-radius: 4px;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: center;
}

/* Hamburger → Croix quand ouvert */
.hamburger-btn.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.hamburger-btn.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger-btn.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ============================================
   OVERLAY (mobile menu background)
   ============================================ */

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 149;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.nav-overlay.is-active {
    opacity: 1;
}


/* ============================================
   HEADER / CONTEXT SECTION
   ============================================ */

.vision-context-header {
    padding: 8rem 0 4rem;
    background: var(--primary-purple);
    color: white;
    text-align: center;
}

.vision-context-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.vision-context-header .icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.vision-context-header h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: 1rem;
    color: white;
    font-weight: 800;
}

.vision-context-header p {
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ============================================
   PROGRAMME NAVIGATION (sticky)
   ============================================ */

.programme-nav {
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 1rem;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.programme-nav::-webkit-scrollbar {
    display: none;
}

.programme-nav-link {
    padding: 0.6rem 1.4rem;
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.programme-nav-link:hover,
.programme-nav-link.active {
    background-color: var(--primary-purple);
    color: white;
}

/* ============================================
   SECTIONS
   ============================================ */

.programme-section:nth-child(even) {
    background-color: var(--light-bg);
}

.programme-section {
    padding: 5rem 0;
    scroll-margin-top: 80px;
}

/* Section header — more breathing room */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.section-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    display: block;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

/* Section description text — KEY READABILITY IMPROVEMENT */
.section-header p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #5a6c7d;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.01em;
}

/* ============================================
   PROPOSAL CARDS
   ============================================ */

.proposal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2.5rem;
}

/* Ensure 4 items wrap into a 2x2 grid instead of 3x1 on medium-large screens */
@media (min-width: 769px) {
    .proposal-grid:has(> .proposal-card:nth-child(4):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }
}

.proposal-card {
    background: white;
    padding: 2.5rem 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 5px solid transparent;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.proposal-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.proposal-card.purple { border-color: var(--primary-purple); }
.proposal-card.green { border-color: var(--primary-green); }

/* Card icon — separate from title for visual hierarchy */
.card-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    display: block;
}

/* Card title — bigger and clearer */
.proposal-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Card content — MAIN READABILITY FIX */
.proposal-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #5d6d7e;
    letter-spacing: 0.01em;
}

.proposal-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.proposal-list li {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #5d6d7e;
    margin-bottom: 0.85rem;
    padding-left: 1.75rem;
    position: relative;
}

.proposal-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-purple);
    font-weight: 900;
}

.badge-habitants, .badge-reglementaire {
    display: inline-block;
    font-size: 1.1rem;
    margin-left: 0.5rem;
    cursor: help;
    transition: transform 0.2s ease;
}

.badge-habitants:hover, .badge-reglementaire:hover {
    transform: scale(1.2);
}

.section-legend {
    text-align: center;
    margin-top: 3.5rem;
    font-size: 0.95rem;
    color: #7f8c8d;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: inline-block;
    width: auto;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
}

.section-legend span {
    margin: 0 0.5rem;
}

/* ============================================
   THÉVENET SECTION
   ============================================ */

.thevenet-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: flex-start;
    margin-top: 2.5rem;
}

/* ============================================
   SECTION THÉVENET
   ============================================ */

.thevenet-layout-v2 {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 3.5rem;
}

.thevenet-visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 2rem;
}

.visual-item img {
    width: 100%;
    aspect-ratio: 8 / 10;
    object-fit: cover;
    object-position: top;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.visual-item img:hover {
    transform: scale(1.02);
}

.thevenet-text-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.9;
    font-size: 1.1rem;
    color: var(--dark-text);
}

.thevenet-text-content p {
    margin-bottom: 1.5rem;
}

.thevenet-visual img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.thevenet-visual img:hover {
    transform: scale(1.02);
}

#thevenet {
    background: linear-gradient(to right, #fdfbfb, #ebedee);
}

#thevenet .section-header p {
    text-align: left;
    line-height: 1.9;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    text-align: center;
    padding: 5rem 1.5rem;
    background: rgba(106, 27, 154, 0.05); /* Lighter purple equivalent */
    color: var(--text-primary);
}

.cta-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--primary-purple);
}

.cta-section p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   COUNTDOWN TIMER
   ============================================ */
.countdown-timer {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.time-block {
    padding: 0.75rem;
    min-width: 65px;
    text-align: center;
    background: rgba(106, 27, 154, 0.05);
    border: 1px solid rgba(106, 27, 154, 0.2);
    border-radius: 12px;
}

.time-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-purple);
}

.time-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.btn-cta {
    background: white;
    color: var(--primary-purple) !important;
    padding: 1.25rem 3rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    background: #f8f9fa;
}

/* ============================================
   QUOTE BLOCK
   ============================================ */

.quote-block {
    text-align: center;
    font-style: italic;
    padding: 3.5rem 2.5rem;
    background: #fff;
    border-radius: 20px;
    margin: 3rem 0;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.quote-block p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--dark-text);
}

.quote-block::before {
    content: '"';
    font-size: 5rem;
    position: absolute;
    top: -10px;
    left: 20px;
    color: var(--primary-purple);
    opacity: 0.1;
    font-family: serif;
}

/* ============================================
   MAP CAPTION
   ============================================ */

.map-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #95a5a6;
    margin-top: 1rem;
    font-style: italic;
}

/* ============================================
   NAVIGATION OVERRIDES FOR PROGRAMME PAGE
   ============================================ */

.programme-page .sticky-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 200;
}

.programme-page nav:not(.programme-nav) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 150;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(46, 125, 50, 0.1);
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* ============================================
   CAMPAIGN LINK BOX
   ============================================ */

.campaign-link-box {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(106, 27, 154, 0.04);
    border-left: 3px solid var(--primary-purple);
    border-radius: 0 12px 12px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.campaign-link-box a {
    color: var(--primary-purple);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.campaign-link-box a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.campaign-link-box .link-separator {
    color: var(--text-secondary);
    opacity: 0.4;
    margin: 0 0.15rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ============================================
   RESPONSIVE — TABLETTE + MOBILE (≤1024px)
   ============================================ */

@media (max-width: 1024px) {
    .programme-hero {
        padding: 11rem 1rem 4rem 1rem;
    }

    .quote-block.hero-quote {
        padding: 1.5rem 1.25rem;
        margin: 1.5rem auto 0;
    }

    .hero-quote p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }

    .programme-section {
        padding: 3.5rem 0;
    }

    .proposal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Keep single column for mobile only */
    @media (max-width: 768px) {
        .programme-section {
            padding: 3rem 0;
        }
        .proposal-grid {
            grid-template-columns: 1fr;
            gap: 1.25rem;
        }
        .proposal-grid:has(> .proposal-card:nth-child(4):last-child) {
            grid-template-columns: 1fr;
        }
        .thevenet-layout {
            gap: 2rem;
        }
        .thevenet-engagement-block {
            padding: 2rem 1.25rem;
            margin-top: 2.5rem;
        }
        .thevenet-visual-grid {
            grid-template-columns: 1fr;
        }
        .programme-nav {
            padding: 0.6rem 0.5rem;
            gap: 0.2rem;
        }
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.9rem);
    }
    
    .proposal-card {
        padding: 1.75rem 1.25rem 1.25rem;
    }

    .proposal-content {
        font-size: 1rem;
    }

    .programme-nav {
        padding: 0.75rem 1rem;
        justify-content: flex-start;
    }

    .programme-nav-link {
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
    }

    .countdown-timer {
        gap: 0.4rem;
    }

    .time-block {
        padding: 0.5rem;
        min-width: 50px;
    }

    .time-value {
        font-size: 1rem;
    }


    /* ---- HAMBURGER MENU ---- */

    /* Afficher le bouton hamburger */
    .hamburger-btn {
        display: flex;
    }

    /* Masquer les liens de nav par défaut sur mobile */
    .programme-page nav:not(.programme-nav) .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0.75rem;
        padding: 5.5rem 1.5rem 2rem;
        z-index: 200;
        box-shadow: 0 8px 30px rgba(0,0,0,0.15);
        border-bottom: 3px solid var(--primary-green);
        transform: translateY(-20px);
        opacity: 0;
        transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
    }

    /* Menu ouvert */
    .programme-page nav:not(.programme-nav) .nav-links.is-open {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }

    /* Afficher l'overlay */
    .nav-overlay.is-active {
        display: block;
    }

    /* Liens dans le menu mobile : pleine largeur, style card */
    .programme-page nav:not(.programme-nav) .nav-links .btn-primary.nav-item {
        width: 100%;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        border-radius: 14px;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    /* CTA section */
    .cta-section {
        padding: 3.5rem 1rem;
    }

    .btn-cta {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .quote-block {
        padding: 2.5rem 1.5rem;
    }

    .campaign-link-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-legend {
        transform: none;
        left: auto;
        position: relative;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}

/* ============================================
   REFACTORED INLINE STYLES
   ============================================ */

#banner-timer {
    font-weight: 800;
    margin-left: 8px;
    display: inline-flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: nowrap;
}

.hero-quote-cite {
    display: block; 
    margin-top: 1rem; 
    font-weight: bold; 
    color: var(--primary-purple);
}

.thevenet-engagement-block {
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.03) 0%, rgba(46, 125, 50, 0.03) 100%); 
    border-left: 4px solid var(--primary-purple); 
    padding: 2.5rem 3rem; 
    border-radius: 0 16px 16px 0; 
    margin-top: 4rem; 
    position: relative; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.thevenet-engagement-badge {
    position: absolute; 
    top: -14px; 
    left: 24px; 
    background: var(--primary-purple); 
    color: white; 
    padding: 4px 16px; 
    border-radius: 20px; 
    font-weight: 700; 
    font-size: 0.85rem; 
    letter-spacing: 1px; 
    text-transform: uppercase; 
    box-shadow: 0 4px 10px rgba(106, 27, 154, 0.3);
}

.thevenet-engagement-text-bold {
    font-size: 1.15rem; 
    line-height: 1.8; 
    color: var(--dark-text); 
    margin-bottom: 1.5rem;
}

.thevenet-engagement-text-sub {
    font-size: 1.1rem; 
    line-height: 1.8; 
    color: #5d6d7e; 
    margin-bottom: 0;
}

.pdf-download-container {
    text-align: center; 
    margin-top: 5rem; 
    margin-bottom: 2rem;
}

.btn-pdf-download {
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.5rem; 
    font-size: 1.125rem; 
    padding: 1rem 2.5rem; 
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.cta-header-title {
    color: var(--primary-purple);
}

.cta-header-desc {
    margin-bottom: 0; 
    color: var(--text-secondary);
}

.cta-timer-card {
    margin: 2.5rem auto; 
    background: white; 
    padding: 2rem 1.5rem; 
    border-radius: 20px; 
    box-shadow: var(--shadow-sm); 
    border: 1px solid rgba(106, 27, 154, 0.1); 
    max-width: 500px;
}

.cta-timer-title {
    font-weight: 800; 
    font-size: 1.3rem; 
    margin-bottom: 0.25rem; 
    color: var(--text-primary);
}

.cta-timer-subtitle {
    font-size: 1.1rem; 
    margin-bottom: 0; 
    color: var(--text-secondary);
}

.footer-logo-container {
    margin-bottom: 1.5rem;
}

.footer-logo-img {
    height: 60px; 
    opacity: 0.8;
}

.footer-credits {
    margin-top: 1rem; 
    font-size: 0.9rem;
}

.footer-link {
    margin: 0 10px;
}

/* Badge Icon styling for the icondiscussion png */
.badge-icon {
    height: 1.25em;
    vertical-align: middle;
    display: inline-block;
    margin-top: -0.2em;
}

/* Layout overrides for Thevenet section */
.thevenet-container-alt {
    max-width: 1100px;
    margin: 0 auto 2rem auto;
}

.proposal-grid-mt-2 {
    margin-top: 2rem;
}
