/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body, .header, .main-content, .nav {
    max-width: 100%;
}

body {
    background-color: black;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Bandeau de navigation */
.header {
    height: 10vh;
    max-height: 10%;
    background-color: black;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.logo {
    height: 80%;
    flex-shrink: 0;
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.logo a {
    display: block;
    height: 100%;
}

.nav {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #333;
}

.nav-link.active {
    background-color: #555;
}

/* Menu hamburger (mobile uniquement) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* Contenu principal */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Page d'accueil */
.home-photo_couverture {
    margin-bottom: 40px;
    text-align: center;
}

.home-photo_couverture img {
    width: 50%;
    height: auto;
}

.description {
    text-align: center;
    max-width: 600px;
    line-height: 1.6;
}

/* Section réseaux sociaux */
.social-media {
    margin-top: 40px;
    text-align: center;
}

.social-media h3 {
    color: #4267B2;
    font-size: 18px;
    margin-bottom: 30px;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.social-link {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.social-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
}

/* Page agenda */
.agenda-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.agenda-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
}

/* Section événements passés */
.past-events-section {
    margin-top: 60px;
    margin-bottom: 60px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.past-events-title {
    text-align: center;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 15px;
    background-color: #111;
    border: 1px solid #333;
    border-radius: 5px;
    transition: background-color 0.3s;
    user-select: none;
    margin: 0 auto;
    max-width: 400px;
}

.past-events-title:hover {
    background-color: #222;
    color: white;
}

.past-events-title span {
    margin-left: 10px;
    font-size: 16px;
}

#past-events-list {
    margin-top: 15px;
}

.event {
    background-color: #111;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.event:hover {
    background-color: #222;
}

.event-header {
    color: white;
}

.event-date {
    font-weight: bold;
    font-size: 14px;
    color: #4267B2;
    margin-bottom: 5px;
}

.event-details {
    line-height: 1.4;
}

.event-preview {
    margin-top: 15px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.event-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.event-preview iframe {
    max-width: 100%;
}

/* Page contact */
.contact-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.contact-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    padding: 10px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #222;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 12px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4267B2;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    padding: 12px 20px;
    background-color: #4267B2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #365899;
}

/* Page photos */
.photos-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.photos-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
}

/* Grille de photos */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.photo-item:hover img {
    filter: brightness(1.1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

.close-lightbox:hover {
    color: #4267B2;
}

/* Flèches de navigation dans le lightbox */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 40px;
    font-weight: bold;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    z-index: 1001;
    user-select: none;
}

.nav-arrow:hover {
    background-color: rgba(66, 103, 178, 0.8);
    color: white;
}

.nav-arrow-left {
    left: 30px;
}

.nav-arrow-right {
    right: 30px;
}

/* Compteur d'images */
.image-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1001;
}

.coming-soon {
    text-align: center;
    font-size: 16px;
    color: #999;
}

/* ========================================
   RESPONSIVE - OPTIMISATION MOBILE
   ======================================== */

/* Tablettes et petits écrans (< 992px) */
@media (max-width: 992px) {
    .home-photo_couverture img {
        width: 70%;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .photos-container,
    .agenda-container,
    .contact-container {
        padding: 0 15px;
    }
}

/* Smartphones (< 768px) */
@media (max-width: 768px) {
    /* Header responsive avec menu hamburger */
    .header {
        height: auto;
        min-height: 70px;
        flex-direction: row;
        justify-content: center;
        padding: 10px 15px;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        position: relative;
    }
    
    .hamburger {
        display: flex;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .logo {
        height: 60px;
        max-width: 200px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }
    
    .logo img {
        max-width: 100%;
        height: auto;
        max-height: 60px;
    }
    
    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 250px;
        height: 100vh;
        background-color: #000;
        flex-direction: column;
        gap: 0;
        padding-top: 80px;
        transition: left 0.3s ease;
        z-index: 1000;
        border-right: 1px solid #333;
        overflow-y: auto;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-link {
        text-align: left;
        padding: 20px 25px;
        width: 100%;
        border-bottom: 1px solid #333;
        border-radius: 0;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .nav-link:hover {
        background-color: #222;
    }
    
    /* Contenu principal */
    .main-content {
        padding: 20px 15px;
    }
    
    /* Page d'accueil */
    .home-photo_couverture {
        margin-bottom: 30px;
    }
    
    .home-photo_couverture img {
        width: 90%;
    }
    
    .description {
        max-width: 100%;
        padding: 0 10px;
        font-size: 15px;
    }
    
    /* Réseaux sociaux responsive */
    .social-media {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .social-media h3 {
        font-size: 16px;
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    .social-icons {
        gap: 30px;
    }
    
    .social-icon {
        width: 60px;
        height: 60px;
    }
    
    /* Page agenda */
    .agenda-title {
        font-size: 20px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .past-events-section {
        margin-top: 40px;
        margin-bottom: 40px;
    }
    
    .past-events-title {
        font-size: 18px;
        max-width: 100%;
        padding: 12px;
    }
    
    .event {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .event-date {
        font-size: 13px;
    }
    
    .event-details {
        font-size: 14px;
    }
    
    /* Page contact */
    .contact-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .contact-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 14px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    /* Page photos */
    .photos-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .photos-title {
        font-size: 20px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Lightbox mobile */
    .lightbox img {
        max-width: 95%;
        max-height: 95%;
    }
    
    .close-lightbox {
        top: 10px;
        right: 15px;
        font-size: 35px;
    }
    
    .nav-arrow {
        font-size: 30px;
        padding: 8px 12px;
    }
    
    .nav-arrow-left {
        left: 10px;
    }
    
    .nav-arrow-right {
        right: 10px;
    }
    
    .image-counter {
        bottom: 20px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Très petits écrans (< 480px) */
@media (max-width: 480px) {
    .header {
        min-height: 60px;
        padding: 10px;
    }
    
    .hamburger {
        left: 10px;
    }
    
    .logo {
        height: 50px;
        max-width: 180px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    .nav {
        width: 220px;
        padding-top: 70px;
    }
    
    .nav-link {
        padding: 18px 20px;
        font-size: 13px;
    }
    
    .home-photo_couverture img {
        width: 95%;
    }
    
    .description {
        font-size: 14px;
    }
    
    .agenda-title,
    .contact-title,
    .photos-title {
        font-size: 18px;
    }
    
    .past-events-title {
        font-size: 16px;
        padding: 10px;
    }
    
    .event {
        padding: 10px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .photo-item:hover {
        transform: none;
    }
}