/* --- VARIABLES ET BASES --- */
:root {
    --primary: #12A89D;
    --dark: #121212;
    --white: #ffffff;
    --mauve: #632A93;
    --card-bg: rgba(255, 255, 255, 0.05);
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    background-color: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4%; /* Padding légèrement réduit */
    background: rgba(18, 18, 18, 0.98);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary);
    box-sizing: border-box;
}

.logo-box { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    flex-shrink: 0; /* Empêche le logo de s'écraser */
}

.logo-box img { height: 30px; width: auto; }
.logo-box span { 
    font-weight: 900; 
    font-size: 0.9rem; /* Un peu plus petit pour le mobile */
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* --- SECTIONS HERO (COMMUN) --- */
.hero, .hero-contact, .hero-membres {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.hero {
    min-height: 40vh;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('./images/backgrd1.png');
}

.hero-contact {
    height: 40vh;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('./images/backgrd2.png');
}

.hero-membres {
    height: 40vh;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('./images/backgrd3.png');
}

@media (min-width: 1024px) {
    .hero { height: 65vh; background-attachment: fixed; }
	.hero-contact { height: 65vh; background-attachment: fixed; }
	.hero-membres { height: 65vh; background-attachment: fixed; }
}

.hero h1, .hero-contact h1, .hero-membres h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--primary);
    margin: 0;
    text-transform: uppercase;
}

.highlight {
    color: var(--mauve);
}

/* --- CONTENEURS ET CARTES --- */
.container {
    padding: 30px 5%;
    max-width: 1000px;
    margin: 0 auto;
}

.card, .contact-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary);
}

h2 { color: var(--primary); text-transform: uppercase; margin-top: 0; }
p { color: var(--white); }

/* --- FORMULAIRES --- */
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--primary); }

input, textarea {
    width: 100%;
    padding: 12px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 5px;
    color: white;
    font-family: inherit;
    box-sizing: border-box;
}

input:focus, textarea:focus { outline: none; border-color: var(--primary); }

.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
}

.btn-submit:hover { background: var(--mauve); }

/* --- SOUS-MENU MEMBRES --- */
.member-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 5px; /* Votre réglage pour le faire remonter */
    position: relative; /* Indispensable pour le z-index */
    z-index: 10; /* <--- AJOUTEZ CECI : 10 est beaucoup plus petit que 9999 */
}

.member-nav-item {
    background: var(--card-bg);
    border: 1px solid var(--mauve);
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    border-radius: 10px;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.member-nav-item:hover {
    background: var(--mauve);
    color: var(--dark);
    transform: translateY(-3px);
}

.member-nav-item.external::after {
    content: " ↗";
    font-size: 0.7rem;
}

/* --- SOUS-NAVIGATION (ESPACE MEMBRES) --- */
.sub-nav {
    background: var(--mauve);
    padding: 12px 5%;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sub-nav a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.sub-nav a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .sub-nav a { 
        font-size: 0.7rem; 
        background: rgba(0,0,0,0.2); 
        padding: 5px 10px; 
        border-radius: 4px; 
    }
}

/* --- TABLEAU DES MEMBRES (ESPACE MEMBRES) --- */
.member-table-container {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    overflow-x: auto; /* Pour le responsive */
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 15px;
    border-bottom: 2px solid var(--mauve);
}

td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
    color: #ddd;
}

tr:hover {
    background: rgba(18, 168, 157, 0.05); /* Effet de surbrillance au survol */
}

/* --- BADGES DE RÔLE --- */
.role-badge {
    background: var(--mauve);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    display: inline-block;
}

/* Style pour les membres standards (plus discret) */
.role-badge.membre {
    background: #444;
}

/* --- TITRES --- */
h1 { 
    color: var(--primary); 
    text-transform: uppercase; 
    text-align: center; 
    margin-bottom: 30px; 
}

/* --- FOOTER ET DIVERS --- */
footer {
    padding: 20px;
    text-align: center;
    font-size: 0.7rem;
    color: #666;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hidden { display: none; }
.partenaire-line { display: flex; align-items: center; gap: 15px; }
.logo-inline { height: 40px; width: auto; border-radius: 5px; }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 600px) {
    nav { flex-direction: row !important; gap: 5px; padding: 10px; }
    .nav-links { width: 100%; justify-content: center; gap: 10px; }
    .nav-links a { font-size: 0.75rem; padding: 5px 8px; background: rgba(255,255,255,0.1); border-radius: 5px; }
}

.captcha-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px; /* Espace avant le bouton Envoyer */
    width: 100%;
}

/* --- GESTION DU MODE CLAIR --- */
body.light-mode {
    --dark: #F4F4F4;
    --white: #121212;
    --card-bg: #ffffff;
}
body.light-mode nav { background: #fff; }

body.light-mode .card, 
body.light-mode .contact-card,
body.light-mode .member-nav-item,
body.light-mode .member-table-container {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
	border-left: 5px solid var(--primary);
}

body.light-mode input, 
body.light-mode textarea {
    background: #fff;
    border: 1px solid #ccc;
    color: #000;
}

body.light-mode footer {
    color: #888;
}

/* --- ADAPTATION DES HEROS EN MODE CLAIR --- */
body.light-mode .hero {
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('./images/backgrd1.png');
}

body.light-mode .hero-contact {
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('./images/backgrd2.png');
}

body.light-mode .hero-membres {
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('./images/backgrd3.png');
}

/* Ajustement pour que le menu reste lisible en mode clair sur mobile */
@media (max-width: 768px) {
    body.light-mode main-menu {
        --menu-bg: #fff;
    }
}