/* ============================================================
   REALISATIONS.CSS
============================================================ */

/* --- HERO --------------------------------------------------- */
#real-hero {
    padding-top: 160px;
    padding-bottom: 0;
    background: var(--noir);
    overflow: hidden;
}

.real-hero-inner {
    width: min(100%, var(--container));
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 60px);
    padding-bottom: clamp(48px, 7vw, 80px);
    text-align: center;
}

.real-hero-inner .section-label {
    margin-bottom: 20px;
}

.real-hero-inner h1 {
    font-size: clamp(3rem, 6.5vw, 7rem);
    margin-bottom: 24px;
}

.real-hero-inner p {
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    color: var(--ivoire-2);
    line-height: 1.75;
}

/* Bande défilante */
.real-hero-strip {
    overflow: hidden;
    border-top: 1px solid rgba(201, 169, 110, 0.1);
}

.strip-track {
    display: flex;
    gap: 4px;
    animation: strip-scroll 28s linear infinite;
    width: max-content;
}

.strip-track img {
    height: 220px;
    width: auto;
    object-fit: cover;
    flex-shrink: 0;
    filter: grayscale(30%) brightness(0.75);
    transition: filter 0.4s;
}

.strip-track img:hover {
    filter: grayscale(0%) brightness(1);
}

@keyframes strip-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Pause au survol */
.real-hero-strip:hover .strip-track {
    animation-play-state: paused;
}

/* --- FILTRES ----------------------------------------------- */
#filtres {
    background: var(--noir-2);
    border-bottom: 1px solid rgba(201, 169, 110, 0.1);
    position: sticky;
    top: 70px;
    z-index: 50;
}

.filtres-inner {
    display: flex;
    gap: 0;
    width: min(100%, var(--container));
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 60px);
    overflow-x: auto;
    scrollbar-width: none;
}

.filtres-inner::-webkit-scrollbar {
    display: none;
}

.filtre-btn {
    flex-shrink: 0;
    padding: 18px 28px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ivoire-2);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color var(--dur) var(--ease),
        border-color var(--dur) var(--ease);
    white-space: nowrap;
}

.filtre-btn:hover,
.filtre-btn.active {
    color: var(--or);
    border-bottom-color: var(--or);
}

/* --- GRILLE ------------------------------------------------- */
#grille {
    padding: var(--section-pad) 0;
    background: var(--noir);
}

.grille-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 340px;
    gap: 8px;
    width: min(100%, var(--container));
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 60px);
}

/* Carte standard */
.projet-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--noir-2);
}

/* Carte large : occupe 2 colonnes */
.projet-large {
    grid-column: span 2;
}

/* Image */
.projet-img-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}

.projet-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease), filter 0.5s;
    filter: brightness(0.8);
}

.projet-card:hover .projet-img-wrap img {
    transform: scale(1.06);
    filter: brightness(0.55);
}

/* Overlay texte (apparaît au hover) */
.projet-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(10, 10, 10, 0.92) 0%,
            rgba(10, 10, 10, 0.4) 50%,
            transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 32px;
    opacity: 0;
    transition: opacity 0.45s var(--ease);
}

.projet-card:hover .projet-overlay {
    opacity: 1;
}

/* Toujours visible en bas : titre court */
.projet-card::after {
    content: attr(data-title);
}

.projet-overlay-inner {
    transform: translateY(12px);
    transition: transform 0.45s var(--ease);
}

.projet-card:hover .projet-overlay-inner {
    transform: translateY(0);
}

.projet-cats {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--or);
    margin-bottom: 8px;
}

.projet-titre {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 300;
    color: var(--ivoire);
    line-height: 1.15;
    margin-bottom: 16px;
}

.projet-titre em {
    color: var(--or);
    font-style: italic;
}

.projet-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.projet-meta div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.projet-meta dt {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ivoire-2);
}

.projet-meta dd {
    font-size: 0.82rem;
    color: var(--ivoire);
}

/* Bouton flèche */
.projet-open {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(201, 169, 110, 0.5);
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    color: var(--or);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.35s var(--ease),
        transform 0.35s var(--ease),
        background 0.25s;
    cursor: pointer;
}

.projet-open svg {
    width: 18px;
    height: 18px;
}

.projet-card:hover .projet-open {
    opacity: 1;
    transform: translateY(0);
}

.projet-open:hover {
    background: var(--or);
    color: var(--noir);
}

/* Carte masquée par le filtre */
.projet-card.hidden {
    display: none;
}

/* --- MODAL -------------------------------------------------- */
#modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 40px);
}

#modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.88);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal-panel {
    position: relative;
    z-index: 1;
    background: var(--noir-2);
    border: 1px solid rgba(201, 169, 110, 0.2);
    width: min(100%, 1060px);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gris) transparent;
    animation: modal-in 0.4s var(--ease) both;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gris);
    background: var(--noir-2);
    display: grid;
    place-items: center;
    color: var(--ivoire-2);
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-close:hover {
    border-color: var(--or);
    color: var(--or);
}

.modal-body {
    display: grid;
    grid-template-columns: 3fr 2fr;
}

/* Galerie photos */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 6px 6px 6px;
}

.modal-img-main {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}

.modal-thumbs {
    display: flex;
    gap: 6px;
}

.modal-thumb {
    flex: 1;
    height: 90px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.25s;
    border: 1px solid transparent;
}

.modal-thumb:hover,
.modal-thumb.active {
    opacity: 1;
    border-color: var(--or);
}

/* Infos */
.modal-info {
    padding: clamp(28px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.modal-cats {
    margin-bottom: 12px;
}

.modal-titre {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--ivoire);
    margin-bottom: 20px;
    line-height: 1.1;
}

.modal-titre em {
    color: var(--or);
    font-style: italic;
}

.modal-desc {
    font-size: 0.88rem;
    color: var(--ivoire-2);
    line-height: 1.75;
    margin-bottom: 28px;
}

.modal-meta {
    margin-bottom: 36px;
    border-top: 1px solid var(--gris);
}

.modal-meta>div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--gris);
    gap: 16px;
}

.modal-meta dt {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--or);
    flex-shrink: 0;
}

.modal-meta dd {
    font-size: 0.85rem;
    color: var(--ivoire-2);
    text-align: right;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 900px) {
    .grille-inner {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 280px;
    }

    .projet-large {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .grille-inner {
        grid-template-columns: 1fr;
        grid-auto-rows: 260px;
    }

    .projet-large {
        grid-column: span 1;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-img-main {
        height: 260px;
    }

    .modal-thumbs {
        display: none;
    }

    .strip-track img {
        height: 140px;
    }
}