/* --- COULEURS ET VARIABLES --- */
:root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-red: #8b0000; /* Rouge Foncé */
    --color-green: #006400; /* Vert Foncé */
    --padding-section: 60px 5%;
}

/* --- GÉNÉRAL --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

body {
    background-color: var(--color-white);
    color: var(--color-black);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--color-black);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-red);
}

.section-padding {
    padding: var(--padding-section);
}

.section-light {
    background-color: #f7f7f7;
}

h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2em;
}

.separator {
    width: 80px;
    height: 3px;
    background-color: var(--color-red);
    border: none;
    margin: 0 auto 40px auto;
}

/* --- BOUTONS --- */
.btn {
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-auth,
.btn-publish {
    background-color: var(--color-red);
    color: var(--color-white);
}

.btn-auth:hover,
.btn-publish:hover {
    background-color: #a52a2a;
    transform: translateY(-2px);
}

/* --- 1. BARRE DE NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--color-white);
    z-index: 1000;
}

.nav-brand a,
.nav-brand {
    display: flex;
    align-items: flex-start;
}

.nav-brand h1 {
    font-size: 1.5em;
    margin-left: 10px;
    color: var(--color-white);
}

.nav-links a {
    color: var(--color-white);
    margin-left: 20px;
}

.nav-links a:hover {
    color: var(--color-red);
}

.hamburger-icon {
    display: none;
    background: none;
    border: none;
    font-size: 2em;
    color: var(--color-white);
    cursor: pointer;
}

/* --- 2. SLIDER --- */
.slider-section {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.slide a {
    background-color: #00640063;
    color: #fff;
    padding: 5px;
}

.slide.active {
    opacity: 1;
}

.slide-caption {
    color: var(--color-white);
    font-size: 2em;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
}

/* --- 3, 4, 5. GRILLES (VMO, DOMAINES, MEMBRES) --- */
.vmo-grid,
.domaines-grid,
.membres-grid {
    display: grid;
    gap: 30px;
    text-align: center;
    /* 3 COLONNES PAR DÉFAUT (DESKTOP/TABLETTE) */
    grid-template-columns: repeat(3, 1fr);
}

/* Cartes */
.card {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    background-color: rgba(139, 0, 0, 0.4);
    transform: translateY(-5px);
    transition: 0.1s;
}

/* Icônes */
.vmo-icon,
.domaine-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.icon-red {
    color: var(--color-red);
}
.icon-green {
    color: var(--color-green);
}

/* Membres (Cercle) */
.member-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin: 0 auto 15px auto;
    border: 5px solid var(--color-green);
    transition: border-color 0.3s ease;
}

.member-card:hover .member-circle {
    border-color: var(--color-red);
}

/* --- ANIMATION AU SCROLL (Intersection Observer) --- */
.hidden {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-up {
    opacity: 1;
    transform: translateY(0);
}

/* Délai pour les cartes (utilisé par le JS) */
.vmo-card:nth-child(1).animate-up,
.domaine-card:nth-child(1).animate-up,
.member-card:nth-child(1).animate-up {
    transition-delay: 0s;
}
.vmo-card:nth-child(2).animate-up,
.domaine-card:nth-child(2).animate-up,
.member-card:nth-child(2).animate-up {
    transition-delay: 0.2s;
}
.vmo-card:nth-child(3).animate-up,
.domaine-card:nth-child(3).animate-up,
.member-card:nth-child(3).animate-up {
    transition-delay: 0.4s;
}

/* --- 6. FOOTER --- */
.footer {
    background-color: var(--color-black);
    color: #dddddd;
    padding: var(--padding-section);
    font-size: 0.9em;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}

.footer-col h3 {
    color: var(--color-white);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #cccccc;
}

.contact-item i {
    color: var(--color-green);
    margin-right: 10px;
    font-size: 1.1em;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #555;
    background-color: #222;
    color: var(--color-white);
    border-radius: 5px;
}

.contact-form button {
    width: 100%;
    margin-top: 10px;
}

.partner-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.partner-link img {
    max-width: 80px;
    height: auto;
    filter: grayscale(80%) brightness(100%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.partner-link img:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8em;
}

/* --- MEDIA QUERIES (Responsive Design) --- */

/* Tablette (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    /* Maintenir le 3 colonnes pour les cartes */
    .vmo-grid,
    .domaines-grid,
    .membres-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Footer passe en 2 colonnes */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile (Jusqu'à 767px) */
@media (max-width: 850px) {
    /* Navbar (affichage du menu hamburger) */
    .nav-links {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--color-black);
        padding: 20px 0;
        display: none;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
    .nav-links.active {
        display: flex;
        transform: translateY(0);
    }
    .hamburger-icon {
        display: block;
    }

    /* Grilles : Empilement OBLIGATOIRE (1 colonne) */
    .vmo-grid,
    .domaines-grid,
    .membres-grid {
        grid-template-columns: 1fr;
    }

    /* Footer passe en 1 colonne */
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .nav-links a {
        background: transparent;
        margin: 0;
        padding: 0;
        margin: 5px 5%;
    }

    .nav-links a:hover {
        background: transparent;
        transition: 0.3s;
    }
}

.notification {
    position: fixed;
    top: 50px;
    margin: 20px 5%;
    padding: 10px;
    text-align: center;
    z-index: 999;
    animation: alternate animeNotification 2s;
}

.succes {
    background-color: #b8ffb6;
    color: green;
}

.erreur {
    background-color: #ffb6b6;
    color: red;
}

@keyframes animeNotification {
    0% {
        opacity: 100%;
    }
    5% {
        opacity: 0%;
    }
    10% {
        opacity: 100%;
    }
    15% {
        opacity: 0%;
    }
    20% {
        opacity: 100%;
    }
    25% {
        opacity: 100%;
    }
    30% {
        opacity: 0%;
    }
    35% {
        opacity: 100%;
    }
    40% {
        opacity: 0%;
    }
    45% {
        opacity: 100%;
    }
}

/* AUTRE STYLE */
.btn-submit {
    background: none;
    border: none;
    font-size: 16px;
}
