/**
 * Coque visuelle ForgeStream — source unique pages outils / hub / config.
 * Réf. mon-compte (hub), twitch-channel-rewards / alert-config (config).
 * Ne pas surcouvrir avec !important : modifier ce fichier ou le CSS page-spécifique.
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Base commune ─────────────────────────────────── */
.fs-config-page,
.fs-hub-page {
    font-family: 'Inter', sans-serif;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

.fs-config-page {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #2d2d2d 100%);
}

.fs-hub-page {
    background: #0b0b0c;
}

.fs-hub-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 900px 520px at 18% 22%, rgba(249, 115, 22, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 740px 420px at 82% 68%, rgba(88, 101, 242, 0.06) 0%, transparent 62%);
    z-index: 0;
    pointer-events: none;
}

.fs-config-page .page-wrapper,
.fs-hub-page .page-wrapper {
    position: relative;
    z-index: 2;
}

/* ── Marges pages (opt-in — jamais .container / .max-w-7xl globaux : casse navbar & studio) ── */
body.fs-config-page:not([data-fs-layout]) .page-wrapper > .max-w-7xl.mx-auto,
body.fs-config-page:not([data-fs-layout]) .min-h-screen.p-6 > .max-w-7xl.mx-auto,
body.fs-config-page:not([data-fs-layout]) #main-content.min-h-screen > .max-w-7xl.mx-auto {
    max-width: min(68rem, 100%);
}

body.fs-hub-page:not([data-fs-layout]) .page-wrapper,
body.fs-hub-page:not([data-fs-layout]) .min-h-screen.p-6,
body.fs-hub-page:not([data-fs-layout]) #main-content.min-h-screen {
    padding: 2rem clamp(1rem, 3vw, 3rem);
}

body.fs-config-page:not([data-fs-layout]) .page-wrapper,
body.fs-config-page:not([data-fs-layout]) .min-h-screen.p-6,
body.fs-config-page:not([data-fs-layout]) #main-content.min-h-screen {
    padding: 2.5rem clamp(1.25rem, 3.5vw, 3rem);
}

body.fs-hub-page:not([data-fs-layout]) .page-wrapper > .max-w-7xl.mx-auto,
body.fs-hub-page:not([data-fs-layout]) .min-h-screen.p-6 > .max-w-7xl.mx-auto,
body.fs-hub-page:not([data-fs-layout]) #main-content.min-h-screen > .max-w-7xl.mx-auto {
    max-width: min(80rem, 100%);
}

body.fs-config-page:not([data-fs-layout]) .page-wrapper > .max-w-4xl.mx-auto,
body.fs-hub-page:not([data-fs-layout]) .page-wrapper > .max-w-4xl.mx-auto,
body.fs-config-page:not([data-fs-layout]) .min-h-screen.p-6 > .max-w-4xl.mx-auto,
body.fs-hub-page:not([data-fs-layout]) .min-h-screen.p-6 > .max-w-4xl.mx-auto {
    max-width: min(52rem, 100%);
}

.fs-config-page .glass-card,
.fs-hub-page .glass-card,
.fs-config-page .card,
.fs-hub-page .card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.fs-hub-page .card {
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* ── Boutons ─────────────────────────────────────── */
.fs-config-page .btn-primary,
.fs-hub-page .btn-primary,
.fs-config-page .btn-buy,
.fs-hub-page .btn-buy {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    text-decoration: none;
    font-family: inherit;
}

.fs-config-page .btn-primary:hover:not(:disabled),
.fs-hub-page .btn-primary:hover:not(:disabled),
.fs-config-page .btn-buy:hover:not(:disabled),
.fs-hub-page .btn-buy:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
}

.fs-config-page .btn-primary:disabled,
.fs-hub-page .btn-primary:disabled,
.fs-config-page .btn-buy:disabled,
.fs-hub-page .btn-buy:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.fs-config-page .btn-secondary,
.fs-hub-page .btn-secondary,
.fs-config-page .btn-buy-outline,
.fs-hub-page .btn-buy-outline,
.fs-config-page .coffre-link,
.fs-hub-page .coffre-link {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    text-decoration: none;
    font-family: inherit;
}

.fs-config-page .btn-secondary:hover,
.fs-hub-page .btn-secondary:hover,
.fs-config-page .btn-buy-outline:hover,
.fs-hub-page .btn-buy-outline:hover,
.fs-config-page .coffre-link:hover,
.fs-hub-page .coffre-link:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.fs-hub-page .btn-buy-outline,
.fs-config-page .btn-buy-outline {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
}

.fs-hub-page .btn-buy,
.fs-config-page .btn-buy {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
}

/* ── Champs ──────────────────────────────────────── */
.fs-config-page .input-field,
.fs-hub-page .input-field,
.fs-config-page .premium-input,
.fs-hub-page .premium-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    font-family: inherit;
}

.fs-config-page .input-field:focus,
.fs-hub-page .input-field:focus,
.fs-config-page .premium-input:focus,
.fs-hub-page .premium-input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.fs-config-page .input-field::placeholder,
.fs-hub-page .input-field::placeholder,
.fs-config-page .premium-input::placeholder,
.fs-hub-page .premium-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.fs-config-page select.input-field,
.fs-hub-page select.input-field {
    cursor: pointer;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.fs-config-page select.input-field option,
.fs-hub-page select.input-field option {
    background: #1a1a1a;
    color: white;
}

/* ── Typo sections ───────────────────────────────── */
.fs-config-page .section-title,
.fs-hub-page .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fs-config-page .section-label,
.fs-hub-page .section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.5rem;
}

.fs-config-page .fs-inline-link,
.fs-hub-page .fs-inline-link {
    color: #fb923c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}

.fs-config-page .fs-inline-link:hover,
.fs-hub-page .fs-inline-link:hover {
    color: #ffedd5;
    border-bottom-color: rgba(249, 115, 22, 0.45);
}

.fs-config-page .fs-section-icon,
.fs-hub-page .fs-section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fs-config-page .fs-section-icon i,
.fs-hub-page .fs-section-icon i {
    color: #fb923c;
    font-size: 1.25rem;
}

/* ── Onglets (style Mon compte) ──────────────────── */
.fs-config-page .tabs-container,
.fs-hub-page .tabs-container {
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.fs-config-page .tabs-container::-webkit-scrollbar,
.fs-hub-page .tabs-container::-webkit-scrollbar {
    display: none;
}

.fs-config-page .tabs-row,
.fs-hub-page .tabs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: max-content;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fs-config-page .tab-content,
.fs-hub-page .tab-content {
    display: none;
}

.fs-config-page .tab-content.active,
.fs-hub-page .tab-content.active {
    display: block;
}

.fs-config-page .tab-btn,
.fs-hub-page .tab-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    color: #9ca3af;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.fs-config-page .tab-btn:hover,
.fs-hub-page .tab-btn:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.04);
}

.fs-config-page .tab-btn.active,
.fs-hub-page .tab-btn.active {
    color: #fff;
    background: transparent;
    border-bottom-color: transparent;
    font-weight: 800;
}

.fs-config-page .tab-btn.active::after,
.fs-hub-page .tab-btn.active::after {
    content: '';
    position: absolute;
    left: 0.35rem;
    right: 0.35rem;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.85), transparent);
    border-radius: 1px;
}

/* Alias historique (subathon-config, tts-config, etc.) → même rendu que .tab-btn */
.fs-config-page .tab-button,
.fs-hub-page .tab-button {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    color: #9ca3af;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.fs-config-page .tab-button:hover,
.fs-hub-page .tab-button:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.04);
}

.fs-config-page .tab-button.active,
.fs-hub-page .tab-button.active {
    color: #fff;
    background: transparent;
    border-bottom-color: transparent;
    font-weight: 800;
}

.fs-config-page .tab-button.active::after,
.fs-hub-page .tab-button.active::after {
    content: '';
    position: absolute;
    left: 0.35rem;
    right: 0.35rem;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.85), transparent);
    border-radius: 1px;
}

/* Bouton test overlay OBS — aligné à gauche sous l’aperçu */
.fs-config-page .overlay-test-bar,
.fs-hub-page .overlay-test-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.75rem;
    text-align: left;
}

.fs-config-page .overlay-test-bar__actions,
.fs-hub-page .overlay-test-bar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.fs-config-page .overlay-test-bar__hint,
.fs-hub-page .overlay-test-bar__hint {
    font-size: 0.75rem;
    color: rgba(156, 163, 175, 0.95);
    line-height: 1.4;
    max-width: 42rem;
}

/* ── Barre solde marché ──────────────────────────── */
.fs-hub-page .balance-bar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.fs-hub-page .balance-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fs-hub-page .balance-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-hub-page .balance-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.fs-hub-page .balance-label {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* ── Repliables ──────────────────────────────────── */
.fs-config-page .collapsible-header,
.fs-hub-page .collapsible-header {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s ease;
}

.fs-config-page .collapsible-header:hover,
.fs-hub-page .collapsible-header:hover {
    opacity: 0.85;
}

.fs-config-page .collapsible-content,
.fs-hub-page .collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 0;
    padding-top: 0;
}

.fs-config-page .collapsible-content.open,
.fs-hub-page .collapsible-content.open {
    max-height: 2400px;
    opacity: 1;
    padding-top: 1.25rem;
}

.fs-config-page .collapsible-icon,
.fs-hub-page .collapsible-icon {
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.4);
}

.fs-config-page .collapsible-header.open .collapsible-icon,
.fs-hub-page .collapsible-header.open .collapsible-icon {
    transform: rotate(180deg);
}
