/* === CHOIX VERROUILLÉS / COÛT === */
.choice-btn.locked-choice {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.dice-tag.locked-tag {
    background: rgba(150, 50, 50, 0.25);
    border-color: rgba(200, 60, 60, 0.4);
    color: #e08888;
}

.dice-tag.gold-tag {
    background: rgba(201, 168, 76, 0.15);
    border-color: rgba(201, 168, 76, 0.45);
    color: var(--gold);
}

.dice-tag.combat-tag {
    background: rgba(139, 20, 20, 0.25);
    border-color: rgba(200, 50, 50, 0.4);
    color: #e08080;
}

.badge {
    display: inline-block;
    font-size: 0.8rem;
    padding: 2px 10px;
    background: rgba(201, 168, 76, 0.2);
    border: 1px solid var(--gold);
    border-radius: 12px;
    color: var(--gold-light);
    margin-top: 0.3rem;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    position: relative;
}

/* Tooltip HUD — JS-positionné */
.hud-tooltip {
    position: fixed;
    z-index: 2000;
    pointer-events: none;
    background: rgba(14, 6, 2, 0.97);
    border: 1px solid rgba(201, 168, 76, 0.45);
    border-radius: 8px;
    padding: 10px 14px;
    min-width: 180px;
    max-width: 240px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.7);
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--parchment-dark);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.hud-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.hud-tooltip-name {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.85rem;
    color: var(--gold);
    display: block;
    margin-bottom: 4px;
}

.hud-tooltip-mod {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.25);
}

.hud-tooltip-mod.pos { color: #7ec87e; border-color: rgba(126,200,126,0.3); }
.hud-tooltip-mod.neg { color: #d96060; border-color: rgba(217,96,96,0.3); }
.hud-tooltip-mod.zero { color: rgba(200, 185, 155, 0.55); }

.hud-tooltip-desc {
    font-size: 0.85rem;
    color: rgba(244, 228, 193, 0.7);
    display: block;
    margin-top: 4px;
    border-top: 1px solid rgba(201, 168, 76, 0.15);
    padding-top: 5px;
}

.hud-tooltip-effect {
    display: block;
    font-size: 0.82rem;
    color: #c9a84c;
    font-style: italic;
    margin-bottom: 3px;
}

.combat-tooltip {
    position: fixed;
    z-index: 3000;
    pointer-events: none;
    background: rgba(10, 4, 1, 0.97);
    border: 1px solid rgba(201, 168, 76, 0.4);
    border-radius: 8px;
    padding: 9px 13px;
    min-width: 170px;
    max-width: 240px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.75);
    font-family: 'Crimson Text', serif;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--parchment-dark);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.13s ease, visibility 0.13s ease;
}

.combat-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.combat-tooltip-name {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.8rem;
    color: var(--gold);
    display: block;
    margin-bottom: 4px;
}

.combat-tooltip-formula {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 5px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.22);
    color: #e8c96b;
}

.combat-tooltip-desc {
    font-size: 0.82rem;
    color: rgba(244, 228, 193, 0.65);
    display: block;
    margin-top: 4px;
    border-top: 1px solid rgba(201, 168, 76, 0.12);
    padding-top: 4px;
}

.glossary {
    border-bottom: 1px dotted #d4af37;
    cursor: help;
    color: inherit;
}

/* Modificateur à côté de la valeur */
.stat-value-group {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.stat-mod {
    font-family: 'Crimson Text', serif;
    font-size: 0.82rem;
    min-width: 26px;
    text-align: right;
}

.stat-mod.pos  { color: rgba(126, 200, 126, 0.8); }
.stat-mod.neg  { color: rgba(217, 96, 96, 0.8); }
.stat-mod.zero { color: rgba(200, 185, 155, 0.35); }

/* Description de la capacité spéciale (déplacée en tooltip) */
.ability-description {
    display: none;
}

.stat-label {
    font-family: 'MedievalSharp', cursive;
    color: var(--gold);
    font-size: 0.95rem;
    min-width: 40px;
}

.stat-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--parchment);
}

.hp-bar-container {
    flex: 1;
    margin-left: 0.5rem;
    height: 22px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 11px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    position: relative;
    overflow: hidden;
}

.hp-bar {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.hp-bar.hp-warning {
    background: linear-gradient(90deg, var(--blood-light), #e67e22);
}

.hp-bar.hp-danger {
    background: linear-gradient(90deg, var(--blood), var(--blood-light));
}

.hp-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.inventory h4, .quest-log h4 {
    font-family: 'MedievalSharp', cursive;
    color: var(--gold);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.inventory ul {
    list-style: none;
    font-size: 0.9rem;
}

.inventory li {
    padding: 3px 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.inventory li.empty {
    color: rgba(244, 228, 193, 0.4);
    font-style: italic;
}

.inventory-item {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(255, 215, 0, 0.35);
    text-underline-offset: 3px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.inventory-item:hover {
    color: var(--gold);
    text-decoration-color: rgba(255, 215, 0, 0.7);
}

.quest-title {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--parchment-dark);
    margin-bottom: 0.3rem;
}

/* Quest description déplacée en tooltip */
.quest-description {
    display: none;
}

.completed-quests {
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(200, 170, 110, 0.2);
}

.completed-quests h5 {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.75rem;
    color: rgba(200, 170, 110, 0.5);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.completed-quests ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.completed-quests li {
    font-size: 0.78rem;
    color: rgba(244, 228, 193, 0.35);
    font-style: italic;
    padding: 0.1rem 0;
    padding-left: 1rem;
    position: relative;
}

.completed-quests li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: rgba(100, 180, 100, 0.5);
    font-style: normal;
}

/* === NARRATIVE AREA === */
.narrative-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 1rem;
}

.narrative-panel {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

.story-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.story-text {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.story-text p {
    margin-bottom: 0.8rem;
}

@keyframes textAppear {
    from { opacity: 0; transform: translateY(15px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.typewriter-skip-hint {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--gold-dim, rgba(255, 215, 0, 0.35));
    margin-top: 0.4rem;
    font-style: italic;
    pointer-events: none;
    animation: textAppear 0.4s ease forwards;
}

.story-text .highlight {
    color: var(--gold);
    font-weight: 600;
}

.story-text .danger {
    color: var(--blood-light);
    font-weight: 600;
}

.story-text .magic {
    color: var(--magic-light);
    font-weight: 600;
}

/* === CHOICES === */
.choices {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.choice-btn {
    font-family: 'Crimson Text', serif;
    font-size: 1.05rem;
    padding: 12px 20px;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.4);
    border-radius: 6px;
    color: var(--parchment);
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.choice-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.choice-btn:hover,
.choice-btn:focus-visible {
    background: rgba(201, 168, 76, 0.15);
    border-color: var(--gold);
    transform: translateX(4px);
    outline: none;
}

.choice-btn:hover::before,
.choice-btn:focus-visible::before {
    transform: scaleY(1);
}

.choice-btn .choice-tag {
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 2px;
}

.choice-btn .dice-tag {
    float: right;
    font-size: 0.75rem;
    color: var(--magic-light);
    background: rgba(108, 52, 131, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

