/* ============================================================ */
/*  VARIABLES & RESET                                           */
/* ============================================================ */
@font-face {
    font-family: 'Prata-Regular';
    src: url('../fonts/Prata-Regular.woff2') format("woff2");
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}

:root {
    --bleu-clair: #4da6ff;
    --bleu-moyen: #2E6DA4;
    --bleu-fonce: #1A3A5C;
    --font-main: 'Prata-Regular', serif;
    --bg-site: #e6f2ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 180px; }
@media (max-width: 767px) { html { scroll-padding-top: 140px; } }

body { 
    font-family: var(--font-main); 
    background-color: var(--bg-site); 
    color: var(--bleu-moyen); 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hidden { display: none !important; }
.flex { display: flex !important; }
.sep { border-top: 1px solid #e5e7eb; }

.icon-svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.icon-svg-small { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* ============================================================ */
/*  TYPOGRAPHIE                                                 */
/* ============================================================ */
h1, h2, h3, h4 { color: var(--bleu-moyen); }
.section-title { font-weight: 700; margin-bottom: 2rem; font-size: 1.25rem; }
@media (min-width: 640px) { .section-title { font-size: 1.5rem; } }
@media (min-width: 768px) { .section-title { font-size: 1.875rem; } }
@media (min-width: 1024px) { .section-title { font-size: 2.25rem; } }

.text-lead { line-height: 1.625; margin-bottom: 2rem; }
.text-res-sm { font-size: 0.75rem; }
@media (min-width: 640px) { .text-res-sm { font-size: 0.875rem; } }
@media (min-width: 768px) { .text-res-sm { font-size: 1rem; } }
@media (min-width: 1024px) { .text-res-sm { font-size: 1.125rem; } }

.text-res-base { font-size: 0.875rem; line-height: 1.625; }
@media (min-width: 640px) { .text-res-base { font-size: 1rem; } }
@media (min-width: 768px) { .text-res-base { font-size: 1.125rem; } }
@media (min-width: 1024px) { .text-res-base { font-size: 1.25rem; } }

/* ============================================================ */
/*  LAYOUT & CONTENEURS                                         */
/* ============================================================ */
.container-80 { width: 80%; max-width: 1400px; margin-left: auto; margin-right: auto; }
.main-content { flex: 1; padding-top: 9rem; padding-bottom: 2rem; }
@media (min-width: 768px) { .main-content { padding-top: 11rem; } }

.section-card {
    background-color: #ffffff; border-radius: 1rem; padding: 2rem; margin-bottom: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
@media (min-width: 768px) { .section-card { padding: 3rem; margin-bottom: 3rem; } }

.grid-2-col { display: grid; gap: 2rem; }
@media (min-width: 768px) { .grid-2-col { grid-template-columns: repeat(2, 1fr); gap: 3rem; } }
.text-group > *:not(:last-child) { margin-bottom: 1.25rem; }

/* ============================================================ */
/*  HEADER & MENU                                               */
/* ============================================================ */
.site-header { position: fixed; top: 0; left: 0; right: 0; background-color: var(--bg-site); z-index: 50; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.header-banner { display: flex; align-items: center; justify-content: center; padding-top: 1rem; padding-bottom: 1rem; }
.header-avatar { width: 3.5rem; height: 3.5rem; margin-right: 0.5rem; border-radius: 50%; object-fit: cover;}
@media (min-width: 640px) { .header-avatar { width: 4rem; height: 4rem; margin-right: 0.75rem; } }
@media (min-width: 768px) { .header-avatar { width: 5rem; height: 5rem; } }
@media (min-width: 1024px) { .header-avatar { width: 6rem; height: 6rem; } }
.header-name { font-size: 1.25rem; color: var(--bleu-clair); font-weight: 800; letter-spacing: 0.025em; text-align: right; text-decoration: none; }
@media (min-width: 640px) { .header-name { font-size: 1.5rem; } }
@media (min-width: 768px) { .header-name { font-size: 1.875rem; } }
@media (min-width: 1024px) { .header-name { font-size: 4.5rem; } }

.desktop-nav { display: none; }
@media (min-width: 768px) { .desktop-nav { display: block; } }
.nav-list { display: flex; justify-content: center; gap: 1.25rem; padding-top: 0.75rem; padding-bottom: 0.75rem; list-style: none; }
@media (min-width: 1024px) { .nav-list { gap: 2.5rem; } }

.menu-link { font-size: clamp(0.85rem, 1.15vw, 1.2rem); color: var(--bleu-moyen); text-decoration: none; transition: color 0.2s ease; }
.menu-link:hover { color: var(--bleu-fonce); }
.menu-link.active { color: var(--bleu-fonce); font-weight: 600; }

.mobile-nav-wrapper { display: flex; justify-content: flex-end; padding: 0.5rem 1.25rem; }
@media (min-width: 768px) { .mobile-nav-wrapper { display: none; } }
.hamburger-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: none; border: none; cursor: pointer; color: var(--bleu-moyen); }
.hamburger-lines { width: 24px; height: 18px; position: relative; }
.hamburger-lines span { display: block; position: absolute; height: 2px; width: 100%; background: var(--bleu-moyen); border-radius: 2px; opacity: 1; left: 0; transform: rotate(0deg); transition: .25s ease-in-out; }
.hamburger-lines span:nth-child(1) { top: 0px; }
.hamburger-lines span:nth-child(2) { top: 8px; } 
.hamburger-lines span:nth-child(3) { top: 16px; }
.hamburger-btn.open .hamburger-lines span:nth-child(1) { top: 8px; transform: rotate(135deg); }
.hamburger-btn.open .hamburger-lines span:nth-child(2) { opacity: 0; left: -20px; }
.hamburger-btn.open .hamburger-lines span:nth-child(3) { top: 8px; transform: rotate(-135deg); }

.mobile-menu-container { display: block; }
@media (min-width: 768px) { .mobile-menu-container { display: none; } }
#mobile-menu { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; background-color: #f2f8ff; width: 100%; text-align: center; border-bottom: 1px solid #d1e7ff; }
#mobile-menu.open { max-height: 400px; }
#mobile-menu ul { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 1rem 0; list-style: none; }

/* ============================================================ */
/*  COMPOSANTS : CARTES, BADGES, VIDÉO                         */
/* ============================================================ */     
.video-wrapper { position: relative; width: 100%; max-width: 260px; aspect-ratio: 9 / 16; margin: 0 auto 2rem auto; }
.video-wrapper video { width: 100%; height: 100%; object-fit: cover; border-radius: 0.75rem; background: #f0f4f8; }

.info-card { background-color: var(--bg-site); border-radius: 0.75rem; padding: 1.25rem; }
@media (min-width: 768px) { .info-card { padding: 1.5rem; } }
.info-card h3 { font-size: 1.125rem; font-weight: 600; color: var(--bleu-fonce); margin-bottom: 0.75rem; }

.badge-upcoming { display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bleu-clair); background-color: #ffffff; padding: 0.25rem 0.75rem; border-radius: 9999px; border: 1px solid var(--bleu-clair); }
.badge-year { display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af; }

.expo-upcoming { background-color: var(--bg-site); border-radius: 0.75rem; padding: 1.25rem 2rem; border-left: 4px solid var(--bleu-clair); }
.past-expo-grid { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 640px) { .past-expo-grid { grid-template-columns: repeat(2, 1fr); } }
.past-expo-card { background-color: var(--bg-site); border-radius: 0.75rem; padding: 1.25rem; }
.past-expo-card h3 { font-size: 1rem; font-weight: 600; color: var(--bleu-fonce); margin-top: 0.5rem; margin-bottom: 0.25rem; }

/* ============================================================ */
/*  PORTFOLIO (Vignettes & Grille)                              */
/* ============================================================ */
.gallery-cards-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .gallery-cards-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-card { position: relative; border-radius: 0.75rem; overflow: hidden; aspect-ratio: 4 / 3; text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; }
.gallery-card:hover { transform: scale(1.02); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.gallery-card:hover img { transform: scale(1.05); }
.gallery-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,58,92,0.85) 0%, rgba(26,58,92,0.2) 50%, transparent 100%); display: flex; align-items: flex-end; justify-content: center; padding: 1.5rem; text-align: center; }
.gallery-card-overlay h3 { color: #ffffff; font-size: 1.25rem; font-weight: 600; margin: 0; }

.back-link { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--bleu-moyen); font-weight: 600; font-size: 0.875rem; margin-bottom: 1.5rem; transition: color 0.2s; }
.back-link:hover { color: var(--bleu-fonce); }

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 3rem; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
.gallery-thumb { cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; border-radius: 0.5rem; overflow: hidden; aspect-ratio: 1 / 1; }
.gallery-thumb:hover { transform: scale(1.03); box-shadow: 0 4px 15px rgba(0,0,0,0.12); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hidden-thumb { display: none; }

/* ============================================================ */
/*  CONTACT & FORMULAIRES                                       */
/* ============================================================ */
.contact-header { max-width: 42rem; margin-left: auto; margin-right: auto; text-align: center; margin-bottom: 2.5rem; }
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 3fr 2fr; gap: 3rem; align-items: center; } }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 1rem; font-weight: 500; color: var(--bleu-moyen); margin-bottom: 0.25rem; }
.form-input { width: 100%; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.75rem 1rem; font-size: 0.875rem; color: var(--bleu-moyen); background-color: #f9fafb; transition: border-color 0.2s ease, box-shadow 0.2s ease; font-family: var(--font-main);}
.form-input:focus { outline: none; border-color: var(--bleu-fonce); background-color: #ffffff; box-shadow: 0 0 0 3px rgba(26,58,92,0.08); }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232E6DA4' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.form-row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, 1fr); } }
.submit-btn { display: inline-block; width: 100%; background-color: var(--bleu-fonce); color: #ffffff; font-size: 0.875rem; font-weight: 500; padding: 0.75rem 2rem; border-radius: 0.5rem; border: none; cursor: pointer; transition: background-color 0.2s ease; font-family: var(--font-main); text-align: center; text-decoration: none; }
.submit-btn:hover { background-color: var(--bleu-moyen); }
@media (min-width: 640px) { .submit-btn { width: auto; } }
.coord-list { list-style: none; }
.coord-list li { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.coord-list svg { color: var(--bleu-clair); flex-shrink: 0; margin-top: 2px; }
.coord-list a { color: var(--bleu-moyen); text-decoration: none; transition: color 0.2s; }
.coord-list a:hover { color: var(--bleu-fonce); }

/* ============================================================ */
/*  FOOTER                                                      */
/* ============================================================ */

.footer-logo { display: block; width: 80%; max-width: 1200px; height: auto; margin: 0 auto 1.5rem auto; }

 .footer-img-mobile { display: none; }
@media (max-width: 767px) {
    .footer-logo:not(.footer-img-mobile) { display: none; }
    .footer-img-mobile { display: block; width: 80%; height: auto; margin: 0 auto 1rem auto; }
}

/* ============================================================ */
/*  MODALES                                                     */
/* ============================================================ */
.modal-backdrop { background: rgba(0,0,0,0.85); backdrop-filter: blur(4px); position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; padding: 1rem; }

/* Modale Image (Responsive) */
.modal-content-img { 
    position: relative; 
    max-width: 90vw; /* Ne dépassera jamais 90% de la largeur de l'écran */
    max-height: 85vh; /* Ne dépassera jamais 85% de la hauteur de l'écran */
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none; 
    -webkit-user-select: none; 
}

.modal-close-btn { position: absolute; top: -2.5rem; right: 0; background: none; border: none; color: #ffffff; cursor: pointer; transition: color 0.2s; display: flex; align-items: center;}
.modal-close-btn:hover { color: #d1d5db; }

.modal-img { 
    max-width: 100%; 
    max-height: 75vh; /* Laisse de la place pour les flèches et la légende */
    width: auto;
    height: auto;
    object-fit: contain; /* Garde les proportions sans couper l'image */
    border-radius: 0.75rem; 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); 
}

.modal-caption { text-align: center; color: #ffffff; font-size: 0.875rem; margin-top: 0.75rem; opacity: 0.8; }

.modal-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); border: none; color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center; z-index: 10; }
.modal-nav-btn:hover { background: rgba(255,255,255,0.4); }
.modal-nav-prev { left: 10px; }
.modal-nav-next { right: 10px; }

/* Ajustements pour petits écrans et mobiles */
@media (max-width: 767px) { 
    .modal-content-img { max-width: 95vw; }
    .modal-img { max-height: 65vh; } /* Laisse plus de place aux flèches au tactile */
    .modal-nav-btn { width: 35px; height: 35px; } 
    .modal-nav-prev { left: 5px; } 
    .modal-nav-next { right: 5px; } 
}
.legal-scroll { max-height: 72vh; overflow-y: auto; padding: 1.25rem 1.5rem; }
.legal-scroll::-webkit-scrollbar { width: 5px; }
.legal-scroll::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.legal-scroll::-webkit-scrollbar-thumb { background: var(--bleu-moyen); border-radius: 3px; }
