/*
 * Hlel — feuille unique du site.
 * Toutes les couleurs sont des valeurs de src/theme/tokens.ts (le nom du
 * jeton est en commentaire) ; outils/verifier.mjs refuse toute autre couleur
 * et calcule le contraste de chaque paire texte / fond déclarée plus bas.
 * Polices auto-hébergées, fichiers d'origine non modifiés (licences dans
 * polices/). Aucune ressource extérieure.
 */

@font-face {
  font-family: 'General Sans';
  src: url('/polices/GeneralSans-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('/polices/GeneralSans-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('/polices/GeneralSans-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader Display';
  src: url('/polices/Newsreader-Display.ttf') format('truetype');
  font-weight: 550;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader Heading';
  src: url('/polices/Newsreader-Heading.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader Italic';
  src: url('/polices/Newsreader-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---- Jetons ------------------------------------------------------------ */

:root {
  color-scheme: light;

  --fond: #F6F4F8;          /* paper */
  --surface: #FFFFFF;       /* surface */
  --texte: #241028;         /* ink950 */
  --texte-2: #4A2450;       /* ink700 */
  --meta: #6E4874;          /* ink500 */
  --filet: #E7E3EC;         /* ink100 */
  --contour: #D2CDDA;       /* ink200 */
  --lien: #8B3FBF;          /* violet600 */
  --focus: #A855C7;         /* violet400 */
  --jade: #2F6B57;          /* jade700 */
  --jade-trait: #4E9B7F;    /* jade500 */
  --jade-fond: #EFF6F2;     /* jade50 */
  --jade-contour: #C8DFD5;  /* jade200 */
  --manque: #A8322B;        /* danger */
  --manque-fond: #FAEBEA;   /* dangerSurface */
  --manque-contour: #EED6D4;/* dangerBorder */
  --sur-marque: #FFFFFF;    /* surface : texte posé sur le dégradé */

  /* brandGradients.header, angle BRAND_GRADIENT_ANGLE */
  --degrade: linear-gradient(158deg, #C2418F 0%, #9647C6 28%, #7E2FB0 62%, #6A2497 100%);

  --serif: 'Newsreader Display', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --serif-titre: 'Newsreader Heading', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --serif-italique: 'Newsreader Italic', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'General Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --gouttiere: 16px;
  --mesure: 40rem;
}


@media (min-width: 600px) {
  :root { --gouttiere: 24px; }
}

/* ---- Base -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  hyphens: auto;
}

a {
  color: var(--lien);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

/* Liens dans le texte : zone de toucher portée à 44 px sans déplacer les lignes (invariant 38) */
main p a { padding-block: 13px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.aller-au-contenu {
  position: absolute;
  left: var(--gouttiere);
  top: -100px;
  z-index: 2;
  padding: 10px 16px;
  min-height: 44px;
  background: var(--surface);
  color: var(--texte);
  border-radius: 14px;
}
.aller-au-contenu:focus { top: 12px; }

.borne {
  width: 100%;
  max-width: calc(var(--mesure) + 2 * var(--gouttiere));
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}

/* ---- En-tête de marque (dégradé, invariant 16) -------------------------- */

.bandeau {
  background: var(--degrade);
  color: var(--sur-marque);
  padding: 12px 0 36px;
}

.bandeau a { color: var(--sur-marque); }
/* --focus n'atteint pas 3:1 sur le dégradé : anneau blanc dans l'en-tête */
.bandeau :focus-visible { outline-color: var(--sur-marque); }

.barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
}

.logotype {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}
.logotype img { display: block; height: 30px; width: auto; }

.navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0 -10px;
  padding: 0;
  list-style: none;
}
.navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.navigation a:hover,
.navigation a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.surtitre {
  margin: 28px 0 8px;
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 550;
  font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.chapeau-bandeau {
  margin: 14px 0 0;
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.5;
}

/* ---- Contenu ----------------------------------------------------------- */

main { padding: 32px 0 48px; }
main:focus { outline: none; }

h2 {
  margin: 48px 0 12px;
  font-family: var(--serif-titre);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
main > .borne > h2:first-child,
main > .borne > section:first-child > h2:first-child { margin-top: 8px; }

h3 {
  margin: 28px 0 6px;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.4;
}

p, ul, ol, dl { margin: 0 0 16px; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 6px; }
li::marker { color: var(--meta); }

.second { color: var(--texte-2); }
.meta { color: var(--meta); font-size: 0.9375rem; }

.micro {
  display: block;
  margin: 0 0 6px;
  color: var(--meta);
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Liste « libellé · texte » (écrans 90, 91, 94) */
.lignes { margin: 0 0 16px; padding: 0; list-style: none; border-top: 1px solid var(--filet); }
.lignes > li { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--filet); }
.lignes strong { display: block; font-weight: 600; }
.lignes span:not(.a-completer) { display: block; color: var(--texte-2); }

/* Bloc jade : Le Tiers, ce qui n'arrive jamais */
.jade {
  margin: 24px 0;
  padding: 16px 18px;
  background: var(--jade-fond);
  border: 1px solid var(--jade-contour);
  border-radius: 14px;
}
.jade .micro { color: var(--jade); }
.jade a { color: var(--jade); } /* --lien n'atteint pas 4,5:1 sur --jade-fond en sombre */
.jade p:last-child { margin-bottom: 0; }

/* Voix du Tiers : filet jade, losange jade, italique sérif (invariant 18) */
.tiers {
  margin: 24px 0;
  padding: 14px 0;
  border-top: 2px solid var(--jade-trait);
  border-bottom: 2px solid var(--jade-trait);
  font-family: var(--serif-italique);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.55;
}
.tiers p { margin: 0; }

.losange {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin: 0 10px 0.12em 2px;
  background: var(--jade-trait);
  transform: rotate(45deg);
  vertical-align: middle;
}

/* Engagements (écran 92) */
.engagements { margin: 0 0 16px; padding: 0; list-style: none; }
.engagements > li { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--filet); }
.engagements strong {
  display: block;
  font-family: var(--serif-titre);
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.35;
}
.engagements span:not(.losange):not(.a-completer) { display: block; margin-top: 2px; color: var(--texte-2); }
.aveu {
  font-family: var(--serif-italique);
  font-style: italic;
  font-size: 1.125rem;
}

/* Questions fréquentes (écran 98) : <details> natif, sans script */
.faq { border-top: 1px solid var(--filet); margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--filet); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 8px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--meta);
  border-bottom: 2px solid var(--meta);
  transform: rotate(45deg) translateY(-3px);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -1px); }
.faq details p { margin: 0 0 18px; color: var(--texte-2); }

/* Étapes numérotées (tuteur) */
.etapes { padding-left: 1.4em; }
.etapes li { margin-bottom: 12px; padding-left: 4px; }

/* Identité de l'éditeur : raison sociale, sigles et numéros ne se coupent
   jamais par un trait d'union ajouté (RA-KEZ, Sho-hada). */
.identite { hyphens: manual; }

/* Ce que le dépôt n'établit pas encore : visible, jamais discret */
.a-completer {
  display: inline;
  padding: 1px 6px;
  background: var(--manque-fond);
  color: var(--manque);
  border: 1px solid var(--manque-contour);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  hyphens: manual;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sommaire {
  margin: 0 0 8px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--filet);
  border-radius: 14px;
}
.sommaire ol { margin: 0; }
.sommaire li { margin-bottom: 2px; }
.sommaire a { display: block; padding: 10px 0; } /* bloc : le numéro reste sur la première ligne */

/* Accueil : liens vers les pages */
.pages { margin: 8px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--filet); }
.pages li { margin: 0; border-bottom: 1px solid var(--filet); }
.pages a {
  display: flex;
  flex-direction: column;
  min-height: 56px;
  padding: 14px 0;
  text-decoration: none;
  color: var(--texte);
}
.pages a strong { font-weight: 600; color: var(--lien); }
.pages a:hover strong { text-decoration: underline; }
.pages a span { color: var(--texte-2); font-size: 0.9375rem; }

/* ---- Pied -------------------------------------------------------------- */

.pied {
  border-top: 1px solid var(--filet);
  padding: 24px 0 40px;
  color: var(--meta);
  font-size: 0.9375rem;
}
.pied ul { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0 0 8px; padding: 0; list-style: none; }
.pied li { margin: 0; }
.pied a { display: inline-flex; align-items: center; min-height: 44px; }
.pied p { margin: 0; }

@media print {
  .bandeau { background: none; color: inherit; padding-bottom: 0; }
  .bandeau a { color: inherit; }
  .logotype, .navigation, .pied ul, .aller-au-contenu { display: none; }
}
