/* Zanak'i Antsa : le site est un cahier d'écolier (papier Seyès, marge rouge, encre violette).
   Un seul moment animé : le titre s'écrit à la main. Tout le reste est calme. */

@font-face { font-family: "Andika"; src: url("fonts/andika-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Andika"; src: url("fonts/andika-bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playwrite FR"; src: url("fonts/playwrite-fr.woff") format("woff"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --papier: #fbfbff;
  --trait: 118, 138, 214;      /* bleu des lignes du cahier, en rgb pour jouer sur l'opacité */
  --marge: #d93a63;            /* le trait rouge de la marge */
  --encre: #2b1458;            /* encre violette : titres */
  --texte: #26213a;
  --violet: #7b1fa2;           /* le violet de l'app : boutons (blanc dessus : 8,2:1) */
  --violet-fonce: #5a1578;
  --soleil: #ffc83d;
  --menthe: #0d6f6a;           /* texte menthe sur papier : 5,9:1 */
  --u: 32px;                   /* un interligne du cahier */
  --serif: "Playwrite FR", "Segoe Print", "Bradley Hand", cursive;
  --sans: "Andika", "Trebuchet MS", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 400 19px/32px var(--sans);
  color: var(--texte);
  background-color: var(--papier);
  /* Seyès : gros carreaux de 32 px, quatre interlignes fins par ligne, lignes verticales discrètes. */
  background-image:
    linear-gradient(to right, rgba(var(--trait), .13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--trait), .30) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--trait), .10) 1px, transparent 1px);
  background-size: var(--u) var(--u), var(--u) var(--u), var(--u) 8px;
  background-position: 0 22px; /* les lignes passent sous le texte : on écrit sur la ligne */
}

a { color: var(--violet-fonce); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--encre); }
:focus-visible { outline: 4px solid var(--encre); outline-offset: 4px; border-radius: 6px; }
img, video { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 var(--u); max-width: 62ch; }

.lien-evitement { position: absolute; left: 12px; top: -80px; background: var(--encre); color: #fff; padding: 0 20px; z-index: 10; border-radius: 0 0 12px 12px; }
.lien-evitement:focus { top: 0; }

/* La feuille : une marge rouge à gauche, comme dans un cahier. */
.feuille { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 24px 0 56px; }
.feuille::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 28px;
  border-left: 2px solid var(--marge); box-shadow: 5px 0 0 -1px rgba(217, 58, 99, .35);
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .feuille { padding: 0 16px 0 36px; }
  .feuille::before { left: 16px; }
}

/* En-tête */
.entete { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 24px; min-height: 96px; padding-top: 16px; }
.entete .logo { display: block; width: 168px; }
.entete .logo img { width: 100%; }
.entete nav ul { display: flex; flex-wrap: wrap; gap: 0 28px; list-style: none; margin: 0; padding: 0; }
.entete nav a { display: inline-block; min-height: 48px; line-height: 48px; font-weight: 700; color: var(--encre); text-decoration: none; border-bottom: 3px solid transparent; }
.entete nav a:hover { border-bottom-color: var(--marge); }
.entete { flex-wrap: nowrap; }
.entete nav ul { align-items: center; }
.entete nav a.nav-bouton { min-height: 48px; line-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--violet); color: #fff; }
.entete nav a.nav-bouton:hover { background: var(--violet-fonce); }

/* Titres : l'écriture d'école (cursive), sur les lignes du cahier. */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--encre); margin: 0; }
/* Écrit sur deux interlignes, comme dans un cahier : 64 px de ligne en ligne. */
h1 { font-size: clamp(2.1rem, 8vw, 3.7rem); line-height: 64px; margin-bottom: var(--u); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 64px; margin-bottom: var(--u); }
h3 { font-size: 1.3rem; line-height: var(--u); margin-bottom: 0; }
@media (min-width: 900px) { h1 { font-size: clamp(2.2rem, 4.2vw, 2.9rem); } }

/* Le titre de l'accueil s'écrit : la seule animation du site. Sans animation, il est simplement là. */
.ligne { display: block; }
@keyframes ecrit {
  from { clip-path: inset(-.4em 100% -.4em -.1em); }
  to   { clip-path: inset(-.4em -.1em -.4em -.1em); }
}
@media (prefers-reduced-motion: no-preference) {
  .ligne { animation: ecrit 1.5s cubic-bezier(.4, .1, .5, 1) .35s both; }
  .ligne + .ligne { animation-duration: 1.9s; animation-delay: 1.8s; }
}

/* Blocs */
.bloc { padding: 64px 0; }
.bloc + .bloc { border-top: 2px dashed rgba(var(--trait), .45); }
.deux { display: grid; gap: 48px; align-items: start; }
@media (min-width: 900px) {
  .deux { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; }
  .deux.gauche-large { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; }
  .deux.inverse { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .deux.inverse > :first-child { order: 2; }
}

/* Accueil */
.accueil { padding: 32px 0 96px; }
.accueil .chapo { font-size: 1.15rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 0 0 var(--u); }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 64px; padding: 0 32px; border-radius: 999px; border: 0;
  background: var(--violet); color: #fff; font: 700 1.25rem/1 var(--sans); text-decoration: none; cursor: pointer;
  box-shadow: 0 5px 0 var(--violet-fonce);
  transition: transform .12s ease, box-shadow .12s ease;
}
.bouton:hover { color: #fff; background: var(--violet-fonce); }
.bouton:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--violet-fonce); }
.bouton svg { width: 28px; height: 28px; flex: none; }
/* Bouton second (Obtainium) : cerné, pour laisser « Télécharger » en premier. */
.bouton.secondaire { background: #fff; color: var(--violet); border: 3px solid var(--violet); box-shadow: none; }
.bouton.secondaire:hover { background: var(--violet); color: #fff; }
.lien-simple { font-weight: 700; display: inline-block; min-height: 48px; line-height: 48px; }
.sous-bouton { margin: 0; color: #4a4560; font-size: .95rem; line-height: 32px; }

/* La tablette : une vraie capture de l'app, dans un cadre sobre. */
.tablette { position: relative; margin: 0; }
.tablette .cadre {
  border: clamp(8px, 1.4vw, 14px) solid #1c1830; border-radius: clamp(18px, 3vw, 32px); overflow: hidden; background: #1c1830;
  box-shadow: 0 34px 60px -28px rgba(43, 20, 88, .55);
}
.tablette img { width: 100%; aspect-ratio: 3200 / 1968; object-fit: cover; }
.tablette figcaption { margin-top: 16px; font-size: .95rem; color: #4a4560; max-width: 56ch; }

/* L'autocollant : rond, bordé de blanc, légèrement penché, comme ceux de l'album de l'app. */
.autocollant {
  position: absolute; z-index: 2; right: -10px; top: -34px; width: 132px; height: 132px; border-radius: 50%;
  display: grid; place-items: center; text-align: center; padding: 12px;
  background: var(--soleil); color: var(--encre); border: 5px solid #fff;
  font: 700 1.02rem/1.2 var(--sans); transform: rotate(8deg);
  box-shadow: 0 8px 18px -6px rgba(43, 20, 88, .45);
}
@media (max-width: 640px) { .autocollant { width: 108px; height: 108px; font-size: .88rem; right: -4px; top: -40px; } }

/* Sommaire : les domaines, comme la table des matières d'un cahier. */
.sommaire { list-style: none; margin: 0; padding: 0; }
.sommaire li { display: grid; grid-template-columns: 40px 1fr auto; column-gap: 16px; align-items: baseline; padding: 0; }
.sommaire img { width: 32px; height: 32px; align-self: center; }
.sommaire .nom { font-weight: 700; color: var(--encre); }
.sommaire .detail { grid-column: 2 / 4; margin: 0 0 var(--u); color: #3d3853; max-width: 52ch; }
.sommaire .nb { white-space: nowrap; color: #4a4560; font-size: .95rem; }
.sommaire .ligne-pointillee { display: flex; align-items: baseline; gap: 10px; }
.sommaire .ligne-pointillee::after { content: ""; flex: 1; border-bottom: 3px dotted rgba(var(--trait), .7); transform: translateY(-5px); order: 1; }
.sommaire .ligne-pointillee .nom { order: 0; }

/* Les trois essais : une vraie suite, donc numérotée. */
.essais { list-style: none; margin: 0 0 0; padding: 0; display: grid; gap: 0 32px; counter-reset: essai; }
@media (min-width: 760px) { .essais { grid-template-columns: repeat(3, 1fr); } }
.essais li { counter-increment: essai; position: relative; padding-left: 64px; margin-bottom: var(--u); }
.essais li::before {
  content: counter(essai); position: absolute; left: 0; top: -6px; width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--marge); color: var(--marge); display: grid; place-items: center;
  font: 400 1.6rem/1 var(--serif);
}
.essais strong { display: block; color: var(--encre); font-size: 1.1rem; }

/* Parents : trois colonnes de listes courtes */
.promesses { display: grid; gap: 40px 48px; margin: 0 0 var(--u); }
@media (min-width: 820px) { .promesses { grid-template-columns: repeat(3, 1fr); } }
.promesses h3 { margin-bottom: 0; }
.promesses ul { list-style: none; margin: 0; padding: 0; }
.promesses li { position: relative; padding-left: 30px; }
.promesses li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: var(--soleil); border: 2px solid var(--encre); }
.promesses .non li::before { background: #fff; border-radius: 3px; transform: rotate(45deg); width: 11px; height: 11px; border-color: var(--marge); }
.a-savoir { margin-top: 0; padding: 16px 24px 0; border-left: 6px solid var(--soleil); background: rgba(255, 255, 255, .88); max-width: 70ch; }
.a-savoir h3 { margin-bottom: 0; }

/* Téléchargement */
.fiche { margin: 0 0 var(--u); display: grid; grid-template-columns: max-content 1fr; gap: 0 24px; background: rgba(255, 255, 255, .9); padding: 16px 24px; border: 2px solid var(--encre); border-radius: 20px; }
.fiche dt { font-weight: 700; color: var(--encre); }
.fiche dd { margin: 0; overflow-wrap: anywhere; }
.empreinte { font: 400 .8rem/1.4 ui-monospace, Consolas, monospace; display: inline-block; vertical-align: middle; }
.copier { margin-left: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--encre); background: #fff; color: var(--encre); font: 700 .95rem/1 var(--sans); cursor: pointer; }
.copier:hover { background: var(--soleil); }
.etapes { margin: 0 0 var(--u); padding: 0; list-style: none; counter-reset: etape; }
.etapes li { counter-increment: etape; position: relative; padding-left: 64px; margin-bottom: var(--u); max-width: 56ch; }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: -6px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--encre); color: #fff; display: grid; place-items: center; font: 400 1.5rem/1 var(--serif);
}
.etapes strong { color: var(--encre); }

/* Nouvelles */
.colonnes { display: grid; gap: 48px; }
@media (min-width: 900px) { .colonnes { grid-template-columns: 1fr 1fr; gap: 64px; } }
.nouvelle { margin: 0 0 var(--u); padding: 0 0 0 0; max-width: 60ch; }
.nouvelle h3 { margin-bottom: 0; }
.nouvelle time { display: block; color: #4a4560; font-size: .95rem; line-height: 32px; }
.nouvelle p { margin: 0 0 var(--u); }
.nouvelle details { margin: 0 0 var(--u); }
.nouvelle summary { cursor: pointer; font-weight: 700; color: var(--violet-fonce); min-height: 48px; display: flex; align-items: center; }
.nouvelle summary::marker { color: var(--marge); }
.nouvelle .sources { font-size: .92rem; color: #4a4560; }
.nouvelle .sources a { overflow-wrap: anywhere; }
.suivre { font-weight: 700; }

/* Pied de page */
.pied { padding: 32px 0 64px; border-top: 2px dashed rgba(var(--trait), .45); font-size: .95rem; line-height: 32px; color: #3d3853; }
.pied p { max-width: 80ch; margin-bottom: 0; }
.pied ul { list-style: none; margin: 0 0 var(--u); padding: 0; display: flex; flex-wrap: wrap; gap: 0 28px; }
.pied li a { display: inline-block; min-height: 48px; line-height: 48px; }

.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Le guide vidéo, en tête de page à la place d'une capture : il démarre sans le son, le parent l'active s'il veut. */
.accueil.deux.gauche-large { align-items: center; }
@media (min-width: 900px) { .accueil.deux.gauche-large { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 40px; } }
.video-accueil .autocollant { display: none; } /* le texte le dit déjà ; sur la vidéo il cachait les chapitres */
.video-accueil .tablette video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--papier); }
/* La vidéo de l'évolution est verticale (téléphone) : un cadre de téléphone, centré, pas plus large qu'un vrai. */
.video-accueil .telephone { max-width: 380px; margin-inline: auto; }
.video-accueil .telephone .cadre { border-radius: clamp(26px, 5vw, 40px); }
.video-accueil .telephone video { aspect-ratio: 9 / 16; }
.video-accueil .telephone figcaption, .video-accueil .chapitres { max-width: 380px; margin-inline: auto; }
.video-accueil .cadre { position: relative; }
.son {
  position: absolute; left: 14px; top: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 20px 0 14px; border-radius: 999px; border: 3px solid #fff; cursor: pointer;
  background: var(--violet); color: #fff; font: 700 1.05rem/1 var(--sans); box-shadow: 0 6px 16px -4px rgba(43, 20, 88, .6);
}
.son:hover { background: var(--violet-fonce); }
.son svg { width: 26px; height: 26px; }
.son .onde { display: none; }
.son[aria-pressed="true"] .onde { display: inline; }
.son[aria-pressed="true"] .barre { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .son[aria-pressed="false"] { animation: appel 2.4s ease-in-out 1.5s 3; }
}
@keyframes appel { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.chapitres { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; counter-reset: chap; }
.chapitres li { counter-increment: chap; }
.chapitres button {
  min-height: 48px; padding: 0 16px 0 7px; border-radius: 999px; border: 2px solid var(--encre); background: #fff; color: var(--encre);
  font: 700 .98rem/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
}
.chapitres button::before { content: counter(chap); width: 32px; height: 32px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font: 400 1.1rem/1 var(--serif); }
.chapitres button:hover { background: var(--soleil); }

/* Petits écrans : les règles qui doivent l'emporter sur celles de base, donc placées en dernier. */
@media (max-width: 640px) {
  .bloc { padding: 32px 0 64px; }
  .entete { min-height: 0; padding-bottom: 8px; }
  .entete .logo { width: 128px; }
  .entete nav ul { gap: 0 16px; }
  .nav-secondaire { display: none; } /* sur téléphone, un seul bouton : Télécharger */
  .bouton { width: 100%; font-size: 1.1rem; padding: 0 20px; }
  .fiche { grid-template-columns: 1fr; padding: 16px; }
  .fiche dd { margin-bottom: 8px; }
  /* Sur téléphone, la vidéo passe en tête, avant le texte ; son bouton se fait plus petit pour ne pas la cacher. */
  .accueil .video-accueil { order: -1; }
  .son { min-height: 44px; padding: 0 14px 0 10px; font-size: .9rem; left: 8px; top: 8px; border-width: 2px; }
  .son svg { width: 22px; height: 22px; }
}

/* Votre avis (ADR 0074) : le nombre d'étoiles du dépôt, et les deux façons de donner son avis. */
.avis { max-width: 46rem; }
.avis-compte { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; }
.avis-compte svg { width: 44px; height: 44px; fill: #f7b42c; stroke: #8a5a00; stroke-width: 1; flex: none; }
.avis-boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.avis-boutons a:not(.bouton) { min-height: 48px; display: inline-flex; align-items: center; }
.avis .petit { font-size: .95rem; opacity: .85; }

/* Adresse GitHub (section Obtainium) : elle passe à la ligne sur téléphone au lieu de dépasser. */
#telecharger code { overflow-wrap: anywhere; }
