/* ========================================
   VARIABLES GLOBALES DEFI — partagées entre
   navbar.css, footer.css et les CSS de pages.
   Définies ici une seule fois sur :root.
   ======================================== */
:root {
    --defi-sand:      #F5EFE4;
    --defi-cream:     #FBF7F1;
    --defi-terra:     #C05B3A;
    --defi-terra-d:   #8B3E25;
    --defi-terra-l:   #E07C5A;
    --defi-slate:     #2E4A5F;
    --defi-slate-l:   #4A7090;
    --defi-slate-ll:  #E8EFF5;
    --defi-warm-gray: #7A6F65;
    --defi-text:      #2A2218;
    --defi-text-s:    #6B5F55;
    --defi-white:     #FFFFFF;
    --defi-border:    #E8DDD0;
    --defi-radius:    12px;
    --defi-font-head: 'Lora', Georgia, serif;
    --defi-font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    background-color: var(--defi-white);
    border-bottom: 1px solid var(--defi-border);
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 8px rgba(42, 34, 24, 0.06);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar-logo img {
    height: 44px;
    width: auto;
}

/* Hamburger (caché desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--defi-slate);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Contenu nav */
.navbar-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.navbar-menu a {
    text-decoration: none;
    color: var(--defi-text-s);
    font-family: var(--defi-font-body);
    font-weight: 400;
    font-size: 15px;
    padding: 7px 13px;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s;
    display: block;
}

.navbar-menu a:hover {
    background-color: var(--defi-sand);
    color: var(--defi-text);
}

/* Dropdown */
.navbar-menu .dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex !important;
    align-items: center;
    gap: 4px;
}

.dropdown-arrow {
    font-size: 11px;
    opacity: 0.6;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--defi-white);
    border: 1px solid var(--defi-border);
    border-radius: var(--defi-radius);
    box-shadow: 0 8px 24px rgba(42, 34, 24, 0.10);
    min-width: 260px;
    padding: 8px 0;
    z-index: 300;
    list-style: none;
    /* Pont invisible : comble le gap entre le lien et le menu */
    margin-top: 0;
}

/* Dropdown ouvert via JS (.active) — desktop et mobile */
.dropdown-menu.active {
    display: block;
    margin-top: 0;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 9px 18px;
    color: var(--defi-text-s) !important;
    font-size: 14px !important;
    border-radius: 0 !important;
}

.dropdown-menu a:hover {
    background-color: var(--defi-sand) !important;
    color: var(--defi-text) !important;
}

/* Séparateur entre lien nav et bouton CTA */
.navbar-content .navbar-menu {
    margin-right: 16px;
}

/* Bouton Devenir bénévole */
.btn-benevole {
    background-color: var(--defi-terra);
    color: var(--defi-white) !important;
    padding: 9px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-family: var(--defi-font-body);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.15s;
    flex-shrink: 0;
}

.btn-benevole:hover {
    background-color: var(--defi-terra-d);
}

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

@media (max-width: 1024px) {
    .navbar {
        padding: 0 24px;
        position: relative; /* On quitte sticky pour mobile : le menu sort du flux */
    }

    .hamburger {
        display: flex;
    }

    .navbar-content {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background-color: var(--defi-white);
        border-bottom: 1px solid var(--defi-border);
        box-shadow: 0 8px 24px rgba(42, 34, 24, 0.10);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 20px;
        z-index: 199;
    }

    .navbar-content.active {
        display: flex;
    }

    .navbar-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin-right: 0;
    }

    .navbar-menu li {
        width: 100%;
        border-bottom: 1px solid var(--defi-border);
    }

    .navbar-menu li:last-child {
        border-bottom: none;
    }

    .navbar-menu a {
        padding: 13px 8px;
        width: 100%;
        border-radius: 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 0 16px;
        background-color: var(--defi-sand);
    }

    .dropdown-menu.active {
        display: block;
    }

    .btn-benevole {
        display: block;
        text-align: center;
        margin-top: 12px;
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }

    .navbar-logo img {
        height: 36px;
    }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background-color: #1D2E3B;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--defi-font-body);
}

/* Bloc supérieur : 3 colonnes */
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 56px 40px 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Colonne brand */
.footer-brand {}

.footer-logo-link {
    display: inline-block;
    margin-bottom: 14px;
}

.footer-logo-link img {
    height: 52px;
    width: auto;
    /* Filtre pour rendre le logo blanc sur fond sombre */
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.footer-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin-bottom: 24px;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.footer-icon {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.6;
}

.footer-contact-item p,
.footer-contact-item a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-contact-item a:hover {
    color: rgba(255, 255, 255, 0.95);
}

.footer-contact-item div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Colonnes navigation */
.footer-col h4 {
    font-family: var(--defi-font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 18px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-nav a:hover {
    color: rgba(255, 255, 255, 0.95);
}

/* Bande copyright */
.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.7);
}

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

@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
        padding: 48px 32px 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 20px 32px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-bottom {
        padding: 16px 20px;
    }
}

/* ========================================
   RESET & BASE (commun à toutes les pages)
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--defi-font-body);
    background-color: var(--defi-cream);
    color: var(--defi-text);
    line-height: 1.65;
    font-size: 16px;
}

/* ========================================
   PAGE-HEADER (commun : actions, benevolat, contact, histoire)
   ======================================== */
.page-header {
    background-color: var(--defi-slate);
    color: var(--defi-white);
    padding: 56px 40px 0;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 80% at 90% 50%, rgba(192,91,58,.14) 0%, transparent 65%);
    pointer-events: none;
}
.page-header-inner {
    max-width: 1400px; margin: 0 auto;
    position: relative; z-index: 1;
    padding-bottom: 40px;
}
.page-header-label { font-size:11px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--defi-terra-l); margin-bottom:12px; }
.page-header h1    { font-family:var(--defi-font-head); font-size:36px; font-weight:600; color:var(--defi-white); margin-bottom:12px; line-height:1.25; }
.page-header p     { font-size:16px; font-weight:400; color:rgba(255,255,255,.90); max-width:620px; line-height:1.65; }
