﻿/**
 * VIDE Crawler — windows.css
 * Styles unifiés et optimisés pour le WindowManager et les modules RPG
 * Charte claire néo-brutaliste (#f7f7f8, bordures 2.5px #111, ombres sèches).
 */

/* =============================================================================
   1. STRUCTURE GÉNÉRIQUE DES FENÊTRES FLOTTANTES
   ============================================================================= */
.floating-window {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 2.5px solid #111111;
    border-radius: 12px;
    box-shadow: 5px 5px 0px #111111;
    box-sizing: border-box;
    user-select: none;
    touch-action: none;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.floating-window.is-focused {
    box-shadow: 7px 7px 0px #111111;
    border-color: #111111;
}

.floating-window.is-hidden {
    display: none !important;
}

.floating-window.is-minimized .floating-window-body,
.floating-window.is-minimized .floating-window-resize-handle {
    display: none !important;
}

.floating-window.is-maximized {
    border-radius: 6px;
}

/* En-tête de fenêtre */
.floating-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    background: #f1f5f9;
    border-bottom: 2.5px solid #111111;
    border-radius: 9px 9px 0 0;
    cursor: grab;
    flex-shrink: 0;
}

.floating-window.is-focused .floating-window-header {
    background: #e2e8f0;
}

.floating-window-header:active {
    cursor: grabbing;
}

.floating-window-title-group {
    display: flex;
    align-items: center;
    gap: 7px;
}

.floating-window-icon {
    font-size: 1rem;
}

.floating-window-title {
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #111111;
}

.floating-window-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.win-ctrl-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1.5px solid #111111;
    border-radius: 5px;
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 1.5px 1.5px 0px #111111;
}

.win-ctrl-btn:hover { background: #fee2e2; }
.win-ctrl-btn:active { transform: translate(1px, 1px); box-shadow: none; }

/* Corps et poignée de redimensionnement */
.floating-window-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    padding: 10px;
    background: #fdfdfd;
    border-radius: 0 0 9px 9px;
    user-select: auto;
}

.floating-window-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, #111111 50%);
    border-radius: 0 0 9px 0;
    z-index: 10;
}

/* =============================================================================
   2. MODULE : INVENTAIRE (100 CASES, TOOLTIP CARD, DRAG & DROP)
   ============================================================================= */
.inv-window-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.inv-header-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 800;
    color: #333333;
    padding: 5px 8px;
    background: #f1f5f9;
    border: 1.5px solid #111111;
    border-radius: 6px;
    flex-shrink: 0;
}

.inv-use-feedback {
    min-height: 17px;
    padding: 3px 7px;
    border-left: 3px solid #2563eb;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.35;
    flex-shrink: 0;
}

.inv-use-feedback.is-error {
    border-left-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.inv-filters-row {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
    flex-shrink: 0;
    min-height: 30px;
}

.inv-filter-btn {
    padding: 3px 8px;
    border-radius: 6px;
    border: 1.5px solid #111111;
    background: #f1f5f9;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.inv-filter-btn:hover { background: #e2e8f0; }
.inv-filter-btn.is-active { background: #cdb4db; box-shadow: 2px 2px 0 #111111; }

.inv-grid-scroll-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 4px 4px 2px;
}

.inv-slots-grid-100 {
    display: grid;
    grid-template-columns: repeat(auto-fill, 48px);
    justify-content: start;
    gap: 6px;
}

.inv-slot {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.06);
}

.inv-slot[draggable="true"] { cursor: grab; }
.inv-slot[draggable="true"]:active { cursor: grabbing; }

.inv-slot.is-dragging { opacity: 0.45; transform: scale(0.92); }
.inv-slot.is-drag-over { border-color: #3b82f6 !important; background: #eff6ff !important; transform: scale(1.06); box-shadow: 3px 3px 0 #2563eb !important; }

.inv-slot-icon { font-size: 1.35rem; pointer-events: none; }
.inv-slot-icon.atlas-icon { width: 38px; height: 38px; }
.inv-slot.is-incompatible .inv-slot-icon { filter: grayscale(0.8) opacity(0.48); }
.inv-slot.is-incompatible::after {
    content: "🔒";
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 0.58rem;
    line-height: 1;
}
.inv-slot-count {
    position: absolute;
    right: 2px;
    bottom: 2px;
    font-size: 0.62rem;
    font-weight: 900;
    background: #111111;
    color: #ffffff;
    padding: 0 4px;
    border-radius: 4px;
    line-height: 1.3;
    pointer-events: none;
}

/* Tooltip flottante confinée */
.inv-floating-tooltip {
    position: absolute;
    z-index: 50;
    pointer-events: none;
    background: #ffffff;
    border: 2px solid #111111;
    box-shadow: 4px 4px 0 #111111;
    border-radius: 8px;
    padding: 8px 10px;
    width: max-content;
    max-width: 220px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.inv-floating-tooltip.is-visible { opacity: 1; transform: scale(1); }

.inv-item-name { font-size: 0.82rem; font-weight: 900; color: #111111; }
.inv-item-desc { font-size: 0.72rem; color: #475569; line-height: 1.4; margin-top: 2px; }
.inv-tooltip-icon { width: 28px; height: 28px; flex: 0 0 auto; margin-right: 6px; font-size: 1.1rem; }

/* Raretés (Gris, Vert, Bleu, Violet, Gold) */
.rarity-common    { border-color: #64748b !important; }
.rarity-uncommon  { border-color: #16a34a !important; background: #f0fdf4 !important; }
.rarity-rare      { border-color: #2563eb !important; background: #eff6ff !important; }
.rarity-epic      { border-color: #9333ea !important; background: #faf5ff !important; }
.rarity-legendary { border-color: #d97706 !important; background: #fffbeb !important; box-shadow: 2px 2px 0 #b45309 !important; }

.item-rarity-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid #111111;
}
.badge-common    { background: #94a3b8; color: #fff; }
.badge-uncommon  { background: #22c55e; color: #fff; }
.badge-rare      { background: #3b82f6; color: #fff; }
.badge-epic      { background: #a855f7; color: #fff; }
.badge-legendary { background: #f59e0b; color: #111; font-weight: 900; }

.item-stats-preview { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.stat-pill { font-size: 0.6rem; font-weight: 700; background: #e2e8f0; padding: 1px 5px; border-radius: 3px; color: #111111; }
.stat-pill.is-incompatible { color: #991b1b; background: #fee2e2; }
.stat-pill.is-consumable { color: #1e3a8a; background: #dbeafe; }

/* =============================================================================
   3. MODULE : ÉQUIPEMENT
   ============================================================================= */
.equip-container { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.equip-hero-summary {
    padding: 7px 9px;
    border: 2px solid #111111;
    border-radius: 7px;
    background: #faf5ff;
    font-size: 0.72rem;
    font-weight: 900;
    flex-shrink: 0;
}
.equip-slots-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 1; overflow-y: auto; }

.equip-slot-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.06);
    user-select: none;
}

.equip-slot-card[draggable="true"] { cursor: grab; }
.equip-slot-card.is-dragging { opacity: 0.45; transform: scale(0.92); }
.equip-slot-card.is-drag-over { border-color: #3b82f6 !important; background: #eff6ff !important; transform: scale(1.04); }

.equip-slot-icon { font-size: 1.3rem; }
.equip-slot-icon.atlas-icon { width: 40px; height: 40px; flex: 0 0 auto; }
.equip-slot-details { display: flex; flex-direction: column; min-width: 0; }
.equip-slot-type { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; color: #64748b; }
.equip-slot-item-name { font-size: 0.75rem; font-weight: 900; color: #111111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.equip-stats-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 6px 8px;
    background: #f1f5f9;
    border: 1.5px solid #111111;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}
.equip-stat-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; }
.equip-stat-label { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.equip-stat-icon { width: 17px; height: 17px; flex: 0 0 auto; }

/* =============================================================================
   4. MODULE : ÉQUIPE & COMPÉTENCES
   ============================================================================= */
.party-window-layout { display: flex; flex-direction: column; gap: 7px; height: 100%; min-height: 0; }
.party-window-toolbar { display: flex; justify-content: flex-end; }
.party-formation-button,
.formation-reset-button {
    padding: 6px 9px;
    color: #111111;
    background: #ffffff;
    border: 2px solid #111111;
    border-radius: 7px;
    box-shadow: 2px 2px 0 #111111;
    font-size: 0.68rem;
    font-weight: 900;
    cursor: pointer;
}
.party-formation-button:hover,
.formation-reset-button:hover { background: #faf5ff; }
.party-formation-button:active,
.formation-reset-button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #111111; }
.party-formation-button:focus-visible,
.formation-reset-button:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }
.party-selection-hint { margin: 0; font-size: 0.68rem; color: #475569; font-weight: 700; }
.party-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 1px 4px 4px 1px; }
.party-member-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; background: #f8fafc; color: #111111; text-align: left; border: 2px solid #111111; border-radius: 8px; box-shadow: 3px 3px 0 #111111; cursor: pointer; }
.party-member-card:hover { background: #f1f5f9; }
.party-member-card.is-selected { background: #faf5ff; border-color: #6f4cb6; box-shadow: 3px 3px 0 #6f4cb6; }
.party-member-card:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }
.party-avatar { font-size: 1.6rem; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1.5px solid #111111; border-radius: 6px; }
.party-avatar.atlas-icon { flex: 0 0 36px; }
.party-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.party-name-row { display: flex; justify-content: space-between; font-weight: 900; font-size: 0.78rem; }
.party-level { font-size: 0.68rem; color: #6f4cb6; }
.party-role, .party-trait { font-size: 0.62rem; color: #475569; font-weight: 700; }
.party-resource-row { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 5px; font-size: 0.6rem; font-weight: 800; }
.party-attributes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; margin-top: 2px; }
.party-attributes > span { display: flex; flex-direction: column; align-items: center; padding: 2px; background: #fff; border: 1px solid #94a3b8; border-radius: 4px; }
.party-attributes small { display: none; }
.party-attributes strong { font-size: 0.64rem; line-height: 1; }
.party-attribute-icon { width: 14px; height: 14px; }

.bar-container { width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; border: 1px solid #111111; overflow: hidden; }
.bar-fill-hp { height: 100%; background: #ef4444; }
.bar-fill-mp { height: 100%; background: #3b82f6; }

/* =============================================================================
   FORMATION DE L'ÉQUIPE
   ============================================================================= */
.formation-window-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

.formation-hint {
    margin: 0;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
}

.formation-orientation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 7px 10px;
    color: #111111;
    background: #ecfeff;
    border: 1.5px solid #0891b2;
    border-radius: 8px;
}

.formation-direction-arrow {
    color: #0891b2;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
}

.formation-orientation-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.69rem;
}
.formation-orientation-copy strong { font-size: 0.74rem; }
.formation-orientation-copy small { color: #475569; font-size: 0.61rem; }
.formation-orientation-copy .formation-rotation-map { color: #0e7490; font-weight: 900; }

.formation-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: min(100%, 390px);
    aspect-ratio: 2 / 1;
    align-self: center;
    padding: 8px;
    background: #dbe4ea;
    border: 2px solid #111111;
    border-radius: 10px;
    box-shadow: 3px 3px 0 #111111;
}

.formation-cell {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    color: #111111;
    background: #f8fafc;
    border: 1.5px dashed #94a3b8;
    border-radius: 7px;
    cursor: pointer;
}
.formation-cell:hover { background: #ffffff; border-color: #0891b2; }
.formation-cell:focus-visible { outline: 3px solid #a78bfa; outline-offset: 1px; }
.formation-cell.is-occupied { border-style: solid; border-color: #111111; }
.formation-cell.is-selected {
    background: #fef3c7;
    outline: 3px solid #f59e0b;
    outline-offset: -3px;
}
.formation-cell[data-archetype="warrior"] { --formation-color: #facc15; }
.formation-cell[data-archetype="scout"] { --formation-color: #22c55e; }
.formation-cell[data-archetype="mage"] { --formation-color: #8b5cf6; }
.formation-cell[data-archetype="healer"] { --formation-color: #3b82f6; }
.formation-cell.is-occupied { box-shadow: inset 0 -5px 0 var(--formation-color); }

.formation-member-portrait {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.formation-member-name {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    padding: 2px 3px 5px;
    color: #ffffff;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.88));
    font-size: 0.55rem;
    font-weight: 900;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px #000000;
}

.formation-entrance {
    position: relative;
    align-self: center;
    width: 45%;
    padding-top: 3px;
    color: #64748b;
    border-top: 3px double #64748b;
    font-size: 0.59rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-align: center;
}

.formation-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}
.formation-status { color: #475569; font-size: 0.64rem; font-weight: 800; }

.skill-tree-layout {
    --skill-tree-color: #8b5cf6;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    min-height: 0;
}

.skill-hero-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    flex-shrink: 0;
}

.skill-hero-tab {
    min-width: 0;
    padding: 6px 4px;
    overflow: hidden;
    color: #334155;
    background: #f8fafc;
    border: 1.5px solid #94a3b8;
    border-radius: 7px;
    font-size: 0.68rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.skill-hero-tab { display: flex; align-items: center; justify-content: center; gap: 5px; }
.skill-hero-tab-icon { width: 23px; height: 23px; flex: 0 0 auto; }
.skill-hero-tab:hover { background: #ffffff; border-color: #111111; }
.skill-hero-tab.is-selected {
    color: #111111;
    background: #ffffff;
    border-color: var(--skill-tree-color);
    box-shadow: inset 0 -4px 0 var(--skill-tree-color);
}
.skill-hero-tab:focus-visible { outline: 3px solid #a78bfa; outline-offset: 1px; }

.skill-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}
.skill-tree-identity { display: flex; flex-direction: column; min-width: 0; }
.skill-tree-identity strong { font-size: 0.82rem; font-weight: 900; }
.skill-tree-identity span { color: #64748b; font-size: 0.64rem; font-weight: 700; }
.skill-points-badge {
    padding: 5px 9px;
    color: #111111;
    background: #fffbeb;
    border: 1.5px solid #111111;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.skill-tree-canvas {
    position: relative;
    flex: 1;
    min-height: 330px;
    overflow: hidden;
    background-color: #eef2f6;
    background-image: radial-gradient(circle, rgba(100, 116, 139, 0.26) 1px, transparent 1.5px);
    background-size: 18px 18px;
    border: 2px solid #111111;
    border-radius: 10px;
    box-shadow: inset 0 0 30px rgba(15, 23, 42, 0.08);
}

.skill-connections {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}
.skill-connection {
    vector-effect: non-scaling-stroke;
    stroke: #94a3b8;
    stroke-width: 4px;
    stroke-linecap: round;
}
.skill-connection.is-locked { stroke: #b8c2cf; stroke-dasharray: 5 7; }
.skill-connection.is-available { stroke: var(--skill-tree-color); stroke-dasharray: 7 5; }
.skill-connection.is-learned { stroke: #111111; stroke-width: 5px; }

.skill-canvas-branch-title {
    position: absolute;
    top: 1.2%;
    z-index: 1;
    width: 132px;
    padding: 2px 5px;
    color: #475569;
    background: rgba(248, 250, 252, 0.9);
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.skill-node {
    position: absolute;
    z-index: 2;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    width: 132px;
    min-height: 53px;
    padding: 5px 7px;
    color: #64748b;
    background: #e2e8f0;
    border: 2px solid #94a3b8;
    border-radius: 10px;
    text-align: left;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-sizing: border-box;
}
.skill-node:hover { filter: brightness(1.04); transform: translate(-50%, -50%) scale(1.025); }
.skill-node:focus-visible { outline: 3px solid #111111; outline-offset: 2px; }
.skill-node.is-selected { outline: 3px solid var(--skill-tree-color); outline-offset: 3px; }
.skill-node.is-available {
    color: #111111;
    background: #ffffff;
    border-color: var(--skill-tree-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--skill-tree-color) 20%, transparent);
}
.skill-node.is-learned {
    color: #111111;
    background: color-mix(in srgb, var(--skill-tree-color) 16%, #ffffff);
    border-color: #111111;
    box-shadow: 3px 3px 0 var(--skill-tree-color);
}
.skill-node.is-insufficient { color: #475569; background: #f8fafc; border-color: var(--skill-tree-color); }
.skill-node[data-node-id$="-base"] { border-width: 3px; }
.skill-node-icon { grid-row: 1 / 3; font-size: 1.25rem; text-align: center; }
.skill-node-icon.atlas-icon { width: 28px; height: 37px; }
.skill-node.is-locked .skill-node-icon { filter: grayscale(1) opacity(0.5); }
.skill-node-name {
    min-width: 0;
    overflow: hidden;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
}
.skill-node-cost { color: #64748b; font-size: 0.53rem; font-weight: 800; }

.skill-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 66px;
    padding: 7px 9px;
    background: #ffffff;
    border: 2px solid #111111;
    border-radius: 8px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.skill-details-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.skill-details-heading { display: flex; align-items: center; gap: 7px; }
.skill-details-icon { width: 24px; height: 32px; flex: 0 0 auto; font-size: 1.1rem; }
.skill-details-copy strong { font-size: 0.76rem; font-weight: 900; }
.skill-details-meta { color: var(--skill-tree-color); font-size: 0.57rem; font-weight: 900; text-transform: uppercase; }
.skill-details-copy p { margin: 2px 0 0; color: #475569; font-size: 0.63rem; line-height: 1.25; }
.skill-details-actions { flex-shrink: 0; }
.skill-learn-button {
    padding: 7px 10px;
    color: #111111;
    background: color-mix(in srgb, var(--skill-tree-color) 20%, #ffffff);
    border: 2px solid #111111;
    border-radius: 7px;
    box-shadow: 2px 2px 0 #111111;
    font-size: 0.65rem;
    font-weight: 900;
    cursor: pointer;
}
.skill-learn-button:disabled { color: #64748b; background: #e2e8f0; border-color: #94a3b8; box-shadow: none; cursor: not-allowed; }
.skill-learn-button:not(:disabled):active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #111111; }
.skill-learned-label { color: #166534; font-size: 0.66rem; font-weight: 900; white-space: nowrap; }

@media (max-width: 700px) {
    .skill-node { width: 112px; grid-template-columns: 24px minmax(0, 1fr); padding: 4px; }
    .skill-node-icon.atlas-icon { width: 24px; height: 32px; }
    .skill-canvas-branch-title { width: 112px; }
}

/* =============================================================================
   REPOS ET TEMPS DU MONDE
   ============================================================================= */
.rest-window-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
}

.rest-window-clock {
    width: max-content;
    padding: 7px 10px;
    background: #e0f2fe;
    border: 2px solid #111111;
    border-radius: 7px;
    box-shadow: 3px 3px 0 #111111;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.rest-window-description {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.45;
}

.rest-window-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.rest-window-choice {
    min-height: 42px;
    padding: 8px 10px;
    color: #111111;
    background: #ffffff;
    border: 2px solid #111111;
    border-radius: 7px;
    box-shadow: 3px 3px 0 #111111;
    font-size: 0.7rem;
    font-weight: 900;
    cursor: pointer;
}

.rest-window-choice.is-recovery {
    grid-column: 1 / -1;
    background: #dcfce7;
}

.rest-window-choice:hover:not(:disabled) {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #111111;
}

.rest-window-choice:disabled {
    color: #64748b;
    background: #e2e8f0;
    border-color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.rest-window-status {
    min-height: 34px;
    margin-top: auto;
    padding: 7px 9px;
    color: #334155;
    background: #f8fafc;
    border: 1.5px solid #94a3b8;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.35;
}

/* =============================================================================
   OPTIONS
   ============================================================================= */
.options-window-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    overflow-y: auto;
    padding-right: 3px;
}

.options-section {
    border: 1.5px solid #111111;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}

.options-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.options-section-summary::-webkit-details-marker { display: none; }
.options-section-summary:hover { background: #f1f5f9; }
.options-section-summary:focus-visible { outline: 3px solid #a78bfa; outline-offset: -3px; }

.options-section-heading {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.options-section-indicator {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-right: 2px solid #111111;
    border-bottom: 2px solid #111111;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 140ms ease;
}

.options-section[open] > .options-section-summary .options-section-indicator {
    transform: rotate(225deg) translate(-1px, -1px);
}

.options-section-content {
    padding: 0 11px 11px;
    border-top: 1px solid rgba(17, 17, 17, 0.12);
    padding-top: 9px;
}

.options-section-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 900;
    color: #111111;
}

.options-section-hint {
    margin: 0 0 3px;
    font-size: 0.7rem;
    line-height: 1.35;
    color: #475569;
}

.transition-speed-choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 220px));
    gap: 7px;
    justify-content: start;
}

.transition-speed-choice {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 9px 10px;
    border: 2px solid #111111;
    border-radius: 8px;
    background: #ffffff;
    color: #111111;
    text-align: left;
    cursor: pointer;
    box-shadow: 2px 2px 0 #111111;
}

.transition-speed-choice:hover { background: #f1f5f9; }
.transition-speed-choice:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #111111; }
.transition-speed-choice:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }

.transition-speed-choice.is-selected {
    background: #faf5ff;
    border-color: #6f4cb6;
    box-shadow: 3px 3px 0 #6f4cb6;
}

.transition-speed-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.transition-speed-label { font-size: 0.78rem; font-weight: 900; }
.transition-speed-badge {
    padding: 2px 6px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 900;
    color: #6f4cb6;
    background: #ffffff;
}
.transition-speed-description { font-size: 0.66rem; line-height: 1.3; color: #475569; }

.option-toggle-choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 320px));
    gap: 7px;
    justify-content: start;
}

.option-toggle-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px;
    border: 2px solid #111111;
    border-radius: 8px;
    background: #ffffff;
    color: #111111;
    text-align: left;
    cursor: pointer;
    box-shadow: 2px 2px 0 #111111;
}

.option-toggle-choice:hover { background: #f1f5f9; }
.option-toggle-choice:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #111111; }
.option-toggle-choice:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }
.option-toggle-choice.is-enabled { background: #faf5ff; border-color: #6f4cb6; }

.option-toggle-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.option-toggle-label { font-size: 0.76rem; font-weight: 900; }
.option-toggle-description { font-size: 0.66rem; line-height: 1.3; color: #475569; }

.option-toggle-switch {
    position: relative;
    width: 38px;
    height: 22px;
    flex: 0 0 38px;
    border: 2px solid #111111;
    border-radius: 999px;
    background: #cbd5e1;
}

.option-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border: 1.5px solid #111111;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 120ms ease;
}

.option-toggle-choice.is-enabled .option-toggle-switch { background: #cdb4db; }
.option-toggle-choice.is-enabled .option-toggle-knob { transform: translateX(16px); }

@media (max-width: 520px) {
    .transition-speed-choices,
    .option-toggle-choices {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Scrollbars générales */
.inv-grid-scroll-container::-webkit-scrollbar,
.equip-slots-layout::-webkit-scrollbar { width: 5px; }
.inv-grid-scroll-container::-webkit-scrollbar-track,
.equip-slots-layout::-webkit-scrollbar-track { background: #f1f5f9; }
.inv-grid-scroll-container::-webkit-scrollbar-thumb,
.equip-slots-layout::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

