/* ── Thème zine — encre ──────────────────────────────────
   S'active quand <html> a la classe .zine. Fond presque noir,
   rose vif, cartes de travers façon papier découpé — structurellement
   un mode sombre (comme .dark), donc reprend les mêmes correctifs
   de contraste.
   ─────────────────────────────────────────────────────── */

html.zine {
  --ink:     #f2f2ec;
  --ink2:    #d8d8ce;
  --ink3:    #b6b5af;
  --ink4:    #aaa99e;
  --paper:   #111113;
  --paper2:  #1b1b1e;
  --paper3:  #36363c;
  --zine-pink: #ff378b;
  /* Rose profond plutôt que le jaune fluo d'origine : le jaune fluo est
     illisible avec le texte blanc que beaucoup de boutons de l'appli
     posent dessus en dur (var(--accent) + color:#fff). Le jaune fluo
     reste utilisé comme accent secondaire (surlignages, barres). */
  --accent:  #d81a68;
  --accent2: #e8ff3c;
  --gold:    #e8ff3c;
  --font-serif:   'Crimson Pro', Georgia, serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono:    'JetBrains Mono', monospace;
}

/* Anton réservé au logo — en display à 15-20px (titres de cartes, etc.)
   sa forme très condensée devient illisible et serrée. */
html.zine .logo {
  font-family: 'Anton', sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
}

html.zine ::-webkit-scrollbar { background: var(--paper2); }
html.zine ::-webkit-scrollbar-thumb { background: var(--paper3); border-radius: 4px; }

/* Ces barres/menus restent sombres dans tous les modes (comme #topbar) :
   sans ça, background:var(--ink) devient clair (--ink est le texte clair
   du thème zine) et le texte clair prévu pour un fond sombre devient illisible. */
html.zine #topbar,
html.zine #ctx,
html.zine #sb,
html.zine #mobile-toast,
html.zine #mobile-nav,
html.zine #db-topbar,
html.zine #gantt-tooltip { background: #0d0d0a; }

html.zine .cxi:hover { background: #2a2a22; }

/* Modales et overlays */
html.zine #modal-overlay { background: rgba(0,0,0,.75); }
html.zine #modal { background: var(--paper2); }

/* Inputs et textareas */
html.zine input, html.zine textarea, html.zine select {
  background: var(--paper2);
  color: var(--ink);
  border-color: var(--paper3);
}
html.zine input::placeholder, html.zine textarea::placeholder {
  color: var(--ink4);
}

/* Boutons */
html.zine .btn-primary {
  background: var(--accent);
  color: #fff;
}

/* Sidebar */
html.zine .ci-w { color: var(--ink3); }
html.zine .ci-n { color: var(--ink3); }
html.zine .ci.on { background: var(--paper3); }

/* Flash popup sauvegarde */
html.zine .flash { color: #e8ff3c !important; }
html.zine #s-msg { color: var(--ink2); }

/* Bar chart tooltip (index) */
html.zine .bar-fill .bar-tip { background: #0d0d0a; color: #f2f2ec; }

/* Surlignage "Corriger" (LanguageTool) : fond jaune clair fixe */
html.zine .lt-highlight { color: #151515; }

html.zine #save-status { color: var(--ink3); }

/* Coins nets et cartes de travers, esprit papier découpé */
html.zine .fiche,
html.zine .db-projet-card,
html.zine .badge,
html.zine #modal {
  border-radius: 2px !important;
}
html.zine .db-projet-card,
html.zine .fiche {
  border: 1px solid var(--paper3);
}
html.zine .db-projet-card,html.zine .fiche { transform:none; }
html.zine .ci.on { border-left-color:var(--zine-pink);color:var(--accent2);background:var(--paper); }
html.zine .resume-val,html.zine .db-stat-val,html.zine #sb-total-mots { color:var(--zine-pink); }
html.zine .db-card-couv-placeholder { border-left-color:var(--zine-pink)!important; }
/* Une typographie plus discrète ; palette et police de Zine conservées. */
html.zine body{font-size:14px;}
html.zine h1,html.zine .titre-page{font-size:26px;font-weight:400;}
html.zine .pseudo{font-size:18px;font-weight:400;}
html.zine .carte-id .pseudo{font-size:22px;}
html.zine .bio{font-size:15px;}
html.zine .resume-val{font-size:22px;font-weight:400;}
html.zine .stat-val{font-size:24px;font-weight:400;}
html.zine .copier-profil,html.zine .header-retour,html.zine .bandeau-retour{font-size:14px;}
html.zine body.atelier #db-greeting{font-size:24px!important;}
html.zine body.atelier #db-greeting>span{font-size:16px!important;}
html.zine body.atelier #db-reprendre h2{font-size:24px;}
html.zine body.atelier .atelier-library-heading h2{font-size:22px;}
html.zine body.atelier .db-card-couv-placeholder{font-size:22px;}
html.zine body.atelier .db-card-titre{font-size:18px;font-weight:400;}
html.zine body.atelier .db-card-auteur{font-size:13px;}
html.zine body.atelier .db-card-actions>button{font-size:14px!important;}
html.zine body.atelier .atelier-continue,html.zine body.atelier .atelier-new{font-size:14px;}
html.zine body.editor-atelier #chap-ti,html.zine body.editor-atelier #chap-titre2{font-size:19px;}
html.zine body.editor-atelier #sbp-titre{font-size:16px;}
@media(max-width:640px){
 html.zine body.atelier .db-card-couv-placeholder{font-size:18px;}
 html.zine body.atelier .db-card-titre{font-size:17px;}
 html.zine body.atelier #db-reprendre h2{font-size:22px;}
 html.zine body.atelier .atelier-library-heading h2{font-size:20px;}
}
