/* ==========================================================================
   Covartim, Base : reset, typographie, layout
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* un composant en display: flex ou grid ne doit jamais réafficher un élément masqué (filtres) */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);   /* les ancres ne passent pas sous un header sticky */
}
body {
  margin: 0;
  /* Footer toujours en bas, même sur une page courte. dvh : suit la barre d'adresse mobile. */
  display: flex; flex-direction: column; min-height: calc(100vh / var(--zoom)); min-height: calc(100dvh / var(--zoom));
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: var(--fs-3);
  line-height: var(--lh-3);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;             /* un mot ou une URL trop longs ne créent pas de scroll horizontal */
  -webkit-tap-highlight-color: transparent;
}
body > main { flex: 1 0 auto; }
body.is-locked { overflow: hidden; }     /* menu mobile ou feuille ouverte : la page ne défile plus dessous */

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }   /* pas de délai de double-tap */
a { color: inherit; touch-action: manipulation; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }   /* sky-400 : visible sur clair et sur navy */
/* Surfaces du navigateur aux couleurs de la marque : sélection, curseur de saisie, cases natives, barres de défilement */
::selection { background: var(--color-lime-300); color: var(--color-navy-950); }   /* une seule teinte de sélection, claire comme foncée : lime-300 du bouton accent, texte navy */
html { accent-color: var(--action-primary); caret-color: var(--action-primary); scrollbar-color: var(--color-mist-300) transparent; }
.stat__value, .pagination__pages, .table .is-num { font-variant-numeric: tabular-nums; }

.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;
}

/* ---------- Titres [Dérivé, inspirations] ----------
   Grands et fins, interlignes serrés. Graisse selon la taille (règle du brand book p. 7) : Light pour les
   grands corps (display, h1–h3), Regular pour h4, Medium pour les petits corps (h5–h6).
   Hiérarchie par la taille et la couleur, pas par la graisse : on ne met jamais un grand titre en gras. */
.display, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--font-display); text-wrap: balance; }
/* Textes courants : pas de mot ni de signe seul en fin de paragraphe (avec les espaces insécables avant ? : ; ! et dans « ») */
p, li, dd, figcaption, blockquote, summary { text-wrap: pretty; }
.display { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: var(--fw-light); letter-spacing: var(--ls-display); }
.h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-light); letter-spacing: var(--ls-title); }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-light); letter-spacing: var(--ls-title); }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-light); letter-spacing: var(--ls-tight); }
.h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: var(--fw-regular); letter-spacing: var(--ls-tight); }
.h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); font-weight: var(--fw-medium); letter-spacing: var(--ls-small); }
.card-title { font-family: var(--font-display); font-size: var(--fs-card); line-height: var(--lh-card); font-weight: var(--fw-medium); letter-spacing: var(--ls-small); text-wrap: balance; }
.h6 { font-size: var(--fs-h6); line-height: var(--lh-h6); font-weight: var(--fw-medium); letter-spacing: var(--ls-small); }

/* Titre bicolore : la fin du titre en ton atténué (« Catch the wave … <span class="tone">surfing skills</span> »).
   Réservé aux titres ≥ 24 px (contraste 4:1 sur mist-100, 4,65:1 sur blanc). */
.tone { color: inherit; }   /* titres d'une seule couleur (demande du 3 novembre 2026) : .tone ne sert plus qu'à repérer la seconde partie, que .is-block passe à la ligne */
/* Titre bicolore en deux lignes : la partie atténuée (ou accentuée) passe à la ligne [Relevé, corrections Figma] */
:is(.tone, .accent).is-block { display: block; }

/* Phrase manifeste : un paragraphe très grand et fin, avec au plus un groupe de mots en .accent */
.statement {
  font-family: var(--font-display); font-size: var(--fs-statement); line-height: var(--lh-statement);
  font-weight: var(--fw-light); letter-spacing: var(--ls-title); color: var(--text-primary); text-wrap: pretty;
  max-width: 30ch;
}
.statement--wide { max-width: 44ch; }
.section--dark .statement, .on-dark .statement { color: var(--text-inverse); }
/* Titre vert de la charte : lime-700 sur fond clair, lime-400 sur fond sombre */
.accent { color: var(--text-heading); }
.section--dark .accent, .on-dark .accent { color: var(--text-heading-inverse); }

/* ---------- Texte ---------- */
.lead   { font-size: var(--fs-lead); line-height: var(--lh-lead); }
.text-4 { font-size: var(--fs-4); line-height: var(--lh-4); }
.text-3 { font-size: var(--fs-3); line-height: var(--lh-3); }
.text-2 { font-size: var(--fs-2); line-height: var(--lh-2); }
.text-1 { font-size: var(--fs-1); line-height: var(--lh-1); }
.text-body { color: var(--text-body); }
.text-muted { color: var(--text-muted); }
.section--dark .text-body, .on-dark .text-body { color: var(--text-body-inverse); }
.section--dark .text-muted, .on-dark .text-muted { color: var(--text-muted-inverse); }
.fw-medium { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold { font-weight: var(--fw-bold); }   /* mettre en avant une information (brand book p. 7) */

/* Eyebrow : capitales espacées, sans pastille ni point devant (règle : jamais de petit cercle devant un contenu).
   Réservé aux catégories (articles, études de cas), au sur-titre du hero et aux libellés de liste. */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  color: var(--text-muted);
  font-size: var(--fs-1); line-height: var(--lh-1); font-weight: var(--fw-medium);
  letter-spacing: var(--ls-caps); text-transform: uppercase;
}
.section--dark .eyebrow, .on-dark .eyebrow { color: var(--text-muted-inverse); }

.link { color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: from-font; }
.link:hover { color: var(--text-primary); }
.section--dark .link, .on-dark .link { color: var(--text-link-inverse); text-decoration-color: var(--link-underline-inverse); transition: text-decoration-color var(--dur-fast) var(--ease-out); }
.section--dark .link:hover, .on-dark .link:hover { color: var(--text-link-inverse); text-decoration-color: var(--text-heading-inverse); }

/* Équivalent du « Vertical trim : cap height to baseline » de Figma. Bloc ou inline-block uniquement. */
.trim { text-box: trim-both cap alphabetic; }

/* Texte riche (WYSIWYG) */
.prose { color: var(--text-body); --prose-gap: 1.25em; max-width: var(--text-max); }
.prose > * + * { margin-top: var(--prose-gap); }
.prose strong, .prose h2, .prose h3, .prose h4 { color: var(--text-primary); }
.prose a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Layout ---------- */
.container {
  width: 100%; max-width: calc(var(--screen-max) + 2 * var(--gutter)); margin-inline: auto;
  /* safe-area : en paysage sur iPhone, l'encoche mange la marge latérale */
  padding-inline: max(var(--gutter), var(--safe-left)) max(var(--gutter), var(--safe-right));
}
.container--text { max-width: calc(var(--text-max) + 2 * var(--gutter)); }

.section    { padding-block: var(--stack-m); }
.section--l { padding-block: var(--stack-l); }
.section--s { padding-block: var(--stack-s); }
.section--xl { padding-block: var(--stack-xl); }
.section--muted { background: var(--bg-muted); }
.section--card  { background: var(--bg-card); }
.section--dark  { background: var(--bg-dark); color: var(--text-inverse); }
.section--stone { background: var(--bg-stone); }
.section--brand { background: var(--bg-brand); color: var(--text-inverse); }

.stack   { display: flex; flex-direction: column; gap: var(--stack-gap, var(--space-m)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-sm)); }
.split   { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-m); }
.divider { border: 0; border-top: 1px solid var(--border-default); margin: 0; }
.section--dark .divider, .on-dark .divider { border-top-color: var(--border-inverse); }
.section--flush-top { padding-top: 0; }   /* cas particuliers ; le rythme courant vient de la règle ci-dessous */
/* Rythme : deux sections de même fond qui se suivent ne doublent pas leur marge (un seul intervalle, 120 ou 160 px).
   Idem sous l'en-tête d'une page intérieure. Un changement de fond garde les deux marges : le fond sépare déjà. */
:is(.section:not(.section--muted, .section--card, .section--stone, .section--dark, .section--brand), .page-head)
  + .section:not(.section--muted, .section--card, .section--stone, .section--dark, .section--brand),
.section--muted + .section--muted { padding-top: 0; }
.is-sticky { position: sticky; top: calc(var(--header-h) + var(--space-xl)); }   /* colonne qui suit le défilement (intro de la FAQ, coordonnées du contact) */
@media (max-width: 1024px) { .is-sticky { position: static; } }   /* une colonne : sinon le bloc collé glisserait par-dessus le contenu qui le suit */

/* En-tête de section : titre et texte à gauche, actions (lien, flèches) alignées en bas à droite */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-l) var(--space-3xl); margin-bottom: var(--space-3xl); }
.section-head > :first-child { display: flex; flex-direction: column; gap: var(--space-m); max-width: 720px; }
.section-head__actions { display: flex; align-items: center; gap: var(--space-m); flex-wrap: wrap; }

/* Deux colonnes : 1/1 par défaut, --wide-start 7/5, --wide-end 5/7 ; une seule colonne sous 1024 px */
.layout-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3xl) var(--space-5xl); align-items: center; }
.layout-split--wide-start { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.layout-split--wide-end { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.layout-split--top { align-items: start; }
@media (max-width: 1024px) { .layout-split, .layout-split--wide-start, .layout-split--wide-end { grid-template-columns: minmax(0, 1fr); } }

/* Grilles à nombre de colonnes fixe : 3 ou 4 sur desktop, 2 sous 1024 px, 1 sous 640 px.
   À préférer à .grid-auto quand le nombre d'éléments est connu (pas de colonne vide en bout de rangée). */
.grid-3, .grid-4 { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.grid-3 { --cols: 3; }
.grid-4 { --cols: 4; }
@media (max-width: 1024px) { .grid-3, .grid-4 { --cols: 2; } }
@media (max-width: 640px) { .grid-3, .grid-4 { --cols: 1; } }

/* Grille auto : passe seule de N colonnes à 1, sans media query */
.grid-auto { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(auto-fill, minmax(min(var(--grid-min, 280px), 100%), 1fr)); }

/* Visibilité par palier */
@media (max-width: 640px)  { .hide-mobile  { display: none !important; } }
@media (min-width: 641px)  { .only-mobile  { display: none !important; } }
