/* === BASE === */
body {
    margin: 0;
    padding: 0;
    font-family: "Georgia", serif;
    color: white;
    background: #000;
}

/* Image de fond */
.stage {
    position: fixed;
    inset: 0;
    background-image: url("assets/rideau.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 5;
    pointer-events: none;
}

/* Contenu principal */
.content {
    position: relative;
    z-index: 3;
    width: min(90%, 900px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2.5rem);
    text-align: center;
    box-sizing: border-box;
}

/* Tablettes */
@media (min-width: 768px) {
    .content {
        width: min(80%, 1000px);
    }
}

/* Grands écrans */
@media (min-width: 1200px) {
    .content {
        width: 60%;
    }
}

.content h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
}

/* Colonnes gauche / droite */
div.left,
div.right {
    float: none;
    width: 100%;
    max-width: 100%;
}

/* Navigation style "doré gravé" */
nav {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 900px);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 3000;
}


nav a {
    padding: 0.6rem 1.2rem;
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    color: gold;
    text-decoration: none;
    border: 2px solid gold;
    border-radius: 8px;
    background: linear-gradient(145deg, #6c5500, #d4af37);
    font-weight: bold;
}

nav a:hover {
    transform: scale(1.1);
    box-shadow: inset 0 0 12px rgba(255,255,255,0.7), inset 0 0 6px rgba(0,0,0,0.9);
}

/* Curtain animation only on home page */
.home-page .curtain-animation {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    display: flex;
}

.home-page .curtain {
    flex: 1;
    background: url('assets/rideau_closed.png') no-repeat center/cover;
    animation: openCurtain 3s forwards ease-in-out;
}

.home-page .curtain.right {
    transform-origin: right center;
}

.home-page .curtain.left {
    transform-origin: left center;
}

@keyframes openCurtain {
    to { transform: scaleX(0); }
}

.home-page .background-overlay {
    position: fixed;
    inset: 0;
    background: url('assets/rideau.png') no-repeat center/cover;
    z-index: -3;
}

/* --- Pointer-events fix: allow interaction with text through curtains --- */
.curtain-animation,
.curtain-animation *,
.curtain,
.curtain::before,
.curtain::after,
.background-overlay {
    pointer-events: none !important;
}

/* ============================
   TEXT LOCK BEFORE OPENING
   ============================ */
.home-page .content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
}

.home-page nav {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
}

.home-page.opened .content {
    opacity: 1;
    pointer-events: auto;
}

.home-page.opened nav {
    opacity: 1;
    pointer-events: auto;
}

/* ============================
   CURTAIN VISUAL IMPROVEMENTS
   ============================ */
.curtain {
    background-image:
        linear-gradient(to bottom,
            rgba(0,0,0,0.40),
            rgba(0,0,0,0.0) 25%,
            rgba(0,0,0,0.45) 85%
        ),
        url('assets/rideau_closed.png');
    background-size: cover;
    filter: brightness(1.15) contrast(1.15) saturate(1.2);
    box-shadow:
        inset 0 0 50px rgba(0,0,0,0.7),
        inset -20px 0 40px rgba(0,0,0,0.6);
}

/* BEAUTIFUL THEATRE-LIKE MOVEMENT */
@keyframes curtain-open-left {
    0%   { transform: translateX(0) }
    50%  { transform: translateX(-35%) skewX(-3deg) }
    80%  { transform: translateX(-47%) skewX(-1deg) }
    100% { transform: translateX(-50%) skewX(0deg) }
}

@keyframes curtain-open-right {
    0%   { transform: translateX(0) }
    50%  { transform: translateX(35%) skewX(3deg) }
    80%  { transform: translateX(47%) skewX(1deg) }
    100% { transform: translateX(50%) skewX(0deg) }
}

/* Do not block interaction once opened */
.curtain-animation,
.curtain-animation *,
.background-overlay {
    pointer-events: none !important;
}

/* THEATRE FONT INTEGRATION */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #f5e6c8;
    text-shadow: 0 0 6px rgba(0,0,0,0.7), 0 0 12px rgba(0,0,0,0.5);
}

body, p, span, li, a {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.55;
    color: #f1eade;
}

nav a {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: #d6b875;
    text-shadow: 0 0 6px rgba(0,0,0,0.6);
    transition: color 0.3s ease;
}

nav a:hover {
    color: #f7e4b0;
}

p.center {
    text-align: center;
}

/* Position uniforme des titres sous le rideau */
.page-title {
    margin-top: 230px;   /* Ajuste cette valeur selon ce que tu veux visuellement */
    text-align: center;
}

/* Galerie */
.gallery {
    width: 80%;
    margin: 0 auto;
    /*margin-top: 260px; /* sous le rideau */
    text-align: center;
    margin-bottom: 40px;
    z-index: 20;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0px 0px 15px rgba(255, 230, 180, 0.5);
}

/* Lightbox */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#lightbox img {
    margin-top: 30vh;
    max-width: 50%;
    max-height: 50%;
    border-radius: 10px;
    box-shadow: 0px 0px 20px rgba(255, 230, 180, 0.6);
}

#lightbox-close {
    position: absolute;
    top: 460px;
    right: 750px;
    font-size: 45px;
    color: #f5deb3;
    cursor: pointer;
}

.accordion {
    width: 80%;
    margin: 0 auto;
    margin-top: 40px;
    margin-bottom: 60px;
}

.accordion-item {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid #a88a4a;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
}

.accordion-title {
    margin: 0;
    padding: 18px;
    font-size: 20px;
    cursor: pointer;
    background-color: rgba(255, 230, 180, 0.12);
    color: #f5deb3;
    transition: background 0.2s ease;
}

.accordion-title:hover {
    background-color: rgba(255, 230, 180, 0.22);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 18px;
    transition: max-height 0.3s ease;
}

.accordion-content p {
    color: #e8d3a3;
    padding: 15px 0;
}

html{
    overflow-y: auto;
}

.rideaux{
    height: 35vh;
}

/** {
    outline: 1px solid red;
}*/