/* VARIABLES & RESET  */
:root {
    /* Palette de couleurs */
    --primary: #3b9454;          /* Vert principal */
    --primary-dark: #2e7a43;     /* Vert foncé (survol) */
    --accent: #f4a261;           /* Orange doux pour l'accentuation (optionnel) */
    --text-main: #2c3e50;        /* Gris foncé pour le texte (plus doux que noir) */
    --text-light: #7f8c8d;       /* Gris clair */
    --bg-body: #f8f9fa;          /* Blanc cassé très léger pour le fond */
    --bg-card: #ffffff;          /* Blanc pur pour les éléments */
    
    /* Effets */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius: 12px;  
    --font-main: "Oswald", sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    font-family: var(--font-main);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
}

main {
    min-height: 80vh;
}

/* HEADER (Navigation) */
.header {
    background-color: var(--bg-card);
    width: 100%;
    height: 80px; /* Hauteur fixe plus propre */
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: top 0.3s ease;
}

/* Logo */
.logo-container {
    background-color: white;
    position: relative;
    margin-left: 4vw;
    margin-top: 7vh;
    width: 13vw;
    height: 13vw;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    width: 13vw;
    height: auto;
}

/* Réseaux Sociaux */
.logo-reseau {
    display: flex;
    gap: 15px;
}

.logo-instagram, .logo-facebook {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.logo-instagram:hover, .logo-facebook:hover {
    transform: scale(1.1);
}

/* Menu Desktop */
.menu {
    display: flex;
    gap: 20px;
    height: 100%;
}

.menu a {
    text-decoration: none;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu button {
    background: none;
    border: none;
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    position: relative;
    padding: 0 5px;
    transition: color 0.3s;
}

.menu button::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.menu a:hover button, .menu a.active button {
    color: var(--primary);
}

.menu a:hover button::after, .menu a.active button::after {
    width: 100%;
}

/* MENU MOBILE (Hamburger) */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1002;
}

.hamburger-menu span {
    height: 3px;
    width: 100%;
    background-color: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%; 
    height: 100vh;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1001;
}

.menu-overlay.active {
    right: 0;
}

.menu-overlay a {
    text-decoration: none;
    margin: 15px 0;
}

.menu-overlay button {
    background: none;
    border: none;
    font-size: 2rem;
    font-family: var(--font-main);
    color: var(--text-main);
    cursor: pointer;
}

.menu-overlay a.active button {
    color: var(--primary);
}

/* FOOTER */
footer {
    background-color: #1a1a1a;
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
}

footer h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

footer a:hover {
    color: white;
}

.partage img {
    width: 30px;
    height: 30px;
    margin: 10px;
    filter: invert(1); /* Rend les icônes blanches si elles sont noires */
    transition: transform 0.3s;
}

.partage img:hover {
    transform: translateY(-3px);
}


/* MENU MOBILE (Hamburger) */

/* Par défaut (Desktop) : on cache tout ça */
.hamburger-menu {
    display: none;
}

.menu-overlay {
    display: none;
}

/* --- MEDIA QUERY : UNIQUEMENT SUR MOBILE/TABLETTE (< 900px) --- */
@media screen and (max-width: 900px) {

    /* 1. On cache le menu classique et les réseaux sociaux du header */
    .menu, .logo-reseau {
        display: none;
    }

    /* 2. L'icône Hamburger (Le bouton) */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 35px;
        height: 24px;
        cursor: pointer;
        z-index: 2000; /* Très haut pour être au-dessus du menu ouvert */
        position: relative;
    }

    /* Les 3 barres */
    .hamburger-menu span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: var(--text-main); /* Couleur sombre par défaut */
        border-radius: 3px;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Animation rebondie */
        transform-origin: center;
    }

    /* ANIMATION : Transformation en Croix (X) quand actif */
    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
        background-color: var(--primary); /* Devient vert */
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0); /* Disparait */
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
        background-color: var(--primary); /* Devient vert */
    }

    /* 3. L'Overlay (Le menu plein écran) */
    .menu-overlay {
        display: flex; 
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed; /* Fixe par rapport à l'écran */
        top: 0;
        right: -100%; /* Caché à droite par défaut */
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98); /* Fond blanc quasi opaque */
        backdrop-filter: blur(10px); /* Effet flou moderne derrière */
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1500; /* En dessous du bouton burger (2000) mais au-dessus du site */
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }

    /* Quand le menu est ouvert */
    .menu-overlay.active {
        right: 0;
    }

    /* Les liens dans le menu mobile */
    .menu-overlay a {
        text-decoration: none;
        margin: 20px 0;
        opacity: 0; /* Caché au début pour l'anim */
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    /* Animation d'apparition des liens en cascade */
    .menu-overlay.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Reset des boutons dans les liens */
    .menu-overlay button {
        background: none;
        border: none;
        font-family: "Josefin Sans", sans-serif; 
        font-size: 2rem; /* Gros texte */
        font-weight: bold;
        color: var(--text-main);
        cursor: pointer;
        transition: color 0.3s;
    }

    .menu-overlay a:hover button, 
    .menu-overlay a.active button {
        color: var(--primary);
    }

    /* Réseaux sociaux dans l'overlay */
    .logo-reseau-overlay {
        margin-top: 40px !important; /* Force la marge */
        display: flex;
        gap: 30px;
    }
    
    .logo-reseau-overlay img {
        width: 50px !important; /* Force la taille */
        transition: transform 0.3s;
    }
    
    .logo-reseau-overlay img:hover {
        transform: scale(1.2);
    }

    /* Logo */
    .logo-container {
        width: 26vw;
        height: 26vw;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .logo {
        width: 27vw;
        height: auto;
    }
}