/* ========================================
   VARIABLES ET RESET
   ======================================== */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #334155;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ========================================
   EN-TÊTE
   ======================================== */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header h1 i {
    margin-right: 15px;
}

header .subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.95;
}

/* ========================================
   NAVIGATION ALBUMS
   ======================================== */
.albums-nav {
    padding: 60px 20px;
    background: white;
    margin: 40px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.albums-nav h2 {
    color: var(--dark-color);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.album-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.album-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.album-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.album-info {
    padding: 20px;
}

.album-info h3 {
    color: var(--dark-color);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.album-info p {
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

.album-count {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ========================================
   SECTION GALERIE
   ======================================== */
.gallery-section {
    padding: 40px 20px;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.gallery-header h2 {
    color: var(--dark-color);
    font-size: 2rem;
}

.slideshow-controls {
    display: flex;
    gap: 10px;
}

.btn-control {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-control:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-control.active {
    background: var(--primary-color);
    color: white;
}

/* ========================================
   DIAPORAMA
   ======================================== */
.slideshow-container {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.slide-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    flex-direction: column;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
    cursor: pointer;
}

.slide-info {
    padding: 30px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95), white);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-info h3 {
    color: var(--dark-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.slide-info p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Contrôles de navigation */
.slide-nav {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
    z-index: 10;
    box-shadow: var(--shadow);
}

.slide-nav:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.slide-nav.prev {
    left: 20px;
}

.slide-nav.next {
    right: 20px;
}

/* Indicateurs */
.slide-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid white;
}

.indicator.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* ========================================
   MINIATURES
   ======================================== */
.thumbnails-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.thumbnails-container h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.thumbnail {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    aspect-ratio: 1;
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: var(--transition);
}

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

.thumbnail-overlay h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

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

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

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.lightbox-caption {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
    max-width: 600px;
    text-align: center;
}

.lightbox-caption h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.lightbox-caption p {
    color: var(--text-color);
    font-size: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.lightbox-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* ========================================
   PIED DE PAGE
   ======================================== */
footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

footer p {
    margin: 5px 0;
}

footer i {
    color: #ef4444;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header .subtitle {
        font-size: 1rem;
    }

    .albums-grid {
        grid-template-columns: 1fr;
    }

    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .slideshow-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .btn-control {
        flex: 1;
        min-width: 150px;
        justify-content: center;
    }

    .slide-wrapper {
        height: 500px;
    }

    .slide-image {
        height: 60%;
    }

    .slide-info {
        padding: 20px;
    }

    .slide-info h3 {
        font-size: 1.3rem;
    }

    .slide-info p {
        font-size: 0.95rem;
    }

    .slide-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .slide-nav.prev {
        left: 10px;
    }

    .slide-nav.next {
        right: 10px;
    }

    .thumbnails-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .thumbnails-container {
        padding: 25px;
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .albums-nav,
    .thumbnails-container {
        padding: 20px;
        margin: 20px 10px;
    }

    .slide-wrapper {
        height: 400px;
    }

    .thumbnails-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
