/* ==========================================================
   Design tokens
   Thème unique — noir / bleu marine foncé, appliqué partout
   (site public et back-office admin partagent la même palette)
   ========================================================== */
:root {
    --bg: #05070F;
    --bg-radial: radial-gradient(ellipse 120% 55% at 50% -10%, rgba(201, 162, 75, 0.10), transparent 60%);
    --surface: #0D1220;
    --surface-raised: #141B30;
    --ink: #F3EEE3;
    --ink-muted: #9BA1B8;
    --gold: #C9A24B;
    --gold-bright: #E4C077;
    --gold-soft: rgba(201, 162, 75, 0.14);
    --on-gold: #0D1019;
    --burgundy-soft: rgba(139, 30, 63, 0.20);
    --burgundy-text: #E88AA4;
    --burgundy-border: rgba(232, 138, 164, 0.35);
    --border: rgba(243, 238, 227, 0.10);
    --border-strong: rgba(243, 238, 227, 0.22);
    --header-bg: rgba(5, 7, 15, 0.88);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Manrope', -apple-system, sans-serif;

    --radius: 6px;
    --radius-lg: 14px;
    --container: 1100px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: scroll; }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

::selection { background: var(--gold); color: var(--on-gold); }

body {
    margin: 0;
    background: var(--bg-radial), var(--bg);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    margin: 0 0 0.5em;
    color: var(--ink);
}

h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); letter-spacing: 0.005em; }
h2 { font-size: clamp(1.35rem, 4vw, 2rem); }
h3 { font-size: 1.15rem; margin-bottom: 0.35em; }

p { max-width: 62ch; color: var(--ink-muted); }

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.15s var(--ease);
}
a:hover { color: var(--gold-bright); }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 2px;
}

.ornament {
    width: 42px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    margin: 0.6rem 0 1.4rem;
    border-radius: 2px;
}

/* ==========================================================
   Animations d'apparition (au scroll) — respecte prefers-reduced-motion
   ========================================================== */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================
   En-tête / navigation
   ========================================================== */
.site-header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px) saturate(140%);
    z-index: 50;
}

.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header__brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--ink);
    letter-spacing: 0.03em;
    position: relative;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    z-index: 110;
    position: relative;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    display: block;
    transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
    position: fixed;
    inset: 0 0 0 24%;
    background: linear-gradient(160deg, var(--surface), var(--bg));
    display: flex;
    flex-direction: column;
    padding: 5.5rem 1.75rem 2rem;
    gap: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 40px rgba(0,0,0,0.15);
    overflow-y: auto;
}
.site-nav.is-open { transform: translateX(0); }

.site-nav a {
    color: var(--ink);
    font-size: 1.05rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid transparent;
    width: fit-content;
}
.site-nav a:hover { border-color: var(--gold); color: var(--gold); }

.site-nav__cta {
    margin-top: auto;
    background: var(--gold);
    color: var(--on-gold) !important;
    text-align: center;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    border-bottom: none !important;
    transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}
.site-nav__cta:hover { background: var(--gold-bright); transform: translateY(-1px); }

@media (min-width: 860px) {
    .nav-toggle { display: none; }
    .site-nav {
        position: static;
        flex-direction: row;
        align-items: center;
        transform: none;
        padding: 0;
        background: none;
        border: none;
        box-shadow: none;
        gap: 1.6rem;
        overflow: visible;
    }
    .site-nav a { font-size: 0.92rem; }
    .site-nav__cta { margin-top: 0; padding: 0.55rem 1.1rem; }
}

/* Masque le chat flottant public côté back-office */
body.theme-dark .chat-fab,
body.theme-dark .modal { display: none !important; }

/* ==========================================================
   Corps de page
   ========================================================== */
.site-main {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2.5rem 1.25rem 5rem;
    min-height: 60vh;
}

.hero {
    padding: 1.5rem 0 1rem;
    max-width: 640px;
}
.hero p { font-size: 1.05rem; }
.hero .btn { margin-top: 0.5rem; }

.site-footer {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--ink-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
}

/* ==========================================================
   Slider de la page d'accueil
   ========================================================== */
.hero-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 0.5rem;
}
.hero-slider__track {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 8;
}
.hero-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s var(--ease);
}
.hero-slider__slide.is-active { opacity: 1; }
.hero-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-slider__caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2.5rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(10, 8, 4, 0.75), transparent);
}
.hero-slider__caption h2 { color: #fff; margin-bottom: 0.2rem; }
.hero-slider__caption p { color: rgba(255,255,255,0.88); margin: 0; max-width: 46ch; }
.hero-slider__dots {
    position: absolute;
    bottom: 0.9rem;
    right: 1rem;
    display: flex;
    gap: 6px;
    z-index: 2;
}
.hero-slider__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.3);
    padding: 0;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.hero-slider__dot.is-active { background: #fff; transform: scale(1.2); }
.hero-slider__cta { margin-top: 1.25rem; }

@media (max-width: 600px) {
    .hero-slider__track { aspect-ratio: 4 / 3; }
    .hero-slider__caption { padding: 1.5rem 1rem 1rem; }
}

/* ==========================================================
   Composants réutilisables
   ========================================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

a.card { display: block; color: inherit; }
a.card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
a.card h3 { color: var(--ink); }
a.card:hover h3 { color: var(--gold); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.15rem;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--gold);
    color: var(--on-gold);
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    transition: background 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:hover { background: var(--gold-bright); color: var(--on-gold); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(169,121,46,0.25); }
.btn:active { transform: translateY(0); }

.btn--outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border-strong);
}
.btn--outline:hover { background: var(--surface-raised); color: var(--ink); border-color: var(--gold); }

.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid rgba(169, 121, 46, 0.35);
}
body.theme-dark .badge { border-color: rgba(201, 162, 75, 0.35); }
.badge--vvip { background: var(--burgundy-soft); color: var(--burgundy-text); border-color: var(--burgundy-border); }

/* Carte de catégorie de billet VVIP — accent visuel sans répéter le nom de la catégorie */
.card--vvip { border-color: var(--burgundy-border); }
.card--vvip:hover { border-color: var(--burgundy-text); }

/* Plan de salle */
.seat-map {
    display: grid;
    gap: 6px;
    margin-top: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}
.seat {
    width: 27px;
    height: 27px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
    flex-shrink: 0;
}
.seat:hover { transform: scale(1.15); border-color: var(--gold-bright); z-index: 1; position: relative; }
.seat--standard { background: rgba(110, 102, 86, 0.14); color: var(--ink-muted); }
.seat--vip { background: var(--gold-soft); border-color: rgba(169,121,46,0.4); color: var(--gold); }
.seat--vvip { background: var(--burgundy-soft); border-color: var(--burgundy-border); color: var(--burgundy-text); }
.seat--occupee { opacity: 0.35; filter: grayscale(0.4); }

.seat-map__aisle {
    width: 34px;
    height: 27px;
    flex-shrink: 0;
    border-left: 1px dashed var(--border-strong);
    border-right: 1px dashed var(--border-strong);
}

@media (max-width: 480px) {
    .seat-map__aisle { width: 22px; }
}

/* ==========================================================
   Chat
   ========================================================== */
.chat-msg { border: 1px solid transparent; transition: border-color 0.2s var(--ease); }

#chatForm { flex-wrap: wrap; }
@media (max-width: 520px) {
    #chatForm { flex-direction: column; align-items: stretch; }
    #chatForm input, #chatForm button { width: 100%; flex: none !important; }
}

/* ==========================================================
   Bouton flottant Chat + Modal FAQ
   ========================================================== */
.chat-fab {
    position: fixed;
    bottom: 1.4rem;
    right: 1.4rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gold);
    border: none;
    font-size: 1.4rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 60;
    transition: transform 0.2s var(--ease), background 0.15s var(--ease);
}
.chat-fab:hover { background: var(--gold-bright); transform: scale(1.06); }

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
}
.modal.is-open { display: block; }

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 8, 13, 0.6);
    backdrop-filter: blur(2px);
}

.modal__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 82vh;
    background: var(--surface);
    border-radius: 18px 18px 0 0;
    padding: 1.35rem 1.35rem 2rem;
    overflow-y: auto;
    border: 1px solid var(--border-strong);
    border-bottom: none;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
    animation: modal-rise 0.25s var(--ease);
}

@keyframes modal-rise {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 640px) {
    .modal__panel {
        bottom: 1.5rem;
        right: 1.5rem;
        left: auto;
        width: 380px;
        max-height: 70vh;
        border-radius: 14px;
        border-bottom: 1px solid var(--border-strong);
    }
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.modal__header h2 { margin: 0; font-size: 1.15rem; }
.modal__close {
    background: none;
    border: none;
    color: var(--ink-muted);
    font-size: 1.6rem;
    line-height: 1;
    transition: color 0.15s var(--ease);
}
.modal__close:hover { color: var(--ink); }

.modal__tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.modal__tab {
    background: none;
    border: none;
    color: var(--ink-muted);
    padding: 0.5rem 0.25rem;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.modal__tab.is-active { color: var(--gold); border-color: var(--gold); }
.modal__tab:hover { color: var(--gold-bright); }

.modal__hint { color: var(--ink-muted); font-size: 0.9rem; }

/* ==========================================================
   Formulaires
   ========================================================== */
input, select, textarea {
    font-family: inherit;
    accent-color: var(--gold);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--gold) !important;
}

/* ==========================================================
   Galerie
   ========================================================== */
.gallery-item img { transition: transform 0.25s var(--ease), filter 0.25s var(--ease); }
.gallery-item:hover img { transform: scale(1.04); filter: brightness(1.03); }

.gallery-admin-item img { transition: transform 0.2s var(--ease); }
.gallery-admin-item:hover img { transform: scale(1.03); }

/* ==========================================================
   Responsive — ajustements généraux smartphone
   ========================================================== */
@media (max-width: 480px) {
    .site-main { padding: 1.75rem 1rem 3.5rem; }
    .card { padding: 1.15rem; }
}
