:root {
    --bg: #101a33;
    --topbar: #0c1428;
    --panel: #11192d;
    --panel-2: #151e33;
    --panel-3: #1a243a;

    --border: #2a354d;

    --text: #f6f7fb;
    --muted: #9aa8c2;
    --soft: #bdd5ff;

    --gold: #51e2c2;
    --gold-dark: #41b59b;

    --green: #2aa977;
    --green-soft: rgba(42, 169, 119, .12);

    --red: #d85262;
    --red-soft: rgba(216, 82, 98, .12);

    --shadow:
        0 18px 50px rgba(0, 0, 0, .18);
}


* {
    box-sizing: border-box;
}


html {
    color-scheme: dark;
}


body {
    margin: 0;

    background:
        radial-gradient(
            circle at 85% 0%,
            rgba(34, 56, 101, .16),
            transparent 30%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


button,
input {
    font: inherit;
}


button,
a {
    -webkit-tap-highlight-color:
        transparent;
}


/* ==========================================================
   TOPBAR
   ========================================================== */

.topbar {
    border-bottom:
        1px solid rgba(255, 255, 255, .06);

    background:
        color-mix(
            in srgb,
            var(--topbar) 94%,
            transparent
        );

    backdrop-filter:
        blur(14px);

    position: sticky;

    top: 0;

    z-index: 10;
}


.topbar-inner {
    width:
        min(calc(100% - 40px), 1500px);

    min-height: 72px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 20px;
}


.brand {
    color: var(--gold);

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 1.5px;
}


.cinema-name {
    margin-top: 3px;

    font-size: 18px;

    font-weight: 850;
}


.user-actions {
    display: flex;

    align-items: center;

    justify-content:
        flex-end;

    gap: 9px;

    flex-wrap: wrap;
}


.user-actions strong {
    margin-right: 5px;

    font-size: 14px;
}


.top-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 38px;

    padding: 8px 13px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    background:
        var(--panel-2);

    color: var(--text);

    text-decoration: none;

    cursor: pointer;

    font-size: 13px;

    font-weight: 750;
}


.top-button:hover {
    background:
        var(--panel-3);
}


.top-button.primary {
    background:
        var(--gold);

    color: #10131a;

    border-color:
        var(--gold);
}


/* ==========================================================
   PAGE
   ========================================================== */

.planning-page {
    width:
        min(calc(100% - 40px), 1500px);

    margin:
        0 auto 80px;
}


.week-hero {
    padding:
        38px 0 28px;
}


.eyebrow {
    color: var(--gold);

    font-size: 12px;

    font-weight: 900;

    letter-spacing: 1.5px;
}


.week-hero h1 {
    margin:
        10px 0 7px;

    font-size:
        clamp(34px, 5vw, 58px);

    line-height: 1.05;

    letter-spacing: -.02em;
}


.week-hero p {
    margin: 0;

    color: var(--soft);

    font-size: 16px;
}


/* ==========================================================
   OUTILS
   ========================================================== */

.planning-tools {
    margin-top: 6px;
}


.search-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) auto;

    gap: 10px;
}


.search-box {
    min-height: 50px;

    display: flex;

    align-items: center;

    gap: 10px;

    padding:
        0 16px;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background:
        var(--panel-2);
}


.search-box input {
    width: 100%;

    border: 0;

    outline: 0;

    background:
        transparent;

    color: var(--text);

    font-size: 14px;
}


.search-box input::placeholder {
    color: #7e8ba4;
}


.icon-button {
    width: 50px;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background:
        var(--panel-2);

    cursor: pointer;

    font-size: 18px;
}


.stats-row {
    display: flex;

    gap: 10px;

    margin-top: 8px;

    flex-wrap: wrap;
}


.stat-card {
    min-height: 60px;

    display: flex;

    align-items: center;

    gap: 12px;

    padding:
        10px 18px;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background:
        var(--panel-2);
}


.stat-icon {
    font-size: 19px;
}


.stat-card strong,
.stat-card span {
    display: block;
}


.stat-card strong {
    font-size: 15px;
}


.stat-card span {
    margin-top: 2px;

    color: var(--soft);

    font-size: 11px;
}


.coverage-card.complete {
    border-color:
        rgba(42, 169, 119, .38);

    background:
        var(--green-soft);
}


.coverage-card.incomplete {
    border-color:
        rgba(216, 82, 98, .38);

    background:
        var(--red-soft);
}


.day-filter-title {
    margin:
        22px 0 9px;
}


.pill,
.week-pill {
    border:
        1px solid var(--border);

    border-radius: 999px;

    background:
        transparent;

    color: var(--soft);

    cursor: pointer;

    font-size: 12px;
}


.pill {
    padding:
        9px 15px;
}


.pill.active,
.week-pill.active {
    background:
        var(--gold);

    border-color:
        var(--gold);

    color: #11151f;

    font-weight: 850;
}


.days-navigation {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(80px, 1fr));

    gap: 8px;
}


.day-button {
    position: relative;

    min-height: 67px;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background:
        var(--panel-2);

    color: var(--text);

    cursor: pointer;
}


.day-button:hover {
    border-color:
        #455572;
}


.day-button.active {
    border-color:
        var(--gold);

    box-shadow:
        inset 0 0 0 1px var(--gold);
}


.day-name {
    display: block;

    color: #91c6ff;

    font-size: 10px;

    letter-spacing: .5px;
}


.day-button strong {
    display: block;

    margin-top: 4px;

    font-size: 18px;
}


.day-count {
    position: absolute;

    right: 8px;

    top: 7px;

    min-width: 18px;

    height: 18px;

    display: grid;

    place-items: center;

    border-radius: 999px;

    background:
        rgba(228, 170, 54, .14);

    color: var(--gold);

    font-size: 10px;

    font-weight: 850;
}


.weeks-navigation {
    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 14px;

    margin-top: 20px;
}


.week-arrow {
    padding:
        10px 0;

    border: 0;

    background:
        transparent;

    color: #9dcfff;

    cursor: pointer;

    font-size: 12px;
}


.week-arrow:first-child {
    text-align: left;
}


.week-arrow:last-child {
    text-align: right;
}


.nearby-weeks {
    display: flex;

    justify-content: center;

    gap: 7px;

    flex-wrap: wrap;
}


.week-pill {
    padding:
        8px 12px;
}


/* ==========================================================
   TITRES SECTIONS
   ========================================================== */

.section-heading {
    display: flex;

    justify-content:
        space-between;

    align-items: end;

    gap: 20px;

    margin-bottom: 18px;
}


.section-heading h2 {
    margin:
        6px 0 0;

    font-size: 27px;
}


.visible-count {
    color: #a8d3ff;

    font-size: 14px;
}


.programming-section {
    margin-top: 42px;
}


/* ==========================================================
   MES SEANCES
   ========================================================== */

.my-planning {
    margin-top: 40px;

    padding:
        20px;

    border:
        1px solid rgba(228, 170, 54, .25);

    border-radius: 16px;

    background:
        rgba(228, 170, 54, .04);
}


.my-planning-list {
    display: grid;

    gap: 8px;
}


.my-session {
    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 15px;

    padding:
        12px 14px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    background:
        var(--panel-2);
}


.my-session strong,
.my-session span {
    display: block;
}


.my-session span {
    margin-top: 3px;

    color: var(--soft);

    font-size: 12px;
}


.mini-unsubscribe {
    border: 0;

    background:
        transparent;

    color: #ff8d99;

    cursor: pointer;

    font-size: 12px;
}


/* ==========================================================
   CARTES SEANCES
   ========================================================== */

.seances-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 16px;
}


.session-card {
    min-width: 0;

    border:
        1px solid var(--border);

    border-radius: 17px;

    background:
        var(--panel-2);

    overflow: hidden;

    box-shadow:
        var(--shadow);
}


.session-card.session-complete {
    border-color:
        rgba(42, 169, 119, .30);
}


.session-top {
    min-height: 124px;

    display: grid;

    grid-template-columns:
        56px minmax(0, 1fr) 58px;

    gap: 12px;

    align-items: start;

    padding:
        18px 20px 16px;
}


.session-date-box {
    min-height: 66px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    border:
        1px solid #33415d;

    border-radius: 11px;

    background:
        rgba(255, 255, 255, .015);
}


.session-date-box span,
.session-date-box small {
    color: #9bc9fa;

    font-size: 10px;
}


.session-date-box strong {
    margin: 2px 0;

    font-size: 18px;
}


.session-main {
    min-width: 0;
}


.session-time {
    color: var(--gold);

    font-size: 13px;

    font-weight: 850;
}


.session-film-title {
    display: block;

    width: 100%;

    margin-top: 5px;

    padding: 0;

    border: 0;

    background:
        transparent;

    color: var(--text);

    text-align: left;

    font-size: 18px;

    line-height: 1.2;

    font-weight: 850;

    cursor: pointer;
}


.session-film-title:hover {
    color: var(--gold);
}


.session-room {
    margin-top: 7px;

    color: var(--muted);

    font-size: 11px;
}


.poster-button {
    width: 58px;

    height: 86px;

    padding: 0;

    border: 0;

    border-radius: 7px;

    overflow: hidden;

    background:
        transparent;

    cursor: pointer;
}


.poster-button img {
    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;
}


.poster-placeholder {
    width: 58px;

    height: 86px;

    display: grid;

    place-items: center;

    border:
        1px solid var(--border);

    border-radius: 7px;

    background:
        var(--panel-3);

    font-size: 22px;
}


.session-posts {
    padding:
        0 20px 18px;
}


.session-post {
    padding:
        14px 0;

    border-top:
        1px solid var(--border);
}


.post-heading {
    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 10px;

    color: var(--soft);

    font-size: 12px;
}


.status-complete {
    color: #64d9aa;
}


.status-missing {
    color: #ff8794;
}


.volunteer-list {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;

    margin-top: 10px;
}


.volunteer-chip {
    display: inline-flex;

    align-items: center;

    min-height: 31px;

    padding:
        5px 10px;

    border:
        1px solid rgba(228, 170, 54, .48);

    border-radius: 999px;

    color: #f5c665;

    background:
        rgba(228, 170, 54, .06);

    font-size: 12px;

    font-weight: 700;
}


.volunteer-chip.me {
    border-color:
        rgba(42, 169, 119, .60);

    background:
        var(--green-soft);

    color: #8ae2be;
}


.volunteer-chip.empty {
    border-style: dashed;

    border-color:
        #33415d;

    background:
        transparent;

    color: #70809d;

    font-weight: 500;
}


.registration-button {
    width: 100%;

    min-height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-top: 13px;

    padding:
        9px 12px;

    border: 0;

    border-radius: 10px;

    background:
        var(--gold);

    color: #10141c;

    text-decoration: none;

    cursor: pointer;

    font-weight: 900;

    font-size: 13px;
}


.registration-button:hover {
    background:
        #efb843;
}


.registration-button.registered {
    background:
        rgba(42, 169, 119, .14);

    color: #82deb8;

    border:
        1px solid rgba(42, 169, 119, .38);
}


.registration-unavailable {
    margin-top: 12px;

    padding:
        8px 10px;

    border-radius: 8px;

    background:
        rgba(255, 255, 255, .035);

    color: #8290aa;

    text-align: center;

    font-size: 11px;
}


/* ==========================================================
   MODALE
   ========================================================== */

.modal {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: grid;

    place-items: center;

    padding: 20px;
}


.hidden {
    display: none !important;
}


.modal-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(2, 6, 15, .78);

    backdrop-filter:
        blur(5px);
}


.modal-box {
    position: relative;

    z-index: 1;

    width:
        min(100%, 480px);

    max-height:
        calc(100vh - 40px);

    overflow-y: auto;

    padding: 28px;

    border:
        1px solid var(--border);

    border-radius: 20px;

    background:
        var(--panel-2);

    box-shadow:
        0 30px 100px rgba(0, 0, 0, .50);
}


.modal-close {
    position: absolute;

    top: 12px;

    right: 14px;

    width: 36px;

    height: 36px;

    border: 0;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, .06);

    color: var(--muted);

    cursor: pointer;

    font-size: 24px;
}


.modal-box h2 {
    margin:
        8px 45px 8px 0;
}


.modal-message {
    color: var(--muted);

    line-height: 1.55;
}


.modal-actions {
    display: flex;

    gap: 10px;

    margin-top: 20px;

    flex-wrap: wrap;
}


.modal-button {
    flex: 1;

    min-width: 130px;

    padding:
        11px 14px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    background:
        var(--panel-3);

    color: var(--text);

    cursor: pointer;

    font-weight: 750;
}


.modal-button.primary {
    background:
        var(--gold);

    border-color:
        var(--gold);

    color: #11151e;
}


.error-message {
    margin-top: 14px;

    color: #ff8a96;
}


.success-message {
    margin-top: 14px;

    color: #71dfb1;
}


/* ==========================================================
   ETATS
   ========================================================== */

.loading,
.empty {
    grid-column:
        1 / -1;

    padding: 45px 20px;

    border:
        1px dashed var(--border);

    border-radius: 14px;

    color: var(--muted);

    text-align: center;
}


/* ==========================================================
   TABLETTE
   ========================================================== */

@media (max-width: 1100px) {

    .seances-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .nearby-weeks .week-pill:first-child,
    .nearby-weeks .week-pill:last-child {
        display: none;
    }
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 720px) {

    .topbar {
        position: static;
    }

    .topbar-inner {
        width:
            min(calc(100% - 24px), 1500px);

        padding:
            14px 0;

        align-items: flex-start;

        flex-direction: column;
    }

    .user-actions {
        justify-content:
            flex-start;
    }

    .planning-page {
        width:
            min(calc(100% - 20px), 1500px);
    }

    .week-hero {
        padding:
            28px 0 22px;
    }

    .week-hero h1 {
        font-size: 36px;
    }

    .days-navigation {
        grid-template-columns:
            repeat(7, minmax(44px, 1fr));

        gap: 4px;
    }

    .day-button {
        min-height: 61px;

        padding:
            5px 2px;
    }

    .day-count {
        display: none;
    }

    .weeks-navigation {
        grid-template-columns:
            1fr 1fr;
    }

    .nearby-weeks {
        grid-column:
            1 / -1;

        grid-row: 1;

        order: -1;
    }

    .week-arrow {
        grid-row: 2;
    }

    .seances-grid {
        grid-template-columns:
            1fr;
    }

    .section-heading {
        align-items:
            flex-start;

        flex-direction:
            column;

        gap: 7px;
    }

    .session-top {
        padding:
            16px;
    }

    .session-posts {
        padding:
            0 16px 16px;
    }

    .my-session {
        align-items:
            flex-start;

        flex-direction:
            column;
    }

    .stats-row {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    .stat-card {
        padding:
            9px 12px;
    }
}


@media (max-width: 430px) {

    .session-top {
        grid-template-columns:
            52px minmax(0, 1fr) 50px;
    }

    .poster-button,
    .poster-placeholder {
        width: 50px;

        height: 75px;
    }

    .week-hero h1 {
        font-size: 31px;
    }

    .top-button {
        font-size: 11px;

        padding:
            7px 9px;
    }
}


/* ==========================================================
   PHASE 2 - FICHE FILM
   ========================================================== */

.film-modal-box {
    width:
        min(100%, 540px);
}


.film-modal-box .modal-message {
    margin:
        0 0 20px;

    color: var(--muted);

    font-size: 13px;

    font-weight: 650;
}


.film-details {
    margin-top: 8px;
}


.film-info-block {
    margin-top: 16px;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.55;
}


.film-info-label {
    display: block;

    margin-bottom: 5px;

    color: var(--gold);

    font-size: 11px;

    font-weight: 900;

    letter-spacing: .7px;
}


.film-trailer-button {
    width: 100%;

    min-height: 44px;

    margin-top: 18px;

    border: 0;

    border-radius: 10px;

    background:
        var(--gold);

    color: #10141c;

    cursor: pointer;

    font-size: 13px;

    font-weight: 900;
}


.film-trailer-button:hover {
    background:
        #efb843;
}


.film-poster-wrapper {
    display: flex;

    justify-content: center;

    margin:
        18px 0 10px;
}


.film-large-poster {
    display: block;

    width:
        min(100%, 240px);

    max-height: 420px;

    border-radius: 10px;

    object-fit: contain;

    box-shadow:
        0 18px 45px rgba(0, 0, 0, .35);
}


.film-large-placeholder {
    width: 220px;

    height: 320px;

    display: grid;

    place-items: center;

    border:
        1px solid var(--border);

    border-radius: 10px;

    background:
        var(--panel-3);

    font-size: 52px;
}


.film-synopsis {
    margin-top: 20px;
}


.film-synopsis p {
    margin:
        8px 0 0;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.75;
}


/* ==========================================================
   BANDE-ANNONCE
   ========================================================== */

.trailer-modal-box {
    width:
        min(94vw, 980px);
}


.trailer-frame-wrapper {
    position: relative;

    width: 100%;

    margin-top: 20px;

    padding-top: 56.25%;

    overflow: hidden;

    border-radius: 12px;

    background: #000;
}


.trailer-frame {
    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    border: 0;
}


@media (max-width: 600px) {

    .film-modal-box {
        padding:
            23px 18px;
    }

    .film-large-poster {
        width:
            min(72vw, 240px);
    }

    .trailer-modal-box {
        width: 100%;
    }
}


/* ==========================================================
   MODE CLAIR FIXE CINEBESSIERES

   IMPORTANT :
   cette palette ne dépend PAS de la personnalisation
   du cinéma.
   ========================================================== */

html[data-theme="light"] {
    color-scheme: light;

    --topbar: #ffffff;

    --bg: #f4f6f9;

    --panel: #ffffff;
    --panel-2: #f8fafc;
    --panel-3: #eef2f7;

    --border: #d7dee8;

    --text: #172033;
    --muted: #68758b;
    --soft: #46627f;

    --gold: #28d7c2;
    --gold-dark: #18b8a7;

    --green: #21845f;
    --green-soft: rgba(33, 132, 95, .10);

    --red: #c43e50;
    --red-soft: rgba(196, 62, 80, .10);

    --accent-text: #071c1a;

    --shadow:
        0 14px 36px rgba(20, 32, 55, .10);
}


html[data-theme="light"] body {
    background:
        radial-gradient(
            circle at 85% 0%,
            rgba(40, 215, 194, .08),
            transparent 30%
        ),
        var(--bg);
}


/* Topbar */

html[data-theme="light"] .topbar {
    background:
        rgba(255, 255, 255, .94);

    border-bottom:
        1px solid var(--border);
}


/* Les éléments qui utilisaient des blancs transparents
   en mode sombre ont besoin d'une bordure adaptée. */

html[data-theme="light"] .session-card,
html[data-theme="light"] .day-button,
html[data-theme="light"] .search-box,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .my-session,
html[data-theme="light"] .modal-box,
html[data-theme="light"] .film-modal-box,
html[data-theme="light"] .trailer-modal-box {
    box-shadow:
        0 8px 24px rgba(20, 32, 55, .06);
}


/* Fenêtre modale */

html[data-theme="light"] .modal-overlay {
    background:
        rgba(17, 24, 39, .55);
}


/* Boutons de navigation supérieurs */

html[data-theme="light"] .top-button {
    background: var(--panel-2);
    color: var(--text);
}


/* Champs */

html[data-theme="light"] input {
    color: var(--text);
}


/* Certaines couleurs secondaires du thème sombre
   doivent rester lisibles sur fond clair. */

html[data-theme="light"] .week-arrow,
html[data-theme="light"] .week-pill:not(.active),
html[data-theme="light"] .day-name,
html[data-theme="light"] .session-room,
html[data-theme="light"] .my-session span {
    color: var(--muted);
}



/* ============================================================
   MODE CLAIR FIXE
   Palette CinéBessières
   Les couleurs personnalisées du cinéma ne doivent jamais
   modifier cette palette.
   ============================================================ */

html[data-theme="light"] {
    --bg: #f5f6f8 !important;

    --topbar: #ffffff !important;

    --panel: #ffffff !important;
    --panel-2: #f8f9fb !important;
    --panel-3: #f1f3f6 !important;

    --border: #d9dde3 !important;

    --gold: #51e2c2 !important;
    --gold-dark: #41b59b !important;

    --accent-text: #17191d !important;

    --text: #202226 !important;
    --muted: #69717d !important;

    --danger: #dc5965 !important;
    --success: #178b4e !important;
}


/* ------------------------------------------------------------
   Fond
   ------------------------------------------------------------ */

html[data-theme="light"] body {
    background:
        #f5f6f8 !important;

    color:
        #202226 !important;
}


/* ------------------------------------------------------------
   Bandeau
   ------------------------------------------------------------ */

html[data-theme="light"] .topbar {
    background:
        #ffffff !important;

    border-bottom-color:
        #d9dde3 !important;
}


/* ------------------------------------------------------------
   Couleur d'identité CinéBessières
   ------------------------------------------------------------ */

html[data-theme="light"] .brand,
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .section-kicker,
html[data-theme="light"] .stat-icon {
    color:
        #51e2c2 !important;
}


/* ------------------------------------------------------------
   Titres
   ------------------------------------------------------------ */

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] .cinema-name,
html[data-theme="light"] .film-title {
    color:
        #202226 !important;
}


/* ------------------------------------------------------------
   Champs et cartes
   ------------------------------------------------------------ */

html[data-theme="light"] .search-box,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .day-button,
html[data-theme="light"] .session-card,
html[data-theme="light"] .seance-card,
html[data-theme="light"] .upcoming-item,
html[data-theme="light"] .icon-button {
    background:
        #ffffff !important;

    border-color:
        #d9dde3 !important;
}


/* ------------------------------------------------------------
   Boutons / jour actif / semaine active
   ------------------------------------------------------------ */

html[data-theme="light"] .day-button.active,
html[data-theme="light"] .week-chip.active,
html[data-theme="light"] .week-button.active,
html[data-theme="light"] .filter-button.active {
    background:
        #51e2c2 !important;

    border-color:
        #51e2c2 !important;

    color:
        #17191d !important;
}


/* ------------------------------------------------------------
   Liens / accents
   ------------------------------------------------------------ */

html[data-theme="light"] .session-time,
html[data-theme="light"] .seance-time {
    color:
        #c78c1d !important;
}


/* ------------------------------------------------------------
   Le bouton de changement de thème reste blanc en mode clair.
   ------------------------------------------------------------ */

html[data-theme="light"] #theme-toggle {
    background:
        #ffffff !important;

    border-color:
        #d9dde3 !important;

    color:
        #202226 !important;
}


/* ============================================================
   PHASE 2B-3 - LOGO DU CINEMA DANS LE BANDEAU
   ============================================================ */

.cinema-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cinema-logo-zone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 38px;
    max-width: 125px;
}

.cinema-logo-image {
    display: block;
    width: auto;
    max-width: 125px;
    height: auto;
    max-height: 38px;
    object-fit: contain;
}

.cinema-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    line-height: 1;
}

@media (max-width: 600px) {
    .cinema-logo-zone {
        height: 32px;
        max-width: 95px;
    }

    .cinema-logo-image {
        max-width: 95px;
        max-height: 32px;
    }
}


/* ============================================================
   PHASE 2B-4 - DIMENSIONS FINALES LOGO
   ============================================================ */

.cinema-logo-zone {
    width: auto;
    height: 30px;
    max-width: 105px;
}

.cinema-logo-image {
    width: auto;
    height: auto;
    max-width: 105px;
    max-height: 30px;
    object-fit: contain;
}

.cinema-name {
    gap: 8px;
}

@media (max-width: 600px) {
    .cinema-logo-zone {
        width: auto;
        height: 28px;
        max-width: 95px;
    }

    .cinema-logo-image {
        width: auto;
        height: auto;
        max-width: 95px;
        max-height: 28px;
    }

    .cinema-name {
        gap: 7px;
    }
}



/* ============================================================
   PHASE 3 - GESTION DES AFFECTATIONS
   ============================================================ */

.manage-post-button {
    width: 100%;
    margin-top: 8px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        transform 0.15s ease;
}

.manage-post-button:hover {
    border-color: var(--gold);
    background: var(--panel-3);
    transform: translateY(-1px);
}

.management-panel {
    display: grid;
    gap: 22px;
    margin-top: 6px;
    text-align: left;
}

.management-section {
    display: grid;
    gap: 9px;
}

.management-section h4 {
    margin: 0 0 2px;
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.management-volunteer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-2);
}

.management-volunteer-name {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.management-volunteer-name strong {
    color: var(--text);
}

.management-volunteer-name span {
    color: var(--muted);
    font-size: 0.82rem;
}

.management-status {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 800;
}

.management-status.assigned {
    color: var(--success);
}

.management-empty {
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
    font-size: 0.86rem;
}

.management-assign-preview:disabled {
    opacity: 0.55;
    cursor: default;
}


@media (max-width: 600px) {

    .management-volunteer-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .management-volunteer-row .modal-button {
        width: 100%;
    }
}



/* ============================================================
   PHASE 3-1B
   ============================================================ */

.management-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-2);
}

.management-summary strong {
    color: var(--gold);
    font-size: 1rem;
}

.management-summary span {
    color: var(--muted);
    font-size: 0.86rem;
}

.modal-button.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.modal-button.danger:hover {
    background: var(--danger);
    color: #ffffff;
}



/* ============================================================
   PHASE 3.2 - CANDIDATURES
   ============================================================ */

.registration-button.pending {
    border-color: var(--gold);
    background: rgba(228, 170, 54, .10);
    color: var(--gold);
}

.management-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.management-candidate-count {
    margin-left: auto;
    color: var(--gold) !important;
    font-weight: 750;
}

.modal-button:disabled {
    opacity: .48;
    cursor: default;
}

@media (max-width: 600px) {

    .management-actions {
        width: 100%;
        justify-content: stretch;
    }

    .management-actions .modal-button {
        flex: 1;
    }
}



/* ==========================================================
   PHASE 4B - TMDB DEPUIS LA MODALE FILM
   ========================================================== */

.film-tmdb-management {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.film-tmdb-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.film-tmdb-heading strong {
    display: block;
    font-size: 14px;
}

.film-tmdb-mode {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.film-tmdb-mode.manual {
    color: var(--gold);
}

.film-tmdb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.film-tmdb-zone {
    margin-top: 14px;
}

.film-tmdb-search {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-3);
}

.film-tmdb-search-row {
    display: flex;
    gap: 8px;
}

.film-tmdb-search-row input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel);
    color: var(--text);
    font: inherit;
}

.film-tmdb-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.film-tmdb-result {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--panel);
}

.film-tmdb-result-poster {
    flex: 0 0 68px;
    width: 68px;
    height: 102px;
    border-radius: 7px;
    object-fit: cover;
}

.film-tmdb-result-poster.empty {
    display: grid;
    place-items: center;
    background: var(--panel-3);
    font-size: 25px;
}

.film-tmdb-result-content {
    flex: 1;
    min-width: 0;
}

.film-tmdb-result-content strong {
    display: block;
    font-size: 14px;
}

.film-tmdb-result-content small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.film-tmdb-result-meta {
    margin-top: 5px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 750;
}

.film-tmdb-result-content p {
    display: -webkit-box;
    margin: 8px 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.film-tmdb-loading,
.film-tmdb-help,
.film-tmdb-error {
    padding: 12px;
    border-radius: 9px;
    background: var(--panel-3);
    font-size: 12px;
}

.film-tmdb-error {
    color: var(--danger);
}

.film-tmdb-confirm {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--panel-3);
}

.film-tmdb-confirm p {
    margin: 7px 0 13px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.film-tmdb-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 560px) {

    .film-tmdb-heading,
    .film-tmdb-search-row {
        flex-direction: column;
    }

    .film-tmdb-mode {
        align-self: flex-start;
    }

    .film-tmdb-result-poster {
        flex-basis: 58px;
        width: 58px;
        height: 87px;
    }
}


/* ==========================================================
   PHASE 5A - VERSION DE PROJECTION
   ========================================================== */

.projection-version-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 7px;
    padding: 3px 7px;
    border: 1px solid color-mix(
        in srgb,
        var(--gold) 55%,
        transparent
    );
    border-radius: 999px;
    background: color-mix(
        in srgb,
        var(--gold) 12%,
        transparent
    );
    color: var(--gold);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .04em;
    vertical-align: middle;
}


/* ==========================================================
   PHASE 5A - COULEURS DES VERSIONS
   ========================================================== */

.projection-version-badge.version-vf {
    border-color:
        color-mix(
            in srgb,
            var(--gold) 55%,
            transparent
        );

    background:
        color-mix(
            in srgb,
            var(--gold) 12%,
            transparent
        );

    color:
        var(--gold);
}


.projection-version-badge.version-autre {
    border-color:
        color-mix(
            in srgb,
            #ef4444 70%,
            transparent
        );

    background:
        color-mix(
            in srgb,
            #ef4444 14%,
            transparent
        );

    color:
        #f87171;
}


/* ==========================================================
   UI - LIMITE NAVIGATION SEMAINES
   ========================================================== */

.week-arrow:disabled {
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
}
