/* --- Variables de Design --- */
:root {
    --primary: #0b3c5d;
    --secondary: #328cc1;
    --accent: #d9b310;
    --text: #2c3e50;
    --light-bg: #f4f7f6; /* Votre bleu/gris léger */
    --white: #ffffff;
}

/* --- Réinitialisation et Bases --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--light-bg);
}

/* --- 🌟 MAGIE DE L'ALTERNANCE AUTOMATIQUE --- */
/* Par défaut, TOUTES les sections de vos pages auront un fond blanc */
section {
    background-color: var(--white);
}

/* Automatiquement, une section sur deux (les sections paires : 2, 4, 6...) 
   prendra la couleur de fond bleu/gris léger */
section:nth-of-type(even) {
    background-color: var(--light-bg);
}

/* Cas particulier : On s'assure que la section #hero (qui a déjà son dégradé) 
   ne soit pas perturbée par l'alternance */
#hero {
    background: linear-gradient(135deg, rgba(11,60,93,0.95) 0%, rgba(50,140,193,0.9) 100%) !important;
    color: var(--white);
    text-align: center;
    padding: 100px 20px;
}


/* --- Composants Réutilisables --- */
.section-padding {
    padding: 60px 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
    margin: 10px auto 0 auto;
    border-radius: 2px;
}

/* --- Boutons --- */
.btn {
    display: inline-block;
    background-color: var(--secondary);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--primary);
}

.btn-accent:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* --- Barre de Navigation --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.4rem;
    z-index: 1001;
}

.logo-area img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
    display: block;
    padding: 5px 0;
}

.nav-menu a:hover {
    color: var(--secondary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 28px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

#hero h1 { font-size: 3rem; margin-bottom: 15px; }
#hero p { font-size: 1.3rem; max-width: 700px; margin: 0 auto 30px auto; opacity: 0.9; }

/* --- Grille des Composants Intérieurs --- */
/* Pour que les cartes ressortent toujours bien, on force leur fond en blanc pur */
.card, .join-box, .event-card, .contact-wrapper {
    background-color: var(--white);
}

.about-text { max-width: 800px; margin: 0 auto; text-align: center; font-size: 1.1rem; }

.grid-piliers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 40px; }
.card { padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; transition: transform 0.3s; }
.card:hover { transform: translateY(-5px); }
.card-icon { font-size: 2.5rem; margin-bottom: 15px; display: inline-block; }
.card h3 { color: var(--primary); margin-bottom: 12px; }

/* --- Section Agenda --- */
.grid-agenda {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.event-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); 
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: row;
    height: 280px; 
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.event-image-wrapper {
    flex: 0 0 35%;
    position: relative;
    background-color: #eee;
    overflow: hidden;
}

.event-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.event-date-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--primary);
    color: var(--white);
    padding: 8px 15px;
    font-weight: bold;
    font-size: 0.85rem;
    border-bottom-right-radius: 8px;
    z-index: 2;
}

.event-body {
    flex: 1;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    overflow: hidden;
}

.event-body h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-meta {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 12px;
    font-weight: 500;
}

.event-desc {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-more {
    color: var(--secondary);
    font-weight: bold;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

/* Style global pour la carte passée */
.event-card.event-past {
    opacity: 0.7; /* Rend la carte légèrement translucide */
    filter: grayscale(20%); /* Estompe légèrement les couleurs de l'image */
    border-left: 4px solid #7f8c8d; /* Optionnel : donne une bordure grise neutre */
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Au survol, on redonne un peu de visibilité pour l'expérience utilisateur */
.event-card.event-past:hover {
    opacity: 0.9;
    filter: grayscale(0%);
}

/* Style du badge Événement passé */
.event-image-wrapper {
    position: relative; /* Assurez-vous que le wrapper parent est bien en position relative */
}

.past-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(52, 73, 94, 0.85); /* Un gris foncé/bleuté transparent */
    color: #ffffff;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2;
}

/* --- Section Rejoindre l'Association --- */
.grid-join { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.join-box { padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; justify-content: space-between; }
.join-box.highlight { border-color: var(--secondary); border: 2px solid var(--secondary); }
.join-box h3 { color: var(--primary); font-size: 1.4rem; margin-bottom: 15px; }
.join-box ul { list-style-type: none; margin: 20px 0; text-align: left; }
.join-box ul li { margin-bottom: 10px; position: relative; padding-left: 20px; }
.join-box ul li::before { content: '✓'; color: var(--secondary); position: absolute; left: 0; font-weight: bold; }

/* --- Section Contact --- */
.contact-wrapper { max-width: 600px; margin: 40px auto 0 auto; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eee; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.95rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-family: inherit; font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--secondary); }

/* --- Pied de Page --- */
footer { background-color: var(--primary); color: var(--white); text-align: center; padding: 40px 20px; font-size: 0.9rem; }
footer p { margin-bottom: 10px; opacity: 0.8; }

/* --- Page Détail Événement --- */
.breadcrumb { padding: 20px 0 10px 0; font-size: 0.9rem; }
.breadcrumb a { color: var(--secondary); text-decoration: none; }
.breadcrumb span { color: #7f8c8d; margin: 0 5px; }

.event-details-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 20px 0 60px 0;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.event-poster { width: 100%; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); display: block; }
.event-info-content h1 { color: var(--primary); font-size: 2.5rem; margin-bottom: 20px; line-height: 1.2; }
.info-card-box { background-color: var(--light-bg); padding: 20px; border-radius: 8px; margin-bottom: 25px; }
.info-line { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; font-size: 1.05rem; text-align: left;}
.info-line:last-child { margin-bottom: 0; }
.info-line .icon { font-size: 1.2rem; flex-shrink: 0; }
.maps-btn-link { color: var(--secondary); font-weight: 600; text-decoration: none; }

.program-section { margin-top: 30px; text-align: left; }
.program-section h2 { color: var(--primary); font-size: 1.6rem; margin-bottom: 15px; border-bottom: 2px solid var(--light-bg); padding-bottom: 8px; }
.program-item { margin-bottom: 15px; padding-left: 15px; border-left: 3px solid var(--secondary); }
.program-time { font-weight: bold; color: var(--secondary); font-size: 1.1rem; }
.program-title { font-weight: 600; color: var(--text); }
.program-desc { font-size: 0.95rem; color: #555; }

/* --- Responsive Mobile --- */
@media (max-width: 768px) {
    #hero h1 { font-size: 2.2rem; }
    #hero p { font-size: 1.1rem; }
    .menu-toggle { display: flex; }
    .nav-menu { position: absolute; top: 100%; left: 0; right: 0; background-color: var(--white); flex-direction: column; gap: 0; box-shadow: 0 10px 15px rgba(0,0,0,0.1); padding: 10px 0; max-height: 0; overflow: hidden; transition: max-height 0.3s ease-in-out; }
    .nav-menu.active { max-height: 350px; }
    .nav-menu li { width: 100%; text-align: center; }
    .nav-menu a { padding: 15px 20px; border-bottom: 1px solid #eee; }
    .nav-menu li:last-child a { border-bottom: none; }
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    
    .event-card { flex-direction: column; height: auto; }
    .event-image-wrapper { height: 220px; flex: none; }
    .event-body { padding: 20px; }
    .event-body h3 { white-space: normal; }

    .event-details-wrapper { grid-template-columns: 1fr; padding: 20px; gap: 30px; }
    .event-info-content h1 { font-size: 2rem; }
}

/* --- Icônes Réseaux Sociaux --- */
.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 15px 0;
}

.social-link {
    color: var(--white); /* Par défaut les logos sont blancs */
    font-size: 1.6rem;   /* Taille idéale pour les logos */
    transition: all 0.3s ease;
}

/* Couleur officielle Facebook au survol */
.social-link:hover .fa-facebook {
    color: #1877F2;
    transform: scale(1.1);
}

/* Couleur officielle Instagram au survol */
.social-link:hover .fa-instagram {
    color: #E1306C;
    transform: scale(1.1);
}
}