/* ===== NOUVELLE GALERIE OPTIMISÉE ===== */

.gallery-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Filtres */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #00abf0;
    background: transparent;
    color: #00abf0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
}

.filter-btn:hover {
    background: #00abf0;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 171, 240, 0.3);
}

.filter-btn.active {
    background: #00abf0;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 171, 240, 0.3);
}

/* Aperçu des Réalisations */
.gallery-preview {
    display: block;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.preview-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    aspect-ratio: 4/3;
    height: 280px;
}

.preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.preview-item:hover img {
    transform: scale(1.05);
}

.preview-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 171, 240, 0.8), rgba(0, 123, 191, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.preview-item-overlay h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.view-all-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, #00abf0, #007bff);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 171, 240, 0.3);
}

/* Modal Galerie Moderne */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 27, 41, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: 90vh;
    background: linear-gradient(135deg, #112e42 0%, #081b29 100%);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 171, 240, 0.1);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(0, 171, 240, 0.2);
}

@keyframes modalSlideIn {
    from {
    opacity: 0;
        transform: scale(0.7) translateY(50px);
  }
    to {
    opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, #00abf0, #007bff);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.modal-header h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-body {
    padding: 0;
    height: calc(100% - 100px);
    display: flex;
    flex-direction: column;
}

.modal-image-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #0a1f2e 0%, #1a3a4a 100%);
}

.modal-image-container img {
    max-width: 80%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 171, 240, 0.1);
    transition: transform 0.3s ease;
}

.modal-image-container img:hover {
    transform: scale(1.01);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #00abf0, #007bff);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 171, 240, 0.3);
    font-size: 1.2rem;
    z-index: 10;
}

.modal-nav:hover {
    background: linear-gradient(135deg, #007bff, #0056b3);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 171, 240, 0.4);
}

.modal-nav.prev {
    left: 2rem;
}

.modal-nav.next {
    right: 2rem;
}

.modal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    background: linear-gradient(135deg, #1a3a4a 0%, #0a1f2e 100%);
    border-top: 1px solid rgba(0, 171, 240, 0.2);
}

.modal-info span {
    font-weight: 600;
    color: #00abf0;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.modal-counter {
    background: rgba(0, 171, 240, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 171, 240, 0.3);
}

.modal-category {
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* Responsive Design */
@media (max-width: 768px) {
    .gallery-filters {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .preview-item {
        height: 200px;
    }
    
    .gallery-modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 1.5rem 2rem;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .modal-close {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .modal-image-container {
        padding: 1rem;
    }
    
    .modal-image-container img {
        max-height: 60vh;
    }
    
    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .modal-nav.prev {
        left: 1rem;
    }
    
    .modal-nav.next {
        right: 1rem;
    }
    
    .modal-info {
        padding: 1rem 2rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .modal-info span {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-btn {
        flex-shrink: 0;
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .preview-item {
        height: 250px;
    }
}

/* Loading Animation */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #00abf0;
    font-size: 1.2rem;
}

.gallery-loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.gallery-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.gallery-empty h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.gallery-empty p {
    color: #666;
}
    