/* « Le livret de mon enfant, expliqué simplement » — aplats, sans liseré ; seuls les boutons gardent leur relief. */

.livret-langues {
  margin-top: 1.5rem;
}

.livret-langues-titre {
  margin: 0 0 0.6rem;
  font-weight: 900;
}

.livret-langues-liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.livret-langues-liste button {
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--bleu-pale);
  color: var(--bleu);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.livret-langues-liste button[aria-pressed="true"] {
  background: var(--bleu);
  color: #fff;
}

.livret-langues-liste button:active {
  transform: scale(0.97);
}

.livret-langues-note {
  margin: 0.6rem 0 0;
  color: var(--encre-douce);
  font-size: 0.95rem;
}

.livret-etape-haut {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.livret-etape-haut h2 {
  flex: 1 1 18rem;
  max-width: none;
  margin: 0;
}

.livret-ecouter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.4rem 1rem 0.4rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: var(--bleu-pale);
  color: var(--bleu);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.livret-ecouter::before {
  content: "";
  width: 1.2rem;
  height: 1.2rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9H4zm12.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9H4zm12.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.livret-ecouter[aria-pressed="true"] {
  background: var(--bleu);
  color: #fff;
}

.livret-ecouter--clair {
  background: #fff;
}

.livret-etape > p {
  margin-top: 0.9rem;
}

.livret-petit {
  color: var(--encre-douce);
  font-size: 0.95rem;
}

/* Le modèle de ligne du livret */
.livret-modele {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--bleu-pale);
}

.livret-modele-titre {
  margin: 0 0 0.6rem;
  color: var(--encre-douce);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: end;
}

.livret-modele-ligne {
  display: grid;
  grid-template-columns: minmax(7rem, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.livret-modele-matiere,
.livret-modele-case {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.4rem;
  border-radius: 0.6rem;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.livret-modele-matiere {
  justify-content: flex-start;
  text-align: start;
  font-weight: 900;
}

.livret-modele-case--cochee {
  background: var(--bleu);
  color: #fff;
}

.livret-modele-case--cochee::before {
  content: "✓";
  margin-inline-end: 0.3rem;
  font-size: 1.1rem;
}

@media (max-width: 40rem) {
  .livret-modele-ligne {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .livret-modele-matiere {
    grid-column: 1 / -1;
  }
}

/* Les quatre cases */
.livret-cases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

@media (max-width: 48rem) {
  .livret-cases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.livret-choix {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-height: 7.5rem;
  padding: 1rem 0.75rem;
  border: 0;
  border-radius: 1.2rem;
  background: var(--bleu-pale);
  box-shadow: 0 0.3rem 0 var(--bleu-doux);
  color: var(--bleu);
  font: inherit;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.livret-choix:active {
  transform: translateY(0.2rem);
  box-shadow: 0 0.1rem 0 var(--bleu-doux);
}

.livret-choix[aria-pressed="true"] {
  background: var(--bleu);
  box-shadow: 0 0.3rem 0 var(--bleu-ombre);
  color: #fff;
}

.livret-pastille {
  display: flex;
  gap: 0.25rem;
}

.livret-pastille i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--bleu-doux);
}

.livret-pastille i.plein {
  background: var(--soleil);
}

.livret-choix[aria-pressed="true"] .livret-pastille i:not(.plein) {
  background: rgb(255 255 255 / 0.35);
}

.livret-glose {
  display: none;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.85;
}

.livret--traduit .livret-glose {
  display: block;
}

/* La réponse */
.livret-reponse {
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  border-radius: 1.2rem;
  background: var(--bleu-pale);
}

.livret-reponse h3 {
  margin: 0 0 1rem;
  color: var(--bleu);
  font-size: 1.15rem;
}

.livret-reponse dl {
  display: grid;
  gap: 0.35rem 0;
  margin: 0;
}

.livret-reponse dt {
  margin-top: 0.75rem;
  color: var(--bleu);
  font-weight: 900;
}

.livret-reponse dt:first-child {
  margin-top: 0;
}

.livret-reponse dd {
  margin: 0;
}

/* Les phrases de l'enseignant */
.livret-phrases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.9rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.livret-phrases li {
  padding: 1.1rem 1.2rem;
  border-radius: 1.2rem;
  background: var(--bleu-pale);
}

.livret-phrases p {
  margin: 0;
}

.livret-citation {
  margin-bottom: 0.5rem !important;
  color: var(--bleu);
  font-weight: 900;
}

.livret-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.livret-classes .bouton {
  min-width: 5rem;
}

/* L'arabe se lit de droite à gauche ; les mots de l'école restent en français, de gauche à droite. */
.livret[dir="rtl"] [lang="fr"] {
  direction: ltr;
  unicode-bidi: isolate;
}

@media (prefers-reduced-motion: reduce) {
  .livret-choix:active,
  .livret-langues-liste button:active {
    transform: none;
  }
}

/* ===== Le parcours en écrans (deuxième version) ===== */
.livret-ecran {
  padding-block: 1rem;
}

.livret--parcours .livret-ecran {
  min-height: 60svh;
}

.livret--parcours:not(.livret--fin) .livret-fin-page {
  display: none;
}

.livret-accueil {
  padding-block: clamp(1.5rem, 1rem + 3vw, 3.5rem) 0.5rem;
}

.livret-question {
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem);
}

.livret-question:focus {
  outline: none;
}

.livret-multi {
  display: block;
  margin-top: 0.4rem;
  color: var(--encre-douce);
  font-size: 0.95rem;
  font-weight: 700;
}

/* Les gros boutons : langue et classe */
.livret-grands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.livret-grands button {
  min-height: 3.6rem;
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 1.2rem;
  background: var(--bleu-pale);
  box-shadow: 0 0.3rem 0 var(--bleu-doux);
  color: var(--bleu);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
}

.livret-grands button:active {
  transform: translateY(0.2rem);
  box-shadow: 0 0.1rem 0 var(--bleu-doux);
}

.livret-grands button[aria-pressed="true"] {
  background: var(--bleu);
  box-shadow: 0 0.3rem 0 var(--bleu-ombre);
  color: #fff;
}

.livret-classes.livret-grands {
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
}

.livret-rassure {
  margin-top: 0.9rem;
  padding: 0.9rem 1.1rem;
  border-radius: 1rem;
  background: var(--soleil-doux);
  font-weight: 800;
}

@media (max-width: 48rem) {
  .livret--parcours .livret-photo {
    display: none;
  }
}

/* La barre : retour et étapes */
.livret-barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem 0;
}

.livret-barre[hidden] {
  display: none;
}

.livret-retour {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--bleu-pale);
  color: var(--bleu);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.livret-retour::before {
  content: "←";
  font-weight: 900;
}

.livret[dir="rtl"] .livret-retour::before {
  content: "→";
}

.livret-points {
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.livret-points li {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--bleu-doux);
}

.livret-points li.fait {
  background: var(--bleu);
}

.livret-points li.actuel {
  width: 1.8rem;
  border-radius: 999px;
  background: var(--soleil);
}

/* La suite : une seule action principale, toujours le même bouton bleu pleine largeur ;
   l'autre choix est un simple lien en dessous. */
.livret-suite {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.livret-suite .bouton {
  width: 100%;
  justify-content: center;
}

.livret-lien {
  align-self: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  border: 0;
  background: none;
  color: var(--bleu);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.livret-lien:hover {
  text-decoration-thickness: 3px;
}

/* Écran 5 : les phrases, à toucher */
.livret-phrases details {
  border-radius: 1.2rem;
  background: var(--bleu-pale);
}

.livret-phrases summary {
  padding: 1rem 1.2rem;
  color: var(--bleu);
  font-weight: 900;
  cursor: pointer;
}

.livret-phrases details p {
  margin: 0;
  padding: 0 1.2rem 1.1rem;
}

.livret-phrases {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.livret-sous-titre {
  margin: 2rem 0 0;
  color: var(--bleu);
  font-size: 1.3rem;
}

.livret-accueil .livret-question {
  margin-top: 1.5rem;
}

/* ===== Chaque écran tient dans la fenêtre, sur téléphone comme sur ordinateur ===== */
.livret--parcours .livret-ecran {
  min-height: 0;
  padding-block: 0.5rem 1rem;
}

.livret--parcours .livret-barre {
  padding-block: 0.6rem 0;
}

.livret--parcours .livret-etape {
  padding: clamp(1rem, 0.6rem + 1.5vw, 1.5rem);
}

.livret--parcours .livret-question {
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
}

.livret--parcours .livret-etape > p,
.livret--parcours .livret-rassure {
  margin-top: 0.7rem;
}

.livret--parcours .livret-modele,
.livret--parcours .livret-cases,
.livret--parcours .livret-grands,
.livret--parcours .livret-reponse,
.livret--parcours .livret-phrases {
  margin-top: 0.9rem;
}

.livret--parcours .livret-suite {
  margin-top: 1rem;
}

/* Écran 1 : la photo s'adapte à la hauteur qui reste */
.livret--parcours .livret-accueil {
  padding-block: clamp(0.75rem, 0.4rem + 1.5vw, 1.75rem) 0.5rem;
}

.livret--parcours .livret-accueil h1 {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.8rem);
}

.livret--parcours .livret-accueil .galet-horizontal {
  max-height: 24svh;
  margin-top: 0.9rem;
}

.livret--parcours .livret-accueil .livret-question {
  margin-top: 1rem;
}

.livret--parcours .livret-langues-liste {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.livret--parcours .livret-langues-liste button {
  min-height: 3rem;
  padding: 0.4rem 0.5rem;
  font-size: 1.05rem;
}

.livret--parcours .livret-langues-note {
  font-size: 0.9rem;
}

@media (max-width: 40rem) {
  .livret--parcours .livret-multi {
    display: none;
  }
}

@media (min-width: 56rem) {
  .livret--parcours .livret-accueil > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: clamp(1.5rem, 3vw, 3rem);
    align-items: start;
  }

  .livret--parcours .livret-accueil > div > * {
    grid-column: 1;
  }

  .livret--parcours .livret-accueil .galet-horizontal {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    max-height: calc(100svh - 8rem);
    margin-top: 0;
  }
}

/* Les consignes : ce que le parent fait maintenant */
.livret-consigne {
  margin: 0 0 0.4rem;
  color: var(--bleu);
  font-weight: 900;
}

.livret--parcours .livret-etape > .livret-consigne:not(:first-child) {
  margin-top: 1rem;
}

/* Écran 2 : où trouver le livret, replié */
.livret-ou {
  margin-top: 0.9rem;
  border-radius: 1rem;
  background: var(--bleu-pale);
}

.livret-ou summary {
  padding: 0.75rem 1rem;
  color: var(--bleu);
  font-weight: 900;
  cursor: pointer;
}

.livret-ou ul {
  margin: 0;
  padding: 0 1rem 1rem;
}

/* Écran 3 : une ligne du livret, comme sur le papier ; on touche la case cochée */
.livret-ligne {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border-radius: 1.2rem;
  background: var(--bleu-pale);
}

/* La ligne garde le sens du livret papier, même en arabe ; seule l'explication se lit de droite à gauche. */
.livret-ligne {
  direction: ltr;
}

.livret[dir="rtl"] .livret-ligne .livret-glose {
  direction: rtl;
}

.livret-ligne-titre {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--encre-douce);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
}

.livret-ligne .livret-choix {
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 0;
  padding: 0.7rem 0.4rem 0.8rem;
  background: #fff;
  box-shadow: 0 0.25rem 0 var(--bleu-doux);
  color: var(--encre);
  font-size: 0.95rem;
  font-weight: 800;
  hyphens: manual;
  overflow-wrap: normal;
}

.livret-choix-mot {
  display: flex;
  align-items: center;
  min-height: 2.4em;
}

.livret-choix-case {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.6rem;
  background: var(--bleu-pale);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
}

.livret-ligne .livret-choix:hover .livret-choix-case {
  background: var(--bleu-doux);
}

.livret-ligne .livret-choix[aria-pressed="true"] {
  background: var(--bleu);
  color: #fff;
}

.livret-ligne .livret-choix[aria-pressed="true"] .livret-choix-case,
.livret-ligne .livret-choix:active .livret-choix-case {
  background: var(--soleil);
  color: var(--bleu);
}

.livret-ligne .livret-choix[aria-pressed="true"] .livret-choix-case::before,
.livret-ligne .livret-choix:active .livret-choix-case::before {
  content: "\2713";
}

.livret-ligne .livret-glose {
  font-size: 0.8rem;
}

/* Écran 4 : les quatre rubriques de la case (dont « À la maison ») tiennent dans la fenêtre avec le bouton. */
.livret--parcours .livret-reponse h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.livret--parcours .livret-reponse dl {
  gap: 0.1rem 0;
}

.livret--parcours .livret-reponse dt {
  margin-top: 0.5rem;
}

.livret--parcours .livret-reponse dd {
  line-height: 1.35;
}

@media (max-width: 40rem) {
  .livret--parcours .livret-reponse {
    font-size: 0.95rem;
  }
}

/* Écran 6 : ce que Leie fait chaque semaine, en aplat bleu, puis l'essai */
.livret-suite-texte {
  padding: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  border-radius: 1.2rem;
  background: var(--bleu);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.45;
}

/* « Envoyer cette page à un parent » : un lien qui déplie les boutons de partage */
.livret-envoyer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.livret-envoyer summary {
  display: flex;
  align-items: center;
  list-style: none;
}

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

.livret-envoyer[open] {
  align-items: stretch;
}

.livret-envoyer[open] summary {
  align-self: center;
}

[data-partage-livret] {
  margin-top: 0.4rem;
}

[data-partage-livret] .partage-reseaux {
  column-gap: 0.4rem;
}

/* Sur ordinateur : les quatre rubriques en deux colonnes (le sens, puis l'enseignant et la maison). */
@media (min-width: 56rem) {
  .livret--parcours .livret-reponse dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }

  .livret--parcours .livret-reponse dt:nth-of-type(odd) { grid-column: 1; }
  .livret--parcours .livret-reponse dd:nth-of-type(odd) { grid-column: 1; }
  .livret--parcours .livret-reponse dt:nth-of-type(even) { grid-column: 2; }
  .livret--parcours .livret-reponse dd:nth-of-type(even) { grid-column: 2; }
  .livret--parcours .livret-reponse dt:nth-of-type(-n + 2) { grid-row: 1; margin-top: 0; }
  .livret--parcours .livret-reponse dd:nth-of-type(-n + 2) { grid-row: 2; }
  .livret--parcours .livret-reponse dt:nth-of-type(n + 3) { grid-row: 3; }
  .livret--parcours .livret-reponse dd:nth-of-type(n + 3) { grid-row: 4; }

  .livret--parcours .livret-suite {
    align-items: center;
  }

  .livret--parcours .livret-suite .bouton {
    width: auto;
    min-width: 24rem;
  }
}

/* Téléphone peu haut (environ 700 px de fenêtre) : on resserre encore pour garder le bouton visible. */
@media (max-width: 40rem) and (max-height: 48rem) {
  .livret--parcours .livret-reponse {
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
  }

  .livret--parcours .livret-reponse h3 {
    font-size: 1rem;
  }

  .livret--parcours .livret-reponse dt {
    margin-top: 0.35rem;
  }

  .livret--parcours .livret-suite {
    margin-top: 0.6rem;
    gap: 0.1rem;
  }

  .livret--parcours .livret-suite .bouton {
    padding-block: 0.65rem;
  }

  .livret--parcours .livret-lien {
    min-height: 2.5rem;
    padding-block: 0.3rem;
  }

  .livret-ligne .livret-choix {
    gap: 0.25rem;
    padding-block: 0.45rem 0.55rem;
  }

  .livret-ligne .livret-choix-case {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 1.2rem;
  }

  /* Écran 3 : la ligne dessinée montre déjà « une matière, une case sur quatre » ; la phrase qui le dit cède la place. */
  .livret--parcours [data-ecran="3"] [data-t="t1-texte"] {
    display: none;
  }

  .livret--parcours [data-ecran="3"] .livret-consigne {
    margin-top: 0.7rem;
  }
}

/* Sur un petit téléphone, quatre colonnes coupent « partiellement » : deux cases par rangée, mots entiers. */
@media (max-width: 30rem) {
  .livret-ligne {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .livret-ligne .livret-choix {
    gap: 0.35rem;
    padding: 0.55rem 0.5rem 0.65rem;
  }

  .livret-ligne .livret-choix-mot {
    min-height: 0;
  }

  .livret-ligne .livret-choix-case {
    width: 2.2rem;
    height: 2.2rem;
  }
}
.livret--parcours .livret-phrases summary {
  padding: 0.75rem 1.1rem;
}

@media (min-width: 56rem) {
  .livret--parcours .livret-phrases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/* Sur téléphone : « Écouter » devient une icône, les quatre cases se resserrent */
@media (max-width: 40rem) {
  .livret--parcours .livret-etape-haut {
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .livret--parcours .livret-etape-haut h2 {
    flex: 1 1 auto;
  }

  .livret--parcours .livret-ecouter {
    flex: none;
    padding: 0.4rem 0.75rem;
  }

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

  .livret--parcours .livret-phrases {
    gap: 0.4rem;
  }

  .livret--parcours .livret-phrases summary {
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
  }

  .livret--parcours .livret-petit {
    font-size: 0.88rem;
  }

  .livret--parcours .livret-reponse {
    padding: 0.9rem 1rem;
  }

  .livret--parcours .livret-phrases summary {
    padding-block: 0.55rem;
  }

  .livret--parcours .livret-suite {
    margin-top: 0.75rem;
  }

  .livret--parcours .livret-barre {
    padding-block: 0.4rem 0;
  }

  .livret--parcours .livret-ecran {
    padding-block: 0.4rem 0.75rem;
  }

  .livret-ligne {
    gap: 0.35rem;
    padding: 0.5rem;
  }

  .livret-ligne .livret-choix {
    font-size: 0.85rem;
  }
}

/* ===== Revue apple-design ===== */

/* Le passage d'un écran à l'autre : on avance vers la droite, on revient par la gauche */
@keyframes livret-avance {
  from { opacity: 0; transform: translateX(1.5rem); }
}

@keyframes livret-recule {
  from { opacity: 0; transform: translateX(-1.5rem); }
}

@keyframes livret-apparait {
  from { opacity: 0; }
}

.livret--parcours[data-sens="avant"] .livret-ecran:not([hidden]) {
  animation: livret-avance 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.livret--parcours[data-sens="arriere"] .livret-ecran:not([hidden]) {
  animation: livret-recule 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.livret--parcours[dir="rtl"][data-sens="avant"] .livret-ecran:not([hidden]) {
  animation-name: livret-recule;
}

.livret--parcours[dir="rtl"][data-sens="arriere"] .livret-ecran:not([hidden]) {
  animation-name: livret-avance;
}

/* L'appui se voit tout de suite */
.livret-grands button,
.livret-choix,
.livret-retour,
.livret-ecouter {
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, background-color 0.1s ease-out;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.livret-retour:active,
.livret-ecouter:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .livret--parcours[data-sens] .livret-ecran:not([hidden]) {
    animation-name: livret-apparait;
    animation-duration: 0.15s;
  }

  .livret-retour:active,
  .livret-ecouter:active {
    transform: none;
  }
}