/*
 * Fichier : gallery.css
 * Description : Styles spécifiques pour la page Galerie
 */

/* ===== BANNIÈRE GALERIE ===== */
.gallery-banner {
    background: linear-gradient(rgba(0, 86, 179, 0.85), rgba(0, 86, 179, 0.9)), url('../images/gallery/banner.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    text-align: center;
}

.gallery-banner .banner-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.gallery-banner .banner-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ===== STATISTIQUES GALERIE ===== */
.gallery-stats {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 30px 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
    line-height: 1;
}

.stat-label {
    color: var(--gray-color);
    font-size: 1rem;
    font-weight: 500;
}

/* ===== FILTRES GALERIE ===== */
.gallery-filters-section {
    padding: 40px 0;
    background-color: white;
    border-bottom: 1px solid #eee;
}

.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.filter-btn {
    padding: 10px 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-box {
    position: relative;
    min-width: 300px;
}

#gallery-search {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: var(--transition);
}

#gallery-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    font-size: 1rem;
}

/* ===== GALERIE PRINCIPALE ===== */
.main-gallery {
    padding: 80px 0;
    background-color: white;
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    color: var(--gray-color);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 15px auto 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    opacity: 1;
    transform: scale(1);
}

.gallery-item.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

.gallery-item-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

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

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

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

.overlay-content {
    color: white;
    width: 100%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.overlay-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: white;
}

.image-category {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
}

.view-image-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0;
    transform: scale(0.8);
}

.gallery-item:hover .view-image-btn {
    opacity: 1;
    transform: scale(1);
}

.view-image-btn:hover {
    background-color: white;
    transform: scale(1.1);
}

.gallery-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.image-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.image-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray-color);
    font-size: 0.8rem;
}

.image-meta i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.image-description {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}

/* ===== MESSAGE AUCUN RÉSULTAT ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-results-content i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.no-results-content p {
    color: var(--gray-color);
    margin-bottom: 25px;
    line-height: 1.6;
}

.btn-reset-filters {
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset-filters:hover {
    background-color: #004494;
}

/* ===== PAGINATION ===== */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 25px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    color: var(--dark-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn:not(:disabled):hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-numbers {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-color);
    font-weight: 500;
}

.page-number:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.page-number.active {
    background-color: var(--primary-color);
    color: white;
}

.dots {
    color: var(--gray-color);
}

/* ===== PROJETS SPÉCIAUX ===== */
.featured-projects {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.projects-slider {
    position: relative;
    margin: 50px 0;
    overflow: hidden;
}

.project-slide {
    display: none;
    animation: fadeIn 0.5s ease;
}

.project-slide.active {
    display: block;
}

.project-slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.project-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

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

.project-slide:hover .project-image img {
    transform: scale(1.05);
}

.project-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-details {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-details h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--dark-color);
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.project-stats .stat {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.project-stats .stat i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--dark-color);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: 5px;
}

.project-description {
    color: var(--gray-color);
    line-height: 1.6;
    margin-bottom: 30px;
    flex: 1;
}

.project-actions {
    display: flex;
    gap: 15px;
}

.btn-view-project {
    flex: 2;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-view-project:hover {
    background-color: #004494;
}

.btn-learn-more {
    flex: 1;
    padding: 12px 20px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-learn-more:hover {
    background-color: var(--primary-color);
    color: white;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 30px;
}

.slider-prev,
.slider-next {
    width: 50px;
    height: 50px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.slider-prev:hover,
.slider-next:hover {
    background-color: var(--primary-color);
    color: white;
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* ===== SECTION VIDÉOS ===== */
.gallery-videos {
    padding: 80px 0;
    background-color: white;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.video-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.video-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.video-item:hover .play-button {
    background-color: var(--primary-color);
    color: white;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.video-duration {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-description {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== CTA GALERIE ===== */
.gallery-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #003d82 100%);
    color: white;
}

.cta-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.cta-icon {
    font-size: 4rem;
    opacity: 0.8;
}

.cta-text {
    flex: 1;
}

.cta-text h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
}

.cta-actions .btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    border-radius: 10px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.image-viewer-content,
.project-detail-content,
.video-modal-content {
    padding: 0;
    background-color: transparent;
    max-width: 1400px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--secondary-color);
    background-color: rgba(0, 0, 0, 0.7);
}

/* Visionneuse d'image */
.image-viewer {
    background-color: #111;
    color: white;
    border-radius: 10px;
    overflow: hidden;
}

.viewer-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.control-btn {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.control-btn:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.viewer-image-container {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

#viewerImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#viewerImage.loaded {
    opacity: 1;
}

.image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
}

.viewer-info {
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--dark-color);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.info-header h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--dark-color);
    flex: 1;
}

.image-counter {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary-color);
}

.info-description {
    color: var(--gray-color);
    line-height: 1.6;
    margin-bottom: 20px;
}

.info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.info-tags .tag {
    padding: 5px 12px;
    background-color: #f8f9fa;
    color: var(--dark-color);
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid #dee2e6;
}

/* Modal vidéo */
.video-container {
    padding: 20px;
    background-color: #000;
    border-radius: 10px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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