@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Clash+Display:wght@500;600&display=swap');

/* ===============================
    TYPOGRAPHIE
   =============================== */

/* ===============================
   BASE GÉNÉRALE & PALETTE
   =============================== */

:root {
    --font-body: "Sora", "Plus Jakarta Sans", "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Clash Display", "Sora", "Plus Jakarta Sans", system-ui, sans-serif;

    --bg-body: #e8efff;
    --bg-card: #ffffff;
    --bg-soft: rgba(200, 215, 255, 0.6);

    --accent-main: #4a78f5;
    --accent-neuro: #6358e8;
    --accent-mind: #f5b0d8;
    --accent-warm: #f5a860;
    --accent-link: #5a6fd6;

    --text-main: #1e2a4a;
    --text-soft: #3a4a72;
    --text-muted: #6978a0;

    --border-soft: rgba(120, 140, 200, 0.24);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-pill: 999px;
    --shadow-soft: 0 28px 70px rgba(20, 40, 90, 0.10);
    --shadow-card: 0 20px 50px rgba(20, 40, 70, 0.06);
    --shadow-hover: 0 24px 60px rgba(70, 110, 240, 0.14);

    --focus-ring: 0 0 0 3px rgba(90, 130, 255, 0.28)

    --bgShiftX: 0;
    --bgShiftY: 0;
    --bgHue: 0deg;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-main);
    line-height: 1.65;
    background:
        radial-gradient(circle at 15% 20%, #d5e2ff 0, transparent 55%),
        radial-gradient(circle at 80% 15%, #eed8ff 0, transparent 55%),
        radial-gradient(circle at 78% 80%, #d0e0ff 0, transparent 55%),
        #e8efff;
    background-size: 140% 140%, 140% 140%, 140% 140%, auto;
    background-position: calc(15% + var(--bgShiftX, 0) * 1%) calc(20% + var(--bgShiftY, 0) * 1%),
        calc(80% - var(--bgShiftX, 0) * 0.6%) calc(15% - var(--bgShiftY, 0) * 0.4%),
        calc(78% + var(--bgShiftX, 0) * 0.3%) calc(78% + var(--bgShiftY, 0) * 0.4%),
        center;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.page-title,
.logo-title,
.page-header h1,
.page-header h2 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.logo-subtitle,
.section-subtitle,
.page-subtitle,
.nav-link,
.exercise-link,
body {
    font-family: var(--font-body);
}

body::before {
    content: "";
    position: fixed;
    inset: -12% -6% auto -6%;
    height: 70vh;
    background: radial-gradient(circle at 40% 40%, rgba(117, 135, 255, 0.16), transparent 55%),
        radial-gradient(circle at 70% 30%, rgba(255, 206, 231, 0.16), transparent 60%);
    filter: hue-rotate(var(--bgHue, 0deg));
    transform: translate3d(calc(var(--bgShiftX, 0) * 0.6%), calc(var(--bgShiftY, 0) * 0.6%), 0);
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
}

/* ===============================
   ACCESSIBILITÉ — PREFERS REDUCED MOTION
   =============================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }

    body {
        background-attachment: scroll;
    }
}

/* ===============================
   LAYOUT GLOBAL
   =============================== */

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 92px;
}

.section {
    padding: 3.5rem 1.5rem;
}

.section-accent {
    background: radial-gradient(circle at 0 0, #e1e7ff 0, transparent 60%), #f5f1ff;
}

.section-header {
    max-width: 960px;
    margin: 0 auto 2.5rem;
    text-align: left;
}

.section-title {
    margin: 0 0 0.5rem;
    font-size: 1.9rem;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 0;
    color: var(--text-soft);
    max-width: 620px;
}

/* ===============================
   HEADER & NAV
   =============================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    width: 100%;
    isolation: isolate;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(
        to bottom,
        rgba(242, 236, 255, 0.78) 0%,
        rgba(242, 236, 255, 0.56) 40%,
        rgba(242, 236, 255, 0.0) 100%
    );
    border-bottom: none;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.04);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -18px;
    height: 44px;
    background: radial-gradient(ellipse at 50% 0%, rgba(242, 236, 255, 0.58) 0%, rgba(242, 236, 255, 0.0) 72%);
    pointer-events: none;
    filter: blur(12px);
    opacity: 1;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-dot {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #fff 0, #ffd8f0 40%, #6c63ff 100%);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-main);
}

.logo-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-soft);
    border: 1px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.nav-link:hover {
    background: rgba(243, 244, 255, 0.9);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--text-main);
    transform: translateY(-1px);
}

.nav-link--active {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.7);
    color: var(--accent-neuro);
    font-weight: 600;
}

.nav-link.is-active {
    background: var(--accent-main);
    border-color: var(--accent-main);
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 141, 255, 0.35);
    font-weight: 600;
}

.nav-link--pill {
    background: var(--accent-main);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(76, 141, 255, 0.4);
}

.nav-link--pill:hover {
    background: #3a7af0;
    color: #fff;
}

/* ===============================
   HERO
   =============================== */

.hero {
    padding-top: 2.8rem;
    padding-bottom: 2.8rem;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.badge-line {
    margin-bottom: 0.8rem;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(200, 208, 255, 0.9);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--text-soft);
}

.hero-title {
    margin: 0 0 0.6rem;
    font-size: 2.15rem;
    letter-spacing: -0.04em;
}

.hero-highlight {
    color: var(--accent-main);
}

.hero-lead {
    margin: 0 0 1.1rem;
    color: var(--text-soft);
    max-width: 560px;
    font-size: 0.98rem;
}

.chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.3rem;
}

.chip {
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 0.75rem;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.9);
}

.chip--neutral {
    opacity: 0.9;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}

.hero-hint {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* ===============================
   BOUTONS
   =============================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: var(--radius-pill);
    padding: 0.6rem 1.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
    white-space: nowrap;
}

.btn:focus-visible,
.nav-link:focus-visible,
.footer-link:focus-visible,
.article-link:focus-visible,
.exercise-card:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.btn-primary {
    background: linear-gradient(140deg, var(--accent-main), var(--accent-neuro));
    color: #fff;
    box-shadow: 0 12px 32px rgba(74, 120, 245, 0.38);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(74, 120, 245, 0.48);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-soft);
    border-color: rgba(140, 155, 190, 0.45);
}

.btn-ghost:hover {
    background: #fff;
    border-color: var(--accent-main);
    color: var(--accent-main);
}

.btn-disabled {
    background: rgba(148, 163, 184, 0.2);
    color: rgba(15, 23, 42, 0.4);
    border-color: transparent;
    cursor: not-allowed;
}

/* ===============================
   HERO VISUEL
   =============================== */

.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    overflow: visible;
}

.hero-blob {
    position: absolute;
    inset: -10% -15%;
    border-radius: 999px;
    background:
        radial-gradient(circle at 25% 20%, #ffffff 0, #ffe9ff 40%, transparent 70%),
        radial-gradient(circle at 75% 80%, #d9e3ff 0, transparent 65%);
    box-shadow: var(--shadow-soft);
    opacity: 0.92;
    z-index: 0;
    filter: blur(18px);
}

.hero-brain {
    position: relative;
    width: 220px;
    max-width: 70%;
    border-radius: 40%;
    z-index: 1;
}

.hero-caption {
    position: relative;
    z-index: 1;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 260px;
}
.modal-overlay.unified {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1.2rem;
}

.modal-overlay.unified.active {
    display: flex;
}

.modal-shell {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 440px;
    width: min(440px, 100%);
    padding: 1.4rem 1.25rem 1.1rem;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.65rem;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-soft);
}

.modal-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.75rem;
    border-radius: var(--radius-pill);
    background: rgba(75, 122, 255, 0.12);
    color: var(--accent-main);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.modal-shell h3 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
}

.modal-section {
    margin: 0 0 0.35rem;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.modal-meta {
    margin: 0.4rem 0 0.9rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.modal-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.modal-overlay.unified .btn-ghost {
    border-color: rgba(122, 140, 200, 0.4);
    color: var(--accent-main);
}

.include-fallback {
    padding: 1rem;
    background: #fff8f0;
    border: 1px solid rgba(255, 176, 107, 0.6);
    border-radius: var(--radius-md);
    color: #a04900;
}

.exercise-intro {
    margin-bottom: 1.2rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-card);
    padding: 1rem 1.1rem;
}

.intro-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
}

.intro-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.intro-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.intro-text {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.intro-steps {
    margin: 0;
    padding-left: 1rem;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.intro-link {
    color: var(--accent-main);
    text-decoration: none;
    font-weight: 600;
}

.intro-link:hover,
.intro-link:focus-visible {
    text-decoration: underline;
}

/* ===============================
   GRIDS & CARTES
   =============================== */

.grid {
    display: grid;
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.1rem 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.info-card--soft {
    background: rgba(255, 255, 255, 0.98);
}

.info-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    background: rgba(197, 206, 255, 0.32);
    font-size: 0.76rem;
    color: var(--accent-neuro);
    margin-bottom: 0.4rem;
}

.info-title {
    margin: 0 0 0.3rem;
    font-size: 1rem;
}

.info-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-soft);
}

/* Exercices cliquables */

.exercises-grid {
    align-items: stretch;
}

.exercise-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.2rem 1.2rem 1.1rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(235, 241, 255, 0.94));
    border: 1px solid rgba(120, 140, 200, 0.24);
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
    cursor: pointer;
}

.exercise-card::after {
    content: "";
    position: absolute;
    inset: 4% -18% -36% -18%;
    background: radial-gradient(circle at 50% 0, rgba(99, 119, 255, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.exercise-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 60px rgba(20, 40, 90, 0.12);
    border-color: rgba(90, 130, 240, 0.45);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(236, 242, 255, 0.96));
}

.exercise-card:hover::after {
    opacity: 1;
}

.exercise-tag {
    align-self: flex-start;
    padding: 0.16rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
}

.exercise-tag--neuro {
    background: linear-gradient(135deg, var(--accent-neuro), #4c8dff);
}

.exercise-tag--mix {
    background: linear-gradient(135deg, #4c8dff, #5ed0ff);
}

.exercise-tag--mind {
    background: linear-gradient(135deg, var(--accent-mind), #ffbde6);
}

.exercise-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.exercise-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.exercise-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0.3rem 0 0;
    padding: 0.44rem 0.88rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(130deg, #5a7bff, #6f8cff 45%, #8bb8ff 100%);
    box-shadow: 0 10px 24px rgba(90, 123, 255, 0.22), 0 1px 0 rgba(255, 255, 255, 0.22) inset;
    border: 1px solid rgba(255, 255, 255, 0.22);
    text-decoration: none;
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.exercise-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(90, 123, 255, 0.32), 0 1px 0 rgba(255, 255, 255, 0.28) inset;
    filter: saturate(1.04);
}

.exercise-link:focus-visible {
    outline: 2px solid rgba(90, 123, 255, 0.35);
    outline-offset: 3px;
}

/* ===============================
   FOOTER
   =============================== */

.site-footer {
    margin-top: auto;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding: 2.2rem 1.5rem 1.5rem;
    background: rgba(246, 243, 255, 0.95);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto 1.8rem;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1.8rem;
}

.footer-logo .logo-dot {
    box-shadow: none;
}

.footer-title {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
}

.footer-text {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.footer-link {
    font-size: 0.85rem;
    color: var(--text-soft);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--accent-neuro);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.newsletter-input {
    border-radius: var(--radius-pill);
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    font-size: 0.86rem;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 0.9rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.4);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-bottom-note {
    opacity: 0.9;
}

/* ===============================
   LIENS & LISIBILITÉ
   =============================== */

a {
    color: var(--accent-link);
    text-decoration-color: rgba(90, 111, 214, 0.35);
    text-underline-offset: 2px;
    transition: color 0.12s ease, text-decoration-color 0.12s ease;
}

a:hover {
    color: var(--accent-main);
    text-decoration-color: var(--accent-main);
}

.page-card p,
.page-main p,
.exercise-detail-body p {
    max-width: 68ch;
}

/* ===============================
   PAGES INTERNES
   =============================== */

.page-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 1.8rem;
}

.page-kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.page-title {
    margin: 0 0 0.3rem;
    font-size: 1.8rem;
    letter-spacing: -0.03em;
}

.page-subtitle {
    margin: 0;
    color: var(--text-soft);
    max-width: 620px;
    font-size: 0.95rem;
}

.page-layout {
    display: grid;
    gap: 1.8rem;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
}

.page-main {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.page-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 1rem 1.2rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.page-card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.page-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.page-aside {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* Articles list */

.articles-list {
    display: grid;
    gap: 0.75rem;
}

.article-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.35);
    text-decoration: none;
    color: var(--text-main);
    transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease;
}

.article-link:hover {
    transform: translateY(-1px);
    border-color: var(--accent-link);
    box-shadow: var(--shadow-hover);
}

.article-link-title {
    font-size: 0.96rem;
    font-weight: 600;
}

.article-link-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-visual {
        order: -1;
    }

    .footer-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .page-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .section {
        padding-inline: 1.1rem;
    }

    .site-footer {
        padding-inline: 1.1rem;
    }

    .footer-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===============================
   ANIMATION FOND DOUX
   =============================== */

@keyframes softFloat {
    0% {
        background-position: 15% 20%, 80% 15%, 80% 80%, center;
    }
    50% {
        background-position: 13% 22%, 82% 13%, 78% 82%, center;
    }
    100% {
        background-position: 16% 18%, 79% 17%, 82% 79%, center;
    }
}

/* ===============================
   DÉTAIL D'EXERCICE (PLEINE CONSCIENCE) – POPUP COLORÉE
   =============================== */

.exercise-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 40;
}

.exercise-detail-overlay--visible {
    display: flex;
}

.exercise-detail {
    width: 100%;
    max-width: 720px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 0 0, rgba(225, 231, 255, 0.9) 0, transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(255, 209, 241, 0.85) 0, transparent 60%),
        #ffffff;
    border: 1px solid rgba(76, 141, 255, 0.6);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45);
    padding: 1.5rem 1.6rem 1.3rem;
    color: var(--text-main);
}

.exercise-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.7rem;
    flex-wrap: wrap;
}

.exercise-detail-title {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.exercise-detail-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.exercise-detail-close {
    border: none;
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.exercise-detail-close:hover {
    color: var(--accent-neuro);
    border-color: var(--accent-neuro);
    background: #ffffff;
}

.exercise-detail-body p {
    margin: 0 0 0.55rem;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.exercise-detail-footer {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.exercise-detail-footer .btn-link {
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--accent-neuro);
    font-weight: 500;
}

.exercise-detail-footer .btn-link:hover {
    text-decoration: underline;
}
.article-hero {
    display: block;
    max-width: 260px;
    margin: 0 auto 1.5rem;
    border-radius: 24px;
}
/* === NeuroEasy: fond animé + bulles (calme, sans motion sickness) === */

/* 1) Fond vivant très doux */
body {
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(60% 60% at 25% 30%, rgba(108, 99, 255, 0.22), transparent 60%),
              radial-gradient(55% 55% at 75% 40%, rgba(76, 141, 255, 0.18), transparent 62%),
              radial-gradient(50% 50% at 55% 78%, rgba(255, 122, 200, 0.10), transparent 60%);
  filter: blur(40px);
  transform: translate3d(0,0,0);
  animation: ne-bg-drift 18s ease-in-out infinite;
}

body::after {
  z-index: -3;
  opacity: 0.75;
  filter: blur(70px);
  animation-duration: 26s;
}

@keyframes ne-bg-drift {
  0%, 100% { transform: translate3d(-1.5%, -1%, 0) scale(1.02); }
  50%      { transform: translate3d( 1.5%,  1%, 0) scale(1.05); }
}

/* 2) Bulles/blobs dans le hero (si tu as <div class="hero-blob"></div>) */
.hero-visual {
  position: relative;
  overflow: visible; /* important : évite que la bulle disparaisse */
}

.hero-blob {
  position: absolute;
  inset: -18% -22% -22% -22%;
  z-index: 0;
  border-radius: 999px;
  background:
    radial-gradient(50% 50% at 30% 35%, rgba(108, 99, 255, 0.38), transparent 60%),
    radial-gradient(45% 45% at 70% 40%, rgba(76, 141, 255, 0.28), transparent 62%),
    radial-gradient(45% 45% at 50% 75%, rgba(255, 122, 200, 0.14), transparent 62%);
  filter: blur(34px);
  opacity: 0.9;
  transform: translate3d(0,0,0);
  animation: ne-blob-float 12s ease-in-out infinite;
}

@keyframes ne-blob-float {
  0%, 100% { transform: translate3d(-8px, 6px, 0) scale(1.00); }
  50%      { transform: translate3d( 8px,-6px, 0) scale(1.04); }
}

/* 3) Assure que la mascotte et le texte passent au-dessus */
.hero-brain {
  position: relative;
  z-index: 2;
}

.hero-caption {
  position: relative;
  z-index: 3;
}

/* 4) Accessibilité: si l’utilisateur réduit les animations */
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .hero-blob {
    animation: none !important;
  }
}

/* ===================================================================
     NEUROEASY GUIDE MODAL — Exercices en bulles (glass doux)
     =================================================================== */

.ne-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ne-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ne-modal {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.18),
        0 8px 32px rgba(76, 141, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(16px) scale(0.96);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    overflow: hidden;
}

.ne-modal-overlay.active .ne-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ne-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.ne-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.ne-modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0.3rem 0 0;
}

.ne-modal-close {
    background: rgba(148, 163, 184, 0.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.ne-modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.ne-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    scroll-behavior: smooth;
    max-height: 100%;
}

.ne-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(248, 250, 252, 0.6);
}

.ne-modal-progress {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.ne-modal-extras {
    padding: 0 1.5rem 1.25rem;
    text-align: center;
}

.ne-modal-article-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #5a7bff, #7f9dff);
    box-shadow: 0 12px 30px rgba(90, 123, 255, 0.28);
    text-decoration: none;
    opacity: 1;
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.ne-modal-article-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(90, 123, 255, 0.34);
    filter: saturate(1.03);
}

/* --- Buttons --- */

.ne-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, opacity 0.2s;
}

.ne-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ne-btn--primary {
    background: var(--accent-main);
    color: #fff;
    box-shadow: 0 4px 14px rgba(76, 141, 255, 0.3);
}

.ne-btn--primary:hover:not(:disabled) {
    background: var(--accent-main-dark, #3b7de0);
    transform: translateY(-1px);
}

.ne-btn--secondary {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-base);
}

.ne-btn--secondary:hover:not(:disabled) {
    background: rgba(148, 163, 184, 0.25);
}

/* --- Animation keyframes --- */

@keyframes ne-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {
    .ne-modal-overlay,
    .ne-modal,
    .ne-modal-step {
        transition: none !important;
        animation: none !important;
    }

    .ne-modal-overlay.active .ne-modal {
        transform: none;
    }
}

/* --- Mobile adjustments --- */

@media (max-width: 600px) {
    .ne-modal {
        max-height: 90vh;
        border-radius: 1.25rem 1.25rem 0 0;
        margin-top: auto;
    }

    .ne-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .ne-modal-header,
    .ne-modal-body,
    .ne-modal-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* --- Modal enhancements --- */

.ne-modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.ne-modal-body::-webkit-scrollbar {
    width: 8px;
}

.ne-modal-body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 10px;
}

.ne-quick {
    padding: 0.25rem 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ne-quick-text {
    color: var(--text-base);
    font-size: 0.95rem;
    line-height: 1.6;
}

.ne-btn--ghost {
    background: rgba(255, 255, 255, 0.55);
    color: var(--accent-main);
    border: 1px solid rgba(122, 140, 200, 0.35);
    box-shadow: 0 6px 18px rgba(76, 141, 255, 0.12);
}

.ne-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.8);
}

.ne-scroll-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.9;
    animation: ne-hint 2.8s ease-in-out infinite;
}

@keyframes ne-hint {
    0%, 100% { transform: translateY(0); opacity: 0.9; }
    50%      { transform: translateY(4px); opacity: 0.6; }
}

.ne-steps {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding-top: 1rem;
    margin-top: 0.5rem;
    display: grid;
    gap: 0.75rem;
}

.ne-step-card {
    position: relative;
    padding: 0.95rem 1rem 1rem 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(243, 246, 255, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    animation: ne-fade-in 0.3s ease;
}

.ne-step-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(76, 141, 255, 0.12), transparent 45%);
    pointer-events: none;
}

.ne-step-card h4 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
}

.ne-step-card p {
    margin: 0;
    color: var(--text-base);
    line-height: 1.65;
    font-size: 0.97rem;
}

.ne-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(76, 141, 255, 0.12);
    color: var(--accent-main);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
}

.exercise-card {
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .ne-scroll-hint,
    .ne-step-card {
        animation: none !important;
    }
}

/* ===============================
   NE MODAL — SCROLL CARDS UPGRADE
   =============================== */

.ne-modal-overlay {
    background: rgba(15, 23, 42, 0.48);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.ne-modal {
    transform: translateY(10px) scale(0.99);
    opacity: 0;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}

.ne-modal-overlay.active .ne-modal {
    transform: translateY(0) scale(1.01);
    opacity: 1;
}

.ne-modal-body {
    scroll-behavior: smooth;
}

.ne-scroll-progress {
    height: 4px;
    margin: 0 1.5rem;
    background: rgba(99, 119, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.ne-scroll-progress span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, #5a7bff, #8bb8ff);
    transition: width 0.12s ease;
}

.ne-scroll-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 8px 18px rgba(20, 40, 90, 0.08);
    animation: ne-hint 3s ease-in-out infinite;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ne-scroll-hint.is-hidden {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

.ne-steps {
    gap: 0.85rem;
}

.ne-step-card {
    padding: 1rem 1.05rem;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(241, 246, 255, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    border-radius: 1rem;
    display: grid;
    gap: 0.4rem;
    transition: border-color 0.14s ease, box-shadow 0.18s ease, transform 0.14s ease, opacity 0.14s ease;
}

.ne-step-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(20, 40, 90, 0.08);
}

.ne-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.ne-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: rgba(99, 119, 255, 0.14);
    color: var(--accent-main);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.ne-step-done {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.92);
    color: var(--accent-main);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(20, 40, 90, 0.08);
    transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ne-step-done:hover,
.ne-step-done:focus-visible {
    background: rgba(90, 123, 255, 0.12);
    border-color: rgba(90, 123, 255, 0.38);
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(70, 110, 240, 0.14);
}

.ne-step-body {
    display: grid;
    gap: 0.3rem;
}

.ne-step-title {
    margin: 0;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}

.ne-step-text {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
    font-size: 0.95rem;
}

.ne-step-card.is-done {
    border-color: rgba(90, 207, 142, 0.4);
    box-shadow: 0 14px 36px rgba(20, 40, 90, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    opacity: 0.95;
}

.ne-step-card.is-done .ne-step-badge {
    background: rgba(90, 207, 142, 0.15);
    color: #35a76a;
}

.ne-step-card.is-done .ne-step-done {
    background: linear-gradient(135deg, #6dd8a4, #8fe7c0);
    color: #0f3d24;
    border-color: rgba(90, 207, 142, 0.5);
    box-shadow: 0 10px 24px rgba(17, 148, 96, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .ne-modal,
    .ne-modal-overlay,
    .ne-step-card,
    .ne-scroll-hint,
    .ne-scroll-progress span {
        transition: none !important;
        animation: none !important;
    }

    .ne-modal {
        transform: none !important;
    }

    .ne-modal-body {
        scroll-behavior: auto !important;
    }
}
