/* =======================================================================
   Base & variables
   ======================================================================= */

:root {
    --bg-body: #020617;
    --bg-elevated: #020617;
    --bg-section: #020617;
    --bg-section-alt: #020617;
    --bg-chip: rgba(15, 23, 42, 0.9);

    --border-subtle: #1f2937;

    --text-main: #f9fafb;
    --text-muted: #9ca3af;

    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.15);
    --accent-strong: #0ea5e9;

    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 999px;

    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.9);
}

/* Reset light */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overscroll-behavior: none;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
    line-height: 1.6;
    background: radial-gradient(circle at top, #020617 0, #030712 55%, #020617 100%);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

/* =======================================================================
   Layout
   ======================================================================= */

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--text-main);
    padding: 3rem 0 2.5rem;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 55%),
        radial-gradient(circle at top right, rgba(129, 140, 248, 0.18), transparent 55%),
        #020617;
    border-bottom: 1px solid rgba(15, 23, 42, 1);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.9);
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4.5rem 0;
    border-top: 1px solid var(--border-subtle);
    background: transparent;
}

.section:nth-of-type(odd) {
    background: radial-gradient(circle at top left, #020617 0, #020617 50%, #020617 100%);
}

.section:nth-of-type(even) {
    background: radial-gradient(circle at top right, #020617 0, #020617 50%, #020617 100%);
}

/* Intro en plein écran */

.section-intro {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* =======================================================================
   Typographie & utilitaires
   ======================================================================= */

h1,
h2,
h3,
h4 {
    font-weight: 650;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}

p {
    margin: 0 0 1rem;
    color: var(--text-main);
}

ul,
ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

li {
    margin-bottom: 0.25rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.italic {
    font-style: italic;
}

.small {
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* =======================================================================
   Hero
   ======================================================================= */

.hero {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.hero-content {
    max-width: 640px;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: clamp(2.3rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hero-baseline {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.9rem;
}

.hero-baseline strong {
    color: var(--accent-strong);
}

.hero-text {
    font-size: 0.98rem;
    color: var(--text-muted);
    max-width: 42rem;
    margin-bottom: 1.3rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Hero navigation */

.hero-nav {
    margin-top: 1.75rem;
}

.hero-nav-list {
    list-style: none;
    padding: 0.75rem;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.9);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(31, 41, 55, 0.9);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.95);
}

.hero-nav-list li a {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
}

.hero-nav-list li a:hover {
    border-color: rgba(148, 163, 184, 0.7);
    color: var(--accent);
    background: rgba(15, 23, 42, 0.8);
}

/* =======================================================================
   Boutons
   ======================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.08s ease-out, box-shadow 0.08s ease-out,
        background-color 0.08s ease-out, border-color 0.08s ease-out,
        color 0.08s ease-out;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-strong), #6366f1);
    color: #0b1120;
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.5);
}

.btn-primary:hover {
    transform: translateY(-1px);
    color: #0b1120;
    box-shadow: 0 18px 44px rgba(37, 99, 235, 0.8);
}

.btn-ghost {
    border-color: rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-muted);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =======================================================================
   Sections & titres
   ======================================================================= */

.section-header {
    margin-bottom: 1.75rem;
}

.section-title {
    font-size: 1.6rem;
    margin-bottom: 0.35rem;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 40rem;
}

.section-body {
    font-size: 0.96rem;
}

/* Petite “note” */

.note {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), #020617);
}

/* =======================================================================
   Introduction – grille des 3 questions
   ======================================================================= */

.intro-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
    margin: 1.2rem 0 0.4rem;
}

.intro-card {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: radial-gradient(circle at top, #020617, #020617 55%, #020617 100%);
    box-shadow: var(--shadow-soft);
}

.intro-card h3 {
    font-size: 0.98rem;
    margin-bottom: 0.4rem;
}

.intro-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =======================================================================
   Chapitres
   ======================================================================= */

/* =======================================================================
   Chapitres = vraies sections (fin du mode "card")
   ======================================================================= */

/* Chapitres = grosses sections dans la section-chapitres */
.chapter {
    margin: 0;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    position: relative;
}

.chapter-header {
    margin-bottom: 1rem;
}

.chapter-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.chapter-question {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.chapter-section {
    margin-top: 1.1rem;
}

.chapter-section h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.chapter-section p,
.chapter-section ul {
    font-size: 0.93rem;
}

/* =======================================================================
   Placeholders (démos, interview, annexes…)
   ======================================================================= */

.placeholder {
    margin-top: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.95);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.placeholder-demo-large {
    padding: 2rem 1.4rem;
    text-align: center;
}

/* =======================================================================
   Bibliographie
   ======================================================================= */

.biblio-block {
    margin-top: 1.6rem;
}

.biblio-block h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.biblio {
    list-style: none;
    padding: 0;
    margin: 0;
}

.biblio.hanging li {
    padding-left: 1.4rem;
    text-indent: -1.4rem;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
}

.url {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* =======================================================================
   Footer
   ======================================================================= */

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.98);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

.footer-meta,
.footer-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-link {
    font-size: 0.82rem;
}

/* =======================================================================
   Responsivité
   ======================================================================= */

@media (min-width: 900px) {
    .hero {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .hero-content {
        flex: 2.2;
    }

    .hero-nav {
        flex: 1.3;
        margin-top: 0;
        align-self: center;
    }

    .hero-nav-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-nav-list li a {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding-top: 2.2rem;
    }

    .container {
        padding: 0 1.1rem;
    }

    .section {
        padding: 3.25rem 0;
    }

    .intro-grid {
        grid-template-columns: 1fr;
    }

    .chapter {
        padding: 1.2rem 1.1rem;
    }

    .footer-inner {
        align-items: flex-start;
    }
}