/* =====================================================================
   3SR — feuille de style du site (maquette A « Clarté »)
   Design system complet : voir docs/03-design-system.md
   Un seul fichier, aucune dépendance. Thèmes clair et sombre (v1.0), pilotés par les jetons.
   ===================================================================== */

/* ---------- Polices (auto-hébergées, OFL 1.1) ---------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Jetons (tokens) ---------- */
:root {
  color-scheme: light;

  /* Couleurs — charte 3SR */
  --navy: #203B5F;        /* marine : titres, aplats forts, bouton principal */
  --navy-deep: #14263D;   /* pied de page */
  --blue: #3765A3;        /* accent : liens, pictos, bouton secondaire plein */
  --blue-light: #678AB9;  /* accent doux (filets de méthode) */
  --green: #A9CB5B;       /* vert 3SR : sur fond sombre, jalons */
  --red: #C31315;         /* réservé aux erreurs */
  --ink: #1B2A3F;         /* texte fort */
  --text: #3E4C5E;        /* texte courant */
  --muted: #5F6B7A;       /* texte secondaire */
  --line: #D5DEEA;        /* filets */
  --line-strong: #B9C7DB; /* bordures de champs */
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;     /* fonds de héros */
  --bg-pale: #EEF3F9;     /* fonds de section, pastilles d'icône */
  --on-dark: #FFFFFF;
  --on-dark-muted: #C9D4E3;
  --success-bg: #EEF6E3;
  --success-ink: #2F5A10;
  --error-bg: #FBECEC;

  /* Jetons sémantiques (v1.0) : en thème clair, mêmes valeurs qu'avant (aucun changement visuel) ; le thème sombre les redéfinit. */
  --heading: var(--navy);       /* titres et libellés forts */
  --link: var(--blue);          /* liens, kickers, pictogrammes, numéros, anneaux de focus */
  --fill-strong: var(--navy);   /* aplats marine : bouton principal, tuile marine, bandeau, filets de méthode */
  --surface: var(--bg);         /* cartes, panneaux, champs, menu mobile */

  /* Typographie */
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-display: clamp(2.125rem, 1.4rem + 2.4vw, 3.125rem); /* 34 → 50, comme le H1 des pages intérieures (v1.0b) */
  --fs-h1: clamp(2rem, 1.3rem + 2.4vw, 3.125rem);        /* 32 → 50, pages intérieures */
  --fs-h2: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);      /* 28 → 44 */
  --fs-h3: 1.375rem;   /* 22 */
  --fs-lead: 1.1875rem;/* 19 */
  --fs-body: 1rem;     /* 16 */
  --fs-small: .875rem; /* 14 */
  --fs-kicker: .8125rem; /* 13 */

  /* Espacements (base 8) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 2.5rem; --s-8: 3.5rem; --s-9: 4.5rem; --s-10: 6.5rem;
  --section-y: clamp(4rem, 2.5rem + 5vw, 6.5rem);

  /* Formes */
  --r-tile: 4px; --r-btn: 8px; --r-card: 10px; --r-panel: 12px;
  --container: 1240px;
  --gutter: 24px;
  --shadow-header: 0 1px 0 var(--line), 0 6px 18px rgba(20, 38, 61, .06);
}
@media (max-width: 640px) { :root { --gutter: 20px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs-body); line-height: 1.6; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--heading); text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--heading); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--green); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 100; background: var(--fill-strong); color: var(--on-dark); padding: 12px 18px; border-radius: var(--r-btn); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; color: var(--on-dark); }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--pale { background: var(--bg-pale); }
.section--line { border-top: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }

/* ---------- Typographie utilitaire ---------- */
.kicker { font-size: var(--fs-kicker); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--link); }
.on-dark .kicker { color: var(--green); }
.display { font-size: var(--fs-display); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.h1 { font-size: var(--fs-h1); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.h2 { font-size: var(--fs-h2); line-height: 1.12; font-weight: 800; letter-spacing: -.015em; }
.h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 700; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--text); max-width: 36em; }
.body { color: var(--text); max-width: 40em; }
.small { font-size: var(--fs-small); color: var(--muted); }
.section-head { display: flex; flex-direction: column; gap: var(--s-3); max-width: 50rem; margin-bottom: var(--s-8); }
.section-head .lead { margin-top: var(--s-2); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 14px 24px; border-radius: var(--r-btn); border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--fill-strong); color: var(--on-dark); }
.btn--primary:hover { background: #16304F; color: var(--on-dark); }
.btn--accent { background: var(--blue); color: var(--on-dark); }
.btn--accent:hover { background: #2C5690; color: var(--on-dark); }
.btn--ghost { background: var(--surface); color: var(--heading); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--navy); color: var(--heading); }
.btn--green { background: var(--green); color: var(--ink); }
.btn--green:hover { background: #BBD978; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; text-decoration: none; color: var(--link); }
.link-arrow svg { width: 18px; height: 18px; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: var(--shadow-header); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--heading); flex: none; }
.brand img { width: 46px; height: 46px; }
.brand__name { font-weight: 800; font-size: 1.125rem; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: var(--s-6); }
.nav__list { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9375rem; border-bottom: 2px solid transparent; }
.nav__link:hover { color: var(--link); }
.nav__link[aria-current="page"] { color: var(--heading); border-bottom-color: var(--green); }
.nav__link svg { width: 14px; height: 14px; color: var(--muted); }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1.5px solid var(--line-strong); border-radius: var(--r-btn); background: var(--surface); color: var(--heading); cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
@media (max-width: 1279px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-header); flex-direction: column; align-items: stretch; gap: var(--s-4); padding: var(--s-4) max(var(--gutter), env(safe-area-inset-right, 0px)) var(--s-6) max(var(--gutter), env(safe-area-inset-left, 0px)); max-height: calc(100vh - 76px); overflow-y: auto; }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li + li { border-top: 1px solid var(--line); }
  .nav__link { width: 100%; min-height: 56px; font-size: 1.0625rem; border-bottom: 0; }
  .nav__link[aria-current="page"] { box-shadow: inset 4px 0 0 var(--green); padding-left: 14px; }
  .nav .btn { width: 100%; }
}
/* v1.0 : bouton de thème après le menu : à droite de la barre sur ordinateur (le menu garde l'espace libre), collé au bouton de menu sur mobile. */
.nav { margin-left: auto; }
@media (max-width: 1279px) {
  .nav-toggle { margin-left: auto; }
  .theme-toggle { margin-left: calc(var(--s-3) - var(--s-5)); }
}
/* Sans JavaScript : menu déplié dans le flux, règles dans no-js.css (chargé par <noscript>). Ici, le menu est replié
   dès le premier affichage, sans attendre site.js : plus de décalage de mise en page sous 1280 px. */

/* ---------- Héros d'accueil ---------- */
.hero { background: var(--bg-soft); }
.hero__grid { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(2.5rem, 5vw, 4rem); padding-block: clamp(3.5rem, 2rem + 5vw, 6rem); }
.hero__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.hero__text .btn-row { margin-top: var(--s-3); }
/* v1.0b : signature sous le titre (anglais, Montserrat 800). Vert 3SR en filet seulement : en texte il ne passe pas le contraste sur fond clair. */
.hero__signature { margin: calc(var(--s-3) * -1) 0 0; padding-left: .6em; border-left: 4px solid var(--green); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 800; line-height: 1.2; color: var(--link); }
.hero__badge { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-3); }
.hero__badge img { height: 36px; width: auto; }
.hero__badge span { font-size: var(--fs-small); color: var(--muted); max-width: 22em; line-height: 1.45; }
.tiles { flex: 1 1 420px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4); aspect-ratio: 1 / 1; max-width: 100%; padding: clamp(18px, 2.4vw, 28px); border-radius: var(--r-tile); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 38, 61, .14); }
.tile svg { width: 36px; height: 36px; }
.tile__title { display: block; font-size: clamp(1.0625rem, .8rem + 1vw, 1.375rem); font-weight: 700; line-height: 1.25; hyphens: auto; overflow-wrap: break-word; }
.tile__sub { display: block; font-size: clamp(.8125rem, .75rem + .3vw, .9375rem); margin-top: 6px; line-height: 1.4; }
.tile__go { position: absolute; top: clamp(18px, 2.4vw, 28px); right: clamp(18px, 2.4vw, 28px); width: 22px !important; height: 22px !important; opacity: .7; }
.tile--navy { background: var(--fill-strong); color: var(--on-dark); }
.tile--navy .tile__sub { color: var(--on-dark-muted); }
.tile--navy .tile__icon { color: var(--green); }
.tile--blue { background: var(--blue); color: var(--on-dark); }
.tile--blue .tile__sub { color: #E4ECF7; }
.tile--pale { background: var(--bg-pale); color: var(--heading); }
.tile--pale .tile__sub { color: var(--text); }
.tile--pale .tile__icon { color: var(--link); }
.tile--green { background: var(--green); color: var(--ink); }
@media (max-width: 420px) { .tile__sub { display: none; } }

/* ---------- Bandeau de preuves ---------- */
.proof { border-bottom: 1px solid var(--line); }
.proof__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-6) var(--s-7); padding-block: var(--s-6); }
.proof__badge { height: 44px; width: auto; flex: none; }
.proof__item { flex: 1 1 150px; min-width: 0; }
.proof__value { font-size: 2rem; font-weight: 800; color: var(--heading); line-height: 1.1; font-variant-numeric: tabular-nums; }
.proof__label { font-size: var(--fs-small); color: var(--muted); margin-top: 4px; line-height: 1.45; }
.proof__item--wide { flex-basis: 240px; }
.proof__item--wide .proof__value { font-size: 1rem; line-height: 1.35; }

/* ---------- Cartes d'offre ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: var(--s-4); padding: 32px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.card__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--r-btn); background: var(--bg-pale); color: var(--link); flex: none; }
.card__icon svg { width: 26px; height: 26px; }
.card p { color: var(--text); }
.card ul { margin: 0; padding-left: 1.1em; color: var(--ink); font-size: .9375rem; line-height: 1.9; }
.card .link-arrow { margin-top: auto; padding-top: var(--s-2); }
.card--link { transition: border-color .15s, box-shadow .15s; }
.card--link:hover { border-color: var(--line-strong); box-shadow: 0 8px 22px rgba(20, 38, 61, .08); }

/* Liste de prestations (pages intérieures) */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s-6) var(--s-7); }
.feature { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.feature h3 { font-size: 1.1875rem; line-height: 1.35; font-weight: 700; margin-bottom: 6px; }
.feature p { color: var(--text); }

/* ---------- Méthode (séquence réelle → numérotée) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s-5); counter-reset: step; }
.step { padding-top: 22px; border-top: 4px solid var(--fill-strong); }
.step:nth-child(2) { border-top-color: var(--blue); }
.step:nth-child(3) { border-top-color: var(--blue-light); }
.step:nth-child(4) { border-top-color: var(--green); }
.step__num { font-size: .875rem; font-weight: 800; color: var(--link); font-variant-numeric: tabular-nums; }
.step__title { font-size: 1.3125rem; font-weight: 700; color: var(--heading); margin-top: 8px; }
.step__desc { margin-top: 10px; color: var(--text); font-size: .9375rem; }

/* ---------- Applications ISV ---------- */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.app { display: flex; flex-direction: column; gap: var(--s-3); padding: 26px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.app:hover { border-color: var(--link); box-shadow: 0 8px 22px rgba(20, 38, 61, .08); color: var(--ink); }
.app__name { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: 1.1875rem; font-weight: 700; color: var(--heading); }
.app__name svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.app p { color: var(--text); font-size: .9375rem; }
.app__tag { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--link); background: var(--bg-pale); border-radius: 999px; padding: 4px 10px; }

/* ---------- Bandeau marine ---------- */
.band { background: var(--fill-strong); color: var(--on-dark); }
.band__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-6) var(--s-8); padding-block: clamp(3.5rem, 2rem + 4vw, 5.5rem); }
.band__text { flex: 1 1 560px; min-width: 0; font-size: clamp(1.375rem, 1rem + 1.4vw, 2.125rem); line-height: 1.35; font-weight: 600; color: var(--on-dark); }
.band__text .kicker { display: block; margin-bottom: var(--s-4); }

/* ---------- Partenaires ---------- */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.partner { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-card); }
.partner__name { font-size: 1.125rem; font-weight: 800; color: var(--heading); letter-spacing: -.005em; }
.partner p { color: var(--text); font-size: .9375rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .9375rem; font-weight: 600; color: var(--heading); background: var(--surface); }

/* ---------- Pages intérieures ---------- */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-hero__grid { display: flex; flex-wrap: wrap; gap: var(--s-7) var(--s-8); align-items: flex-end; padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) clamp(3rem, 2rem + 4vw, 5rem); }
.page-hero__text { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.page-hero__aside { flex: 0 1 360px; min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: var(--fs-small); color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--heading); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 28px; display: flex; flex-direction: column; gap: var(--s-4); }
.panel__title { font-size: var(--fs-kicker); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--link); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--ink); font-size: .9375rem; line-height: 1.5; }
.checklist svg { width: 20px; height: 20px; color: var(--link); margin-top: 2px; }
.badge-callout { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); padding: 24px 28px; border-radius: var(--r-panel); background: var(--bg-pale); }
.badge-callout img { height: 40px; width: auto; }
.badge-callout div { flex: 1 1 280px; min-width: 0; }
.badge-callout strong { display: block; color: var(--heading); }
.two-col { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-7) var(--s-9); }
.two-col > * { flex: 1 1 380px; min-width: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; padding-block: 18px; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.0625rem; color: var(--heading); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 22px; height: 22px; color: var(--link); flex: none; transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details > div { padding-bottom: 22px; color: var(--text); max-width: 44em; }

/* Texte long (mentions, politiques, fiches applis) */
.prose { max-width: 46rem; color: var(--text); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.5rem; line-height: 1.25; font-weight: 800; color: var(--heading); margin-top: 2em; }
.prose h3 { font-size: 1.1875rem; line-height: 1.35; font-weight: 700; color: var(--heading); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose strong { color: var(--ink); }
.prose .meta { font-size: var(--fs-small); color: var(--muted); }
.prose dl { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 10px 24px; }
.prose dt { font-weight: 700; color: var(--ink); }
.prose dd { margin: 0; }
@media (max-width: 640px) { .prose dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .prose dd { margin-bottom: 12px; } }
.note { padding: 16px 20px; border-radius: var(--r-btn); background: var(--bg-pale); color: var(--ink); font-size: .9375rem; }

/* ---------- Contact ---------- */
.contact { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.contact__info { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.contact__list { display: flex; flex-direction: column; gap: var(--s-5); margin-top: var(--s-4); font-size: 1rem; line-height: 1.5; }
.contact__list > div { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; }
.contact__list svg { width: 22px; height: 22px; color: var(--link); margin-top: 1px; }
.contact__label { font-weight: 700; color: var(--heading); }
.contact__list p:not(.contact__label) { color: var(--text); }
.form { flex: 1 1 520px; min-width: 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 20px; }
.form__row { display: flex; flex-wrap: wrap; gap: 20px; }
.form__row > .field { flex: 1 1 210px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: var(--fs-small); font-weight: 600; color: var(--heading); }
.field .opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--r-btn); padding: 0 14px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--heading) 50%), linear-gradient(135deg, var(--heading) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { padding: 12px 14px; min-height: 140px; resize: vertical; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--blue-light); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid rgba(55, 101, 163, .35); outline-offset: 0; border-color: var(--link); }
.field [aria-invalid="true"] { border-color: var(--red); background: #FFFCFC; }
.field__error { font-size: var(--fs-small); color: var(--red); font-weight: 600; }
.field__error:empty { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }
.form__legal { flex: 1 1 260px; font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.form__status { border-radius: var(--r-btn); padding: 14px 16px; font-weight: 600; font-size: .9375rem; }
.form__status:empty { display: none; }
.form__status--ok { background: var(--success-bg); color: var(--success-ink); }
.form__status--err { background: var(--error-bg); color: var(--red); }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.btn .spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: none; }
.btn[aria-busy="true"] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-dark-muted); }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); text-decoration: underline; }
.footer__grid { display: flex; flex-wrap: wrap; gap: var(--s-7) var(--s-8); justify-content: space-between; padding-block: var(--s-8) var(--s-7); }
.footer__brand { flex: 1 1 260px; display: flex; flex-direction: column; gap: var(--s-4); font-size: var(--fs-small); line-height: 1.6; }
.footer__brand img { width: 56px; height: 56px; }
.footer__col { flex: 1 1 160px; }
.footer__title { font-size: var(--fs-kicker); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark); }
.footer__col ul { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-small); }
.footer__col a { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; }
.footer__col svg { width: 13px; height: 13px; opacity: .7; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-6); padding-block: 20px 32px; border-top: 1px solid #2B4466; font-size: .8125rem; }

/* ---------- 404 ---------- */
.notfound { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-5); padding-block: clamp(4rem, 3rem + 6vw, 8rem); }
.notfound__code { font-size: clamp(4rem, 2rem + 8vw, 8rem); font-weight: 800; line-height: 1; color: var(--bg-pale); -webkit-text-stroke: 2px var(--line-strong); }

/* ---------- Utilitaires complémentaires (pas de style en ligne : CSP style-src 'self') ---------- */
.stack--lg { gap: var(--s-7); }
.apps__more { margin-top: 20px; }
.panel__badge { height: 40px; width: auto; align-self: flex-start; }
.chips a { text-decoration: none; color: inherit; }

/* ---------- v0.2 : badges Microsoft, pied de section, partenaires avec logo ---------- */
/* Règles Microsoft : badge ≥ 130 px de large, jamais retouché, espace libre ≥ 2 symboles Microsoft, fond uni. */
.badges { padding-block: 0 var(--s-6); }
.badges__list { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 40px 48px; list-style: none; margin: 0; padding: 0; }
.badges__list img { width: 180px; height: auto; max-width: 100%; }
.badges__caption { margin-top: var(--s-4); max-width: 60em; }
@media (max-width: 640px) { .badges__list { gap: 32px; } .badges__list img { width: 150px; } }
.section-foot { margin-top: var(--s-7); }
.partner__logo { display: flex; align-items: center; height: 56px; margin-bottom: 8px; }
.partner__logo img { max-height: 56px; max-width: 180px; width: auto; height: auto; }
.partner__logo--text { font-size: 1.25rem; font-weight: 800; color: var(--heading); letter-spacing: -.01em; }
.partner .link-arrow { margin-top: 6px; font-size: .9375rem; }
.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.panel__badge-lg { width: 220px; height: auto; max-width: 100%; align-self: flex-start; }
.nav__link { white-space: nowrap; }
.nav .btn { white-space: nowrap; }
.contact > noscript { grid-column: 1 / -1; }
.form__noscript { font-weight: 700; color: var(--heading); }
@media (min-width: 960px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
/* Tableaux et liens longs des textes juridiques (politiques des applications, v0.4.1) */
.prose a { overflow-wrap: anywhere; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-top: var(--s-4); font-size: .9375rem; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--heading); background: var(--bg-soft); }
.prose pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-tile); font-size: .875rem; }

/* ---------- Police mono des animations (JetBrains Mono, SIL OFL 1.1) ---------- */
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }

/* ---------- Animations motion design (v0.6) : remplace le bloc « Animations motion design (v0.5) » de site.css ----------
   Avec JavaScript : le canvas, lu une fois quand la figure devient visible ; l'emplacement est réservé par aspect-ratio (aucun CLS).
   Sans JavaScript : le poster contenu dans <noscript>. */
.motion { position: relative; margin: 0 0 var(--s-7); aspect-ratio: 16 / 9; }
.motion canvas { display: none; width: 100%; height: 100%; }
.motion--live canvas { display: block; }
.motion__poster, .motion__poster img { display: block; width: 100%; height: 100%; object-fit: contain; }
.motion__ctrl { position: absolute; right: 12px; bottom: 12px; padding: 6px 14px; font: 600 .8125rem/1.2 var(--font); color: var(--heading); background: rgba(255, 255, 255, .92); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
.motion__ctrl:hover { border-color: var(--navy); }
.motion__ctrl:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
@media (max-width: 719px) { .motion { aspect-ratio: 4 / 5; } }

/* ---------- Accueil : liste des expertises (v0.6) ----------
   Même langage visuel que les anciennes étapes (.step) : numéro, titre, description, lien.
   Jetons existants de site.css uniquement (aucune nouvelle couleur). */
.expertises { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: none; }
.expertise { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.expertise__num { margin: 0; font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--link); }
.expertise__title { margin: 0; font-size: 1.125rem; font-weight: 700; color: var(--heading); }
.expertise__desc { margin: 0; flex: 1; }
.expertise .link-arrow { margin-top: var(--s-2); }
@media (max-width: 1023px) { .expertises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) { .expertises { grid-template-columns: 1fr; } }

/* ---------- v0.6 : panneau sous une grille de cartes, partenaires regroupés par domaine ---------- */
.panel--after { margin-top: var(--s-6); }
.partners__domain { margin: var(--s-6) 0 var(--s-4); }
.partners__domain:first-of-type { margin-top: 0; }
.partner__relation { margin: 0; font-size: .8125rem; font-weight: 700; color: var(--link); }

/* ---------- Thème sombre (v1.0) : posé par /assets/js/theme.js sur <html data-theme="dark">. Source : kit v1.0b. ---------- */
/* 2. Thème sombre : posé par /assets/js/theme.js sur <html data-theme="dark">.
      Sans JavaScript, la page reste en thème clair (pas de repli prefers-color-scheme dans le CSS). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1D30;          /* sections « blanches » (lu aussi par les animations) */
  --bg-soft: #13243A;     /* héros */
  --bg-pale: #172B45;     /* sections pâles (lu aussi par les animations) */
  --surface: #13243A;     /* cartes, panneaux, champs */
  --ink: #EEF3F9;
  --text: #C9D4E3;
  --muted: #A3B3C8;
  --line: #2A4566;
  --line-strong: #5A80B0;  /* bordures de champs et boutons : ≥ 3:1 (WCAG 1.4.11) */
  --heading: #FFFFFF;
  --link: #8DB3E8;        /* contraste ≥ 6:1 sur --bg, --bg-soft et --bg-pale */
  --fill-strong: #203B5F; /* marine : bordé d'un filet --line-strong sur les boutons */
  --navy-deep: #0A1524;   /* pied de page */
  --success-bg: #1F3418;
  --success-ink: #CFE6A6;
  --error-bg: #3A1B1E;
  --shadow-header: 0 1px 0 var(--line), 0 6px 18px rgba(0, 0, 0, .35);
}

/* 3. Composants dont la couleur ne doit PAS suivre --ink (fonds clairs fixes) */
.tile--green, .btn--green { color: #1B2A3F; }                 /* texte foncé sur vert, dans les deux thèmes */
:root[data-theme="dark"] .tile--green .tile__sub { color: #2B3A4F; }
:root[data-theme="dark"] .btn--primary { border-color: var(--line-strong); }
:root[data-theme="dark"] .btn--primary:hover { background: #2A4A75; }
:root[data-theme="dark"] .btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
:root[data-theme="dark"] a:hover { color: var(--ink); }
:root[data-theme="dark"] .field [aria-invalid="true"] { border-color: #FF8A80; background: var(--error-bg); }

/* 4. Logos partenaires : toujours sur une plaque blanche en thème sombre (logos officiels, jamais recolorés).
      Les badges Microsoft ne changent pas : leur image porte déjà son propre fond blanc. */
:root[data-theme="dark"] .partner__logo { align-self: flex-start; background: #FFFFFF; border-radius: var(--r-tile); padding: 10px 14px; }
:root[data-theme="dark"] .partner__logo--text { color: #203B5F; }

/* 5. Logo 3SR de l'en-tête : version blanche en thème sombre (deux <img>, une seule visible) */
.brand__logo--dark { display: none; }
:root[data-theme="dark"] .brand__logo--light { display: none; }
:root[data-theme="dark"] .brand__logo--dark { display: block; }

/* 6. Bouton de lecture des animations */
:root[data-theme="dark"] .motion__ctrl { color: var(--ink); background: rgba(15, 29, 48, .9); border-color: var(--line-strong); }
:root[data-theme="dark"] .motion__ctrl:hover { border-color: var(--ink); }

/* 7. Bouton de thème (en-tête) : 44 × 44 minimum, visible sur ordinateur et sur mobile, masqué sans JavaScript (attribut hidden) */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1.5px solid var(--line-strong); border-radius: var(--r-btn); background: var(--surface); color: var(--heading); cursor: pointer; flex: none; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--heading); }
.theme-toggle svg { width: 22px; height: 22px; }
.theme-toggle .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-toggle__sun { display: block; }

/* 8. Pas de transition de couleur de fond au changement de thème :
      les animations relisent le fond de leur section à l'image suivante. */

/* v1.0b : le bouton de thème est montré par theme.js (attribut hidden retiré au chargement du document). Quand JavaScript est actif,
   sa place est réservée dès le premier affichage (invisible, non focalisable) : le menu ne se décale pas (CLS 0).
   Sans JavaScript (scripting: none) ou sur un navigateur qui ne connaît pas cette requête, le bouton reste display: none. */
@media (scripting: enabled) {
  .theme-toggle[hidden] { display: inline-flex; visibility: hidden; }
}
