/* ============================================================
 * alchemy.css - Panel Fabrication (Forge + Alchimie)
 * ============================================================ */

/* ---- Panel Fabrication header + tabs (pattern miroir sanctuary) ---- */
/* Padding gere par la regle groupee `.panel-pvp, .panel-inventory, ...` de
   pvp.css (padding: 1.2rem 1.5rem). On ne pose rien ici pour ne pas override. */
/* Aligne le panel-fabrication sur les autres panels (sanctuary, inventory)
   qui utilisent flex column + height 100% en mode actif. Sans ca, le panel
   est en `display: block` par defaut alors que les autres sont en flex ->
   le rendu interne peut induire un decalage vertical de ~1-2px sur la
   premiere baseline du contenu (a cause de la difference de gestion des
   margins collapsing entre block et flex). */
.panel-fabrication.panel.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.fabrication-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.fabrication-header .panel-title {
    font-family: 'Cinzel', serif;
    color: var(--gold-title);
    font-size: 1.75rem;
    letter-spacing: 1px;
    margin: 0;
}

.fabrication-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(var(--gold-rgb), 0.2);
    padding-bottom: 0;
}
.fabrication-tab {
    padding: 10px 20px;
    font-family: 'Cinzel', serif;
    /* Aligne sur .sanctuary-tab (panels.css) pour avoir la meme hauteur
       de barre d'onglets entre Sanctuaire / Banque / Fabrication. */
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.fabrication-tab:hover { color: var(--gold); }
.fabrication-tab.active {
    color: var(--gold-light);
    border-bottom-color: var(--gold);
    text-shadow: 0 0 8px rgba(var(--gold-rgb), 0.4);
}
.fabrication-tab .tab-badge {
    background: var(--rarity-ancien);
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}
.fabrication-tab-content { display: none; }
.fabrication-tab-content.active { display: block; }


#alchemy-panel .inline-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

#alchemy-panel .panel-loading,
#alchemy-panel .panel-error {
    text-align: center;
    padding: 40px;
    font-family: 'Oswald', sans-serif;
    opacity: 0.7;
}
#alchemy-panel .panel-error {
    color: var(--rarity-ancien);
}

/* ---- Build card (tier 0) ---- */
.alchemy-build-card {
    max-width: 480px;
    margin: 40px auto;
    padding: 32px;
    text-align: center;
    border: 2px solid rgba(var(--gold-rgb), 0.35);
    background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.08), rgba(0, 0, 0, 0.4));
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(var(--gold-rgb), 0.15);
}

.alchemy-build-title {
    font-family: 'Cinzel', serif;
    color: var(--gold-title);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.alchemy-build-desc {
    opacity: 0.85;
    margin-bottom: 18px;
    font-family: 'Roboto Condensed', sans-serif;
}

.alchemy-build-cost {
    font-family: 'Oswald', sans-serif;
    margin-bottom: 18px;
    font-size: 1.05rem;
}

/* ============================================================
 * Bouton alchimie dédié - gradient violet/indigo + bulles montantes
 * Parallèle esthétique au .forge-btn-craft (bronze chauffé côté forge).
 * ============================================================ */
.alchemy-btn-craft {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 30px;
    border: 1px solid rgba(180, 130, 220, 0.55);
    border-radius: 5px;
    background:
        radial-gradient(ellipse at 50% 120%, rgba(170, 80, 230, 0.7) 0%, transparent 55%),
        linear-gradient(180deg, #6a3aa8 0%, #2e1440 100%);
    color: #ece0ff;
    font-family: 'Cinzel', serif;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 0 8px rgba(200, 160, 255, 0.4);
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(220, 180, 255, 0.35),
        inset 0 -2px 0 rgba(0, 0, 0, 0.45),
        0 4px 12px rgba(40, 10, 80, 0.55);
    transition: transform 0.12s ease, box-shadow 0.2s ease;
    min-width: 180px;
}

/* Rivets aux 2 coins hauts (améthystes) */
.alchemy-btn-craft::before,
.alchemy-btn-craft::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #e4c8ff 0%, #5a2b8a 75%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    top: 5px;
    z-index: 2;
}
.alchemy-btn-craft::before { left: 7px; }
.alchemy-btn-craft::after  { right: 7px; }

.alchemy-btn-craft .alchemy-btn-label {
    position: relative;
    z-index: 2;
}

/* Conteneur des bulles : zone interne où elles montent */
.alchemy-btn-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.alchemy-btn-bubbles .bubble {
    position: absolute;
    bottom: -6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85), rgba(210, 180, 255, 0.35) 55%, transparent 75%);
    box-shadow: 0 0 6px rgba(220, 190, 255, 0.6);
    opacity: 0;
    animation: alchemy-btn-bubble 3.2s ease-in infinite;
}
.alchemy-btn-bubbles .bubble-1 { left: 22%; width: 5px; height: 5px; animation-delay: 0s;   animation-duration: 3.0s; }
.alchemy-btn-bubbles .bubble-2 { left: 55%; width: 7px; height: 7px; animation-delay: 0.9s; animation-duration: 3.8s; }
.alchemy-btn-bubbles .bubble-3 { left: 78%; width: 4px; height: 4px; animation-delay: 1.8s; animation-duration: 2.8s; }

@keyframes alchemy-btn-bubble {
    0%   { transform: translateY(0) scale(0.6);    opacity: 0; }
    12%  { opacity: 0.9; }
    70%  { opacity: 0.7; }
    100% { transform: translateY(-52px) scale(1.1); opacity: 0; }
}

.alchemy-btn-craft:hover:not(:disabled) {
    transform: translateY(-1px);
    background:
        radial-gradient(ellipse at 50% 115%, rgba(200, 110, 255, 0.9) 0%, transparent 60%),
        linear-gradient(180deg, #7a4bc2 0%, #3a1a55 100%);
    box-shadow:
        inset 0 1px 0 rgba(235, 200, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.45),
        0 6px 22px rgba(140, 60, 220, 0.45),
        0 0 30px rgba(180, 100, 240, 0.4);
}

.alchemy-btn-craft:active:not(:disabled) {
    transform: translateY(0);
    animation: alchemy-btn-impact 0.4s ease-out;
}

@keyframes alchemy-btn-impact {
    0%   { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(220, 180, 255, 0.9); }
    50%  { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 45px 10px rgba(200, 150, 255, 0.7); }
    100% { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(200, 150, 255, 0); }
}

.alchemy-btn-craft:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.6) brightness(0.75);
    animation: none !important;
}
.alchemy-btn-craft:disabled .bubble {
    animation: none !important;
    opacity: 0 !important;
}

/* ============================================================
 * Layout global (miroir .forge-layout - 2 colonnes, stage sticky)
 * ============================================================ */
.alchemy-subtitle {
    margin-top: 8px;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-family: 'Roboto Condensed', sans-serif;
    letter-spacing: 0.2px;
}

.alchemy-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

@media (max-width: 980px) {
    .alchemy-layout { grid-template-columns: 1fr; }
    /* Stage sticky desactive en colonne unique : sinon il bloque la moitie
       du viewport pendant qu'on scroll les recettes en dessous. */
    .alchemy-stage {
        position: static;
        min-height: 360px;
    }
}

/* Mobile / tablette : paddings adoucis, bandeaux wrap, onglets scrollables. */
@media (max-width: 1000px) {
    /* Padding gere par la regle groupee de pvp.css. */
    .fabrication-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .fabrication-tabs::-webkit-scrollbar { display: none; }
    .fabrication-tab {
        flex-shrink: 0;
        padding: 9px 14px;
        font-size: 0.88rem;
    }
    .alchemy-upgrade-bar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 14px;
    }
    .alchemy-upgrade-action {
        min-width: 0;
        width: 100%;
    }
    .alchemy-upgrade-action .alchemy-btn-craft,
    .alchemy-upgrade-action .forge-btn-craft { width: 100%; }
    .alchemy-subtabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .alchemy-subtabs::-webkit-scrollbar { display: none; }
    .alchemy-subtab {
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* ============================================================
 * Stage (autel vertical, sticky - theme violet/arcanique)
 * ============================================================ */
/* Bouton icone "upgrade" en top-left de la alchemy-stage. Remplace le
   bandeau horizontal .alchemy-upgrade-bar (refonte UX 2026-05-14). Calque
   sur .forge-upgrade-icon pour la coherence visuelle entre Forge / Alchimie.
   Hover : leve + glow. Locked (cendres insuffisantes) : visuellement attenue
   mais cliquable - la modale informe du manque. */
.alchemy-upgrade-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(var(--gold-rgb), 0.25), rgba(var(--gold-rgb), 0.08));
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 0 10px rgba(var(--gold-rgb), 0.35);
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.alchemy-upgrade-icon:hover {
    transform: translateY(-1px);
    filter: brightness(1.2);
    box-shadow: 0 0 14px rgba(var(--gold-rgb), 0.6);
}
.alchemy-upgrade-icon > svg {
    width: 16px;
    height: 16px;
    display: block;
}
.alchemy-upgrade-icon-locked {
    opacity: 0.55;
    filter: grayscale(0.3);
}
.alchemy-upgrade-icon-locked:hover {
    opacity: 0.85;
    filter: none;
}

.alchemy-stage {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background:
        radial-gradient(circle at 50% 38%, rgba(170, 100, 255, 0.22) 0%, transparent 55%),
        radial-gradient(circle at 50% 92%, rgba(138, 80, 220, 0.25), transparent 60%),
        linear-gradient(180deg, rgba(14, 10, 22, 0.9), rgba(8, 6, 14, 0.96));
    border: 1px solid rgba(170, 100, 255, 0.35);
    border-radius: 18px;
    padding: 18px 20px 22px;
    min-height: 480px;
    box-shadow:
        0 0 0 1px rgba(170, 100, 255, 0.12) inset,
        0 0 42px rgba(138, 80, 220, 0.10) inset,
        0 14px 36px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.alchemy-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 70%, rgba(170, 100, 255, 0.14), transparent 60%);
    pointer-events: none;
    animation: alchemy-breath 4.6s ease-in-out infinite;
}

.alchemy-stage::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 72%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(170, 100, 255, 0.7), transparent);
}

@keyframes alchemy-breath {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

.alchemy-canvas-frame {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    padding: 6px 10px 0;
}

.alchemy-cauldron-glow {
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    width: 80%;
    height: 22px;
    background:
        radial-gradient(ellipse at center, rgba(170, 100, 255, 0.55), rgba(120, 60, 200, 0.15) 55%, transparent 75%);
    filter: blur(3px);
    pointer-events: none;
    animation: alchemy-cauldron-pulse 2.8s ease-in-out infinite;
}

@keyframes alchemy-cauldron-pulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scaleX(1); }
    50%      { opacity: 1;   transform: translateX(-50%) scaleX(1.08); }
}

.alchemy-canvas {
    width: 288px;
    height: 288px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    display: block;
    filter:
        drop-shadow(0 6px 14px rgba(0, 0, 0, 0.75))
        drop-shadow(0 0 22px rgba(170, 100, 255, 0.28));
    position: relative;
    z-index: 1;
}

.alchemy-stage-title {
    position: relative;
    z-index: 3;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--alchemy-text-light);
    text-shadow: 0 0 10px rgba(170, 100, 255, 0.45);
    margin: 0 0 12px;
    opacity: 0.95;
}

.alchemy-stage-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.alchemy-stage-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    width: 100%;
    padding-top: 4px;
}

.alchemy-state-label {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--alchemy-text-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(170, 100, 255, 0.4);
}

.alchemy-state-recipe {
    font-size: 0.86rem;
    color: var(--text-main);
    font-family: 'Roboto Condensed', sans-serif;
    min-height: 1.2em;
    max-width: 280px;
    opacity: 0.9;
}

.alchemy-countdown {
    font-family: 'Oswald', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 4px;
    padding: 8px 22px;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(170, 100, 255, 0.18), rgba(170, 100, 255, 0.06));
    border: 1px solid rgba(170, 100, 255, 0.45);
    box-shadow:
        0 0 18px rgba(170, 100, 255, 0.22) inset,
        0 4px 12px rgba(0, 0, 0, 0.4);
    text-shadow: 0 0 8px rgba(170, 100, 255, 0.55);
}

.alchemy-collect-btn {
    margin-top: 4px;
    min-width: 160px;
    letter-spacing: 1px;
}

.alchemy-collect-btn.is-ready {
    animation: alchemy-pulse 1.4s ease-in-out infinite;
}

.alchemy-cancel-hint {
    opacity: 0.7;
    cursor: default;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

@keyframes alchemy-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(170, 100, 255, 0.55), 0 0 18px rgba(170, 100, 255, 0.25); }
    50%      { box-shadow: 0 0 18px 4px rgba(170, 100, 255, 0.4), 0 0 28px rgba(170, 100, 255, 0.5); }
}

/* ---- Gouttelettes qui montent (miroir embers) ---- */
.alchemy-stage-droplets {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.alchemy-stage-droplets .droplet {
    position: absolute;
    bottom: -6px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(210, 160, 255, 0.95), rgba(150, 90, 230, 0.4) 60%, transparent 80%);
    box-shadow: 0 0 6px rgba(170, 100, 255, 0.75);
    opacity: 0;
    animation: alchemy-droplet 5.8s linear infinite;
}

.alchemy-stage-droplets .droplet-1 { left: 18%; animation-delay: 0s;   animation-duration: 5.8s; }
.alchemy-stage-droplets .droplet-2 { left: 32%; animation-delay: 1.4s; animation-duration: 6.5s; }
.alchemy-stage-droplets .droplet-3 { left: 48%; animation-delay: 2.8s; animation-duration: 5.2s; }
.alchemy-stage-droplets .droplet-4 { left: 62%; animation-delay: 1.0s; animation-duration: 6.9s; }
.alchemy-stage-droplets .droplet-5 { left: 75%; animation-delay: 3.6s; animation-duration: 5.9s; }
.alchemy-stage-droplets .droplet-6 { left: 88%; animation-delay: 4.3s; animation-duration: 6.3s; }

@keyframes alchemy-droplet {
    0%   { opacity: 0;   transform: translateY(0) translateX(0) scale(0.6); }
    15%  { opacity: 1; }
    80%  { opacity: 0.55; }
    100% { opacity: 0;   transform: translateY(-380px) translateX(-10px) scale(1.2); }
}

/* ---- Etat endormi (is-idle) ---- */
.alchemy-stage.is-idle {
    background:
        radial-gradient(circle at 50% 38%, rgba(110, 110, 130, 0.12) 0%, transparent 55%),
        radial-gradient(circle at 50% 92%, rgba(170, 100, 255, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(12, 10, 18, 0.92), rgba(6, 4, 10, 0.97));
    border-color: rgba(170, 100, 255, 0.18);
    box-shadow:
        0 0 0 1px rgba(170, 100, 255, 0.06) inset,
        0 0 32px rgba(0, 0, 0, 0.35) inset,
        0 14px 36px rgba(0, 0, 0, 0.55);
}
.alchemy-stage.is-idle::before {
    background: radial-gradient(ellipse at 50% 70%, rgba(130, 120, 140, 0.06), transparent 60%);
    animation: none; opacity: 0.6;
}
.alchemy-stage.is-idle::after {
    background: linear-gradient(90deg, transparent, rgba(170, 100, 255, 0.25), transparent);
}
.alchemy-stage.is-idle .alchemy-canvas {
    filter:
        drop-shadow(0 6px 14px rgba(0, 0, 0, 0.75))
        grayscale(0.55) brightness(0.7);
}
.alchemy-stage.is-idle .alchemy-cauldron-glow {
    background: radial-gradient(ellipse at center, rgba(120, 110, 130, 0.18), rgba(80, 70, 90, 0.06) 55%, transparent 75%);
    animation: none; opacity: 0.35;
}
.alchemy-stage.is-idle .alchemy-stage-title { opacity: 0.5; }
.alchemy-stage.is-idle .alchemy-stage-droplets .droplet { display: none; }

/* ============================================================
 * Catalog (colonne droite : EP+upgrade + sous-onglets)
 * ============================================================ */
.alchemy-catalog {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.alchemy-catalog-header {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 14px;
    align-items: stretch;
}

@media (max-width: 720px) {
    .alchemy-catalog-header { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .alchemy-stage { min-height: 300px; padding: 14px 12px 18px; }
    .alchemy-upgrade-title { font-size: 0.95rem; }
    .alchemy-upgrade-desc { font-size: 0.82rem; }
    .alchemy-ep-display { padding: 10px 12px; gap: 10px; }
    .alchemy-ep-icon { width: 42px; height: 42px; }
    .alchemy-ep-count { font-size: 1.35rem; }
    .alchemy-section-title { font-size: 1.05rem; }
    .alchemy-canvas { width: 240px; height: 240px; }
}

.alchemy-ep-display {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(170, 100, 255, 0.28);
    background: linear-gradient(180deg, rgba(20, 14, 30, 0.75), rgba(10, 8, 18, 0.85));
    border-radius: 10px;
    position: relative;
}

.alchemy-ep-icon {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(170, 100, 255, 0.55));
}

.alchemy-ep-stats { flex: 1; }

.alchemy-ep-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.alchemy-ep-count {
    font-family: 'Oswald', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--alchemy-text-pale);
    text-shadow: 0 0 10px rgba(170, 100, 255, 0.35);
}

.alchemy-catalog-ashes {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ---- Sous-onglets (Decomposer / Potions) ---- */
.alchemy-subtabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid rgba(170, 100, 255, 0.22);
    margin-bottom: 8px;
}
.alchemy-subtab {
    padding: 9px 18px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    letter-spacing: 0.4px;
    transition: color 0.2s, border-color 0.2s;
}
.alchemy-subtab:hover { color: var(--alchemy-text-light); }
.alchemy-subtab.active {
    color: var(--alchemy-text-pale);
    border-bottom-color: #aa66ff;
    text-shadow: 0 0 8px rgba(170, 100, 255, 0.4);
}
.alchemy-subtab-content { display: none; }
.alchemy-subtab-content.active { display: block; }

.alchemy-decraft-progress {
    padding: 24px;
    border: 1px dashed rgba(170, 100, 255, 0.3);
    background: rgba(20, 14, 30, 0.4);
    border-radius: 10px;
    text-align: center;
}

/* Bandeau upgrade (miroir de .forge-upgrade-bar, skin alchimie violet) */
.alchemy-upgrade-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    background:
        radial-gradient(ellipse at 0% 50%, rgba(170, 100, 255, 0.1), transparent 70%),
        linear-gradient(180deg, rgba(20, 14, 30, 0.85) 0%, rgba(10, 8, 18, 0.7) 100%);
    border: 1px solid rgba(170, 100, 255, 0.3);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.alchemy-upgrade-bar-max {
    opacity: 0.85;
    border-color: rgba(200, 160, 255, 0.35);
}
.alchemy-upgrade-info {
    flex: 1 1 auto;
    min-width: 0;
}
.alchemy-upgrade-title {
    font-family: 'Cinzel', serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--alchemy-text-light);
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(170, 100, 255, 0.3);
    margin: 0;
}
.alchemy-upgrade-desc {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.88rem;
    color: var(--text-main);
    margin-top: 3px;
    opacity: 0.88;
}
.alchemy-upgrade-desc strong {
    color: #e8c8ff;
}
.alchemy-upgrade-action {
    flex: 0 0 auto;
    min-width: 240px;
}

/* ---- Section titles ---- */
.alchemy-section-title {
    font-family: 'Cinzel', serif;
    color: var(--alchemy-text-light);
    font-size: 1.2rem;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(170, 100, 255, 0.22);
    text-shadow: 0 0 8px rgba(170, 100, 255, 0.25);
}

.alchemy-section-desc {
    opacity: 0.8;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

/* ---- Decraft builder ---- */
.alchemy-decraft-builder {
    padding: 20px;
    border: 1px solid rgba(170, 100, 255, 0.25);
    background: linear-gradient(180deg, rgba(18, 12, 28, 0.7), rgba(10, 8, 18, 0.8));
    border-radius: 10px;
    margin-bottom: 28px;
    box-shadow:
        0 0 0 1px rgba(170, 100, 255, 0.08) inset,
        0 6px 18px rgba(0, 0, 0, 0.45);
}

.alchemy-empty {
    text-align: center;
    padding: 30px;
    opacity: 0.6;
    font-style: italic;
    font-family: 'Roboto Condensed', sans-serif;
}

.alchemy-rarity-group {
    margin-bottom: 16px;
}

.alchemy-rarity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 8px;
    
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
}

.alchemy-rarity-group[data-rarity="robuste"]        .alchemy-rarity-header { border-left-color: var(--rarity-robuste); }
.alchemy-rarity-group[data-rarity="alpha"]          .alchemy-rarity-header { border-left-color: var(--rarity-alpha); }
.alchemy-rarity-group[data-rarity="ancien"]         .alchemy-rarity-header { border-left-color: var(--rarity-ancien); }
.alchemy-rarity-group[data-rarity="primordial"]     .alchemy-rarity-header { border-left-color: var(--rarity-primordial); }
.alchemy-rarity-group[data-rarity="primordial_pur"] .alchemy-rarity-header { border-left-color: var(--rarity-primordial_pur); }

.alchemy-rarity-label {
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.alchemy-rarity-rate {
    opacity: 0.85;
    font-size: 0.9rem;
}

/* Card par element : header (icone + nom) + liste interne (1 ligne par rarete possedee) */
.alchemy-essence-card {
    padding: 10px 14px 8px;
    border: 1px solid rgba(170, 100, 255, 0.2);
    background: linear-gradient(180deg, rgba(22, 16, 34, 0.7), rgba(10, 8, 18, 0.8));
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.alchemy-essence-card:hover {
    border-color: rgba(170, 100, 255, 0.4);
    box-shadow: 0 4px 14px rgba(170, 100, 255, 0.1);
}

.alchemy-essence-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(170, 100, 255, 0.18);
}
.alchemy-essence-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
.alchemy-essence-name {
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    line-height: 1.2;
    text-transform: capitalize;
    font-weight: 600;
    color: var(--alchemy-text-pale);
}

.alchemy-essence-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Ligne rarete : [label rarete] [stock] [controles qty] [rate] [gain] */
.alchemy-essence-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.15s;
}
.alchemy-essence-line:hover {
    background: rgba(170, 100, 255, 0.06);
}
.alchemy-essence-line.is-locked {
    opacity: 0.45;
    background: rgba(0, 0, 0, 0.35);
}
.alchemy-essence-line.is-locked:hover {
    background: rgba(0, 0, 0, 0.35);
}
.alchemy-essence-locked-hint {
    flex: 1;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
    font-style: italic;
}

.alchemy-essence-rarity {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    min-width: 82px;
}
.alchemy-essence-line[data-tier-key="fragile"]        .alchemy-essence-rarity { color: var(--rarity-fragile); }
.alchemy-essence-line[data-tier-key="robuste"]        .alchemy-essence-rarity { color: var(--rarity-robuste); }
.alchemy-essence-line[data-tier-key="alpha"]          .alchemy-essence-rarity { color: var(--rarity-alpha); }
.alchemy-essence-line[data-tier-key="ancien"]         .alchemy-essence-rarity { color: var(--rarity-ancien); }
.alchemy-essence-line[data-tier-key="primordial"]     .alchemy-essence-rarity { color: var(--rarity-primordial); text-shadow: 0 0 8px rgba(var(--rarity-primordial-rgb), 0.4); }
.alchemy-essence-line[data-tier-key="primordial_pur"] .alchemy-essence-rarity { color: var(--rarity-primordial_pur); text-shadow: 0 0 8px rgba(var(--rarity-primordial_pur-rgb), 0.5); }

.alchemy-essence-stock {
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
    opacity: 0.8;
    min-width: 32px;
}

.alchemy-essence-controls {
    display: flex;
    align-items: center;
    gap: 3px;
}

.alchemy-essence-rate {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    opacity: 0.8;
    white-space: nowrap;
    margin-left: auto;
}
.alchemy-essence-rate .inline-icon {
    width: 14px;
    height: 14px;
}

.alchemy-essence-gain {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.88rem;
    color: var(--alchemy-text-muted);
    min-width: 60px;
    justify-content: flex-end;
}
.alchemy-essence-gain .inline-icon {
    width: 14px;
    height: 14px;
}

.alchemy-qty-btn {
    background: rgba(170, 100, 255, 0.14);
    color: var(--alchemy-text-light);
    border: 1px solid rgba(170, 100, 255, 0.4);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    transition: background 0.15s;
}
.alchemy-qty-btn:hover { background: rgba(170, 100, 255, 0.28); }

.alchemy-qty-max {
    font-size: 0.75rem;
    padding: 4px 6px;
}

.alchemy-qty-input,
.alchemy-potion-qty,
.alchemy-drop-potion-qty {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(170, 100, 255, 0.32);
    color: var(--text-main);
    padding: 4px 6px;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    text-align: center;
    width: 50px;
    min-width: 50px;
}
.alchemy-qty-input:focus,
.alchemy-potion-qty:focus,
.alchemy-drop-potion-qty:focus {
    outline: none;
    border-color: rgba(170, 100, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(170, 100, 255, 0.12);
}
.alchemy-qty-input::-webkit-inner-spin-button,
.alchemy-qty-input::-webkit-outer-spin-button,
.alchemy-potion-qty::-webkit-inner-spin-button,
.alchemy-potion-qty::-webkit-outer-spin-button,
.alchemy-drop-potion-qty::-webkit-inner-spin-button,
.alchemy-drop-potion-qty::-webkit-outer-spin-button { appearance: none; margin: 0; }

.alchemy-decraft-summary {
    margin-top: 20px;
    padding-top: 16px;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: 'Oswald', sans-serif;
}

.alchemy-preview-ep {
    font-size: 1.1rem;
    color: var(--alchemy-text-muted);
}
.alchemy-preview-ep strong {
    color: var(--alchemy-text-pale);
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(170, 100, 255, 0.45);
}

/* Bouton "Ajout Automatique" : remplit la selection au max d'EP en
   privilegiant les essences faibles. Style discret pour ne pas voler la
   vedette au bouton "Lancer la distillation". */
.alchemy-auto-fill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: linear-gradient(180deg,
        rgba(170, 100, 255, 0.12),
        rgba(120, 70, 200, 0.18));
    border: 1px solid rgba(170, 100, 255, 0.4);
    border-radius: 6px;
    color: var(--alchemy-text-pale);
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.alchemy-auto-fill-btn:hover:not(:disabled) {
    background: linear-gradient(180deg,
        rgba(170, 100, 255, 0.22),
        rgba(120, 70, 200, 0.28));
    border-color: rgba(170, 100, 255, 0.65);
    box-shadow: 0 0 12px rgba(170, 100, 255, 0.25);
}
.alchemy-auto-fill-btn:active:not(:disabled) {
    transform: translateY(1px);
}
.alchemy-auto-fill-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.alchemy-preview-warn {
    color: var(--rarity-primordial);
    font-size: 0.9rem;
    font-style: italic;
}
/* Warn cristallisation : visibility:hidden (au lieu de display:none) pour
   reserver l'espace et eviter le decalage du panel. min-height = 2 lignes. */
.alchemy-preview-warn.is-hidden {
    visibility: hidden;
}
#alchemy-crystal-warn {
    min-height: calc(2em * 1.4);
    line-height: 1.4;
}

.alchemy-preview-timer {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ---- Potions block ---- */
.alchemy-potions-block {
    padding: 20px;
    border: 1px solid rgba(170, 100, 255, 0.25);
    background: linear-gradient(180deg, rgba(18, 12, 28, 0.7), rgba(10, 8, 18, 0.8));
    border-radius: 10px;
    box-shadow:
        0 0 0 1px rgba(170, 100, 255, 0.08) inset,
        0 6px 18px rgba(0, 0, 0, 0.45);
}

.alchemy-potions-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.alchemy-potion-card {
    padding: 14px;
    border: 1px solid rgba(170, 100, 255, 0.25);
    background:
        linear-gradient(180deg, rgba(26, 18, 40, 0.65), rgba(12, 8, 20, 0.8));
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Taille uniforme : les cards XP et drop ont parfois des textes effect
       de longueur differente (1 ligne vs 2 lignes). Min-height reduit pour
       compacter le layout (l'utilisateur a estime que 220 etait trop haut). */
    min-height: 180px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
/* Stats + controls + locked sont pousses en bas. Les stats restent collees
   juste au-dessus des controls / du bandeau verrouille (pas de gap mort). */
.alchemy-potion-card .alchemy-potion-stats {
    margin-top: auto;
}
.alchemy-potion-card .alchemy-essence-controls,
.alchemy-potion-card .alchemy-potion-locked {
    margin-top: 0;
}
.alchemy-potion-card:not(.is-locked):hover {
    border-color: rgba(170, 100, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(170, 100, 255, 0.18);
}

.alchemy-potion-card.is-locked {
    opacity: 0.55;
}

.alchemy-potion-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alchemy-potion-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.alchemy-potion-name {
    font-family: 'Cinzel', serif;
    color: var(--alchemy-text-light);
    font-size: 1rem;
    text-shadow: 0 0 8px rgba(170, 100, 255, 0.28);
}

.alchemy-potion-effect {
    font-size: 0.85rem;
    opacity: 0.85;
}

.alchemy-potion-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    padding: 6px 0;
    
}

.alchemy-potion-cost {
    display: flex;
    align-items: center;
    gap: 4px;
}

.alchemy-potion-actions {
    display: flex;
    gap: 8px;
}

.alchemy-potion-actions .btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.85rem;
}

.alchemy-potion-locked {
    text-align: center;
    font-style: italic;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    color: var(--rarity-fragile);
    padding: 8px;
    border: 1px dashed rgba(var(--rarity-fragile-rgb), 0.4);
    border-radius: 6px;
}

/* ============================================================
   CRISTALLISATION (3e sous-onglet, voir MDE_Feature_Cristallisation.md)
   ============================================================ */
.alchemy-crystal-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.alchemy-crystal-hint {
    background: rgba(var(--gold-rgb), 0.08);
    
    color: var(--gold-text-warm);
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.82rem;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    line-height: 1.4;
}

/* Summary cristallisation : slot Cristal a gauche + previews/bouton a droite */
.alchemy-crystal-summary {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 16px;
    align-items: stretch;
}
.alchemy-crystal-summary.alchemy-crystal-summary-empty {
    /* Slot seul (pas de bloc preview/bouton a cote) : pleine largeur centre */
    display: flex;
    justify-content: center;
}
.alchemy-crystal-summary.alchemy-crystal-summary-empty .alchemy-crystal-slot {
    width: min(280px, 100%);
}
@media (max-width: 720px) {
    .alchemy-crystal-summary {
        grid-template-columns: 1fr;
    }
}
.alchemy-crystal-summary-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}
/* Le bouton Cristalliser est en flex-column (align-items: stretch par defaut)
   ce qui l'etire sur toute la largeur. On le recentre en self-center pour
   garder sa taille naturelle (min-width 180px). */
.alchemy-crystal-summary-side > .alchemy-btn-craft {
    align-self: center;
}

/* Barre de phase 3 segments : Brut / Affine / Pur. Chaque segment = 10% de
   charge. Fill courant en or, fill projete en lavande translucide qui glow. */
.alchemy-phase-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.alchemy-phase-segment {
    position: relative;
    height: 32px;
    background: rgba(var(--black-rgb), 0.55);
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s, opacity 0.2s;
}
.alchemy-phase-segment.is-locked {
    opacity: 0.6;
}
.alchemy-phase-segment.is-active {
    border-color: rgba(var(--gold-rgb), 0.55);
    box-shadow: 0 0 12px rgba(var(--gold-rgb), 0.18) inset;
}
.alchemy-phase-segment.is-completed {
    border-color: rgba(var(--gold-rgb), 0.45);
}
.alchemy-phase-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    transition: width 0.3s ease;
    pointer-events: none;
}
.alchemy-phase-fill-current {
    background: linear-gradient(180deg,
        rgba(var(--gold-rgb), 0.7) 0%,
        rgba(var(--gold-rgb), 0.4) 100%);
    box-shadow: 0 0 12px rgba(var(--gold-rgb), 0.35) inset;
    z-index: 1;
}
.alchemy-phase-fill-projected {
    background: linear-gradient(180deg,
        rgba(var(--crystal-accent-rgb), 0.45) 0%,
        rgba(var(--crystal-accent-rgb), 0.18) 100%);
    box-shadow: 0 0 14px rgba(var(--crystal-accent-rgb), 0.4) inset;
    border-right: 1px solid rgba(var(--crystal-accent-rgb), 0.7);
    z-index: 2;
    /* Pulse subtile pour signaler la projection */
    animation: alchemy-phase-pulse 1.6s ease-in-out infinite;
}
@keyframes alchemy-phase-pulse {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}
.alchemy-phase-segment-name {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}
.alchemy-phase-segment.is-active .alchemy-phase-segment-name,
.alchemy-phase-segment.is-completed .alchemy-phase-segment-name {
    color: var(--text-main);
}

.alchemy-phase-delta-line {
    text-align: right;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    color: var(--gold);
    letter-spacing: 0.3px;
    min-height: 1.4em;
}
/* Hint contextuel sous la barre : explique le rendement de la phase courante.
   Italique gris, discret pour pas voler la vedette a la barre. */
.alchemy-phase-rate-hint {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.78rem;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
    min-height: 1.2em;
    margin-top: 4px;
}
.alchemy-phase-delta-line.is-hidden {
    visibility: hidden;
}
.alchemy-phase-delta {
    color: var(--crystal-accent);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(var(--crystal-accent-rgb), 0.35);
    margin-left: 6px;
}
.alchemy-crystal-summary-hint {
    color: var(--text-secondary);
    font-style: italic;
}

/* Slot Cristal : "+" vide ou Cristal place avec X */
.alchemy-crystal-slot {
    position: relative;
    background: linear-gradient(160deg, rgba(var(--crystal-accent-rgb), 0.08), rgba(var(--black-rgb), 0.4));
    border: 1px solid rgba(var(--crystal-accent-rgb), 0.3);
    border-radius: 10px;
    padding: 14px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.alchemy-crystal-slot.is-empty {
    flex-direction: column;
    cursor: pointer;
    border-style: dashed;
    border-color: rgba(var(--crystal-accent-rgb), 0.45);
    color: var(--text-dim);
}
.alchemy-crystal-slot.is-empty:hover:not(:disabled) {
    border-color: var(--crystal-accent);
    background: linear-gradient(160deg, rgba(var(--crystal-accent-rgb), 0.14), rgba(var(--black-rgb), 0.4));
    transform: translateY(-1px);
}
.alchemy-crystal-slot.is-empty:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.alchemy-crystal-slot-plus {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--crystal-accent);
    line-height: 1;
}
.alchemy-crystal-slot-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.alchemy-crystal-slot.is-filled {
    min-height: 0;
    padding: 12px 14px;
    box-shadow: 0 0 14px rgba(var(--crystal-accent-rgb), 0.18) inset;
}
.alchemy-crystal-slot-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 8px rgba(var(--crystal-accent-rgb), 0.4));
}
.alchemy-crystal-slot-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.alchemy-crystal-slot-name {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}
.alchemy-crystal-slot-charge {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    color: var(--gold);
    letter-spacing: 0.3px;
}
.alchemy-crystal-slot-charge-value {
    transition: color 0.2s;
}
.alchemy-crystal-slot-charge .alchemy-phase-delta.is-hidden {
    visibility: hidden;
}
.alchemy-crystal-slot-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(var(--error-rgb), 0.45);
    background: rgba(var(--black-rgb), 0.6);
    color: var(--error-text, var(--error));
    font-family: 'Oswald', sans-serif;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.alchemy-crystal-slot-remove:hover:not(:disabled) {
    background: rgba(var(--error-rgb), 0.25);
    border-color: var(--error);
}
.alchemy-crystal-slot-remove:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
/* Barre de charge generique reutilisee par le picker modal Cristal */
.alchemy-crystal-bar {
    width: 100%;
    height: 4px;
    background: rgba(var(--black-rgb), 0.5);
    border-radius: 2px;
    overflow: hidden;
}
.alchemy-crystal-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
    transition: width 0.25s ease;
}

.alchemy-crystal-detail {
    background: rgba(var(--black-rgb), 0.35);
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.alchemy-crystal-detail-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.alchemy-crystal-detail-icon {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 8px rgba(var(--gold-rgb), 0.3));
}
.alchemy-crystal-detail-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.alchemy-crystal-detail-name {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}
.alchemy-crystal-detail-state {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    color: var(--gold);
}
/* Onglets espèces (zone partagée) : juste au-dessus du tableau de ressources.
   N'apparaissent que si > 1 espèce compatible (cristal d'une zone multi-
   espèces, ex: Varok + Thyrak pour le Volcan). Style miroir des subtabs
   alchimie pour rester cohérent. */
.alchemy-crystal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid rgba(var(--gold-rgb), 0.22);
    padding-bottom: 0;
    margin-bottom: 2px;
}
.alchemy-crystal-tab {
    padding: 7px 16px;
    font-family: 'Cinzel', serif;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    letter-spacing: 0.4px;
    transition: color 0.2s, border-color 0.2s;
}
.alchemy-crystal-tab:hover:not(.active) {
    color: var(--gold-light, var(--gold));
}
.alchemy-crystal-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    text-shadow: 0 0 8px rgba(var(--gold-rgb), 0.35);
}

.alchemy-crystal-resources {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 800px) {
    .alchemy-crystal-resources {
        grid-template-columns: 1fr;
    }
}
.alchemy-crystal-resources-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.alchemy-section-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 10px;
    margin-bottom: 10px;
}
.alchemy-crystal-line {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: linear-gradient(160deg, rgba(var(--gold-rgb), 0.04), rgba(var(--black-rgb), 0.35));
    border: 1px solid rgba(var(--gold-rgb), 0.14);
    border-radius: 10px;
    font-family: 'Roboto Condensed', sans-serif;
    transition: opacity 0.15s, border-color 0.15s, background 0.15s;
}
.alchemy-crystal-line:hover:not(.is-empty) {
    border-color: rgba(var(--gold-rgb), 0.32);
}
.alchemy-crystal-line.is-empty {
    opacity: 0.5;
}
.alchemy-crystal-line[data-rarity="fragile"]    {  }
.alchemy-crystal-line[data-rarity="robuste"]    {  }
.alchemy-crystal-line[data-rarity="alpha"]      {  }
.alchemy-crystal-line[data-rarity="ancien"]     {  }
.alchemy-crystal-line[data-rarity="primordial"] {  }

.alchemy-crystal-line-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    image-rendering: pixelated;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.alchemy-crystal-line-icon-empty {
    display: inline-block;
    border: 1px dashed rgba(var(--gold-rgb), 0.18);
    border-radius: 6px;
}
.alchemy-crystal-line-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.alchemy-crystal-line-name {
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: capitalize;
}
.alchemy-crystal-line-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.alchemy-crystal-line-rarity {
    font-family: 'Oswald', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(var(--black-rgb), 0.45);
    color: var(--text-dim);
}
.alchemy-crystal-line-rarity.rarity-fragile    { color: var(--rarity-fragile); }
.alchemy-crystal-line-rarity.rarity-robuste    { color: var(--rarity-robuste); }
.alchemy-crystal-line-rarity.rarity-alpha      { color: var(--rarity-alpha); }
.alchemy-crystal-line-rarity.rarity-ancien     { color: var(--rarity-ancien); }
.alchemy-crystal-line-rarity.rarity-primordial { color: var(--rarity-primordial); }
.alchemy-crystal-line-rate {
    color: var(--gold);
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
}
.alchemy-crystal-line-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.alchemy-crystal-line-stock {
    font-family: 'Oswald', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-dim);
}
.alchemy-crystal-line-stock strong {
    color: var(--text-main);
    font-weight: 700;
    margin-left: 4px;
}

/* ============================================================
   SERTISSAGE (4e sous-onglet Alchimie, feature 2026-05-15)
   ============================================================ */
.bezel-warn,
.bezel-warn-strong {
    color: var(--rarity-ancien, #ff7050);
    font-weight: 700;
}
/* Slot rempli "Cristal selectionne" : on reutilise les classes
   .alchemy-crystal-slot.is-filled de la Cristallisation. Quelques ajustements
   pour afficher la phase + les deux carres de slots de sertissage. */
.bezel-slot-filled-wrap .bezel-card-phase {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.bezel-slot-filled-wrap .bezel-card-slots {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.bezel-card-phase {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}
.bezel-card-slots {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}
.bezel-slot {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--black-rgb), 0.5);
    border: 1px dashed rgba(var(--gold-rgb), 0.4);
    color: rgba(var(--gold-rgb), 0.6);
    font-size: 0.95rem;
    font-weight: 700;
}
.bezel-slot.bezel-slot-filled {
    border-style: solid;
    border-color: var(--gold);
    background: rgba(var(--gold-rgb), 0.18);
    box-shadow: 0 0 8px rgba(var(--gold-rgb), 0.4);
}
.bezel-slot.bezel-slot-filled img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.bezel-slot.bezel-slot-locked {
    border-style: dotted;
    border-color: rgba(var(--gray-500), 0.5);
    color: rgba(var(--gray-400), 0.5);
}
.bezel-card-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.bezel-card-status.bezel-card-busy {
    color: var(--blue-light, #88aaff);
    font-weight: 600;
}
.bezel-card-status.bezel-card-full {
    color: var(--text-dim);
    font-style: italic;
}

/* Picker zone (s'affiche sous la grille quand un cristal est selectionne) */
.bezel-zone-picker {
    margin-top: 18px;
    padding: 14px;
    background: rgba(var(--black-rgb), 0.45);
    border: 1px solid rgba(var(--gold-rgb), 0.35);
    border-radius: 10px;
}
.bezel-zone-picker-title {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.bezel-zone-picker-cost {
    color: var(--text-secondary);
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
}
.bezel-zone-picker-warn {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.bezel-zone-picker-error {
    margin-top: 10px;
    text-align: center;
    color: var(--rarity-ancien, #ff7050);
    font-weight: 600;
    font-size: 0.85rem;
}
.bezel-zone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.bezel-zone-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    background: rgba(var(--black-rgb), 0.55);
    border: 1px solid rgba(var(--gold-rgb), 0.3);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    text-align: center;
    font-family: 'Roboto Condensed', sans-serif;
}
.bezel-zone-card:hover:not(:disabled) {
    border-color: var(--gold);
    background: rgba(var(--gold-rgb), 0.18);
    transform: translateY(-2px);
}
.bezel-zone-card:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.bezel-zone-card.is-duplicate {
    border-color: var(--rarity-primordial, #ff8800);
    background: rgba(255, 136, 0, 0.12);
}
.bezel-zone-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
}
.bezel-zone-label {
    font-weight: 700;
    font-size: 0.85rem;
}
.bezel-zone-hint {
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.4px;
}
.bezel-zone-card.is-duplicate .bezel-zone-hint {
    color: var(--rarity-primordial, #ff8800);
    font-weight: 700;
}



/* ============================================
 * Modale "Potions de butin" (HUD header drop-potion.js)
 * Refonte 2026-05-16 : remplace lancien modal direct danulation.
 * ============================================ */
.drop-potion-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.drop-potion-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}
.drop-potion-modal {
    width: min(560px, 92vw);
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #18141a 0%, #221a25 50%, #18141a 100%);
    border: 1px solid rgba(var(--gold-rgb), 0.4);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(var(--gold-rgb), 0.2);
    transform: translateY(14px) scale(0.96);
    transition: transform 0.28s cubic-bezier(.25,.8,.4,1);
}
.drop-potion-overlay.is-active .drop-potion-modal {
    transform: translateY(0) scale(1);
}
.drop-potion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.2);
}
.drop-potion-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--gold-text-warm);
}
.drop-potion-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(var(--gold-rgb), 0.3);
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.18s ease;
}
.drop-potion-close:hover {
    background: rgba(var(--stat-red-rgb), 0.15);
    border-color: rgba(var(--stat-red-rgb), 0.45);
    color: var(--stat-red-light, #ff7a6a);
}
.drop-potion-body {
    padding: 1rem 1.2rem 1.2rem;
    overflow-y: auto;
}
.drop-potion-loading,
.drop-potion-empty {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 1.5rem 0.5rem;
}
.drop-potion-section-title {
    margin: 0.8rem 0 0.6rem;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-text-warm);
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.15);
    padding-bottom: 0.3rem;
}
.drop-potion-active-card {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.7rem 0.9rem;
    background: rgba(120, 230, 130, 0.08);
    border: 1px solid rgba(120, 230, 130, 0.45);
    border-radius: 10px;
}
.drop-potion-active-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(120, 230, 130, 0.35));
}
.drop-potion-active-info { min-width: 0; }
.drop-potion-active-name {
    font-family: 'Cinzel', serif;
    color: #c8f7c8;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}
.drop-potion-active-waves {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}
.drop-potion-active-waves strong { color: #c8f7c8; font-size: 1rem; }
.drop-potion-active-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 3px;
    overflow: hidden;
}
.drop-potion-active-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(120, 230, 130, 0.85), rgba(180, 240, 180, 0.65));
    transition: width 0.25s ease;
}
.drop-potion-cancel-btn {
    padding: 0.4rem 0.9rem;
    background: rgba(var(--stat-red-rgb), 0.15);
    border: 1px solid rgba(var(--stat-red-rgb), 0.5);
    border-radius: 6px;
    color: var(--stat-red-light, #ff7a6a);
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
}
.drop-potion-cancel-btn:hover {
    background: rgba(var(--stat-red-rgb), 0.3);
    border-color: var(--stat-red-light, #ff7a6a);
}
.drop-potion-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.drop-potion-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.55rem 0.8rem;
    background: rgba(var(--gold-rgb), 0.05);
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    border-radius: 8px;
    transition: background 0.15s, border-color 0.15s;
}
.drop-potion-row:hover {
    background: rgba(var(--gold-rgb), 0.1);
    border-color: rgba(var(--gold-rgb), 0.35);
}
.drop-potion-row.is-stackable {
    border-color: rgba(120, 230, 130, 0.45);
    background: rgba(120, 230, 130, 0.06);
}
.drop-potion-row.is-locked {
    opacity: 0.55;
    filter: saturate(0.7);
}
.drop-potion-row-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.drop-potion-row-info { min-width: 0; }
.drop-potion-row-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.92rem;
}
.drop-potion-row-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.drop-potion-row-meta strong { color: var(--gold-text-warm); }
.drop-potion-activate-btn {
    padding: 0.4rem 0.8rem;
    background: rgba(var(--gold-rgb), 0.12);
    border: 1px solid rgba(var(--gold-rgb), 0.45);
    border-radius: 6px;
    color: var(--gold-text-warm);
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.drop-potion-activate-btn:hover:not(:disabled) {
    background: rgba(var(--gold-rgb), 0.22);
    border-color: var(--gold);
    color: var(--gold);
}
.drop-potion-activate-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ============================================================
 * ONGLET CRISTAL FUSIONNÉ — 3 pickers côte à côte
 * (Cristallisation + Sertissage + Décharger)
 * ============================================================ */
.alchemy-crystal-pickers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: stretch;
}
.alchemy-crystal-picker-block {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    min-width: 0;
    /* Stretch vertical : les 3 blocs prennent la hauteur du plus grand
       (Cristallisation a généralement le plus de contenu). */
    display: flex;
    flex-direction: column;
}
/* Conteneur interne (renderCrystallizationBlock/Bezel/Discharge) s'étire pour
   remplir le bloc parent. Sans ça, le contenu reste en haut et le bloc paraît
   "vide" en bas avec un fond visible. */
.alchemy-crystal-picker-block > .alchemy-crystal-block,
.alchemy-crystal-picker-block > .alchemy-discharge-block {
    flex: 1;
    display: flex;
    flex-direction: column;
}
/* Le 3e bloc (Décharger) en tonalité rouge — action destructive. */
.alchemy-crystal-picker-block.alchemy-crystal-picker-danger {
    background: rgba(255, 34, 68, 0.06);
    border-color: rgba(255, 34, 68, 0.35);
    box-shadow: 0 0 20px rgba(255, 34, 68, 0.08) inset;
}
.alchemy-crystal-picker-block.alchemy-crystal-picker-danger .alchemy-block-title {
    color: #ff6b80;
}

/* Header partagé (titre + hint) — utilisé en tête de chaque picker
   (Cristallisation, Sertissage, Décharger) pour avoir la même structure
   visuelle dans les 3 blocs. */
.alchemy-crystal-picker-block > .alchemy-block-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    margin: 0 0 0.4rem 0;
    color: var(--gold-text-warm);
}
.alchemy-crystal-picker-block > .alchemy-block-hint {
    margin: 0 0 0.8rem 0;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-style: italic;
}
/* Le bloc Décharger garde sa teinte rouge sur le titre. */
.alchemy-crystal-picker-danger > .alchemy-block-title {
    color: #ff6b80;
}

/* Bloc Décharger : contenu intérieur (slot + bouton) */
.alchemy-discharge-block {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.alchemy-discharge-btn {
    /* Auto-margin top : pousse le bouton en bas du flex-column parent pour
       aligner avec le bas des autres blocs (qui ont plus de contenu).
       Largeur alignée sur celle du slot "Choisir un Cristal" (280px max). */
    margin: auto auto 0;
    width: min(280px, 100%);
    padding: 0.65rem 1rem;
    background: linear-gradient(180deg, #ff2244, #c81b36);
    border: 1px solid #ff4d6a;
    border-radius: 8px;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
.alchemy-discharge-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #ff3a58, #d62543);
    transform: translateY(-1px);
}
.alchemy-discharge-btn:active:not(:disabled) { transform: translateY(0); }
.alchemy-discharge-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 34, 68, 0.25);
}

/* Picker modale (liste cliquable de cristaux à décharger) */
.alchemy-discharge-picker-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}
.alchemy-discharge-pick {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    font-family: 'Roboto Condensed', sans-serif;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.alchemy-discharge-pick:hover {
    background: rgba(var(--gold-rgb), 0.08);
    border-color: rgba(var(--gold-rgb), 0.4);
}
.alchemy-discharge-pick-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}
.alchemy-discharge-pick-name {
    flex: 1;
    text-align: left;
    font-weight: 600;
}
.alchemy-discharge-pick-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Responsive : sous certaine largeur les 3 blocs passent en colonne. */
@media (max-width: 1100px) {
    .alchemy-crystal-pickers {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
 * VUE DÉTAILLÉE (drill-down depuis le menu 3 cards)
 * Quand l'utilisateur clique "Ouvrir" sur une card, l'onglet bascule
 * sur cette vue : full-width + bouton retour en haut.
 * ============================================================ */
.alchemy-crystal-detail {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.alchemy-crystal-back-btn {
    align-self: flex-start;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(var(--gold-rgb), 0.3);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.alchemy-crystal-back-btn:hover {
    background: rgba(var(--gold-rgb), 0.1);
    border-color: var(--gold);
    color: var(--gold-text-warm);
}
/* Vue détaillée full-width : 1 seul bloc qui occupe toute la largeur. */
.alchemy-crystal-picker-full {
    width: 100%;
}

