/*
 * EdTurbo — identité commune à toute l'application (accueil, connexion, espace connecté) :
 * couleurs, logo, barre du haut, bascule de thème, boutons.
 * Chargée avant landing.css ou app.css. Les slides produites ont leur propre thème (public/deck/theme.css).
 */

/*
 * Thèmes : clé localStorage « edturbo-theme », appliquée par _theme_init.html.twig, bascule dans js/app.js.
 * Sans choix, la page suit le système ; data-theme="light" ou "dark" l'emporte.
 * Les deux blocs sombres doivent rester identiques.
 */
:root {
    --lp-bg: #fff8f2;
    --lp-bg-2: #fff0e5;
    --lp-surface: #ffffff;
    --lp-card-bg: #ffffff;
    --lp-top-bg: rgba(255, 248, 242, .82);
    --lp-line: #f1d6c6;
    --lp-text: #230d05;
    --lp-muted: #7a5445;
    --lp-code: #4a2a1d;
    --lp-dot-off: #f1d6c6;
    --lp-accent-text: #b45309;
    --lp-orange-text: #c2410c;
    --lp-streak-head: #ff5a1f;
    --lp-shadow: 0 24px 50px -24px rgba(120, 40, 10, .28);
    --lp-slide-bg: linear-gradient(160deg, #ffffff, #fff1e6);
    --lp-hot: linear-gradient(95deg, #e98300 0%, #f26a0c 35%, #e8401a 70%, #d10f2e 100%);
    --lp-input-bg: #fffaf6;
    --lp-danger: #c21a2e;
    --lp-danger-soft: #fde7e9;
    --lp-ok: #177a4c;
    --lp-ok-soft: #e2f5ea;
    --lp-surface-2: #fff3ea;
    --lp-accent-strong: #9a3412;
    --lp-accent-soft: #ffedd5;
    --lp-warn: #a45f0a;
    --lp-warn-soft: #fcf0de;
    --lp-shadow-sm: 0 1px 2px rgba(80, 30, 10, .06), 0 8px 24px rgba(80, 30, 10, .07);
    --lp-orange: #ff8a00;
    --lp-amber: #ffc233;
    --lp-red: #ff2d2d;
    --lp-glow: 0 0 40px rgba(255, 90, 20, .3);
    --lp-title: "Exo", "Segoe UI", system-ui, sans-serif;
    --lp-mono: "JetBrains Mono", Consolas, monospace;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --lp-bg: #0c0605;
        --lp-bg-2: #150a07;
        --lp-surface: #1c0f0b;
        --lp-card-bg: rgba(28, 15, 11, .75);
        --lp-top-bg: rgba(12, 6, 5, .72);
        --lp-line: #3a1f16;
        --lp-text: #fff4ec;
        --lp-muted: #c9a99a;
        --lp-code: #e8d3c8;
        --lp-dot-off: #3d2219;
        --lp-accent-text: #ffc233;
        --lp-orange-text: #ff8a00;
        --lp-streak-head: #ffffff;
        --lp-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
        --lp-slide-bg: linear-gradient(160deg, #22110b, #120806);
        --lp-hot: linear-gradient(95deg, #ffc233 0%, #ff8a00 38%, #ff3b1f 72%, #e0102e 100%);
        --lp-glow: 0 0 40px rgba(255, 90, 20, .35);
        --lp-input-bg: #120806;
        --lp-danger: #ff7b88;
        --lp-danger-soft: #3c1419;
        --lp-ok: #4fd29b;
        --lp-ok-soft: #0f3326;
        --lp-surface-2: #26140e;
        --lp-accent-strong: #ffb366;
        --lp-accent-soft: #3a1a0c;
        --lp-warn: #f0b060;
        --lp-warn-soft: #3a2a12;
        --lp-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --lp-bg: #0c0605;
    --lp-bg-2: #150a07;
    --lp-surface: #1c0f0b;
    --lp-card-bg: rgba(28, 15, 11, .75);
    --lp-top-bg: rgba(12, 6, 5, .72);
    --lp-line: #3a1f16;
    --lp-text: #fff4ec;
    --lp-muted: #c9a99a;
    --lp-code: #e8d3c8;
    --lp-dot-off: #3d2219;
    --lp-accent-text: #ffc233;
    --lp-orange-text: #ff8a00;
    --lp-streak-head: #ffffff;
    --lp-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
    --lp-slide-bg: linear-gradient(160deg, #22110b, #120806);
    --lp-hot: linear-gradient(95deg, #ffc233 0%, #ff8a00 38%, #ff3b1f 72%, #e0102e 100%);
    --lp-glow: 0 0 40px rgba(255, 90, 20, .35);
    --lp-input-bg: #120806;
    --lp-danger: #ff7b88;
    --lp-danger-soft: #3c1419;
    --lp-ok: #4fd29b;
    --lp-ok-soft: #0f3326;
    --lp-surface-2: #26140e;
    --lp-accent-strong: #ffb366;
    --lp-accent-soft: #3a1a0c;
    --lp-warn: #f0b060;
    --lp-warn-soft: #3a2a12;
    --lp-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
}

body { transition: background-color .3s ease, color .3s ease; }

.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.lp-hot {
    background: var(--lp-hot);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}

/* ---------- Barre du haut ---------- */
.lp-top {
    position: sticky; top: 0; z-index: 20;
    background: var(--lp-top-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 138, 0, .15);
}
.lp-top-inner { height: 64px; display: flex; align-items: center; gap: 32px; }
.lp-brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--lp-title); font-weight: 800; font-size: 21px;
    text-decoration: none; letter-spacing: -.01em;
}
.lp-brand b { background: var(--lp-hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-brand-mark {
    width: 32px; height: 32px; border-radius: 9px;
    display: grid; place-items: center; font-size: 17px;
    background: var(--lp-hot); box-shadow: var(--lp-glow);
    transform: skewX(-8deg);
}
.lp-top-nav { display: flex; gap: 24px; }
.lp-top-nav a, .lp-link { color: var(--lp-muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.lp-top-nav a:hover, .lp-link:hover { color: var(--lp-text); }
.lp-top-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }

/* Bascule clair / sombre (l'icône montre le thème vers lequel on bascule) */
.lp-top .theme-toggle {
    width: 38px; height: 38px; padding: 0;
    display: inline-grid; place-items: center;
    border-radius: 10px; cursor: pointer;
    border: 1px solid rgba(255, 138, 0, .45);
    background: transparent; color: var(--lp-text);
    transition: background-color .15s ease, transform .15s ease;
}
.lp-top .theme-toggle:hover { background: rgba(255, 138, 0, .12); transform: rotate(-12deg); }
.lp-top .theme-toggle:focus-visible { outline: 3px solid var(--lp-amber); outline-offset: 2px; }
.lp-top .theme-toggle svg { width: 18px; height: 18px; }
.lp-top .theme-toggle .icon-sun { display: none; }
:root[data-theme-current="dark"] .lp-top .theme-toggle .icon-sun { display: block; }
:root[data-theme-current="dark"] .lp-top .theme-toggle .icon-moon { display: none; }

/* ---------- Boutons ---------- */
.lp-btn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 15px 28px; border-radius: 12px;
    font-family: var(--lp-title); font-weight: 800; font-size: 17px; font-style: italic;
    color: #1a0600; text-decoration: none;
    background: var(--lp-hot);
    box-shadow: 0 10px 30px -8px rgba(255, 60, 20, .6);
    transition: transform .15s ease, box-shadow .15s ease;
}
.lp-btn span { transition: transform .15s ease; }
.lp-btn::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-20deg);
}
.lp-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 38px -8px rgba(255, 60, 20, .8); color: #1a0600; }
.lp-btn:hover span { transform: translateX(5px); }
.lp-btn:hover::after { animation: lp-shine .6s ease; }
.lp-btn:focus-visible { outline: 3px solid var(--lp-amber); outline-offset: 3px; }
.lp-btn-block { width: 100%; justify-content: center; border: 0; cursor: pointer; }
.lp-btn-sm { padding: 9px 18px; font-size: 15px; border-radius: 10px; }
.lp-btn-ghost {
    background: transparent; color: var(--lp-text);
    border: 1px solid rgba(255, 138, 0, .45); box-shadow: none;
}
.lp-btn-ghost:hover { color: var(--lp-text); background: rgba(255, 138, 0, .1); box-shadow: none; }

@keyframes lp-shine { to { left: 130%; } }

@media (max-width: 520px) {
    .lp-wrap { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
    body, .lp-btn, .lp-btn span, .lp-top .theme-toggle { transition: none; }
    .lp-btn:hover::after { animation: none; }
}
