/* ForgeStream — badges & états Premium (entitlements UI) */

.fs-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(234, 88, 12, 0.15));
    border: 1px solid rgba(249, 115, 22, 0.45);
    color: #fdba74;
    vertical-align: middle;
    white-space: nowrap;
}

.fs-premium-badge.maitre {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(249, 115, 22, 0.2));
    border-color: rgba(251, 191, 36, 0.5);
    color: #fde68a;
}

.fs-feature-locked {
    opacity: 0.55;
    pointer-events: none;
    position: relative;
    filter: grayscale(0.15);
}

.fs-feature-locked-interactive {
    opacity: 0.72;
    position: relative;
}

.fs-feature-locked-interactive::after,
.fs-feature-locked::after {
    content: none;
}

/* Pastilles dashboard — options Premium verrouillées */
.tile-perk.fs-feature-locked-interactive,
.tile-perk.fs-feature-locked {
    border-style: dashed;
    border-color: rgba(249, 115, 22, 0.35);
    opacity: 0.65;
}
.tile-perk.fs-feature-locked-interactive::before,
.tile-perk.fs-feature-locked::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15));
    box-shadow: none;
}
.tile-perk.fs-feature-locked-interactive::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.55rem;
    margin-left: 0.35rem;
    color: #fdba74;
    opacity: 0.85;
}
.tile-perk .fs-entitlement-hint {
    display: none;
}

.fs-entitlement-hint {
    font-size: 0.8rem;
    color: rgba(253, 186, 116, 0.9);
    margin-top: 0.35rem;
    line-height: 1.4;
}

.fs-entitlement-hint a {
    color: #f97316;
    text-decoration: underline;
}

/* Onglets verrouillés (ex. commandes perso — options Premium) */
.tab-button.fs-tab-locked,
#command-modal .tab-button.fs-tab-locked {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
}
.tab-button.fs-tab-locked::after,
#command-modal .tab-button.fs-tab-locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    margin-left: 0.35rem;
    color: #fdba74;
}
#command-modal .tab-content.fs-feature-locked-interactive {
    pointer-events: none;
    user-select: none;
}

#command-modal .tab-content.fs-feature-locked-interactive input,
#command-modal .tab-content.fs-feature-locked-interactive select,
#command-modal .tab-content.fs-feature-locked-interactive textarea,
#command-modal .tab-content.fs-feature-locked-interactive button,
#command-modal .tab-content.fs-feature-locked-interactive label {
    pointer-events: none;
    cursor: not-allowed;
}

#command-modal .tab-content.fs-feature-locked-interactive input,
#command-modal .tab-content.fs-feature-locked-interactive select,
#command-modal .tab-content.fs-feature-locked-interactive textarea,
#command-modal .tab-content.fs-feature-locked-interactive button:not(.fs-entitlement-hint a) {
    opacity: 0.85;
}

#command-modal .tab-content.fs-feature-locked-interactive .fs-entitlement-hint a {
    pointer-events: auto;
}

/* Alertes visuelles — bloc HTML/CSS/JS Premium */
#alert-advanced-code.fs-feature-locked-interactive .fs-entitlement-hint {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.25);
}

#alert-advanced-code.fs-feature-locked-interactive .section-title .fs-premium-badge {
    margin-left: 0.5rem;
}

.fs-plan-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fs-plan-comparison-table th,
.fs-plan-comparison-table td {
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

.fs-plan-comparison-table th:first-child,
.fs-plan-comparison-table td:first-child {
    text-align: left;
    color: rgba(255, 255, 255, 0.85);
}

.fs-plan-comparison-table thead th {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    font-weight: 700;
}

.fs-plan-comparison-table .cell-yes {
    color: #34d399;
    font-weight: 600;
}

.fs-plan-comparison-table .cell-no {
    color: rgba(255, 255, 255, 0.35);
}

.fs-history-notice {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: rgba(191, 219, 254, 0.95);
    margin-bottom: 1rem;
}

/* Barre de quota (commandes, timers, média…) */
.fs-quota-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.fs-quota-panel.is-at-limit {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.06);
}

.fs-quota-panel.is-warn {
    border-color: rgba(251, 191, 36, 0.35);
}

.fs-quota-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.65rem;
}

.fs-quota-panel__title {
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.fs-quota-panel__title i {
    color: #f97316;
}

.fs-quota-plan-pill {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: #fdba74;
}

.fs-quota-plan-pill.maitre {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fde68a;
}

.fs-quota-bar-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.fs-quota-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.35s ease;
}

.fs-quota-bar-fill.is-warn {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.fs-quota-bar-fill.is-danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.fs-quota-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.75rem;
}

.fs-quota-meta strong {
    color: #fff;
}

.fs-quota-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 0.45rem;
    align-items: flex-end;
}

.fs-quota-tier {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.25;
}

.fs-quota-tier-label {
    font-weight: 600;
}

.fs-quota-tier-sub {
    font-size: 0.68rem;
    opacity: 0.8;
}

.fs-quota-tier strong {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0.05rem;
}

.fs-quota-tier.is-included {
    opacity: 0.65;
}

.fs-quota-tier.is-included strong {
    color: rgba(255, 255, 255, 0.8);
}

.fs-quota-tier.is-active {
    color: #fdba74;
}

/* Nouveau rendu compact (pills) */
.fs-quota-tierline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.55rem;
}

.fs-quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.72);
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
    white-space: nowrap;
}

.fs-quota-pill-val {
    font-weight: 800;
    color: rgba(255,255,255,0.92);
}

.fs-quota-pill.is-included {
    opacity: 0.75;
}

.fs-quota-pill.is-next {
    opacity: 0.85;
}

.fs-quota-pill.is-active {
    border-color: rgba(249, 115, 22, 0.45);
    background: rgba(249, 115, 22, 0.10);
    color: #fdba74;
}

.fs-quota-pill.is-active .fs-quota-pill-val {
    color: #fff;
}

.fs-quota-pill-you {
    margin-left: 0.15rem;
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    background: rgba(249, 115, 22, 0.25);
    border: 1px solid rgba(249, 115, 22, 0.35);
}

.fs-quota-tier.is-active strong {
    color: #fff;
}

.fs-quota-tier small {
    display: block;
    font-size: 0.6rem;
    margin-top: 0.2rem;
    opacity: 0.85;
}

.fs-quota-alert {
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.fs-quota-alert.is-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.fs-quota-alert.is-warn {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fde68a;
}

.fs-quota-upgrade {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.45;
}

.fs-quota-upgrade a {
    color: #f97316;
    font-weight: 600;
    text-decoration: underline;
}

/* Bouton d’ajout bloqué quand quota plein */
.fs-quota-btn--blocked,
button.fs-quota-btn--blocked:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    filter: grayscale(0.35);
}
