/* Barlow and Jost are served from this site (SIL Open Font License, fonts/OFL.txt): no font service is called. */
@font-face { font-family: 'Barlow'; font-weight: 300; font-display: swap; src: url('../fonts/barlow-300-latin.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('../fonts/barlow-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-weight: 400 600; font-display: swap; src: url('../fonts/jost-variable-latin.woff2') format('woff2'); }

:root {
  /* Charte THEMIS : les quatre seules couleurs de marque */
  --themis-indigo: #322b80;
  --themis-lavande: #a9a2ce;
  --themis-ciel: #bddef8;
  --themis-peche: #edc8a9;
  /* Neutres (libres d'usage selon la charte) */
  --white: #ffffff;
  --paper: #f7f7fb;
  --ink: #1c1a33;
  --ink-soft: #4d4b63;
  --line: #e2e1ec;
  --font-title: 'Jost', 'Futura Demi', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 300 1.0625rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--themis-indigo); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Titres principaux : Jost (Futura Demi) en capitales, interlettrage 100 */
.title {
  font-family: var(--font-title); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em;
  line-height: 1.15; margin: 0 0 0.45em; color: var(--themis-indigo);
}
h1.title { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2.title { font-size: clamp(1.4rem, 3.4vw, 2.1rem); }
/* Titres secondaires : Barlow Semi-Bold */
.sub { font-weight: 600; font-size: 1.2rem; margin: 0 0 0.4em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 40em; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 10px;
  font-weight: 600; font-size: 1.05rem; text-decoration: none; border: 2px solid transparent;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-peche { background: var(--themis-peche); color: var(--themis-indigo); }
.btn-peche:hover { background: var(--white); }
.btn-ghost { border-color: var(--themis-lavande); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); }
.btn-indigo { background: var(--themis-indigo); color: var(--white); }
.btn-indigo:hover { background: var(--ink); }
.btn-outline { border-color: var(--themis-indigo); color: var(--themis-indigo); }
.btn:focus-visible { outline: 3px solid var(--themis-ciel); outline-offset: 2px; }

/* En-tête */
header.top { background: var(--themis-indigo); color: var(--white); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 1.2rem; }
.brand img { width: 34px; height: 34px; }
nav.top { display: flex; gap: 22px; font-weight: 600; }
nav.top a { color: var(--themis-ciel); text-decoration: none; }
nav.top a:hover { color: var(--white); }
@media (max-width: 680px) { nav.top .optional { display: none; } }

/* Accroche */
.hero { background: var(--themis-indigo); color: var(--white); padding: 56px 0 88px; overflow: hidden; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.35fr 1fr; } }
.hero .title { color: var(--white); }
.hero .eyebrow { color: var(--themis-peche); font-weight: 600; font-size: 1.1rem; margin: 0 0 14px; }
.hero .lead { color: var(--themis-ciel); margin: 0 0 32px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.hero .small { color: var(--themis-lavande); font-size: 0.95rem; margin: 0; }
.hero-visual { justify-self: center; position: relative; width: min(320px, 72vw); aspect-ratio: 1; }
@media (max-width: 899px) { .hero-visual { width: min(200px, 50vw); } }
.hero-visual::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--themis-ciel), var(--themis-lavande) 60%, transparent 72%);
  opacity: 0.55;
}
.hero-visual img { position: relative; width: 78%; margin: 11%; filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.35)); }

/* Trois promesses */
.promises { margin-top: -48px; position: relative; }
.promises .wrap { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.promise { background: var(--white); border-radius: 14px; padding: 26px 24px; box-shadow: 0 12px 32px rgba(50, 43, 128, 0.14); border-top: 6px solid var(--themis-peche); }
.promise:nth-child(2) { border-top-color: var(--themis-ciel); }
.promise:nth-child(3) { border-top-color: var(--themis-lavande); }
.promise .sub { color: var(--themis-indigo); }
.promise p { margin: 0; color: var(--ink-soft); }

section { padding: 80px 0; }
section.paper { background: var(--paper); }
.section-head { max-width: 46em; margin-bottom: 36px; }
.section-head p { margin: 0; color: var(--ink-soft); font-size: 1.15rem; }

/* Fournisseurs */
.providers { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.providers li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; }
.providers li:nth-child(4n+1) { border-color: var(--themis-indigo); }
.providers li:nth-child(4n+2) { border-color: var(--themis-lavande); }
.providers li:nth-child(4n+3) { border-color: var(--themis-ciel); }
.providers li:nth-child(4n+4) { border-color: var(--themis-peche); }

/* Fonctions */
.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.feature { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.feature .chip { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; }
.feature .chip svg { width: 24px; height: 24px; stroke: var(--themis-indigo); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature p { margin: 0; color: var(--ink-soft); }
.bg-ciel { background: var(--themis-ciel); }
.bg-peche { background: var(--themis-peche); }
.bg-lavande { background: var(--themis-lavande); }

/* Vos données */
.data { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .data { grid-template-columns: 1.1fr 1fr; } }
ul.checks { padding: 0; margin: 0; list-style: none; }
ul.checks li { position: relative; padding-left: 34px; margin-bottom: 16px; }
ul.checks li::before {
  content: ""; position: absolute; left: 4px; top: 0.4em; width: 14px; height: 8px;
  border-left: 3px solid var(--themis-indigo); border-bottom: 3px solid var(--themis-indigo); transform: rotate(-45deg);
}
ul.checks strong { font-weight: 600; }
.panel { background: var(--themis-indigo); color: var(--white); border-radius: 14px; padding: 28px; }
.panel .sub { color: var(--themis-peche); }
.panel p { margin: 0 0 12px; color: var(--themis-ciel); }
.panel p:last-child { margin: 0; }
.panel a { color: var(--white); }
table { border-collapse: collapse; width: 100%; margin: 6px 0 16px; }
th, td { text-align: left; padding: 8px 0; border-bottom: 1px solid rgba(189, 222, 248, 0.25); vertical-align: top; }
th { font-weight: 600; color: var(--white); padding-right: 16px; white-space: nowrap; }
td { color: var(--themis-ciel); }

/* Téléchargement */
.download { background: var(--themis-indigo); color: var(--white); border-radius: 18px; padding: 40px 28px; display: grid; gap: 28px; }
@media (min-width: 860px) { .download { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 48px; } }
.download .title { color: var(--white); }
.download p { color: var(--themis-ciel); margin: 0 0 10px; }
.download .buttons { display: grid; gap: 14px; }
.download .btn { justify-content: center; }
.download .btn small { font-weight: 300; opacity: 0.85; }
.download .btn.suggested { outline: 3px solid var(--themis-ciel); outline-offset: 3px; }
.download .fine { font-size: 0.95rem; color: var(--themis-lavande); }

footer { padding: 40px 0 56px; color: var(--ink-soft); font-size: 0.95rem; }
footer .wrap { display: grid; gap: 28px; }
@media (min-width: 760px) { footer .wrap { grid-template-columns: auto 1fr; } }
/* Lock-up de la charte : logo, puis la signature « créateur de valeurs » à sa droite */
.lockup { display: flex; align-items: center; gap: 14px; padding: 10px; }
.lockup img { width: 150px; }
.lockup span { font-family: var(--font-title); font-weight: 400; color: var(--themis-indigo); font-size: 0.95rem; white-space: nowrap; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; font-weight: 600; margin-bottom: 14px; }
footer p { margin: 0 0 8px; }

/* Languages: every text exists as a lang="fr" and a lang="en" element; the page shows the one of
   html[data-lang], French when the script has not run. */
html:not([data-lang="en"]) body [lang="en"] { display: none !important; }
html[data-lang="en"] body [lang="fr"] { display: none !important; }

/* Language switch */
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--themis-lavande); background: transparent; color: var(--white);
  font: 600 0.9rem var(--font-body); cursor: pointer;
}
.lang-switch:hover { border-color: var(--white); }
.lang-switch:focus-visible { outline: 3px solid var(--themis-ciel); outline-offset: 2px; }
.lang-switch svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
header.top .right { display: flex; align-items: center; gap: 22px; }

/* Long text pages (privacy policy) */
.doc-hero { background: var(--themis-indigo); color: var(--white); padding: 48px 0 40px; }
.doc-hero .title { color: var(--white); }
.doc-hero p { color: var(--themis-ciel); margin: 0; }
.doc { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 72px; }
/* Lets the grid columns shrink below the tables' min-width: the tables scroll in .table-scroll. */
.doc > * { min-width: 0; }
@media (min-width: 960px) { .doc { grid-template-columns: 240px 1fr; } }
.toc { font-size: 0.95rem; }
@media (min-width: 960px) { .toc { position: sticky; top: 24px; align-self: start; } }
.toc .sub { color: var(--themis-indigo); font-size: 1rem; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--themis-indigo); text-decoration: underline; }
.prose { max-width: 46em; }
.prose h2 { font-weight: 600; font-size: 1.35rem; color: var(--themis-indigo); margin: 2em 0 0.5em; scroll-margin-top: 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose strong { font-weight: 600; }
.prose .table-scroll { overflow-x: auto; margin: 0 0 1em; }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.97rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink); }
.prose th { font-weight: 600; background: var(--paper); }
.prose code { font-size: 0.92em; background: var(--paper); padding: 1px 5px; border-radius: 4px; }
.prose .callout { border-left: 4px solid var(--themis-peche); background: var(--paper); padding: 14px 18px; border-radius: 0 10px 10px 0; }
.prose td code { overflow-wrap: anywhere; }
.todo { background: var(--themis-peche); color: var(--themis-indigo); padding: 0 4px; border-radius: 3px; }
