/* Page d'accueil — même univers que le jeu (Outfit, indigo, cases arrondies), fond de tuiles de lettres. */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: #f8ece5; /* 17/11 : fond « Pêche » (labo/accueil-doux.html, S5), au lieu du gris-bleu #e6e9f3 */
  font-family: "Outfit", system-ui, sans-serif;
  color: #1b1d36;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px 8px;
  flex: 1;
}

/* ---------- Fond : tuiles de lettres ---------- */
.tuiles-fond {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  /* grille très légère en fond, comme une grille de mots fléchés */
  background-image:
    linear-gradient(rgba(200, 100, 60, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 100, 60, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center center;
}
/* grand écran (17/11) : les tuiles font partie de la page (elles défilent avec elle et contournent les blocs) ;
   hauteur donnée par le script (jusqu'au pied de page) ; arrivée plus douce */
.tuiles-fond.page {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  z-index: 0;
}
.tuiles-fond.page .tf-arr {
  animation-duration: 2.4s;
}
/* position : pilotée par le script (transform seulement, au sous-pixel près) */
.tf-pos {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
/* arrivée à l'ouverture, centrée sur la position */
.tf-arr {
  position: absolute;
  transform: translate(-50%, -50%);
  animation: arrivee 1.4s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes arrivee {
  from {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(-25deg) scale(0.7);
  }
}
.tf {
  position: relative;
  width: var(--t);
  height: var(--t);
  border-radius: 11px;
  font-family: "Fredoka", "Outfit", sans-serif;
  background: #fff;
  color: #c5c9e0;
  font-weight: 600;
  font-size: calc(var(--t) * 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 63, 115, 0.08);
  transform: rotate(var(--r));
  will-change: transform;
  /* rotation lente et continue : un tour en 20 à 45 s selon la tuile (--d), sens alterné */
  animation: tourne var(--d, 60s) linear infinite;
}
.tf.inverse {
  animation-direction: reverse;
}
.tf.def {
  background: #fff3cf;
  color: #e3b54a;
  font-size: calc(var(--t) * 0.4);
}
@keyframes tourne {
  from {
    transform: rotate(var(--r));
  }
  to {
    transform: rotate(calc(var(--r) + 360deg));
  }
}
@media (prefers-reduced-motion: reduce) {
  .tf,
  .tf-arr,
  .logo .lt {
    animation: none !important;
    transform: rotate(var(--r, 0deg));
  }
  .m2::before {
    animation: none;
  }
}

/* ---------- Logo : monogramme IF + nom ----------
   Couleurs « du jeu » (version A, validée) : la tuile I prend le jaune de la case active,
   la tuile F le crème du mot en cours ; le nom et les lettres sont en encre. */
.hero {
  text-align: center;
  margin-bottom: 36px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
}
.paire {
  display: flex;
  gap: 5px;
  padding: 6px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(59, 63, 115, 0.12);
}
.t {
  position: relative;
  width: clamp(54px, 8vw, 76px);
  aspect-ratio: 1;
  border-radius: 18px;
  font-family: "Fredoka", "Outfit", sans-serif;
  background: #fff3cf; /* crème du mot en cours */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 700;
  color: #1b1d36;
}
.t.prim {
  background: #ffcb45; /* jaune de la case active */
}
.coin {
  position: absolute;
  top: 9px;
  left: 10px;
  border-top: 9px solid #1b1d36;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}
.mots {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.mots {
  font-family: "Fredoka", "Outfit", sans-serif;
}
.m1 {
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 500;
  color: #1b1d36;
}
/* « Fléché » : moins gras, avec un trait de surligneur jaune derrière (proposition 5, labo/fleche.html) */
.m2 {
  position: relative;
  font-size: clamp(33px, 5.3vw, 52px);
  font-weight: 500;
  color: #1b1d36;
  padding: 0 0.12em;
  margin-left: -0.06em;
}
.m2::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 44%;
  background: #ffcb45;
  border-radius: 0.16em;
  transform: rotate(-1.5deg);
  transform-origin: left center;
  animation: surligne 0.55s 1.25s cubic-bezier(0.3, 1.2, 0.5, 1) both; /* le trait se dessine après le rebond des lettres */
}
.m2 .lt {
  position: relative;
  z-index: 1;
}
@keyframes surligne {
  from {
    transform: rotate(-1.5deg) scaleX(0);
  }
  to {
    transform: rotate(-1.5deg) scaleX(1);
  }
}
.logo .lt {
  display: inline-block;
  animation: pop 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
/* rebond à l'arrivée ; chaque lettre finit légèrement de travers (--r) */
@keyframes pop {
  0% {
    transform: scale(0.3) rotate(0deg);
    opacity: 0;
  }
  45% {
    transform: translateY(-8px) scale(1.25) rotate(var(--r, 0deg));
    opacity: 1;
  }
  75% {
    transform: translateY(1px) scale(0.96) rotate(var(--r, 0deg));
  }
  100% {
    transform: rotate(var(--r, 0deg));
  }
}
.accroche {
  margin: 18px 0 0;
  font-size: clamp(16px, 2.2vw, 20px);
  color: #6b7096;
}
/* « mots fléchés » mis en avant (17/11) : plus gros, à l'encre, avec le trait de surligneur jaune du logo */
.mf {
  font-family: "Fredoka", "Outfit", sans-serif;
  font-weight: 600;
  color: #1b1d36;
  white-space: nowrap;
  padding: 0 0.12em;
  background: linear-gradient(transparent 56%, #ffcb45 56%, #ffcb45 92%, transparent 92%);
  border-radius: 0.12em;
}
.accroche .mf {
  font-size: 1.22em;
}

/* ---------- Reprendre ---------- */
.reprendre {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto 32px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e3e6f2;
  border-left: 4px solid #ffcb45;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.reprendre[hidden] {
  display: none;
}
.reprendre:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(59, 63, 115, 0.12);
}
.reprendre > .ti:first-child {
  font-size: 22px;
  color: #e0a800;
}
.reprendre strong {
  display: block;
  font-weight: 500;
}
.reprendre span span {
  font-size: 14px;
  color: #6b7096;
}
.reprendre .fleche {
  margin-left: auto;
  color: #6b7096;
}

/* ---------- Choix de la Force ---------- */
h2 {
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  margin: 0 0 18px;
}
.forces {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 16px;
}
.carte {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: #fffaf7;
  border-radius: 18px;
  border: 2px solid transparent;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1),
    box-shadow 0.25s,
    border-color 0.25s;
}
a.carte:hover,
a.carte:focus-visible {
  transform: translateY(-5px);
  border-color: var(--coul);
  box-shadow: 0 14px 30px rgba(59, 63, 115, 0.14);
  outline: none;
}
.carte .haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.carte .num {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--fond);
  color: var(--coul);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
}
.points {
  display: flex;
  gap: 5px;
}
.pt {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dce0ee;
}
.pt.on {
  background: var(--coul);
}
.nom {
  font-size: 18px;
  font-weight: 500;
}
.desc {
  margin: 0;
  color: #6b7096;
  font-size: 15px;
  line-height: 1.45;
  flex: 1;
}
.bas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e3e6f2;
  font-size: 14px;
}
.statut {
  color: #8a8fb3;
}
.jouer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: var(--coul);
}
.carte.bientot {
  opacity: 0.55;
  cursor: default;
}

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: #8a8fb3;
}

/* ---------- Grilles du jour : titre, date, série ---------- */
.titre-jour {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px 14px;
  margin-bottom: 18px;
}
.titre-jour h2 {
  margin: 0;
}
.date-jour {
  color: #6b7096;
  font-size: 15px;
}
.date-jour::first-letter {
  text-transform: uppercase;
}
.serie {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #c2410c;
  background: #ffedd5;
  padding: 4px 11px;
  border-radius: 999px;
}
.serie.vide {
  color: #6b7096;
  background: #fff; /* 17/11 : blanc, sur le fond pêche (avant : #eceef7) */
}
.statut .ti {
  vertical-align: -2px;
}
.carte.finie .statut {
  color: #1f7a52;
  font-weight: 500;
}

/* ---------- Archives ---------- */
.archives {
  margin-top: 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.archives h2 {
  margin-bottom: 2px;
}
.sous-titre {
  text-align: center;
  color: #6b7096;
  margin: 0 0 14px;
}
.jour {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #fffaf7;
  border-radius: 14px;
  margin-bottom: 8px;
}
.jour-date::first-letter {
  text-transform: uppercase;
}
.chips {
  display: flex;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 46px;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--coul);
  background: #fff;
  border: 1.5px solid var(--fond);
  transition: transform 0.15s;
}
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--coul);
}
.chip.encours {
  background: var(--fond);
}
.chip.fini {
  background: var(--coul);
  color: #fff;
  border-color: var(--coul);
}
.chip.sol {
  opacity: 0.55;
}
.archives .vide {
  text-align: center;
  color: #8a8fb3;
}
footer a {
  color: inherit;
}

/* Texte visible seulement par Google et les lecteurs d'écran */
.lecteur {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* ---------- Présentation (bas de page) ---------- */
.apropos {
  margin: 56px auto 0;
  max-width: 640px;
  box-sizing: border-box;
  background: rgba(255, 250, 247, 0.94);
  border-radius: 18px;
  padding: 24px 26px;
  color: #3b3f73;
  font-size: 15px;
  line-height: 1.6;
}
.apropos h2 {
  margin-bottom: 10px;
}
.apropos h3 {
  font-size: 16px;
  font-weight: 500;
  color: #1b1d36;
  margin: 18px 0 4px;
}
.apropos p {
  margin: 0 0 8px;
}
.apropos ul {
  margin: 0;
  padding-left: 20px;
}
.apropos strong {
  font-weight: 500;
  color: #1b1d36;
}
.toutes-archives {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 14px auto 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: #fff3cf;
  color: #6b4a00;
  font-weight: 500;
  text-decoration: none;
  font-size: 15px;
}
.toutes-archives:hover {
  background: #ffe08a;
}
/* l'en-tête et le pied de page passent au-dessus du fond de tuiles */
.site-tete {
  z-index: 40;
}
/* animations réduites : le surligneur de « Fléché » est affiché d'emblée (règle placée après .m2::before) */
@media (prefers-reduced-motion: reduce) {
  .m2::before {
    animation: none;
  }
}

/* ---------- Bandeau Instant Fléché Kids (sous les grilles du jour) ---------- */
.kids-bandeau { display: flex; align-items: center; gap: 12px; margin: 22px 0 6px; padding: 10px 14px 10px 12px; border-radius: 20px; background: linear-gradient(135deg, #dff3ff, #e9f9ef); box-shadow: 0 4px 0 #bfe3f5; text-decoration: none; color: #24304f; font-family: "Outfit", sans-serif; transition: transform 0.15s; }
.kids-bandeau:hover { transform: translateY(-2px); }
.kids-bandeau img { flex-shrink: 0; animation: kbd-tete 3s ease-in-out infinite; }
@keyframes kbd-tete { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.kbd-badge { flex-shrink: 0; background: #ff7a6b; color: #fff; font: 600 12px Fredoka, sans-serif; padding: 3px 9px; border-radius: 99px; }
.kbd-txt { flex: 1; font-size: 15px; line-height: 1.35; }
.kbd-txt b { font-family: "Fredoka", sans-serif; font-weight: 600; }
.kbd-kids { color: #e0574a; }
.kbd-btn { flex-shrink: 0; background: #59c98b; color: #fff; font: 600 15px Fredoka, sans-serif; padding: 9px 16px; border-radius: 99px; box-shadow: 0 3px 0 #3ea56c; }
.kids-bandeau:hover .kbd-btn { background: #47b878; }
@media (prefers-reduced-motion: reduce) { .kids-bandeau img { animation: none; } }
@media (max-width: 640px) {
  .kids-bandeau { gap: 10px; }
  .kbd-long, .kbd-badge { display: none; }
  .kbd-txt { font-size: 14px; }
  .kbd-btn { padding: 7px 12px; font-size: 14px; }
}


/* =====================================================================================================
   Accueil « Jouer d'abord » (17/11, maquette A2 du labo : labo/accueil-ergonomie.html, labo/maquette-accueil-a2.html)
   Titre et 4 grilles du jour tout en haut (2 × 2 sur téléphone), boutons pastel, « Encore plus d'Instant Fléché »
   en tuiles, présentation repliée en questions. Les règles ci-dessous remplacent l'ancien habillage des cartes.
   ===================================================================================================== */
main { padding-top: 30px; }
.accueil-tete { display: flex; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.accueil-tete .date-jour { font-size: 15px; color: #6b7096; }
#titre-jour { margin: 2px 0 0; font: 600 clamp(25px, 3.4vw, 34px) "Fredoka", "Outfit", sans-serif; line-height: 1.12; text-align: left; color: #1b1d36; }
#titre-jour .mf { font-size: 1em; }
.bilan { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bilan .serie, .avance { display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 99px; font-size: 14px; font-weight: 500; }
.avance { background: #fffaf7; color: #1b1d36; box-shadow: 0 1px 2px rgba(27, 29, 54, 0.05); }
.avance[hidden] { display: none; }
.bienvenue { margin: 0 0 18px; font-size: 15px; color: #6b7096; }
.bienvenue a { color: #6b4a00; font-weight: 500; text-decoration: underline; text-decoration-color: #ffcb45; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* cartes des Forces */
.forces { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.carte { position: relative; overflow: hidden; gap: 8px; padding: 16px; border: 0; border-radius: 18px; background: #fffaf7;
  box-shadow: 0 1px 2px rgba(27, 29, 54, 0.04), 0 8px 22px rgba(160, 90, 50, 0.07); }
a.carte:hover, a.carte:focus-visible { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(27, 29, 54, 0.04), 0 14px 30px rgba(160, 90, 50, 0.12); }
.carte.encours { box-shadow: 0 0 0 2.5px var(--coul), 0 8px 22px rgba(160, 90, 50, 0.1); }
a.carte.encours:hover { box-shadow: 0 0 0 2.5px var(--coul), 0 14px 30px rgba(160, 90, 50, 0.14); }
.c-tete { display: flex; align-items: center; gap: 10px; }
.carte .num { width: 42px; height: 42px; border-radius: 12px; font: 600 23px "Fredoka", sans-serif; flex: none; }
.c-nom { font: 600 17px "Fredoka", sans-serif; line-height: 1.1; color: #1b1d36; }
.c-nom small { display: block; font: 400 13px "Outfit", sans-serif; color: #6b7096; margin-top: 2px; }
.carte .desc { font-size: 14px; line-height: 1.35; }
.c-barre { display: block; height: 6px; border-radius: 99px; background: #f0e4dc; overflow: hidden; }
.c-barre i { display: block; height: 100%; border-radius: 99px; background: var(--coul); }
.c-etat { display: flex; justify-content: space-between; font-size: 13px; color: #6b7096; }
.carte.finie .c-etat span:first-child { color: color-mix(in srgb, var(--coul) 85%, black); font-weight: 500; }
/* boutons pastel : fond clair teinté de la couleur de la Force, texte coloré (retour du 17/11 : « plus doux ») */
.c-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 12px; font: 600 15px "Fredoka", sans-serif;
  background: color-mix(in srgb, var(--coul) 16%, white); color: color-mix(in srgb, var(--coul) 88%, black); transition: background 0.2s; }
a.carte:hover .c-btn { background: color-mix(in srgb, var(--coul) 24%, white); }
.carte.encours .c-btn { background: color-mix(in srgb, var(--coul) 26%, white); }
.carte.finie .c-btn { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--coul) 25%, white); }
.ruban { position: absolute; top: 12px; right: -30px; transform: rotate(35deg); background: #ffcb45; color: #6b4a00; font: 600 11px "Outfit", sans-serif; padding: 2px 32px; text-transform: uppercase; letter-spacing: 0.03em; }

/* « Encore plus d'Instant Fléché » */
.encore { margin-top: 34px; }
.encore h2, .savoir h2 { text-align: left; font: 600 21px "Fredoka", sans-serif; margin: 0 0 12px; color: #1b1d36; }
.tuiles-plus { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tuile-plus { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: #fffaf7; color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(27, 29, 54, 0.04); transition: transform 0.2s, box-shadow 0.2s; }
.tuile-plus[hidden] { display: none; }
.tuile-plus:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(160, 90, 50, 0.1); }
.tp-ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 25px; flex: none; }
.tp-archives { background: #f3e6dd; color: #8a6a55; } .tp-archives .ti { font-size: 25px; }
.tp-imprimer { background: #fff1c7; } .tp-appli-ic { background: #ebe7ff; }
.tp-txt b { display: block; font: 600 16px "Fredoka", sans-serif; color: #1b1d36; }
.tp-txt span { font-size: 13.5px; color: #6b7096; line-height: 1.3; }
.tp-fl { margin-left: auto; color: #6b7096; }
/* tuile Kids (« Kids 4 », orange mandarine) */
.tp-kids { background: #fff1e0; box-shadow: inset 0 0 0 2px #ffd8ad; }
.tp-kids .tp-ic { background: #ffe2bd; }
.tp-kids b, .tp-kids .tp-fl { color: #d9690f; }

/* présentation repliée en questions */
.savoir { margin: 34px 0 0; max-width: none; background: none; padding: 0; }
.savoir details { background: #fffaf7; border-radius: 16px; padding: 4px 18px; margin-bottom: 8px; color: #3b3f73; font-size: 15px; line-height: 1.6; }
.savoir summary { cursor: pointer; padding: 12px 0; font: 600 16px "Fredoka", sans-serif; color: #1b1d36; list-style: none; display: flex; align-items: center; gap: 8px; }
.savoir summary::-webkit-details-marker { display: none; }
.savoir summary::after { content: "+"; margin-left: auto; font-size: 20px; color: #6b7096; }
.savoir details[open] summary::after { content: "–"; }
.savoir details p { margin: 0 0 14px; }
.savoir details ul { margin: 0 0 14px; padding-left: 20px; }
.savoir details a { color: #6b4a00; }
.savoir strong { font-weight: 500; color: #1b1d36; }

@media (max-width: 760px) {
  main { padding-top: 18px; }
  .bilan { margin-left: 0; }
  .bienvenue { font-size: 14px; }
  .forces { grid-template-columns: 1fr 1fr; gap: 10px; }
  .carte { padding: 12px; gap: 7px; border-radius: 16px; }
  .carte .num { width: 36px; height: 36px; font-size: 20px; border-radius: 10px; }
  .c-nom { font-size: 15.5px; }
  .carte .desc { display: none; }
  .c-btn { padding: 9px; font-size: 14.5px; }
  .tuiles-plus { grid-template-columns: 1fr; gap: 8px; }
  .tuile-plus { padding: 11px 12px; }
  .encore h2, .savoir h2 { font-size: 19px; }
}/* sans la tuile « L'appli » (installation impossible ou déjà faite) : les trois autres tuiles côte à côte */
.tuiles-plus:has(.tp-appli[hidden]) { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 760px) { .tuiles-plus:has(.tp-appli[hidden]) { grid-template-columns: 1fr; } }
/* =====================================================================================================
   Petites animations (17/11, labo/dynamique.html) : classe « anim-N » posée sur <body> par js/accueil.js.
   ===================================================================================================== */
/* 1 · cascade à l'arrivée (« backwards » : ne gêne pas le soulèvement au survol une fois arrivée) */
@keyframes if-arrive { from { opacity: 0; transform: translateY(18px); } }
.anim-1 .accueil-tete, .anim-1 .bienvenue { animation: if-arrive 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) backwards; }
.anim-1 .bienvenue { animation-delay: 0.06s; }
.anim-1 .carte { animation: if-arrive 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) backwards; }
.anim-1 .carte:nth-child(1) { animation-delay: 0.12s; } .anim-1 .carte:nth-child(2) { animation-delay: 0.2s; }
.anim-1 .carte:nth-child(3) { animation-delay: 0.28s; } .anim-1 .carte:nth-child(4) { animation-delay: 0.36s; }
/* 2 · le surligneur de « mots fléchés » se dessine */
@keyframes if-trait { to { background-size: 100% 100%; } }
.anim-2 #titre-jour .mf { background-repeat: no-repeat; background-size: 0% 100%; animation: if-trait 0.6s 0.55s cubic-bezier(0.3, 1, 0.5, 1) forwards; }
/* 3 · la barre de la partie en cours se remplit */
@keyframes if-remplit { from { transform: scaleX(0); } }
.anim-3 .c-barre i { transform-origin: left center; animation: if-remplit 1.1s 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) backwards; }
/* 4 · survol des cartes : le numéro rebondit, la carte se soulève un peu plus */
@keyframes if-rebond { 30% { transform: translateY(-6px) rotate(-8deg) scale(1.08); } 60% { transform: translateY(1px) rotate(4deg); } }
.anim-4 a.carte:hover .num { animation: if-rebond 0.55s ease; }
.anim-4 a.carte:hover, .anim-4 a.carte:focus-visible { transform: translateY(-5px); }
.anim-4 a.carte:active { transform: translateY(-1px) scale(0.99); }
/* 5 · icônes des tuiles (survol sur ordinateur, « .joue » quand la tuile apparaît sur téléphone) */
@keyframes if-page { 30% { transform: translateY(-4px) rotate(-10deg); } 60% { transform: translateY(1px) rotate(5deg); } }
@keyframes if-imprime { 0% { transform: translateY(-9px); opacity: 0.2; } 100% { transform: none; opacity: 1; } }
@keyframes if-vibre { 10%, 30%, 50% { transform: rotate(-9deg); } 20%, 40% { transform: rotate(9deg); } 60% { transform: none; } }
@keyframes if-hoche { 25% { transform: rotate(-12deg); } 50% { transform: rotate(9deg); } 75% { transform: rotate(-4deg); } }
.tp-ic svg, .tp-ic img, .tp-ic .feuille { transform-box: fill-box; transform-origin: center; }
.anim-5 .tuile-plus:hover .tp-archives svg, .anim-5 .tuile-plus.joue .tp-archives svg { animation: if-page 0.6s ease; }
.anim-5 .tuile-plus:hover .tp-imprimer .feuille, .anim-5 .tuile-plus.joue .tp-imprimer .feuille { animation: if-imprime 0.8s cubic-bezier(0.2, 0.8, 0.3, 1); }
.anim-5 .tuile-plus:hover .tp-appli-ic svg, .anim-5 .tuile-plus.joue .tp-appli-ic svg { animation: if-vibre 0.6s ease; }
.anim-5 .tuile-plus:hover .tp-kids-ic img, .anim-5 .tp-kids:hover .tp-ic img, .anim-5 .tp-kids.joue .tp-ic img { animation: if-hoche 0.8s ease; transform-origin: 50% 80%; }
/* 7 · compte à rebours, à côté de la date */
.rebours { color: #b07a4a; }
/* 8 · la flamme de la série ondule */
@keyframes if-flamme { 50% { transform: scale(1.18) rotate(-7deg); } }
.anim-8 .st-serie .ti-flame { display: inline-block; transform-origin: 50% 90%; animation: if-flamme 1.5s ease-in-out infinite; }
/* 9 · confettis quand les 4 grilles du jour sont réussies */
@keyframes if-tombe { to { transform: translateY(110vh) rotate(720deg); } }
.confetti-if { position: fixed; top: -20px; width: 10px; height: 14px; border-radius: 3px; z-index: 60; pointer-events: none; animation: if-tombe linear forwards; }
/* 10 · les sections du bas apparaissent en fondu au défilement */
.anim-10 .encore, .anim-10 .savoir { opacity: 0; transform: translateY(24px); transition: opacity 0.6s, transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1); }
.anim-10 .encore.vu, .anim-10 .savoir.vu { opacity: 1; transform: none; }
/* 17/11 (retour : « trop d'infos en haut sur mobile ») : la phrase d'accueil n'est plus montrée aux habitués */
.bienvenue[hidden] { display: none; }
.accueil-tete { margin-bottom: 16px; }
.bienvenue { margin-top: -6px; }
