/* Vitrine www.suissekit.ch, d'après la maquette validée eleves-theme-v2 (éventail de cartes, boutons en pilule).
   CSP stricte : aucune ressource externe, polices servies par le site.
   Couleurs sombres : uniquement dans les blocs @media (prefers-color-scheme: dark), dont theme.js change la condition. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("polices/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("polices/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("polices/inter-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("polices/instrument-serif-latin-400-italic.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --nuit: #0b1f30;
  --lac: #1b6ca8;
  --lac-clair: #6db7dc;
  --neige: #f6f9fb;
  --encre: #16293a;
  --encre-2: #5a6d7e;
  --surface: #fff;
  --bord: #d8e2ea;
  --bord-2: #c9d6e0;
  --puce: #e8eef3;
  --lien: var(--lac);
  --focus: var(--lac);
  --carte-bord: #fff;
  --carte-ombre: 0 30px 60px -20px rgb(11 31 48 / 45%);
  --bande: var(--nuit);
  --bande-bord: transparent;
  --ok-fond: #e3f4ea;
  --ok-encre: #1d5a37;
  --alerte-fond: #fde8ea;
  --alerte-encre: #8a1020;
  --police: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-serif: "Instrument Serif", Georgia, serif;
  --pilule: 99px;
  --courbe: cubic-bezier(0.2, 0.8, 0.2, 1);
  --marge: 5vw;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --neige: #0d1720;
    --encre: #e7eff5;
    --encre-2: #a5b7c5;
    --surface: #15232f;
    --bord: #2a3c4b;
    --bord-2: #2a3c4b;
    --puce: #1a2b39;
    --lien: var(--lac-clair);
    --focus: var(--lac-clair);
    --carte-bord: #15232f;
    --carte-ombre: 0 30px 60px -20px rgb(0 0 0 / 70%);
    --bande: #0b1f30;
    --bande-bord: #2a3c4b;
    --ok-fond: #143222;
    --ok-encre: #9fe0b8;
    --alerte-fond: #3a1519;
    --alerte-encre: #f5b5bd;
  }
}

/* ---------- Fond : paysage alpin (src/vitrine/fond.tsx) ----------
   Réglages faciles :
   --fond-voile            intensité du voile clair (ou sombre) posé sur le paysage : 0 = paysage pur, 1 = paysage effacé ;
   --fond-nuage-a/-b       durée d'un aller des deux nuages (lents : 150 s et 185 s) ;
   --fond-rognage-max      sur un écran plus large que 16:9, agrandissement maximal du paysage (le ciel est rogné) avant
                           que les prolongements latéraux du dessin ne remplissent les côtés ;
   --fond-portrait         sur un écran en hauteur (téléphone, tablette), hauteur maximale du paysage en largeurs de
                           fenêtre : le paysage rapetisse et se pose en bas, pour que les crêtes encadrent encore la vallée.
   Couleurs : jetons --alpe-*, repris des fichiers suissekit-fond-anime.svg (clair) et suissekit-fond-anime-sombre.svg. */

:root {
  --fond-voile: 0.28;
  --fond-nuage-a: 150s;
  --fond-nuage-b: 185s;
  --fond-rognage-max: 1.25;
  --fond-portrait: 0.9;
  --alpe-voile: #f5f8fb;
  --alpe-ciel-haut: #edf3f9;
  --alpe-ciel-bas: #f6f8fb;
  --alpe-nuage: #fff;
  --alpe-loin-1: #dce7ef;
  --alpe-loin-2: #c8d9e6;
  --alpe-crete-g: #7698b3;
  --alpe-neige-g: #e9f1f6;
  --alpe-crete-g2: #557b99;
  --alpe-pente-g: #a1bacd;
  --alpe-crete-d: #8aa9c0;
  --alpe-neige-d: #eef4f8;
  --alpe-crete-d2: #6185a2;
  --alpe-brume: #f5f8fb;
  --alpe-lac-haut: #c6d9e7;
  --alpe-lac-bas: #9bb6cb;
  --alpe-reflet-1: #e7eff5;
  --alpe-reflet-2: #d9e6ef;
  --alpe-cap-g: #456b88;
  --alpe-cap-d: #527995;
  --alpe-cap-fonce: #315773;
  --alpe-sapin-arete: #6185a2;
  --alpe-sapin-clair: #5f86a3;
  --alpe-sapin: #3c627f;
  --alpe-sapin-fonce: #22465f;
  --alpe-chalet-mur: #3b607c;
  --alpe-chalet-ombre: #294b65;
  --alpe-chalet-toit: #dfeaf2;
  --alpe-chalet-fenetre: #a9c3d5;
  --alpe-chalet-porte: #9eb8cb;
  --alpe-chalet-cheminee: #2a4d68;
  --alpe-cable: #2c4f69;
  --alpe-cabine: #24435c;
  --alpe-cabine-vitres: #b6cede;
  --alpe-rive: #f2f7fa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond-voile: 0.3;
    --alpe-voile: #0d1720;
    --alpe-ciel-haut: #101c2b;
    --alpe-ciel-bas: #162638;
    --alpe-nuage: #55738e;
    --alpe-loin-1: #20354a;
    --alpe-loin-2: #29435a;
    --alpe-crete-g: #355570;
    --alpe-neige-g: #7d99b1;
    --alpe-crete-g2: #29455e;
    --alpe-pente-g: #41617b;
    --alpe-crete-d: #34536d;
    --alpe-neige-d: #8ba4ba;
    --alpe-crete-d2: #28465e;
    --alpe-brume: #132233;
    --alpe-lac-haut: #203b51;
    --alpe-lac-bas: #172e42;
    --alpe-reflet-1: #36556e;
    --alpe-reflet-2: #2b4960;
    --alpe-cap-g: #1d364b;
    --alpe-cap-d: #1c354b;
    --alpe-cap-fonce: #122739;
    --alpe-sapin-arete: #28465e;
    --alpe-sapin-clair: #203a51;
    --alpe-sapin: #13283a;
    --alpe-sapin-fonce: #08151f;
    --alpe-chalet-mur: #1a3145;
    --alpe-chalet-ombre: #102336;
    --alpe-chalet-toit: #68849c;
    --alpe-chalet-fenetre: #d9b86a;
    --alpe-chalet-porte: #5b7a93;
    --alpe-chalet-cheminee: #0e2234;
    --alpe-cable: #7896ae;
    --alpe-cabine: #0f2233;
    --alpe-cabine-vitres: #d9b86a;
    --alpe-rive: #638099;
  }
}

/* Calque fixe sous tout le contenu (z-index négatif : il passe sous le flux sans le changer), jamais cliquable.
   Hauteur du paysage : celle de la fenêtre, ou davantage sur un écran large, pour couvrir sa largeur sans
   dépasser --fond-rognage-max ; la largeur suit toujours en 16:9, le dessin n'est donc jamais déformé. */
.fond {
  --fond-h: max(min(100vh, calc(100vw * var(--fond-portrait))), min(56.25vw, calc(100vh * var(--fond-rognage-max))));
  --fond-l: calc(var(--fond-h) * 16 / 9);
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(var(--alpe-ciel-haut), var(--alpe-ciel-bas));
}
.fond::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--alpe-voile);
  opacity: var(--fond-voile);
}
/* Le cadre des SVG va de -1000 à 2920 (3920 unités) : le dessin d'origine (1920) reste centré, à la largeur --fond-l. */
.fond__calque {
  --fond-cadre: calc(var(--fond-l) * 3920 / 1920);
  position: absolute;
  left: 50%;
  display: block;
  width: var(--fond-cadre);
  margin-left: calc(var(--fond-cadre) / -2);
}
.fond__paysage {
  bottom: 0;
  height: var(--fond-h);
}
/* Haut de la fenêtre, à la même échelle que le paysage : le rognage du ciel n'emporte pas les nuages. */
.fond__nuages {
  top: 0;
  height: calc(var(--fond-l) / 6);
}

.fond__nuage-a {
  animation: fond-nuage-a var(--fond-nuage-a) ease-in-out infinite alternate;
}
.fond__nuage-b {
  animation: fond-nuage-b var(--fond-nuage-b) ease-in-out infinite alternate;
}
@keyframes fond-nuage-a {
  from {
    transform: translateX(-22px);
  }
  to {
    transform: translateX(65px);
  }
}
@keyframes fond-nuage-b {
  from {
    transform: translateX(24px);
  }
  to {
    transform: translateX(-60px);
  }
}

.alpe-nuage {
  fill: var(--alpe-nuage);
  opacity: 0.65;
}
.alpe-loin-1 {
  fill: var(--alpe-loin-1);
}
.alpe-loin-2 {
  fill: var(--alpe-loin-2);
}
.alpe-crete-g {
  fill: var(--alpe-crete-g);
}
.alpe-neige-g {
  fill: var(--alpe-neige-g);
}
.alpe-crete-g2 {
  fill: var(--alpe-crete-g2);
}
.alpe-pente-g {
  fill: var(--alpe-pente-g);
}
.alpe-crete-d {
  fill: var(--alpe-crete-d);
}
.alpe-neige-d {
  fill: var(--alpe-neige-d);
}
.alpe-crete-d2 {
  fill: var(--alpe-crete-d2);
}
.alpe-brume {
  stop-color: var(--alpe-brume);
}
.alpe-lac-haut {
  stop-color: var(--alpe-lac-haut);
}
.alpe-lac-bas {
  stop-color: var(--alpe-lac-bas);
}
.alpe-reflet-1 {
  fill: var(--alpe-reflet-1);
  opacity: 0.65;
}
.alpe-reflet-2 {
  fill: var(--alpe-reflet-2);
  opacity: 0.64;
}
.alpe-cap-g {
  fill: var(--alpe-cap-g);
}
.alpe-cap-d {
  fill: var(--alpe-cap-d);
}
.alpe-cap-fonce {
  fill: var(--alpe-cap-fonce);
}
.alpe-sapin-arete {
  fill: var(--alpe-sapin-arete);
}
.alpe-sapin-clair {
  fill: var(--alpe-sapin-clair);
}
.alpe-sapin {
  fill: var(--alpe-sapin);
}
.alpe-sapin-fonce {
  fill: var(--alpe-sapin-fonce);
}
.alpe-chalet-mur {
  fill: var(--alpe-chalet-mur);
}
.alpe-chalet-ombre {
  fill: var(--alpe-chalet-ombre);
}
.alpe-chalet-toit {
  fill: var(--alpe-chalet-toit);
}
.alpe-chalet-fenetre {
  fill: var(--alpe-chalet-fenetre);
}
.alpe-chalet-porte {
  fill: var(--alpe-chalet-porte);
}
.alpe-chalet-cheminee {
  fill: var(--alpe-chalet-cheminee);
}
.alpe-cable {
  stroke: var(--alpe-cable);
}
.alpe-cabine {
  fill: var(--alpe-cabine);
}
.alpe-cabine-vitres {
  fill: var(--alpe-cabine-vitres);
}
.alpe-rive {
  fill: var(--alpe-rive);
  opacity: 0.38;
}

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

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

/* Les commandes inutiles sans JavaScript restent cachées, quelle que soit la règle d'affichage du composant. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.5;
  background: var(--neige);
  color: var(--encre);
  transition: background-color 0.3s, color 0.3s;
}

a {
  color: var(--lien);
}

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

.serif {
  font-family: var(--police-serif);
  font-style: italic;
  font-weight: 400;
}

.evitement {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--encre);
  color: var(--neige);
  border-radius: var(--pilule);
  padding: 10px 18px;
  font-weight: 600;
  text-decoration: none;
}
.evitement:focus {
  top: 12px;
}

main {
  display: block;
  /* Numérote les intertitres (01, 02…) de chaque page : voir « Intertitre ». */
  counter-reset: intertitre;
}

/* ---------- En-tête ---------- */

.entete {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 22px var(--marge);
}

.entete__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--encre);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  border-radius: 10px;
}
.entete__logo img {
  display: block;
  width: 30px;
  height: 30px;
  transition: transform 0.4s var(--courbe);
}
.entete__logo:hover img {
  transform: rotate(-8deg) scale(1.08);
}

.menu {
  margin: 0 auto;
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--pilule);
  padding: 4px;
}
.menu a {
  color: var(--encre-2);
  text-decoration: none;
  font-size: 14px;
  padding: 7px 16px;
  border-radius: var(--pilule);
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.menu a:hover {
  color: var(--encre);
  background: var(--puce);
}
.menu a.actif {
  background: var(--encre);
  color: var(--neige);
  font-weight: 600;
}

/* Choix du thème : des boutons radio présentés en pilule segmentée. */
.theme {
  display: flex;
  gap: 2px;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--pilule);
  padding: 3px;
  min-inline-size: 0;
}
.theme legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.theme label {
  position: relative;
  display: block;
  cursor: pointer;
}
.theme input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.theme label > span {
  display: block;
  font-size: 13px;
  color: var(--encre-2);
  border-radius: var(--pilule);
  padding: 6px 10px;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.theme label:hover > span {
  color: var(--encre);
}
.theme input:checked + span {
  background: var(--encre);
  color: var(--neige);
}
.theme input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Interrupteur de langue « FR [drapeau] DE » (même composant que les outils) : la langue affichée en gras, son drapeau
   dans la piste, le rond de son côté. */
.bascule-langue {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 3px 4px;
  border: 0;
  border-radius: var(--pilule);
  background: transparent;
  color: var(--encre);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.bascule-langue__code {
  opacity: 0.45;
  transition: opacity 0.2s;
}
.bascule-langue[data-langue="fr"] .bascule-langue__code[lang="fr"],
.bascule-langue[data-langue="de"] .bascule-langue__code[lang="de"],
.bascule-langue:hover .bascule-langue__code {
  opacity: 1;
}
.bascule-langue__piste {
  position: relative;
  display: block;
  width: 44px;
  height: 22px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 85%), 0 1px 3px rgb(0 0 0 / 35%);
}
.bascule-langue[data-langue="fr"] .bascule-langue__piste {
  background: linear-gradient(90deg, #002654 0 58%, #ffffff 58% 79%, #ce1126 79%);
}
.bascule-langue[data-langue="de"] .bascule-langue__piste {
  background: linear-gradient(180deg, #000000 0 33.34%, #dd0000 33.34% 66.67%, #ffcc00 66.67%);
}
.bascule-langue__rond {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f5f6f8;
  box-shadow: 0 1px 3px rgb(0 0 0 / 45%);
  transition: left 0.2s;
}
.bascule-langue[data-langue="de"] .bascule-langue__rond {
  left: calc(100% - 19px);
}
.bascule-langue:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .bascule-langue__rond,
  .bascule-langue__code {
    transition: none;
  }
}

.entete__connexion,
.bouton,
.contact__envoyer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--pilule);
  padding: 10px 12px 10px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--courbe), box-shadow 0.25s, background-color 0.2s;
}
.entete__connexion span,
.bouton span[aria-hidden="true"],
.contact__envoyer span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  transition: transform 0.25s var(--courbe);
}
.entete__connexion:hover span,
.bouton:hover span[aria-hidden="true"] {
  transform: translateX(3px);
}

.entete__connexion {
  background: var(--surface);
  color: var(--encre);
  border: 1px solid var(--bord);
}
.entete__connexion span {
  background: var(--encre);
  color: var(--neige);
}

.bouton,
.contact__envoyer {
  background: var(--encre);
  color: var(--neige);
  border: 0;
}
.bouton span[aria-hidden="true"] {
  background: var(--neige);
  color: var(--encre);
}
.bouton:hover,
.contact__envoyer:hover,
.entete__connexion:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgb(11 31 48 / 55%);
}
.contact__envoyer {
  padding: 13px 24px;
}
.contact__envoyer:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* ---------- Titre de page ---------- */

.titre {
  text-align: center;
  padding: 40px var(--marge) 34px;
}
.titre > * {
  animation: apparait 0.8s var(--courbe) both;
}
.titre > :nth-child(2) {
  animation-delay: 0.08s;
}
.titre > :nth-child(3) {
  animation-delay: 0.16s;
}
.titre > :nth-child(n + 4) {
  animation-delay: 0.24s;
}

.titre__etiquette {
  display: inline-block;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--puce);
  color: var(--encre-2);
  border-radius: var(--pilule);
  padding: 6px 14px;
}

.titre h1 {
  max-width: 980px;
  margin: 18px auto 20px;
  font-size: clamp(36px, 5.5vw, 66px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.titre h1 .serif {
  font-size: 1.08em;
  letter-spacing: -0.01em;
}

.titre__intro {
  max-width: 620px;
  margin: 0 auto;
  color: var(--encre-2);
  font-size: 18px;
  line-height: 1.5;
}

.titre__actions {
  margin: 28px 0 0;
}
.titre__note {
  margin: 14px auto 0;
  max-width: 560px;
  color: var(--encre-2);
  font-size: 14px;
}

/* ---------- Éventail de cartes ---------- */

.eventail-zone {
  overflow: hidden;
  padding: 0 0 50px;
  text-align: center;
  animation: apparait 0.9s 0.2s var(--courbe) both;
}

/* Sans JavaScript, et sur un écran étroit : une rangée de cartes qui défile, aimantée sur chacune. */
.eventail {
  display: flex;
  gap: 18px;
  justify-content: safe center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 16px 30px;
  scrollbar-width: thin;
}

.carte {
  position: relative;
  flex: 0 0 300px;
  width: 300px;
  height: 540px;
  border: 5px solid var(--carte-bord);
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  text-align: left;
  text-decoration: none;
  scroll-snap-align: center;
  box-shadow: var(--carte-ombre);
  transition: transform 0.6s var(--courbe), border-color 0.3s, box-shadow 0.3s;
}
/* Reflet qui balaie la carte. */
.carte::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 14%) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: brille 4s linear infinite;
}
/* Assombrit le bas pour que le texte blanc reste lisible sur toutes les couleurs. */
.carte::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, transparent 35%, rgb(0 0 0 / 72%));
}
.carte:focus-visible {
  outline-offset: 5px;
}

.carte--lac {
  background: radial-gradient(circle at 30% 20%, #3a98c9, #1b6ca8 45%, #0b1f30);
}
.carte--soleil {
  background: radial-gradient(circle at 70% 20%, #f5b83d, #e3743a 40%, #7a2e4d 85%);
}
.carte--sapin {
  background: radial-gradient(circle at 40% 25%, #7fd1a0, #2e7d4f 50%, #0b1f30);
}
.carte--ardoise {
  background: radial-gradient(circle at 40% 25%, #9aa9b6, #4c6072 50%, #16293a);
}

.carte__video,
.carte__etat {
  position: absolute;
  left: 16px;
  font-size: 11px;
  border-radius: var(--pilule);
  padding: 4px 10px;
}
.carte__video {
  top: 16px;
  background: rgb(0 0 0 / 50%);
}
.carte__etat {
  top: 46px;
  font-weight: 600;
  background: rgb(11 31 48 / 70%);
  border: 1px solid rgb(255 255 255 / 35%);
}

.carte__sujet {
  position: absolute;
  right: 16px;
  top: 16px;
  max-width: 55%;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  color: var(--nuit);
  border-radius: var(--pilule);
  padding: 4px 10px;
}

/* Au-dessus du texte : un texte édité qui s'allonge ne doit jamais rendre la vidéo impossible à lancer. */
.carte__lecture {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 112px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgb(255 255 255 / 18%);
  border: 1px solid rgb(255 255 255 / 45%);
  backdrop-filter: blur(8px);
  font-size: 26px;
  transition: transform 0.3s var(--courbe);
}
.carte:hover .carte__lecture,
.carte:focus-visible .carte__lecture {
  transform: translate(-50%, -50%) scale(1.1);
}
.carte__lecture[data-video] {
  cursor: pointer;
}

/* Invisible à la souris, ces boutons apparaissent au clavier : un lien de tuile ne peut pas contenir de bouton. */
.video-acces {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.video-acces:focus-visible {
  position: relative;
  z-index: 20;
  display: block;
  width: auto;
  height: auto;
  margin: 0 auto 8px;
  padding: 8px 16px;
  overflow: visible;
  clip-path: none;
  border-radius: var(--pilule);
  background: #fff;
  color: var(--nuit);
}

.video-dialogue {
  width: min(92vw, calc(92dvh * 1080 / 1972));
  aspect-ratio: 1080 / 1972;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
}
.video-dialogue::backdrop {
  background: rgb(11 31 48 / 80%);
}
.video-dialogue iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-dialogue__fermer {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 65%);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.carte__bas {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
}
.carte__bas h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.carte__texte {
  display: block;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #e2ecf3;
}
.carte__etiquettes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.carte__etiquettes li {
  font-size: 11px;
  background: rgb(255 255 255 / 16%);
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: var(--pilule);
  padding: 4px 9px;
}
.carte__bouton {
  display: block;
  text-align: center;
  background: #fff;
  color: var(--nuit);
  border-radius: var(--pilule);
  padding: 12px;
  font-weight: 600;
  transition: letter-spacing 0.3s var(--courbe);
}
.carte:hover .carte__bouton {
  letter-spacing: 0.02em;
}

/* Éventail (JavaScript, écran assez large) : cartes empilées en arc, positions posées par vitrine.js. */
.eventail--actif {
  position: relative;
  display: block;
  height: 590px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}
.eventail--actif .carte {
  position: absolute;
  left: 50%;
  top: 10px;
  margin-left: -150px;
  z-index: var(--z, 1);
  transform: translateX(var(--x, 0)) translateY(var(--y, 0)) scale(var(--echelle, 1));
  cursor: pointer;
}
.eventail--actif .carte:not(.carte--centre):hover {
  border-color: var(--lac-clair);
}

.eventail__nav {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  color: var(--encre-2);
  font-size: 14px;
}
.eventail__compteur {
  min-width: 4ch;
  font-variant-numeric: tabular-nums;
}
.eventail__fleche {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--bord-2);
  background: var(--surface);
  color: var(--encre);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.25s var(--courbe), border-color 0.2s;
}
.eventail__fleche:hover {
  border-color: var(--lien);
  transform: scale(1.08);
}
.eventail__fleche:active {
  transform: scale(0.95);
}

/* ---------- Engagements : bande sombre, comme le bloc « confiance » de la maquette d'accueil ---------- */

.arguments {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0 var(--marge) 80px;
  border-radius: 32px;
  background: var(--bande);
  border: 1px solid var(--bande-bord);
  color: #fff;
  padding: 48px var(--marge);
}
/* Halo lumineux qui flotte lentement derrière les engagements. */
.arguments::before,
.arguments::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: flotte 14s ease-in-out infinite alternate;
}
.arguments::before {
  width: 420px;
  height: 420px;
  left: -120px;
  top: -160px;
  background: #1b6ca8;
}
.arguments::after {
  width: 260px;
  height: 260px;
  right: 8%;
  bottom: -140px;
  background: #3a98c9;
  animation-delay: -6s;
}
.arguments ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.arguments li {
  background: rgb(255 255 255 / 6%);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 20px;
  padding: 22px;
  transition: transform 0.3s var(--courbe), background-color 0.3s;
}
.arguments li:hover {
  transform: translateY(-4px);
  background: rgb(255 255 255 / 10%);
}
.arguments strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.arguments span {
  color: #c7d6e2;
  font-size: 14px;
}

/* ---------- Listes d'outils (entreprises, particuliers) ---------- */

.outils,
.section,
.contact,
.legal {
  max-width: 1000px;
  margin: 0 auto 70px;
  padding: 0 var(--marge);
}

.outils > h2,
.section > h2,
.contact > h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* Les listes d'outils prennent plus de largeur que les textes : 4 tuiles côte à côte sur un grand écran.
   Rangées équilibrées : 5 tuiles tiennent sur une ligne, 6 se rangent en 3 + 3 plutôt qu'en 4 + 2. */
:root {
  --largeur-outils: 1240px;
}
.outils {
  max-width: var(--largeur-outils);
}
.outils ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.outils ul:has(> li:nth-child(5):last-child) {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.outils ul:has(> li:nth-child(6):last-child) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.outils li {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 20px;
  padding: 22px;
  transition: transform 0.3s var(--courbe), box-shadow 0.3s;
}
.outils li:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgb(11 31 48 / 45%);
}
.outils h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.outils p {
  margin: 0;
  color: var(--encre-2);
  font-size: 15px;
}
.outils__bientot {
  border-style: dashed;
}
.pastille {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--puce);
  color: var(--encre-2);
  border-radius: var(--pilule);
  padding: 3px 9px;
}

.section p {
  max-width: 680px;
  color: var(--encre-2);
  font-size: 17px;
}

/* ---------- Contact ---------- */

.contact {
  max-width: 820px;
}
.contact > p {
  margin: 0 0 22px;
  color: var(--encre-2);
  font-size: 17px;
}

/* Vide, la zone reste dans l'arbre d'accessibilité : un message inséré plus tard est bien annoncé. */
.contact__retour {
  margin: 0 0 18px;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 600;
}
.contact__retour:empty {
  margin: 0;
  padding: 0;
}
.contact__retour--envoye {
  background: var(--ok-fond);
  color: var(--ok-encre);
}
.contact__retour--invalide,
.contact__retour--limite,
.contact__retour--erreur {
  background: var(--alerte-fond);
  color: var(--alerte-encre);
}

.contact__formulaire {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 26px;
  padding: 26px;
}
.contact__formulaire > :nth-child(n + 5),
.contact__envoyer {
  grid-column: 1 / -1;
}
.contact__envoyer {
  justify-self: start;
}

.champ {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.champ input,
.champ select,
.champ textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--encre);
  background: var(--neige);
  border: 1px solid var(--bord-2);
  border-radius: 14px;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.champ textarea {
  resize: vertical;
  min-height: 140px;
}
.champ input:focus-visible,
.champ select:focus-visible,
.champ textarea:focus-visible {
  /* Contour transparent plutôt qu'absent : en mode contrastes élevés de Windows, l'ombre disparaît mais lui reste visible. */
  outline: 2px solid transparent;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus);
}
.champ--case {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  color: var(--encre-2);
}
.champ--case input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--lac);
}

.preparation {
  background: var(--surface);
  border: 1px dashed var(--bord-2);
  border-radius: 20px;
  padding: 20px 22px;
  color: var(--encre-2);
}
.preparation p {
  margin: 0;
}

/* ---------- Pages légales ---------- */

.legal {
  max-width: 760px;
  padding-top: 30px;
}
.legal h1 {
  margin: 0 0 24px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.legal h2 {
  margin: 30px 0 8px;
  font-size: 20px;
  font-weight: 600;
}
.legal p {
  color: var(--encre-2);
}
.responsable {
  font-style: normal;
  line-height: 1.7;
}

/* ---------- Lisibilité sur le paysage ----------
   Les textes gris posés sur le fond (paragraphes, contact, pages légales, compteur, pied) reçoivent un panneau presque
   opaque : --lecture-opacite à 90 % garde un contraste AA (4,5:1) même au-dessus des caps sombres et du lac. */

:root {
  --lecture-opacite: 90%;
  --lecture: color-mix(in srgb, var(--neige) var(--lecture-opacite), transparent);
}

.section,
.contact,
.legal {
  width: calc(100% - 2 * var(--marge));
  padding: clamp(16px, 4vw, 40px);
  background: var(--lecture);
  border: 1px solid var(--bord);
  border-radius: 28px;
  backdrop-filter: blur(8px);
}
.section > :last-child,
.legal > :last-child {
  margin-bottom: 0;
}

/* Intertitre : une section texte suivie d'une liste d'outils (ex. un parcours de la page Formations) n'est pas un
   panneau mais un titre de chapitre : numéro calculé (01, 02…) et barre, titre, partie *en italique* bleue, puis un
   filet qui s'efface. Le chapeau garde le fond de lecture (contraste AA sur le paysage) ; la liste prend un petit libellé. */
.section:has(+ .outils) {
  counter-increment: intertitre;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: auto;
  max-width: var(--largeur-outils);
  margin-top: 90px;
  margin-bottom: 22px;
  padding: 0 var(--marge);
  background: none;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
}
.section:has(+ .outils) > h2 {
  display: flex;
  align-items: stretch;
  margin: 0;
}
.section:has(+ .outils) > h2::before,
.section:has(+ .outils) > h2 .section__titre {
  background: var(--lecture);
}
.section:has(+ .outils) > h2::before {
  content: counter(intertitre, decimal-leading-zero);
  display: flex;
  align-items: center;
  padding: 4px 16px 4px 12px;
  border-radius: 14px 0 0 14px;
  border-right: 3px solid var(--lien);
  color: var(--lien);
  font-family: var(--police-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}
.section:has(+ .outils) > h2 .section__titre {
  padding: 4px 16px;
  border-radius: 0 14px 14px 0;
}
.section:has(+ .outils) > h2 .serif {
  color: var(--lien);
  letter-spacing: 0;
}
.section:has(+ .outils) > h2::after {
  content: "";
  flex: 1 1 40px;
  align-self: center;
  margin-left: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lien), transparent);
}
.section:has(+ .outils) > p {
  align-self: flex-start;
  margin: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--lecture);
}
/* Sur un petit écran, le titre passe à la ligne dans sa pastille et le filet disparaît. */
@media (max-width: 700px) {
  .section:has(+ .outils) > h2::after {
    display: none;
  }
}
.section:has(+ .outils) + .outils > h2 {
  width: fit-content;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: var(--pilule);
  background: var(--lecture);
  color: var(--encre-2);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eventail__compteur {
  border-radius: var(--pilule);
  padding: 4px 10px;
  background: var(--lecture);
}

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

.pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 22px;
  padding: 30px var(--marge) 40px;
  border-top: 1px solid var(--bord);
  background: var(--lecture);
  backdrop-filter: blur(8px);
  color: var(--encre-2);
  font-size: 14px;
  text-align: center;
}
.pied p {
  margin: 0;
}
.pied nav {
  display: flex;
  gap: 18px;
}
/* « Éditer cette page » : caché (attribut hidden) sauf pour l'administrateur, discret, couleurs des jetons clair/sombre. */
.pied__edition {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 14px;
  border: 1px solid var(--bord-2);
  border-radius: var(--pilule);
  background: var(--surface);
  color: var(--encre-2);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.pied__edition:hover {
  background: var(--puce);
  color: var(--encre);
}
.pied__edition[hidden] {
  display: none;
}

/* ---------- Animations ---------- */

@keyframes brille {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}
@keyframes flotte {
  to {
    transform: translate(60px, 40px) scale(1.15);
  }
}
@keyframes apparait {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ---------- Écrans plus étroits ---------- */

@media (max-width: 1000px) {
  .menu {
    order: 10;
    flex-basis: 100%;
    justify-content: center;
    margin: 0;
    border: 0;
    background: transparent;
    padding: 0;
    overflow-x: auto;
  }
  .entete__logo {
    margin-right: auto;
  }
}

@media (max-width: 700px) {
  :root {
    --marge: 16px;
  }
  .entete {
    padding-top: 16px;
  }
  .theme {
    order: 5;
  }
  .bascule-langue {
    order: 6;
  }
  .menu a {
    padding: 7px 11px;
    font-size: 13px;
  }
  .titre {
    padding-top: 20px;
  }
  .titre__intro {
    font-size: 16px;
  }
  .eventail {
    justify-content: flex-start;
    scroll-padding-inline: 16px;
  }
  .carte {
    flex-basis: 280px;
    width: 280px;
  }
  .arguments {
    margin-bottom: 60px;
    padding: 28px 18px;
    border-radius: 24px;
  }
  .contact__formulaire {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .theme {
    flex-basis: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Mouvement réduit demandé : ni reflet, ni halo, ni transition. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
