/* MCP Business France : feuille de style aux couleurs Terrain d'Idées. */
@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
:root {
  --blanc: #ffffff;
  --anthracite: #2d353c;
  --gris-fonce: #2c343b;
  --graphite: #262e35;
  --bleu-vert: #8fb7ba;
  --bleu-vert-fonce: #79a7ab;
  --pastel: #d9e7e8;
  --pastel-clair: #eef5f5;
  --teal: #4b6f7b;
  --cuivre: #cc9966;
  --ligne: #c5d8da;
  --ok: #1f5c40; --ok-fond: #e1f0e8;
  --ko: #8a2d20; --ko-fond: #f8e4e0;
  --alerte: #7a5212; --alerte-fond: #f7ecd8;
  --rayon: 12px;
  --rayon-s: 8px;
  --police: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--police); font-size: 1.0625rem; line-height: 1.6; color: var(--anthracite); background: var(--blanc); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--anthracite); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; color: var(--graphite); margin: 0 0 .6em; font-weight: 700; font-stretch: 85%; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.15rem; font-stretch: 92%; }
p { margin: 0 0 1em; max-width: 72ch; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; background: var(--pastel-clair); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
figure { margin: 0; }
.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.muted { color: var(--teal); }
.small { font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--graphite); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip-link:focus { left: 12px; }

/* En-tete */
.site-header { border-bottom: 1px solid var(--pastel); background: var(--blanc); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; min-height: 76px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--graphite); }
.brand img { width: 168px; }
.brand-product { font-weight: 650; font-stretch: 85%; font-size: 1.05rem; padding-left: 16px; border-left: 1px solid var(--ligne); line-height: 1.2; }
.main-nav { display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; }
.main-nav a { text-decoration: none; color: var(--anthracite); font-weight: 500; }
.main-nav a:hover { color: var(--teal); }
.main-nav a[aria-current="page"] { color: var(--teal); text-decoration: underline; }
.main-nav a.button { color: var(--graphite); }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Boutons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--rayon-s); border: 1px solid var(--bleu-vert); background: var(--bleu-vert); color: var(--graphite); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.2; transition: background-color .15s, border-color .15s; }
.button:hover { background: var(--bleu-vert-fonce); border-color: var(--bleu-vert-fonce); color: var(--graphite); }
.button-dark { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.button-dark:hover { background: var(--anthracite); border-color: var(--anthracite); color: #fff; }
.button-ghost { background: transparent; border-color: var(--anthracite); color: var(--anthracite); }
.button-ghost:hover { background: var(--pastel-clair); border-color: var(--anthracite); color: var(--anthracite); }
.button-danger { background: var(--ko); border-color: var(--ko); color: #fff; }
.button-danger:hover { background: #6e2318; border-color: #6e2318; color: #fff; }
.button-small { padding: 8px 14px; font-size: .95rem; }
.button-block { width: 100%; }
.actions-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.actions-row form { margin: 0; }

/* Messages */
.flash-zone { margin-top: 20px; }
.flash, .notice { border-radius: var(--rayon-s); padding: 12px 16px; margin: 0 0 16px; border-left: 4px solid; max-width: none; }
.flash-ok, .notice-ok { background: var(--ok-fond); border-color: var(--ok); color: var(--ok); }
.flash-err { background: var(--ko-fond); border-color: var(--ko); color: var(--ko); }
.notice-warn { background: var(--alerte-fond); border-color: var(--cuivre); color: var(--alerte); }
.notice-info { background: var(--pastel-clair); border-color: var(--bleu-vert); color: var(--anthracite); }
.notice p { margin: 0 0 8px; max-width: none; }
.notice p:last-child { margin: 0; }
.notice form { margin: 8px 0 0; }

/* Formulaires */
label { display: block; font-weight: 600; margin: 18px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea { width: 100%; padding: 11px 13px; border: 1px solid #a9c3c6; border-radius: var(--rayon-s); font: inherit; color: var(--anthracite); background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: 3px solid rgba(75, 111, 123, .25); outline-offset: 0; }
textarea { min-height: 90px; resize: vertical; }
.field-help { font-size: .88rem; color: var(--teal); margin: 6px 0 0; }
.optional { font-weight: 400; color: var(--teal); }
.checkbox { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 16px 0; }
.checkbox input { width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--teal); }
.checkbox label { margin: 0; font-weight: 400; }
.errors { background: var(--ko-fond); border-left: 4px solid var(--ko); color: var(--ko); padding: 12px 16px; border-radius: var(--rayon-s); margin: 16px 0; }
.errors p { margin: 0 0 6px; font-weight: 600; }
.errors ul { margin: 0; padding-left: 20px; }
.error-text { color: var(--ko); font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-card { background: #fff; border: 1px solid var(--pastel); border-radius: var(--rayon); padding: clamp(24px, 4vw, 40px); }
.form-card h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
.form-card form > .button { margin-top: 24px; }
.auth-page { padding: 48px 0 72px; }
.auth-single { max-width: 580px; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: start; }
.auth-aside { padding-top: 24px; }
.auth-aside h2 { font-size: 1.3rem; }
.plain-list { padding-left: 1.1em; }
.plain-list li { margin-bottom: .5em; }
.consent-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.consent-actions .button, .consent-actions form { flex: 1 1 160px; }
.consent-actions form .button { width: 100%; }
.consent-list { padding-left: 1.1em; }
.switch-account { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: end; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid > .button { justify-self: start; margin-top: 18px; grid-column: 1 / -1; }

/* Accueil */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-title { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.8rem); font-stretch: 78%; font-weight: 750; line-height: 1.03; letter-spacing: -0.02em; margin-bottom: .45em; }
.hero-lead { font-size: 1.2rem; max-width: 52ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero-trust { color: var(--teal); font-size: .95rem; }
.dossier { background: var(--pastel); border-radius: 20px; padding: clamp(18px, 3vw, 28px); }
.dossier-question { margin: 0 0 14px auto; max-width: 88%; background: var(--graphite); color: #fff; border-radius: 16px 16px 4px 16px; padding: 12px 16px; font-size: .98rem; }
.dossier-answer { background: #fff; border-radius: 4px 16px 16px 16px; padding: 18px 20px 8px; }
.dossier-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--pastel); padding-bottom: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.dossier-head strong { font-stretch: 85%; font-size: 1.1rem; color: var(--graphite); }
.dossier-head span { font-variant-numeric: tabular-nums; color: var(--teal); font-size: .9rem; }
.dossier-entry { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--pastel-clair); font-size: .95rem; }
.dossier-entry:last-child { border-bottom: 0; }
.dossier-entry h3 { font-size: .98rem; margin: 0; font-stretch: 100%; grid-column: 1; grid-row: 1; }
.dossier-entry p { margin: 0; grid-column: 1 / -1; }
.source-tag { grid-column: 2; grid-row: 1; justify-self: end; font-size: .78rem; font-weight: 600; color: var(--teal); background: var(--pastel-clair); border: 1px solid var(--pastel); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.dossier-caption { margin: 12px 4px 0; font-size: .85rem; color: var(--teal); }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tint { background: var(--pastel-clair); }
.section-dark { background: var(--graphite); color: #e3eced; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-intro { max-width: 62ch; margin-bottom: 36px; }
.section-dark .section-intro { color: var(--pastel); }
.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.use { border-top: 2px solid var(--graphite); padding: 22px 0 30px; }
.use h3 { margin-bottom: .4em; }
.use-example { margin: 0; color: var(--teal); font-style: italic; }
.sources-list { margin: 0; border-top: 1px solid var(--ligne); }
.source-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, .9fr); gap: 8px 32px; padding: 20px 0; border-bottom: 1px solid var(--ligne); }
.source-row dt { font-weight: 700; font-stretch: 88%; font-size: 1.12rem; color: var(--graphite); }
.source-row dd { margin: 0; }
.source-meta { color: var(--teal); font-size: .92rem; }
.sources-note { margin-top: 20px; color: var(--teal); font-size: .95rem; }
.steps { list-style: none; counter-reset: etape; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: etape; position: relative; padding-top: 64px; }
.steps li::before { content: counter(etape); position: absolute; top: 0; left: 0; font-size: 3rem; font-weight: 800; font-stretch: 75%; line-height: 1; color: var(--teal); }
.steps h3 { margin-bottom: .35em; }
.copy-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon-s); padding: 10px 12px; margin: 10px 0 16px; }
.copy-box code { background: none; padding: 0; font-size: .95rem; flex: 1 1 240px; }
.control-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 56px; }
.control-list li { border-left: 3px solid var(--bleu-vert); padding-left: 18px; }
.control-list strong { display: block; color: #fff; font-size: 1.1rem; margin-bottom: 4px; font-stretch: 90%; }
.about { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.about-photo { background: var(--pastel); border-radius: 20px 20px 0 0; display: flex; justify-content: center; padding-top: 28px; overflow: hidden; }
.about-photo img { width: min(320px, 85%); }
.about-text { padding-bottom: 12px; }
.about-motto { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); font-weight: 750; font-stretch: 78%; color: var(--graphite); line-height: 1.08; margin-bottom: .5em; }

/* Pages internes */
.page { padding: 40px 0 80px; }
.page-head { margin-bottom: 24px; }
.panel { border: 1px solid var(--pastel); border-radius: var(--rayon); padding: clamp(20px, 3vw, 32px); margin-bottom: 24px; background: #fff; }
.panel h2 { font-size: 1.35rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.steps-small { padding-left: 1.2em; margin: 0; }
.steps-small li { margin-bottom: .4em; }
.legal { max-width: 780px; }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.dl-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
.dl-grid dt { color: var(--teal); }
.dl-grid dd { margin: 0; overflow-wrap: anywhere; }
.placeholder { background: var(--alerte-fond); color: var(--alerte); padding: 0 .3em; border-radius: 4px; }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: 12px 0; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-weight: 650; color: var(--graphite); border-bottom: 2px solid var(--pastel); padding: 8px 10px; white-space: nowrap; }
.table td { border-bottom: 1px solid var(--pastel-clair); padding: 9px 10px; vertical-align: top; }
.table tbody tr:hover td { background: #f8fbfb; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-action { text-align: right; white-space: nowrap; }
.cell-action form { margin: 0; }
.cell-message { max-width: 380px; overflow-wrap: anywhere; }

/* Etiquettes d'etat */
.badge { display: inline-block; font-size: .8rem; font-weight: 650; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--ok-fond); color: var(--ok); }
.badge-err { background: var(--ko-fond); color: var(--ko); }
.badge-warn { background: var(--alerte-fond); color: var(--alerte); }
.badge-neutral { background: #e7eef0; color: #3d5560; }

/* Administration */
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding: 32px 0 80px; }
.admin-nav { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { text-decoration: none; color: var(--anthracite); padding: 9px 12px; border-radius: var(--rayon-s); font-weight: 500; }
.admin-nav a:hover { background: var(--pastel-clair); }
.admin-nav a[aria-current="page"] { background: var(--graphite); color: #fff; }
.admin-main h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { border: 1px solid var(--pastel); border-radius: var(--rayon); padding: 16px 18px; }
.kpi-value { font-size: 2rem; font-weight: 750; font-stretch: 80%; color: var(--graphite); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { color: var(--teal); font-size: .9rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--bleu-vert); }
.chart .bar-err { fill: var(--cuivre); }
.chart-legend { display: flex; gap: 18px; font-size: .85rem; color: var(--teal); margin-top: 8px; }
.legend-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend-ok { background: var(--bleu-vert); }
.legend-err { background: var(--cuivre); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.filters .field { display: flex; flex-direction: column; min-width: 160px; }
.filters label { margin: 0 0 4px; font-size: .88rem; }
.filters .checkbox { margin: 0 0 10px; }
.fieldset { border: 1px solid var(--pastel); border-radius: var(--rayon); padding: 8px 20px 20px; margin: 0 0 24px; }
.fieldset legend { font-weight: 700; font-stretch: 88%; font-size: 1.15rem; padding: 0 8px; color: var(--graphite); }
.radio-list label { font-weight: 400; display: flex; gap: 10px; margin: 10px 0; align-items: flex-start; }
.radio-list input { margin-top: 5px; accent-color: var(--teal); }
.link-box { background: var(--pastel-clair); border-radius: var(--rayon-s); padding: 12px 14px; overflow-wrap: anywhere; }

/* Pied de page */
.site-footer { background: var(--gris-fonce); color: var(--pastel); padding: 48px 0 32px; }
.site-footer a { color: var(--pastel); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .8fr)); gap: 32px; }
.footer-grid img { width: 168px; margin-bottom: 14px; }
.footer-grid h2 { font-size: 1rem; color: #fff; font-stretch: 95%; margin-bottom: .6em; }
.footer-grid nav a { display: block; margin-bottom: 6px; text-decoration: none; }
.footer-grid nav a:hover { text-decoration: underline; }
.footer-note { grid-column: 1 / -1; border-top: 1px solid #44505a; padding-top: 18px; font-size: .88rem; color: #b8cbcd; }
.footer-note p { max-width: none; margin: 0 0 6px; }

@media (max-width: 900px) {
  .hero-grid, .auth-split, .about, .uses, .two-cols, .control-list, .admin-layout, .footer-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .source-row { grid-template-columns: 1fr; gap: 4px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .about-photo { max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { .site-header, .site-footer, .admin-nav { display: none; } }
