/* ================= GOOGLE FONT ================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ================= VARIABLES ================= */
:root {
    --primary: #8B1E1E;
    --secondary: #B83227;
    --accent: #F25C05;
    --light: #F4EDE9;
    --white: #FFFFFF;
    --text: #2E2E2E;
    --gray: #6B6B6B;
}

/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--text);
    overflow-x: hidden;
}

/* ================= HERO ================= */
.details-hero {
    height: 60vh;

    background: linear-gradient(
        rgba(0,0,0,0.65),
        rgba(0,0,0,0.5)
    ),
    url('../pictures/slider2.jpg') center/cover no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    color: white;
}

.details-hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
}

.details-hero p {
    margin-top: 10px;
    opacity: 0.9;
}

/* ================= CONTAINER ================= */
.details-container {
    max-width: 1100px;
    margin: -80px auto 80px;

    background: white;
    padding: 40px;

    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

/* ================= TITRE SECTION ================= */
.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;

    color: var(--primary);
    position: relative;
}
.details-hero h1 {
    color: var(--accent);
}

.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin-top: 6px;
    border-radius: 2px;
}

/* ================= DESCRIPTION ================= */
.details-description {
    margin-bottom: 30px;

    font-size: clamp(16px, 1.1vw, 18px);
    line-height: 1.7;

    color: #444;
    max-width: 750px;
}

/* ================= TEXTE INSTRUCTION ================= */
.gallery-instruction {
    margin-top: 25px;
    margin-bottom: 10px;

    font-size: 18px;
    font-weight: 500;
    text-align: center;

    color: var(--primary);
}

/* ================= GALERIE ================= */
.gallery {
    margin-top: 30px;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap: 15px;
}

/* ITEM */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

/* IMAGE */
.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: 0.4s ease;
}

/* HOVER */
.gallery-item:hover img {
    transform: scale(1.05);
}

/* ================= OVERLAY + ================= */
.overlay-more {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 28px;
    font-weight: 600;
    color: white;

    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);

    transition: 0.3s ease;
}

.gallery-item.more:hover .overlay-more {
    background: rgba(0,0,0,0.75);
}

/* ================= BUTTON ================= */
.back-btn {
    display: inline-block;
    margin-top: 30px;

    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;

    border-radius: 8px;
    text-decoration: none;

    background: var(--accent);
    color: white;

    transition: 0.3s ease;
}

.back-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}
/* ================= GROUPE BOUTONS ================= */
.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap; /* évite que ça casse sur mobile */
}

/* bouton secondaire */
.back-btn.secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.back-btn.secondary:hover {
    background: var(--primary);
    color: white;
}

/* ================= MODAL ================= */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    inset: 0;

    background: rgba(0,0,0,0.9);

    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;

    font-size: 35px;
    color: white;
    cursor: pointer;
}

.modal-nav span {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    font-size: 40px;
    color: white;
    cursor: pointer;
    padding: 10px;
}

#prev { left: 20px; }
#next { right: 20px; }

.modal-nav span:hover,
.close:hover {
    color: var(--accent);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {

    .details-container {
        margin: -50px 20px 60px;
        padding: 25px;
    }

    .gallery-item img {
        height: 150px;
    }
}

@media (max-width: 480px) {

    .details-hero {
        height: 50vh;
    }

    .details-hero h1 {
        font-size: 24px;
    }

    .section-title {
        font-size: 18px;
    }

    .details-description {
        font-size: 16px;
    }

    .gallery-instruction {
        font-size: 15px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .btn-group {
        flex-direction: column;
    }

    .back-btn {
        width: 100%;
        text-align: center;
    }
}

.gallery-item {
    position: relative;
}

.overlay-more {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
}

.overlay-more span {
    font-size: 12px;
    font-weight: normal;
}