/* TABS */
.tabs-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.tab { padding: 12px 22px; border-radius: 10px 10px 0 0; border: 1px solid var(--border); border-bottom: none; background: var(--bg2); color: var(--muted); cursor: pointer; font: 700 1.05rem 'Nunito', sans-serif; display: flex; align-items: center; gap: 9px; transition: .15s; user-select: none; }
.tab[draggable=true]:hover { cursor: grab; }
.tab:hover { color: var(--text); background: var(--bg3); }
.tab.active { background: var(--bg3); color: var(--text); border-color: var(--ser); }
.tab-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex-shrink: 0; transition: background .3s; }
.tab.running .tab-dot { background: var(--ok); box-shadow: 0 0 7px var(--ok); animation: pulse 1.2s infinite; }
.tab.done-tab .tab-dot { background: var(--ok); }
.tab-del { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0 0 0 5px; font-size: 1rem; line-height: 1; }
.tab-del:hover { color: var(--amour); }
.add-tab { padding: 10px 18px; border-radius: 9px; border: 1px dashed var(--border); background: transparent; color: var(--muted); cursor: pointer; font: 700 1rem 'Nunito', sans-serif; transition: .15s; align-self: center; }
.add-tab:hover { border-color: var(--ser); color: var(--ser); }
.add-tab:disabled { opacity: .3; cursor: not-allowed; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* CONTENT */
.enclos-content { background: var(--bg3); border: 1px solid var(--ser); border-radius: 0 12px 12px 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }

/* CARD */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px; }
.card-title { font-family: 'Cinzel', serif; font-size: 0.75rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

/* GAUGE BUTTONS */
.gauge-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.gauge-btn { padding: 7px 14px; border-radius: 8px; border: 2px solid transparent; background: var(--bg3); color: var(--muted); cursor: pointer; font: 700 0.92rem 'Nunito', sans-serif; transition: .15s; display: flex; align-items: center; gap: 6px; }
.gauge-btn:hover { background: var(--bg4); color: var(--text); }
.gauge-btn.on { color: #fff; }
.gauge-btn.locked { opacity: .4; cursor: not-allowed; }

/* GAUGE CFG */
.gauges-active { display: flex; gap: 12px; flex-wrap: wrap; }
.gauge-cfg { flex: 1; min-width: 240px; background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; }
.gauge-cfg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.gauge-cfg-name { font-weight: 800; font-size: 1rem; display: flex; align-items: center; gap: 7px; }
.tier-badge { font-size: 0.72rem; font-weight: 800; padding: 3px 10px; border-radius: 20px; letter-spacing: .5px; transition: background .3s; }
.gauge-inp-row { display: flex; align-items: center; gap: 8px; }
.gauge-inp { flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; color: var(--text); padding: 6px 10px; font: 700 0.95rem 'Nunito', sans-serif; }
.gauge-inp:focus { outline: none; }
.gauge-inp-recharge { border-color: var(--ok); cursor: text; }
.gauge-inp-recharge:hover { border-color: var(--ok); box-shadow: 0 0 6px color-mix(in srgb, var(--ok) 30%, transparent); }
.gauge-inp-max { font-size: 0.78rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.gauge-bar-bg { height: 6px; background: var(--bg4); border-radius: 4px; margin-top: 8px; }
.gauge-bar-fill { height: 100%; border-radius: 4px; transition: width .5s; }
.gauge-info { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }
.no-gauge-msg { color: var(--muted); text-align: center; padding: 16px; font-style: italic; font-size: 0.95rem; }

/* TIMER */
.timer-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 18px; }
.btn { padding: 9px 18px; border-radius: 9px; border: none; font: 800 0.95rem 'Nunito', sans-serif; cursor: pointer; transition: .15s; display: flex; align-items: center; gap: 7px; }
.btn * { pointer-events: none; }
.btn-start { background: linear-gradient(135deg, #5020b0, var(--ser)); color: #fff; }
.btn-start:hover { opacity: .85; }
.btn-pause { background: linear-gradient(135deg, #b06000, #f5a623); color: #fff; }
.btn-pause:hover { opacity: .85; }
.btn-ghost { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg4); }
.clock-wrap .lbl { font-size: 0.75rem; color: var(--muted); margin-bottom: 2px; }
.clock-wrap .val { font-family: 'Cinzel', serif; font-size: 2rem; letter-spacing: 3px; }
.clock-wrap .val.clock-elapsed { color: var(--ok); }

/* DD GRID */
.dd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.dd-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 11px; padding: 12px; position: relative; transition: border-color .3s, box-shadow .3s; }
.dd-card[draggable=true] { cursor: default; }
.dd-card.dragging { opacity: 0.35; transform: scale(0.97); box-shadow: none; transition: none; }
.dd-card.drag-over { border-color: var(--ser); box-shadow: 0 0 0 2px var(--ser), 0 6px 20px rgba(192,96,255,0.35); transform: scale(1.02); }
.dd-card.done { border-color: var(--ok); box-shadow: 0 0 18px rgba(40, 232, 136, .18); }
.done-badge { display: none; position: absolute; top: -10px; right: 10px; background: var(--ok); color: #000; font-size: 0.68rem; font-weight: 800; padding: 2px 10px; border-radius: 20px; letter-spacing: .5px; }
.dd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 6px; }
.dd-drag-handle { color: var(--muted); font-size: 1.1rem; cursor: grab; opacity: 0; transition: opacity .15s; flex-shrink: 0; line-height: 1; padding: 2px 3px; }
.dd-drag-handle:active { cursor: grabbing; }
.dd-card:hover .dd-drag-handle { opacity: 1; }
.dd-name { flex: 1; background: transparent; border: none; border-bottom: 2px solid var(--border); color: var(--text); font-family: 'Cinzel', serif; font-size: 0.95rem; font-weight: 700; padding: 3px 4px; min-width: 0; }
.dd-name:focus { outline: none; border-bottom-color: var(--ser); }
.dd-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.95rem; padding: 3px 6px; border-radius: 5px; }
.dd-del:hover { color: var(--amour); background: rgba(255, 80, 112, .1); }

/* DD STAT PILLS */
.dd-stats-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 9px; }
.dd-stat-pill { display: flex; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 7px; padding: 4px 8px; background: var(--bg2); }
.dd-stat-pill.at-max { }
.pill-icon { font-size: 0.9rem; flex-shrink: 0; line-height: 1; }
.pill-input { flex: 1; background: transparent; border: none; color: var(--text); font: 700 0.85rem 'Nunito', sans-serif; min-width: 0; width: 0; text-align: right; }
.pill-input:focus { outline: none; }
.pill-delta { font-size: 0.72rem; font-weight: 700; color: var(--ok); flex-shrink: 0; }

/* DD CIBLE ROWS */
.seren-row, .level-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.target-icon { font-size: 0.85rem; flex-shrink: 0; line-height: 1; }
.target-label { font-size: 0.75rem; color: var(--muted); flex-shrink: 0; }
.target-input { width: 58px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 3px 6px; font: 700 0.8rem 'Nunito', sans-serif; text-align: center; }
.target-input:focus { outline: none; border-color: var(--ser); }
.target-eta { flex: 1; text-align: right; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.target-clear { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.65rem; padding: 0 2px; line-height: 1; opacity: .5; flex-shrink: 0; }
.target-clear:hover { color: var(--amour); opacity: 1; }

/* DD GAUGE BLOCKS */
.dd-gauge-blocks { display: flex; flex-direction: column; gap: 8px; }

/* STAT BLOCK */
.stat-blk { margin-bottom: 16px; }
.stat-lbl { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 7px; }
.stat-row { display: flex; align-items: center; gap: 6px; }
.stat-inp { flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; color: var(--text); padding: 7px 10px; font: 700 0.95rem 'Nunito', sans-serif; min-width: 0; }
.stat-inp:focus { outline: none; border-color: currentColor; }
.stat-inp:disabled { opacity: .5; }
.arrow { color: var(--muted); font-size: 0.9rem; flex-shrink: 0; }
.suggest-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.85rem; padding: 3px 6px; border-radius: 5px; }
.suggest-btn:hover { color: var(--ser); }
.stat-live-row { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; gap: 6px; }
.live-val { font-family: 'Cinzel', serif; font-size: 1.35rem; font-weight: 700; min-width: 100px; }
.live-val.tick { animation: tickflash .4s ease-out; }
@keyframes tickflash { 0% { transform: scale(1.18); filter: brightness(1.7); } 100% { transform: scale(1); filter: brightness(1); } }
.live-delta { font-size: 0.9rem; font-weight: 800; opacity: 0; min-width: 46px; text-align: center; }
@keyframes liveDeltaPop { 0% { opacity: 1; transform: translateY(0) scale(1.15); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px) scale(1); } }
.live-delta.show { animation: liveDeltaPop 1.2s ease-out forwards; }
.live-cd { font-size: 0.9rem; font-weight: 800; text-align: right; }
.stat-bar-bg { height: 6px; background: var(--bg4); border-radius: 3px; margin-top: 7px; }
.stat-bar-fill { height: 100%; border-radius: 3px; transition: width .5s; }
.eta200-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.eta200-eta { font-size: 0.72rem; color: var(--muted); }
.eta200-progress { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.eta200-bar-bg { flex: 1; height: 4px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.eta200-bar-fill { height: 100%; border-radius: 3px; transition: width .5s; }
.eta200-pct { font-size: 0.68rem; color: var(--muted); min-width: 28px; text-align: right; }

/* DD SECTION HEAD */
.dd-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dd-section-head .card-title { margin-bottom: 0; }

/* ADD */
.add-dd-btn { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--bg3); border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); cursor: pointer; font: 700 0.88rem 'Nunito', sans-serif; transition: .15s; }
.add-dd-btn:hover { border-color: var(--ser); color: var(--ser); background: rgba(192, 96, 255, .05); }
.add-dd-btn:disabled { opacity: .3; cursor: not-allowed; }

/* DONE BANNER */
.done-banner { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: rgba(40, 232, 136, .08); border: 1px solid var(--ok); border-radius: 11px; }
.done-banner-text { font-family: 'Cinzel', serif; font-size: 1.1rem; font-weight: 700; color: var(--ok); }
.done-banner-sub { font-size: 0.85rem; color: var(--muted); margin-top: 3px; }
.btn-reset-now { background: linear-gradient(135deg, #005040, var(--ok)); color: #000; font-weight: 800; }
.btn-reset-now:hover { opacity: .85; }

/* DASHBOARD */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.dash-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 18px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.dash-card:hover { border-color: var(--ser); box-shadow: 0 0 16px rgba(192, 96, 255, .15); }
.dash-card.running { border-color: rgba(40, 232, 136, .4); }
.dash-card.done-enc { border-color: var(--ok); box-shadow: 0 0 18px rgba(40, 232, 136, .2); }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-name { font-family: 'Cinzel', serif; font-size: 1.25rem; font-weight: 700; }
.dash-status { display: flex; align-items: center; gap: 6px; font-size: 0.92rem; }
.dash-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.dash-sep { height: 1px; background: var(--border); margin: 13px 0; }
.dash-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dash-lbl { font-size: 0.82rem; color: var(--muted); margin-bottom: 3px; }
.dash-val { font-family: 'Cinzel', serif; font-size: 1.65rem; font-weight: 700; }
.dash-go { display: block; width: 100%; margin-top: 14px; padding: 11px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: 700 1rem 'Nunito', sans-serif; cursor: pointer; text-align: center; transition: .15s; }
.dash-go:hover { background: var(--bg4); border-color: var(--ser); }

/* NOTIF + SON */
.notif-btn { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg3); color: var(--muted); cursor: pointer; font: 700 0.9rem 'Nunito', sans-serif; transition: .15s; }
.notif-btn.granted { color: var(--ok); border-color: var(--ok); }
.notif-btn.denied { color: var(--amour); border-color: var(--amour); opacity: .6; cursor: not-allowed; }
.notif-btn:hover:not(.denied) { background: var(--bg4); }
.sound-select { padding: 8px 13px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg3); color: var(--text); font: 700 0.9rem 'Nunito', sans-serif; cursor: pointer; outline: none; }
.sound-select:focus { border-color: var(--ser); }
.sound-preview { padding: 8px 13px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg3); color: var(--muted); cursor: pointer; font: 700 0.9rem 'Nunito', sans-serif; transition: .15s; }
.sound-preview:hover { background: var(--bg4); color: var(--text); }

/* BANNIERE MISE A JOUR */
.update-banner { display: none; align-items: center; gap: 14px; padding: 13px 18px; border-radius: 10px; border: 1px solid; margin-bottom: 2px; }
.update-banner.available { background: rgba(255, 160, 64, .08); border-color: var(--xp); }
.update-banner.downloading { background: rgba(40, 232, 136, .06); border-color: var(--ok); }
.update-banner.error { background: rgba(255, 80, 112, .07); border-color: var(--amour); }
.update-banner-icon { font-size: 1.4rem; flex-shrink: 0; }
.update-banner-text { flex: 1; }
.update-banner-title { font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700; }
.update-banner-sub { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.update-progress-bar { height: 5px; background: var(--bg4); border-radius: 3px; margin-top: 7px; overflow: hidden; }
.update-progress-fill { height: 100%; background: var(--ok); border-radius: 3px; transition: width .3s; width: 0%; }
.btn-update { padding: 9px 18px; border-radius: 8px; border: none; font: 800 0.9rem 'Nunito', sans-serif; cursor: pointer; background: linear-gradient(135deg, #a06000, var(--xp)); color: #000; white-space: nowrap; }
.btn-update:hover { opacity: .85; }
.btn-update:disabled { opacity: .5; cursor: not-allowed; }

/* MODAL OVERLAY */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .75); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.hidden { display: none; }
.modal-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 820px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-family: 'Cinzel', serif; font-size: 1.1rem; font-weight: 700; color: var(--text); }
.modal-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.4rem; padding: 2px 8px; border-radius: 5px; }
.modal-close:hover { color: var(--amour); background: rgba(255, 80, 112, .1); }
.modal-body { overflow-y: auto; padding: 20px 22px; flex: 1; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* RACE CARDS (style jeu) */
.race-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.race-card { background: #f5f0e8; border-radius: 12px; padding: 14px; cursor: pointer; border: 3px solid transparent; transition: .15s; position: relative; color: #2a2a2a; }
.race-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.race-card.selected { border-color: #c060ff !important; box-shadow: 0 0 0 3px rgba(192, 96, 255, .6), 0 8px 24px rgba(0, 0, 0, .35) !important; transform: translateY(-3px); }
.race-card.selected::before { content: '\2713'; position: absolute; top: 8px; left: 10px; background: #c060ff; color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 800; z-index: 2; }
.race-card-badge { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 10px; font-size: 0.68rem; font-weight: 800; color: #fff; letter-spacing: .3px; z-index: 2; line-height: 1.4; }
.race-card-avatar { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; margin: 0 auto; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); background: transparent; }
.race-card-avatar img { width: 100%; height: 100%; object-fit: contain; }
.race-card-icon { font-size: 2rem; margin-bottom: 6px; display: block; text-align: center; }
.race-card-name { font-family: 'Georgia', serif; font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; line-height: 1.2; color: #1a1a1a; text-align: center; }
.race-card-stats { list-style: none; padding: 0; margin: 0 0 10px; }
.race-card-stats li { font-size: 0.78rem; color: #444; padding: 1px 0; }
.race-card-stats li::before { content: '\2022 '; color: #888; }
.race-card-sep { height: 1px; background: #ddd; margin: 8px 0; }
.race-card-parents { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.race-card-heart { font-size: 1.2rem; }
.race-card-parents-txt { font-size: 0.72rem; color: #666; text-align: center; line-height: 1.3; }

/* STATS TAB */
.stats-wrap { display: flex; flex-direction: column; gap: 18px; }
.stats-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; }
.stats-section-title { font-family: 'Cinzel', serif; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.stats-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stats-kpi { background: var(--bg3); border-radius: 9px; padding: 14px; text-align: center; }
.stats-kpi-val { font-family: 'Cinzel', serif; font-size: 2rem; font-weight: 700; color: var(--ser); }
.stats-kpi-lbl { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.stats-race-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.stats-race-row:last-child { border-bottom: none; }
.stats-race-chip { padding: 3px 10px; border-radius: 12px; font-size: 0.78rem; font-weight: 800; color: #fff; white-space: nowrap; }
.stats-race-name { flex: 1; font-weight: 700; font-size: 0.9rem; }
.stats-race-count { font-family: 'Cinzel', serif; font-size: 1.1rem; font-weight: 700; }
.stats-bar-wrap { flex: 2; min-width: 80px; }
.stats-bar-bg { height: 8px; background: var(--bg4); border-radius: 4px; overflow: hidden; }
.stats-bar-fill { height: 100%; border-radius: 4px; transition: width .5s; }
.stats-enclos-row { background: var(--bg3); border-radius: 9px; padding: 12px 14px; margin-bottom: 8px; }
.stats-enclos-name { font-family: 'Cinzel', serif; font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.stats-enclos-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }
.stats-pct { font-weight: 800; color: var(--ok); }
.stats-pct.low { color: var(--warn); }
.stats-pct.bad { color: var(--amour); }
.stats-empty { text-align: center; padding: 30px; color: var(--muted); font-style: italic; }

/* APPRO / INVENTAIRE */
/* .appro-step et .appro-repro migrés vers obsidienne.css */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.inv-item { background: var(--bg3); border-radius: 8px; padding: 10px; display: flex; align-items: center; gap: 8px; }
.inv-item label { flex: 1; font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-item input { width: 55px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 6px 8px; font: 700 0.9rem 'Nunito', sans-serif; text-align: center; }
.inv-item input:focus { outline: none; border-color: var(--ser); }
.inv-card { display: flex; flex-direction: column; align-items: center; background: var(--bg3); border: 2px solid transparent; border-radius: 12px; padding: 12px 14px 16px; text-align: center; transition: .15s; position: relative; }
.inv-card-name { font-size: 0.78rem; font-weight: 700; line-height: 1.15; color: var(--text); height: 2.3em; display: flex; align-items: center; justify-content: center; margin-top: 5px; }
.inv-gender { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; justify-content: center; }
.inv-gender-box { display: flex; align-items: center; gap: 2px; padding: 4px 8px; border-radius: 8px; font-size: 0.8rem; font-weight: 800; justify-content: center; cursor: text; }
.inv-gender-box.male { background: rgba(80, 160, 255, .1); border: 1.5px solid rgba(80, 160, 255, .3); color: #50a0ff; }
.inv-gender-box.female { background: rgba(255, 100, 160, .1); border: 1.5px solid rgba(255, 100, 160, .3); color: #ff64a0; }
.inv-gender-box input { width: 34px; background: transparent; border: none; color: inherit; font: 800 0.85rem 'Nunito', sans-serif; text-align: center; padding: 4px 2px; cursor: text; }
.inv-gender-box input:focus { outline: none; background: rgba(255, 255, 255, .08); border-radius: 4px; }
/* .appro-card migrés vers obsidienne.css (réutilise .accoup-race-card) */

/* SOUS-ONGLETS */
.subtab { padding: 11px 16px; border: none; background: transparent; color: var(--muted); cursor: pointer; font: 700 0.9rem 'Nunito', sans-serif; transition: .15s; border-bottom: 2px solid transparent; }
.subtab:hover { color: var(--text); background: var(--bg3); }
.subtab.active { color: var(--ser); border-bottom-color: var(--ser); background: rgba(192, 96, 255, .06); }

/* BARRE STATS PERMANENTE DD */
.dd-stats-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.dd-stat-pill { display: flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 12px; font-size: 0.8rem; font-weight: 800; background: transparent; border: 2px solid; cursor: pointer; transition: background .3s, box-shadow .3s; position: relative; overflow: visible; }
.dd-stat-pill.at-max { box-shadow: 0 0 8px rgba(0, 0, 0, .3); }
.dd-stat-pill:hover { filter: brightness(1.15); }
.dd-stat-pill input { background: transparent; border: none; color: inherit; font: 800 0.8rem 'Nunito', sans-serif; width: 52px; text-align: center; padding: 0; }
.dd-stat-pill input:focus { outline: none; }
.dd-stat-pill .pill-icon { font-size: 0.9rem; flex-shrink: 0; }
.pill-delta { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 0.72rem; font-weight: 800; pointer-events: none; opacity: 0; white-space: nowrap; z-index: 10; }
@keyframes pillDeltaUp { 0% { opacity: 1; transform: translateX(-50%) translateY(0); } 100% { opacity: 0; transform: translateX(-50%) translateY(-16px); } }
.pill-delta.show { animation: pillDeltaUp .9s ease-out forwards; }

/* SERENITE TARGET ROW */
.seren-row { display: flex; align-items: center; gap: 6px; padding: 6px 10px; margin: -4px 0 8px; border-radius: 10px; background: rgba(244, 114, 182, .06); border: 1px solid rgba(244, 114, 182, .18); }
.seren-row .seren-icon { font-size: 1rem; flex-shrink: 0; }
.seren-row .seren-lbl { font-size: 0.75rem; color: rgba(244, 114, 182, .7); font-weight: 700; white-space: nowrap; }
.seren-row input { background: rgba(244, 114, 182, .08); border: 1.5px solid rgba(244, 114, 182, .3); color: rgb(244, 114, 182); font: 800 0.82rem 'Nunito', sans-serif; width: 58px; text-align: center; padding: 3px 4px; border-radius: 8px; transition: border-color .2s; }
.seren-row input:focus { outline: none; border-color: rgb(244, 114, 182); background: rgba(244, 114, 182, .14); }
.seren-row .seren-arrow { color: rgba(244, 114, 182, .5); font-size: 0.9rem; font-weight: 800; }
.seren-row .seren-eta { font-size: 0.78rem; font-weight: 800; color: rgb(244, 114, 182); white-space: nowrap; margin-left: auto; }
.seren-row .seren-eta .eta-need, .level-row .level-eta .eta-need { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 8px; font-size: 0.7rem; opacity: .7; }
.seren-row .eta-need { background: rgba(244, 114, 182, .12); border: 1px solid rgba(244, 114, 182, .25); }
.level-row .eta-need { background: rgba(251, 146, 60, .12); border: 1px solid rgba(251, 146, 60, .25); }
.dd-card .seren-row .eta-need, .dd-card .level-row .eta-need { background: none; border: none; padding: 0; }

/* LEVEL TARGET ROW */
.level-row { display: flex; align-items: center; gap: 6px; padding: 6px 10px; margin: -4px 0 8px; border-radius: 10px; background: rgba(251, 146, 60, .06); border: 1px solid rgba(251, 146, 60, .18); }
.level-row .level-icon { font-size: 1rem; flex-shrink: 0; }
.level-row .level-lbl { font-size: 0.75rem; color: rgba(251, 146, 60, .7); font-weight: 700; white-space: nowrap; }
.level-row input { background: rgba(251, 146, 60, .08); border: 1.5px solid rgba(251, 146, 60, .3); color: rgb(251, 146, 60); font: 800 0.82rem 'Nunito', sans-serif; width: 52px; text-align: center; padding: 3px 4px; border-radius: 8px; transition: border-color .2s; }
.level-row input:focus { outline: none; border-color: rgb(251, 146, 60); background: rgba(251, 146, 60, .14); }
.level-row .level-arrow { color: rgba(251, 146, 60, .5); font-size: 0.9rem; font-weight: 800; }
.level-row .level-eta { font-size: 0.78rem; font-weight: 800; color: rgb(251, 146, 60); white-space: nowrap; margin-left: auto; }

/* Sidebar */
.sidebar-toggle { position: fixed; top: 12px; left: 12px; z-index: 1100; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1.3rem; padding: 6px 10px; cursor: pointer; transition: background .2s; line-height: 1; }
.sidebar-toggle:hover { background: var(--bg4); }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 1200; opacity: 0; pointer-events: none; transition: opacity .25s; }
.sidebar-overlay.open { opacity: 1; pointer-events: all; }
.sidebar { position: fixed; top: 0; left: -280px; width: 270px; height: 100%; background: var(--bg2); border-right: 1px solid var(--border); z-index: 1300; transition: left .25s; padding: 60px 0 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar.open { left: 0; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: var(--muted); font-size: .88rem; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; border-left: 3px solid transparent; background: transparent; border-top: none; border-right: none; border-bottom: none; width: 100%; text-align: left; }
.sidebar-item:hover { background: var(--bg3); color: var(--text); }
.sidebar-item.active { color: var(--text); border-left-color: var(--ok); background: var(--bg3); }
.sidebar-sep { height: 1px; background: var(--border); margin: 8px 16px; }
.sidebar-label { padding: 8px 20px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); opacity: .6; }

/* Accouplement — styles migrés vers obsidienne.css */

/* DASHBOARD COMPONENT */
.dash-section-title { font-family: 'Cinzel', serif; font-size: 0.76rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.dash-gauges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; min-height: 26px; }
.dash-gauge-tag { font-size: 0.83rem; font-weight: 700; padding: 2px 10px; border-radius: 12px; border: 1px solid; }
.dash-val-sm { font-family: 'Cinzel', serif; font-size: 1.1rem; font-weight: 700; margin-top: 2px; }
.dash-elapsed { font-family: 'Cinzel', serif; font-size: 1.05rem; color: var(--ok); margin-top: 2px; margin-bottom: 12px; }
.dash-stats-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-top: 4px; }
.dash-stats-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-stats-title { font-family: 'Cinzel', serif; font-size: 0.75rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); }
.dash-reset-btn { padding: 8px 16px; border-radius: 8px; border: 1px solid rgba(255,80,112,.4); background: rgba(255,80,112,.08); color: var(--amour); cursor: pointer; font: 700 0.88rem 'Nunito', sans-serif; transition: .18s; }
.dash-reset-btn * { pointer-events: none; }
.dash-reset-btn:hover { background: rgba(255,80,112,.18); border-color: var(--amour); color: #fff; }
.dash-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dash-kpi { background: var(--bg3); border-radius: 9px; padding: 14px; text-align: center; }
.dash-kpi-value { font-family: 'Cinzel', serif; font-size: 2rem; font-weight: 700; color: var(--ser); }
.dash-kpi-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.dash-histogram { display: flex; flex-direction: column; gap: 8px; }
.dash-hist-row { display: flex; align-items: center; gap: 10px; }
.dash-hist-label { min-width: 120px; font-size: 0.85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-hist-bar-wrap { flex: 1; height: 14px; background: var(--bg4); border-radius: 7px; overflow: hidden; }
.dash-hist-bar { height: 100%; border-radius: 7px; transition: width .5s; min-width: 4px; }
.dash-hist-count { min-width: 28px; text-align: right; font-size: 0.85rem; font-weight: 700; color: var(--text); }

/* ENCLOS VIEW COMPONENT */
.enclos-view { display: flex; flex-direction: column; gap: 18px; }
.enclos-header { display: flex; align-items: center; gap: 16px; }
.enclos-name { background: transparent; border: none; border-bottom: 2px solid var(--border); color: var(--text); font-family: 'Cinzel', serif; font-size: 1.5rem; font-weight: 700; padding: 4px 6px; width: 260px; min-width: 120px; }
.enclos-name:focus { outline: none; border-bottom-color: var(--ser); }
.clear-enclos-btn { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg3); color: var(--muted); cursor: pointer; font: 700 0.88rem 'Nunito', sans-serif; transition: .15s; white-space: nowrap; }
.clear-enclos-btn * { pointer-events: none; }
.clear-enclos-btn:hover { border-color: var(--amour); color: var(--amour); }
.gauge-toggles { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.gauge-configs { display: flex; gap: 14px; flex-wrap: wrap; }
.gauge-config { flex: 1; min-width: 240px; background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 16px; }
.gauge-config-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 800; font-size: 1.05rem; }
.gauge-level-input { width: 100%; background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; color: var(--text); padding: 8px 12px; font: 700 1rem 'Nunito', sans-serif; margin-bottom: 10px; }
.gauge-level-input:focus { outline: none; border-color: var(--ser); }
.gauge-bar { height: 7px; background: var(--bg4); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 4px; transition: width .5s; }
.gauge-empty-info { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.timer-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.timer-display { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.timer-elapsed { font-family: 'Cinzel', serif; font-size: 1.8rem; letter-spacing: 2px; }
.timer-countdown { font-family: 'Cinzel', serif; font-size: 1.2rem; color: var(--muted); }
.timer-btn { padding: 11px 22px; border-radius: 9px; border: none; font: 800 1rem 'Nunito', sans-serif; cursor: pointer; transition: .15s; background: linear-gradient(135deg, #5020b0, var(--ser)); color: #fff; }
.timer-btn:hover { opacity: .85; }
.timer-btn.running { background: linear-gradient(135deg, #7a3000, #ff8020); }
.timer-btn.paused { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.timer-reset-btn { padding: 11px 18px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg3); color: var(--text); font: 700 0.95rem 'Nunito', sans-serif; cursor: pointer; transition: .15s; }
.timer-reset-btn:hover { background: var(--bg4); }
.done-text { font-family: 'Cinzel', serif; font-size: 1.1rem; font-weight: 700; color: var(--ok); }
.done-reset-btn { padding: 10px 20px; border-radius: 9px; border: none; background: linear-gradient(135deg, #005040, var(--ok)); color: #000; font: 800 0.95rem 'Nunito', sans-serif; cursor: pointer; transition: .15s; }
.done-reset-btn:hover { opacity: .85; }
.dd-section { display: flex; flex-direction: column; gap: 12px; }
.dd-count { font-size: 0.85rem; font-weight: 700; color: var(--muted); }

/* SIDEBAR COMPONENT */
.sidebar-content { display: flex; flex-direction: column; }
.sidebar-separator { height: 1px; background: var(--border); margin: 8px 16px; }
.sidebar-icon { font-size: 1.1rem; flex-shrink: 0; }
.sidebar-text { flex: 1; }
.sidebar-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: transparent; }
.dot-running { background: var(--ok); box-shadow: 0 0 5px var(--ok); animation: pulse 1.2s infinite; }
.dot-idle { background: transparent; }

/* VIEW WRAPPERS */
.parametres-view { display: flex; flex-direction: column; gap: 16px; }
/* .reappro-view migré vers obsidienne.css (.reappro-view-new) */
/* .accouplement-view migré vers obsidienne.css (.accoup-view) */
/* .inventaire-view migré vers obsidienne.css (.inv-view-new) */

/* WORKFLOWS VIEW */
/* .workflows-view migré vers obsidienne.css (.wf-view-new) */
.workflow-card:hover { border-color: var(--ser) !important; }
.workflow-list { display: flex; flex-direction: column; gap: 10px; }
.workflow-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; cursor: pointer; transition: border-color .2s; display: flex; align-items: center; gap: 14px; }
.workflow-item:hover { border-color: var(--ser); }
.workflow-item-info { flex: 1; }
.workflow-item-name { font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.workflow-item-meta { font-size: 0.82rem; color: var(--muted); }
.workflow-item-progress { text-align: right; }
.workflow-progress-pct { font-family: 'Cinzel', serif; font-size: 1.1rem; font-weight: 700; color: var(--ok); }
.workflow-detail { display: flex; flex-direction: column; gap: 14px; }
.workflow-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.workflow-back-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg3); color: var(--muted); cursor: pointer; font: 700 0.9rem 'Nunito', sans-serif; transition: .15s; }
.workflow-back-btn:hover { background: var(--bg4); color: var(--text); }
.workflow-detail-title { font-family: 'Cinzel', serif; font-size: 1.3rem; font-weight: 700; flex: 1; }
.workflow-delete-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--amour); background: transparent; color: var(--amour); cursor: pointer; font: 700 0.9rem 'Nunito', sans-serif; transition: .15s; }
.workflow-delete-btn:hover { background: rgba(255,80,112,.1); }
.workflow-steps { display: flex; flex-direction: column; gap: 8px; }
.workflow-step { background: var(--bg2); border: 1px solid var(--border); border-radius: 9px; padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; }
.workflow-step.done { border-color: var(--ok); background: rgba(40,232,136,.04); }
.workflow-step-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.workflow-step-info { flex: 1; }
.workflow-step-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 3px; }
.workflow-step-meta { font-size: 0.82rem; color: var(--muted); }
.workflow-step-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.workflow-step-dec, .workflow-step-inc { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg3); color: var(--text); cursor: pointer; font: 700 1rem 'Nunito', sans-serif; display: flex; align-items: center; justify-content: center; transition: .15s; }
.workflow-step-dec:hover, .workflow-step-inc:hover { background: var(--bg4); border-color: var(--ser); }
.workflow-step-count { min-width: 40px; text-align: center; font-size: 0.85rem; font-weight: 700; }
.workflow-add-btn { padding: 11px 18px; border-radius: 9px; border: 1px dashed var(--border); background: transparent; color: var(--muted); cursor: pointer; font: 700 0.95rem 'Nunito', sans-serif; transition: .15s; align-self: flex-start; }
.workflow-add-btn:hover { border-color: var(--ser); color: var(--ser); }
.workflow-empty { text-align: center; padding: 30px; color: var(--muted); font-style: italic; }

/* DRAGODINDE CARD COMPONENT */
.dd-done-badge { display: none; position: absolute; top: -10px; right: 14px; background: var(--ok); color: #000; font-size: 0.72rem; font-weight: 800; padding: 3px 12px; border-radius: 20px; }
.dd-card.done .dd-done-badge { display: block; }
.dd-del-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 4px 7px; border-radius: 5px; }
.dd-del-btn:hover { color: var(--amour); background: rgba(255,80,112,.1); }
.dd-gauge-blocks { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
/* Aliases for stat-blk sub-elements */
.stat-blk-label { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; color: var(--muted); }
.stat-blk-live { font-family: 'Cinzel', serif; font-size: 1.2rem; font-weight: 700; }
.stat-blk-delta { font-size: 0.88rem; font-weight: 800; color: var(--muted); }
.stat-blk-cd { font-size: 0.9rem; font-weight: 800; text-align: right; }
.stat-blk-bar { height: 6px; background: var(--bg4); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.stat-blk-fill { height: 100%; border-radius: 3px; transition: width .5s; background: var(--ser); }
/* Seren/level target row icon/label/eta */
.target-icon { font-size: 1rem; flex-shrink: 0; }
.target-label { font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.target-input { width: 62px; text-align: center; padding: 3px 4px; border-radius: 8px; font: 800 0.82rem 'Nunito', sans-serif; }
.target-eta { font-size: 0.78rem; font-weight: 800; white-space: nowrap; margin-left: auto; }

/* HEADER LAYOUT */
header { display: flex; align-items: center; gap: 12px; padding: 10px 0 6px; padding-left: 50px; }
.hamburger { position: fixed; top: 12px; left: 12px; z-index: 1100; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1.3rem; padding: 6px 11px; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.hamburger:hover { background: var(--bg4); }
.header-text { flex: 1; text-align: center; }
.header-text h1 { font-family: 'Cinzel', serif; font-size: 2.4rem; font-weight: 700; color: var(--text); letter-spacing: 0.12em; text-transform: uppercase; margin: 0; line-height: 1.2; }
.header-text h1 .icon { text-transform: none; letter-spacing: 0; margin-right: 6px; }
.header-text p { font-size: 0.78rem; color: var(--muted); margin: 3px 0 0; letter-spacing: 0.03em; }
.header-ver { color: var(--ser); font-weight: 700; }

/* UPDATE BANNER additional states/elements */
.update-banner.ready { display: flex; background: rgba(40, 232, 136, .08); border-color: var(--ok); }
.update-text { flex: 1; font-weight: 700; font-size: 0.9rem; }
.update-hint { font-size: 0.82rem; color: var(--muted); }
.update-percent { font-size: 0.82rem; color: var(--ok); font-weight: 800; white-space: nowrap; }
.update-install-btn { padding: 8px 16px; border-radius: 8px; border: none; font: 800 0.88rem 'Nunito', sans-serif; cursor: pointer; background: linear-gradient(135deg, #005040, var(--ok)); color: #000; white-space: nowrap; }
.update-install-btn:hover { opacity: .85; }
.update-error-msg { font-size: 0.82rem; color: var(--amour); flex: 1; }
.update-dismiss-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: 2px 8px; border-radius: 5px; }
.update-dismiss-btn:hover { color: var(--amour); }

/* GAUGE PILL */
.gauge-pill { background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; }
.gauge-pill-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 800; font-size: 1rem; }
.gauge-pill-bar { height: 7px; background: var(--bg4); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.gauge-pill-fill { height: 100%; border-radius: 4px; background: var(--ser); transition: width .5s; }
.gauge-pill-info { font-size: 0.82rem; color: var(--muted); }

/* REAPPRO extras migrés vers obsidienne.css */

/* BTN ALIASES */
.btn-ok { background: linear-gradient(135deg, #005040, var(--ok)); color: #000; padding: 11px 22px; border-radius: 9px; border: none; font: 800 1rem 'Nunito', sans-serif; cursor: pointer; transition: .15s; }
.btn-ok:hover { opacity: .85; }
