@font-face { font-family: "Fredoka"; src: url(fonts/fredoka-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(fonts/fredoka-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(fonts/courier-prime-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(fonts/courier-prime-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cabin Sketch"; src: url(fonts/cabin-sketch-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playwrite FR Moderne"; src: url(fonts/playwrite-fr-moderne-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --indigo: #2B1B5E;
  --indigo-2: #3A2780;
  --indigo-3: #4C35A0;
  --rose: #F0468E;
  --rose-fonce: #C92A6F;
  --orange: #FF7A1A;
  --or: #FFB81C;
  --cyan: #1FA4E0;
  --creme: #FFF6E3;
  --creme-2: #F5E7C8;
  --encre: #2A2140;
  --gris: #8C84A8;
  --vert-ardoise: #23443A;
  --rayon: 14px;
  --titre: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --machine: "Courier Prime", "Courier New", monospace;
  --plume: "Playwrite FR Moderne", "Segoe Script", cursive;
  --craie: "Cabin Sketch", "Chalkboard SE", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--indigo);
  background-image: radial-gradient(rgba(255,255,255,.05) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  color: var(--creme);
  font-family: var(--titre);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.45;
  min-height: 100vh;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }

.test-banner {
  background: var(--or); color: var(--encre); text-align: center;
  font-size: 14px; padding: 6px 10px;
}
.test-banner a { color: var(--encre); font-weight: 700; }
.choix-jour { font: inherit; font-size: 14px; padding: 4px 6px; border-radius: 8px; border: 0; margin: 2px 4px; }

/* Bannière */
.banniere { background: var(--creme); color: var(--encre); box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.banniere-dedans {
  max-width: 1100px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.entete-meme { width: 66px; height: auto; flex: none; }
.banniere-titres { flex: 1 1 260px; }
h1 {
  font-weight: 700; font-size: clamp(21px, 4.6vw, 32px); line-height: 1.1;
  margin: 0; color: var(--indigo); text-wrap: balance;
}
.sous-titre { margin: 3px 0 0; color: var(--rose-fonce); font-size: clamp(14px, 3.4vw, 17px); }
.banniere-liens { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) { .banniere-liens { width: 100%; } }

/* Timeline */
.timeline ol {
  list-style: none; margin: 0; padding: 10px;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px;
  background: var(--indigo-2); border-radius: var(--rayon);
  border: 1.5px dashed rgba(255,255,255,.25);
}
@media (min-width: 760px) { .timeline ol { grid-template-columns: repeat(24, 1fr); } }
.jour {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--titre); font-weight: 700; font-size: 14px;
  border: 2px solid rgba(255,255,255,.35); background: transparent; color: rgba(255,255,255,.55);
  cursor: default; padding: 0;
}
.jour.ouvert { cursor: pointer; border-color: transparent; color: var(--encre); }
.jour.ouvert.c0 { background: var(--rose); color: #fff; }
.jour.ouvert.c1 { background: var(--orange); }
.jour.ouvert.c2 { background: var(--cyan); }
.jour.ouvert.c3 { background: var(--or); }
.jour.aujourdhui { box-shadow: 0 0 0 3px var(--indigo-2), 0 0 0 6px #fff; }

/* Bandeau (compte à rebours, messages globaux) */
.bandeau {
  max-width: 1068px; margin: 8px auto 0; padding: 10px 14px;
  background: var(--rose); color: #fff; border-radius: var(--rayon); text-align: center;
}
@media (max-width: 1100px) { .bandeau { margin: 8px 16px 0; } }

/* Onglets */
.onglets {
  max-width: 1100px; margin: 0 auto; padding: 16px 16px 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.onglets button {
  flex: none; border: 0; border-radius: 999px; padding: 7px 12px;
  background: var(--indigo-3); color: #fff; cursor: pointer; font-size: 15px;
}
.onglets button[aria-selected="true"] { background: var(--creme); color: var(--encre); }
.pastille-compte {
  display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: var(--rose); color: #fff; font-size: 13px; text-align: center;
}

main { max-width: 1100px; margin: 0 auto; padding: 12px 16px 8px; }
.jeu { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .jeu { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
  .zone-carnet { margin-top: 28px; } /* aligné sur le haut des étiquettes */
}
#vue-jeu > .titre-zone { margin-top: 4px; }
.titre-zone { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.titre-zone h2 { margin: 0; font-size: 22px; color: #fff; }
.info-jour { margin: 0; color: var(--or); font-size: 15px; }
.bloc { padding: 18px 0 6px; }
.titre-bloc { font-size: 20px; margin: 0 0 10px; color: #fff; }
.titre-vue { margin: 6px 0 0; font-size: 22px; }
.vide { color: rgba(255,255,255,.75); font-style: italic; }

/* Plateau : une ligne = un début + une fin + un cœur */
.entetes-plateau, .ligne {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 50px; column-gap: 3px;
}
.entetes-plateau { height: 22px; padding: 0 6px; }
.entetes-plateau span { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--or); }
.plateau { display: grid; grid-auto-rows: 1fr; gap: 10px; margin-top: 6px; }
.ligne {
  align-items: stretch; padding: 6px; border-radius: 14px;
  background: #4A3596; border: 2px solid #7B66D6; box-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.ligne.juste { background: #2E7D57; border-color: #6FDB9E; }
/* « Papier recollé » : sur une vraie expression, la couture se resserre sans disparaître */
.ligne.juste .morceau.fin { margin-left: -5px; width: calc(100% + 5px); }
/* Pendant un échange au clic, chaque ligne devient une cible */
.plateau.en-attente .ligne:not(:has(.choisi)) { border-style: dashed; border-color: var(--or); }
.morceau {
  position: relative; width: 100%; height: 100%; min-height: 60px; text-align: left;
  font-family: var(--machine); font-size: 15px; font-weight: 700; line-height: 1.25;
  background: var(--creme); color: var(--encre); border: 0; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
/* Bord déchiré : à droite pour les débuts, à gauche pour les fins (les deux moitiés s'emboîtent) */
.morceau.debut {
  border-radius: 8px 0 0 8px; padding: 10px 16px 10px 12px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 8.33%, calc(100% - 6px) 16.67%, 100% 25%, calc(100% - 6px) 33.33%, 100% 41.67%, calc(100% - 6px) 50%, 100% 58.33%, calc(100% - 6px) 66.67%, 100% 75%, calc(100% - 6px) 83.33%, 100% 91.67%, calc(100% - 6px) 100%, 0 100%);
}
.morceau.fin {
  border-radius: 0 8px 8px 0; padding: 10px 12px 10px 16px;
  margin-left: -4px; width: calc(100% + 4px); /* les dents s'emboîtent avec celles du début */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 6px 91.67%, 0 83.33%, 6px 75%, 0 66.67%, 6px 58.33%, 0 50%, 6px 41.67%, 0 33.33%, 6px 25%, 0 16.67%, 6px 8.33%);
}
@media (min-width: 760px) { .morceau { font-size: 17px; } .morceau.debut { padding: 12px 18px 12px 14px; } .morceau.fin { padding: 12px 14px 12px 18px; } }
.morceau:hover { background: #fff; }
.morceau.choisi { background: var(--or); }
.morceau.cible-survol { background: #BFE9FF; }
.morceau.juste { background: #C9F0D6; }
.morceau.juste.choisi { background: var(--or); }
.morceau.deplace { animation: eclat 1.1s ease-out; }
@keyframes eclat { 0%, 35% { background: var(--or); } 100% { background: var(--creme); } }
.morceau.juste.deplace { animation: eclat-juste 1.1s ease-out; }
@keyframes eclat-juste { 0%, 35% { background: var(--or); } 100% { background: #C9F0D6; } }
.morceau .nouveau {
  padding: 0 6px; border-radius: 6px;
  background: var(--rose); color: #fff; font-family: var(--titre); font-size: 12px; font-weight: 500;
}
.coeur {
  justify-self: end; display: grid; place-items: center; width: 44px; height: 100%; min-height: 44px;
  border: 0; border-radius: 10px; background: var(--indigo-3); color: #fff; font-size: 22px; cursor: pointer; padding: 0;
}
.coeur.actif { background: var(--rose); }
.coeur.juste { background: #2FA866; font-size: 20px; cursor: default; }
.fantome {
  position: fixed; z-index: 50; pointer-events: none; opacity: .92; max-width: 300px; height: auto;
  transform: rotate(-3deg); background: var(--or) !important;
}
.aide { margin: 4px 0 14px; color: rgba(255,255,255,.9); font-size: 16px; max-width: 75em; }
.aide p { margin: 0 0 6px; }
.aide .statut { display: inline-block; margin-top: 4px; background: var(--creme); color: var(--encre); border: 2px solid var(--rose); border-radius: 10px; padding: 4px 10px; font-weight: 700; }
.aide-simple { color: rgba(255,255,255,.88); margin: 0 0 12px; }

/* Carnet */
.carnet {
  background-color: var(--creme); color: var(--encre);
  border-radius: 6px var(--rayon) var(--rayon) 6px;
  padding: 18px 16px 20px 54px; position: relative;
  background-image:
    linear-gradient(90deg, transparent 40px, #E8556A 40px, #E8556A 42px, transparent 42px),
    linear-gradient(rgba(70,110,200,.35) 1px, transparent 1px),
    linear-gradient(rgba(70,110,200,.12) 1px, transparent 1px);
  background-size: 100% 100%, 100% 32px, 100% 8px;
  box-shadow: 0 6px 0 rgba(0,0,0,.25);
}
.carnet h2 { margin: 0; font-size: 22px; color: var(--indigo); }
.progression { margin: 2px 0 10px; color: var(--rose-fonce); font-weight: 700; }
.lignes-carnet { margin: 0; padding: 0; list-style: none; }
.lignes-carnet li { padding: 6px 0 10px; border-bottom: 1px dashed rgba(42,33,64,.15); }
.lignes-carnet details summary {
  font-family: var(--plume); font-size: 17px; line-height: 1.9; cursor: pointer; list-style: none;
}
.lignes-carnet details summary::-webkit-details-marker { display: none; }
.lignes-carnet details summary::after { content: " ▾"; font-family: var(--titre); color: var(--rose-fonce); font-size: 14px; }
.lignes-carnet details[open] summary::after { content: " ▴"; }
.lignes-carnet li.revele summary { color: #7a6f8f; }
.etiquette-revele { font-family: var(--titre); font-size: 12px; background: var(--gris); color: #fff; border-radius: 6px; padding: 0 6px; margin-left: 6px; }
.sens { margin: 6px 0 4px; }
.mot-meme { margin: 0; font-style: italic; color: #5a4f75; }
.mot-meme::before { content: "Mémé : "; font-style: normal; font-weight: 700; color: var(--rose-fonce); }
.vide-carnet { font-style: italic; color: #5a4f75; }
.carnet-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

.zone-solutions {
  margin-top: 16px; padding: 14px; border-radius: var(--rayon);
  background: var(--indigo-2); border: 1.5px dashed rgba(255,255,255,.3);
}
.zone-solutions h3 { margin: 0 0 6px; }
.liste-a-reveler { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.liste-a-reveler li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--indigo-3); padding: 8px 10px; border-radius: 10px; }
.liste-a-reveler .debut-seul { font-family: var(--machine); }

/* Préférées */
.liste-favoris { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.liste-favoris li {
  background: var(--creme); color: var(--encre); border-radius: var(--rayon);
  padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between;
}
.liste-favoris .expr { font-family: var(--machine); font-size: 17px; flex: 1 1 220px; }
.actions-favori { display: flex; gap: 6px; }

/* Classements */
.tableau-noir {
  background: var(--vert-ardoise); color: #F4F1E6;
  border: 10px solid #8B5A2B; border-radius: 8px; padding: 18px; text-align: center;
  box-shadow: 0 6px 0 rgba(0,0,0,.3);
}
.tableau-noir h2 { margin: 6px 0; font-size: 26px; }
.tableau-meme { width: 110px; height: auto; }
.carte-pseudo { margin-top: 18px; background: var(--indigo-2); padding: 14px; border-radius: var(--rayon); }
.carte-pseudo label { display: block; margin-bottom: 6px; }
.ligne-pseudo { display: flex; gap: 8px; flex-wrap: wrap; }
.ligne-pseudo input { flex: 1 1 200px; }
input, textarea {
  font: inherit; font-family: var(--titre); color: var(--encre); background: var(--creme);
  border: 2px solid transparent; border-radius: 10px; padding: 9px 12px; width: 100%;
}
input:focus, textarea:focus { border-color: var(--or); outline: none; }
.petit { font-size: 14px; color: rgba(255,255,255,.75); margin: 8px 0 0; }

/* Boutons */
.btn {
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  font-weight: 700; box-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.btn-rose { background: var(--rose); color: #fff; }
.btn-cyan { background: var(--cyan); color: #fff; }
.btn-or { background: var(--or); color: var(--encre); }
.btn-clair { background: var(--creme); color: var(--encre); }
.btn-petit { padding: 6px 12px; font-size: 14px; }
.lien { background: none; border: 0; color: rgba(255,255,255,.8); text-decoration: underline; cursor: pointer; padding: 4px; font-size: 15px; }

.pied {
  max-width: 1100px; margin: 0 auto; padding: 16px 16px 32px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center;
}

/* Fenêtre */
.voile {
  position: fixed; inset: 0; z-index: 40; background: rgba(20,12,45,.7);
  display: grid; place-items: center; padding: 16px; overflow-y: auto;
}
.fenetre {
  position: relative; width: min(520px, 100%); background: var(--creme); color: var(--encre);
  border-radius: 20px; padding: 22px 20px 20px; text-align: center;
  box-shadow: 0 8px 0 rgba(0,0,0,.3);
}
.fenetre h2 { margin: 4px 0 8px; font-size: 24px; color: var(--indigo); }
.fenetre p { margin: 8px 0; }
.fenetre-meme { width: 140px; height: auto; margin-top: -4px; }
.fermer {
  position: absolute; top: 8px; right: 10px; width: 40px; height: 40px;
  border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--encre);
}
.expression-affichee {
  font-family: var(--plume); font-size: 19px; line-height: 1.8;
  background: #fff; border-radius: 10px; padding: 10px 12px; margin: 10px 0;
}
.expression-farfelue {
  font-family: var(--machine); font-size: 19px; font-weight: 700;
  background: #fff; border-radius: 10px; padding: 12px; margin: 10px 0;
}
.fenetre .sens, .fenetre .mot-meme { text-align: left; }
.actions-fenetre { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.consigne { text-align: left; font-size: 17px; }
.consigne p { margin: 0 0 10px; }
.signature { font-family: var(--plume); color: var(--rose-fonce); }
.form-contact { text-align: left; display: grid; gap: 6px; }
.form-contact input, .form-contact textarea { border-color: #e3d6b8; background: #fff; }
.form-contact .petit { color: var(--encre); }
.cache { position: absolute; left: -9999px; }
.decompte { font-size: 22px; font-weight: 700; color: var(--rose-fonce); }

/* Message bref */
.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60;
  background: var(--encre); color: #fff; padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 4px 0 rgba(0,0,0,.3); max-width: calc(100% - 32px); text-align: center;
}

/* Page mentions */
.page-texte { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.page-texte a { color: var(--or); }
.page-texte h1 { margin-bottom: 18px; }
.page-texte h2 { color: var(--or); font-size: 20px; margin-top: 26px; }
.astuce { text-align: left; background: #fff; border-left: 4px solid var(--rose); border-radius: 8px; padding: 8px 12px; }

/* Timeline (affichage seul) */
.jour { cursor: default; }
.timeline ol { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (min-width: 760px) { .timeline ol { grid-template-columns: repeat(24, minmax(0, 1fr)); } }

/* Fenêtre de consigne */
.fenetre.large { width: min(600px, 100%); }
.fenetre-banniere { background: var(--indigo); color: #fff; margin: -22px -20px 10px; padding: 18px 52px 14px 20px; border-radius: 20px 20px 0 0; text-align: left; }
.fb-titre { margin: 0 !important; font-weight: 700; font-size: 22px; line-height: 1.15; }
.fb-sous-titre { margin: 4px 0 0 !important; color: var(--or); font-size: 15px; }
.fenetre-banniere + .fenetre-meme { width: 110px; }
.fenetre.large .fermer { color: #fff; }
.consigne h2 { text-align: center; }
.consigne h3 { margin: 16px 0 8px; font-size: 18px; color: var(--indigo); }
.etapes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.etapes li { display: flex; gap: 10px; align-items: flex-start; }
.etapes .num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--rose); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* Carnet : bulles de Mémé */
.lignes-carnet li.dernier { background: rgba(255,184,28,.18); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.lignes-carnet details summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.lignes-carnet details summary::after { content: none !important; }
.pastille-bulle {
  position: relative; display: inline-grid; place-items: center; width: 30px; height: 22px; margin-left: 2px;
  background: var(--rose); color: #fff; border-radius: 11px; font-family: var(--titre); font-weight: 700; font-size: 14px; line-height: 1;
  align-self: center;
}
.pastille-bulle::after {
  content: ""; position: absolute; left: 5px; bottom: -5px; border: 5px solid transparent;
  border-top-color: var(--rose); border-left-color: var(--rose); border-bottom: 0; border-right-width: 3px;
}
details[open] .pastille-bulle { background: var(--indigo-3); }
details[open] .pastille-bulle::after { border-top-color: var(--indigo-3); border-left-color: var(--indigo-3); }
.bulle-meme { display: flex; gap: 8px; align-items: flex-end; margin: 6px 0 2px; }
.bulle-tete { width: 44px; height: auto; flex: none; }
.bulle-texte {
  position: relative; margin: 0; background: #fff; color: var(--encre);
  border: 2px solid var(--encre); border-radius: 16px; padding: 8px 12px;
  font-family: var(--titre); font-size: 15px; line-height: 1.4; text-align: left;
}
.bulle-texte::before {
  content: ""; position: absolute; left: -12px; bottom: 10px;
  border: 7px solid transparent; border-right: 11px solid var(--encre); border-left: 0;
}
.bulle-texte::after {
  content: ""; position: absolute; left: -8px; bottom: 11px;
  border: 6px solid transparent; border-right: 9px solid #fff; border-left: 0;
}
.fenetre .bulle-meme { margin: 12px 0; }
.fenetre .bulle-texte { font-size: 16px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Préférées : deux colonnes sur grand écran */
.deux-colonnes { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .deux-colonnes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.top-farfelues { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.top-farfelues li {
  background: var(--indigo-2); border: 1.5px dashed rgba(255,255,255,.3); border-radius: var(--rayon);
  padding: 10px 12px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 6px 10px; align-items: center;
}
.top-farfelues .expr { font-family: var(--machine); font-weight: 700; }
.top-farfelues .actions-favori { grid-column: 2 / 4; }
.rang-top { width: 28px; height: 28px; border-radius: 50%; background: var(--or); color: var(--encre); display: grid; place-items: center; font-weight: 700; }
.compte-coeurs { color: var(--rose); font-weight: 700; white-space: nowrap; }
.note-exemple { font-size: 13px; color: var(--encre); background: var(--or); border-radius: 8px; padding: 4px 10px; display: inline-block; margin: 0 0 10px; }

/* Tableau d'honneur */
.scene-tableau { position: relative; margin: 6px 0 70px; }
@media (min-width: 700px) { .scene-tableau { margin: 6px 150px 20px 0; } }
.tableau-noir {
  background: var(--vert-ardoise); color: #F4F1E6; text-align: left;
  border: 12px solid #8B5A2B; border-radius: 8px; padding: 16px 16px 12px;
  box-shadow: 0 6px 0 rgba(0,0,0,.3), inset 0 0 40px rgba(0,0,0,.25);
}
.titre-craie { font-family: var(--craie); font-weight: 700; font-size: clamp(22px, 4.6vw, 32px); line-height: 1.15; margin: 0 0 12px; color: #fff; text-align: center; text-wrap: balance; }
.defile-craie { max-height: 360px; overflow-y: auto; padding-right: 80px; scrollbar-color: rgba(255,255,255,.4) transparent; }
@media (min-width: 700px) { .defile-craie { padding-right: 60px; } }
.craie-texte { font-size: 17px; }
.liste-craie { list-style: none; margin: 0; padding: 0; }
.liste-craie li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 2px; border-bottom: 1px dashed rgba(255,255,255,.25); }
.liste-craie .rang { font-family: var(--craie); font-weight: 700; font-size: 20px; color: var(--or); }
.liste-craie li:nth-child(-n+3) .rang { color: #FFD45C; font-size: 24px; }
.liste-craie .score { font-family: var(--craie); font-weight: 700; font-size: 18px; white-space: nowrap; }
.liste-craie li.moi { background: rgba(255,184,28,.22); border-radius: 6px; }
.liste-craie .toi { color: var(--or); }
.tableau-noir .note-exemple { margin: 0 0 8px; }
.meme-tableau { position: absolute; width: 130px; height: auto; right: -8px; bottom: -64px; pointer-events: none; }
@media (min-width: 700px) { .meme-tableau { width: 200px; right: -170px; bottom: -20px; } }
.carte-pseudo { margin-top: 0; }

/* Message bref ancré près du bouton touché */
.toast.ancre { bottom: auto; transform: translateX(-50%); font-size: 15px; padding: 8px 14px; max-width: 280px; }
/* Compteur de cœurs cliquable (pour retirer son cœur) */
button.compte-coeurs { background: var(--rose); color: #fff; border: 0; border-radius: 999px; padding: 4px 10px; cursor: pointer; font: inherit; font-weight: 700; }
.top-farfelues .actions-favori { display: flex; gap: 6px; flex-wrap: wrap; }
.liste-craie li.trou { display: block; text-align: center; color: rgba(255,255,255,.7); border-bottom: 0; font-size: 15px; }
/* Cœurs qui s'envolent de l'onglet « Les farfelues » */
#tab-favoris { position: relative; }
#tab-favoris.coeurs-volants { animation: battement .5s ease-in-out 2; }
#tab-favoris.coeurs-volants::before, #tab-favoris.coeurs-volants::after {
  content: "♥"; position: absolute; top: -4px; color: var(--rose); font-size: 18px; pointer-events: none;
  animation: envol 1.3s ease-out forwards;
}
#tab-favoris.coeurs-volants::before { left: 12%; }
#tab-favoris.coeurs-volants::after { right: 10%; animation-delay: .2s; color: #fff; }
@keyframes battement { 50% { transform: scale(1.12); box-shadow: 0 0 0 4px var(--rose); } }
@keyframes envol { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-34px) scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  #tab-favoris.coeurs-volants { animation: none; box-shadow: 0 0 0 4px var(--rose); }
  #tab-favoris.coeurs-volants::before, #tab-favoris.coeurs-volants::after { animation: none; opacity: 1; top: -14px; }
}
/* Message qui reste jusqu'à ce qu'on le ferme */
.toast.persistant { display: flex; flex-direction: column; align-items: center; gap: 10px; border-radius: 16px; text-align: center;
  width: min(360px, calc(100vw - 24px)); max-width: none; padding: 14px 18px; line-height: 1.4; }
.toast.ancre.persistant { width: min(360px, calc(100vw - 24px)); }
.toast-ok { flex: none; background: var(--or); color: var(--encre); border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; }
/* Boutons d'invitation sur ordinateur */
.invitation { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.invitation .btn { text-decoration: none; }
.invitation { flex-direction: column; align-items: center; }
.invitation-boutons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.copie-ok { margin: 4px 0 0; padding: 10px 14px; background: #fff; border-left: 4px solid var(--or); border-radius: 10px; color: var(--encre); font-size: 15px; text-align: left; }
