/* ============================================================
   components.css
   Composants communs absents de style.css.
   À charger entre style.css et le CSS de la page.
   (À terme : coller ce fichier à la fin de style.css.)
   ============================================================ */

/* ============================================
   TOKENS
============================================ */
:root {
    --forest: #0b6b44;
    --forest-dark: #084d31;
    --forest-soft: #e7f3ec;
    --gray-soft: #f8fafc;
    --gray-text: #5a6b62;
}

a {
    text-decoration: none;
}

/* ============================================
   HERO (surcharge de l'overlay et du fond de style.css)
============================================ */
.hero {
    background-color: var(--ink);
    background-image: none;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(8, 30, 20, 0.85) 0%,
        rgba(8, 30, 20, 0.55) 60%,
        rgba(8, 30, 20, 0.30) 100%
    );
}

/* ============================================
   RECHERCHE (le style vient de style.css)
============================================ */
.search-widget-wrap {
    max-width: 1200px;
    margin: 0 auto 8px;
    padding: 0 20px;
}

.search-widget-wrap .search {
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   NEWSLETTER (bloc identique à l'index)
============================================ */
.newsletter-form {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 440px;
    padding: 6px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    color: #0f172a;
}

.newsletter-form input[type="email"]::placeholder {
    color: #94a3b8;
}

.newsletter-form .btn-newsletter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    border-radius: 8px;
    outline: none;
    background: #0b6b44;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease;
}

.newsletter-form .btn-newsletter:hover {
    background: #064e3b;
    transform: translateY(-1px);
}

/* ============================================
   BANDEAU COOKIES
============================================ */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    width: 100%;
    padding: 1.25rem 1rem;
    background: var(--ink);
    color: #ffffff;
    font-size: 0.92rem;
    text-align: center;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.35);
}

#cookie-banner[hidden] {
    display: none;
}

#cookie-banner p {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.6;
    color: #f1f5f9;
    text-align: center;
}

#cookie-banner a {
    font-weight: 600;
    color: #7ee2b8;
}

#cookie-banner a:hover {
    color: #ffffff;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cookie-buttons button {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--forest);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.cookie-buttons button:hover {
    background: var(--forest-dark);
    transform: translateY(-1px);
}

.cookie-buttons button#cookie-refuse {
    background: rgba(255, 255, 255, 0.12);
}

.cookie-buttons button#cookie-refuse:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ============================================
   LIGHTBOX
============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 30, 20, 0.92);
    cursor: zoom-out;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 10000;
    border: none;
    background: none;
    color: #ffffff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.15);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    max-width: 80%;
    margin: 0;
    padding: 12px 24px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.50);
    color: #f1f5f9;
    font-size: 1rem;
    text-align: center;
    transform: translateX(-50%);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* ============================================
   NAVIGATION THÉMATIQUE — MARQUEE
============================================ */
.dark-marquee-section {
    position: relative;
    padding: 4.5rem 0 5rem 0;
    overflow: hidden;
    background: var(--cream);
}

.dark-marquee-header {
    max-width: 820px;
    margin: 0 auto 3rem auto;
    padding: 0 1.5rem;
    text-align: center;
}

.dark-marquee-section .dark-marquee-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.8rem;
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--forest);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.dark-marquee-section .dark-marquee-title {
    margin: 0 0 0.8rem 0;
    font-family: "Fraunces", "Georgia", serif;
    font-size: 2.3rem;
    letter-spacing: -0.5px;
    text-align: center;
    color: var(--forest-dark);
}

.dark-marquee-section .dark-marquee-desc {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.6;
    text-align: center;
    color: var(--gray-text);
}

.marquee-container {
    position: relative;
    width: 100%;
    padding: 10px 0 20px 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: continuousScroll 45s linear infinite;
    will-change: transform;
}

.marquee-track:hover {
    animation-play-state: paused;
}

/* -12px = moitié du gap, pour une boucle sans saut */
@keyframes continuousScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 12px)); }
}

.dark-nav-card {
    display: flex;
    flex: 0 0 320px;
    flex-direction: column;
    justify-content: space-between;
    width: 320px;
    padding: 1.8rem;
    border-radius: 18px;
    background: var(--ink);
    box-shadow: var(--shadow-md);
    white-space: normal;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.dark-nav-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(11, 107, 68, 0.25);
}

.dark-marquee-section .dark-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
}

.dark-marquee-section .dark-card-h3 {
    margin: 0 0 0.8rem 0;
    font-family: "Fraunces", "Georgia", serif;
    font-size: 1.25rem;
    line-height: 1.35;
    color: #ffffff;
}

.dark-marquee-section .dark-card-p {
    margin: 0 0 1.2rem 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.dark-marquee-section .dark-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    transition: gap 0.2s ease;
}

.dark-marquee-section .dark-card-link:hover {
    gap: 12px;
}

/* ============================================
   RESPONSIVE — 3 BREAKPOINTS
============================================ */
@media (max-width: 768px) {
    .search-widget-wrap {
        padding: 0 16px;
    }

    .lightbox-caption {
        bottom: 24px;
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .dark-marquee-section {
        padding: 3.5rem 0 4rem 0;
    }

    .dark-marquee-section .dark-marquee-title {
        font-size: 1.8rem;
    }

    .dark-nav-card {
        flex: 0 0 280px;
        width: 280px;
        padding: 1.4rem;
    }
}

@media (max-width: 600px) {
    .newsletter-form {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .newsletter-form input[type="email"] {
        padding: 12px 14px;
        border-radius: 8px;
    }

    .newsletter-form .btn-newsletter {
        justify-content: center;
        width: 100%;
        border-radius: 8px;
    }

    #cookie-banner {
        padding: 1.1rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .search-widget-wrap {
        margin: 0 auto 4px;
        padding: 0 12px;
    }

    .lightbox-close {
        top: 14px;
        right: 16px;
        font-size: 30px;
    }

    .lightbox-caption {
        bottom: 16px;
        max-width: 92%;
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .dark-marquee-section {
        padding: 3rem 0 3.5rem 0;
    }

    .dark-marquee-section .dark-marquee-title {
        font-size: 1.5rem;
    }

    .dark-marquee-section .dark-marquee-desc {
        font-size: 0.9rem;
    }

    .dark-nav-card {
        flex: 0 0 240px;
        width: 240px;
        padding: 1.2rem;
    }

    .dark-marquee-section .dark-card-h3 {
        font-size: 1.1rem;
    }

    .dark-marquee-section .dark-card-p {
        font-size: 0.85rem;
    }
}