/* ===== REALISATIONS PAGE ===== */

.realisations-section {
    background-color: #fff;
    padding: 60px 0;
}

/* Largeur/centrage hérités de la classe Bootstrap "container" (alignée sur
   le logo et le bouton "Demander un devis" de la navbar). */

/* Filters Section */
.realisations-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filters-left {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-btn {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #222;
    padding: 12px 18px;
    min-height: 44px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover {
    background: #fff;
    border-color: #d32f2f;
    color: #d32f2f;
    transform: translateY(-2px);
}

.filter-btn:active {
    transform: translateY(0);
}

.filter-btn:focus-visible {
    outline: 2px solid #d32f2f;
    outline-offset: 2px;
}

.filter-btn.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

@media (max-width: 480px) {
    .realisations-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .search-input {
        min-width: 0;
        width: 100%;
    }
}

.filters-right {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    min-width: 250px;
}

.search-input::placeholder {
    color: #999;
}

.search-input:focus {
    outline: none;
    border-color: #d32f2f;
}

/* Sous-filtre : type d'événement (n'apparaît que si la catégorie "Événementiel" est active) */
.realisations-subfilters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -20px 0 40px;
    padding: 16px 18px;
    background: #fafafa;
    border: 1px dashed #e0e0e0;
    border-radius: 8px;
}

.subfilter-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #666;
    padding: 8px 14px;
    min-height: 36px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
}

.subfilter-btn:hover {
    border-color: #d32f2f;
    color: #d32f2f;
}

.subfilter-btn.active {
    background: #d32f2f;
    color: #fff;
    border-color: #d32f2f;
}

@media (max-width: 480px) {
    .realisations-subfilters {
        margin-top: -10px;
    }
}

.no-results-message {
    display: none;
    text-align: center;
    margin-top: 30px;
    font-size: 1rem;
    color: #333;
}

/* =========================================
   GROUPES PAR ANNÉE
========================================= */
.year-section {
    margin-bottom: 56px;
}

.year-section-header {
    margin-bottom: 22px;
}

.year-title-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 10px;
}

.year-title {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(1.25rem, 2.3vw, 2rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.year-count {
    font-size: 13px;
    color: #999;
}

.year-divider {
    display: block;
    width: 44px;
    height: 3px;
    background: #d32f2f;
    border-radius: 2px;
}

.year-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.year-scroll-btn {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #222;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.year-scroll-btn:hover {
    background: #f5f5f5;
    transform: scale(1.08);
}

.year-scroll-btn:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

.year-scroll-row {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 22px;
    overflow-x: auto;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    touch-action: pan-y;
    padding-bottom: 6px;
}

.year-scroll-row::-webkit-scrollbar {
    display: none;
}

.year-scroll-row.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

/* Carte réalisation : grande photo de couverture + petites photos empilées */
.realisation-card {
    all: unset;
    box-sizing: border-box;
    flex: 0 0 260px;
    width: 260px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.realisation-card-cover {
    position: relative;
    display: block;
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
}

.realisation-card-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.realisation-card-cover-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8, #d8d8d8);
}

.realisation-card:hover .realisation-card-cover-img {
    transform: scale(1.06);
}

.realisation-card-stack {
    position: absolute;
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.realisation-card-stack-1 {
    bottom: 8px;
    right: 8px;
    transform: rotate(5deg);
    z-index: 3;
}

.realisation-card-stack-2 {
    bottom: 15px;
    right: 24px;
    transform: rotate(-7deg);
    z-index: 2;
}

.realisation-card-stack-3 {
    bottom: 22px;
    right: 40px;
    transform: rotate(10deg);
    z-index: 1;
}

.realisation-card-caption {
    display: block;
    padding-top: 12px;
}

.realisation-card-category {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #d32f2f;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.realisation-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
}

/* Tuile "+N" en fin de rangée */
.realisation-more-tile {
    all: unset;
    box-sizing: border-box;
    flex: 0 0 260px;
    width: 260px;
    height: 180px;
    border-radius: 8px;
    border: 2px dashed rgba(0, 0, 0, 0.15);
    background: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    color: #222;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.realisation-more-tile:hover {
    border-color: #d32f2f;
    color: #d32f2f;
}

.realisation-more-icon {
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    color: #d32f2f;
}

.realisation-more-count {
    font-size: 13px;
    font-weight: 700;
}

.realisation-more-label {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
}

/* =========================================
   FENÊTRE DE DÉTAIL
========================================= */
.realisation-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10020;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.realisation-modal.is-open {
    display: flex;
}

.realisation-modal-inner {
    width: 100%;
    max-width: 1200px;
    height: 88vh;
    display: flex;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
}

.realisation-modal-media {
    position: relative;
    flex: 1 1 65%;
    min-width: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.realisation-modal-media-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.realisation-modal-image {
    width: 100%;
    height: 100%;
    max-height: 88vh;
    object-fit: contain;
    border: none;
    display: block;
}

.realisation-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 26px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

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

.realisation-modal-prev {
    left: 16px;
}

.realisation-modal-next {
    right: 16px;
}

.realisation-modal-counter {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    letter-spacing: 1px;
}

.realisation-modal-details {
    flex: 0 0 320px;
    background: #0d0d0d;
    color: #fff;
    padding: 34px 28px;
    overflow-y: auto;
}

.realisation-modal-category {
    display: block;
    color: #d32f2f;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

.realisation-modal-title {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(1.25rem, 1.7vw, 1.5rem);
    font-weight: 700;
    color: #fff;
    margin: 14px 0 10px;
    line-height: 1.3;
}

.realisation-modal-meta {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    margin: 0;
}

.realisation-modal-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.7;
    margin: 16px 0 0;
}

.realisation-modal-description:empty {
    display: none;
}

.realisation-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    z-index: 10021;
    transition: color 0.2s ease, transform 0.2s ease;
}

.realisation-modal-close:hover {
    color: #d32f2f;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 900px) {
    .realisation-modal-inner {
        flex-direction: column;
        max-height: 92vh;
        overflow-y: auto;
    }

    .realisation-modal-media {
        flex: 0 0 auto;
        height: 46vh;
    }

    .realisation-modal-details {
        flex: 0 0 auto;
    }
}

@media (max-width: 1024px) {
    .realisation-card,
    .realisation-more-tile {
        flex-basis: 220px;
        width: 220px;
    }

    .realisation-card-cover {
        height: 155px;
    }
}

@media (max-width: 768px) {
    .realisations-section {
        padding: 40px 0;
    }

    .year-scroll-btn {
        display: none;
    }

    .realisation-card,
    .realisation-more-tile {
        flex-basis: 190px;
        width: 190px;
    }

    .realisation-card-cover {
        height: 135px;
    }

    .realisation-modal {
        padding: 14px;
    }

    .realisation-modal-details {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .realisations-section {
        padding: 30px 0;
    }

    .realisation-card,
    .realisation-more-tile {
        flex-basis: 165px;
        width: 165px;
    }

    .realisation-card-cover {
        height: 115px;
    }

    .realisation-card-title {
        font-size: 13px;
    }
}
