/* Polices auto-hébergées (licence SIL OFL) */
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/ibm-plex-mono.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Sans';font-style:italic;font-weight:400;font-display:swap;src:url(../fonts/ibm-plex-sans-italic.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/ibm-plex-sans.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/ibm-plex-sans.woff2) format('woff2')}
@font-face{font-family:'Sora';font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/sora.woff2) format('woff2')}
@font-face{font-family:'Sora';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/sora.woff2) format('woff2')}

/* Mise en page : bandeau d'en-tête sobre, colonne de lecture ~68ch, cartes réservées aux offres. */
:root {
  --paper: #f4f6f7;
  --surface: #ffffff;
  --ink: #0f1d2a;
  --muted: #4c5d6b;
  --line: #d6dee4;
  --accent: #1d6a85;
  --accent-ink: #ffffff;
  --band: #0f1d2a;
  --band-ink: #e8eef2;
  --band-muted: #9fb3c2;
  --mark: #3fa3c4;
  --f-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --measure: 68ch;
  --wide: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1620; --surface: #122230; --ink: #e6edf2; --muted: #a2b3c0; --line: #24394a;
    --accent: #5bb6d6; --accent-ink: #08131c; --band: #08111a; --band-ink: #e6edf2; --band-muted: #8fa5b5; --mark: #5bb6d6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1620; --surface: #122230; --ink: #e6edf2; --muted: #a2b3c0; --line: #24394a;
  --accent: #5bb6d6; --accent-ink: #08131c; --band: #08111a; --band-ink: #e6edf2; --band-muted: #8fa5b5; --mark: #5bb6d6;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--wide);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

/* En-tête */
.site-header { background: var(--band); color: var(--band-ink); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 18px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0; color: var(--band-ink); text-decoration: none; }
.brand svg { flex: none; }
.brand-logo { display: block; height: 48px; width: auto; flex: none; }
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.01em; line-height: 1; }
.brand-sub { display: block; margin-top: 2px; font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--band-muted); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a { color: var(--band-ink); text-decoration: none; font-size: 0.95rem; padding-block: 4px; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--band-muted); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--mark); }

/* Bandeau de page */
.page-head { background: var(--band); color: var(--band-ink); border-top: 1px solid color-mix(in srgb, var(--band-muted) 25%, transparent); }
.page-head .wrap { padding-block: 48px 56px; }
.eyebrow { font-family: var(--f-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mark); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); max-width: 24ch; letter-spacing: -0.01em; }
.home h1 { max-width: 30ch; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
.lede { color: var(--band-muted); font-size: 1.125rem; max-width: var(--measure); margin: 20px 0 0; }
h2 { font-size: 1.5rem; margin-top: 8px; }
h3 { font-size: 1.1rem; }

/* Contenu */
main .wrap { padding-block: 48px 64px; }
.prose { max-width: var(--measure); }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.1em; }
.section-gap { margin-top: 56px; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; max-width: var(--measure); border-top: 1px solid var(--line); }
.checklist li { padding: 14px 0 14px 30px; border-bottom: 1px solid var(--line); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 1.3em; width: 10px; height: 2px; background: var(--accent); }
.checklist strong { font-weight: 600; }

/* Offres */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 24px; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.service .code { font-family: var(--f-mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.18em; color: var(--accent); }
.service h3 { font-size: 1.05rem; }
.service p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.service .more { margin-top: auto; padding-top: 8px; font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.service .more:hover { text-decoration: underline; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 20px; max-width: var(--measure); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0 0; }
.chips li { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.06em; border: 1px solid var(--line); background: var(--surface); padding: 3px 10px; border-radius: 3px; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px 40px; margin-top: 8px; }
.feature { border-top: 2px solid var(--ink); padding-top: 14px; min-width: 0; }
.feature p { margin: 8px 0 0; color: var(--muted); }

/* Bloc contact */
.contact { margin-top: 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 26px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.contact p { margin: 0; }
.contact .q { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; }
.contact .addr { font-family: var(--f-mono); font-size: 0.9rem; color: var(--muted); user-select: all; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; padding: 11px 20px; border-radius: 4px; border: 1px solid var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); }
.page-head .btn { margin-top: 28px; }
.page-head .actions .btn { margin-top: 0; }
.btn.ghost-light { background: transparent; color: var(--band-ink); border-color: var(--band-muted); }

/* A propos */
.about { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
@media (min-width: 860px) { .about { grid-template-columns: minmax(0, 1fr) 280px; } }
.portrait { margin: 0; }
.portrait img { width: 100%; max-width: 280px; display: block; border-radius: 50%; }
.portrait figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }
.portrait figcaption strong { display: block; color: var(--ink); font-family: var(--f-display); font-weight: 600; font-size: 1rem; }
.timeline { list-style: none; padding: 0; margin: 0; max-width: var(--measure); border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.timeline .when { display: block; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.timeline p { margin: 2px 0 0; }

/* Mentions légales */
.legal h2 { font-size: 1.15rem; margin-top: 2em; }
.legal dl { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 20px; margin: 0; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
@media (max-width: 520px) { .legal dl { grid-template-columns: minmax(0, 1fr); } .legal dd { margin-bottom: 8px; } }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 28px; font-size: 0.9rem; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Pastille livre (accueil) */
.home .page-head .wrap { position: relative; }
.book-badge { display: inline-grid; place-items: center; width: 168px; height: 168px; margin-top: 32px; padding: 26px; text-align: center; text-decoration: none; background: var(--mark); color: var(--band); clip-path: polygon(50.0% 0.0%, 56.9% 6.5%, 65.5% 2.4%, 70.0% 10.8%, 79.4% 9.5%, 81.1% 18.9%, 90.5% 20.6%, 89.2% 30.0%, 97.6% 34.5%, 93.5% 43.1%, 100.0% 50.0%, 93.5% 56.9%, 97.6% 65.5%, 89.2% 70.0%, 90.5% 79.4%, 81.1% 81.1%, 79.4% 90.5%, 70.0% 89.2%, 65.5% 97.6%, 56.9% 93.5%, 50.0% 100.0%, 43.1% 93.5%, 34.5% 97.6%, 30.0% 89.2%, 20.6% 90.5%, 18.9% 81.1%, 9.5% 79.4%, 10.8% 70.0%, 2.4% 65.5%, 6.5% 56.9%, 0.0% 50.0%, 6.5% 43.1%, 2.4% 34.5%, 10.8% 30.0%, 9.5% 20.6%, 18.9% 18.9%, 20.6% 9.5%, 30.0% 10.8%, 34.5% 2.4%, 43.1% 6.5%); transform: rotate(-8deg); transition: transform .2s ease; }
.book-badge:hover, .book-badge:focus-visible { transform: rotate(0deg) scale(1.04); }
.book-badge span { display: block; }
.book-badge .k { font-family: var(--f-mono); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; }
.book-badge .t { font-family: var(--f-display); font-weight: 600; font-size: 1rem; line-height: 1.2; margin-top: 4px; }
@media (min-width: 960px) { .book-badge { position: absolute; right: max(32px, env(safe-area-inset-right, 0px)); top: 50%; margin-top: -84px; width: 190px; height: 190px; } .book-badge .t { font-size: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { .book-badge, .book-badge:hover { transform: none; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Actualités */
.news-list { display: grid; gap: 16px; max-width: 820px; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
.news-card h2, .news-card h3 { font-size: 1.25rem; margin: 0; }
.news-card h2 a, .news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h2 a:hover, .news-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.news-card p { margin: 0; color: var(--muted); }
.news-card .more { font-weight: 600; text-decoration: none; margin-top: 4px; }
.news-date { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent) !important; }
.byline { color: var(--muted); font-size: 0.95rem; margin: 0 0 28px; max-width: var(--measure); }
.article h2 { font-size: 1.4rem; margin-top: 2em; }
.article ul, .article ol { padding-left: 1.3em; }
.article li + li { margin-top: 0.5em; }
.article blockquote { margin: 2em 0 0; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.article blockquote p { margin: 0; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.article table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.95rem; }
.article th, .article td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.article th { font-family: var(--f-display); font-weight: 600; border-bottom: 2px solid var(--ink); }
.article td:last-child { font-variant-numeric: tabular-nums; }
