/*
  Broadcaster Assistant – Dark UI (pure CSS)
  - Sans JS, sans bascule de thème : dark par défaut
  - Verre dépoli + micro-animations modernes
  - Accessibilité : contrastes OK, focus visibles
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* Palette */
    --bg: #0b0f14;
    --bg2: #0d1218;
    --surface: #0f151c;
    --card: #121a23;
    --border: rgba(255, 255, 255, .08);
    --elev: rgba(0, 0, 0, .24);
    --shadow: rgba(0, 0, 0, .45);

    --txt: #e6edf3;
    --muted: #9fb0c0;
    --line: #2a3440;

    --primary: #9147ff;
    /* Twitch-like */
    --accent: #ff6a3d;
    --ok: #2ecc71;
    --warn: #f1c40f;

    /* Rayons et vitesses */
    --r: 14px;
    --r2: 22px;
    --fast: 180ms;
    --norm: 260ms;
    --slow: 500ms;

    /* Typo */
    --h1: clamp(2rem, 2vw + 2rem, 3.5rem);
    --h2: clamp(1.5rem, 1.2vw + 1.2rem, 2.3rem);
    --h3: clamp(1.1rem, .6vw + 1rem, 1.4rem);
    --body: 1rem;
    --small: .92rem;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    color: var(--txt);
    background: radial-gradient(1200px 900px at 20% 0%, #111827 0%, var(--bg) 55%) fixed,
        radial-gradient(800px 600px at 80% 100%, #0f172a 10%, var(--bg2) 60%) fixed,
        var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* --------- Disposition globale --------- */

section {
    padding: clamp(56px, 8vw, 96px) 20px;
    text-align: center;
}

.container {
    width: min(1200px, 100%);
    margin-inline: auto;
}

/* --------- Header / Navigation --------- */

header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    padding: 10px 20px;
    background: color-mix(in oklab, transparent 60%, #0c1117);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
    border-bottom: 1px solid var(--border);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: clamp(8px, 3vw, 24px);
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

nav li {
    align-self: center;
}

nav a {
    color: var(--txt);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 500;
    position: relative;
    transition: transform var(--fast) ease;
    outline: none;
}

nav a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--norm) ease;
    border-radius: 2px;
}

nav a:hover {
    transform: translateY(-1px);
}

nav a:hover::after {
    transform: scaleX(1);
}

nav .button {
    margin: 0;
    padding: 0;
}

/* --------- Fond animé (existant) --------- */

#background {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(45deg, #7c4dff, #5d2cff, #ff4d8d, #ff6a3d);
    background-size: 400% 400%;
    animation: gradientAnimation 18s ease infinite;
    filter: blur(42px) saturate(120%) brightness(.8);
    opacity: .35;
    overflow: hidden;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --------- HERO --------- */

.hero-section {
    min-height: 88vh;
    display: grid;
    place-items: center;
    padding-top: 84px;
    /* header offset */
    background: radial-gradient(600px 380px at 50% 30%, rgba(145, 71, 255, .15), transparent 60%),
        radial-gradient(880px 520px at 50% 70%, rgba(255, 106, 61, .08), transparent 70%);
    height: -webkit-fill-available;
}

#content {
    text-align: center;
    z-index: 1;
}

.hero-content h1 {
    font-size: var(--h1);
    line-height: 1.1;
    margin: 10px 0 14px;
    letter-spacing: .2px;
    background: linear-gradient(90deg, #fff, #d6e2f0 35%, #b6c6d8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fadeUp var(--slow) both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(145, 71, 255, .12);
    border: 1px solid var(--border);
    font-size: .9rem;
    color: #d9cbff;
    animation: fadeUp var(--slow) .05s both;
}

.hero-content p {
    font-size: clamp(1rem, .6vw + 1rem, 1.25rem);
    color: var(--muted);
    margin: 12px auto 6px;
    max-width: 820px;
    animation: fadeUp var(--slow) .1s both;
}

.small {
    font-size: var(--small);
    color: var(--muted);
}

.logo-float {
    animation: bob 4.5s ease-in-out infinite;
    will-change: transform;
}

@keyframes bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* --------- Boutons --------- */

.button,
button {
    --g: linear-gradient(90deg, var(--primary), var(--accent));
    padding: 10px 18px;
    border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent);
    border-radius: 999px;
    background: color-mix(in oklab, var(--card) 65%, transparent);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 24px -12px var(--shadow);
    transition: transform var(--fast) ease, box-shadow var(--fast) ease, border-color var(--fast) ease, background var(--fast) ease;
    margin: 12px;
}

.button:hover,
button:hover {
    transform: translateY(-2px);
    border-color: color-mix(in oklab, var(--accent) 45%, transparent);
    box-shadow: 0 16px 36px -16px var(--shadow);
    background: linear-gradient(0deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0)) border-box, color-mix(in oklab, var(--card) 70%, transparent);
}

.button:focus-visible,
button:focus-visible {
    outline: 3px solid color-mix(in oklab, var(--primary) 40%, transparent);
    outline-offset: 2px;
}

.button a {
    color: inherit;
    text-decoration: none;
}

/* Variante pleine (CTA fort) */
.button--primary {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-color: transparent;
}

.button--primary:hover {
    filter: brightness(1.05);
}

/* --------- Cartes / Features --------- */

.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 18px;
    width: min(1200px, 100%);
    margin: 0 auto;
}

.feature,
.card {
    background: color-mix(in oklab, var(--card) 76%, transparent);
    border: 1px solid var(--border);
    border-radius: var(--r2);
    padding: 20px;
    text-align: left;
    box-shadow: 0 12px 28px -18px var(--shadow);
    transition: transform var(--norm) ease, box-shadow var(--norm) ease, border-color var(--norm) ease;
    backdrop-filter: blur(4px);
}

.feature:hover,
.card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in oklab, var(--primary) 28%, var(--border));
    box-shadow: 0 22px 44px -20px var(--shadow);
}

.feature h3 {
    margin: 0 0 10px;
    font-size: var(--h3);
}

.feature p {
    margin: 0;
    color: var(--muted);
}

/* Animation d’entrée séquencée */
#outils .card,
#pourquoi .feature {
    opacity: 0;
    animation: fadeUp .7s ease both;
}

#pourquoi .feature:nth-child(1) {
    animation-delay: .05s;
}

#pourquoi .feature:nth-child(2) {
    animation-delay: .12s;
}

#pourquoi .feature:nth-child(3) {
    animation-delay: .19s;
}

#outils .card:nth-child(1) {
    animation-delay: .05s;
}

#outils .card:nth-child(2) {
    animation-delay: .10s;
}

#outils .card:nth-child(3) {
    animation-delay: .15s;
}

#outils .card:nth-child(4) {
    animation-delay: .20s;
}

#outils .card:nth-child(5) {
    animation-delay: .25s;
}

#outils .card:nth-child(6) {
    animation-delay: .30s;
}

#outils .card:nth-child(7) {
    animation-delay: .35s;
}

#outils .card:nth-child(8) {
    animation-delay: .40s;
}

#outils .card:nth-child(9) {
    animation-delay: .45s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------- Sections spécifiques --------- */

section h2 {
    font-size: var(--h2);
    margin: 0 0 14px;
}

#pourquoi p {
    color: var(--muted);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.stat {
    background: color-mix(in oklab, var(--card) 74%, transparent);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px;
}

.stat .num {
    font-weight: 700;
    font-size: clamp(1.4rem, .6vw + 1.2rem, 1.8rem);
    display: block;
}

.stat .label {
    color: var(--muted);
    font-size: .95rem;
}

.integrations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.badge {
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--card) 70%, transparent);
    color: var(--txt);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 500;
}

.testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.quote {
    background: color-mix(in oklab, var(--card) 76%, transparent);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px;
    color: var(--muted);
}

.quote b {
    color: var(--txt);
}

/* --------- Footer --------- */

footer {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .02) 20%), var(--surface);
    color: var(--muted);
    padding: 24px;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* --------- Utilitaires hérités --------- */

.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* Nettoyage des styles “anciens” pour le dark */

nav a {
    color: #fff;
}

.feature {
    background: color-mix(in oklab, var(--card) 76%, transparent);
}

.feature .button {
    margin-top: 18px;
}

/* Accessibilité : mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}

#h-pourquoi {
    margin-top: 100px;
}