/* =====================================================================
   STYLE AMÉLIORÉ - RESPONSIVE MOBILE OPTIMISÉ
   ===================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a1a1a;
    --secondary: #333;
    --accent: #ff6b35;
    --light: #f5f5f5;
    --white: #ffffff;
    --border: #333333;
    --touch-area: 44px; /* Taille minimum pour boutons tactiles */
}

html {
    scroll-behavior: smooth;
}

section {
  scroll-margin-top: 180px; /* À ajuster selon la hauteur de votre bandeau */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #121212;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

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

main {
    padding: 2rem 0;
}

/* =====================================================================
   HEADER RESPONSIVE
   ===================================================================== */

header {
    background: #000000;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo span {
    color: var(--accent);
}

nav a {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: var(--accent);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* NAVBAR DESKTOP */

.navbar {
    position: relative;
}

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

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px;
    min-height: var(--touch-area);
    min-width: var(--touch-area);
}

/* MENU MOBILE */

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: absolute;
        top: 60px;
        right: 20px;
        flex-direction: column;
        align-items: flex-start;
        background: #111;
        width: 220px;
        padding: 20px;
        border-radius: 12px;
        display: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        width: 100%;
        display: block;
        padding: 12px 0;
        min-height: var(--touch-area);
        display: flex;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .logo img {
        height: 35px;
    }
}

/* =====================================================================
   HERO SECTION
   ===================================================================== */

.hero {
    background: linear-gradient(135deg, #000000 0%, var(--primary) 100%);
    color: var(--white);
    padding: 5rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
}

.hero-accent {
    color: var(--accent);
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 2.3rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.95rem;
    }
}

/* =====================================================================
   SECTION TITLES
   ===================================================================== */

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    color: var(--white);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
}

/* =====================================================================
   EVENTS GRID
   ===================================================================== */

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.event-card {
    background: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.event-card:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.5);
    transform: translateY(-8px);
    border-color: var(--accent);
}

.event-thumbnail {
    width: 100%;
    height: 220px;
    background: #252525;
    overflow: hidden;
    position: relative;
}

.event-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.event-card:hover .event-thumbnail img {
    transform: scale(1.08);
}

.event-info {
    padding: 1.5rem;
}

.event-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--white);
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .event-thumbnail {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .event-thumbnail {
        height: 200px;
    }

    .event-title {
        font-size: 1.2rem;
    }
}

/* =====================================================================
   MASONRY GALLERY
   ===================================================================== */

.masonry {
    column-count: 4;
    column-gap: 1.5rem;
    margin-bottom: 2rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #1e1e1e;
    transition: transform 0.3s ease;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.masonry-item:hover img {
    opacity: 0.9;
    transform: scale(1.05);
}

@media (max-width: 1024px) {
    .masonry {
        column-count: 3;
        column-gap: 1rem;
    }
}

@media (max-width: 768px) {
    .masonry {
        column-count: 2;
        column-gap: 1rem;
    }

    .masonry-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .masonry {
        column-count: 1;
        column-gap: 0;
    }

    .masonry-item {
        margin-bottom: 1rem;
    }
}

/* =====================================================================
   GALLERY HEADER
   ===================================================================== */

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.gallery-back {
    background: #1e1e1e;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--white);
    transition: all 0.3s;
    white-space: nowrap;
    min-height: var(--touch-area);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-back:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.gallery-title {
    flex: 1;
    text-align: center;
}

.gallery-title h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 0.3rem;
}

.gallery-title p {
    color: #aaa;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .gallery-header {
        flex-wrap: wrap;
        margin-bottom: 1.5rem;
    }

    .gallery-title h2 {
        font-size: 1.5rem;
    }

    .gallery-title p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .gallery-header {
        padding-bottom: 0.5rem;
        gap: 0.5rem;
    }

    .gallery-back {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .gallery-title h2 {
        font-size: 1.3rem;
    }
}


/* =====================================================================
   SEARCH FORM
   ===================================================================== */

.search-container {
    max-width: 500px;
    margin: 0 auto 3rem auto;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    background: #1e1e1e;
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 30px;
    font-size: 1rem;
    transition: border-color 0.3s;
    min-height: var(--touch-area);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-btn {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 0 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    min-height: var(--touch-area);
    white-space: nowrap;
}

.search-btn:hover {
    background: #e65c2b;
}

@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
        margin: 0 0 2rem 0;
    }
}

@media (max-width: 480px) {
    .search-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-btn {
        width: 100%;
    }
}

/* =====================================================================
   LIGHTBOX - OPTIMISÉ POUR MOBILE
   ===================================================================== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: var(--touch-area);
    height: var(--touch-area);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    background: var(--accent);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    width: var(--touch-area);
    height: var(--touch-area);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.lightbox-nav:hover {
    opacity: 1;
    background: var(--accent);
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

@media (min-width: 769px) {
    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }

    .lightbox-nav:hover {
        transform: translateY(-50%) scale(1.1);
    }
}

@media (max-width: 480px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
    }

    .lightbox-nav {
        font-size: 1.2rem;
    }
}

/* =====================================================================
   SECTIONS
   ===================================================================== */

.section-unique {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.about-content, .contact-grid {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: center; /* Aligne verticalement la photo et le texte */
}

/* NOUVEAU BLOC : Photo de Profil stylée */
.about-profile {
    flex-shrink: 0;
}

.profile-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent); /* Utilise ton orange fluo */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.profile-circle:hover {
    transform: scale(1.05);
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.about-text h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.about-text p {
    margin-bottom: 15px;
    color: #ccc;
}

.contact-grid {
    gap: 40px;
}

.contact-form {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 14px;
    background: #1e1e1e;
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s;
    min-height: var(--touch-area);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form button {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.2s;
    min-height: var(--touch-area);
    align-self: flex-start;
}

.contact-form button:hover {
    background: #e65c2b;
}

.contact-info {
    flex: 1;
    min-width: 250px;
    background: #1e1e1e;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    height: fit-content;
}

@media (max-width: 768px) {
    .section-unique {
        padding: 40px 0;
    }

    .about-content, .contact-grid {
        flex-direction: column;
        gap: 30px;
        text-align: center; /* Centre la photo et le texte sur mobile */
    }
}

/* =====================================================================
   DROPDOWN MENU
   ===================================================================== */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1a1a1a;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 200;
    border-radius: 6px;
    border: 1px solid var(--border);
    top: 100%;
    left: 0;
    overflow: hidden;
}

.dropdown-content a {
    color: var(--light);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background 0.2s;
    min-height: var(--touch-area);
    display: flex;
    align-items: center;
}

.dropdown-content a:hover {
    background-color: var(--accent);
    color: var(--white);
}

.dropdown:hover .dropdown-content {
    display: block;
}

@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 15px;
    }

    .nav-menu.active .dropdown-content {
        display: block;
    }
}

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

footer {
    background: #000000;
    color: var(--white);
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid var(--border);
}

footer p {
    opacity: 0.8;
}

/* =====================================================================
   MESSAGES D'ALERTE
   ===================================================================== */

.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.alert-error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.no-events {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-events i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* =====================================================================
   ADMIN SECTION
   ===================================================================== */

.admin-box {
    max-width: 650px;
    margin: 40px auto;
    padding: 30px;
    background: #1e1e1e;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-form label {
    font-weight: 600;
    color: var(--white);
    margin-bottom: -10px;
}

.admin-form input[type="text"],
.admin-form input[type="date"],
.admin-form input[type="file"] {
    width: 100%;
    padding: 12px;
    background: #121212;
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 6px;
    font-size: 16px;
}

.admin-form button {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-form button:hover {
    background: #e65c2b;
}

@media (max-width: 480px) {
    .admin-box {
        margin: 20px auto;
        padding: 20px;
    }
}

/* =====================================================================
   AUTRES COMPOSANTS
   ===================================================================== */

.loader {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #222;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================================
   DEMANDE : LOGO PLUS GRAND
   ===================================================================== */
.logo img {
    height: 160px; /* Augmenté de 40px à 60px */
    width: auto;
    transition: height 0.3s ease;
}

@media (max-width: 480px) {
    .logo img {
        height: 100px; /* Version mobile légèrement ajustée */
    }
}

/* =====================================================================
   DEMANDE : BOUTON DE TÉLÉCHARGEMENT TRANSPARENT DANS LIGHTBOX
   ===================================================================== */
.lightbox-download {
    position: absolute;
    top: 20px;
    right: 80px; /* Placé juste à gauche du bouton fermer (X) */
    background: rgba(0, 0, 0, 0.4); /* Transparent discret */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    width: var(--touch-area);
    height: var(--touch-area);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10002;
}

.lightbox-download:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    transform: scale(1.05);
}

@media (max-width: 480px) {
    .lightbox-download {
        top: 10px;
        right: 60px;
        font-size: 1rem;
    }
}

/* CORRECTIF SÉCURITÉ LIGHTBOX MOBILE */
.lightbox-content {
    touch-action: none; /* Empêche les conflits de scroll natif pendant le swipe */
