/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    margin-top: 80px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #274c70;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: #f9f9f9;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #f9c846;
    margin: 15px auto 30px;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #274c70;
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #f9c846;
    color: #274c70;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-details {
    display: inline-block;
    padding: 8px 20px;
    background-color: transparent;
    color: #274c70;
    border: 2px solid #274c70;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-details:hover {
    background-color: #274c70;
    color: white;
}

.btn-vision {
    display: inline-block;
    padding: 12px 35px;
    background-color: #f9c846;
    color: #274c70;
    border-radius: 30px;
    font-weight: 600;
    margin-top: 30px;
    transition: all 0.3s ease;
}

.btn-vision:hover {
    background-color: #274c70;
    color: white;
    transform: translateY(-3px);
}

.btn-envoyer {
    display: inline-block;
    padding: 12px 35px;
    background-color: #274c70;
    color: white;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-envoyer:hover {
    background-color: #f9c846;
    color: #274c70;
}

/* Modal détails événement (panneau centré) */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    z-index: 1500;
    padding: 20px;
}
.modal.open { display: flex; }
.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 1000px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.06);
    border: none;
    color: #274c70;
    font-size: 1.1rem;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.modal-body {
    display: flex;
    gap: 24px;
    padding: 28px;
    flex-wrap: wrap;
}
.modal-image { flex: 1; min-width: 320px; }
.modal-image img { width: 100%; border-radius: 8px; display:block; }
.modal-info { flex: 1.3; min-width: 300px; }
.modal-title { font-size: 1.6rem; margin-bottom: 8px; color: #274c70; }
.modal-meta { color: #666; margin-bottom: 16px; }
.modal-description { color: #333; line-height: 1.5; }
.modal-actions { margin-top: 20px; display:flex; gap:10px; }


/* Header et Navigation */
header { 
    background: #274c70; 
    color: #ffffff; 
    position: fixed; 
    width: 100%;
    height: 80px; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 30px;
    height: 100%;
}

.logo img { 
    height: 170px;
    width: auto;
    margin-top: 5px;
    margin-left: 0px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}
        
nav ul { 
    display: flex; 
    list-style: none; 
}
        
nav ul li { 
    margin: 0 15px; 
    position: relative;
}
        
nav ul li a { 
    color: #fff; 
    text-decoration: none; 
    font-weight: 500;
    font-size: 16px; 
    padding: 10px 5px;
}

nav ul li.actif a {
    color: #f9c846;
}

nav ul li a:hover { 
    color: #f9c846; 
}

nav ul li.actif::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #f9c846;
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(39, 76, 112, 0.8), rgba(39, 76, 112, 0.9)), url('image/5121525a-fab7-485a-9c58-51efb4595a33.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4.5rem;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content h6 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 2px;
}

.hero-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 30px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.slogan {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-decouvrir {
    display: inline-block;
    padding: 15px 40px;
    background-color: #f9c846;
    color: #274c70;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-decouvrir:hover {
    background-color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Section À propos */
.apropos-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-start;
}

.apropos-text {
    flex: 1;
    min-width: 300px;
}

.apropos-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.apropos-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    margin-top: 170px;
}

.experience {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: #274c70;
    color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 250px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.experience h4 {
    color: #f9c846;
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.apropos-text h3 {
    margin: 25px 0 15px;
    font-size: 1.5rem;
    color: #274c70;
}

.apropos-text ul {
    list-style: none;
    margin: 20px 0;
}

.apropos-text ul li {
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
}

.apropos-text ul li i {
    position: absolute;
    left: 0;
    top: 5px;
    color: #f9c846;
}

.chiffres-cles {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 40px;
    gap: 20px;
}

.chiffre {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.chiffre h4 {
    font-size: 2.5rem;
    color: #f9c846;
    margin-bottom: 5px;
}

.chiffre p {
    color: #666;
    font-size: 0.9rem;
}

/* Section Événements */
.evenements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.evenement-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
}

.evenement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.evenement-date {
    background-color: #274c70;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.evenement-date .jour {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.evenement-date .mois {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 5px 0;
}

.evenement-date .annee {
    font-size: 1rem;
    font-weight: 400;
}

.evenement-content {
    padding: 25px;
    flex: 1;
}

.evenement-content h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.evenement-lieu {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.evenement-lieu i {
    color: #f9c846;
    margin-right: 5px;
}

/* Section Galerie */
.galerie-filtres {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filtre-btn {
    padding: 8px 25px;
    background-color: #f1f1f1;
    border: none;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filtre-btn.actif {
    background-color: #274c70;
    color: white;
}

.filtre-btn:hover:not(.actif) {
    background-color: #ddd;
}

.galerie-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 8px; /* space for scrollbar */
}

.galerie-wrap {
    position: relative;
}

.galerie-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    color: #274c70;
}

.galerie-nav.prev { left: 8px; }
.galerie-nav.next { right: 8px; }

.galerie-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

@media (max-width: 700px) {
    .galerie-nav { width: 36px; height: 36px; }
    .galerie-nav.prev { left: 4px; }
    .galerie-nav.next { right: 4px; }
}

.galerie-grid::-webkit-scrollbar {
    height: 10px;
}
.galerie-grid::-webkit-scrollbar-thumb {
    background: rgba(39,76,112,0.2);
    border-radius: 10px;
}

.galerie-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.galerie-search {
    display: flex;
    gap: 8px;
    align-items: center;
}

.galerie-search input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    width: 100%;
    max-width: 420px;
}

.galerie-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f9c846;
    color: #274c70;
    border: none;
    cursor: pointer;
}

@media (max-width: 600px) {
    .galerie-search { justify-content: stretch; }
    .galerie-search input { max-width: 100%; }
    .galerie-controls { flex-direction: column; align-items: stretch; }
}

.galerie-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 320px;
    width: 320px;
    max-width: 700px;
    height: 300px;
    scroll-snap-align: start;
}

.galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.galerie-item:hover img {
    transform: scale(1.1);
}

.galerie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(39, 76, 112, 0.9));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.galerie-item:hover .galerie-overlay {
    transform: translateY(0);
}

.galerie-overlay h4 {
    color: white;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.galerie-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive: reduce gallery card height on small screens */
@media (max-width: 600px) {
    .galerie-item {
        height: 250px;
        flex: 0 0 240px;
        width: 240px;
        max-width: 100%;
    }
}

/* Section Équipe */
.equipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.membre-equipe {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.membre-equipe:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.membre-photo {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.membre-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.membre-social {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(39, 76, 112, 0.8);
    padding: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.membre-equipe:hover .membre-social {
    transform: translateY(0);
}

.membre-social a {
    color: white;
    font-size: 1.2rem;
}

.membre-social a:hover {
    color: #f9c846;
}

.membre-info {
    padding: 20px;
    text-align: center;
}

.membre-info h4 {
    margin-bottom: 5px;
}

.membre-role {
    color: #f9c846;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Section Contact */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.info-item {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
}

.info-icon {
    background-color: #f9c846;
    color: #274c70;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.info-details h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.reseaux-sociaux {
    margin-top: 40px;
    text-align: center;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background-color: #274c70;
    color: white;
    border-radius: 999px;
    transition: all 0.18s ease;
    text-decoration: none;
    font-weight: 600;
}

.social-icons a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.social-icons a:hover {
    background-color: #f9c846;
    color: #274c70;
    transform: translateY(-3px);
}

.social-name {
    display: inline-block;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #274c70;
    box-shadow: 0 0 0 2px rgba(39, 76, 112, 0.2);
}

/* Footer */
footer {
    background-color: #1a3652;
    color: white;
    padding: 70px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.logo-footer img {
    height: 140px;
    width: auto;
}

.footer-col h4 {
    color: #f9c846;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: #f9c846;
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    outline: none;
}

.newsletter-form button {
    background-color: #f9c846;
    color: #274c70;
    border: none;
    padding: 0 20px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background-color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #aaa;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* Bouton retour en haut */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #274c70;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #f9c846;
    color: #274c70;
    transform: translateY(-5px);
}



/* Popover détails événement (affiche au-dessus de la vignette cliquée) */
.popover {
    position: fixed;
    z-index: 2000;
    background: white;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 12px;
    max-width: 420px;
    width: calc(100% - 40px);
    display: none;
}

.popover.open {
    display: block;
}

.popover-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #274c70;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.popover-inner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.popover-image { flex: 1; min-width: 100px; }
.popover-image img { width: 100%; height: auto; border-radius: 6px; }
.popover-info { flex: 2; }
.popover-title { color: #274c70; margin-bottom: 6px; }
.popover-meta { color: #666; margin-bottom: 8px; font-weight: 600; }
.popover-description { color: #333; }

.popover-section h4 {
    margin: 12px 0 6px;
    font-size: 0.95rem;
    color: #274c70;
}

.popover-section ul {
    list-style: disc inside;
    margin: 0 0 8px 0;
    padding-left: 0;
}

.popover-pratique-text { color: #444; font-size: 0.95rem; }

.popover {
    max-height: calc(100vh - 80px);
    overflow: auto;
}

@media (max-width: 480px) {
    .popover { width: calc(100% - 20px); left: 10px !important; right: 10px !important; }
    .popover-inner { flex-direction: column; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    nav {
        padding: 0 20px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    body {
        margin-top: 70px;
    }
    
    header {
        height: 70px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #274c70;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 30px;
        transition: all 0.5s ease;
        z-index: 999;
    }
    
    .menu.active {
        left: 0;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .evenements-grid {
        grid-template-columns: 1fr;
    }
    
    .evenement-card {
        flex-direction: column;
    }
    
    .evenement-date {
        flex-direction: row;
        justify-content: space-around;
        min-height: auto;
        padding: 15px;
    }
    
    .evenement-date .jour {
        font-size: 2rem;
    }
    
    .galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .chiffres-cles {
        justify-content: center;
    }
    
    .chiffre {
        min-width: 45%;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}