/* ==============================
   PAGE SHOW RÉALISATION
   ============================== */

/* --- Hero --- */
.real-show-hero {
    padding: 64px 0;
    background-color: #f8f9fa;
}

.real-show-hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.real-show-hero__back {
    display: inline-block;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #0d5091;
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.real-show-hero__back:hover {
    color: #0a3f72;
}

.real-show-hero__title {
    font-family: "Poppins", sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    line-height: 1.3;
}

.real-show-hero__desc {
    font-family: "Inter", sans-serif;
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 32px;
}

/* --- Image principale --- */
.real-show-hero__img-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.real-show-hero__img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.real-show-hero__img-placeholder {
    width: 100%;
    height: 420px;
    background-color: #e0e0e0;
}

/* --- Boutons admin --- */
.real-show-hero__admin {
    display: flex;
    gap: 12px;
}

.real-show__admin-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.real-show__admin-btn--edit {
    background-color: #e8f0fb;
    color: #0d5091;
}

.real-show__admin-btn--edit:hover {
    background-color: #d0e4f7;
}

.real-show__admin-btn--delete {
    background-color: #ffebee;
    color: #c62828;
}

.real-show__admin-btn--delete:hover {
    background-color: #ffcdd2;
}

/* ==============================
   GALERIE
   ============================== */

.real-show-gallery {
    padding: 48px 0 64px;
    background-color: #ffffff;
}

.real-show-gallery__title {
    font-family: "Poppins", sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 24px;
}

.real-show-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.real-show-gallery__item {
    background: none;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    transition:
        border-color 0.2s,
        transform 0.2s;
}

.real-show-gallery__item:hover {
    border-color: #0d5091;
    transform: translateY(-2px);
}

.real-show-gallery__item--active {
    border-color: #0d5091;
}

.real-show-gallery__img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

/* ==============================
   LIGHTBOX
   ============================== */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
}

/* Quand <dialog> est ouvert via showModal() */
.lightbox[open] {
    display: flex;
}

/* Supprime le backdrop natif de <dialog> — on gère le fond nous-mêmes */
.lightbox::backdrop {
    display: none;
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: opacity 0.2s;
}

.lightbox__close:hover {
    opacity: 0.7;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

/* ==============================
   RESPONSIVE
   ============================== */

@media (max-width: 768px) {
    .real-show-hero__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .real-show-hero__img,
    .real-show-hero__img-placeholder {
        height: 280px;
    }

    .real-show-hero__title {
        font-size: 24px;
    }

    .real-show-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .real-show-gallery__grid {
        grid-template-columns: 1fr;
    }
}
