/* izynote · landing. Livraison 31 : « étudier sans avoir l’impression d’étudier » ; livraison 40 : « Ton cours devient
 * un jeu. », un téléphone qui joue aux quatre jeux ; livraison 40c : sur téléphone, le bouton sous l'ardoise.
 *
 * Le monde reste « la copie double » (livraison 12) : copie à grands carreaux dessinée en CSS, une seule famille
 * (Bricolage Grotesque), le bleu du logo comme accent, le rouge seulement pour le cercle au stylo du titre, le fluo sur
 * un seul passage. Livraison 40 : au premier écran, un téléphone posé sur la copie joue, à tour de rôle, aux quatre
 * jeux (vraies captures), et une ardoise dessous (le vert et le bois du tableau des jeux, repris de l'app) porte le nom
 * du jeu écrit à la craie : la même police, la couleur craie des jeux, un léger flou et un grain (décision du
 * fondateur, livraison 40). Seule la boucle bouge.
 * assets/site.css reste la feuille des pages légales (cgu/, confidentialite/) : elle ne change pas.
 */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-titre.woff2") format("woff2");
  font-weight: 800;
  font-stretch: 75%;
  font-style: normal;
  font-display: swap;
  ascent-override: 93%;
  descent-override: 27%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-texte.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100%;
  font-style: normal;
  font-display: swap;
  ascent-override: 93%;
  descent-override: 27%;
  line-gap-override: 0%;
}

/* Polices de repli calées sur la largeur de Bricolage : rien ne bouge quand elle arrive. */
@font-face {
  font-family: "Bricolage Repli";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Roboto");
  size-adjust: 97%;
  ascent-override: 96%;
  descent-override: 28%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Bricolage Repli Titre";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Roboto Bold");
  font-weight: 800;
  size-adjust: 62%;
  ascent-override: 150%;
  descent-override: 44%;
  line-gap-override: 0%;
}

:root {
  --paper: #fbfbfe;
  --sheet: #fff;
  --ink: #16151d;
  --ink-2: #3f3d4c;
  --ink-3: #5d5a6a;
  --accent: #1d3fbf;
  --accent-deep: #152e8c;
  --accent-wash: #e7ebfb;
  --pen: #d42a3c; /* seulement le cercle du titre */
  --rule-margin: rgb(29 63 191 / 0.5);
  --sq: 32px;
  --margin-x: 24px;
  --pad-l: calc(var(--margin-x) + 12px);
  --pad-r: 16px;

  --text: "Bricolage Grotesque", "Bricolage Repli", system-ui, sans-serif;
  --title: "Bricolage Grotesque", "Bricolage Repli Titre", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sheet: 0 1px 2px rgb(22 21 29 / 0.08), 0 16px 32px -20px rgb(22 21 29 / 0.32);
  --shadow-laid: 0 1px 2px rgb(22 21 29 / 0.12), 12px 24px 34px -14px rgb(22 21 29 / 0.42);

  /* Livraison 40 : l'ardoise et la craie des jeux (mêmes valeurs que dans l'app), le téléphone. */
  --craie: #f3f0e4;
  --ardoise: #233a30;
  --ardoise-2: #2d493b;
  --bois: #8d5a33;
  --tel-w: clamp(180px, 53vw, 226px);
  --shadow-tel: 0 2px 4px rgb(22 21 29 / 0.1), 22px 34px 54px -20px rgb(22 21 29 / 0.5);
  /* Le grain de la craie : un bruit fin qui laisse passer environ quatre points sur cinq. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.6 2.15'/%3E%3C/filter%3E%3Crect width='96' height='96' filter='url(%23g)'/%3E%3C/svg%3E");

  color-scheme: light;
  scrollbar-color: rgb(29 63 191 / 0.35) transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

html {
  background: var(--paper);
}

body {
  margin: 0;
  overflow-x: clip;
  min-height: 100vh;
  font-family: var(--text);
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
  caret-color: var(--accent);
  background-color: var(--paper);
  /* La copie Seyès : un carreau de 32 px dessiné une fois et répété, la marge à gauche. */
  background-image:
    linear-gradient(90deg, transparent calc(var(--margin-x) - 1px), var(--rule-margin) calc(var(--margin-x) - 1px), var(--rule-margin) calc(var(--margin-x) + 1px), transparent calc(var(--margin-x) + 1px)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg fill='%231d3fbf'%3E%3Crect width='32' height='1' fill-opacity='.16'/%3E%3Crect y='8' width='32' height='1' fill-opacity='.075'/%3E%3Crect y='16' width='32' height='1' fill-opacity='.075'/%3E%3Crect y='24' width='32' height='1' fill-opacity='.075'/%3E%3Crect width='1' height='32' fill-opacity='.12'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100% 100%, var(--sq) var(--sq);
  background-position: 0 0, var(--margin-x) 0;
  background-repeat: no-repeat, repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgb(29 63 191 / 0.2);
  color: var(--ink);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

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

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.skip {
  position: absolute;
  left: var(--pad-l);
  top: 8px;
  z-index: 50;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

/* En-tête de la copie : le nom en petit, comme avant. ------------------------------------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--pad-r) 0 var(--pad-l);
}

.brand {
  display: block;
  border-radius: 4px;
}

.brand__logo {
  display: block;
  width: auto;
  height: 26px;
}

.head-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.head-link:hover {
  text-decoration: underline;
}

/* Boutons -------------------------------------------------------------------------------- */

/* « Étudie en t’amusant » : le bleu du stylo, une seule ligne, sans marque ni flèche. Même adresse et mêmes
   événements qu'avant (livraison 40). */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  height: 56px;
  padding: 0 24px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.005em;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(21 46 140 / 0.3), 0 12px 24px -12px rgb(29 63 191 / 0.65);
  transition: transform 0.15s var(--ease-out), background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: var(--accent-deep);
}

.btn:active {
  transform: scale(0.98);
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

/* Premier écran (livraison 40) -------------------------------------------------------------- */
/* Téléphone (livraison 40c, à toutes les hauteurs) : le titre sur deux lignes, le téléphone qui joue et son ardoise,
   le bouton, puis le sous-titre (tout le haut tient sans défiler à 390 × 844 ; plus bas, la barre collante prend le
   relais dès l'arrivée). Ordinateur : le texte et le bouton à gauche, la scène à droite.
   Seule la boucle bouge : le cercle au stylo et le fluo sont tracés d'emblée. */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "title"
    "scene"
    "cta"
    "lead";
  padding: 8px var(--pad-r) 0 var(--pad-l);
  /* L'inclinaison du téléphone et de l'ardoise ne déborde jamais de l'écran (pas de défilement de côté,
     même sur les navigateurs intégrés qui ne connaissent pas « clip »). */
  overflow: hidden;
  overflow: clip;
}

/* Le titre : deux lignes, aussi grand que la largeur le permet. */
.hero__title {
  grid-area: title;
  position: relative;
  top: 2px;
  margin: 0;
  font-family: var(--title);
  font-size: clamp(38px, 12.8vw, 62px);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 0.92em;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero__line {
  display: block;
  white-space: nowrap;
}

/* Le seul rouge de la page : le cercle au stylo autour de « jeu ». */
.pen {
  position: relative;
  display: inline-block;
}

.pen svg {
  position: absolute;
  left: -14%;
  top: -8%;
  width: 128%;
  height: 120%;
  overflow: visible;
  pointer-events: none;
}

.pen path {
  fill: none;
  stroke: var(--pen);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Le seul passage surligné de la page. */
.fluo {
  margin: 0 -0.08em;
  padding: 0 0.08em;
  border-radius: 0.18em 0.32em 0.28em 0.22em;
  background-color: transparent;
  background-image: linear-gradient(100deg, rgb(255 228 92 / 0.35), #ffe45c 7%, #ffe45c 93%, rgb(255 228 92 / 0.5));
  background-repeat: no-repeat;
  background-position: 0 70%;
  background-size: 100% 64%;
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero__lead {
  grid-area: lead;
  max-width: 34ch;
  margin: 16px 0 0;
  font-size: 16px;
  font-weight: 450;
  line-height: 24px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero__cta {
  grid-area: cta;
  margin-top: 16px;
}

.hero__note {
  max-width: 400px;
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  color: var(--ink-2);
}

/* La scène : le téléphone, puis l'ardoise posée sous lui. La place de l'ardoise est celle de sa version la plus
   haute (mesurée par assets/main-40.js) : l'ardoise suit son contenu, le bouton dessous ne bouge jamais. */
.scene {
  /* La version la plus haute (promesse sur deux lignes), avant que assets/main-40.js ne la mesure : rien ne saute. */
  --ardoise-place: 136px;
  grid-area: scene;
  position: relative;
  display: grid;
  grid-template-rows: auto var(--ardoise-place);
  justify-items: center;
  margin: 16px 0 0;
}

/* Le téléphone est un bouton : le toucher met la boucle en pause (et la relance). */
.scene__tel {
  display: block;
  width: var(--tel-w);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: calc(var(--tel-w) * 0.2);
  background: none;
  font: inherit;
  cursor: pointer;
  transform: rotate(-2.5deg);
  -webkit-tap-highlight-color: transparent;
}

.scene__tel:focus-visible {
  outline-offset: 6px;
}

.tel {
  position: relative;
  display: block;
  padding: calc(var(--tel-w) * 0.075) calc(var(--tel-w) * 0.036) calc(var(--tel-w) * 0.036);
  border-radius: calc(var(--tel-w) * 0.2);
  background: var(--ink);
  box-shadow: var(--shadow-tel), inset 0 0 0 1.5px rgb(255 255 255 / 0.14);
}

/* L'écouteur, en haut ; le bouton de côté. */
.tel::before {
  content: "";
  position: absolute;
  top: calc(var(--tel-w) * 0.031);
  left: 50%;
  width: 24%;
  height: 3px;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.18);
  transform: translateX(-50%);
}

.tel::after {
  content: "";
  position: absolute;
  top: 24%;
  right: -2px;
  width: 3px;
  height: 11%;
  border-radius: 0 2px 2px 0;
  background: #2a2933;
}

.tel__ecran {
  position: relative;
  display: block;
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: calc(var(--tel-w) * 0.13);
  background: #e7d6b8;
  isolation: isolate;
}

.tel__jeu {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}

.tel__jeu.is-on {
  z-index: 1;
  opacity: 1;
}

.tel__jeu img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* En pause : un rond d'encre et ses deux barres, au milieu de l'écran. */
.tel__pause {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(22 21 29 / 0.62);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.tel__pause svg {
  width: 46%;
  height: 46%;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.is-paused .tel__pause {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* L'ardoise : le vert et le bois du tableau des jeux, posée sous le téléphone, un peu de travers. Sa hauteur suit
   son contenu. */
.ardoise {
  position: relative;
  z-index: 2;
  display: grid;
  align-self: start;
  justify-items: start;
  width: min(100%, 320px);
  margin-top: -22px;
  padding: 10px 16px 2px;
  border: 6px solid var(--bois);
  border-radius: 10px;
  background:
    radial-gradient(120% 80% at 18% 28%, rgb(243 240 228 / 0.07), transparent 60%),
    radial-gradient(90% 70% at 82% 78%, rgb(243 240 228 / 0.05), transparent 65%),
    linear-gradient(160deg, var(--ardoise-2), var(--ardoise) 55%);
  box-shadow: var(--shadow-laid), inset 0 0 0 1px rgb(0 0 0 / 0.28), inset 0 2px 12px rgb(0 0 0 / 0.28);
  transform: rotate(1.4deg);
}

.ardoise__ecrit {
  display: grid;
  justify-items: start;
  width: 100%;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

/* Le nom du jeu et son trait : la craie (grain et léger flou). */
.ardoise__nom,
.ardoise__trait,
.trait svg {
  -webkit-mask-image: var(--grain);
  mask-image: var(--grain);
  -webkit-mask-size: 96px 96px;
  mask-size: 96px 96px;
}

.ardoise__nom {
  display: block;
  max-width: 100%;
  font-family: var(--title);
  font-size: clamp(22px, 7.7vw, 30px);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 34px;
  letter-spacing: 0.01em;
  color: var(--craie);
  text-shadow: 0 0 1px rgb(243 240 228 / 0.75), 0 0 9px rgb(243 240 228 / 0.2);
  text-wrap: balance;
}

.ardoise__trait {
  display: block;
  width: 64%;
  height: 8px;
  margin-top: -2px;
  overflow: visible;
}

.ardoise__trait path {
  fill: none;
  stroke: var(--craie);
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.8;
  stroke-dasharray: 1 2;
}

/* La promesse : nette (ni grain ni flou), pour se lire d'un coup d'œil. */
.ardoise__promesse {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  color: var(--craie);
  text-wrap: pretty;
}

/* Les quatre traits de craie : un par jeu, comme on compte au tableau. Chacun est un bouton de 44 × 44 px ; le trait
   du jeu affiché est plein (craie), les autres restent lisibles (au moins 3:1 sur l'ardoise, mesuré). Sans JavaScript,
   rien à choisir. */
.ardoise__traits {
  display: none;
}

.js .ardoise__traits {
  display: flex;
  gap: 2px;
  margin: 2px 0 2px -14px;
}

.trait {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.trait svg {
  width: 12px;
  height: 36px;
  overflow: visible;
}

.trait path {
  fill: none;
  stroke: var(--craie);
  stroke-width: 3.4;
  stroke-linecap: round;
  opacity: 0.52;
  transition: opacity 0.2s ease;
}

.trait:nth-child(2) svg { transform: rotate(3deg); }
.trait:nth-child(3) svg { transform: rotate(-2deg); }
.trait:nth-child(4) svg { transform: rotate(4deg); }

.trait:hover path {
  opacity: 0.72;
}

.trait[aria-pressed="true"] path {
  opacity: 1;
  stroke-width: 4.6;
}

.trait:focus-visible {
  outline-color: var(--craie);
  outline-offset: -3px;
}

/* La craie s'efface puis se réécrit à chaque changement de jeu. */
.ardoise__ecrit.is-efface {
  opacity: 0;
  filter: blur(3px);
}

.is-ecrit .ardoise__nom {
  animation: craie-ecrit 0.5s var(--ease-out) both;
}

.is-ecrit .ardoise__trait path {
  animation: craie-trait 0.35s ease-out 0.3s both;
}

.is-ecrit .ardoise__promesse {
  animation: craie-fondu 0.3s ease 0.4s both;
}

@keyframes craie-ecrit {
  from { clip-path: inset(-30% 100% -30% 0); }
  to { clip-path: inset(-30% -2% -30% 0); }
}

@keyframes craie-trait {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes craie-fondu {
  from { opacity: 0; }
}

/* Le petit mouvement de chaque scène (réglé dans assets/scene-jeux.js). */
.bouge-course img {
  transform-origin: 50% 62%;
  animation: bouge-course 0.36s ease-in-out infinite alternate;
}

.bouge-carte img {
  transform-origin: 50% 22%;
  animation: bouge-approche 3.2s var(--ease-out) both;
}

.bouge-objection img {
  transform-origin: 50% 40%;
  animation: bouge-objection 0.5s ease-out 0.25s both;
}

.bouge-tableau img {
  transform-origin: 22% 10%;
  animation: bouge-approche 3.2s ease-out both;
}

@keyframes bouge-course {
  from { transform: translateY(0.4%) scale(1.03); }
  to { transform: translateY(-0.9%) scale(1.03); }
}

@keyframes bouge-approche {
  from { transform: scale(1); }
  to { transform: scale(1.055); }
}

@keyframes bouge-objection {
  0%, 100% { transform: scale(1.02) translateX(0); }
  25% { transform: scale(1.02) translateX(-1.2%); }
  55% { transform: scale(1.02) translateX(1%); }
  80% { transform: scale(1.02) translateX(-0.4%); }
}

/* Sections ------------------------------------------------------------------------------- */

.section {
  padding: 96px var(--pad-r) 0 var(--pad-l);
}

.section__title {
  max-width: 15em;
  margin: 0;
  font-family: var(--title);
  font-size: 44px;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 48px;
  color: var(--ink);
  text-wrap: balance;
}

.section__lead {
  max-width: 36em;
  margin: 16px 0 0;
  font-size: 18px;
  font-weight: 450;
  line-height: 28px;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Comment ça marche : trois étapes, le numéro écrit au stylo bleu dans la marge, et pour chacune
   ce que l'étudiant voit dans l'app. */
.steps__list {
  display: grid;
  gap: 48px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  gap: 16px;
  align-items: start;
}

.step__num {
  position: absolute;
  top: -6px;
  right: calc(100% + var(--pad-l) - var(--margin-x) + 6px);
  font-family: var(--title);
  font-size: 40px;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 40px;
  color: var(--accent);
}

.step__title {
  margin: 0;
  font-family: var(--title);
  font-size: 30px;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 32px;
  color: var(--ink);
}

.step__text {
  max-width: 30em;
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 26px;
  color: var(--ink-2);
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sources li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px rgb(22 21 29 / 0.12), 0 1px 2px rgb(22 21 29 / 0.06);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.sources li:nth-child(1) { transform: rotate(-2deg); }
.sources li:nth-child(3) { transform: rotate(1.5deg); }

.sources svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
}

/* Deux morceaux d'écran du jeu, posés sur la copie. */
.ecran {
  width: 100%;
  max-width: 340px;
  margin: 0;
  padding: 14px 16px 16px;
  border-radius: 14px;
  background: var(--sheet);
  box-shadow: var(--shadow-laid);
}


.ecran--saisie {
  transform: rotate(1deg);
}

.ecran__haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
}

.ecran__chrono {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2.5px var(--accent);
  font-family: var(--title);
  font-size: 18px;
  font-weight: 800;
  font-stretch: 75%;
  color: var(--accent);
}

.ecran__champ {
  display: flex;
  align-items: center;
  min-height: 52px;
  margin: 12px 0 0;
  padding: 0 14px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px rgb(29 63 191 / 0.45);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}

.ecran__curseur {
  width: 2px;
  height: 22px;
  margin-left: 2px;
  background: var(--accent);
  animation: curseur 1.1s steps(1) infinite;
}

@keyframes curseur {
  50% {
    opacity: 0;
  }
}

.ecran--bilan {
  transform: rotate(-1deg);
}

.ecran__mot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  font-family: var(--title);
  font-size: 26px;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 32px;
  color: var(--ink);
}

.ecran__mot .tag {
  font-family: var(--text);
  font-stretch: 100%;
}

.ecran__label {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  color: var(--accent);
}

.ecran__point {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.ecran__extrait {
  margin: 6px 0 0;
  padding-left: 10px;
  box-shadow: inset 2px 0 0 rgb(29 63 191 / 0.3);
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-2);
}

/* Avis d'étudiants (livraison 15, inchangés) : un ruban de cartes sur téléphone, des colonnes
   décalées sur ordinateur. Jamais de défilement automatique. */
.reviews__track {
  display: flex;
  gap: 14px;
  margin: 24px calc(-1 * var(--pad-r)) 0 calc(-1 * var(--pad-l));
  padding: 18px var(--pad-r) 26px var(--pad-l);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--pad-l);
  list-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.reviews__track::-webkit-scrollbar {
  display: none;
}

.reviews__track::after {
  content: "";
  flex: 0 0 1px;
}

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

.review {
  flex: 0 0 84%;
  max-width: 340px;
  scroll-snap-align: start;
}

.review__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  margin: 0;
  padding: 26px 20px 20px;
  border-radius: 10px;
  background: var(--sheet);
  box-shadow: 0 1px 2px rgb(22 21 29 / 0.1), 0 18px 32px -22px rgb(22 21 29 / 0.4);
}

/* Un bout de ruban adhésif, comme une note collée sur la copie. */
.review__card::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 72px;
  height: 20px;
  margin-left: -36px;
  border-radius: 2px;
  background: rgb(29 63 191 / 0.13);
  transform: rotate(-3deg);
}

.review--1 .review__card { transform: rotate(-0.8deg); }
.review--2 .review__card { transform: rotate(0.6deg); }
.review--3 .review__card { transform: rotate(-0.3deg); }
.review--2 .review__card::before { transform: rotate(4deg); }

.review__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review__tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}

.review__quote {
  margin: 0;
}

.review__hook {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  line-height: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.review__mark {
  margin: 0 -0.06em;
  padding: 0 0.06em;
  border-radius: 0.18em 0.32em 0.28em 0.22em;
  background-color: transparent;
  background-image: linear-gradient(100deg, rgb(255 228 92 / 0.35), #ffe45c 7%, #ffe45c 93%, rgb(255 228 92 / 0.5));
  background-repeat: no-repeat;
  background-position: 0 70%;
  background-size: 100% 64%;
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.review__text {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink-2);
}

.review__who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed rgb(29 63 191 / 0.22);
}

.review__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.review__avatar--0 { background: #e7ebfb; color: #1d3fbf; }
.review__avatar--1 { background: #f6e6e0; color: #8a3a21; }
.review__avatar--2 { background: #e5efe3; color: #3f5c3a; }
.review__avatar--3 { background: #f1e5f0; color: #63375f; }
.review__avatar--4 { background: #f6ecd6; color: #6f5010; }
.review__avatar--5 { background: #ddeeee; color: #1f5053; }
.review__avatar--6 { background: #e4e8ef; color: #3b4659; }
.review__avatar--7 { background: #f6e3e9; color: #84374f; }

.review__id {
  display: grid;
  min-width: 0;
}

.review__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  color: var(--ink);
}

.review__field {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}

.reviews__hint {
  display: none;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.js .reviews__hint {
  display: block;
}

.reviews .btn {
  margin-top: 28px;
}

.reviews.is-armed .review {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}

.reviews.is-in .review {
  opacity: 1;
  transform: none;
}

.reviews.is-in .review:nth-child(2) { transition-delay: 0.06s; }
.reviews.is-in .review:nth-child(3) { transition-delay: 0.12s; }
.reviews.is-in .review:nth-child(4) { transition-delay: 0.18s; }
.reviews.is-in .review:nth-child(5) { transition-delay: 0.24s; }
.reviews.is-in .review:nth-child(n + 6) { transition-delay: 0.3s; }

.reviews.is-armed .review__mark {
  background-size: 0% 64%;
  transition: background-size 0.45s cubic-bezier(0.65, 0, 0.35, 1) 0.45s;
}

.reviews.is-in .review__mark {
  background-size: 100% 64%;
}

/* Et quand tu veux réviser pour de vrai : une fiche bristol, une ligne par fonction. */
.fiche {
  position: relative;
  max-width: 560px;
  margin-top: 32px;
  padding: 24px 20px 20px;
  border-radius: 14px;
  background-color: var(--sheet);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 3px;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-laid);
  transform: rotate(-0.6deg);
}

.fiche__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fiche__list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgb(29 63 191 / 0.1);
}

.fiche__list svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent);
}

.fiche__list p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink-2);
}

.fiche__list b {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

/* Pays (livraison 15), en version compacte : quatre drapeaux, la fiche de ce qui s'adapte. */
.country-pick {
  max-width: 520px;
  margin-top: 24px;
}

.country {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.country__opt {
  position: relative;
  display: block;
}

.country__opt input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.country__chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 56px;
  padding: 6px 4px;
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1.5px rgb(22 21 29 / 0.14);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  color: var(--ink);
  transition: box-shadow 0.15s, color 0.15s;
}

.country__opt:hover .country__chip {
  box-shadow: inset 0 0 0 1.5px rgb(29 63 191 / 0.5);
}

.country__opt input:checked + .country__chip {
  box-shadow: inset 0 0 0 2px var(--accent);
  color: var(--accent);
}

.country__opt input:focus-visible + .country__chip {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.country__name {
  max-width: 100%;
  white-space: nowrap;
}

.flag {
  width: 24px;
  height: 16px;
  flex: none;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(22 21 29 / 0.14);
}

.cpanels {
  margin-top: 12px;
}

.cpanel {
  display: none;
  position: relative;
  padding: 12px 16px 4px;
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
  animation: cpanel-in 0.35s var(--ease-out) both;
}

.js .cpanels[data-shown="be"] .cpanel--be,
.js .cpanels[data-shown="fr"] .cpanel--fr,
.js .cpanels[data-shown="ch"] .cpanel--ch,
.js .cpanels[data-shown="lu"] .cpanel--lu {
  display: block;
}

html:not(.js) .country-pick:has(input[value="be"]:checked) .cpanel--be,
html:not(.js) .country-pick:has(input[value="fr"]:checked) .cpanel--fr,
html:not(.js) .country-pick:has(input[value="ch"]:checked) .cpanel--ch,
html:not(.js) .country-pick:has(input[value="lu"]:checked) .cpanel--lu {
  display: block;
}

@keyframes cpanel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.cpanel__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--title);
  font-size: 20px;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 28px;
  color: var(--ink);
}

.cpanel__head .flag {
  width: 24px;
  height: 16px;
}

.cpanel__rows {
  margin: 0;
}

.cpanel__row {
  padding: 8px 0 10px;
  border-top: 1px dashed rgb(29 63 191 / 0.22);
}

.cpanel__head + .cpanel__rows .cpanel__row:first-child {
  margin-top: 6px;
}

.cpanel__row dt {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  color: var(--accent);
}

.cpanel__row dd {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink);
}

.cpanel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.cpanel__chips li {
  padding: 2px 9px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1.5px rgb(22 21 29 / 0.14);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

/* Le mot qui change, entouré au stylo bleu (le rouge reste au titre). */
.ring {
  position: relative;
  display: inline-block;
  margin: 0 0.18em;
  font-weight: 700;
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

.ring--gap {
  margin-left: 0.4em;
}

.ring svg {
  position: absolute;
  left: -8%;
  top: -16%;
  width: 116%;
  height: 132%;
  overflow: visible;
  pointer-events: none;
}

.ring path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.countries__note {
  max-width: 520px;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-3);
}

/* Questions fréquentes : un filet d'encre ouvre la liste, des filets fins séparent. */
.faq__list {
  max-width: 44rem;
  margin-top: 32px;
  box-shadow: 0 -2px 0 var(--ink);
}

.faq__item {
  box-shadow: 0 1px 0 rgb(22 21 29 / 0.14);
}

.faq__item summary {
  position: relative;
  display: block;
  padding: 16px 48px 16px 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::before,
.faq__item summary::after {
  content: "";
  position: absolute;
  top: 27px;
  right: 10px;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  transition: transform 0.25s var(--ease-out);
}

.faq__item summary::after {
  transform: rotate(90deg);
}

.faq__item[open] summary::after {
  transform: rotate(0deg);
}

.faq__item summary:hover {
  color: var(--accent);
}

.faq__item p {
  margin: 0;
  padding: 0 32px 20px 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink-2);
}

/* Clôture : la carte de ton prochain cours, encore à deviner. */
.closing {
  position: relative;
  padding-bottom: 24px;
}

.closing__carte {
  display: grid;
  place-items: center;
  width: 72px;
  height: 96px;
  margin-bottom: 24px;
  border-radius: 10px;
  background-color: var(--sheet);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 3px;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-laid);
  font-family: var(--title);
  font-size: 56px;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  color: var(--accent);
  transform: rotate(-6deg);
}

.closing__title {
  max-width: 9em;
  margin: 0;
  font-family: var(--title);
  font-size: 52px;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 56px;
  color: var(--ink);
  text-wrap: balance;
}

.closing .btn {
  margin-top: 32px;
}

/* Barre « Étudie en t’amusant » collante, sur téléphone */
.sticky-cta {
  display: none;
}

@media (max-width: 899.98px) {
  .js .sticky-cta {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    display: block;
    padding: 10px var(--pad-r) calc(10px + env(safe-area-inset-bottom)) var(--pad-l);
    background: var(--paper);
    box-shadow: 0 -1px 0 rgb(29 63 191 / 0.16), 0 -16px 24px -16px rgb(22 21 29 / 0.18);
    visibility: hidden;
    transform: translateY(105%);
    transition: transform 0.24s var(--ease-out), visibility 0s linear 0.24s;
  }

  .js .sticky-cta.is-visible {
    visibility: visible;
    transform: none;
    transition: transform 0.32s var(--ease-out), visibility 0s;
  }

  .sticky-cta .btn {
    max-width: none;
    height: 48px;
  }

  html.has-sticky-cta {
    scroll-padding-bottom: 96px;
  }
}

/* Pied de page */
.site-foot {
  margin-top: 64px;
  padding: 24px var(--pad-r) 40px var(--pad-l);
  font-size: 13px;
  line-height: 24px;
  color: var(--ink-3);
}

.foot {
  max-width: 64ch;
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 8px;
  font-weight: 600;
}

.foot p {
  margin: 0 0 8px;
}

/* Petits téléphones (moins de 360 px) ------------------------------------------------------ */
@media (max-width: 359.98px) {
  .section__title {
    font-size: 38px;
    line-height: 40px;
  }

  .closing__title {
    font-size: 44px;
    line-height: 48px;
  }

  .country__chip {
    font-size: 11px;
  }
}

/* Moins de 380 px : deux drapeaux par ligne, le nom à côté. */
@media (max-width: 379.98px) {
  .country {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .country__chip {
    flex-direction: row;
    gap: 8px;
    height: 44px;
    font-size: 13px;
  }
}

/* Livraison 40c : plus de règle pour les téléphones peu hauts. Le téléphone reste avant le bouton ; quand le bouton
   est sous le pli à l'arrivée, la barre collante « Étudie en t’amusant » est là dès le chargement (assets/main-40c.js). */

/* Tablettes --------------------------------------------------------------------------------- */
@media (min-width: 768px) {
  :root {
    --margin-x: 64px;
    --pad-l: calc(var(--margin-x) + 32px);
    --pad-r: 48px;
  }

  .hero {
    padding-top: 40px;
  }

  :root {
    --tel-w: 236px;
  }

  .hero__title {
    top: 4px;
    font-size: 92px;
  }

  .scene {
    --ardoise-place: 152px;
    margin-top: 32px;
  }

  .ardoise {
    width: 360px;
    padding: 14px 20px 4px;
  }

  .ardoise__nom {
    font-size: 36px;
    line-height: 40px;
  }

  .ardoise__promesse {
    font-size: 16px;
    line-height: 24px;
  }

  .hero__cta {
    margin-top: 24px;
  }

  .hero__lead {
    font-size: 20px;
    line-height: 32px;
  }

  .section {
    padding-top: 128px;
  }

  .section__title {
    font-size: 60px;
    line-height: 64px;
  }

  .section__lead {
    font-size: 20px;
    line-height: 32px;
  }

  .step {
    grid-template-columns: minmax(0, 26rem) 340px;
    justify-content: start;
    column-gap: 56px;
  }

  .step__title {
    font-size: 36px;
    line-height: 40px;
  }

  .closing__title {
    font-size: 72px;
    line-height: 72px;
  }

  .closing {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 40px;
    align-items: start;
  }

  .closing__carte {
    grid-row: 1 / 4;
    width: 104px;
    height: 136px;
    margin: 8px 0 0;
    font-size: 80px;
  }

  .closing .btn {
    grid-column: 2;
  }
}


/* Ordinateur : le texte et le bouton à gauche, la scène à droite. ------------------------- */
@media (min-width: 1024px) {
  :root {
    --tel-w: clamp(236px, 19vw, 284px);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 470px);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "title scene"
      "lead scene"
      "cta scene";
    column-gap: 48px;
    align-items: start;
    /* La place sous l'ardoise inclinée : son coin n'est jamais coupé par le bord du premier écran. */
    padding-bottom: 40px;
  }

  .hero__title {
    font-size: clamp(80px, 7.2vw, 116px);
    line-height: 0.9em;
  }

  .hero__lead {
    margin-top: 32px;
  }

  .hero__cta {
    margin-top: 32px;
  }

  .scene {
    margin-top: 0;
    align-self: center;
  }

  .scene__tel {
    transform: rotate(-4deg);
  }

  .ardoise {
    margin-top: -26px;
  }

  .reviews__track {
    display: block;
    columns: 2;
    column-gap: 32px;
    margin: 40px 0 0;
    padding: 12px 6px 0;
    overflow: visible;
  }

  .reviews__track::after {
    display: none;
  }

  .review {
    max-width: none;
    margin-bottom: 32px;
    break-inside: avoid;
  }

  .review__card {
    height: auto;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  }

  .review--1 .review__card { transform: rotate(-1.2deg); }
  .review--2 .review__card { transform: rotate(1deg); }
  .review--3 .review__card { transform: rotate(-0.4deg); }

  .review__card:hover {
    box-shadow: 0 1px 2px rgb(22 21 29 / 0.1), 0 24px 40px -22px rgb(22 21 29 / 0.45);
    transform: rotate(0deg) translateY(-2px);
  }

  .js .reviews__hint {
    display: none;
  }

  .reviews .btn {
    margin-top: 8px;
  }

  .revise,
  .countries {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    column-gap: 64px;
    align-items: start;
  }

  .revise .section__title,
  .countries .section__title,
  .countries .section__lead,
  .countries__note {
    grid-column: 1;
  }

  .revise .fiche {
    grid-column: 2;
    grid-row: 1 / 3;
    margin-top: 0;
  }

  .country-pick {
    grid-column: 2;
    grid-row: 1 / 4;
    margin-top: 0;
  }

  .faq__list {
    margin-top: 40px;
  }
}


@media (min-width: 1280px) {
  :root {
    --margin-x: max(96px, calc(50vw - 600px));
    --pad-r: max(48px, calc(50vw - 640px));
  }

  .section__title {
    font-size: 68px;
    line-height: 72px;
  }

  .reviews__track {
    columns: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
