:root {
    --primary-color: #3a4f66;
    --secondary-color: #f8f9fa;
    --accent-color: #ff6b6b;
    --transition-speed: 0.4s;
}

.album-container {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('/image/ecole-c.jpg');
    background-size: cover;
    background-position: center;
    /* height: 60vh; */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--accent-color), #4ecdc4, #1a535c);
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Animations d'entrée */
.animate-fade-in {
    animation: fadeIn 1.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 1s ease-out 0.5s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* Preview Section */
.preview-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
}

.preview-container {
    height: 600px;
    background-color: #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.preview-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: opacity var(--transition-speed), transform 0.3s ease;
}

.preview-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.preview-loader.show {
    opacity: 1;
}

.preview-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    pointer-events: none;
    z-index: 3;
}

.btn-control {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-control:hover {
    background: white;
    transform: scale(1.1);
}

.preview-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-container:hover .preview-caption {
    opacity: 1;
}

/* Thumbnail Grid */
.gallery-grid {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
    transition: all 0.3s ease;
}

.gallery-grid::-webkit-scrollbar {
    width: 6px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: #c4bddb;
    border-radius: 10px;
}

.gallery-grid.list-view {
    max-height: none;
}

.gallery-grid.list-view .row {
    flex-direction: column;
}

.gallery-grid.list-view .thumbnail-item {
    width: 100%;
    margin-bottom: 15px;
}

.gallery-grid.list-view .gallery-thumb {
    height: 120px;
    width: 100%;
}

.thumbnail-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.thumbnail-item:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-item:hover .gallery-thumb {
    transform: scale(1.05);
}

.gallery-thumb {
    transition: all 0.5s ease;
    width: 100%;
    object-fit: cover;
}

.vertical-img {
    height: 150px;
}

.horizontal-img {
    height: 100px;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(58, 79, 102, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 1.5rem;
}

.gallery-header {
    padding: 0 10px;
}

/* Lightbox */
#lightboxModal .modal-content {
    background: transparent;
    box-shadow: none;
}

#lightboxImage {
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .preview-container {
        height: 400px;
    }

    .gallery-grid {
        max-height: none;
        margin-top: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .preview-controls {
        display: none;
    }

    .preview-caption {
        opacity: 1;
        background: rgba(0, 0, 0, 0.6);
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-section {
        height: 50vh;
    }

    .preview-container {
        height: 300px;
    }

    .vertical-img {
        height: 120px;
    }

    .horizontal-img {
        height: 80px;
    }
}