/* ══════════════════════════════════════════════════════════════════
   THÈMES PARTENAIRES — USAGE INTERNE / DÉMO COMMERCIALE
   Déverrouillage : triple-clic thème 1fo-tech + code 5555
   ══════════════════════════════════════════════════════════════════ */

/* ── BDfugue ── Variables ─────────────────────────────────────── */
:root {
    --bg-color-bdfugue:           #ffffff;
    --text-color-bdfugue:         #282626;
    --primary-color-bdfugue:      #e30613;
    --secondary-color-bdfugue:    #b80010;
    --card-bg-bdfugue:            #f5f5f5;
    --series-drawer-bg-bdfugue:   #ececec;
    --input-bg-bdfugue:           #f0f0f0;
    --border-color-bdfugue:       #ddd;
    --gray-text-bdfugue:          #777;
    --shadow-bdfugue:             rgba(227,6,19,.13);
    --star-filled-color-bdfugue:  #e30613;
}
/* ── Canal BD ── Variables ────────────────────────────────────── */
:root {
    --bg-color-canalbd:           #e83628;
    --text-color-canalbd:         #fffcfd;
    --primary-color-canalbd:      #b40b0b;
    --secondary-color-canalbd:    #ffd4d0;
    --card-bg-canalbd:            #c0281a;
    --series-drawer-bg-canalbd:   #cc2b1c;
    --input-bg-canalbd:           #9e1e0e;
    --border-color-canalbd:       rgba(255,252,253,.2);
    --gray-text-canalbd:          rgba(255, 0, 85, 0.6);
    --shadow-canalbd:             rgba(0,0,0,.25);
    --star-filled-color-canalbd:  #fffcfd;
}

/* ── Canal BD ────────────────────────────────────────────────── */
body.canalbd-theme {
    --bg-color:          var(--bg-color-canalbd);
    --text-color:        var(--text-color-canalbd);
    --primary-color:     var(--primary-color-canalbd);
    --secondary-color:   var(--secondary-color-canalbd);
    --card-bg:           var(--card-bg-canalbd);
    --series-drawer-bg:  var(--series-drawer-bg-canalbd);
    --input-bg:          var(--input-bg-canalbd);
    --border-color:      var(--border-color-canalbd);
    --gray-text:         var(--gray-text-canalbd);
    --shadow:            var(--shadow-canalbd);
    --star-filled-color: var(--star-filled-color-canalbd);
    background-color:    var(--bg-color-canalbd) !important;
    color:               #fffcff !important;
}

/* Tout est blanc sur rouge — aucune exception */
body.canalbd-theme *                    { color: #282626 !important; }
body.canalbd-theme input,
body.canalbd-theme select,
body.canalbd-theme textarea             { background-color: #9e1e0e !important; color: #282626 !important; border-color: rgba(255,252,253,.2) !important; }
body.canalbd-theme input::placeholder  { color: rgba(255,252,253,.45) !important; }

/* Header rouge foncé */
body.canalbd-theme header               { background: #cc2b1c !important; border-bottom: 2px solid rgba(255,252,253,.15) !important; }

/* Cards : rouge foncé, texte blanc */
body.canalbd-theme .series-card        { background: #c0281a !important; border: 1px solid rgba(255,252,253,.12) !important; box-shadow: 0 2px 10px rgba(0,0,0,.25) !important; }
body.canalbd-theme .series-drawer      { background: #cc2b1c !important; }

/* Stats cards : rouge légèrement différent */
body.canalbd-theme [style*="border-radius:10px"] { background: #c0281a !important; border-color: rgba(255,252,253,.15) !important; }

/* Filtres */
body.canalbd-theme .coll-filter-bar    { background: #aa2015 !important; border-color: rgba(255,252,253,.12) !important; }
body.canalbd-theme .coll-pub-select    { background: #9e1e0e !important; border-color: rgba(255,252,253,.2) !important; }
body.canalbd-theme #seriesSearch       { background: #9e1e0e !important; border-color: rgba(255,252,253,.3) !important; }
body.canalbd-theme .coll-chip--active  { background: #282626 !important; border-color: #282626 !important; color: #cc2b1c !important; }
body.canalbd-theme .coll-chip--active * { color: #cc2b1c !important; }

/* Bouton BDD : primary blanc → texte sombre */
body.canalbd-theme #xmlSearchBtn       { color: #230402 !important; }
body.canalbd-theme .btn-fused__title   { color: #230402 !important; }
body.canalbd-theme .btn-fused__sub     { color: rgba(35,4,2,.6) !important; }
body.canalbd-theme #addSeriesBtn       { background-color: rgba(255,252,253,.15) !important; }

/* Watermark */
body.canalbd-theme #mainContent::before {
    content: '175 librairies indépendantes';
    position: fixed; bottom: 18px; right: 20px;
    font-size: .58rem; font-weight: 700;
    color: rgba(255,252,253,.15); letter-spacing: .08em;
    text-transform: uppercase; pointer-events: none; z-index: 0;
}

/* ── Librairix ── Variables ───────────────────────────────────── */
:root {
    --bg-color-librairix:         #fbb118;
    --text-color-librairix:       #1c1c1c;
    --primary-color-librairix:    #0086c5;
    --secondary-color-librairix:  #006fa3;
    --card-bg-librairix:          #d4eef9;
    --series-drawer-bg-librairix: #bde4f5;
    --input-bg-librairix:         #fff0cc;
    --border-color-librairix:     rgba(0,134,197,.22);
    --gray-text-librairix:        #5a4a00;
    --shadow-librairix:           rgba(0,134,197,.18);
    --star-filled-color-librairix:#e8960e;
}
/* ── ChattoChatto ── Variables ────────────────────────────────── */
:root {
    --bg-color-chattochatto:          #f0c735;
    --text-color-chattochatto:        #1d0809;
    --primary-color-chattochatto:     #e52630;
    --secondary-color-chattochatto:   #c41f28;
    --card-bg-chattochatto:           #f8d84e;
    --series-drawer-bg-chattochatto:  #f5d040;
    --input-bg-chattochatto:          #f5d040;
    --border-color-chattochatto:      rgba(229,38,48,.2);
    --gray-text-chattochatto:         #7a4a00;
    --shadow-chattochatto:            rgba(229,38,48,.18);
    --star-filled-color-chattochatto: #e52630;
}

/* ══════════════════════════════════════════════════════════════════
   APPLICATION DES THÈMES
   ══════════════════════════════════════════════════════════════════ */

/* ── BDfugue ─────────────────────────────────────────────────── */
body.bdfugue-theme {
    --bg-color:         var(--bg-color-bdfugue);
    --text-color:       var(--text-color-bdfugue);
    --primary-color:    var(--primary-color-bdfugue);
    --secondary-color:  var(--secondary-color-bdfugue);
    --card-bg:          var(--card-bg-bdfugue);
    --series-drawer-bg: var(--series-drawer-bg-bdfugue);
    --input-bg:         var(--input-bg-bdfugue);
    --border-color:     var(--border-color-bdfugue);
    --gray-text:        var(--gray-text-bdfugue);
    --shadow:           var(--shadow-bdfugue);
    --star-filled-color:var(--star-filled-color-bdfugue);
    background-color:   var(--bg-color-bdfugue) !important;
    color:              var(--text-color-bdfugue) !important;
}
body.bdfugue-theme input, body.bdfugue-theme select, body.bdfugue-theme textarea {
    background-color: var(--input-bg-bdfugue) !important;
    color: var(--text-color-bdfugue) !important;
}
/* Header BDfugue : bandeau rouge en haut comme leur site */
body.bdfugue-theme header {
    border-top: 4px solid #e30613 !important;
    background: #fff !important;
}
/* Nav active en rouge */
body.bdfugue-theme .nav-btn.active, body.bdfugue-theme .nav-btn:hover { color: #e30613 !important; }
/* Boutons */
body.bdfugue-theme #xmlSearchBtn { background: #e30613 !important; color: #fff !important; }
body.bdfugue-theme .btn-fused__title, body.bdfugue-theme .btn-fused__sub { color: #fff !important; }
body.bdfugue-theme #addSeriesBtn { color: #e30613 !important; }
/* Cards avec légère ombre rouge */
body.bdfugue-theme .series-card, body.bdfugue-theme .series-drawer {
    border-left: 3px solid #e3061322 !important;
}
/* Watermark discret "1ère librairie BD en ligne" */
body.bdfugue-theme #mainContent::before {
    content: '1ère librairie BD en ligne';
    position: fixed;
    bottom: 18px;
    right: 20px;
    font-size: .58rem;
    font-weight: 700;
    color: rgba(227,6,19,.18);
    letter-spacing: .08em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 0;
}

/* ── Canal BD ────────────────────────────────────────────────── */
body.canalbd-theme {
    --bg-color:         var(--bg-color-canalbd);
    --text-color:       var(--text-color-canalbd);
    --primary-color:    var(--primary-color-canalbd);
    --secondary-color:  var(--secondary-color-canalbd);
    --card-bg:          var(--card-bg-canalbd);
    --series-drawer-bg: var(--series-drawer-bg-canalbd);
    --input-bg:         var(--input-bg-canalbd);
    --border-color:     var(--border-color-canalbd);
    --gray-text:        var(--gray-text-canalbd);
    --shadow:           var(--shadow-canalbd);
    --star-filled-color:var(--star-filled-color-canalbd);
    background-color:   var(--bg-color-canalbd) !important;
    color:              var(--text-color-canalbd) !important;
}
body.canalbd-theme input, body.canalbd-theme select, body.canalbd-theme textarea {
    background-color: var(--input-bg-canalbd) !important;
    color: var(--text-color-canalbd) !important;
}
/* Header Canal BD : rouge dominant, cards blanches pour respirer */
body.canalbd-theme header {
    background: #cc2b1c !important;
    border-bottom: 3px solid rgba(255,252,253,.25) !important;
}
body.canalbd-theme header h1 { color: #fffcfd !important; }
body.canalbd-theme header p  { color: rgba(255,252,253,.65) !important; }
body.canalbd-theme .nav-btn  { color: rgba(255,252,253,.8) !important; }
body.canalbd-theme .nav-btn:hover { color: #fffcfd !important; }
/* Cards blanches = contraste fort sur fond rouge */
body.canalbd-theme .series-card,
body.canalbd-theme .series-card *,
body.canalbd-theme .series-drawer,
body.canalbd-theme .series-drawer *,
body.canalbd-theme .card,
body.canalbd-theme .card *,
body.canalbd-theme [class*="card"],
body.canalbd-theme [class*="card"] *,
body.canalbd-theme [style*="background:#fff"],
body.canalbd-theme [style*="background: #fff"],
body.canalbd-theme [style*="background:white"],
body.canalbd-theme [style*="background:var(--card-bg)"],
body.canalbd-theme [style*="background: var(--card-bg)"] {
    background: #ffffff !important;
    color: #230402 !important;
}
/* Le fond global et les éléments hors-cards restent en blanc sur rouge */
body.canalbd-theme { color: #fffcfd !important; }
body.canalbd-theme header, body.canalbd-theme header * { color: #fffcfd !important; }
body.canalbd-theme nav *, body.canalbd-theme .nav-btn { color: rgba(255,252,253,.85) !important; }
body.canalbd-theme nav .nav-btn:hover { color: #fffcfd !important; }
/* Fond rouge → texte blanc partout par défaut */
body.canalbd-theme { color: #fffcfd !important; }
/* EXCEPTION : tout ce qui a un fond blanc → texte sombre #230402 */
body.canalbd-theme .series-card,
body.canalbd-theme .series-drawer,
body.canalbd-theme [style*="border-radius:10px"] { color: #230402 !important; }
body.canalbd-theme .series-card *,
body.canalbd-theme .series-drawer *,
body.canalbd-theme [style*="border-radius:10px"] * { color: #230402 !important; }
/* Barres de filtres : rouge foncé, texte blanc */
body.canalbd-theme .coll-filter-bar {
    background: #b82218 !important;
    border-color: rgba(255,255,255,.15) !important;
}
body.canalbd-theme .coll-filter-label { color: #fffcfd !important; }
body.canalbd-theme .coll-chip { color: #fffcfd !important; border-color: rgba(255,255,255,.3) !important; }
body.canalbd-theme .coll-pub-select {
    background: #a01e10 !important; color: #fffcfd !important;
    border-color: rgba(255,255,255,.2) !important;
}
body.canalbd-theme #seriesSearch {
    background: #a01e10 !important; color: #fffcfd !important;
    border-color: rgba(255,255,255,.3) !important;
}
body.canalbd-theme #seriesSearch::placeholder { color: rgba(255,252,253,.5) !important; }
/* Boutons Canal BD : blanc sur rouge → texte sombre */
body.canalbd-theme #xmlSearchBtn { color: #230402 !important; }
body.canalbd-theme .btn-fused__title { color: #230402 !important; }
body.canalbd-theme .btn-fused__sub   { color: rgba(35,4,2,.6) !important; }
body.canalbd-theme #addSeriesBtn     { color: rgba(255,252,253,.85) !important; }
/* Chips actives en blanc */
body.canalbd-theme .coll-chip--active {
    background: #fffcfd !important;
    border-color: #fffcfd !important;
    color: #cc2b1c !important;
}
/* Watermark */
body.canalbd-theme #mainContent::before {
    content: '175 librairies indépendantes';
    position: fixed;
    bottom: 18px;
    right: 20px;
    font-size: .58rem;
    font-weight: 700;
    color: rgba(255,252,253,.15);
    letter-spacing: .08em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 0;
}

/* ── Librairix ───────────────────────────────────────────────── */
body.librairix-theme {
    --bg-color:         var(--bg-color-librairix);
    --text-color:       var(--text-color-librairix);
    --primary-color:    var(--primary-color-librairix);
    --secondary-color:  var(--secondary-color-librairix);
    --card-bg:          var(--card-bg-librairix);
    --series-drawer-bg: var(--series-drawer-bg-librairix);
    --input-bg:         var(--input-bg-librairix);
    --border-color:     var(--border-color-librairix);
    --gray-text:        var(--gray-text-librairix);
    --shadow:           var(--shadow-librairix);
    --star-filled-color:var(--star-filled-color-librairix);
    background-color:   var(--bg-color-librairix) !important;
    color:              var(--text-color-librairix) !important;
}
body.librairix-theme input, body.librairix-theme select, body.librairix-theme textarea {
    background-color: var(--input-bg-librairix) !important;
    color: var(--text-color-librairix) !important;
}
/* Header Librairix : fond jaune, titre et nav en bleu */
body.librairix-theme header {
    background: #fbb118 !important;
    border-bottom: 3px solid #0086c5 !important;
}
body.librairix-theme header h1 { color: #0086c5 !important; }
body.librairix-theme header p  { color: #005a85 !important; }
body.librairix-theme .nav-btn  { color: #0086c5 !important; }
body.librairix-theme .nav-btn:hover { color: #004f70 !important; }
/* Boutons Librairix — bleu sur jaune → texte blanc */
body.librairix-theme #xmlSearchBtn { color: #fff !important; }
body.librairix-theme .btn-fused__title { color: #fff !important; }
body.librairix-theme .btn-fused__sub   { color: rgba(255,255,255,.8) !important; }
body.librairix-theme #addSeriesBtn     { color: #0086c5 !important; }
/* Cards séries : liseré bleu */
body.librairix-theme .series-card, body.librairix-theme .series-drawer {
    border-left: 3px solid rgba(0,134,197,.4) !important;
}
/* Stats cards (Séries, Tomes, Lus, Valeur) → bleu avec nuances, texte blanc */
body.librairix-theme [style*="border-radius:10px"] {
    background: #0086c5 !important;
    border-color: #006fa3 !important;
    color: #fff !important;
}

body.librairix-theme [style*="border-radius:10px"] p,
body.librairix-theme [style*="border-radius:10px"] span { color: #fff !important; }

/* Barres de filtres → jaune clair (comme leur fond), texte sombre lisible */
body.librairix-theme .coll-filter-bar {
    background: #fdd97a !important;
    border-color: rgba(0,134,197,.25) !important;
}
body.librairix-theme .coll-filter-label { color: #1c1c1c !important; }
body.librairix-theme .coll-chip { color: #1c1c1c !important; border-color: rgba(0,134,197,.3) !important; }
body.librairix-theme .coll-pub-select {
    background: #fece50 !important;
    color: #1c1c1c !important;
    border-color: rgba(0,134,197,.25) !important;
}
body.librairix-theme #seriesSearch {
    background: #fece50 !important;
    color: #1c1c1c !important;
    border-color: rgba(0,134,197,.4) !important;
}
body.librairix-theme #seriesSearch::placeholder { color: rgba(28,28,28,.5) !important; }
/* Chips actives → bleu, texte blanc */
body.librairix-theme .coll-chip--active {
    background: #0086c5 !important;
    border-color: #0086c5 !important;
    color: #fff !important;
}
/* Cards séries → bleu clair, texte sombre */
body.librairix-theme .series-card, body.librairix-theme .series-drawer {
    background: #d4eef9 !important;
    color: #1c1c1c !important;
    border-left: 3px solid #0086c5 !important;
}
body.librairix-theme .series-card *, body.librairix-theme .series-drawer * { color: #1c1c1c !important; }
/* Easter egg Bourges */
body.librairix-theme #mainContent::before {
    content: '— Bourges — Bande Dessinée · Littérature Jeunesse · Dérivés';
    position: fixed;
    bottom: 18px;
    right: 20px;
    font-size: .55rem;
    font-weight: 700;
    color: rgba(0,134,197,.18);
    letter-spacing: .06em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 0;
}

/* ── ChattoChatto ────────────────────────────────────────────── */
body.chattochatto-theme {
    --bg-color:         var(--bg-color-chattochatto);
    --text-color:       var(--text-color-chattochatto);
    --primary-color:    var(--primary-color-chattochatto);
    --secondary-color:  var(--secondary-color-chattochatto);
    --card-bg:          var(--card-bg-chattochatto);
    --series-drawer-bg: var(--series-drawer-bg-chattochatto);
    --input-bg:         var(--input-bg-chattochatto);
    --border-color:     var(--border-color-chattochatto);
    --gray-text:        var(--gray-text-chattochatto);
    --shadow:           var(--shadow-chattochatto);
    --star-filled-color:var(--star-filled-color-chattochatto);
    background-color:   var(--bg-color-chattochatto) !important;
    color:              var(--text-color-chattochatto) !important;
}
body.chattochatto-theme input, body.chattochatto-theme select, body.chattochatto-theme textarea {
    background-color: var(--input-bg-chattochatto) !important;
    color: var(--text-color-chattochatto) !important;
}
/* Header ChattoChatto : sombre comme leur site #22242a */
body.chattochatto-theme header {
    background: #22242a !important;
    border-bottom: 3px solid #e52630 !important;
}
body.chattochatto-theme header h1 { color: #f0c735 !important; }
body.chattochatto-theme header p  { color: rgba(240,199,53,.65) !important; }
body.chattochatto-theme .nav-btn  { color: rgba(255,255,255,.8) !important; }
body.chattochatto-theme .nav-btn:hover { color: #f0c735 !important; }
/* Fond page : jaune #f0c735 avec diagonales bien visibles sur tout le fond */
body.chattochatto-theme,
body.chattochatto-theme #mainContent,
body.chattochatto-theme .min-h-screen {
    background-color: #f0c735 !important;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 38px,
        rgba(180,140,0,.45) 38px,
        rgba(180,140,0,.45) 44px
    ) !important;
}
/* Boutons */
body.chattochatto-theme #xmlSearchBtn { color: #fff !important; }
body.chattochatto-theme .btn-fused__title { color: #fff !important; }
body.chattochatto-theme .btn-fused__sub   { color: rgba(255,255,255,.8) !important; }
body.chattochatto-theme #addSeriesBtn     { color: #e52630 !important; background-color: rgba(229,38,48,.12) !important; }
/* Cards jaune clair, bord rouge */
body.chattochatto-theme .series-card, body.chattochatto-theme .series-drawer {
    border-left: 3px solid rgba(229,38,48,.4) !important;
}
/* Chips actives en rouge */
body.chattochatto-theme .coll-chip--active {
    background: #e52630 !important;
    border-color: #e52630 !important;
    color: #fff !important;
}
/* Easter egg NicoNico */
body.chattochatto-theme #mainContent::before {
    content: '✦ Éditeur indépendant · Art · Manga · Passion ✦';
    position: fixed;
    bottom: 18px;
    right: 20px;
    font-size: .58rem;
    font-weight: 700;
    color: rgba(229,38,48,.2);
    letter-spacing: .08em;
    pointer-events: none;
    z-index: 0;
}