/* Styles pour la galerie de médias */

/* Section Hero avec image de couverture favoris en pleine largeur */
.media-hero-banner-large-image {
    position: relative;
    width: 100%;
    min-height: 500px;
    /* Étendre l'image pour couvrir toute la largeur sans duplication */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;
    margin-bottom: 0;
    overflow: hidden;
}

.media-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 50%, rgba(0, 0, 0, 0.75) 100%);
    z-index: 1;
}

.media-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 3rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.media-hero-content .bg-title {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 1.5rem;
    padding: 0.6rem 2rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.media-hero-content .title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.media-hero-content .disc {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6), 0 1px 4px rgba(0, 0, 0, 0.4);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.media-hero-content .cover-caption {
    font-size: 1.1rem;
    color: #fff;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.media-hero-content .cover-caption i {
    color: #ffd700;
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@media (max-width: 992px) {
    .media-hero-banner-large-image {
        min-height: 400px;
        padding: 4rem 0;
    }
    
    .media-hero-content .title {
        font-size: 2.5rem;
    }
    
    .media-hero-content .disc {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .media-hero-banner-large-image {
        min-height: 350px;
        padding: 3rem 0;
    }
    
    .media-hero-content {
        padding: 1.5rem 1rem;
    }
    
    .media-hero-content .bg-title {
        font-size: 12px;
        padding: 0.5rem 1.5rem;
        margin-bottom: 1rem;
    }
    
    .media-hero-content .title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .media-hero-content .disc {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .media-hero-content .cover-caption {
        font-size: 0.95rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
}

.media-gallery-wrapper {
    padding: 2rem 0;
}

.gallery-filters {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.gallery-filters .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

.media-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    background: #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.media-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.media-thumbnail {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.media-item:hover .media-thumbnail img {
    transform: scale(1.1);
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 1.5rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.media-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: white;
}

.media-caption {
    font-size: 0.9rem;
    margin: 0 0 0.75rem 0;
    opacity: 0.9;
    line-height: 1.4;
}

.media-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.keyword-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
}

/* Page détail média */
.media-detail-wrapper {
    padding: 2rem 0;
}

.media-detail-image {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.media-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.media-detail-info {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.media-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.media-detail-header h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    color: #333;
}

.media-detail-caption {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.media-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.media-meta-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.media-meta-item dt {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-meta-item dd {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.media-meta dd code {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #333;
}

.media-keywords-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.media-keywords-section h3 {
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    color: #333;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.keyword-list li {
    margin: 0;
}

.keyword-list a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.keyword-list a:hover {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.media-share-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.media-share-section h3 {
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    color: #333;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.share-btn.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.share-btn.twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.share-btn.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}

.share-btn.email:hover {
    background: #333;
    border-color: #333;
    color: white;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    overflow-y: auto;
}

.lightbox-image-wrapper {
    flex: 1 1 60%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-info {
    flex: 1 1 40%;
    min-width: 300px;
    color: white;
    padding: 1rem;
}

.lightbox-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-title {
    font-size: 2rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.lightbox-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.lightbox-detail-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.lightbox-caption {
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
    opacity: 0.95;
    line-height: 1.6;
    font-weight: 500;
}

.lightbox-description {
    font-size: 1.15rem;
    margin: 0 0 1.5rem 0;
    opacity: 0.9;
    line-height: 1.7;
}

.lightbox-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.lightbox-meta-item {
    font-size: 1.05rem;
    line-height: 1.6;
}

.lightbox-meta-item strong {
    display: inline-block;
    min-width: 120px;
    opacity: 0.95;
    font-weight: 600;
}

.lightbox-meta-item span {
    opacity: 0.9;
}

.lightbox-keywords {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-keywords-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    opacity: 0.95;
}

.lightbox-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lightbox-keyword-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 1rem;
    opacity: 0.95;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

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

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav.prev {
    left: 1rem;
}

.lightbox-nav.next {
    right: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: 1fr;
    }

    .media-detail-header h1 {
        font-size: 1.5rem;
    }

    .media-meta-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-content {
        max-width: 100%;
        padding: 1rem;
        flex-direction: column;
    }

    .lightbox-image-wrapper {
        flex: 1 1 auto;
    }

    .lightbox-info {
        flex: 1 1 auto;
        min-width: auto;
    }
    
    .lightbox-title {
        font-size: 1.5rem;
    }
    
    .lightbox-caption {
        font-size: 1.1rem;
    }
    
    .lightbox-description {
        font-size: 1rem;
    }
    
    .lightbox-meta-item {
        font-size: 0.95rem;
    }
    
    .lightbox-keywords-label {
        font-size: 1rem;
    }
    
    .lightbox-keyword-tag {
        font-size: 0.9rem;
    }

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

    .lightbox-nav.prev {
        left: 0.5rem;
    }

    .lightbox-nav.next {
        right: 0.5rem;
    }
}

/* Indicateur de chargement pour le filtrage dynamique */
#media-loading {
    padding: 2rem;
    text-align: center;
}

#media-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: var(--primary-color, #0066cc);
}

#media-results-container {
    transition: opacity 0.3s ease;
}

/* Animation de fade pour les résultats */
.media-grid {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



