/* ========================================
   GALERIE DYNAMIQUE - ALBUMS
   ======================================== */

/* Grille des albums */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.album-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.album-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.album-card:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

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

.album-info {
    padding: 1.5rem;
}

.album-info h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.album-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: block;
}

.album-description {
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

.album-photo-count {
    margin-top: 0.75rem;
    color: #3498db;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========================================
   LIGHTBOX
   ======================================== */

.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
}

.lightbox.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #e74c3c;
    outline: none;
}

.lightbox-content {
    position: relative;
    margin: 60px auto 20px;
    max-width: 90%;
    text-align: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    font-size: 32px;
    padding: 1rem 1.2rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover,
.lightbox-nav:focus {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
    outline: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 1rem;
    flex-wrap: wrap;
    max-width: 90%;
    margin: 0 auto;
}

.lightbox-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    transition: all 0.3s;
    opacity: 0.6;
}

.lightbox-thumbnails img:hover,
.lightbox-thumbnails img:focus {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    outline: none;
}

.lightbox-thumbnails img.active {
    border-color: white;
    opacity: 1;
}

/* Message de chargement */
.loading-message {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-style: italic;
}

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

@media (max-width: 768px) {
    .albums-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .lightbox-nav {
        font-size: 24px;
        padding: 0.75rem 1rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        right: 20px;
        font-size: 35px;
    }
    
    .lightbox-thumbnails img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .album-info {
        padding: 1rem;
    }
    
    .album-info h3 {
        font-size: 1.1rem;
    }
    
    .lightbox-caption {
        font-size: 1rem;
        padding: 1rem;
    }
}