/* Thèmes événementiels — décorations & hero */

body[class*="theme-"]:not(.theme-default) {
    background-color: color-mix(in srgb, var(--bg) 92%, var(--theme-bg-tint, transparent));
}

.theme-banner {
    background: color-mix(in srgb, var(--primary) 18%, var(--bg-elevated));
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
    padding: 0.55rem 0;
    position: relative;
    z-index: 50;
}

.theme-banner.is-hidden {
    display: none;
}

.theme-banner-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    text-align: center;
}

.theme-banner-emoji {
    font-size: 1.125rem;
    line-height: 1;
    flex-shrink: 0;
}

.theme-banner-text {
    font-size: var(--text-small, 0.8125rem);
    font-weight: 500;
    color: var(--text);
    margin: 0;
    line-height: 1.45;
}

.theme-banner-close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
}

.theme-banner-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

body[class*="theme-"] .hero-grid-bg {
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, var(--hero-glow, rgba(99, 91, 255, 0.22)), transparent 70%),
        radial-gradient(ellipse 40% 30% at 80% 20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: auto, auto, 64px 64px, 64px 64px;
}

/* Ramadan */
body.theme-ramadan .page-wrap::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image: radial-gradient(circle at 20% 30%, #fbbf24 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, #0d9488 1px, transparent 1px);
    background-size: 48px 48px;
}

body.theme-ramadan .hero-eyebrow {
    color: var(--accent);
}

/* Aid */
body.theme-aid .section-badge {
    color: var(--accent);
}

body.theme-aid .btn-primary {
    box-shadow: 0 4px 24px color-mix(in srgb, var(--primary) 35%, transparent);
}

/* Fête du Trône / Indépendance */
body.theme-throne .logo-mark,
body.theme-independence .logo-mark {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

body.theme-throne .hero-title em,
body.theme-independence .hero-title em {
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
}

/* Nouvel An */
body.theme-newyear .metric-item strong {
    background: linear-gradient(90deg, var(--accent), #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
}

body.theme-newyear .page-wrap::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    pointer-events: none;
    z-index: 9990;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    opacity: 0.85;
}

/* Classique — couleurs admin */
body.theme-default .hero-title em,
body[class*="theme-"] .hero-title em {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
}

body.theme-aid_adha .btn-primary {
    box-shadow: 0 4px 24px color-mix(in srgb, var(--primary) 35%, transparent);
}

body.theme-summer .hero-eyebrow {
    color: var(--accent);
}

body.theme-summer .page-wrap::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background: radial-gradient(circle at 90% 10%, #fbbf24 0%, transparent 40%);
}

.page-wrap {
    position: relative;
    z-index: 1;
}

.theme-preview-bar {
    background: linear-gradient(90deg, #635bff, #4f46e5);
    color: #fff;
    font-size: 0.8125rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.theme-preview-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    text-align: center;
}

.theme-preview-bar-exit {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.theme-preview-bar-exit:hover {
    color: #e0e7ff;
}
