/* Wakfu control plates. Nine-slice edges stay sharp on both short and long commands. */
:root {
  --secondary-repos:url("assets/brumes-interface/commandes/secondary-repos.png");
  --secondary-survol:url("assets/brumes-interface/commandes/secondary-survol.png");
  --secondary-appui:url("assets/brumes-interface/commandes/secondary-appui.png");
  --secondary-inactif:url("assets/brumes-interface/commandes/secondary-inactif.png");
  --primary-repos:url("assets/brumes-interface/commandes/primary-repos.png");
  --primary-survol:url("assets/brumes-interface/commandes/primary-survol.png");
  --primary-appui:url("assets/brumes-interface/commandes/primary-appui.png");
  --primary-inactif:url("assets/brumes-interface/commandes/primary-inactif.png");
  --small-repos:url("assets/brumes-interface/commandes/small-repos.png");
  --small-survol:url("assets/brumes-interface/commandes/small-survol.png");
  --small-appui:url("assets/brumes-interface/commandes/small-appui.png");
  --small-inactif:url("assets/brumes-interface/commandes/small-inactif.png");
  --danger-repos:url("assets/brumes-interface/commandes/danger-repos.png");
  --danger-survol:url("assets/brumes-interface/commandes/danger-survol.png");
  --danger-appui:url("assets/brumes-interface/commandes/danger-appui.png");
  --danger-inactif:url("assets/brumes-interface/commandes/danger-inactif.png");
  --pipette:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'%3E%3Cpath d='M12 7 5 14l-1 3 3-1 7-7 M10.5 5.5l4 4 M12.5 6.5l2.8-2.8a1.6 1.6 0 0 1 2.2 2.2l-2.8 2.8'/%3E%3C/svg%3E");
  --reset-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'%3E%3Cpath d='M5 10a5.5 5.5 0 1 1 2.7 5 M5 5v5h5'/%3E%3C/svg%3E");
}
button {
  --up:var(--secondary-repos);--over:var(--secondary-survol);--down:var(--secondary-appui);--off:var(--secondary-inactif);
  --face:var(--up);--edge-slice:8 24;--edge-size:8px 19px;--plate-ink:#f6edd6;--plate-shadow:0 1px 2px #171a13;
}
button:is(.icon-button,[data-face],[data-havre="in"],[data-havre="out"],[data-close],[aria-label="Fermer"]),
.topbar #navigation button,#welcome .entry-hair button,#welcome .entry-turn button {
  --up:var(--small-repos);--over:var(--small-survol);--down:var(--small-appui);--off:var(--small-inactif);--edge-slice:7 10;--edge-size:7px 8px;
}
button:is(.primary,.entry-primary,.havre-office-button,.active,.selected,.equipped,[aria-pressed=true],[aria-selected=true],[aria-current=page],[data-craft]),.topbar #navigation button.active {
  --up:var(--primary-repos);--over:var(--primary-survol);--down:var(--primary-appui);--off:var(--primary-inactif);
  --plate-ink:#302a1c;--plate-shadow:0 1px #f7e0a980;
}
button.danger-button {
  --up:var(--danger-repos);--over:var(--danger-survol);--down:var(--danger-appui);--off:var(--danger-inactif);
  --plate-ink:#fff0dd;--plate-shadow:0 1px #451d14;
}
button:hover:not(:disabled) {--face:var(--over)}
button:active:not(:disabled) {--face:var(--down)}
button:disabled {--face:var(--off);--plate-ink:#c1c2b8;--plate-shadow:none}
/* Illustrated tiles, timeline units, pigment swatches and text links have dedicated surfaces. */
body button:not(#creatorDyeReset):not(:where(.dock-load,.dock-spell,.header-tool,.entry-class,.entry-dye,.text-button,.book-remove,.inventory-gear,.sublimation-slot,.inventory-item,.inventory-empty-cell,.city-gear-tile,.city-inventory-item,.atlas-node,.book-choice,.book-slot,.book-destination,.unit-card,.combat-unit,.combat-spell,.combat-status,.skill-button,.report-item-inspect,.site-card,.upgrade-choice,.breach-option,.goultard-vote-card,.xp-last-report,.dc-hold,#serverAuth button,#welcomeAudioButton,#creatorBack)) {
  border:1px solid transparent!important;border-radius:4px;background:transparent!important;
  border-image:var(--face) var(--edge-slice) fill / var(--edge-size) / 0 stretch!important;
  box-shadow:0 2px 2px #13181155!important;color:var(--plate-ink)!important;text-shadow:var(--plate-shadow);
  font-weight:600;letter-spacing:.015em;
}
.primary svg,.icon-button svg,.combat-end kbd,.modal-tabs button>small,.book-header .book-tab b,.atlas-branches button small {color:inherit}
.combat-facing button {height:24px;width:24px;line-height:20px;--edge-size:4px 5px}
.book-tab[aria-pressed=true] b,.atlas-branches button[aria-pressed=true] small {color:var(--plate-ink)}
body button:not(#creatorDyeReset):not(:disabled):active {translate:0 1px}
body button:focus-visible {outline:2px solid #ecc379;outline-offset:2px}
#welcome .entry-editor {padding:16px clamp(12px,1.12vw,18px);background:linear-gradient(110deg,#2a332e,#242c28);border-left:1px solid #4d584a}
#welcome .entry-editor .entry-section-head {gap:13px;margin-bottom:16px}
#welcome .entry-editor .entry-section-head::after {content:"";flex:1;height:7px;background:linear-gradient(90deg,#9d9264,transparent 95%) left center / 100% 1px no-repeat}
#welcome #creatorClassGrid .entry-class {
  background:linear-gradient(#303d32df,#222b24ec),var(--secondary-repos) center/100% 100%;border-color:#55604f;box-shadow:inset 0 1px #78846b45;
}
#welcome #creatorClassGrid .entry-class[aria-pressed=true] {
  background:linear-gradient(#48513ddc,#344133ee),var(--primary-repos) center/100% 100%;border-color:#bba36a;box-shadow:inset 0 -2px #a88d55;
}
#welcome #serverAuth {padding:2px;border-color:#5a604e;box-shadow:inset 0 1px 3px #10151088}
#welcome #serverAuth button.active {background:var(--secondary-repos) center/100% 100% no-repeat;color:#fff6db;box-shadow:none;text-shadow:0 1px #27291e}
#welcome .entry-editor fieldset {margin:0 0 15px;padding:0;border:0}
#welcome .entry-editor fieldset:last-child {margin-bottom:0}
#welcome .entry-editor legend {margin:0 0 6px;color:#d4d3b9;font:600 12px/1.3 'Segoe UI',sans-serif;letter-spacing:.025em}
#welcome .entry-editor legend label {font:inherit;letter-spacing:inherit;color:inherit}
#welcome #genderGrid {display:grid;grid-template-columns:1fr 1fr;gap:6px}
#welcome #genderGrid button {
  position:relative;display:flex;align-items:center;justify-content:center;gap:6px;height:46px;min-width:0;padding:3px 9px 3px 5px;
  font:600 15px/1.1 BrumesAsul,Georgia,serif;border-image:none!important;background:var(--face) center / 100% 100% no-repeat!important;
}
#welcome #genderGrid button img {
  width:34px;height:34px;border-radius:50%;object-fit:cover;flex:none;box-shadow:0 0 0 1px #282b24,0 0 0 2px #b2a27a;
}
#welcome #genderGrid button[aria-pressed=true]::after {
  content:"";position:absolute;width:8px;height:8px;right:5px;top:5px;background:#354739;clip-path:polygon(40% 63%,82% 15%,100% 29%,42% 95%,0 57%,15% 40%);
}
#welcome .entry-hair {
  position:relative;display:grid;grid-template-columns:36px minmax(0,1fr) 36px;align-items:center;gap:1px;padding:2px;
  border:1px solid #525b49;box-shadow:inset 0 1px 4px #0c110eaa,0 1px 0 #52604c80;border-radius:5px;background:#1c241f;
}
#welcome .entry-hair button,#welcome .entry-turn button {
  position:relative;display:block;padding:0;width:100%;height:34px;min-height:0;font-size:0;
}
#welcome .entry-turn button {width:29px;height:25px}
#welcome :is(.entry-hair,.entry-turn) button::after {
  content:"";position:absolute;inset:0;margin:auto;width:10px;height:13px;background:#efe4c3;clip-path:polygon(72% 0,100% 17%,48% 50%,100% 83%,72% 100%,0 50%);
}
#welcome :is(.entry-hair,.entry-turn) button:last-child::after {transform:rotate(180deg)}
#welcome #fusionHairStyle {
  appearance:none;width:100%;height:34px;min-height:34px;text-align:center;text-align-last:center;
  padding:0 18px 0 7px;font:600 14px/1.25 BrumesAsul,Georgia,serif;
  background:transparent!important;color:#e8e1ca!important;border:0!important;border-radius:0;box-shadow:none;
}
#welcome .entry-hair::after {
  content:"";position:absolute;right:48px;top:50%;width:6px;height:6px;pointer-events:none;border:solid #abaf92;border-width:0 1px 1px 0;transform:translateY(-70%) rotate(45deg)
}
#welcome .entry-pigments>div {display:grid;grid-template-columns:1fr 1fr;gap:6px}
#welcome label.pigment-control {
  position:relative;isolation:isolate;display:flex;align-items:center;gap:8px;min-height:39px;min-width:0;padding:4px 10px 4px 7px;
  color:#dddac4;font:600 12px/1.2 'Segoe UI',sans-serif;cursor:pointer;
  background:linear-gradient(120deg,#222b25,#29332c);border:1px solid #54604e;border-bottom-color:#74775b;border-radius:20px 5px 5px 20px;
}
#welcome .pigment-control .pigment-well {
  width:25px;height:25px;flex:none;border:2px solid #292c22;border-radius:50%;background-color:var(--pigment);
  box-shadow:0 0 0 1px #af9e70,0 0 0 3px #3e483a,inset 0 2px 3px #161a1a54,inset 0 -2px 2px #fff2;
}
#welcome .pigment-control::after {content:"";width:13px;height:13px;flex:none;margin-left:auto;background:#b7bd9f;mask:var(--pipette) center/contain no-repeat}
#welcome .pigment-control input[type=color] {position:absolute;inset:0;z-index:1;opacity:0;width:100%;height:100%;padding:0;margin:0;cursor:pointer}
#welcome .pigment-control:focus-within {outline:2px solid #edc67c;outline-offset:2px}
#welcome .pigment-control:hover {border-color:#9d9f77}
#welcome .entry-fabric {border:0!important;padding:0!important}
#welcome .entry-swatches {gap:7px;margin:1px 0 10px}
#welcome .entry-dye {
  position:relative;width:27px;height:25px;border:1px solid #b4b69c8c;border-radius:3px;background:var(--dye) var(--weave) center / 95px!important;background-blend-mode:soft-light!important;
  box-shadow:inset 0 0 0 2px #1d251d42,0 1px 2px #131913;text-shadow:none;
}
#welcome .entry-dye::after {content:"";position:absolute;inset:auto 3px 3px;border-bottom:1px dashed #f4e4c760}
#welcome .entry-dye[aria-pressed=true] {outline:2px solid #ddbf80;outline-offset:2px}
#welcome .entry-dye-tools {display:flex;gap:10px;flex-wrap:wrap;justify-content:space-between}
#welcome .entry-dye-tools .pigment-control {min-height:31px;padding:3px 7px;gap:6px;font-size:11px}
#welcome .entry-dye-tools .pigment-control .pigment-well {width:18px;height:18px}
#welcome #creatorDyeReset {
  display:inline-flex;align-items:center;gap:4px;font:500 11px/1.2 'Segoe UI',sans-serif;padding:5px 2px;color:#d3c6a1;background:transparent;box-shadow:none;border:0;border-bottom:1px dotted #85876d;border-radius:0;
}
#welcome #creatorDyeReset::before {content:"";width:13px;height:13px;background:currentColor;mask:var(--reset-icon) center/contain no-repeat}
#welcome #creatorDyeLabel {color:#b9c2ae;margin-top:7px}
:is(button,select):focus-visible {outline:2px solid #ecc379;outline-offset:2px}
@media(max-width:690px) {
  #welcome .entry-editor {grid-template-columns:minmax(0,1fr);gap:12px;padding:15px}
  #welcome .entry-editor fieldset,#welcome .entry-editor .entry-section-head {margin:0}
  #welcome .entry-hair {grid-template-columns:44px minmax(0,1fr) 44px}
  #welcome .entry-hair button,#welcome .entry-hair select {height:40px}
  #welcome .entry-hair::after {right:56px}
  #welcome label.pigment-control {min-height:44px}
}
/* A single dark fittings plate holds the four field tools. */
.topbar .top-actions {
  --tool-size:39px;position:relative;isolation:isolate;display:flex;align-items:center;flex:none;
  gap:2px;padding:2px 8px;border:1px solid #756b4d;border-radius:7px;
  background:linear-gradient(180deg,#303c32ed,#222d26ec 58%,#1d271fec),var(--secondary-repos) center/100% 100%;
  box-shadow:inset 0 1px #b4a57d45,inset 0 -1px #121a15,0 2px 3px #10160f60;
}
.topbar .top-actions::before,.topbar .top-actions::after {
  content:"";position:absolute;top:50%;margin-top:-1.5px;width:3px;height:3px;border-radius:50%;
  background:#c1aa70;box-shadow:inset 0 -1px #7f6844,0 1px 1px #0f1811;pointer-events:none;
}
.topbar .top-actions::before {left:3px}
.topbar .top-actions::after {right:3px}
.topbar .top-actions .header-tool {
  position:relative;display:grid;place-items:center;flex:0 0 var(--tool-size);width:var(--tool-size);height:var(--tool-size);
  min-width:0;padding:0;overflow:visible;border:1px solid transparent;border-radius:4px;
  background:transparent;box-shadow:none;line-height:1;touch-action:manipulation;
}
.topbar .header-tool + .header-tool::before {
  content:"";position:absolute;left:-2px;top:20%;height:60%;width:1px;
  background:linear-gradient(transparent,#a8996860,transparent);pointer-events:none;
}
.topbar .header-tool .tool-art {
  display:block;width:32px;height:32px;pointer-events:none;
  background:url("assets/brumes-interface/outils-du-refuge.svg") var(--tool-cell,0%) center / 500% 100% no-repeat;
  filter:drop-shadow(0 1px 1px #101710);forced-color-adjust:none;
}
#audioButton {--tool-cell:25%}
#audioButton[aria-pressed="true"] {--tool-cell:50%;opacity:1}
#guideButton {--tool-cell:75%}
#settingsButton {--tool-cell:100%}
.topbar .top-actions .header-tool:is(:hover,:focus-visible) {
  border-color:#99865b;background:linear-gradient(#4c513e,#364134);box-shadow:inset 0 1px #d8c59126;
}
.topbar .top-actions .header-tool:active {background:#253127;box-shadow:inset 0 1px 3px #121a13}
.topbar .header-tool #notificationBadge:not([hidden]) {
  display:grid;place-items:center;position:absolute;right:-2px;top:-4px;z-index:1;
  min-width:16px;height:16px;padding:0 3px;box-sizing:border-box;border-radius:7px;
  color:#fff1d2;background:#994b38;border:1px solid #e1b779;box-shadow:0 1px 2px #0f160e;
  font:700 10px/1 "Segoe UI",sans-serif;font-variant-numeric:tabular-nums;
}
@media(max-width:760px), (max-height:620px) {
  .topbar .top-actions {--tool-size:34px;padding:1px 6px;gap:1px}
  .topbar .header-tool .tool-art {width:28px;height:28px}
}
@media(max-width:360px){
  .topbar #brand {min-width:0;gap:6px;font-size:15px;letter-spacing:1px}
  .topbar #brand .brand-emblem {width:26px;height:32px}
  .topbar .top-actions {--tool-size:32px;padding-inline:3px;gap:0}
  .topbar .top-actions::before,.topbar .top-actions::after {display:none}
}
@media(prefers-reduced-motion:reduce){button {transition:none;translate:none!important}}
@media(forced-colors:active){
  .topbar .top-actions {border-color:ButtonText;background:Canvas;box-shadow:none}
  .topbar .header-tool #notificationBadge:not([hidden]) {color:HighlightText;background:Highlight;border-color:ButtonText;forced-color-adjust:none}
  html body button:not(#creatorDyeReset),#welcome #genderGrid button {border:1px solid ButtonText!important;border-image:none!important;background:ButtonFace!important;color:ButtonText!important;box-shadow:none!important;text-shadow:none}
  button[aria-pressed=true],button[aria-selected=true],button.active {outline:2px solid Highlight}
  #welcome .entry-dye,#welcome .pigment-well {forced-color-adjust:none}
}
