/* Subathon — layout & composants page (coque : fs-config-shell.css) */

.sub-hint {
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* Liens rapides (config / overlay) */
.sub-quick-links {
    border-color: rgba(249, 115, 22, 0.25);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(255, 255, 255, 0.04));
}

/* Stats admin */
.sub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.sub-stat-card {
    padding: 1.25rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.15);
    text-align: center;
}

.sub-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fb923c;
    margin-bottom: 0.35rem;
}

.sub-stat-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Paliers & configs */
.sub-tier-item,
.sub-config-item {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.15);
    padding: 1rem 1.15rem;
    transition: border-color 0.2s, background 0.2s;
}

.sub-tier-item:hover,
.sub-config-item:hover {
    border-color: rgba(255, 107, 53, 0.25);
    background: rgba(255, 107, 53, 0.04);
}

.sub-tier-item.completed {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.35), rgba(247, 147, 30, 0.25));
    border-color: rgba(255, 107, 53, 0.5);
    position: relative;
}

.sub-tier-item.completed::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 12px;
    right: 12px;
    height: 2px;
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
    z-index: 1;
}

.sub-tier-item.completed > * {
    position: relative;
    z-index: 2;
}

.sub-tier-item.current {
    border-color: rgba(255, 107, 53, 0.55);
    background: rgba(255, 107, 53, 0.12);
    animation: sub-tier-pulse 2s infinite;
}

@keyframes sub-tier-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}

/* Tuiles points par événement */
.sub-point-config-panel {
    width: 100%;
    min-width: 0;
}

.sub-event-badge {
    background: rgba(255, 107, 53, 0.18);
    color: #fb923c;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Variables messages */
.sub-var-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sub-var-btn.blue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border-color: rgba(59, 130, 246, 0.4); }
.sub-var-btn.blue:hover { background: rgba(59, 130, 246, 0.3); }
.sub-var-btn.emerald { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.4); }
.sub-var-btn.emerald:hover { background: rgba(16, 185, 129, 0.3); }
.sub-var-btn.amber { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border-color: rgba(245, 158, 11, 0.4); }
.sub-var-btn.amber:hover { background: rgba(245, 158, 11, 0.3); }

/* Toggle inline (paramètres) */
.sub-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.sub-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sub-toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #374151;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease;
}

.sub-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.sub-toggle input:checked + .sub-toggle-slider {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-color: rgba(255, 107, 53, 0.4);
}

.sub-toggle input:checked + .sub-toggle-slider::before {
    transform: translateX(20px);
}

/* Grille points : réutilise #point-configs-grid + eventsub-tiers-ui.css */

/* Grille admin 2 colonnes */
.sub-admin-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

@media (max-width: 900px) {
    .sub-admin-split {
        grid-template-columns: 1fr;
    }
}

/* Repliables : padding glass-card */
.glass-card.sub-collapsible:has(.collapsible-header:not(.open)) {
    padding-bottom: 1.25rem;
}

/* Overlay URL */
.sub-overlay-box {
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sub-overlay-box h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
}

/* Reset subathon */
#reset-btn {
    background: rgba(249, 115, 22, 0.08);
    border-color: #f97316;
    color: #f97316;
}

#reset-btn:hover {
    background: rgba(249, 115, 22, 0.18);
    border-color: #fb923c;
    color: #fed7aa;
}

/* Module désactivé */
#module-content.module-disabled {
    opacity: 0.45;
    filter: grayscale(1);
    pointer-events: none;
    user-select: none;
}

#module-disabled-banner {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    display: none;
    align-items: center;
    gap: 10px;
}

#module-disabled-banner.active {
    display: flex;
}

/* Notifications toast */
.sub-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 100001;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.sub-notification.show {
    transform: translateX(0);
}

.sub-notification.error {
    background: linear-gradient(135deg, #ff4757, #ff3742);
}

.sub-loading {
    text-align: center;
    color: #fb923c;
    font-size: 1rem;
}

/* Bloc test événements */
.sub-test-panel {
    padding: 1rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(249, 115, 22, 0.28);
    background: rgba(255, 107, 53, 0.08);
}

.sub-test-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    width: 100%;
}

/* Config pleine largeur : une rangée sur grand écran */
.sub-test-grid--wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .sub-test-grid--wide {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .sub-test-grid--wide {
        grid-template-columns: repeat(9, minmax(0, 1fr));
    }
}

/* Admin : grille étirée dans la carte jumelle */
.sub-test-card {
    display: flex;
    flex-direction: column;
}

.sub-test-card .sub-test-grid {
    flex: 1;
    grid-auto-rows: 1fr;
    align-content: stretch;
}

.sub-test-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.sub-test-card .sub-test-btn {
    min-height: 3rem;
    height: 100%;
}

.sub-test-grid--wide .sub-test-btn {
    min-height: 3rem;
}

.sub-test-btn:hover {
    transform: translateY(-1px);
}

.sub-test-btn:active {
    transform: translateY(0);
}

.sub-test-btn--follow {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
}
.sub-test-btn--follow:hover {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(74, 222, 128, 0.55);
}

.sub-test-btn--sub-prime {
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(167, 139, 250, 0.4);
}
.sub-test-btn--sub-prime:hover {
    background: rgba(139, 92, 246, 0.24);
    border-color: rgba(167, 139, 250, 0.6);
}

.sub-test-btn--sub-t1 {
    color: #f9a8d4;
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(244, 114, 182, 0.35);
}
.sub-test-btn--sub-t1:hover {
    background: rgba(236, 72, 153, 0.22);
    border-color: rgba(244, 114, 182, 0.55);
}

.sub-test-btn--sub-t2 {
    color: #f472b6;
    background: rgba(219, 39, 119, 0.14);
    border-color: rgba(236, 72, 153, 0.4);
}
.sub-test-btn--sub-t2:hover {
    background: rgba(219, 39, 119, 0.24);
    border-color: rgba(236, 72, 153, 0.58);
}

.sub-test-btn--sub-t3 {
    color: #ec4899;
    background: rgba(190, 24, 93, 0.16);
    border-color: rgba(219, 39, 119, 0.45);
}
.sub-test-btn--sub-t3:hover {
    background: rgba(190, 24, 93, 0.26);
    border-color: rgba(219, 39, 119, 0.62);
}

.sub-test-btn--gift {
    color: #d8b4fe;
    background: rgba(124, 58, 237, 0.14);
    border-color: rgba(167, 139, 250, 0.38);
}
.sub-test-btn--gift:hover {
    background: rgba(124, 58, 237, 0.24);
    border-color: rgba(167, 139, 250, 0.55);
}

.sub-test-btn--bits {
    color: #fde047;
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(250, 204, 21, 0.38);
}
.sub-test-btn--bits:hover {
    background: rgba(234, 179, 8, 0.22);
    border-color: rgba(250, 204, 21, 0.55);
}

.sub-test-btn--donation {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(52, 211, 153, 0.38);
}
.sub-test-btn--donation:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(52, 211, 153, 0.55);
}

.sub-test-btn--raid {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(96, 165, 250, 0.38);
}
.sub-test-btn--raid:hover {
    background: rgba(37, 99, 235, 0.24);
    border-color: rgba(96, 165, 250, 0.55);
}
