/* Hero Section pour la page Projets */
.page-hero {
    background: linear-gradient(rgba(0, 0, 123, 0.7), rgba(0, 0, 123, 0.7)), url('https://images.unsplash.com/photo-1493663284031-b7e3aaa4c4b8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80');
    background-size: cover;
    background-position: center;
    height: 50vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.page-hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-top: 1rem;
}

.breadcrumb li {
    margin: 0 0.5rem;
}

.breadcrumb li a {
    color: white;
    text-decoration: none;
}

.breadcrumb li:after {
    content: ">";
    margin-left: 1rem;
    color: #e30303;
}

.breadcrumb li:last-child:after {
    content: "";
}

/* Filters Section */
.filters-section {
    padding: 2rem 0;
    background-color: #f0f0f0;
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: white;
    border: 2px solid #00007b;
    color: #00007b;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: #00007b;
    color: white;
}

/* Gallery Section */
.gallery-section {
    padding: 3rem 0 5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 123, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s;
}

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

.gallery-info {
    text-align: center;
    color: white;
    padding: 1rem;
}

.gallery-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.gallery-info p {
    margin-bottom: 1.5rem;
}

.view-gallery-btn {
    background: #e30303;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.view-gallery-btn:hover {
    background: #c40202;
}


/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease, color 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: #e30303;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 123, 0.8);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 1.5rem;
}

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

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-image-container {
    position: relative;
    max-width: 100%;
    max-height: 80vh;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lightbox-image.loaded {
    opacity: 1;
    transform: scale(1);
}

.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1.2rem;
    text-align: center;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lightbox-caption.active {
    opacity: 1;
    transform: translateY(0);
}

.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0.5rem;
}

.lightbox-thumbnail {
    width: 80px;
    height: 60px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    border: 3px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.lightbox-thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.lightbox-thumbnail.active {
    opacity: 1;
    border-color: #e30303;
    transform: scale(1.1);
}

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

/* Loading animation */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #e30303;
    animation: spin 1s ease-in-out infinite;
    z-index: 5;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Navigation par swipe sur mobile */
.lightbox-image-container {
    touch-action: pan-y;
}

/* Responsive pour la lightbox */
@media (max-width: 968px) {
    .lightbox-nav {
        width: 50px;
        height: 50px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        background: rgba(0, 0, 0, 0.5);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .lightbox-thumbnails {
        justify-content: flex-start;
    }
    
    .lightbox-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .lightbox-caption {
        font-size: 1rem;
        padding: 1rem;
    }
}




/* CTA Section */
.cta-section {
    background: linear-gradient(rgba(0, 0, 123, 0.8), rgba(0, 0, 123, 0.8)), url('https://images.unsplash.com/photo-1545235617-9465d2a55698?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1780&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 5rem 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-section p {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
}

/* Responsive pour la page Projets */
@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-thumbnails {
        justify-content: flex-start;
    }
}