/* ========================================
   PAGES RÉALISATIONS — Styles partagés
   ======================================== */

/* Nav override pour fond blanc dès le début */
.page-realisations .nav {
    color: var(--black);
}

.page-realisations .nav--not-hero {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
}

/* ========================================
   PAGE HEADER (titre de page)
   ======================================== */
.page-header {
    padding: 160px 0 80px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.page-header__label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 16px;
}

.page-header__title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.page-header__desc {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: var(--gray-500);
    max-width: 600px;
    line-height: 1.7;
}

/* ========================================
   HEADER PAGE RÉALISATIONS — centré
   ======================================== */
.page-header {
    text-align: center;
}

.page-header__desc {
    margin: 0 auto;
}

/* ========================================
   GRILLE CATÉGORIES (realisations/index)
   ======================================== */
.categories-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 60px) clamp(60px, 8vw, 100px);
}

/* Layout asymétrique : 2+1 / 1+2 / 1 centré */
.cat-tile:nth-child(1) { grid-column: span 2; }
.cat-tile:nth-child(2) { grid-column: span 1; }
.cat-tile:nth-child(3) { grid-column: span 1; }
.cat-tile:nth-child(4) { grid-column: span 2; }
.cat-tile:nth-child(5) { grid-column: 1 / -1; }

.cat-tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 260px;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Garantit que position:absolute des enfants est relatif à la carte */
    isolation: isolate;
}

.cat-tile:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.cat-tile:nth-child(5) {
    min-height: 220px;
}

.cat-tile__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cat-tile:hover .cat-tile__bg {
    transform: scale(1.04);
}

.cat-tile__bg-placeholder {
    width: 100%;
    height: 100%;
}

.cat-tile__bg img,
.cat-tile__bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-tile__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 35%),
        linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 55%, transparent 100%);
    transition: opacity 0.4s ease;
}

.cat-tile:hover .cat-tile__overlay {
    opacity: 0.85;
}

.cat-tile__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    padding: 28px;
    gap: 16px;
}

.cat-tile__number {
    position: absolute;
    top: 24px;
    left: 28px;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cat-tile__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cat-tile__title {
    font-size: clamp(1.2rem, 2.2vw, 1.75rem);
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
    line-height: 1.15;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cat-tile:hover .cat-tile__title {
    transform: translateY(-3px);
}

.cat-tile__desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: color 0.35s ease, transform 0.4s ease;
    transform: translateY(2px);
}

.cat-tile:hover .cat-tile__desc {
    color: rgba(255,255,255,0.85);
    transform: translateY(0);
}

.cat-tile__arrow {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.35s ease;
    flex-shrink: 0;
    align-self: flex-end;
}

.cat-tile__arrow svg {
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cat-tile:hover .cat-tile__arrow {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--black);
}

.cat-tile:hover .cat-tile__arrow svg {
    transform: translateX(3px);
}

/* ========================================
   PAGE CATÉGORIE — Hero
   ======================================== */
.cat-hero {
    position: relative;
    height: clamp(280px, 40vw, 480px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.cat-hero__bg {
    position: absolute;
    inset: 0;
}

.cat-hero__bg-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--black) 100%);
}

.cat-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}

.cat-hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 60px) clamp(32px, 4vw, 56px);
}

.cat-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.cat-hero__back:hover {
    color: var(--accent);
}

.cat-hero__title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.03em;
    line-height: 1;
}

.cat-hero__count {
    display: inline-block;
    margin-left: 16px;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.4);
    vertical-align: middle;
    letter-spacing: 0;
}

/* ========================================
   GRILLE PROJETS
   ======================================== */
.projects-section {
    background: var(--white);
    padding: clamp(60px, 8vw, 100px) 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-900);
}

.project-card__thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.project-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-700) 100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-card__thumb-placeholder,
.project-card:hover .project-card__thumb img {
    transform: scale(1.06);
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.4s ease;
}

.project-card:hover .project-card__overlay {
    background: rgba(0,0,0,0.15);
}

.project-card__play {
    width: 64px;
    height: 64px;
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.4s var(--transition);
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
}

.project-card:hover .project-card__play {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--black);
    transform: scale(1.1);
}

.project-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.project-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.project-card__client {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

/* ========================================
   BACK TO ALL / NAVIGATION BAS DE PAGE
   ======================================== */
.projects-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 48px 0 0;
    border-top: 1px solid var(--gray-200);
    margin-top: 60px;
    flex-wrap: wrap;
    gap: 16px;
}

.projects-nav__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-500);
    transition: color 0.3s ease;
}

.projects-nav__back:hover {
    color: var(--black);
}

.projects-nav__next {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--black);
    transition: color 0.3s ease;
}

.projects-nav__next:hover {
    color: var(--accent);
}

/* ========================================
   MODAL VIDÉO
   ======================================== */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    cursor: pointer;
}

.video-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1;
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    background: none;
    transition: all 0.3s ease;
}

.video-modal__close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.video-modal__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.video-modal.active .video-modal__content {
    transform: scale(1);
}

.video-modal__iframe-wrap {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: var(--black);
    border-radius: 12px;
    overflow: hidden;
}

.video-modal__iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-modal__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ========================================
   INTRO SEO — Texte descriptif sous le hero catégorie
   ======================================== */
.cat-intro {
    background: var(--white);
    padding: 48px 0 0;
    border-bottom: 1px solid var(--gray-100);
}

.cat-intro__text {
    max-width: 780px;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    color: var(--gray-500);
    line-height: 1.8;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .categories-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cat-tile:nth-child(1),
    .cat-tile:nth-child(2),
    .cat-tile:nth-child(3),
    .cat-tile:nth-child(4),
    .cat-tile:nth-child(5) {
        grid-column: span 1;
        min-height: 160px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .projects-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .cat-intro {
        padding: 32px 0 0;
    }
}

/* ========================================
   CARTE "PROJET À VENIR" — slot vide converti en CTA
   ======================================== */
.project-card--cta {
    cursor: pointer;
}

.project-card--cta .project-card__thumb {
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: unset;
    min-height: 240px;
    overflow: visible;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.project-card--cta:hover .project-card__thumb {
    border-color: var(--accent);
    background: rgba(230, 175, 46, 0.04);
}

.project-card--cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px 24px;
    text-align: center;
}

.project-card--cta__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.project-card--cta:hover .project-card--cta__icon {
    border-color: var(--accent);
    color: var(--accent);
}

.project-card--cta__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
}

.project-card--cta__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    line-height: 1.4;
}

.project-card--cta__link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-card--cta:hover .project-card--cta__link {
    opacity: 1;
    transform: translateY(0);
}
