/* Les Brumes 0.9.3 — Bois & Laiton.
   Habillage uniquement. Les dimensions, zones de clic, Canvas, ordre des panneaux
   et règles responsive restent définis dans les feuilles de chaque écran. */
:root {
  color-scheme: dark;
  --bg: #17110d;
  --panel: #2b2018;
  --panel2: #36291e;
  --line: #725738;
  --text: #f3e7d0;
  --muted: #c6b69c;
  --gold: #e4bd75;
  --radius: 7px;
  --wood: url('assets/wakfu/Classes/01_Féca/icone.png');
  --wood-frame: linear-gradient(100deg, #22170e70, #17100cbb), var(--wood);
  --leather: linear-gradient(125deg, #382b20, #261c15);
  --paper: linear-gradient(135deg, #463626, #34271d);
  --brass-edge: #967044;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(ellipse at 40% 0%, #51392336, #110d09e8 80%), linear-gradient(#1d140dc9, #1d140dc9), var(--wood);
  background-size: auto, auto, 768px 768px;
  color: var(--text);
}
::selection { color: #21180f; background: #e4bd75; }
:where(.modal-content, .welcome-form, .dungeon-hero-host, .dungeon-side-host,
       .upgrade-selector, .ladder-scroll, .item-comparison, .skin-list) {
  scrollbar-color: #987443 #211810;
  scrollbar-width: thin;
}
:where(input, select, textarea) { accent-color: var(--gold); }
:where(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  background-color: #211810;
  color: var(--text);
  border-color: var(--line);
  box-shadow: inset 0 2px 5px #08060466;
}
input::placeholder, textarea::placeholder { color: #b9a98f; opacity: 1; }
select option { background: #2b2018; color: var(--text); }

/* Cadres en noyer ; lumière douce sur les arêtes de laiton. */
.panel, .world-panel, .modal, .welcome-card, .catalogue, .workspace {
  background: var(--leather);
  border-color: var(--brass-edge);
  border-radius: var(--radius);
  box-shadow: inset 0 1px #e3c28625, inset 0 0 0 3px #120d0838, 0 9px 24px #09060466;
}
.topbar {
  border-bottom-color: #aa7d45;
  background-image: linear-gradient(0deg, #20160dc7, #271a1080), var(--wood);
  background-size: auto, 768px 768px;
  box-shadow: 0 1px #0b0807, 0 2px #b68a4930;
}
.brand { color: #f2d6a0; text-shadow: 0 2px 2px #100b07; }
.brand-mark { color: var(--gold); }
.brand small { color: #c8b08a; }
.scene-heading, .modal-header, .heading {
  background-image: var(--wood-frame);
  background-size: auto, 768px 768px;
  border-bottom-color: var(--brass-edge);
  box-shadow: inset 0 1px #f5d49e24, inset 0 -1px #130c0780;
}
.scene-heading h1, .modal-header h2, .welcome-form h1 {
  color: #f7e7c9;
  text-shadow: 0 2px 2px #120c0899;
}
.panel-title { color: #d5bc92; }
.keyboard-help, .app-footer, .journal-entry small { color: #bda687; }
.hero-panel, .context-panel, .party-panel, .objective-panel { background: var(--leather); }
.scene-badge, .badge, .class-affinity-strip span {
  background: #24190ec4;
  border-color: #a17e4b;
  color: #e9d3ac;
}
.portrait, .context-image, .island-portrait, .island-portrait.island-ai, .island-portrait.island-free {
  background: radial-gradient(ellipse at 50% 35%, #796044, #322318 85%);
  border-color: #a88857;
  box-shadow: inset 0 0 0 2px #160f0955;
}
.scene-footer, .map-controls, .archipelago-legend, .modal-tabs {
  background: #271c13;
  border-color: #715336;
}
.action-deck {
  background-image: linear-gradient(#221810a6, #180f0bba), var(--wood);
  background-size: auto, 768px 768px;
  border-color: var(--brass-edge);
  box-shadow: inset 0 1px #cfaa7138;
}
.canvas-wrap { background: #201a12; }
:is(.view-world, .view-island, .view-archipelago) .canvas-wrap { background: #201a12; }
.map-caption, .canvas-tooltip, .scene-overlay > div {
  background: #20180feb;
  border-color: #9b784f;
  color: #f4e6c9;
}
.dungeon-floor {
  background-image: var(--wood-frame);
  background-size: auto, 420px 420px;
  border-color: #ba955a;
  color: #f2d7a3;
}
.dungeon-hero-host, .dungeon-side-host {
  background: var(--leather);
  border-color: #725738;
}
/* Garder les panneaux intégrés plats : aucun cadre ajouté dans l'espace de jeu. */
.dungeon-hero-host .hero-panel, .dungeon-side-host .context-panel {
  background: none; box-shadow: none;
}

/* Boutons taillés dans le bois, sans ajout de calque au-dessus des clics. */
button {
  background-color: #503822;
  background-image: linear-gradient(#26180c66, #170d0799), var(--wood);
  background-size: auto, 420px 420px;
  border-color: #997547;
  border-radius: 4px;
  color: #f3e4c8;
  box-shadow: inset 0 1px #f9dc9c30, inset 0 -2px #100b0777, 0 2px 3px #100b0744;
  text-shadow: 0 1px 1px #160e0a;
}
button:hover:not(:disabled) {
  background-color: #684a2c;
  background-image: linear-gradient(#57351a33, #25160977), var(--wood);
  border-color: #d4ac69;
  color: #fff0d1;
}
button:active:not(:disabled) { box-shadow: inset 0 2px 5px #0e0909a0; }
button:disabled { opacity: .43; text-shadow: none; box-shadow: inset 0 1px #f9dc9c18; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid #f3d290;
  outline-offset: 3px;
}
.primary, .welcome-start {
  background: linear-gradient(#eed398, #c39851);
  border-color: #f4d998;
  color: #281b10;
  box-shadow: inset 0 1px #fff0c6, inset 0 -2px #78532966, 0 3px 8px #11090455;
  text-shadow: 0 1px #fff1bc77;
}
.primary:hover:not(:disabled) {
  background: linear-gradient(#fae2af, #d8af64);
  color: #24180d;
  border-color: #ffe7ae;
}
.primary svg { color: #3c2916; }
.danger-button { background: linear-gradient(#60372a, #392219); color: #ffccb8; border-color: #bb7f60; }
.danger-button:hover:not(:disabled) { background: linear-gradient(#794332, #4e2b20); color: #ffe1cb; border-color: #e4a07d; }
nav button, .modal-tabs button, .text-button {
  background: transparent;
  box-shadow: none;
  text-shadow: none;
}
nav button:hover:not(:disabled), .modal-tabs button:hover:not(:disabled) { background: #a67e4520; }
nav button.active, .modal-tabs button.active { color: #f2d292; border-bottom-color: #e4bd75; }
.text-button:hover:not(:disabled) { color: #ffe0a1; box-shadow: none; }
.class-tier-tabs button, .class-talent-filters button, .upgrade-choice, .gender-choice {
  background-image: linear-gradient(#1d140b66, #1d140b99), var(--wood);
  background-size: auto, 420px 420px;
  color: var(--text);
  border-color: #8f714d;
}
:is(.class-tier-tabs, .class-talent-filters, .chest-slots, .defense-actions, .server-auth-tabs) button:is(.active, .selected),
.upgrade-choice.selected, .gender-choice.active {
  background: linear-gradient(#765932, #4b3520);
  border-color: #edc47b;
  color: #ffe6b6;
  box-shadow: inset 0 0 0 1px #e2b56638;
}
.skill-button, .skill-button:nth-child(n) {
  background-image: linear-gradient(#4a2d1855, #1f150cad), var(--wood);
  background-size: auto, 420px 420px;
  border-color: #ad8b56;
  box-shadow: inset 0 0 0 2px #140e0755, inset 0 1px #eacf9233;
}
.skill-empty { background: #211910!important; border-color: #715d40; box-shadow: inset 0 1px 7px #100b074f; }
.skill-cd { background: #130f0cbd; }
.deck-auto.active { background: linear-gradient(#3f6342, #233c2b); border-color: #95c99a; color: #efffe9; }
kbd { background: #322519; border-color: #8d6e46; color: #edddbe; box-shadow: inset 0 -1px #100c08; }

/* Fonds de lecture en cuir/parchemin sombre, sans veinage derrière les stats. */
.modal, .modal-card { background: var(--leather)!important; border-color: #aa8852!important; }
.welcome-form { background: var(--leather); }
.item-card, .research-card, .unit-card, .notification-card {
  background: var(--paper)!important;
  border-color: #80633f!important;
  box-shadow: inset 0 1px #f2d6a21a, 0 3px 9px #100a0640!important;
}
.item-card[data-compare-id]:hover, .item-card[data-compare-id]:focus-visible { border-color: #d6b16c!important; }
.equipment-slot, .affix-catalogue-card, .spell-card, .class-card,
.energy-options > section, .upgrade-detail, .upgrade-card, .chest-recycling,
.class-escort, .class-military-report, .audio-settings, .building-progression { background: var(--paper); border-color: #816340; }
.equipped-details { background: #241b14; }
.item-comparison { background: #291f16; border-color: #c49b5c; box-shadow: 0 12px 35px #080502b8, inset 0 1px #edc98922; }
.comparison-section { color: #edca88; }
.note, .empty-state { background: #32271c!important; border-color: #78603e!important; color: #d8c8ac; }
.lab-summary, .camp-summary, .notification-summary {
  background: linear-gradient(130deg, #50402b, #312319)!important;
  border-color: #a1814c!important;
}
.active-research, .level-up-banner, .class-confirm {
  background: linear-gradient(120deg, #57432a, #312319)!important;
  border-color: #b69657!important;
}
.class-identity, .class-tree-nav { background: #352719; border-color: #8b6e45; }
.class-tree-note { background: #302216; color: #d5c5a9; }
.class-offer { background: #2a1e15; }
.class-offer.selected { border-color: #e2bc74; }
.class-trees .talent-branch, .talent-branch { background: #2c2118; border-color: #816643; }
.class-trees .talent-card, .talent-card { background: var(--paper); border-color: #8b6c43; }
.class-trees .talent-card.active-talent, .talent-card.active-talent { background: linear-gradient(135deg, #59462b, #3a2c1e); border-color: #bf9857; }
.class-current-label { color: #2a1c10; }
.energy-reserve { background: #292119; border-color: #887150; }
.energy-reserve > strong { color: #c5d9f6; }
.recovery-panel { background: #3d2c20; }
.ladder-table thead th { background: #36271a; }
.guild-code { background: #382a19; border-color: #ae8d53; }
.dungeon-modifier { background: linear-gradient(120deg, #493726, #2e2319); border-color: #9c7c4e; }
.event-toast { background: linear-gradient(135deg, #483726, #2c2118)!important; }
.event-toast.critical { background: linear-gradient(135deg, #5d3427, #302019)!important; }
.target-summary { background: #1d140dc4; }
.meter, .class-rank-bar, .construction-meter, .threat-meter { background-color: #160f0b; }
.threat-meter { border-color: #866b45; }
.item-quality .verdict-equal { background: #3a3024; border-color: #967e5b; color: #ddcdb3; }
.notification-card.unread { border-color: #cfad68!important; }
.notification-card.critical { border-color: #c07f60!important; }
.unit-card.military.selected { border-color: #e2bc74!important; }

/* Fenêtres d'accueil et atlas de sprites : même habillage, personnages intacts. */
.modal-backdrop, .welcome-backdrop { background-color: #0d0906c9; }
.skin-picker, .appearance-picker { background: var(--leather); }
.skin-main-preview, .appearance-preview { background: radial-gradient(ellipse at 50% 35%, #796044, #302219); border-color: #9e8151; }
.skin-choice, .color-choice { background: #231910; border-color: #715736; }
.skin-choice.active, .color-choice.active { background: #514028; border-color: var(--gold); }
.skin-choice span, .color-choice span { background: #1b120be6; }
.stage { background: radial-gradient(ellipse at 50% 48%, #695239, #291d13); }
.stage-label { background: #21160dde; color: #e7d5b4; }

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
  button:active:not(:disabled) { transform: none; }
}
@media (forced-colors: active) {
  body, button, .panel, .world-panel, .modal, .welcome-card { background-image: none; }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-color: Highlight; }
}
