/* Réalisations Page Specific Styles */

.page-header {
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(52, 152, 219, 0.7)), url('../images/realisation/maison_neuve/6.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    min-height: 500px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    padding: 0 20px;
}

.breadcrumb {
    margin-bottom: 20px;
    opacity: 0.8;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb-separator {
    margin: 0 10px;
}

.breadcrumb-current {
    font-weight: 600;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-title-underline {
    width: 100px;
    height: 4px;
    background: var(--accent-color);
    margin: 0 auto 30px;
    border-radius: 2px;
}

.page-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.9;
}

.page-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.page-stat {
    text-align: center;
}

.page-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.page-stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.gallery-section {
    padding: 80px 0;
}

/* Filter Section Styles */
.filter-section {
    margin-bottom: 50px;
    text-align: center;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 5px 15px rgba(245, 101, 0, 0.3);
}

.filter-btn.active:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.load-more-section {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.load-more-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 101, 0, 0.3);
}

/* Portfolio Modal Styles */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.portfolio-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.portfolio-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 15px;
}

.modal-next {
    right: 15px;
}

.modal-image-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    min-height: 400px;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-info {
    padding: 25px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.modal-counter {
    margin-top: 15px;
    text-align: center;
}

.modal-counter span {
    background: var(--bg-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-header {
        min-height: 400px;
        padding-top: 70px;
        background-attachment: scroll;
    }
    
    .page-title {
        font-size: 2.5rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .page-stats {
        gap: 20px;
    }

    .page-stat-number {
        font-size: 2rem;
    }

    .gallery-section {
        padding: 60px 0;
    }

    .filter-section {
        margin-bottom: 40px;
    }

    .filter-buttons {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        margin-bottom: 40px;
    }

    .gallery-item {
        border-radius: 12px;
    }

    .load-more-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 20px;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .modal-info {
        padding: 20px;
    }

    .modal-image-container {
        min-height: 300px;
    }

    .modal-image-container img {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .page-header {
        min-height: 350px;
        padding-top: 60px;
    }
    
    .page-header-content {
        padding: 0 15px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .page-stats {
        flex-direction: column;
        gap: 15px;
    }

    .gallery-section {
        padding: 40px 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .load-more-btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }

    .modal-content {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .modal-info {
        padding: 15px;
    }

    .modal-nav {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .modal-image-container img {
        max-height: 50vh;
    }
}

@media (max-width: 360px) {
    .page-title {
        font-size: 1.75rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .gallery-grid {
        gap: 12px;
    }

    .load-more-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Utility classes */
.d-flex {
    display: flex;
}

.gap-2 {
    gap: 1rem;
}

.justify-center {
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
