/* ========================================
   GALERIE.CSS - Version Compacte & Moderne
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary-blue: #2b7a9d;
    --primary-orange: #f5851f;
    --dark-orange: #e67514;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-gray: #7f8c8d;
    --light-gray: #ecf0f1;
    --font-main: 'Poppins', sans-serif;
}

/* ===== PAGE HERO - COMPACT ===== */
.page-hero {
    position: relative;
    padding: 140px 0 60px;
    background: linear-gradient(135deg, rgba(43, 122, 157, 0.95), rgba(245, 133, 31, 0.9)),
                url('../images/hero-bg.jpg') center/cover fixed;
    margin-top: 80px;
    color: var(--white);
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 60% 40%, rgba(245, 133, 31, 0.3), transparent 70%);
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-orange);
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.5);
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.page-hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.95;
}

/* ===== GALLERY SECTION ===== */
.gallery-section {
    padding: 60px 0;
    background: linear-gradient(to bottom, #f8f9fa, var(--white));
}

/* ===== FILTRES COMPACTS ===== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 15px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dark);
    font-family: var(--font-main);
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    background: rgba(43, 122, 157, 0.05);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(43, 122, 157, 0.3);
}

.filter-btn i {
    font-size: 14px;
}

/* ===== RESULTS INFO ===== */
.results-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--white);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    font-weight: 600;
    color: var(--primary-blue);
    font-family: var(--font-main);
    font-size: 14px;
}

.results-info i {
    color: var(--primary-orange);
    font-size: 16px;
}

/* ===== GRILLE COMPACTE - FORMAT CARRÉ ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== GALLERY CARD - ASPECT RATIO 1:1 ===== */
.gallery-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--light-gray);
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.card-media {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-media img,
.card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-card:hover .card-media img,
.gallery-card:hover .card-media video {
    transform: scale(1.1);
}

/* ===== PLAY BUTTON ===== */
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(245, 133, 31, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 22px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.gallery-card:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--primary-orange);
}

/* ===== CARD OVERLAY ===== */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s;
}

.gallery-card:hover .card-overlay {
    opacity: 1;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--primary-orange);
    color: var(--white);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 10px;
}

.card-overlay h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    font-family: var(--font-main);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 70px;
    color: #d0d0d0;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-weight: 700;
}

.empty-state p {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 25px;
}

/* ===== LIGHTBOX - FULLSCREEN ===== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== LIGHTBOX CONTROLS ===== */
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-orange);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.lightbox-close:hover {
    background: var(--dark-orange);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:hover {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* ===== LIGHTBOX CONTENT ===== */
.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#lightboxMedia {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightboxMedia img,
#lightboxMedia video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ===== LIGHTBOX INFO ===== */
.lightbox-info {
    text-align: center;
    color: var(--white);
    margin-top: 20px;
    padding: 0 20px;
}

.lightbox-category {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-orange);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

#lightboxTitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: var(--font-main);
}

.lightbox-counter {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
}

/* ===== CTA BANNER ===== */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
    padding: 60px 0;
    margin-top: 40px;
}

.cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cta-text {
    flex: 1;
    color: var(--white);
}

.cta-text h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    font-family: var(--font-main);
}

.cta-text p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.cta-actions {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--white);
}

.btn-primary:hover {
    background: var(--primary-orange);
    color: var(--white);
    border-color: var(--primary-orange);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 768px) {
    .page-hero {
        padding: 120px 0 50px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .gallery-card {
        border-radius: 12px;
    }
    
    .filter-bar {
        padding: 12px;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .filter-btn i {
        font-size: 13px;
    }
    
    .card-overlay h3 {
        font-size: 0.95rem;
    }
    
    .card-tag {
        font-size: 10px;
        padding: 4px 12px;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
    
    #lightboxMedia {
        max-height: 70vh;
    }
    
    #lightboxMedia img,
    #lightboxMedia video {
        max-height: 70vh;
    }
    
    #lightboxTitle {
        font-size: 1.2rem;
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-text h2 {
        font-size: 1.8rem;
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        gap: 8px;
    }
    
    .page-hero h1 {
        font-size: 1.8rem;
    }
    
    .breadcrumb {
        font-size: 12px;
        padding: 6px 16px;
    }
}