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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding-top: 80px;
}

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
}
header a {
    color: white;
    text-decoration: none;
}

/* Navigation Desktop */
nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

nav a {
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

nav a:hover {
    color: #3498db;
}

/* Menu Hamburger */
.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Sections */
main {
    padding: 0;
}

section {
    min-height: 100vh;
    padding: 4rem 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-size: cover !important;
    background-position: center !important;
    background-blend-mode: overlay;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #3498db;
}

section p {
    margin-bottom: 1rem;
    max-width: 100%;
}



/* Images standards dans les posts */
section img:not(div[class*='gallery'] img) {
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
    margin: 1rem 0 0 0;
}

section figure {
    margin-bottom: 1em;
    text-align: center;
}

/* Galerie améliorée */
div[class*='gallery'] ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

div[class*='gallery'] li {
    display: flex;
    flex-direction: column;
    height: 100%;
}

div[class*='gallery'] a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

div[class*='gallery'] img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

div[class*='gallery'] a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

div[class*='gallery'] a:hover img {
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* Responsive */
@media (min-width: 1200px) {
    div[class*='gallery'] ul {
        grid-template-columns: repeat(5, minmax(200px, 1fr));
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    div[class*='gallery'] ul {
        grid-template-columns: repeat(4, minmax(200px, 1fr));
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    div[class*='gallery'] ul {
        grid-template-columns: repeat(3, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #2c3e50;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-out;
        text-align: center; /* Centrage du menu mobile */
    }
    
    nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 5%;
    }
    
    nav li {
        padding: 0.5rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Animation hamburger */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    div[class*='gallery'] ul {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    div[class*='gallery'] ul {
        grid-template-columns: 1fr;
    }
    
    section img:not(div[class*='gallery'] img) {
        border-radius: 6px;
    }
}

/* Lightbox */
.sl-overlay {
    background: rgba(0, 0, 0, 0.9) !important;
}

.sl-wrapper .sl-close,
.sl-wrapper .sl-counter,
.sl-wrapper .sl-navigation button {
    color: white !important;
}

.sl-additional-html{
    color: white;
    text-align: right;
}