@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/static/fonts/InterVariable.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('/static/fonts/InterVariable-Italic.woff2') format('woff2');
}

:root {
    --marine: #12315F;
    --marine-dark: #0d2547;
    --marine-light: #1d4a8f;
    --marine-tint: #e8eef6;
    --rouge: #E1000F;
    --rouge-dark: #B8000D;
    --text: #1f2937;
    --text-muted: #6b7280;
    --text-faint: #9ca3af;
    --border: #e5e7eb;
    --bg: #f1f4f8;
    --card: #ffffff;
    --card-alt: #f9fafb;
    --heading: #111827;
    --heading-soft: #374151;
    --body-text: #4b5563;
    --shadow-card: 0 1px 2px rgba(18, 49, 95, 0.06), 0 8px 24px rgba(18, 49, 95, 0.07);
    --shadow-card-sm: 0 1px 2px rgba(18, 49, 95, 0.05);
    --shadow-hover: 0 6px 16px rgba(18, 49, 95, 0.12);
    --input-bg: #ffffff;
    --accent-blue: #1d4ed8;
    --accent-blue-bg: #eff6ff;
    --accent-green: #059669;
    --accent-green-bg: #ecfdf5;
    --accent-red-bg: #fef2f2;
    --accent-violet-bg: #faf5ff;
    --warn-bg: #fffbeb;
    --warn-border: #fde68a;
    --warn-text: #92400e;
    --warn-text-body: #78350f;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #991b1b;
    --danger-text-body: #7f1d1d;
    --danger-text-faint: #b91c1c;
    --rouge-light: #FF6B6B;
    --rouge-lighter: #FF9B9B;
    --table-header-bg: var(--marine-tint);
    --intro-bg: var(--marine-tint);
    --intro-border: #d0dcee;
    --heading-accent: var(--marine);
    --brand-text: var(--marine);
    --header-bg: #ffffff;
    --header-bg-alt: #f8fafc;
    --header-text: var(--marine);
    --header-text-muted: var(--text-muted);
    --header-border: var(--border);
    --header-nav-hover-bg: var(--card-alt);
    --header-shadow: 0 1px 3px rgba(18, 49, 95, 0.08);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --text: #e5e7eb;
        --text-muted: #9ca3af;
        --text-faint: #6b7280;
        --border: #2d3748;
        --bg: #0f172a;
        --card: #1e293b;
        --card-alt: #1a2332;
        --heading: #f1f5f9;
        --heading-soft: #cbd5e1;
        --body-text: #94a3b8;
        --marine-tint: #1e3a5f;
        --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
        --shadow-card-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.5);
        --input-bg: #0f172a;
        --accent-blue: #60a5fa;
        --accent-blue-bg: #1e3a5f;
        --accent-green: #34d399;
        --accent-green-bg: #064e3b;
        --accent-red-bg: #450a0a;
        --accent-violet-bg: #2e1065;
        --warn-bg: #451a03;
        --warn-border: #78350f;
        --warn-text: #fbbf24;
        --warn-text-body: #fcd34d;
        --danger-bg: #450a0a;
        --danger-border: #7f1d1d;
        --danger-text: #fca5a5;
        --danger-text-body: #fca5a5;
        --danger-text-faint: #FF6B6B;
        --table-header-bg: #1e3a5f;
        --intro-bg: #1e3a5f;
        --intro-border: #2d4a6f;
        --heading-accent: #60a5fa;
        --brand-text: #93c5fd;
        --header-bg: #1e293b;
        --header-bg-alt: #0f172a;
        --header-text: #f1f5f9;
        --header-text-muted: #94a3b8;
        --header-border: #2d3748;
        --header-nav-hover-bg: #334155;
        --header-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --text-faint: #6b7280;
    --border: #2d3748;
    --bg: #0f172a;
    --card: #1e293b;
    --card-alt: #1a2332;
    --heading: #f1f5f9;
    --heading-soft: #cbd5e1;
    --body-text: #94a3b8;
    --marine-tint: #1e3a5f;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-card-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.5);
    --input-bg: #0f172a;
    --accent-blue: #60a5fa;
    --accent-blue-bg: #1e3a5f;
    --accent-green: #34d399;
    --accent-green-bg: #064e3b;
    --accent-red-bg: #450a0a;
    --accent-violet-bg: #2e1065;
    --warn-bg: #451a03;
    --warn-border: #78350f;
    --warn-text: #fbbf24;
    --warn-text-body: #fcd34d;
    --danger-bg: #450a0a;
    --danger-border: #7f1d1d;
    --danger-text: #fca5a5;
    --danger-text-body: #fca5a5;
    --danger-text-faint: #FF6B6B;
    --table-header-bg: #1e3a5f;
    --intro-bg: #1e3a5f;
    --intro-border: #2d4a6f;
    --heading-accent: #60a5fa;
    --brand-text: #93c5fd;
    --header-bg: #1e293b;
    --header-bg-alt: #0f172a;
    --header-text: #f1f5f9;
    --header-text-muted: #94a3b8;
    --header-border: #2d3748;
    --header-nav-hover-bg: #334155;
    --header-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
}

:root[data-theme="light"] {
    color-scheme: light;
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-feature-settings: 'cv05' 1, 'cv08' 1, 'ss01' 1;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Site header ────────────────────────── */

.site-header {
    background: var(--header-bg);
    color: var(--header-text);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--header-shadow);
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.875rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--header-text);
    flex-shrink: 0;
}

.header-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--header-text);
}

.header-domain {
    color: var(--rouge);
    font-weight: 400;
}

.header-tagline {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--header-text-muted);
}

/* Horizontal nav — full width, centered */

.header-nav {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    padding: 0 2rem;
    border-top: 1px solid var(--header-border);
}

.header-nav-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--header-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.header-nav-link:hover {
    color: var(--header-text);
    background: var(--header-nav-hover-bg);
}

.header-nav-link.active {
    color: var(--header-text);
    border-bottom-color: var(--rouge);
}

/* Nav groups & dropdown (Secourir) */

.nav-group {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-trigger {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--header-text-muted);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.nav-trigger:hover {
    color: var(--header-text);
    background: var(--header-nav-hover-bg);
}

.nav-group.active > .nav-trigger {
    color: var(--header-text);
    border-bottom-color: var(--rouge);
}

.nav-trigger::after {
    content: "▾";
    margin-left: 0.375rem;
    font-size: 0.65em;
    vertical-align: 0.1em;
    opacity: 0.7;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    padding: 0.5rem 0;
    background: var(--header-bg);
    border: 1px solid var(--header-border);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-card);
    z-index: 200;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
    display: block;
}

/* Pinned closed after a click, until the cursor leaves the group */
.nav-group.dd-hidden .nav-dropdown {
    display: none !important;
}

.nav-dropdown .header-nav-link {
    border-bottom: none;
    padding: 0.625rem 1.25rem;
}

.nav-dropdown .header-nav-link.active {
    background: var(--header-nav-hover-bg);
}

/* Theme toggle in nav menu */

.theme-toggle--nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    align-self: center;
    margin-left: 1rem;
    padding: 0.375rem;
    width: 36px;
    height: 36px;
    background: var(--header-nav-hover-bg);
    border: none;
    border-radius: 50%;
    color: var(--header-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.theme-toggle--nav:hover {
    background: var(--marine-tint);
    color: var(--header-text);
}

.theme-toggle--nav .theme-toggle-label {
    display: none;
}

.theme-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.theme-toggle-label {
    font-weight: 500;
}

/* Menu toggle (mobile only) */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--header-text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Sidebar overlay (mobile nav backdrop) */

.sidebar-overlay {
    display: none;
}

/* ── Main content ───────────────────────── */

.content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.chapter-panel {
    min-height: 300px;
}

.chapter-panel .placeholder {
    color: var(--text-faint);
    text-align: center;
    margin: 4rem 0;
    font-size: 1rem;
}

.chapter-panel h1,
.chapter-panel h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--heading-accent);
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--rouge);
    display: inline-block;
    padding-right: 3rem;
}

.chapter-panel ul {
    padding-left: 1.5rem;
}

.chapter-panel li {
    margin: 0.375rem 0;
    line-height: 1.5;
}

/* ── Breadcrumb ─────────────────────────── */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    color: var(--text-faint);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb a:hover {
    color: var(--heading-accent);
}

.breadcrumb-sep {
    color: #d1d5db;
}

.breadcrumb-section {
    color: var(--text-muted);
    font-weight: 500;
}

.breadcrumb-current {
    color: var(--heading);
    font-weight: 500;
}

/* ── Fiches ─────────────────────────────── */

.fiche {
    margin-bottom: 2.5rem;
    padding: 1.5rem 1.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card-sm);
}

.fiche:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fiche-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.fiche-ref {
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--heading-accent);
    background: var(--marine-tint);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.fiche-type {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: #ffffff;
}

.fiche-type-AC { background: #7c3aed; }  /* violet - connaissances */
.fiche-type-PR { background: #E1000F; }  /* rouge - procédures */
.fiche-type-FT { background: #0891b2; }  /* cyan - techniques */

.fiche-level {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--heading-accent);
    background: var(--marine-tint);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.fiche-level + .fiche-level {
    margin-left: 0.25rem;
}

.fiche-date {
    font-size: 0.6875rem;
    color: var(--text-faint);
    margin-left: auto;
}

.fiche h3 {
    font-size: 1.125rem;
    color: var(--heading-accent);
    margin: 0 0 1rem;
}

.fiche-content {
    line-height: 1.7;
}

.fiche-content h2,
.fiche-content h3,
.fiche-content h4 {
    color: var(--heading-soft);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.fiche-content h2 { font-size: 1.125rem; }
.fiche-content h3 { font-size: 1rem; }
.fiche-content h4 { font-size: 0.9375rem; }

.fiche-content p {
    margin: 0.75rem 0;
}

.fiche-content ul,
.fiche-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.fiche-content li {
    margin: 0.375rem 0;
}

.fiche-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.fiche-content th,
.fiche-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

.fiche-content th {
    background: var(--marine-tint);
    color: var(--heading-accent);
    font-weight: 600;
}

.fiche-content strong {
    color: var(--marine-dark);
}

.fiche-content sup {
    font-size: 0.7em;
    line-height: 0;
    color: var(--text-muted);
}

/* ── Landing page ───────────────────────── */

.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 0;
}

.landing-hero {
    max-width: 720px;
}

.landing-title {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--heading);
    margin: 0 0 1rem;
}

.landing-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--body-text);
    margin: 0;
}

.landing-cta {
    font-size: 0.9375rem;
    color: var(--accent-blue);
    font-weight: 500;
    margin: 0;
}

/* Stats cards */

.landing-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    padding: 1.25rem 1.5rem;
    background: var(--card-alt);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--heading);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.stat-ac .stat-value { color: #7c3aed; }
.stat-pr .stat-value { color: #E1000F; }
.stat-ft .stat-value { color: #0891b2; }

/* PSE level badges */

.landing-levels {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}

.level-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    min-width: 100px;
}

.level-count {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.level-name {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.level-pse1 {
    background: var(--accent-blue-bg);
    color: var(--accent-blue);
}

.level-pse2 {
    background: var(--danger-bg);
    color: #E1000F;
}

.level-both {
    background: var(--accent-violet-bg);
    color: #7c3aed;
}

/* ── Dark mode: accent colors ───────────── */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .stat-ac .stat-value,
    :root:not([data-theme="light"]) .level-both { color: #a78bfa; }
    :root:not([data-theme="light"]) .stat-pr .stat-value,
    :root:not([data-theme="light"]) .level-pse2 { color: #FF6B6B; }
    :root:not([data-theme="light"]) .stat-ft .stat-value { color: #22d3ee; }
    :root:not([data-theme="light"]) .emergency-number { color: #FF6B6B; }
    :root:not([data-theme="light"]) .fiche-type-AC { background: #7c3aed; }
    :root:not([data-theme="light"]) .fiche-type-PR { background: #E1000F; }
    :root:not([data-theme="light"]) .fiche-type-FT { background: #0891b2; }
}

:root[data-theme="dark"] .stat-ac .stat-value,
:root[data-theme="dark"] .level-both { color: #a78bfa; }
:root[data-theme="dark"] .stat-pr .stat-value,
:root[data-theme="dark"] .level-pse2 { color: #FF6B6B; }
:root[data-theme="dark"] .stat-ft .stat-value { color: #22d3ee; }
:root[data-theme="dark"] .emergency-number { color: #FF6B6B; }

/* Footer */

.landing-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.landing-footer p {
    font-size: 0.8125rem;
    color: var(--text-faint);
    margin: 0;
}

/* ── Landing teasers ────────────────────── */

.landing-section {
    width: 100%;
    max-width: 860px;
    margin-top: 2.75rem;
}

.landing-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 1rem;
}

.landing-teasers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.1rem;
}

/* Emergency numbers strip */

.landing-emergency {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
    max-width: 860px;
    margin-top: 2.25rem;
}

.emergency-item {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.9rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card-sm);
}

.emergency-number {
    font-size: 1.625rem;
    font-weight: 800;
    line-height: 1;
    color: var(--rouge);
}

.emergency-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Coming-soon pills */

.landing-soon {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.soon-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    background: var(--card-alt);
    border: 1px dashed var(--border);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.soon-icon {
    width: 20px;
    height: 20px;
}

/* ── Vigilance météo widget ─────────────── */

.landing-vigilance {
    margin-top: 3rem;
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.landing-vigilance-widget {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--shadow-card-sm);
    line-height: 0;
    width: 100%;
    max-width: 500px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.landing-vigilance-widget iframe {
    border-radius: 0.375rem;
    transform: scale(1.5);
    transform-origin: center center;
    width: 302px;
    height: 122px;
    flex-shrink: 0;
    margin: 0;
}

.landing-vigilance-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-vigilance-icon {
    width: 24px;
    height: 24px;
}



.landing-vigilance-source {
    font-size: 0.75rem;
    color: var(--text-faint);
    margin: 0;
}

.landing-vigilance-source a {
    color: var(--text-muted);
    text-decoration: none;
}

.landing-vigilance-source a:hover {
    text-decoration: underline;
}

.teaser-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card-sm);
}

/* In the landing grid, cards stack vertically */
.landing-teasers .teaser-card {
    flex-direction: column;
    align-items: flex-start;
}

.landing-teasers .teaser-icon {
    margin-bottom: 0.25rem;
}

.teaser-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    line-height: 1;
}

.teaser-icon--emoji {
    font-size: 2rem;
    width: auto;
    height: auto;
}

.teaser-content {
    flex: 1;
}

.teaser-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 0.375rem;
}

.teaser-desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.teaser-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-green);
    background: var(--accent-green-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.teaser-badge--available {
    color: var(--accent-blue);
    background: var(--accent-blue-bg);
}

/* Clickable teaser card */
.teaser-card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.teaser-card--link:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: var(--marine);
}

.teaser-card--link:hover .teaser-title {
    color: var(--heading-accent);
}

/* ── Landing CTA button ─────────────────── */

.landing-cta-button {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--marine);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(18, 49, 95, 0.3);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.landing-cta-button:hover {
    background: var(--rouge);
    box-shadow: 0 6px 18px rgba(239, 65, 53, 0.35);
    transform: translateY(-2px);
}

/* ── PSE Index page ─────────────────────── */

.pse-index-header {
    margin-bottom: 2rem;
}

.pse-index-header h1,
.pse-index-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--heading-accent);
    margin: 0 0 0.25rem;
}

.pse-index-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0 0 0.375rem;
}

.pse-index-edition {
    font-size: 0.8125rem;
    color: var(--text-faint);
    margin: 0;
}

.pse-chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.pse-chapter-card {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.25rem;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.pse-chapter-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--marine);
}

.pse-chapter-num {
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-faint);
}

.pse-chapter-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.4;
}

.pse-chapter-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* ── Site footer ────────────────────────── */

.site-footer {
    background: var(--marine);
    color: #ffffff;
    margin-top: auto;
    page-break-inside: avoid;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.footer-logo {
    width: 32px;
    height: 32px;
}

.footer-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-domain {
    color: var(--rouge);
    font-weight: 400;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.25rem;
    flex: 1;
    min-width: 320px;
    max-width: 720px;
    width: 100%;
}

.footer-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.footer-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.25rem;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-nav a:hover {
    color: #ffffff;
}

.footer-copyright {
    width: 100%;
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}



/* ── Responsive ─────────────────────────── */

@media (max-width: 768px) {
    /* Header adjustments */
    .header-top {
        padding: 0.625rem 1rem;
    }

    .header-logo {
        width: 32px;
        height: 32px;
    }

    .header-title {
        font-size: 1rem;
    }

    .header-tagline {
        display: none;
    }

    /* Show menu toggle, hide nav by default */
    .menu-toggle {
        display: flex;
    }

    .header-nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
        padding: 4rem 1rem 1rem;
        background: var(--header-bg-alt);
        border-left: 1px solid var(--header-border);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 150;
        overflow-y: auto;
    }

    .header-nav.open {
        display: flex;
        transform: translateX(0);
    }

    .header-nav-link {
        border-bottom: none;
        border-left: 3px solid transparent;
        padding: 0.875rem 1rem;
    }

    /* Dropdowns become plain stacked sections in the mobile menu */
    .nav-group {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-trigger {
        border-bottom: none;
        border-left: 3px solid transparent;
        padding: 0.875rem 1rem;
    }

    .nav-group.active > .nav-trigger {
        border-bottom-color: transparent;
        border-left-color: var(--rouge);
        background: var(--header-nav-hover-bg);
        color: var(--header-text);
    }

    .nav-trigger::after {
        display: none;
    }

    .nav-dropdown {
        position: static;
        display: block;
        min-width: 0;
        padding: 0;
        background: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .nav-dropdown .header-nav-link {
        padding-left: 2rem;
    }

    .header-nav-link.active {
        border-bottom: none;
        border-left-color: var(--rouge);
        background: var(--header-nav-hover-bg);
    }

    /* Theme toggle in mobile menu: full-width with label */
    .theme-toggle--nav {
        width: 100%;
        height: auto;
        margin: 1rem 0 0;
        padding: 0.75rem 1rem;
        border: 1px solid var(--header-border);
        border-radius: 0.5rem;
        justify-content: flex-start;
        font-size: 0.875rem;
        gap: 0.625rem;
        color: var(--header-text-muted);
    }

    .theme-toggle--nav:hover {
        background: var(--header-nav-hover-bg);
        color: var(--header-text);
    }

    .theme-toggle--nav .theme-toggle-label {
        display: inline;
    }

    /* Overlay backdrop — behind the nav panel */
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        z-index: 90;
    }

    .sidebar-overlay.visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Prevent body scroll when nav is open */
    body.nav-open {
        overflow: hidden;
    }

    /* Content */
    .content {
        padding: 1.5rem 1rem;
    }

    .landing {
        text-align: left;
    }

    .landing-stats,
    .landing-levels {
        justify-content: flex-start;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .footer-nav {
        justify-content: center;
    }
}

/* ── RIS Calculator page ────────────────── */

.ris-page {
    max-width: 720px;
}

.ris-header {
    margin-bottom: 1.5rem;
}

.ris-header h1,
.ris-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--heading-accent);
    margin: 0 0 0.25rem;
}

.ris-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
}

.ris-intro {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--body-text);
}

.ris-intro p {
    margin: 0 0 0.75rem;
}

.ris-intro p:last-child {
    margin-bottom: 0;
}

.ris-intro a {
    color: var(--accent-blue);
    text-decoration: none;
}

.ris-intro a:hover {
    text-decoration: underline;
}

.ris-intro ul {
    margin: 0.5rem 0 0.75rem;
    padding-left: 1.25rem;
}

.ris-intro li {
    margin-bottom: 0.25rem;
}

.ris-disclaimer {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-left: 4px solid var(--rouge);
    border-radius: 0.5rem;
}

.ris-disclaimer h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--danger-text);
    margin: 0 0 0.75rem;
}

.ris-disclaimer p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--danger-text-body);
    margin: 0 0 0.75rem;
}

.ris-disclaimer p:last-child {
    margin-bottom: 0;
}

.ris-source {
    font-size: 0.75rem !important;
    color: var(--danger-text-faint) !important;
    font-style: italic;
    border-top: 1px solid var(--danger-border);
    padding-top: 0.75rem;
    margin-top: 0.75rem !important;
}

/* ── RIS Calculator component ───────────── */

.calcul-ris {
    --ris-bleu: #12315F;
    --ris-orange: #E1000F;
    --ris-texte: var(--text);
    --ris-gris: var(--text-muted);
    --ris-bordure: var(--border);
    --ris-fond: var(--card-alt);
    --ris-bleu-text: #12315F;

    font-family: inherit;
    color: var(--ris-texte);
    width: 100%;
    max-width: none;
    line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .calcul-ris {
        --ris-bleu-text: #93c5fd;
    }
}

:root[data-theme="dark"] .calcul-ris {
    --ris-bleu-text: #93c5fd;
}

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

/* Blocs d'indicateurs */

.calcul-ris__bloc {
    margin: 0 0 1.75rem;
    padding: 0;
    border: 0;
    min-width: 0;
}

.calcul-ris__legende {
    display: block;
    width: 100%;
    float: none;
    padding: 0 0 0.65em;
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ris-bleu-text);
    border-bottom: 2px solid var(--ris-bordure);
}

.calcul-ris__input {
    display: block;
    width: 100%;
    max-width: 320px;
    padding: 0.7em 0.85em;
    font: inherit;
    font-size: 1.05rem;
    color: var(--ris-texte);
    background: var(--input-bg);
    border: 1px solid var(--ris-bordure);
    border-radius: 6px;
}

.calcul-ris__aide {
    margin: 0.55em 0 0;
    font-size: 0.88rem;
    color: var(--ris-gris);
}

/* Options */

.calcul-ris__options {
    display: grid;
    gap: 0.6rem;
}

.calcul-ris__option {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    background: var(--input-bg);
    border: 1px solid var(--ris-bordure);
    border-left: 5px solid var(--ris-bordure);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.calcul-ris__option:hover {
    border-color: var(--ris-bleu);
    background: var(--ris-fond);
}

.calcul-ris__radio {
    flex: 0 0 auto;
    width: 1.15em;
    height: 1.15em;
    margin: 0.2em 0 0;
    accent-color: var(--ris-bleu);
    cursor: pointer;
}

.calcul-ris__option-corps {
    display: block;
    min-width: 0;
}

.calcul-ris__niveau {
    display: inline-block;
    margin-bottom: 0.3em;
    padding: 0.15em 0.65em;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ris-bleu-text);
    background: var(--marine-tint);
    border-radius: 999px;
}

.calcul-ris__libelle {
    display: block;
    font-size: 0.9375rem;
    color: var(--ris-texte);
    line-height: 1.5;
}

/* État sélectionné */
.calcul-ris__option:has(.calcul-ris__radio:checked),
.calcul-ris__option.est-choisie {
    border-color: var(--ris-bleu);
    border-left-color: var(--ris-orange);
    background: var(--ris-fond);
}

.calcul-ris__option:has(.calcul-ris__radio:checked) .calcul-ris__niveau,
.calcul-ris__option.est-choisie .calcul-ris__niveau {
    color: #fff;
    background: var(--ris-bleu);
}

.calcul-ris__option:focus-within,
.calcul-ris__input:focus-visible,
.calcul-ris__bouton:focus-visible {
    outline: 3px solid var(--ris-orange);
    outline-offset: 2px;
}

/* Résultat */

.calcul-ris__resultat {
    background: var(--ris-fond);
    border: 1px solid var(--ris-bordure);
    border-left: 5px solid var(--ris-orange);
    border-radius: 0.5rem;
    padding: 1.4rem 1.6rem;
}

.calcul-ris__attente {
    margin: 0;
    color: var(--ris-gris);
    font-size: 0.95rem;
}

.calcul-ris__bandeau {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.1rem;
}

.calcul-ris__valeur {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0;
    padding-right: 1.5rem;
    border-right: 1px solid var(--ris-bordure);
}

.calcul-ris__valeur-nombre {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ris-bleu-text);
}

.calcul-ris__valeur-legende {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ris-gris);
}

.calcul-ris__synthese {
    flex: 1 1 260px;
    min-width: 0;
}

.calcul-ris__type {
    margin: 0 0 0.2em;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ris-orange);
}

.calcul-ris__effectif {
    margin: 0 0 0.2em;
    font-weight: 600;
}

.calcul-ris__lots {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ris-gris);
}

.calcul-ris__detail {
    margin: 0 0 1.25rem;
    padding-left: 1.1em;
    font-size: 0.9rem;
    color: var(--ris-gris);
}

/* Recap textarea */

.calcul-ris__recap {
    margin-bottom: 1.25rem;
}

.calcul-ris__recap-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ris-gris);
    margin-bottom: 0.5rem;
}

.calcul-ris__recap-text {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ris-texte);
    background: var(--input-bg);
    border: 1px solid var(--ris-bordure);
    border-radius: 6px;
    resize: vertical;
    white-space: pre;
}

.calcul-ris__recap-text:focus {
    outline: 2px solid var(--ris-bleu);
    outline-offset: 1px;
}

.calcul-ris__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.calcul-ris__bouton {
    display: inline-block;
    padding: 0.65em 1.2em;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--ris-bleu);
    border: 1px solid var(--ris-bleu);
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.calcul-ris__bouton:hover {
    opacity: 0.9;
    color: #fff;
}

.calcul-ris__bouton--secondaire {
    color: var(--ris-bleu-text);
    background: transparent;
}

.calcul-ris__bouton--secondaire:hover {
    background: var(--marine-tint);
    color: var(--ris-bleu-text);
    opacity: 1;
}

@media (max-width: 560px) {
    .calcul-ris__valeur {
        padding-right: 0;
        border-right: 0;
    }

    .calcul-ris__resultat {
        padding: 1.1rem 1.2rem;
    }
}

@media print {
    .calcul-ris__actions {
        display: none;
    }
}

/* ── Kit 72h page ───────────────────────── */

.kit-page {
    max-width: 760px;
}

.kit-header {
    margin-bottom: 1.5rem;
}

.kit-header h1,
.kit-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--heading-accent);
    margin: 0 0 0.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--rouge);
    display: inline-block;
    padding-right: 3rem;
}

.kit-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

.kit-intro {
    background: var(--marine-tint);
    border: 1px solid var(--intro-border);
    border-left: 4px solid var(--marine);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text);
}

.kit-intro p {
    margin: 0 0 0.75rem;
}

.kit-intro p:last-child {
    margin-bottom: 0;
}

/* Progress card */

.kit-progress-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card-sm);
}

.kit-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.kit-progress-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.kit-progress-count {
    font-size: 1.125rem;
    color: var(--text-faint);
}

.kit-progress-count strong {
    color: var(--heading-accent);
    font-size: 1.5rem;
}

.kit-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 9999px;
    overflow: hidden;
}

.kit-progress-fill {
    height: 100%;
    background: var(--marine);
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.kit-progress-fill--complete {
    background: var(--accent-green);
}

.kit-progress-hint {
    font-size: 0.8125rem;
    color: var(--text-faint);
    margin: 0.5rem 0 0;
}

/* Categories */

.kit-categories {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.kit-category {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

.kit-category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading-accent);
    margin: 0 0 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--border);
}

.kit-category-icon {
    font-size: 1.25rem;
}

/* Checklist items */

.kit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.15s;
}

.kit-item:hover {
    background: var(--bg);
}

.kit-checkbox {
    flex-shrink: 0;
    width: 1.15em;
    height: 1.15em;
    margin: 0.15em 0 0;
    accent-color: var(--marine);
    cursor: pointer;
}

.kit-item-text {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text);
}

.kit-checkbox:checked ~ .kit-item-text {
    color: var(--text-faint);
    text-decoration: line-through;
    text-decoration-color: var(--border);
}

/* Water calculator */

.kit-water-calc {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--marine);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.kit-water-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading-accent);
    margin: 0 0 0.375rem;
}

.kit-water-desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.kit-water-input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.kit-water-label {
    font-size: 0.9375rem;
    color: var(--text);
}

.kit-water-input {
    width: 80px;
    padding: 0.5rem 0.75rem;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    text-align: center;
}

.kit-water-input:focus {
    outline: 2px solid var(--marine);
    outline-offset: 1px;
    border-color: var(--marine);
}

.kit-water-result {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.kit-water-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-accent);
    line-height: 1;
}

.kit-water-unit {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

/* Maintenance */

.kit-maintenance {
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    border-left: 4px solid #f59e0b;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.kit-maintenance-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--warn-text);
    margin: 0 0 0.75rem;
}

.kit-maintenance-list {
    margin: 0;
    padding-left: 1.25rem;
}

.kit-maintenance-list li {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--warn-text-body);
    margin-bottom: 0.375rem;
}

.kit-maintenance-list li:last-child {
    margin-bottom: 0;
}

/* Source */

.kit-source {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.kit-source p {
    font-size: 0.8125rem;
    color: var(--text-faint);
    margin: 0;
    line-height: 1.5;
}

.kit-source a {
    color: var(--text-muted);
}

/* Print */

@media print {
    .kit-progress-card,
    .kit-water-calc,
    .site-header,
    .site-footer {
        display: none;
    }

    .kit-checkbox {
        appearance: none;
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        border: 2px solid #000;
        border-radius: 2px;
        display: inline-block;
    }
}

/* ── Gestes qui sauvent page ────────────── */

.gestes-page {
    max-width: 760px;
}

.gestes-header {
    margin-bottom: 1.5rem;
}

.gestes-header h1,
.gestes-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--heading-accent);
    margin: 0 0 0.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--rouge);
    display: inline-block;
    padding-right: 3rem;
}

.gestes-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

.gestes-intro {
    background: var(--intro-bg);
    border: 1px solid var(--intro-border);
    border-left: 4px solid var(--marine);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text);
}

.gestes-intro p {
    margin: 0;
}

/* 4 étapes */

.gestes-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.gestes-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gestes-step:hover {
    border-color: var(--marine);
    box-shadow: var(--shadow-card-sm);
}

.gestes-step-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--marine);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50%;
}

.gestes-step-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading-accent);
    margin: 0 0 0.375rem;
}

.gestes-step-body p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* Numéros d'urgence */

.gestes-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 1rem;
}

.gestes-urgence {
    margin-bottom: 2.5rem;
}

.gestes-numbers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gestes-number-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    padding: 1.25rem 1rem;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.gestes-number-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.gestes-number-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.gestes-number-label {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gestes-number-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.gestes-number--pompiers { border-color: #E1000F; }
.gestes-number--pompiers .gestes-number-value { color: #E1000F; }
.gestes-number--pompiers:hover { border-color: #E1000F; }

.gestes-number--samu { border-color: #2563eb; }
.gestes-number--samu .gestes-number-value { color: #2563eb; }
.gestes-number--samu:hover { border-color: #2563eb; }

.gestes-number--police { border-color: #1e40af; }
.gestes-number--police .gestes-number-value { color: #1e40af; }
.gestes-number--police:hover { border-color: #1e40af; }

.gestes-number--europe { border-color: #7c3aed; }
.gestes-number--europe .gestes-number-value { color: #7c3aed; }
.gestes-number--europe:hover { border-color: #7c3aed; }

.gestes-number--social { border-color: #059669; }
.gestes-number--social .gestes-number-value { color: #059669; }
.gestes-number--social:hover { border-color: #059669; }

.gestes-alert-info {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Scénarios (accordéons) */

.gestes-scenarios {
    margin-bottom: 2.5rem;
}

.gestes-scenario {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.gestes-scenario-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
    transition: background 0.15s;
}

.gestes-scenario-summary::-webkit-details-marker {
    display: none;
}

.gestes-scenario-summary:hover {
    background: var(--card-alt);
}

.gestes-scenario-summary::after {
    content: '+';
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-faint);
    transition: transform 0.2s;
}

.gestes-scenario[open] .gestes-scenario-summary::after {
    transform: rotate(45deg);
}

.gestes-scenario-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.gestes-scenario-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
}

.gestes-scenario-hint {
    font-size: 0.8125rem;
    color: var(--text-faint);
    margin-left: auto;
    padding-right: 1rem;
}

.gestes-scenario-body {
    padding: 0 1.25rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text);
}

.gestes-scenario-body p {
    margin: 1rem 0 0.5rem;
}

.gestes-scenario-body ol {
    margin: 0.5rem 0 0;
    padding-left: 1.5rem;
}

.gestes-scenario-body li {
    margin-bottom: 0.5rem;
}

.gestes-scenario-body strong {
    color: var(--heading-accent);
}

/* CTA formation */

.gestes-cta {
    background: var(--intro-bg);
    border: 1px solid var(--intro-border);
    border-left: 4px solid var(--rouge);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.gestes-cta p {
    font-size: 0.9375rem;
    color: var(--text);
    margin: 0 0 0.75rem;
}

.gestes-cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--rouge);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.2s, transform 0.2s;
}

.gestes-cta-button:hover {
    background: var(--rouge-dark);
    transform: translateY(-1px);
}

/* Source */

.gestes-source {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.gestes-source p {
    font-size: 0.8125rem;
    color: var(--text-faint);
    margin: 0;
    line-height: 1.5;
}

.gestes-source a {
    color: var(--text-muted);
}

/* Dark mode: numéro colors */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .gestes-number--pompiers .gestes-number-value { color: #FF6B6B; }
    :root:not([data-theme="light"]) .gestes-number--pompiers { border-color: #7f1d1d; }
    :root:not([data-theme="light"]) .gestes-number--pompiers:hover { border-color: #FF6B6B; }
    :root:not([data-theme="light"]) .gestes-number--samu .gestes-number-value { color: #60a5fa; }
    :root:not([data-theme="light"]) .gestes-number--samu { border-color: #1e3a5f; }
    :root:not([data-theme="light"]) .gestes-number--samu:hover { border-color: #60a5fa; }
    :root:not([data-theme="light"]) .gestes-number--police .gestes-number-value { color: #93c5fd; }
    :root:not([data-theme="light"]) .gestes-number--police { border-color: #1e3a5f; }
    :root:not([data-theme="light"]) .gestes-number--police:hover { border-color: #93c5fd; }
    :root:not([data-theme="light"]) .gestes-number--europe .gestes-number-value { color: #a78bfa; }
    :root:not([data-theme="light"]) .gestes-number--europe { border-color: #2e1065; }
    :root:not([data-theme="light"]) .gestes-number--europe:hover { border-color: #a78bfa; }
    :root:not([data-theme="light"]) .gestes-number--social .gestes-number-value { color: #34d399; }
    :root:not([data-theme="light"]) .gestes-number--social { border-color: #064e3b; }
    :root:not([data-theme="light"]) .gestes-number--social:hover { border-color: #34d399; }
}

:root[data-theme="dark"] .gestes-number--pompiers .gestes-number-value { color: #FF6B6B; }
:root[data-theme="dark"] .gestes-number--pompiers { border-color: #7f1d1d; }
:root[data-theme="dark"] .gestes-number--pompiers:hover { border-color: #FF6B6B; }
:root[data-theme="dark"] .gestes-number--samu .gestes-number-value { color: #60a5fa; }
:root[data-theme="dark"] .gestes-number--samu { border-color: #1e3a5f; }
:root[data-theme="dark"] .gestes-number--samu:hover { border-color: #60a5fa; }
:root[data-theme="dark"] .gestes-number--police .gestes-number-value { color: #93c5fd; }
:root[data-theme="dark"] .gestes-number--police { border-color: #1e3a5f; }
:root[data-theme="dark"] .gestes-number--police:hover { border-color: #93c5fd; }
:root[data-theme="dark"] .gestes-number--europe .gestes-number-value { color: #a78bfa; }
:root[data-theme="dark"] .gestes-number--europe { border-color: #2e1065; }
:root[data-theme="dark"] .gestes-number--europe:hover { border-color: #a78bfa; }
:root[data-theme="dark"] .gestes-number--social .gestes-number-value { color: #34d399; }
:root[data-theme="dark"] .gestes-number--social { border-color: #064e3b; }
:root[data-theme="dark"] .gestes-number--social:hover { border-color: #34d399; }

/* Print */

@media print {
    .gestes-scenario {
        break-inside: avoid;
    }
    .gestes-scenario:not([open]) .gestes-scenario-body {
        display: block;
    }
    .gestes-scenario-summary::after {
        display: none;
    }
}

/* ── Vigilance météo page ───────────────── */

.vigilance-page {
    max-width: 900px;
}

.vigilance-header {
    margin-bottom: 1.5rem;
}

.vigilance-header h1,
.vigilance-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--heading-accent);
    margin: 0 0 0.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--rouge);
    display: inline-block;
    padding-right: 3rem;
}

.vigilance-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

.vigilance-intro {
    background: var(--intro-bg);
    border: 1px solid var(--intro-border);
    border-left: 4px solid var(--marine);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text);
}

.vigilance-intro p {
    margin: 0;
}

/* Legend */

.vigilance-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0.75rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.vigilance-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.vigilance-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.vigilance-dot--green { background: #22c55e; }
.vigilance-dot--yellow { background: #eab308; }
.vigilance-dot--orange { background: #f97316; }
.vigilance-dot--red { background: #E1000F; }

.vigilance-level {
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.vigilance-level--green { color: #16a34a; background: #f0fdf4; }
.vigilance-level--yellow { color: #ca8a04; background: #fefce8; }
.vigilance-level--orange { color: #ea580c; background: #fff7ed; }
.vigilance-level--red { color: #E1000F; background: #fef2f2; }

/* Grid of territory cards */

.vigilance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.vigilance-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--marine);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.vigilance-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--rouge);
}

.vigilance-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading-accent);
    margin: 0;
}

.vigilance-card-widget {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    line-height: 0;
    overflow: hidden;
}

.vigilance-card-widget iframe {
    border-radius: 0.25rem;
}

.vigilance-card-link {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: auto;
    transition: color 0.15s;
}

.vigilance-card-link:hover {
    color: var(--marine);
}

/* Source */

.vigilance-source {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.vigilance-source p {
    font-size: 0.8125rem;
    color: var(--text-faint);
    margin: 0;
    line-height: 1.5;
}

.vigilance-source a {
    color: var(--text-muted);
}

/* Dark mode: legend levels */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .vigilance-level--green { color: #4ade80; background: #064e3b; }
    :root:not([data-theme="light"]) .vigilance-level--yellow { color: #facc15; background: #422006; }
    :root:not([data-theme="light"]) .vigilance-level--orange { color: #fb923c; background: #431407; }
    :root:not([data-theme="light"]) .vigilance-level--red { color: #FF6B6B; background: #450a0a; }
}

:root[data-theme="dark"] .vigilance-level--green { color: #4ade80; background: #064e3b; }
:root[data-theme="dark"] .vigilance-level--yellow { color: #facc15; background: #422006; }
:root[data-theme="dark"] .vigilance-level--orange { color: #fb923c; background: #431407; }
:root[data-theme="dark"] .vigilance-level--red { color: #FF6B6B; background: #450a0a; }

/* Responsive */

@media (max-width: 768px) {
    .vigilance-grid {
        grid-template-columns: 1fr;
    }
}
