/* ==========================================================================
   WCOM STUDIO - Réalisations & Portfolio Page Styles (UI/UX Pro Architecture)
   ========================================================================== */

.realisations-page {
    position: relative;
    background-color: #02040a;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Filter Bar & Category Pills
   -------------------------------------------------------------------------- */
.realisations-filter-container {
    position: relative;
    width: 100%;
    margin-bottom: 3rem;
}

.realisations-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 4px 14px 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.realisations-filter-bar::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .realisations-filter-bar {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
        padding-bottom: 6px;
        gap: 12px;
    }
}

.realisations-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
    outline: none;
}

.realisations-filter-btn:hover {
    color: #ffffff;
    background: rgba(24, 34, 53, 0.95);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

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

.realisations-filter-btn.active {
    color: #ffffff;
    background: #0066ff;
    border-color: #0066ff;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.45);
    transform: translateY(-1px);
}

.realisations-filter-btn .filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 19px;
    padding: 0 6px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    transition: all 0.25s ease;
}

.realisations-filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Responsive Projects Grid
   -------------------------------------------------------------------------- */
.realisations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    position: relative;
    width: 100%;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .realisations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (max-width: 640px) {
    .realisations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* --------------------------------------------------------------------------
   Agency Card Architecture (Separated Artwork Stage + Dark Info Panel)
   -------------------------------------------------------------------------- */
.realisation-card {
    display: flex;
    flex-direction: column;
    background: #080f1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s ease,
                box-shadow 0.35s ease;
    will-change: transform, opacity;
}

.realisation-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.38);
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.75),
                0 0 25px rgba(0, 102, 255, 0.16);
}

.realisation-card.is-hidden {
    display: none !important;
    opacity: 0;
    transform: scale(0.96);
}

.realisation-card.is-visible {
    display: flex !important;
    animation: realisationCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes realisationCardIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.realisation-card__link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Top Artwork Stage (Unobstructed Visual Preview) */
.realisation-card__media-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #050911;
}

.realisation-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.realisation-card.format-square .realisation-card__img,
.realisation-card.is-video-card .realisation-card__img {
    object-position: center center;
}

.realisation-card:hover .realisation-card__img {
    transform: scale(1.05);
}

/* Subtle top-only vignette to guarantee badge contrast on white images */
.realisation-card__media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(2, 4, 10, 0.45) 0%,
        rgba(2, 4, 10, 0) 35%,
        rgba(2, 4, 10, 0) 75%,
        rgba(8, 15, 26, 0.65) 100%
    );
    pointer-events: none;
    transition: opacity 0.35s ease;
}

/* Category Badge in Top-Left Corner */
.realisation-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #38bdf8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Expand / Lightbox Zoom Icon in Top-Right */
.realisation-card__zoom-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(3, 7, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.realisation-card__zoom-icon svg {
    width: 15px;
    height: 15px;
}

.realisation-card:hover .realisation-card__zoom-icon {
    opacity: 1;
    transform: scale(1);
    background: #0066ff;
    border-color: #0066ff;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.5);
}

/* Centered Play Button Overlay on Video Cards */
.realisation-card__play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(0, 102, 255, 0.88);
    border: 2px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 102, 255, 0.55);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.realisation-card__play-btn svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
}

.realisation-card:hover .realisation-card__play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    background: #0066ff;
    border-color: #ffffff;
    box-shadow: 0 12px 36px rgba(0, 102, 255, 0.8), 0 0 0 8px rgba(0, 102, 255, 0.2);
}

/* Dedicated High-Contrast Dark Info Panel Below Image */
.realisation-card__body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    padding: 20px 22px 22px;
    background: linear-gradient(180deg, #080f1a 0%, #050a12 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.realisation-card__content {
    margin-bottom: 16px;
}

.realisation-card__title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.38;
    margin: 0 0 12px 0;
    letter-spacing: -0.01em;
    transition: color 0.25s ease;
}

.realisation-card:hover .realisation-card__title {
    color: #38bdf8;
}

/* Refined Dark-Mode Service Pills */
.realisation-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.realisation-card__tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 9px;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.realisation-card:hover .realisation-card__tag {
    border-color: rgba(56, 189, 248, 0.2);
    color: #cbd5e1;
}

/* Card Footer Action Row */
.realisation-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.realisation-card__cta-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #38bdf8;
    transition: color 0.25s ease;
}

.realisation-card:hover .realisation-card__cta-text {
    color: #ffffff;
}

.realisation-card__cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 102, 255, 0.14);
    color: #38bdf8;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.realisation-card:hover .realisation-card__cta-arrow {
    background: #0066ff;
    color: #ffffff;
    transform: translateX(3px);
    box-shadow: 0 0 12px rgba(0, 102, 255, 0.5);
}

/* --------------------------------------------------------------------------
   Fullscreen Lightbox Modal
   -------------------------------------------------------------------------- */
.realisations-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.realisations-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.realisations-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 10, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.realisations-lightbox__content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.realisations-lightbox.is-open .realisations-lightbox__content {
    transform: scale(1);
}

.realisations-lightbox__close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.realisations-lightbox__close:hover {
    background: #0066ff;
    border-color: #0066ff;
    transform: rotate(90deg);
}

.realisations-lightbox__close svg {
    width: 20px;
    height: 20px;
}

.realisations-lightbox__img-wrap {
    width: 100%;
    max-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #050911;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
}

.realisations-lightbox__img-wrap.is-hidden {
    display: none;
}

.realisations-lightbox__img {
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.realisations-lightbox__video-wrap {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #000000;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
}

.realisations-lightbox__video-wrap.is-short {
    max-width: 420px;
    aspect-ratio: 9 / 16;
    max-height: 78vh;
}

.realisations-lightbox__video-wrap.is-hidden {
    display: none;
}

.realisations-lightbox__video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.realisations-lightbox__caption {
    margin-top: 16px;
    text-align: center;
}

.realisations-lightbox__badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #38bdf8;
    margin-bottom: 4px;
}

.realisations-lightbox__title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */
.realisations-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 72px 24px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    margin: 20px auto;
    width: 100%;
    max-width: 580px;
}

.realisations-empty.is-hidden {
    display: none;
}

.realisations-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px auto;
    color: #64748b;
}

.realisations-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.realisations-empty-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.5;
}

.realisations-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0066ff;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35);
}

.realisations-empty-btn:hover {
    background: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.5);
}

/* --------------------------------------------------------------------------
   Bottom Call to Action Banner
   -------------------------------------------------------------------------- */
.realisations-cta-banner {
    margin-top: 5rem;
    border-radius: 20px;
    padding: 48px 32px;
    background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.18) 0%, rgba(3, 7, 18, 0.9) 70%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    text-align: center;
}

@media (min-width: 768px) {
    .realisations-cta-banner {
        padding: 64px 48px;
    }
}
