/* ============================================================
   Aicoblue — Design System partagé (2026)
   ------------------------------------------------------------
   Un fond quasi-noir, une typographie Geist, des bordures d'un
   blanc très dilué, et un seul accent lavande. Aucune couleur
   saturée : la hiérarchie se fait par l'opacité et l'espacement.

   Les tokens ci-dessous sont la source de vérité. Les palettes
   Tailwind (voir assets/js/theme.js) en sont l'équivalent en
   hex opaques, pour le balisage utilitaire.
   ============================================================ */

:root {
    /* Fonds */
    --bg:            #08090a;
    --bg-panel:      #0b0c0e;
    --bg-raised:     rgba(255, 255, 255, 0.018);
    --bg-raised-alt: rgba(255, 255, 255, 0.035);
    --bg-soft:       rgba(255, 255, 255, 0.05);

    /* Bordures */
    --line:          rgba(255, 255, 255, 0.07);
    --line-strong:   rgba(255, 255, 255, 0.10);
    --line-hover:    rgba(255, 255, 255, 0.22);

    /* Texte */
    --ink:           #f5f6f7;
    --ink-body:      rgba(255, 255, 255, 0.72);
    --ink-muted:     rgba(255, 255, 255, 0.60);
    --ink-dim:       rgba(255, 255, 255, 0.45);
    --ink-faint:     rgba(255, 255, 255, 0.38);

    /* Accent */
    --accent:        #c9c9f5;
    --accent-deep:   #b8b8f2;
    --accent-glow:   rgba(201, 201, 245, 0.22);
    --accent-wash:   rgba(201, 201, 245, 0.06);
    --accent-edge:   rgba(201, 201, 245, 0.22);

    /* Sémantique — pastels très désaturés */
    --ok:            #a8d5b5;
    --live:          #7dd3a0;
    --warn:          #dcd0a8;
    --danger:        #e0aba8;

    /* Chrome */
    --header-h:      68px;
    --docs-header-h: 60px;
    --radius-card:   18px;
    --radius-pill:   999px;
}

/* ============================================================
   Base
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Geist', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: rgba(139, 139, 245, 0.28); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

/* ============================================================
   Chrome de page — header, logo, navigation, footer
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(8, 9, 10, 0.72);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Losange de marque + wordmark */
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--ink);
}
.brand-mark {
    width: 18px;
    height: 18px;
    flex: none;
    border-radius: 5px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #ffffff, var(--accent-deep));
    transition: box-shadow 0.25s ease;
}
.brand:hover .brand-mark { box-shadow: 0 0 18px rgba(184, 184, 242, 0.45); }
.brand-name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.brand-suffix {
    color: var(--ink-dim);
    font-weight: 400;
}
.brand-mark-sm { width: 15px; height: 15px; border-radius: 4px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
}
.nav-link:hover {
    color: #fff;
    background: var(--bg-soft);
}
.nav-link.nav-current {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Menu mobile déroulant */
.mobile-panel {
    border-top: 1px solid var(--line);
    padding: 14px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mobile-panel a {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mobile-panel a:hover { color: #fff; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--ink);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
}
.icon-btn:hover {
    border-color: var(--line-hover);
    background: rgba(255, 255, 255, 0.04);
}
.icon-btn-sm { width: 38px; height: 38px; border-radius: 9px; }

.site-footer {
    border-top: 1px solid var(--line);
    padding: 40px 28px 56px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--ink-muted);
}
.footer-links {
    display: flex;
    gap: 8px;
}
.footer-icon {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    text-decoration: none;
    transition: color 0.18s, border-color 0.18s;
}
.footer-icon:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 500;
    border-radius: var(--radius-pill);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s, background 0.18s, border-color 0.18s;
}
.btn-primary {
    color: #0a0a0a;
    background: var(--ink);
    border: none;
    padding: 15px 26px;
    box-shadow: 0 0 40px rgba(201, 201, 245, 0.18);
}
.btn-primary:hover { transform: translateY(-1px); color: #0a0a0a; }
.btn-ghost {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.13);
    padding: 15px 26px;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.btn-sm {
    font-size: 14px;
    padding: 10px 18px;
}
.btn-block { width: 100%; border-radius: 11px; padding: 13px; font-size: 15px; }

/* ============================================================
   Typographie de section
   ============================================================ */

.eyebrow {
    font-size: 13px;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}
.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
}
.section-lede {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.55;
    margin: 0;
}
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 28px;
}

/* Pastille d'état (« Nouvelle session · … ») */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-muted);
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.025);
    padding: 7px 15px;
    border-radius: var(--radius-pill);
}
.pill-dot {
    width: 6px;
    height: 6px;
    flex: none;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 8px var(--live);
}
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--line-strong);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.tag-accent { color: var(--accent); border-color: var(--accent-edge); }

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

.hero {
    position: relative;
    padding: 112px 28px 108px;
    text-align: center;
    overflow: hidden;
}
.hero-glow {
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: min(760px, 90vw);
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
    filter: blur(30px);
    animation: aicoGlow 7s ease-in-out infinite;
    pointer-events: none;
}
@keyframes aicoGlow {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 0.85; }
}
.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
    pointer-events: none;
}
.hero-title {
    font-size: clamp(2.6rem, 6.4vw, 5.1rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-weight: 600;
    margin: 0 0 26px;
}
.hero-title .dim { color: var(--ink-dim); }
.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.6;
    color: var(--ink-muted);
    max-width: 620px;
    margin: 0 auto 42px;
    font-weight: 300;
}
.hero-stats {
    margin-top: 64px;
    display: flex;
    gap: 44px;
    justify-content: center;
    flex-wrap: wrap;
}
.stat-value {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.stat-label {
    font-size: 13px;
    color: var(--ink-dim);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================================
   Cartes
   ============================================================ */

.card {
    position: relative;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-raised);
    border-radius: var(--radius-card);
    padding: 26px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
a.card:hover, .card-hover:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-raised-alt);
    transform: translateY(-3px);
}
.card-muted { opacity: 0.55; }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}
.card-icon {
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.card-icon svg { width: 21px; height: 21px; }
.card-title {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 8px;
    color: var(--ink);
}
.card-desc {
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 22px;
}
.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.card-meta {
    font-size: 13px;
    color: var(--ink-dim);
}
.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--accent);
    white-space: nowrap;
}
.card-cta svg { width: 15px; height: 15px; }
a.card:hover .card-cta svg { transform: translate(2px, -2px); }
.card-cta svg { transition: transform 0.2s ease; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* Emplacement réservé — sections à remplir plus tard */
.placeholder-block {
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-card);
    padding: 56px 28px;
    text-align: center;
    font-size: 14px;
    color: var(--ink-faint);
    background: rgba(255, 255, 255, 0.012);
}

/* ============================================================
   Formulaires
   ============================================================ */

input, textarea, button, select { font-family: inherit; }
input:focus, textarea:focus { outline: none; }

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.field label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}
.field input,
.field textarea {
    font-size: 15px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    padding: 13px 15px;
    transition: border-color 0.18s;
    width: 100%;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, 0.3); }
.field input:focus,
.field textarea:focus { border-color: var(--accent-edge); }
.field textarea { resize: vertical; line-height: 1.5; }

/* ============================================================
   Documentation — grille, sidebar, sommaire
   ============================================================ */

.docs-header { height: var(--docs-header-h); }

.docs-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 248px;
    max-width: 1500px;
    margin: 0 auto;
}
.docs-side {
    border-right: 1px solid var(--line);
    padding: 30px 16px;
    position: sticky;
    top: var(--docs-header-h);
    align-self: start;
    height: calc(100vh - var(--docs-header-h));
    overflow-y: auto;
}
.docs-main { padding: 48px 56px 120px; min-width: 0; }
.docs-main-inner { max-width: 760px; margin: 0 auto; }
.docs-toc-col {
    padding: 30px 22px;
    position: sticky;
    top: var(--docs-header-h);
    align-self: start;
    height: calc(100vh - var(--docs-header-h));
    overflow-y: auto;
}

@media (max-width: 1279px) {
    .docs-grid { grid-template-columns: 240px minmax(0, 1fr); max-width: 1400px; }
    .docs-main { padding: 40px 40px 120px; }
    .docs-toc-col { display: none; }
}
@media (max-width: 899px) {
    .docs-grid { display: block; }
    .docs-side { display: none; }
    .docs-main { padding: 32px 20px 100px; }
}

/* Sidebar de navigation */
.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 26px;
}
.docs-nav-group-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    margin-bottom: 10px;
    padding: 0 10px;
}
.docs-nav-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.docs-nav a {
    display: block;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}
.docs-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}
.docs-nav a.docs-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 500;
}

/* Le bouton « sommaire » n'apparaît que quand la sidebar disparaît */
.docs-drawer-btn { display: none; }
@media (max-width: 899px) {
    .docs-drawer-btn { display: inline-flex; }
}

/* Tiroir mobile */
.drawer-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 60;
}
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 70;
    background: var(--bg-panel);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 16px;
    overflow-y: auto;
}
.drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
}

/* Sommaire de droite */
.toc-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    margin-bottom: 14px;
}
.toc {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
}
.toc a {
    font-size: 13.5px;
    padding: 6px 14px;
    margin-left: -1px;
    border-left: 1px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.toc a:hover { color: rgba(255, 255, 255, 0.8); }
.toc a.toc-active {
    color: #fff;
    border-left-color: var(--accent);
}

.toc-aside {
    margin-top: 28px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 16px;
}
.toc-aside-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}
.toc-aside-title svg { width: 15px; height: 15px; color: var(--accent); }
.toc-aside p {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

/* Fil d'Ariane */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-dim);
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--ink-dim);
    text-decoration: none;
    transition: color 0.18s;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .separator { color: rgba(255, 255, 255, 0.25); }
.breadcrumb .current { color: rgba(255, 255, 255, 0.75); }

/* ============================================================
   Prose technique
   ============================================================ */

.prose-technical {
    font-size: 16.5px;
    line-height: 1.75;
    color: var(--ink-body);
}
.doc-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 0 0 18px;
    color: var(--ink);
}
.doc-lede {
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink-muted);
    margin: 0 0 36px;
    font-weight: 300;
}
.prose-technical h2 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 48px 0 16px;
    scroll-margin-top: 80px;
}
.prose-technical h3 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 32px 0 12px;
    scroll-margin-top: 80px;
}
.prose-technical p { margin: 0 0 18px; }
.prose-technical strong { color: #fff; font-weight: 600; }
.prose-technical em { color: rgba(255, 255, 255, 0.8); }
.prose-technical a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(201, 201, 245, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}
.prose-technical a:hover { text-decoration-color: var(--accent); }
/* Le preflight Tailwind (injecté APRÈS cette feuille) pose `list-style: none`
   sur ul/ol — on rétablit explicitement les puces dans la prose. */
.prose-technical ul,
.prose-technical ol {
    margin: 0 0 24px;
    padding-left: 1.35rem;
}
.prose-technical ul { list-style: disc; }
.prose-technical ol { list-style: decimal; }
.prose-technical .step-list,
.prose-technical .check-list,
.step-list,
.check-list { list-style: none; padding-left: 0; }
.prose-technical li { margin-bottom: 10px; font-size: 16px; line-height: 1.65; }
.prose-technical li::marker { color: rgba(255, 255, 255, 0.3); }
.prose-technical hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 40px 0;
}
.prose-technical blockquote {
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    padding: 4px 0 4px 20px;
    margin: 0 0 34px;
    font-style: italic;
    color: var(--ink-muted);
}
.prose-technical blockquote p { margin: 0; }

.prose-technical code {
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 0.86em;
    padding: 0.15em 0.42em;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--accent);
}
.prose-technical pre {
    margin: 0 0 28px;
    border-radius: 14px;
    overflow-x: auto;
    background: var(--bg-panel);
    border: 1px solid var(--line-strong);
}
.prose-technical pre code {
    display: block;
    padding: 20px;
    font-size: 13.5px;
    line-height: 1.7;
    background: transparent;
    border: none;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.82);
}

/* Bloc de code avec barre de titre (points + nom de fichier) */
.code-block {
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    overflow: hidden;
    margin: 0 0 34px;
    background: var(--bg-panel);
}
.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
    border-radius: 0;
}
.code-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    flex: none;
}
.code-header .code-name { margin-left: 8px; }
.code-block pre {
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}
.code-header + pre code {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Tableaux */
.prose-technical table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 30px;
    font-size: 14.5px;
}
.prose-technical th {
    text-align: left;
    font-weight: 600;
    color: var(--ink);
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.02);
}
.prose-technical td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-body);
    vertical-align: top;
}

/* Liste numérotée « étapes » */
.step-list {
    margin: 0 0 34px;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.step-list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-body);
    margin: 0;
}
.step-num {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    font-family: 'Geist Mono', ui-monospace, monospace;
}

/* Liste à coches */
.check-list {
    margin: 0 0 40px;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.check-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-body);
    margin: 0;
}
.check-list svg {
    width: 17px;
    height: 17px;
    flex: none;
    margin-top: 3px;
    color: var(--accent);
}

/* ============================================================
   Encadrés pédagogiques
   ============================================================ */

.callout {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 14px;
    margin: 28px 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-body);
    border: 1px solid var(--accent-edge);
    background: var(--accent-wash);
}
.callout .callout-icon { flex: none; margin-top: 1px; color: var(--accent); }
.callout .callout-icon svg { width: 20px; height: 20px; }
.callout p { margin-bottom: 0 !important; font-size: 14.5px; line-height: 1.55; }
.callout-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--ink); }

.callout-info { border-color: var(--accent-edge); background: var(--accent-wash); }
.callout-info .callout-icon { color: var(--accent); }
.callout-tip { border-color: rgba(168, 213, 181, 0.22); background: rgba(168, 213, 181, 0.055); }
.callout-tip .callout-icon { color: var(--ok); }
.callout-warn { border-color: rgba(220, 208, 168, 0.22); background: rgba(220, 208, 168, 0.055); }
.callout-warn .callout-icon { color: var(--warn); }

.analogy-box {
    position: relative;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 2px solid var(--accent);
    border-radius: 14px;
    padding: 18px 22px;
    margin: 28px 0;
}
.analogy-box .analogy-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 6px;
}
.analogy-box p {
    margin-bottom: 0 !important;
    color: var(--ink-body);
}

/* ============================================================
   Figures / illustrations SVG
   ============================================================ */

.figure-card {
    background: var(--bg-panel);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 24px;
    margin: 32px 0;
    overflow-x: auto;
}
.figure-card svg {
    display: block;
    width: 100%;
    height: auto;
    min-width: 480px;
}
.figure-card figcaption {
    margin-top: 16px;
    font-size: 13px;
    color: var(--ink-dim);
    text-align: center;
    line-height: 1.6;
}
.flow-dash {
    stroke-dasharray: 6 6;
    animation: dashMove 1.4s linear infinite;
}
@keyframes dashMove { to { stroke-dashoffset: -12; } }

.canvas-container {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    overflow: hidden;
}

/* ============================================================
   Pagination précédent / suivant
   ============================================================ */

.docs-pager {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}
.pager-link {
    flex: 1;
    min-width: 200px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    transition: border-color 0.18s, background 0.18s;
}
.pager-link:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.02);
}
.pager-link .pager-dir {
    display: block;
    font-size: 12.5px;
    color: var(--ink-dim);
    margin-bottom: 5px;
}
.pager-link .pager-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
}
.pager-link.pager-next { text-align: right; }
.pager-link.pager-empty { visibility: hidden; }
@media (max-width: 640px) {
    .pager-link.pager-empty { display: none; }
}

/* ============================================================
   Onglets
   ============================================================ */

.tab-btn {
    position: relative;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.tab-btn.tab-active {
    color: #0a0a0a;
    background: var(--ink);
    border-color: transparent;
}
.tab-panel {
    display: none;
    animation: tabFadeIn 0.3s ease-out;
}
.tab-panel.tab-panel-active { display: block; }
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Barre d'onglets flottante (playgrounds) */
.tab-bar-floating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    background: rgba(20, 21, 24, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   Badges de difficulté
   ============================================================ */

.badge-beginner {
    background: rgba(168, 213, 181, 0.09);
    color: var(--ok);
    border: 1px solid rgba(168, 213, 181, 0.22);
}
.badge-intermediate {
    background: rgba(220, 208, 168, 0.09);
    color: var(--warn);
    border: 1px solid rgba(220, 208, 168, 0.22);
}
.badge-advanced {
    background: rgba(224, 171, 168, 0.09);
    color: var(--danger);
    border: 1px solid rgba(224, 171, 168, 0.22);
}

/* ============================================================
   Animations d'apparition
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-glow, .flow-dash { animation: none; }
    html { scroll-behavior: auto; }
}

/* ============================================================
   Utilitaires hérités (compatibilité avec le balisage existant)
   ============================================================ */

.text-gradient {
    background: linear-gradient(135deg, #ffffff, var(--accent-deep));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-mesh { position: relative; }
.dot-pattern { background-image: none; }
.bento-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-raised);
    border-radius: var(--radius-card);
    padding: 26px;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-raised-alt);
    transform: translateY(-3px);
}
.card-glow { position: relative; }
.btn-shimmer { position: relative; }
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}
.animate-pulse-dot { animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
