/* ==========================================================================
   1. VARIABLES & RESET
   Thème DARK par défaut — Thème LIGHT activé via body.theme-light
   ========================================================================== */

:root {
    --gold: #d4af37;

    /* Couleurs Dark (défaut) */
    --bg-body:        #1a1612;
    --bg-nav:         rgba(18, 16, 14, 0.98);
    --bg-section:     rgba(0, 0, 0, 0.6);
    --bg-card:        #1e1b18;
    --bg-modal:       #1e1b18;
    --bg-input:       #000000;
    --bg-mobile-nav:  rgba(18, 16, 14, 0.98);
    --bg-table-row:   rgba(0, 0, 0, 0.3);
    --bg-accordion:   #ffffff;

    --text-primary:   #ffffff;
    --text-secondary: #888888;
    --text-logo:      #ffffff;

    --border-nav:     rgba(212, 175, 55, 0.2);
    --border-input:   #444444;
    --border-card:    #333333;
    --border-table:   rgba(212, 175, 55, 0.2);
    --border-mobile:  rgba(212, 175, 55, 0.1);

    --shadow-modal:   none;
    --shadow-carousel:none;

    --hero-bg:        rgba(30, 27, 24, 0.4);
    --hero-shadow:    0 10px 20px rgba(0,0,0,0.5);
    --banner-overlay: rgba(0, 0, 0, 0.4);
    --banner-text-shadow: none;

    --news-content-bg: #1e1b18;
    --carousel-border: none;

    --admin-tab-border: #333333;
    --admin-tab-inactive: #555555;
    --builder-item-bg: rgba(255, 255, 255, 0.05);
    --btn-tool-bg:    rgba(212, 175, 55, 0.1);

    --footer-bg:      transparent;
    --footer-link:    #888888;

    --accordion-trigger-bg: #1e1b18;
    --accordion-trigger-color: var(--gold);
    --accordion-trigger-hover: rgba(212, 175, 55, 0.2);
    --accordion-content-bg: #ffffff;

    --bg-gradient: radial-gradient(circle at center, rgba(212, 175, 55, 0.07) 0%, rgba(0, 0, 0, 0.5) 100%);
    --bg-noise-opacity: 0.05;
    --bg-music-opacity: 0.08;

    --burger-color:   var(--gold);
    --close-btn-color: var(--gold);
}

/* --- THÈME LIGHT : surcharge des variables --- */
body.theme-light {
    --bg-body:        #f9f7f2;
    --bg-nav:         rgba(255, 255, 255, 0.96);
    --bg-section:     rgba(255, 255, 255, 0.7);
    --bg-card:        #ffffff;
    --bg-modal:       #ffffff;
    --bg-input:       #ffffff;
    --bg-mobile-nav:  rgba(255, 255, 255, 0.98);
    --bg-table-row:   rgba(212, 175, 55, 0.05);
    --bg-accordion:   #ffffff;

    --text-primary:   #1a1612;
    --text-secondary: #666666;
    --text-logo:      #1a1612;

    --border-nav:     rgba(212, 175, 55, 0.3);
    --border-input:   #dddddd;
    --border-card:    #eeeeee;
    --border-table:   rgba(212, 175, 55, 0.1);
    --border-mobile:  rgba(212, 175, 55, 0.3);

    --shadow-modal:   0 10px 40px rgba(0,0,0,0.1);
    --shadow-carousel:none;

    --hero-bg:        rgba(255, 255, 255, 0.4);
    --hero-shadow:    1px 1px 10px rgba(255,255,255,0.8);
    --banner-overlay: rgba(255, 255, 255, 0.2);
    --banner-text-shadow: 1px 1px 10px #fff;

    --news-content-bg: #ffffff;
    --carousel-border: 1px solid rgba(212, 175, 55, 0.3);

    --admin-tab-border: #eeeeee;
    --admin-tab-inactive: #888888;
    --builder-item-bg: #fdfdfd;
    --btn-tool-bg:    rgba(212, 175, 55, 0.05);

    --footer-bg:      #ffffff;
    --footer-link:    #666666;

    --accordion-trigger-bg: #ffffff;
    --accordion-trigger-color: #1a1612;
    --accordion-trigger-hover: #fdfdfd;
    --accordion-content-bg: #ffffff;

    --bg-gradient: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, rgba(255, 255, 255, 0.6) 100%);
    --bg-noise-opacity: 0.04;
    --bg-music-opacity: 0.06;

    --burger-color:   #1a1612;
    --close-btn-color: #1a1612;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;

    background-image:
        var(--bg-gradient),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200' viewBox='0 0 400 200' opacity='0.08'%3E%3Cstyle%3E .s %7B fill: %23d4af37; %7D %3C/style%3E%3Cg class='s'%3E%3Crect x='0' y='60' width='400' height='1'/%3E%3Crect x='0' y='70' width='400' height='1'/%3E%3Crect x='0' y='80' width='400' height='1'/%3E%3Crect x='0' y='90' width='400' height='1'/%3E%3Crect x='0' y='100' width='400' height='1'/%3E%3Cpath d='M35 110 C35 110 50 110 50 90 C50 70 30 65 30 85 C30 105 60 115 55 70 C53 40 40 30 40 30 L38 120 C38 125 30 125 30 115' fill='none' stroke='%23d4af37' stroke-width='1.5'/%3E%3Cellipse cx='100' cy='95' rx='5' ry='4' transform='rotate(-20 100 95)'/%3E%3Crect x='104' y='55' width='1.5' height='40'/%3E%3Cellipse cx='140' cy='85' rx='5' ry='4' transform='rotate(-20 140 85)'/%3E%3Crect x='144' y='45' width='1.5' height='40'/%3E%3Cpath d='M104 55 Q125 45 144 45' fill='none' stroke='%23d4af37' stroke-width='4'/%3E%3Cpath d='M200 70 L210 85 L200 85 L215 100' fill='none' stroke='%23d4af37' stroke-width='1.5'/%3E%3C/g%3E%3C/svg%3E");

    background-attachment: fixed;
    background-repeat: repeat;
}

/* padding-top géré dynamiquement en JS via router() → nav.offsetHeight */

.hero--page    { height: 300px; }
.page-spacer   { height: 50px; }

/* ==========================================================================
   2. NAVIGATION
   ========================================================================== */
#nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-nav);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%; z-index: 10000;
}

.logo-text {
    font-weight: 900; text-transform: uppercase; cursor: pointer;
    white-space: nowrap; flex-shrink: 0; color: var(--text-logo);
    font-size: clamp(0.7rem, 2vw, 1rem);
}
.logo-text span { color: var(--gold); }

#nav-links {
    display: flex;
    flex-direction: row;
    list-style: none; gap: 30px; align-items: center; margin: 0; padding: 0;
}
#dynamic-links { display: contents; }

#nav-links a {
    text-decoration: none; color: var(--text-primary); text-transform: uppercase;
    font-size: 0.85rem; font-weight: 700; white-space: nowrap; transition: 0.3s;
}
#nav-links a:hover { color: var(--gold); }

/* ==========================================================================
   3. COMPOSANTS (HERO, CAROUSEL, TABLEAUX)
   ========================================================================== */
.hero {
    height: 450px; display: flex; align-items: center; justify-content: center;
    background: var(--hero-bg); text-align: center; border-bottom: 2px solid var(--gold);
    overflow: hidden;
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem); color: var(--gold);
    text-transform: uppercase; text-shadow: var(--hero-shadow);
}

.carousel-outer { padding: 80px 0; background: var(--bg-section); position: relative; }
#carousel-viewport {
    height: 500px; position: relative; overflow: hidden;
    width: 100%; max-width: 1200px; margin: 0 auto;
    border: var(--carousel-border);
    background: var(--news-content-bg);
}
.news-slide { position: absolute; inset: 0; display: flex; opacity: 0; transition: 1s ease; }
.news-slide.active { opacity: 1; }
.news-img { flex: 1.2; height: 100%; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-content {
    flex: 1; padding: 50px; background: var(--news-content-bg);
    display: flex; flex-direction: column; justify-content: center;
    color: var(--text-primary);
}
.news-link-btn {
    align-self: flex-start; margin-top: 20px; padding: 10px 20px;
    border: 2px solid var(--gold); color: var(--gold);
    text-decoration: none; font-weight: bold; text-transform: uppercase;
    font-size: 0.8rem; transition: 0.3s;
}
.news-link-btn:hover { background: var(--gold); color: #fff; }

/* TABLEAU */
.block-table-wrapper {
    margin: 40px auto; overflow-x: auto; width: 100%;
    max-width: 1000px; display: flex; justify-content: center;
}
table {
    width: auto; min-width: 450px; border-collapse: collapse;
    border: 1px solid var(--gold); background: var(--bg-table-row);
}
th {
    background: var(--gold); color: #fff; padding: 15px 25px;
    text-align: left; text-transform: uppercase; font-weight: 800;
}
td {
    padding: 12px 25px; border: 1px solid var(--border-table);
    color: var(--text-primary);
}
tr:nth-child(even) td { background: var(--bg-table-row); }

/* ==========================================================================
   4. ADMINISTRATION (MODALES & BUILDER)
   ========================================================================== */
.modal-overlay {
    position: fixed !important; inset: 0 !important;
    background: rgba(0,0,0,0.85); z-index: 20000;
    display: none; align-items: center; justify-content: center;
}
.modal-content {
    background: var(--bg-modal); border: 1px solid var(--gold);
    width: 95%; max-width: 1100px; padding: 30px;
    height: 90vh; max-height: 90vh;
    overflow-y: auto; position: relative;
    color: var(--text-primary); box-shadow: var(--shadow-modal);
    display: flex; flex-direction: column;
}
.modal-content.small {
    max-width: 420px;
    height: auto;
}

.close-btn {
    position: absolute; top: 15px; right: 20px;
    background: none; border: none; color: var(--close-btn-color);
    font-size: 2.5rem; cursor: pointer;
}

.admin-section { display: none; flex: 1; overflow-y: auto; padding-right: 4px; box-sizing: border-box; }
.admin-section.active { display: flex; flex-direction: column; }

.admin-tabs {
    display: flex; gap: 10px; margin-bottom: 25px;
    border-bottom: 1px solid var(--admin-tab-border);
}
.btn-tab {
    padding: 12px 20px; background: none; border: none;
    color: var(--admin-tab-inactive); cursor: pointer;
    font-weight: bold; text-transform: uppercase;
}
.btn-tab.active { color: var(--gold); border-bottom: 2px solid var(--gold); }

/* Anciens éléments builder conservés pour compatibilité */
.btn-tool {
    padding: 8px 12px; background: var(--btn-tool-bg);
    border: 1px solid var(--gold); color: var(--gold);
    cursor: pointer; font-size: 0.7rem; font-weight: bold;
    text-transform: uppercase;
}
.btn-del  { color: #e74c3c; background: none; border: none; cursor: pointer; font-weight: bold; font-size: 1.2rem; }
.btn-icon { padding: 8px 12px; background: var(--btn-tool-bg); border: 1px solid var(--gold); color: var(--gold); cursor: pointer; font-size: 1rem; }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

/* ── BUILDER SIDEBAR LAYOUT ───────────────────────────────────────────────── */
#page-editor { margin-top: 0 !important; border-top: none !important; padding-top: 0 !important; }
#editor-title { font-size: 1rem; font-weight: 800; text-transform: uppercase;
    color: var(--gold); letter-spacing: 0.05em; padding: 16px 0 12px; border-bottom: 1px solid var(--border-card); margin-bottom: 16px; }

.builder-layout {
    display: flex;
    gap: 0;
    align-items: flex-start;
    min-height: 400px;
}

/* Sidebar */
.builder-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 16px;           /* colle sous le haut de la modale quand on scrolle */
    background: var(--bg-body);
    border: 1px solid var(--border-card);
    border-right: none;
    border-radius: 6px 0 0 6px;
    overflow: hidden;
    align-self: flex-start;
}

.sb-section-title {
    padding: 8px 12px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-card);
}

/* Hero toggle */
.sb-hero-toggle {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; border-bottom: 1px solid var(--border-card);
    font-size: 0.75rem; color: var(--text-secondary);
}
.sb-toggle {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    padding: 3px 8px; border-radius: 20px; cursor: pointer;
    border: 1px solid var(--border-card);
    background: var(--bg-card); color: var(--text-secondary);
    transition: 0.2s;
}
.sb-toggle--on { background: rgba(212,175,55,0.15); border-color: var(--gold); color: var(--gold); }

/* Liste des blocs */
.sb-list { display: flex; flex-direction: column; }
.sb-empty { padding: 12px; font-size: 0.8rem; color: var(--text-secondary); font-style: italic; }

.sb-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 10px; cursor: pointer;
    border-bottom: 1px solid var(--border-card);
    transition: background 0.15s;
    user-select: none;
}
.sb-item:hover  { background: rgba(212,175,55,0.06); }
.sb-item--active { background: rgba(212,175,55,0.12); border-left: 3px solid var(--gold); padding-left: 7px; }

.sb-drag-handle {
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: grab;
    flex-shrink: 0;
    user-select: none;
    opacity: 0.4;
    transition: opacity 0.15s;
    padding-right: 2px;
}
.sb-item:hover .sb-drag-handle { opacity: 1; }
.sb-item--dragging { cursor: grabbing; }
.sb-item--ghost    { opacity: 0.35; }

/* Ligne de drop : trait doré au-dessus ou en-dessous de la cible */
.sb-item--over-top {
    box-shadow: inset 0 2px 0 var(--gold);
}
.sb-item--over-bot {
    box-shadow: inset 0 -2px 0 var(--gold);
}

.sb-icon  { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sb-label { font-size: 0.72rem; font-weight: 600; flex: 1; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.sb-item:hover .sb-actions,
.sb-item--active .sb-actions { opacity: 1; }

.sb-btn {
    width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
    background: none; border: 1px solid var(--border-card); color: var(--text-secondary);
    border-radius: 3px; cursor: pointer; font-size: 0.7rem; padding: 0;
    transition: 0.15s;
}
.sb-btn:hover:not([disabled]) { border-color: var(--gold); color: var(--gold); }
.sb-btn[disabled] { opacity: 0.2; cursor: default; }
.sb-btn--del:hover:not([disabled]) { border-color: #e74c3c; color: #e74c3c; }

/* Boutons ajout */
.sb-add-list { display: flex; flex-direction: column; padding: 4px 0; }
.sb-add-btn {
    text-align: left; padding: 7px 12px;
    background: none; border: none; border-bottom: 1px solid var(--border-card);
    color: var(--text-secondary); cursor: grab; font-size: 0.72rem; font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    transition: 0.15s; display: flex; align-items: center; gap: 6px;
    user-select: none;
}
.sb-add-btn:last-child { border-bottom: none; }
.sb-add-btn:hover { background: rgba(212,175,55,0.08); color: var(--gold); }
.sb-add-btn:hover .sb-add-grip { opacity: 1; }
.sb-add-btn--dragging { opacity: 0.4; cursor: grabbing; }

.sb-add-grip {
    font-size: 0.85rem; opacity: 0.3;
    transition: opacity 0.15s; flex-shrink: 0;
}

/* Zone de liste vide : accepte le drop */
.sb-list--drop-active {
    background: rgba(212,175,55,0.06);
    box-shadow: inset 0 0 0 2px var(--gold);
    border-radius: 3px;
    min-height: 48px;
}

/* Zone de contenu (panneau d'édition) */
.builder-content {
    flex: 1;
    border: 1px solid var(--border-card);
    border-radius: 0 6px 6px 0;
    background: var(--bg-card);
    min-height: 300px;
    padding: 20px;
    overflow: hidden;
}

.bi-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 200px; color: var(--text-secondary); font-size: 0.85rem; font-style: italic;
}

/* Champs dans les panneaux */
.bi-label {
    display: block; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--gold); margin-bottom: 6px; margin-top: 14px;
}
.bi-label:first-child { margin-top: 0; }

.bi-input {
    width: 100%; padding: 9px 12px;
    background: var(--bg-input); border: 1px solid var(--border-input);
    color: var(--text-primary); border-radius: 3px;
    font-family: 'Montserrat', sans-serif; font-size: 0.85rem;
    margin-bottom: 0;
}
.bi-textarea {
    width: 100%; min-height: 120px; padding: 9px 12px; resize: vertical;
    background: var(--bg-input); border: 1px solid var(--border-input);
    color: var(--text-primary); border-radius: 3px;
    font-family: 'Montserrat', sans-serif; font-size: 0.85rem; line-height: 1.5;
    margin-bottom: 0;
}
.bi-textarea--mono { font-family: monospace; font-size: 0.78rem; min-height: 100px; }
.bi-row { display: flex; gap: 6px; align-items: stretch; }
.bi-row .bi-input { flex: 1; }
.bi-upload {
    padding: 0 12px; background: var(--btn-tool-bg);
    border: 1px solid var(--gold); color: var(--gold);
    cursor: pointer; border-radius: 3px; font-size: 1rem; flex-shrink: 0;
}

/* ── QUILL WYSIWYG — surcharge du thème snow ─────────────────────────────── */
.bi-quill {
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

/* Toolbar */
.bi-quill .ql-toolbar.ql-snow {
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    border-bottom: 1px solid var(--border-card);
    border-radius: 3px 3px 0 0;
    padding: 6px 8px;
}

/* Icônes de la toolbar */
.bi-quill .ql-toolbar.ql-snow .ql-stroke { stroke: var(--text-secondary); }
.bi-quill .ql-toolbar.ql-snow .ql-fill   { fill:   var(--text-secondary); }
.bi-quill .ql-toolbar.ql-snow .ql-picker-label { color: var(--text-secondary); }

.bi-quill .ql-toolbar.ql-snow button:hover .ql-stroke,
.bi-quill .ql-toolbar.ql-snow button.ql-active .ql-stroke { stroke: var(--gold); }
.bi-quill .ql-toolbar.ql-snow button:hover .ql-fill,
.bi-quill .ql-toolbar.ql-snow button.ql-active .ql-fill   { fill: var(--gold); }
.bi-quill .ql-toolbar.ql-snow button:hover,
.bi-quill .ql-toolbar.ql-snow button.ql-active { color: var(--gold); }

/* Dropdown format titre */
.bi-quill .ql-toolbar .ql-picker-options {
    background: var(--bg-modal);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
}
.bi-quill .ql-toolbar .ql-picker-item:hover { color: var(--gold); }

/* Zone de texte */
.bi-quill .ql-container.ql-snow {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-top: none;
    border-radius: 0 0 3px 3px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    min-height: 140px;
}

.bi-quill .ql-editor { min-height: 140px; line-height: 1.6; color: var(--text-primary); }
.bi-quill .ql-editor.ql-blank::before { color: var(--text-secondary); font-style: italic; }

/* Liens dans l'éditeur */
.bi-quill .ql-editor a { color: var(--gold); }

/* Tooltip lien (popup d'insertion d'URL) */
.ql-snow .ql-tooltip {
    background: var(--bg-modal) !important;
    border: 1px solid var(--gold) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    border-radius: 3px;
    z-index: 30000;
}
.ql-snow .ql-tooltip input[type=text] {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--text-primary);
    border-radius: 3px;
    padding: 4px 8px;
}
.ql-snow .ql-tooltip a.ql-action,
.ql-snow .ql-tooltip a.ql-remove { color: var(--gold); }
.ql-snow .ql-tooltip a.ql-preview { color: var(--text-secondary); }

/* Responsive builder */
@media screen and (max-width: 768px) {
    .builder-layout  { flex-direction: column; }
    .builder-sidebar { width: 100%; border-right: 1px solid var(--border-card); border-radius: 6px 6px 0 0; position: static; }
    .builder-content { border-radius: 0 0 6px 6px; }
    .sb-actions      { opacity: 1; }
}

input, textarea, select {
    width: 100%; padding: 12px;
    background: var(--bg-input); border: 1px solid var(--border-input);
    color: var(--text-primary); margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}
label { display: block; margin-bottom: 6px; font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }

.btn-gold {
    background: var(--gold); color: #fff; border: none;
    padding: 12px 25px; font-weight: bold; cursor: pointer;
    text-transform: uppercase; font-family: 'Montserrat', sans-serif;
}
.btn-text {
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; padding: 12px 25px; font-weight: bold;
    text-transform: uppercase; font-family: 'Montserrat', sans-serif;
}

/* ==========================================================================
   5. BLOCS PUBLICS (BANNIÈRE & GALERIE)
   ========================================================================== */

/* Blocs texte + image */
.block-text-img {
    display: flex;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}
.block-text-img--right { flex-direction: row-reverse; }
.block-text-img__text  { flex: 1; line-height: 1.8; }
.block-text-img__img   { flex: 1; }
.block-text-img__img img { width: 100%; display: block; border-radius: 2px; }

.block-banner {
    width: 100vw; position: relative; left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw; height: 450px;
    background-size: cover; background-position: center;
}
.banner-overlay {
    height: 100%; background: var(--banner-overlay);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; gap: 15px;
}
.banner-overlay h2 {
    font-size: 3rem; color: var(--gold);
    text-transform: uppercase; text-shadow: var(--banner-text-shadow);
}
.banner-overlay p {
    font-size: 1.1rem; color: var(--text-primary);
    text-shadow: var(--banner-text-shadow);
}

.block-gallery {
    width: 100vw; position: relative; left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw; overflow: hidden;
    height: 350px; margin: 40px 0;
}
.gallery-track {
    display: flex; width: max-content;
    animation: scrollGallery 40s linear infinite; gap: 10px;
}
.gallery-track img { height: 350px; width: auto; object-fit: cover; }
@keyframes scrollGallery {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ==========================================================================
   6. ACCORDÉON BILLETTERIE
   ========================================================================== */
.accordion-ticketing {
    max-width: 1000px; margin: 20px auto 40px auto;
    border: 1px solid var(--gold); border-radius: 4px;
    overflow: hidden; background: var(--bg-accordion);
}
.accordion-trigger {
    width: 100%; padding: 18px 25px;
    background: var(--accordion-trigger-bg);
    color: var(--accordion-trigger-color);
    border: none; cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; text-transform: uppercase;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-nav); transition: 0.2s;
}
.accordion-trigger:hover { background: var(--accordion-trigger-hover); }
.accordion-trigger::after { content: "▼"; font-size: 0.8rem; transition: transform 0.4s; }
.accordion-ticketing.active .accordion-trigger::after { transform: rotate(180deg); }
.accordion-content {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height 0.6s ease, opacity 0.4s ease;
}
.accordion-ticketing.active .accordion-content {
    max-height: 3000px; opacity: 1; min-height: 600px;
    background: var(--accordion-content-bg);
}
.iframe-wrapper { width: 100%; height: 100%; display: block; }
.iframe-wrapper iframe { width: 100% !important; min-height: 600px; border: none; }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
#main-footer {
    padding: 40px 5%; border-top: 1px solid var(--border-nav);
    background: var(--footer-bg); margin-top: 60px;
    color: var(--text-primary);
}
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.admin-link {
    color: var(--footer-link); text-decoration: none;
    font-size: 0.8rem; font-weight: bold;
    text-transform: uppercase; margin-left: 20px; transition: 0.3s;
}
.admin-link:hover { color: var(--gold); }
.logout-btn { color: #e74c3c !important; }

/* ==========================================================================
   8. BURGER & RESPONSIVE
   ========================================================================== */
#burger-menu {
    display: none; flex-direction: column; gap: 6px;
    cursor: pointer; z-index: 10001; padding: 4px;
}
#burger-menu span {
    display: block; width: 28px; height: 3px;
    background-color: var(--burger-color); transition: 0.3s; border-radius: 2px;
}

.page-container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* ── TABLETTE (≤ 900px) ─────────────────────────────────────────────────── */
@media screen and (max-width: 900px) {
    .news-content { padding: 30px; }
}

/* ── MOBILE (≤ 768px) ───────────────────────────────────────────────────── */
@media screen and (max-width: 768px) {

    /* background-attachment: fixed non supporté sur iOS Safari */
    body { background-attachment: scroll; }

    /* --- Blocs texte + image : image au-dessus sur mobile --- */
    .block-text-img,
    .block-text-img--right {
        flex-direction: column !important;
    }
    .block-text-img--right .block-text-img__img,
    .block-text-img .block-text-img__img { order: -1; }  /* image toujours en premier */

    /* --- Navigation --- */
    #burger-menu { display: flex; }

    #nav-links {
        display: flex;
        position: fixed; top: 80px; left: 0; right: 0;
        width: 100%; height: calc(100vh - 80px);
        background: var(--bg-mobile-nav);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 36px;
        transform: translateX(100%);
        transition: transform 0.35s ease-in-out;
        border-top: 1px solid var(--border-mobile);
        list-style: none;
        margin: 0; padding: 0;
    }
    #nav-links.active { transform: translateX(0); }
    #dynamic-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 36px;
    }
    #nav-links li { list-style: none; }
    #nav-links a { font-size: 1.3rem; letter-spacing: 0.05em; }

    #burger-menu.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    #burger-menu.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    #burger-menu.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* --- Hero --- */
    .hero {
        height: auto !important;
        min-height: 220px;
        padding: 48px 24px;
        align-items: center;
    }
    .hero h1 { font-size: clamp(1.6rem, 7vw, 2.8rem); }
    .hero p   { font-size: 0.9rem; margin-top: 12px; }

    /* --- Carousel --- */
    .carousel-outer { padding: 40px 0; }
    #carousel-viewport {
        height: auto;
        min-height: 520px;
    }
    .news-slide {
        flex-direction: column;
        height: auto;
        min-height: 520px;
    }
    .news-img {
        flex: none;
        height: 200px;
        width: 100%;
    }
    .news-img img { width: 100%; height: 100%; object-fit: cover; }
    .news-content {
        flex: 1;
        padding: 24px 20px;
        overflow-y: auto;
        justify-content: flex-start;
    }
    .news-content h3 { font-size: 1.2rem; margin-bottom: 10px; }
    .news-content p  { font-size: 0.9rem; line-height: 1.6; }
    .news-link-btn   {
        display: block; text-align: center;
        margin-top: 16px; padding: 12px 20px;
    }

    /* --- Modales --- */
    .modal-content {
        width: 100%;
        max-height: 100dvh;
        height: 100dvh;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 20px 16px;
        overflow-y: auto;
    }
    .modal-content.small {
        max-width: 100%;
        height: auto;
        max-height: 90dvh;
        border-radius: 0;
        margin-top: auto;
        align-self: flex-end;
    }
    .modal-overlay { align-items: flex-end; }
    .modal-overlay:has(.modal-content.small) { align-items: flex-end; }

    .modal-header h2 { font-size: 1.2rem; }
    .close-btn { font-size: 2rem; top: 12px; right: 14px; }

    /* --- Onglets admin --- */
    .admin-tabs { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .btn-tab    { padding: 10px 14px; font-size: 0.72rem; white-space: nowrap; flex-shrink: 0; }

    /* --- Formulaires dans modales --- */
    input, textarea, select { font-size: 16px; } /* évite le zoom iOS sur focus */

    /* --- Login --- */
    #login-form { padding: 8px 0; }
    #login-form input { margin-bottom: 12px; }

    /* --- Footer --- */
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .footer-admin { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
    .admin-link { margin-left: 0; padding: 6px 10px; }

    /* --- Blocs publics --- */
    .block-banner { height: 240px; }
    .banner-overlay h2 { font-size: 1.8rem; }
    .banner-overlay p  { font-size: 0.9rem; }

    .block-gallery { height: 200px; }
    .gallery-track img { height: 200px; }

    .block-table-wrapper { padding: 0 16px; }
    table { min-width: 0; width: 100%; }
    th, td { padding: 10px 12px; font-size: 0.85rem; }

    /* --- Builder sidebar --- */
    .builder-layout   { flex-direction: column; }
    .builder-sidebar  {
        width: 100%;
        border-right: 1px solid var(--border-card);
        border-radius: 6px 6px 0 0;
        position: static;
    }
    .builder-content  { border-radius: 0 0 6px 6px; }
    .sb-actions       { opacity: 1; }

    /* --- Image Manager --- */
    .imgmgr-content   { padding: 16px; max-height: 100dvh; }
    .imgmgr-grid      { grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); max-height: 45vh; }
    .imgmgr-toolbar   { flex-direction: column; align-items: stretch; }
    .imgmgr-filters   { justify-content: center; }
    .imgmgr-del       { opacity: 1; } /* toujours visible sur mobile (pas de hover) */
    .imgmgr-thumb-name { opacity: 1; }
}

/* ==========================================================================
   IMAGE MANAGER
   ========================================================================== */
.imgmgr-content {
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 24px;
    max-height: 90vh;
}

/* Toolbar */
.imgmgr-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.imgmgr-filters {
    display: flex;
    gap: 4px;
}

.imgmgr-filter {
    padding: 6px 14px;
    background: none;
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: 0.15s;
    border-radius: 3px;
}
.imgmgr-filter:hover  { border-color: var(--gold); color: var(--gold); }
.imgmgr-filter.active { background: rgba(212,175,55,0.15); border-color: var(--gold); color: var(--gold); }

/* Zone upload drag & drop */
.imgmgr-upload-zone {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 2px dashed var(--border-card);
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: 0.2s;
    user-select: none;
}
.imgmgr-upload-zone:hover,
.imgmgr-drop--over {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212,175,55,0.06);
}

/* Grille */
.imgmgr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    overflow-y: auto;
    max-height: 50vh;
    min-height: 200px;
    padding: 4px 2px;
}

.imgmgr-loading,
.imgmgr-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
}

/* Vignette */
.imgmgr-thumb {
    position: relative;
    aspect-ratio: 1;
    border: 2px solid var(--border-card);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    background: var(--bg-card);
}
.imgmgr-thumb:hover             { border-color: var(--gold); transform: scale(1.02); }
.imgmgr-thumb--selected         { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }

.imgmgr-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* Badge used / unused */
.imgmgr-badge {
    position: absolute;
    top: 5px; left: 5px;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.imgmgr-badge--used   { background: rgba(39,174,96,0.9);  color: #fff; }
.imgmgr-badge--unused { background: rgba(120,120,120,0.7); color: #fff; }

/* Bouton supprimer */
.imgmgr-del {
    position: absolute;
    top: 5px; right: 5px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(231,76,60,0.85);
    border: none;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}
.imgmgr-thumb:hover .imgmgr-del { opacity: 1; }

/* Nom de fichier */
.imgmgr-thumb-name {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.6rem;
    padding: 3px 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.15s;
}
.imgmgr-thumb:hover .imgmgr-thumb-name { opacity: 1; }

/* Pied de page / prévisualisation */
.imgmgr-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-card);
}
.imgmgr-footer img {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-card);
    flex-shrink: 0;
}
.imgmgr-footer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.imgmgr-footer-info span:first-child {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.imgmgr-footer-info span:last-child {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

@media screen and (max-width: 600px) {
    .imgmgr-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
    .imgmgr-toolbar { flex-direction: column; align-items: stretch; }
    .imgmgr-filters { justify-content: center; }
}

/* ==========================================================================
   ONGLET CONFIGURATION
   ========================================================================== */
.config-section {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 20px;
    max-width: 480px;
}
.config-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gold);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-card);
}

/* ==========================================================================
   BILLETTERIE — BACK-OFFICE
   ========================================================================== */
.tk-admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--border-card);
    margin-bottom: 20px;
}
.tk-admin-tab,
a.tk-admin-tab {
    padding: 9px 14px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--admin-tab-inactive);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
}
.tk-admin-tab:hover,
a.tk-admin-tab:hover  { color: var(--text-primary); }
.tk-admin-tab.active  { color: var(--gold); border-bottom-color: var(--gold); }

.tk-admin-panel        { display: none; flex: 1; overflow-y: auto; padding-right: 4px; box-sizing: border-box; }
.tk-admin-panel.active { display: flex; flex-direction: column; }

/* Ligne spectacle */
.tk-event-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--builder-item-bg);
    border: 1px solid var(--border-card);
    border-radius: 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.tk-event-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.tk-event-info strong {
    font-size: 0.88rem;
    color: var(--text-primary);
}
.tk-event-info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.tk-event-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.tk-status {
    font-size: 0.72rem;
    font-weight: 700;
}

/* Tableau commandes */
.tk-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 700px;
}
.tk-orders-table th {
    background: rgba(212,175,55,0.12);
    color: var(--gold);
    padding: 10px 12px;
    text-align: left;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
    border-bottom: 1px solid var(--border-card);
}
.tk-orders-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-card);
    vertical-align: middle;
    color: var(--text-primary);
}
.tk-orders-table tr:last-child td { border-bottom: none; }
.tk-orders-table tr:hover td { background: rgba(255,255,255,0.02); }

.tk-seat-tag {
    display: inline-block;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.25);
    color: var(--gold);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.72rem;
    font-weight: 700;
    margin: 1px;
}

/* ==========================================================================
   BILLETTERIE — MODALE PUBLIQUE
   ========================================================================== */

/* Overlay */
.tk-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 30000;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* Modale principale */
.tk-modal {
    background: var(--bg-modal);
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* En-tête */
.tk-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-nav);
    background: var(--bg-nav);
    flex-shrink: 0;
}
.tk-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gold);
    flex-shrink: 0;
}
.tk-modal-logo { font-size: 1.2rem; }
.tk-modal-event {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tk-modal-header .close-btn {
    position: static;
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Écrans */
.tk-screen {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Chargement */
.tk-loader-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.tk-loader {
    width: 40px; height: 40px;
    border: 3px solid rgba(212,175,55,0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: tkSpin 0.8s linear infinite;
}
@keyframes tkSpin { to { transform: rotate(360deg); } }

/* Vide / erreur */
.tk-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: var(--text-secondary);
}
.tk-btn-close {
    background: none;
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    padding: 10px 24px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Contenu intérieur scrollable */
.tk-screen-inner {
    padding: 24px;
    max-width: 100%;
}
.tk-screen-inner--narrow {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}
.tk-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold);
    margin-bottom: 20px;
}

/* ── Liste des spectacles ──────────────────────────────────────────── */
.tke-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.tke-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 4px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}
.tke-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.tke-card__title { font-size: 1rem; font-weight: 800; color: var(--gold); margin-bottom: 6px; }
.tke-card__date  { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 10px; }
.tke-card__desc  { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.tke-card__prices {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
    font-size: 0.72rem; color: var(--text-secondary);
}
.tke-card__btn {
    background: var(--gold);
    color: #fff;
    text-align: center;
    padding: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* ── Plan de salle ─────────────────────────────────────────────────── */
.tk-seats-layout {
    flex: 1;
    display: flex;
    gap: 0;
    overflow: hidden;
}

.tk-plan-wrap {
    flex: 1;
    overflow: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tk-stage {
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05));
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 4px 4px 0 0;
    padding: 10px 40px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-bottom: 16px;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.tk-plan { display: flex; flex-direction: column; gap: 4px; align-items: center; }

.tk-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.tk-row-lbl {
    width: 18px;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.tk-center, .tk-wing { display: flex; gap: 3px; }
.tk-aisle { width: 18px; flex-shrink: 0; }

/* Siège */
.tk-seat {
    width: 22px;
    height: 18px;
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    transition: transform 0.1s;
    flex-shrink: 0;
}
.tk-seat:hover { transform: scale(1.2); z-index: 2; position: relative; }

.tk-seat--free     { background: rgba(212,175,55,0.2); border: 1px solid rgba(212,175,55,0.5); }
.tk-seat--free:hover { background: rgba(212,175,55,0.45); }
.tk-seat--selected { background: #27ae60; border: 1px solid #2ecc71; }
.tk-seat--pending,
.tk-seat--sold     { background: #2a2a2a; border: 1px solid #333; cursor: not-allowed; }
.tk-seat--pending:hover,
.tk-seat--sold:hover { transform: none; }

/* Légende */
.tk-legend {
    display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; justify-content: center;
}
.tk-legend-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.7rem; color: var(--text-secondary);
}
.tk-legend-dot {
    width: 16px; height: 13px; border-radius: 3px 3px 0 0; display: inline-block;
}

/* ── Panneau de sélection ──────────────────────────────────────────── */
.tk-panel {
    width: 260px;
    flex-shrink: 0;
    border-left: 1px solid var(--border-card);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
    overflow-y: auto;
}
.tk-panel-card {
    border: 1px solid var(--border-card);
    border-radius: 4px;
    padding: 14px;
}
.tk-panel-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.tk-sel-empty {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 8px 0;
}
.tk-sel-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-card);
}
.tk-sel-item:last-child { border-bottom: none; }
.tk-sel-seat {
    font-weight: 800;
    font-size: 0.85rem;
    color: #27ae60;
    min-width: 42px;
}
.tk-sel-type {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    padding: 4px 6px;
}
.tk-sel-rm {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
    transition: color 0.15s;
}
.tk-sel-rm:hover { color: #e74c3c; }

.tk-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--border-card);
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.tk-total-line strong { font-size: 1.2rem; color: var(--gold); }

.tk-avail { font-size: 0.72rem; color: var(--text-secondary); text-align: center; }
.tk-avail span { color: #27ae60; font-weight: 700; }

/* Boutons */
.tk-btn-gold {
    display: block; width: 100%;
    padding: 13px;
    background: var(--gold); color: #fff; border: none;
    font-family: 'Montserrat', sans-serif; font-weight: 700;
    font-size: 0.85rem; text-transform: uppercase;
    cursor: pointer; transition: background 0.2s;
}
.tk-btn-gold:hover:not(:disabled) { background: #c49f2a; }
.tk-btn-gold:disabled { background: #333; color: #555; cursor: not-allowed; }

.tk-btn-outline {
    padding: 13px 20px;
    background: none;
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; font-size: 0.8rem;
    text-transform: uppercase; cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.tk-btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ── Formulaire client ─────────────────────────────────────────────── */
.tk-form-recap {
    background: rgba(212,175,55,0.06);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 3px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.tk-recap-event { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 8px; }
.tk-recap-seats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tk-recap-badge {
    background: rgba(39,174,96,0.15);
    border: 1px solid rgba(39,174,96,0.3);
    color: #27ae60;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 2px;
}
.tk-recap-badge small { font-weight: 400; color: var(--text-secondary); }
.tk-recap-total { font-size: 1.2rem; font-weight: 900; color: var(--gold); }

.tk-form-group { margin-bottom: 14px; }
.tk-label {
    display: block;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-secondary); margin-bottom: 6px;
}
.tk-input {
    width: 100%; padding: 11px 12px;
    background: var(--bg-input); border: 1px solid var(--border-input);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif; font-size: 0.9rem;
    border-radius: 3px; transition: border-color 0.2s;
}
.tk-input:focus { outline: none; border-color: var(--gold); }
.tk-form-err {
    background: rgba(231,76,60,0.1);
    border: 1px solid rgba(231,76,60,0.3);
    color: #e74c3c;
    font-size: 0.78rem;
    padding: 8px 12px;
    border-radius: 3px;
    margin-bottom: 12px;
}
.tk-form-info { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.6; margin: 12px 0; }
.tk-form-actions { display: flex; gap: 10px; margin-top: 20px; }
.tk-form-actions .tk-btn-gold { flex: 1; }

/* ── Bloc billetterie public (bouton d'ouverture) ──────────────────── */
.ticketing-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid rgba(212,175,55,0.3);
    border-left: 4px solid var(--gold);
    border-radius: 4px;
    padding: 24px 28px;
    margin: 40px auto;
    max-width: 1000px;
    flex-wrap: wrap;
}
.ticketing-block__title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}
.ticketing-block__sub { font-size: 0.85rem; color: var(--text-secondary); }
.ticketing-block__btn {
    background: var(--gold); color: #fff; border: none;
    padding: 14px 28px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; font-size: 0.9rem;
    text-transform: uppercase; cursor: pointer;
    white-space: nowrap; transition: background 0.2s;
    flex-shrink: 0;
}
.ticketing-block__btn:hover { background: #c49f2a; }

/* ── Responsive modale ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tk-seats-layout { flex-direction: column; overflow: visible; }
    .tk-plan-wrap    { padding: 16px 8px; }
    .tk-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-card);
        flex-direction: column;
    }
    .tk-seat { width: 18px; height: 15px; }
    .tk-aisle { width: 12px; }
    .ticketing-block { flex-direction: column; text-align: center; }
    .ticketing-block__btn { width: 100%; }
}

/* ── Import HelloAsso — liste des événements ──────────────────────────────── */

/* ── Bouton scanner dans l'onglet billetterie ────────────────────────────── */
.tk-scanner-btn {
    background: rgba(212,175,55,0.12);
    color: var(--gold);
    border: 1px solid rgba(212,175,55,0.35);
    border-bottom: 1px solid rgba(212,175,55,0.35);
    border-radius: 4px;
    margin: 4px 0 4px 8px;
    padding: 5px 14px;
}
.tk-scanner-btn:hover {
    background: rgba(212,175,55,0.25);
    color: var(--gold);
}