/* /public_html/assets/css/theme.css */

/* ========== THÈME PAR DÉFAUT (SOMBRE) ========== */
/* Appliqué quand html n'a pas data-theme="light" */

:root {
    /* Surfaces & fond */
    --color-bg: #020617;              /* Fond global */
    --color-surface: #020617;
    --color-surface-soft: #0b1220;    /* Cartes */
    --color-surface-soft-alt: #111827;
    --color-surface-elevated: #020617;

    /* Texte */
    --color-text: #f9fafb;
    --color-text-muted: #9ca3af;

    /* Bordures */
    --color-border-subtle: rgba(148, 163, 184, 0.35);

    /* Accent “danse” */
    --color-accent: #e11d48;
    --color-accent-soft: rgba(225, 29, 72, 0.2);

    /* Palette “primary” (utilisée pour certains composants) */
    --color-primary: #6366f1;
    --color-primary-soft: rgba(99, 102, 241, 0.2);

    /* États */
    --color-success: #22c55e;
    --color-warning: #eab308;
    --color-danger: #ef4444;

    /* Header */
    --color-header-brand: #f9fafb;
}

/* ========== THÈME CLAIR ========== */

html[data-theme="light"] {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-soft: #f3f4f6;
    --color-surface-soft-alt: #e5e7eb;
    --color-surface-elevated: #ffffff;

    --color-text: #020617;
    --color-text-muted: #6b7280;

    --color-border-subtle: rgba(148, 163, 184, 0.4);

    --color-accent: #e11d48;
    --color-accent-soft: rgba(225, 29, 72, 0.12);

    /* même primary que le fallback déjà utilisé ailleurs */
    --color-primary: #6366f1;
    --color-primary-soft: rgba(99, 102, 241, 0.18);

    --color-header-brand: #111827;
}


/* ========== MODE AUTO (suit le thème système) ========== */
/* On suit prefers-color-scheme uniquement si html n'a PAS de data-theme explicit (light/dark)
   OU si data-theme="auto". */

@media (prefers-color-scheme: light) {
    html:not([data-theme]),
    html[data-theme="auto"] {
        --color-bg: #f8fafc;
        --color-surface: #ffffff;
        --color-surface-soft: #f3f4f6;
        --color-surface-soft-alt: #e5e7eb;
        --color-surface-elevated: #ffffff;

        --color-text: #020617;
        --color-text-muted: #6b7280;

        --color-border-subtle: rgba(148, 163, 184, 0.4);

        --color-accent: #e11d48;
        --color-accent-soft: rgba(225, 29, 72, 0.12);

        --color-primary: #6366f1;
        --color-primary-soft: rgba(99, 102, 241, 0.18);

        --color-header-brand: #111827;
    }
}

/* Le body utilise déjà ces variables dans base.css
   => pas besoin de le redéfinir ici, on laisse base.css faire le job */

/* ========== BOUTONS ========== */

.btn-primary {
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.55rem 1.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, var(--color-accent), #fb7185);
    color: #fdf2f8;
    box-shadow: var(--shadow-subtle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition:
        transform 0.1s ease,
        box-shadow 0.1s ease,
        filter 0.1s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.btn-ghost {
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border-subtle);
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.btn-ghost:hover {
    background-color: var(--color-surface-soft);
    color: var(--color-text);
}

/* ========== SECTIONS GLOBALES ========== */

.section {
    margin-top: var(--space-6);
}

.section-header {
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: 1.2rem;
    margin: 0 0 var(--space-1);
}

.section-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}