/* =========================================================================
   Thème clair (bouton soleil / lune de l'en-tête, ou thème clair du système) : les menus blancs de SAO.
   <html data-theme="light"> est posé par assets/js/theme-init.js. Les écrans du jeu (menus des établis,
   infobulles, cases d'inventaire) gardent leurs couleurs d'origine.
   ========================================================================= */

[data-theme="light"] {
  color-scheme: light;
  --bg-deep: #e9eff6;
  --text: #142033;
  --muted: rgba(20, 32, 51, .76);
  --faint: rgba(20, 32, 51, .64);
  --line: rgba(20, 50, 90, .16);
  --line-strong: rgba(20, 50, 90, .3);
  --surface: #ffffff;
  --surface-2: #f4f7fa;
  --primary-light: #08648b;
  --accent-light: #064a68;
  --accent-warm: #9a4f06;
  --accent-violet: #6338b8;
  --accent-green: #1d7330;
  --danger: #b93a12;
  --sao-cyan: #08708f;
  --sao-orange-hi: #a85600;
  --sao-glass: rgba(255, 255, 255, .8);
  --sao-glass-hi: rgba(255, 255, 255, .9);
  --sao-line: rgba(20, 32, 51, .13);
  --sao-line-hi: rgba(20, 32, 51, .26);
  --r-commun: #474d56;
  --r-rare: #06709d;
  --r-exotique: #6d35c4;
  --r-legendaire: #8a5700;
  --r-mythique: #b3261e;
}

/* --- Fond : le ciel d'Aincrad sous un voile clair ------------------------------------------------------------- */
[data-theme="light"] body {
  background:
    linear-gradient(180deg, rgba(236, 242, 248, .4) 0%, rgba(236, 242, 248, .8) 40%, rgba(236, 242, 248, .95) 75%, var(--bg-deep) 100%),
    url("../img/site_background.webp") center top / cover no-repeat,
    var(--bg-deep);
  background-attachment: fixed, fixed, fixed;
}
[data-theme="light"] body.home {
  background:
    linear-gradient(180deg, rgba(236, 242, 248, .2) 0%, rgba(236, 242, 248, .45) 30%, rgba(236, 242, 248, .9) 70%, var(--bg-deep) 100%),
    url("../img/site_background.webp") center top / cover no-repeat,
    var(--bg-deep);
  background-attachment: fixed, fixed, fixed;
}
[data-theme="light"] body::before { opacity: .22; }
[data-theme="light"] body::after { opacity: .45; }
[data-theme="light"] h1 { text-shadow: 0 2px 16px rgba(255, 255, 255, .7); }
[data-theme="light"] body.home .landing h1,
[data-theme="light"] body.home .landing .eyebrow { text-shadow: 0 1px 12px rgba(255, 255, 255, .9); }

/* --- En-tête -------------------------------------------------------------------------------------------------- */
[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgba(251, 253, 255, .94), rgba(244, 248, 252, .86));
  box-shadow: 0 1px 0 rgba(8, 112, 143, .12), 0 10px 30px rgba(20, 40, 70, .12);
}
[data-theme="light"] .nav a { color: rgba(20, 32, 51, .76); }
[data-theme="light"] .nav a:hover { color: var(--text); background: rgba(20, 32, 51, .07); }
[data-theme="light"] .nav a[aria-current="page"] { color: #fff; background: #1c2530; box-shadow: 0 0 14px rgba(20, 32, 51, .25); }
[data-theme="light"] .icon-btn { color: var(--text); background: rgba(255, 255, 255, .7); }
[data-theme="light"] .icon-btn:hover { color: #fff; background: #1c2530; }
[data-theme="light"] .lang-select,
[data-theme="light"] .lang-select option { background: #fff; color: var(--text); border-color: var(--sao-line-hi); }
@media (max-width: 860px) {
  [data-theme="light"] .site-menu { background: rgba(251, 253, 255, .98); box-shadow: 0 18px 40px rgba(20, 40, 70, .18); }
}

/* --- Boutons ---------------------------------------------------------------------------------------------------- */
[data-theme="light"] .btn { box-shadow: 0 0 0 1px rgba(20, 32, 51, .16), 0 6px 18px rgba(20, 40, 70, .16); }
[data-theme="light"] .btn:hover { color: var(--sao-ink); box-shadow: 0 0 0 1px rgba(168, 86, 0, .5), 0 0 20px rgba(247, 165, 49, .45); }
[data-theme="light"] .btn-ghost { color: var(--text); background: rgba(255, 255, 255, .65); box-shadow: inset 0 0 0 1px rgba(20, 32, 51, .24); }
[data-theme="light"] .btn-ghost.btn-danger { color: #a3200e; background: rgba(226, 85, 60, .08); box-shadow: inset 0 0 0 1px rgba(179, 38, 30, .4); }
[data-theme="light"] .btn-ghost.btn-danger:hover { color: #fff; background: #c43c24; }
[data-theme="light"] .hud-settings,
[data-theme="light"] .job-lv-chip,
[data-theme="light"] .mc-zoom button,
[data-theme="light"] .pins-qty button { box-shadow: 0 0 0 1px rgba(20, 32, 51, .18), 0 4px 12px rgba(20, 40, 70, .15); }
[data-theme="light"] .fab { box-shadow: 0 0 0 1px rgba(20, 32, 51, .18), 0 8px 22px rgba(20, 40, 70, .25); }

/* --- Fenêtres, cartes ---------------------------------------------------------------------------------------- */
[data-theme="light"] .portal { box-shadow: 0 16px 40px rgba(20, 40, 70, .15); }
[data-theme="light"] .tablist { background: rgba(255, 255, 255, .86); box-shadow: 0 10px 28px rgba(20, 40, 70, .12); }
[data-theme="light"] .tab[aria-selected="true"] { color: #fff; background: #1c2530; box-shadow: 0 0 14px rgba(20, 32, 51, .25); }
[data-theme="light"] .tab:hover { background: rgba(20, 32, 51, .07); }
[data-theme="light"] .scroll-hint { background: rgba(255, 255, 255, .75); }
[data-theme="light"] .ticks li::before { color: #1d7330; }
[data-theme="light"] .preview img { box-shadow: 0 24px 60px rgba(20, 40, 70, .25); }

/* --- Pied de page ----------------------------------------------------------------------------------------------- */
[data-theme="light"] .site-footer { background: linear-gradient(0deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .6)); }
[data-theme="light"] .footer-brand { color: var(--text); }
[data-theme="light"] .footer-cols a:hover,
[data-theme="light"] .footer-cols .link-btn:hover,
[data-theme="light"] .link-btn:hover { color: var(--text); }

/* --- Wiki ------------------------------------------------------------------------------------------------------- */
[data-theme="light"] .hud-bar { background: rgba(20, 32, 51, .16); }
[data-theme="light"] .hud-stats div { background: rgba(20, 32, 51, .05); }
[data-theme="light"] .hud-stats b { color: var(--text); }
[data-theme="light"] .bench-card { background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .5)); }
[data-theme="light"] .bench-stage img { filter: drop-shadow(0 10px 12px rgba(20, 40, 70, .3)); }
[data-theme="light"] .chips span, [data-theme="light"] .chips a { background: rgba(20, 32, 51, .07); }
[data-theme="light"] .chips a:hover { color: #fff; background: #1c2530; }
[data-theme="light"] .bench-info .chips a[aria-current="true"] { color: #fff; background: #b35c00; }
[data-theme="light"] .bench-strip a { background: rgba(255, 255, 255, .65); }
[data-theme="light"] .bench-strip a:hover { color: var(--text); }
[data-theme="light"] .bench-strip a[aria-current="page"] { color: #fff; background: #1c2530; }
[data-theme="light"] .facts div { background: rgba(255, 255, 255, .6); }
[data-theme="light"] .facts .is-xp dd { color: #2a7a1c; }
[data-theme="light"] .facts .is-locked dd small { color: #b3261e; }
[data-theme="light"] .facts .is-unlocked dd small { color: #2a7a1c; }
[data-theme="light"] .facts .has-malus dd small { color: #a85600; }
[data-theme="light"] .ranks th, [data-theme="light"] .ranks td { background: rgba(255, 255, 255, .6); }
[data-theme="light"] .ranks .rank-pionnier { color: #1f6aa0; }
[data-theme="light"] .ranks .rank-vanguard { color: #2a7a1c; }
[data-theme="light"] .ranks .rank-beater { color: #8a5700; }
[data-theme="light"] .ranks .rank-overlord { color: #b3261e; }
[data-theme="light"] .recipe-row { background: rgba(255, 255, 255, .65); }
[data-theme="light"] .pins-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 30%), rgba(247, 250, 253, .97);
  box-shadow: 0 20px 50px rgba(20, 40, 70, .25);
}
[data-theme="light"] .pins-list li,
[data-theme="light"] .prof-jobs li { background: rgba(20, 32, 51, .05); }
[data-theme="light"] .pins-qty input,
[data-theme="light"] .prof-rank select { background: #fff; color: var(--text); }
[data-theme="light"] .pins-remove { background: rgba(20, 32, 51, .08); }
[data-theme="light"] .pins-locked { color: #b3261e; }

/* --- Fenêtres SAO, recherche, messages ------------------------------------------------------------------------ */
[data-theme="light"] .sao-dialog {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 38%), rgba(246, 249, 252, .98);
  box-shadow: 0 30px 80px rgba(20, 40, 70, .3);
}
[data-theme="light"] .sao-dialog::backdrop { background: rgba(20, 32, 51, .35); }
[data-theme="light"] .contact-row { background: rgba(20, 32, 51, .05); }
[data-theme="light"] .search-close:hover { color: var(--text); border-color: var(--text); }
[data-theme="light"] .search-glyph { background: rgba(20, 32, 51, .07); }
[data-theme="light"] .search-status.is-error { color: #b3261e; }
[data-theme="light"] .form-status.is-ok { color: #1d7330; }
[data-theme="light"] .form-status.is-error { color: #b3261e; }
[data-theme="light"] .legal-summary { background: rgba(255, 255, 255, .7); }
[data-theme="light"] img[data-bench]:not([src]) {
  background: linear-gradient(100deg, rgba(20, 32, 51, .04) 30%, rgba(20, 32, 51, .12) 50%, rgba(20, 32, 51, .04) 70%) 0 0 / 300% 100%;
}
[data-theme="light"] .pins-group { background: rgba(255, 255, 255, .6); }
[data-theme="light"] .pins-progress-bar { background: rgba(20, 32, 51, .12); }

/* calculateur d'XP et XP de « Mes métiers » */
[data-theme="light"] .prof-xp input,
[data-theme="light"] .xp-have input, [data-theme="light"] .xp-need input,
[data-theme="light"] .xp-tools input[type="search"],
[data-theme="light"] .xp-field select, [data-theme="light"] .xp-tools select,
[data-theme="light"] .xp-goal h3 select { background: #fff; color: var(--text); }
[data-theme="light"] .xp-job, [data-theme="light"] .xp-row, [data-theme="light"] .xp-block { background: rgba(255, 255, 255, .6); }
[data-theme="light"] .xp-job[aria-pressed="true"], [data-theme="light"] .xp-row[aria-pressed="true"] { background: rgba(247, 165, 49, .22); }
[data-theme="light"] .xp-row-xp b, [data-theme="light"] .xp-left b { color: #2a7a1c; }
[data-theme="light"] .xp-big b { text-shadow: none; }
[data-theme="light"] .hud-calc { color: #8a4600; }

/* lien avec le jeu */
[data-theme="light"] .link-status.is-ok, [data-theme="light"] .link-jobs b { color: #2a7a1c; }
[data-theme="light"] .link-status.is-down { color: #a85600; }
[data-theme="light"] .link-status.is-refused { color: #b3261e; }
[data-theme="light"] .link-chip { background: rgba(20, 32, 51, .05); }
