/* =============================================================
   MIRA — style.css
   Toutes les tailles et couleurs viennent de ton export Penpot
   (board calendar-day, 390 × 844).
   ============================================================= */

/* ---------- 1. Les couleurs de Yalla ---------- */
:root {
  --vert: #1F9E8F;
  --noir: #000000;
  --blanc: #FFFFFF;
  --gris-texte: #5E6E6B;       /* TODAY, Room A04 · Mr Martin */
  --gris-clair: #9AB3AF;       /* Add a test, homework…  + icônes de la roue */
  --gris-tres-clair: #D5D9D6;  /* poignée, interrupteur éteint */
  --gris-perso: #9AA19D;       /* couleur « Personal » */
  --corail: #F07A5F;           /* contrôles + compteur presque plein */
  --jaune: #F2C14E;            /* devoirs */
  --vert-pale: #CFEDE8;        /* le petit flash d'un nouvel événement */
  --gris-lignes: #E3E6E4;      /* les lignes de la grille de la vue Week */
  --contour: 2px solid var(--noir);
}

/* ---------- 2. Réglages de base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--blanc);
  color: var(--noir);
  font-family: "Lexend", sans-serif;
  line-height: 1.2;                 /* comme dans Penpot */
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
[hidden] { display: none !important; }

/* ---------- 3. L'écran : une colonne de la hauteur du téléphone ---------- */
.ecran {
  position: relative;
  max-width: 390px;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;                   /* l'écran lui-même ne défile jamais */
  background: var(--blanc);
}

/* Sur une tablette ou un ordinateur (bug 57) : la colonne du téléphone devient un « téléphone » posé au milieu,
   au lieu d'une bande blanche perdue dans un grand écran vide */
@media (min-width: 700px) and (min-height: 600px) {
  body { background: var(--vert-pale); }
  .ecran { height: min(calc(100dvh - 40px), 920px); margin: 20px auto; border: var(--contour); border-radius: 32px; box-shadow: 0 8px 0 var(--noir); }
  .entete { height: 60px; padding-top: 16px; }
}

/* ---------- 4. En-tête (Y 60, hauteur 44) ---------- */
.entete {
  flex-shrink: 0;
  height: calc(max(60px, env(safe-area-inset-top) + 16px) + 44px);
  padding: max(60px, calc(env(safe-area-inset-top) + 16px)) 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Le logo : l'icône (28 × 28) puis « mira », 8 px d'écart */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.logo-icone { width: 28px; height: 28px; flex-shrink: 0; }
.bouton-reglages {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 24px;
}

/* ---------- 5. Le bouton Day › (X 16, Y 112, 96 × 32) ---------- */
.barre-vue {
  flex-shrink: 0;
  position: relative;
  z-index: 31;                      /* reste au-dessus du voile du menu */
  padding: 8px 16px 0;
}
.selecteur-vue {
  position: relative;
  display: block;
  width: 96px;
  height: 32px;
  border: var(--contour);
  border-radius: 10px;
  background: var(--blanc);
  font-size: 14px;
}
.selecteur-vue span { position: absolute; inset-inline-start: 10px; top: 5px; }  /* 12 / 7 dans Penpot, moins le contour */
.selecteur-vue .ti {
  position: absolute;
  inset-inline-start: 68px;
  top: 6px;
  font-size: 16px;
  transition: transform .2s ease;
}
.selecteur-vue[aria-expanded="true"] .ti { transform: rotate(90deg); }  /* chevron-right → chevron-down */

/* ---------- 6. La zone qui défile ---------- */
.contenu {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 16px;
  scrollbar-width: none;
}
.contenu::-webkit-scrollbar { display: none; }

/* La carte verte de Yalla (Y 160, 358 × 76) */
.carte-mira {
  position: relative;
  min-height: 76px;
  padding-block: 17px 15px; padding-inline: 14px 98px;
  border: var(--contour);
  border-radius: 16px;
  background: var(--vert);
}
.carte-mira-titre { font-size: 15px; font-weight: 600; }
.carte-mira-sous-titre { margin-top: 4px; font-size: 13px; }
.carte-mira-titre,
.carte-mira-sous-titre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-mira.sans-bouton { padding-inline-end: 14px; }
.bouton-plan {
  position: absolute;
  inset-inline-end: 14px;
  top: 18px;
  width: 76px;
  height: 36px;
  border: var(--contour);
  border-radius: 10px;
  background: var(--blanc);
  font-size: 13px;
  font-weight: 600;
}

/* La ligne du jour : TODAY · FRIDAY, OCT 16 à gauche, les flèches à droite */
.ligne-jour {
  margin: 12px 0 8px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fleches { display: flex; gap: 6px; flex-shrink: 0; }
.bouton-fleche {
  width: 32px;
  height: 32px;
  border: var(--contour);
  border-radius: 10px;
  background: var(--blanc);
  display: grid;
  place-items: center;
  font-size: 18px;
}
/* « Today » n'apparaît que quand tu n'es pas sur aujourd'hui */
.bouton-aujourdhui {
  height: 32px;
  padding: 0 10px;
  border: var(--contour);
  border-radius: 10px;
  background: var(--vert);
  font-size: 13px;
  font-weight: 600;
  animation: apparait .2s ease-out;
}
.titre-jour {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 1px;
  color: var(--gris-texte);
  text-transform: uppercase;
}

/* Les cartes (358 × 64, une tous les 72 px) */
.liste-cartes { display: flex; flex-direction: column; gap: 8px; }
.carte {
  position: relative;
  display: block;
  width: 100%;
  height: 64px;
  border: var(--contour);
  border-radius: 16px;
  background: var(--blanc);
  text-align: start;
}
.carte-heure   { position: absolute; inset-inline-start: 14px; top: 10px; font-size: 14px; font-weight: 600; }
.carte-titre   { position: absolute; inset-inline-start: 78px; inset-inline-end: 14px; top: 9px; font-size: 16px; font-weight: 600; }
.carte-details { position: absolute; inset-inline-start: 78px; inset-inline-end: 14px; top: 32px; font-size: 13px; color: var(--gris-texte); }
.carte-heure.journee { width: 58px; top: 11px; font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; }
.carte-titre,
.carte-details { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte.nouvelle { animation: flash 1.8s ease-out; }
@keyframes flash {
  0%, 35% { background: var(--vert-pale); }
  100%    { background: var(--blanc); }
}
.jour-vide {
  padding: 24px 8px;
  text-align: center;
  font-size: 14px;
  color: var(--gris-texte);
}

/* ---------- La ligne du titre des vues Week, Month, Year ----------
   « October 2026 »  [This month] [palette] [‹] [›]  (boutons 32 × 32, Y 156) */
.contenu[data-vue="week"],
.contenu[data-vue="month"],
.contenu[data-vue="year"] { padding-top: 12px; }
.ligne-titre {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.titre-periode {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- La vue Week ----------
   1 heure = var(--h) (30 px sans zoom), 1 jour = var(--col) (64 px pour 5 jours) */
.contenu[data-vue="week"] {
  padding-inline-start: 0;
  padding-inline-end: 0;
  padding-bottom: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.vue-semaine { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vue-semaine .ligne-titre { flex-shrink: 0; padding: 0 16px; }
.semaine-defile {
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;        /* deux doigts = notre zoom, pas celui de la page */
  scrollbar-width: none;
}
.semaine-defile::-webkit-scrollbar { display: none; }
.semaine-grille {
  display: grid;
  grid-template-columns: 54px calc(var(--col) * var(--n)) 15px;
  grid-template-rows: var(--entete) auto;
  width: max-content;
  min-width: 100%;
}
/* L'en-tête reste en haut, les heures restent à gauche */
.sem-coin, .sem-entete, .sem-entete-fin { position: sticky; top: 0; z-index: 3; background: var(--blanc); }
.sem-coin { grid-area: 1 / 1; inset-inline-start: 0; z-index: 4; }
.sem-entete { grid-area: 1 / 2; }
.sem-entete-fin { grid-area: 1 / 3; }
.sem-heures { grid-area: 2 / 1; position: sticky; inset-inline-start: 0; z-index: 2; background: var(--blanc); }
.sem-corps { grid-area: 2 / 2; position: relative; }

/* « Mon 12 » ; aujourd'hui dans un rectangle vert (60 × 28, arrondi 8) */
.sem-jour {
  position: absolute;
  top: 4px;
  width: var(--col);
  height: 28px;
  display: grid;
  place-items: center;
  isolation: isolate;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.sem-jour.etroit { font-size: 11px; }
.sem-jour.aujourdhui::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(60px, calc(var(--col) - 4px));
  height: 28px;
  transform: translateX(-50%);
  border: var(--contour);
  border-radius: 8px;
  background: var(--vert);
  z-index: -1;
}
/* Les événements « All day » (petites étiquettes sous le jour) */
.sem-puce {
  position: absolute;
  width: calc(var(--col) - 5px);
  height: 16px;
  padding: 0 3px;
  border: 1.5px solid var(--noir);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sem-plus { background: var(--blanc); }
.sem-heure {
  position: absolute;
  inset-inline-start: 16px;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  color: var(--gris-texte);
}
.sem-ligne { position: absolute; inset-inline-start: 0; inset-inline-end: -1px; height: 2px; background: var(--gris-lignes); }
.sem-colonne { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gris-lignes); }
/* Un cours : sa couleur, un contour noir, arrondi 6 */
.sem-bloc {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  border: var(--contour);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
}
.sem-texte { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sem-bloc.court { font-size: 10px; border-radius: 5px; }
.semaine-grille.etroite .sem-bloc { font-size: 10px; padding: 0 1px; }
.sem-bloc.nouvelle, .sem-puce.nouvelle { animation: flash-bloc 1.8s ease-out; }
@keyframes flash-bloc {
  0%, 40% { box-shadow: 0 0 0 5px var(--vert-pale); }
  100%    { box-shadow: 0 0 0 0 transparent; }
}
/* Le trait corail de « maintenant » */
.sem-maintenant { position: absolute; z-index: 2; width: var(--col); height: 2px; background: var(--corail); pointer-events: none; }
.sem-maintenant::before {
  content: "";
  position: absolute;
  inset-inline-start: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--corail);
}

/* ---------- La vue Month ---------- */
.mois-noms-jours {
  margin-top: 4px;
  height: 20px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  text-align: center;
  font-size: 11px;
  color: var(--gris-texte);
}
.mois-grille { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 52px; }
.mois-jour {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}
.mois-numero {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.mois-jour.aujourdhui .mois-numero { background: var(--vert); border: var(--contour); font-weight: 700; }
.mois-jour.choisi:not(.aujourdhui) .mois-numero { border: var(--contour); }
.mois-points { display: flex; gap: 4px; height: 6px; margin-top: -1px; }
.mois-point { width: 6px; height: 6px; border-radius: 50%; }
.mois-jour.nouvelle .mois-numero { animation: flash 1.8s ease-out; }
.mois-titre-jour { margin: 20px 0 7px; }

/* La pile de cartes : la carte du jour, et celles d'après qui dépassent en dessous */
.pile { display: flex; align-items: flex-start; }
.pile-cartes { position: relative; flex: 1; min-width: 0; touch-action: pan-x; }
.pile-cartes.deux { padding-bottom: 6px; }
.pile-cartes.trois { padding-bottom: 12px; }
.pile-cartes .carte { position: relative; z-index: 1; }
.pile-fantome {
  position: absolute;
  height: 64px;
  border: var(--contour);
  border-radius: 16px;
  background: var(--blanc);
}
.pile-fantome.niveau-1 { inset-inline-start: 6px; inset-inline-end: 6px; top: 6px; }
.pile-fantome.niveau-2 { inset-inline-start: 12px; inset-inline-end: 12px; top: 12px; }
.pile .jour-vide { flex: 1; padding: 16px 8px; }
.pile-points { width: 24px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding-top: 11px; }
.pile-point { width: 18px; height: 12px; display: grid; place-items: center; }
.pile-point::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #C4C9C6; }
.pile-point.actif::before { background: var(--vert); }

/* ---------- La vue Year (12 petits mois, comme ton SVG) ---------- */
.annee-grille { position: relative; height: 414px; margin-top: 12px; }
.annee-mois {
  position: absolute;
  width: 111px;
  height: 100px;
  display: flex;                    /* un bouton centre son contenu : ici on le veut en haut */
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  text-align: start;
}
.annee-nom { display: block; height: 18.6px; font-size: 11px; font-weight: 600; line-height: 13px; white-space: nowrap; }
.annee-jours { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 13px; }
.annee-jour {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  font-size: 8px;
  line-height: 1;
}
.annee-jour.weekend { color: var(--gris-perso); }
/* Le rond (13 px) : vert plein pour aujourd'hui, un anneau de couleur pour le reste */
.annee-jour.marque::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--couleur-rond, var(--noir));
  border-radius: 50%;
  z-index: -1;
}
.annee-jour.aujourdhui { color: var(--noir); font-weight: 700; }
.annee-jour.aujourdhui::before { background: var(--vert); border-color: var(--noir); }
.annee-jour.nouvelle::before { animation: rond-flash .9s ease-out 2; }
@keyframes rond-flash {
  0%   { transform: translate(-50%, -50%) scale(2); opacity: .2; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ---------- 7. La barre pour ajouter (Y 636, 358 × 48) ---------- */
.zone-ajout {
  flex-shrink: 0;
  position: relative;
  padding: 0 16px;
  margin-bottom: 16px;
  transition: margin-bottom .25s ease;
}
.barre-ajout { display: flex; gap: 8px; }
.champ {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: var(--contour);
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  background: var(--blanc);
  outline: none;
}
.champ::placeholder { color: var(--gris-clair); opacity: 1; }
.champ:focus { box-shadow: 0 0 0 3px var(--vert-pale); }
.bouton-carre {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: var(--contour);
  border-radius: 12px;
  background: var(--blanc);
  display: grid;
  place-items: center;
  font-size: 24px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.bouton-carre.vert { background: var(--vert); }
/* Pendant que tu parles, le micro « respire » */
.bouton-carre.ecoute { animation: respire 1.1s ease-in-out infinite; }
@keyframes respire {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 158, 143, .45); }
  50%      { box-shadow: 0 0 0 8px rgba(31, 158, 143, 0); }
}

/* La bulle de Yalla, juste au-dessus de la barre */
.bulle {
  position: absolute;
  inset-inline-start: 16px;
  inset-inline-end: 16px;
  bottom: calc(100% + 8px);
  z-index: 10;
  padding: 10px 14px;
  border: var(--contour);
  border-radius: 12px;
  background: var(--blanc);
  font-size: 13px;
  line-height: 1.35;
  animation: apparait .2s ease-out;
}
.bulle b { font-weight: 600; }
.bulle-boutons { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.bulle-boutons:not(:empty) { margin-top: 8px; }
.bulle-boutons button {
  min-height: 30px;
  padding: 5px 12px;
  line-height: 1.25;
  max-width: 100%;
  border: var(--contour);
  border-radius: 8px;
  background: var(--blanc);
  font-size: 13px;
  font-weight: 600;
}
.bulle-boutons button.vert { background: var(--vert); }
@keyframes apparait { from { opacity: 0; transform: translateY(6px); } }

/* ---------- 8. La roue (trait à Y 700, roue à Y 722) ---------- */
.roue {
  flex-shrink: 0;
  height: 144px;
  border-top: var(--contour);
  padding-top: 20px;
  transition: margin-bottom .25s ease;
}
.roue-groupe { position: relative; width: 242px; height: 75px; margin: 0 auto; }
/* Chaque catégorie a une place (data-slot) : -2 et 2 aux bords (22 px),
   -1 et 1 à côté (28 px), 0 au milieu dans le rond vert (56 × 56, 31 px).
   Quand on change d'onglet, elles glissent toutes vers leur nouvelle place. */
.categorie {
  position: absolute;
  top: 6px;                         /* centre des icônes à 28 px */
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--gris-clair);
  font-size: 28px;
  transition: left .3s ease, right .3s ease, top .3s ease, width .3s ease, height .3s ease, font-size .3s ease, color .3s ease;
}
.categorie .ti { position: relative; }   /* l'icône reste devant le rond */
.categorie[data-slot="-2"] { inset-inline-start: -11px; font-size: 22px; }
.categorie[data-slot="-1"] { inset-inline-start: 39px; }
.categorie[data-slot="0"]  { inset-inline-start: 93px; top: 0; width: 56px; height: 56px; font-size: 31px; color: var(--noir); }
.categorie[data-slot="1"]  { inset-inline-start: 159px; }
.categorie[data-slot="2"]  { inset-inline-start: 209px; font-size: 22px; }
.roue-rond {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--vert);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .3s ease, transform .3s ease;
}
.categorie[data-slot="0"] .roue-rond { opacity: 1; transform: none; }
/* Celle qui passe d'un bord à l'autre ne traverse pas la roue : elle réapparaît */
.categorie.saute { transition: none; }
.nom-categorie {
  position: absolute;
  left: 121px;
  top: 60px;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}
/* Quand tu fais défiler vers le bas, la roue se cache et la barre descend */
.ecran.sans-roue .roue { margin-bottom: -144px; }
.ecran.sans-roue .zone-ajout { margin-bottom: calc(16px + env(safe-area-inset-bottom)); }

/* ---------- 9. Le menu Day / Week / Month / Year ---------- */
.voile-menu {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, .12);
}
.menu-vue {
  position: absolute;
  inset-inline-start: 16px;
  top: calc(max(60px, env(safe-area-inset-top) + 16px) + 90px);   /* 6 px sous le bouton */
  z-index: 32;
  width: 96px;
  padding: 4px;
  border: var(--contour);
  border-radius: 12px;
  background: var(--blanc);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: apparait .15s ease-out;
}
.option-vue {
  height: 30px;
  border: var(--contour);
  border-radius: 8px;
  background: var(--blanc);
  font-size: 14px;
}
.option-vue.choisie { background: var(--vert); font-weight: 600; }

/* ---------- 10. Les fiches (événement et plan) ---------- */
.voile {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, .25);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s .25s;
}
.voile.visible { opacity: 1; visibility: visible; transition: opacity .25s ease; }

.fiche {
  position: absolute;
  inset-inline-start: 16px;
  inset-inline-end: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  max-height: calc(100% - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 14px 22px;
  border: var(--contour);
  border-radius: 20px;
  background: var(--blanc);
  visibility: hidden;
  transform: translateY(calc(100% + 40px));
  transition: transform .28s ease, visibility 0s .28s;
  scrollbar-width: none;
}
.fiche::-webkit-scrollbar { display: none; }
.fiche.ouverte { visibility: visible; transform: none; transition: transform .28s ease; }
.fiche.glisse { transition: none; }              /* pendant que le doigt tire la fiche */

/* Le haut de la fiche : on peut le tirer vers le bas pour fermer */
.fiche-haut {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 22px;
  background: var(--blanc);
  touch-action: none;
  cursor: grab;
}
.poignee {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 2px;
  background: var(--gris-tres-clair);
}
.fiche-entete { display: flex; align-items: flex-start; gap: 8px; min-height: 32px; }
.pastille {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 6px;                  /* centrée sur la 1re ligne du titre */
  border: var(--contour);
  border-radius: 6px;
}
.fiche-titre {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
  font-size: 20px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.bouton-fermer {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  align-self: flex-start;
  border: var(--contour);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.fiche-infos { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.fiche-infos li { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 14px; }
.fiche-infos .ti { width: 20px; flex-shrink: 0; font-size: 20px; text-align: center; }

.petit-titre {
  display: block;
  margin-top: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--gris-texte);
}
/* La case (326 × 96) : le texte en haut, le compteur 0/200 en bas à droite */
.zone-description {
  margin-top: 8px;
  height: 96px;
  border: var(--contour);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.zone-description:focus-within { box-shadow: 0 0 0 3px var(--vert-pale); }
.zone-description textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 10px 12px 0;
  border: 0;
  border-radius: 12px 12px 0 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  outline: none;
}
.zone-description textarea::placeholder { color: var(--gris-clair); opacity: 1; }
.compteur {
  align-self: flex-end;
  padding: 2px 10px 6px;
  font-size: 12px;
  line-height: 14px;
  color: var(--gris-clair);
}
.compteur.presque-plein { color: var(--corail); font-weight: 600; }
.fiche-note { margin-top: 8px; font-size: 12px; line-height: 1.35; color: var(--gris-texte); }

/* L'interrupteur « Show in Year view » (48 × 28) */
.ligne-interrupteur {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}
.interrupteur {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  border: var(--contour);
  border-radius: 14px;
  background: var(--gris-tres-clair);
  transition: background .2s ease;
}
.interrupteur .bouton-rond {
  position: absolute;
  inset-inline-start: 2px;
  top: 2px;
  width: 20px;
  height: 20px;
  border: var(--contour);
  border-radius: 50%;
  background: var(--blanc);
  transition: transform .2s ease;
}
.interrupteur[aria-checked="true"] { background: var(--vert); }
.interrupteur[aria-checked="true"] .bouton-rond { transform: translateX(20px); }

.bouton-supprimer {
  margin-top: 20px;
  width: 100%;
  height: 44px;
  border: var(--contour);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--corail);
}
.bouton-supprimer .ti { font-size: 18px; }

/* Le plan de révision */
.plan-intro { margin-top: 4px; }
.plan-evaluation { margin-top: 20px; }
.plan-evaluation .petit-titre { margin-top: 0; }
.plan-seances { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.seance {
  padding: 10px 12px;
  border: var(--contour);
  border-radius: 12px;
}
.seance-quand { font-size: 14px; font-weight: 600; }
.seance-quoi  { margin-top: 3px; font-size: 13px; color: var(--gris-texte); }
.seance-note  { margin-top: 3px; font-size: 12px; color: var(--gris-texte); }
.seance.impossible .seance-quoi { color: var(--corail); }
.bouton-vert {
  margin-top: 20px;
  width: 100%;
  height: 48px;
  border: var(--contour);
  border-radius: 12px;
  background: var(--vert);
  font-size: 15px;
  font-weight: 600;
}
.bouton-vert:disabled { opacity: .5; cursor: default; }

/* ---------- La palette de couleurs (480 px maximum, puis elle défile) ---------- */
.fiche-palette { max-height: min(480px, calc(100% - 120px)); }
.palette-section { margin-top: 16px; }
.palette-ligne { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.palette-ligne .pastille { margin-top: 0; }
.pastille.rond { border-radius: 50%; }
.palette-nom { flex: 1; min-width: 0; font-size: 14px; }
.palette-ligne .bouton-fleche .ti { font-size: 18px; }
.palette-choix { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 4px 12px; padding-inline: 28px 0; }
.palette-couleur { width: 26px; height: 26px; border: var(--contour); border-radius: 50%; }
.palette-couleur.choisie { box-shadow: 0 0 0 2px var(--blanc), 0 0 0 4px var(--noir); }

/* ---------- La page « Connect a calendar » (elle glisse depuis la droite) ---------- */
.page {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--blanc);
  transform: translateX(100%);
  transition: transform .25s ease;
}
.page.ouverte { transform: none; }
/* Même place que l'en-tête MIRA : Y 60, hauteur 44 ; le titre est centré */
.page-entete {
  flex-shrink: 0;
  height: calc(max(60px, env(safe-area-inset-top) + 16px) + 44px);
  padding: max(60px, calc(env(safe-area-inset-top) + 16px)) 16px 0;
  display: flex;
  align-items: center;
}
.bouton-retour, .page-vide { width: 44px; height: 44px; flex-shrink: 0; }
.bouton-retour { display: grid; place-items: center; font-size: 24px; }
.page-titre { flex: 1; text-align: center; font-size: 20px; font-weight: 700; }
.page-defile {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom));
  scrollbar-width: none;
}
.page-defile::-webkit-scrollbar { display: none; }

.carte-info {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border: var(--contour);
  border-radius: 16px;
}
.carte-info > .ti { font-size: 20px; margin-top: 1px; }
.carte-info-titre { font-size: 15px; font-weight: 700; }
.carte-info-texte { margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--gris-texte); }

.champ-titre { display: block; margin-top: 20px; font-size: 13px; font-weight: 600; }
.champ-lien { display: block; width: 100%; margin-top: 8px; flex: none; }
.message-lien { margin-top: 8px; font-size: 13px; line-height: 1.35; color: var(--corail); }
.message-lien.reussi { color: var(--vert); font-weight: 600; }
#boutonConnecter { margin-top: 12px; }

.titre-section { margin-top: 28px; margin-bottom: 8px; }
/* Les 4 blocs qui s'ouvrent : Google Calendar, Outlook, Apple iCloud, My school */
.accordeon {
  margin-top: 8px;
  border: var(--contour);
  border-radius: 16px;
}
.accordeon summary {
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.accordeon summary::-webkit-details-marker { display: none; }
.accordeon summary .ti { font-size: 20px; transition: transform .2s ease; }
.accordeon[open] summary .ti { transform: rotate(90deg); }   /* chevron-right → chevron-down */
.accordeon ol, .ecole-etapes {
  margin: -4px 0 0;
  padding-block: 0 16px; padding-inline: 34px 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gris-texte);
}
#contenuEcole { padding: 0 16px 16px; font-size: 13px; line-height: 1.45; color: var(--gris-texte); }
#contenuEcole .ecole-etapes { padding-block: 6px 0; padding-inline: 18px 0; margin: 0; }
.ecole-app b { color: var(--noir); text-transform: uppercase; }
.lien-texte { padding: 0; font-size: 13px; color: var(--noir); text-decoration: underline; text-underline-offset: 2px; }
.ecole-note { margin-top: 6px; }
.ecole-choix { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ecole-choix button {
  height: 32px;
  padding: 0 10px;
  border: var(--contour);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--noir);
}
.ecole-choix button.choisie { background: var(--vert); }
.ecole-photo { margin-top: 12px; }

/* Tes calendriers */
.calendriers-vide {
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--gris-clair);
  border-radius: 16px;
  font-size: 13px;
  color: var(--gris-texte);
}
.calendriers-exemple { margin-top: 8px; font-size: 12px; line-height: 1.35; color: var(--gris-texte); }
.carte-calendrier {
  margin-top: 8px;
  min-height: 60px;
  padding-block: 10px 10px; padding-inline: 14px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: var(--contour);
  border-radius: 16px;
}
.carte-calendrier > .ti { font-size: 22px; flex-shrink: 0; }
.carte-calendrier-textes { flex: 1; min-width: 0; }
.carte-calendrier-nom { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-calendrier-infos { margin-top: 2px; font-size: 12px; color: var(--gris-texte); }
.carte-calendrier-infos.erreur { color: var(--corail); }
.bouton-retirer {
  height: 32px;
  min-width: 32px;
  padding: 0 6px;
  border: var(--contour);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.bouton-retirer.confirmer { padding: 0 10px; background: var(--corail); font-size: 13px; font-weight: 600; }

.note-cadenas {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--gris-texte);
}
.note-cadenas .ti { font-size: 18px; flex-shrink: 0; }

/* « YOUR CALENDARS ·········· ↻ Refresh » */
.ligne-calendriers { display: flex; align-items: center; justify-content: space-between; }
.ligne-calendriers .petit-titre { margin: 0; }
.bouton-actualiser { display: flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.bouton-actualiser .ti { font-size: 16px; }
.bouton-actualiser.tourne .ti { animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ---------- L'onglet Study (board study, 390 × 844) ---------- */
.ecran.onglet-study .barre-vue { display: none; }       /* pas de bouton Day › dans Study */
.contenu[data-vue="study"] { padding-top: 8px; }         /* la carte verte à Y 112 */

/* La carte verte (358 × 92) : le titre, la barre, « Next: … » et le bouton Pace */
.carte-study { min-height: 92px; padding-block: 17px 9px; padding-inline: 14px 98px; }
.carte-study .bouton-plan { top: 26px; }
.barre-progres {
  margin-top: 8px;
  width: 100%;
  max-width: 226px;
  height: 10px;
  border: var(--contour);
  border-radius: 5px;
  background: var(--blanc);
  overflow: hidden;
}
.barre-progres span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--noir);
  transition: width .4s ease;
}
.carte-study .carte-mira-sous-titre { margin-top: 6px; }

.titre-study { margin: 20px 0 8px; }                     /* TODAY à Y 224, COMING UP à Y 402 */

/* Une séance : on touche la carte pour la déplacer, le rond pour la cocher */
.carte-seance .carte-titre,
.carte-seance .carte-details { inset-inline-end: 56px; }
.carte-seance > span { pointer-events: none; }
.carte-clic { position: absolute; inset: 0; border-radius: 14px; }
.coche {
  position: absolute;
  inset-inline-end: 14px;
  top: 16px;
  width: 28px;
  height: 28px;
  border: var(--contour);
  border-radius: 50%;
  background: var(--blanc);
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: background .2s ease;
}
.coche .ti { opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .2s ease; }
.coche.faite { background: var(--vert); }
.coche.faite .ti { opacity: 1; transform: none; }
.carte-seance.faite .carte-titre { color: var(--gris-texte); text-decoration: line-through; }

/* COMING UP : la couleur de la matière, le contrôle, « Thu, Oct 22 · 1/3 sessions », › */
.carte-avenir .pastille { position: absolute; inset-inline-start: 14px; top: 20px; margin: 0; }
.carte-avenir .carte-titre,
.carte-avenir .carte-details { inset-inline-start: 46px; inset-inline-end: 40px; }
.carte-avenir .chevron { position: absolute; inset-inline-end: 14px; top: 20px; font-size: 20px; }

.bouton-semaine { margin-top: 16px; }                    /* Plan my week à Y 576 */

/* ---------- Les fiches Pace et Move ---------- */
.fiche-pace, .fiche-move { padding: 0 18px 22px; }
.pace-intro, .move-sous-titre { margin-top: 4px; font-size: 13px; }
.pace-note { margin-top: 4px; }
.pace-groupe { margin-top: 8px; }
/* « Time to get home   [−] 30 min [+] » (48 px de haut) */
.pace-ligne {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pace-nom { flex: 1; min-width: 0; font-size: 14px; }
.pace-bouton {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: var(--contour);
  border-radius: 10px;
  background: var(--blanc);
  display: grid;
  place-items: center;
  font-size: 18px;
}
.pace-bouton:disabled { opacity: .35; cursor: default; }
.pace-valeur { width: 76px; text-align: center; font-size: 15px; font-weight: 600; white-space: nowrap; }
/* Le jour off : 7 ronds (36 px), le jour choisi en vert */
.jours-off { margin-top: 8px; display: flex; justify-content: space-between; }
.jour-off {
  width: 36px;
  height: 36px;
  border: var(--contour);
  border-radius: 50%;
  background: var(--blanc);
  font-size: 14px;
  font-weight: 600;
}
.jour-off[aria-pressed="true"] { background: var(--vert); }
#paceFini { margin-top: 24px; }

/* La fiche Move (358 × 432) : 3 créneaux de 56 px, puis Pick another time et Skip */
.fiche-move .petit-titre { margin-top: 18px; }
.creneaux { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.creneaux-vide { padding: 8px 0; font-size: 13px; line-height: 1.35; color: var(--gris-texte); }
.creneau {
  position: relative;
  height: 56px;
  padding-block: 0 0; padding-inline: 14px 40px;
  border: var(--contour);
  border-radius: 12px;
  background: var(--blanc);
  text-align: start;
}
.creneau-quand { display: block; font-size: 15px; font-weight: 600; }
.creneau-raison { display: block; margin-top: 3px; font-size: 12px; color: var(--gris-texte); }
.creneau-quand, .creneau-raison { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creneau .ti { position: absolute; inset-inline-end: 10px; top: 16px; font-size: 20px; }
.creneau:active, .carte-avenir:active, .carte-clic:active { background: var(--vert-pale); }
.bouton-blanc {
  margin-top: 16px;
  width: 100%;
  height: 48px;
  border: var(--contour);
  border-radius: 12px;
  background: var(--blanc);
  font-size: 15px;
  font-weight: 600;
}
.move-choix { margin-top: 16px; display: flex; gap: 8px; }
.move-choix .champ { padding: 0 10px; }
.move-heure { flex: 0 0 104px; }
.lien-sauter {
  display: block;
  margin: 20px auto 0;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--corail);
}

/* ---------- La bulle quand l'IA réfléchit ---------- */
.reflexion span { animation: clignote 1.2s infinite; }
.reflexion span:nth-child(2) { animation-delay: .2s; }
.reflexion span:nth-child(3) { animation-delay: .4s; }
@keyframes clignote { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
.note-ia { font-size: 12px; color: var(--gris-texte); }

/* =============================================================
   La page d'une séance (seance.js) : Your lesson, Summary, Quiz, Questions
   (mêmes mesures que tes boards Penpot session-…)
   ============================================================= */
.ecran.seance-ouverte .voile { z-index: 75; }       /* la fiche « Paste your lesson » passe devant la page */
.fiche-texte { z-index: 80; }
.zone-lecon { min-height: 220px; margin-top: 12px; }
.seance-defile { padding: 8px 16px 24px; }          /* la carte de la séance à Y 112 */
.seance-pied { flex-shrink: 0; display: flex; gap: 8px; padding: 12px 16px calc(40px + env(safe-area-inset-bottom)); background: var(--blanc); }
.seance-pied:empty { display: none; }
.bouton-pied {
  flex: 1; min-width: 0; height: 48px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: var(--contour); border-radius: 12px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.bouton-pied .ti { font-size: 20px; }
.bouton-pied.blanc { background: var(--blanc); }
.bouton-pied.vert { background: var(--vert); }
.bouton-pied.etroit { flex: 0 0 110px; }
.bouton-pied.moyen { flex: 0 0 136px; }
.bouton-pied.large { flex: 0 0 172px; }
.bouton-pied:disabled { opacity: .4; cursor: default; }
.bulle-seance { bottom: calc(108px + env(safe-area-inset-bottom)); z-index: 5; }

/* La carte de la séance (texte centré et pastille ronde, comme ton design) */
.seance-haut { position: relative; height: 64px; padding: 0 52px; border: var(--contour); border-radius: 16px; background: var(--blanc); text-align: center; }
.seance-haut .pastille { position: absolute; inset-inline-start: 14px; top: 20px; margin: 0; border-radius: 50%; }
.seance-haut-titre { display: block; padding-top: 9px; font-size: 16px; font-weight: 600; }
.seance-haut-details { display: block; margin-top: 4px; font-size: 13px; color: var(--gris-texte); }
.seance-haut-titre, .seance-haut-details { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seance-move { position: absolute; inset-inline-end: 4px; top: 8px; width: 44px; height: 44px; display: grid; place-items: center; font-size: 20px; }

/* Summary */
.seance-source { margin-top: 12px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gris-texte); }
.seance-source .ti { font-size: 16px; }
.seance-idee { margin-top: 8px; padding: 12px 14px; border: var(--contour); border-radius: 16px; background: var(--vert-pale); font-size: 15px; line-height: 1.3; }
.seance-idee b, .seance-points b { font-weight: 600; }
.seance-points { margin-top: 8px; }
.seance-points li { position: relative; padding-inline-start: 20px; font-size: 15px; line-height: 1.3; }
.seance-points li + li { margin-top: 8px; }
.seance-points li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--noir); }
.mots-cles { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.mot-cle { height: 32px; padding: 0 12px; display: inline-flex; align-items: center; border: var(--contour); border-radius: 16px; font-size: 13px; font-weight: 600; }

/* Your lesson */
.lecon-intro { margin-top: 20px; font-size: 15px; line-height: 1.3; }
.lecon-erreur { margin-top: 12px; padding: 10px 14px; border: var(--contour); border-radius: 12px; background: #FBD9CF; font-size: 13px; line-height: 1.35; }
.option-lecon { position: relative; display: block; width: 100%; height: 64px; margin-top: 8px; padding-block: 0 0; padding-inline: 56px 14px; border: var(--contour); border-radius: 16px; background: var(--blanc); text-align: start; }
.option-lecon .ti { position: absolute; inset-inline-start: 16px; top: 18px; font-size: 24px; }
.option-titre { display: block; font-size: 16px; font-weight: 600; }
.option-sous-titre { display: block; margin-top: 2px; font-size: 13px; color: var(--gris-texte); }
.option-lecon:active { background: var(--vert-pale); }
.separateur-ou { margin-top: 20px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--gris-texte); }
.separateur-ou span:empty { flex: 1; height: 2px; background: var(--gris-tres-clair); }
.champ-chapitre { display: block; width: 100%; margin-top: 8px; flex: none; }
.lecon-note { margin-top: 10px; display: flex; gap: 6px; font-size: 12px; line-height: 1.35; color: var(--gris-texte); }
.lecon-note .ti { flex: none; font-size: 16px; margin-top: 1px; }
.bouton-icone { display: flex; align-items: center; justify-content: center; gap: 8px; }
.bouton-icone .ti { font-size: 20px; }

/* Yalla lit ta leçon… (le logo cligne des yeux) */
.chargement { margin-top: 64px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.chargement-logo { width: 96px; height: 96px; animation: flotte 2.4s ease-in-out infinite; }
.chargement-yeux { transform-box: fill-box; transform-origin: center; animation: cligne 3s infinite; }
@keyframes cligne { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.chargement-titre { margin-top: 20px; font-size: 17px; font-weight: 600; }
.chargement-texte { margin-top: 6px; font-size: 13px; color: var(--gris-texte); }

/* Quiz */
.quiz-progres { margin-top: 16px; }
.quiz-numero { font-size: 14px; font-weight: 600; color: var(--gris-texte); }
.seance-barre { max-width: none; }
.quiz-question { margin-top: 20px; min-height: 84px; padding: 16px; border: var(--contour); border-radius: 16px; font-size: 18px; font-weight: 600; line-height: 1.25; }
.quiz-reponses { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.reponse { min-height: 56px; padding: 8px 14px; display: flex; align-items: center; gap: 12px; border: var(--contour); border-radius: 12px; background: var(--blanc); text-align: start; font-size: 16px; line-height: 1.25; }
.reponse:disabled { cursor: default; color: var(--noir); }
.reponse:not(:disabled):active { background: var(--vert-pale); }
.lettre { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--blanc); font-size: 13px; font-weight: 600; }
.reponse-texte { flex: 1; min-width: 0; }
.icone-verdict { flex: none; font-size: 24px; }
.reponse.juste { background: var(--vert-pale); }
.reponse.juste .icone-verdict { color: var(--vert); }
.reponse.faux { background: #FBD9CF; }
.reponse.faux .icone-verdict { color: var(--corail); }
.quiz-explication { margin-top: 20px; padding: 14px 16px; border: var(--contour); border-radius: 16px; background: var(--blanc); }
.explication-titre { font-size: 15px; font-weight: 600; }
.explication-texte { margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--gris-texte); }
.quiz-explication.faux .explication-titre { color: #C4482C; }
.quiz-explication.juste .explication-titre { color: #12695F; }

/* Le score */
.score-rond { width: 160px; height: 160px; margin: 24px auto 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border: var(--contour); border-radius: 50%; }
.score-rond.bien { background: var(--vert-pale); }
.score-rond.moyen { background: #FCEFC7; }
.score-rond.revoir { background: #FBD9CF; }
.score-nombre { font-size: 40px; font-weight: 700; line-height: 1.1; }
.score-mot { font-size: 14px; color: var(--gris-texte); }
.score-titre { margin-top: 24px; text-align: center; font-size: 22px; font-weight: 700; }
.score-texte { margin-top: 8px; text-align: center; font-size: 15px; line-height: 1.35; color: var(--gris-texte); white-space: pre-line; }
.erreur { position: relative; margin-top: 8px; min-height: 64px; padding-block: 10px 10px; padding-inline: 50px 14px; border: var(--contour); border-radius: 16px; background: var(--blanc); }
.erreur .ti { position: absolute; inset-inline-start: 14px; top: 18px; font-size: 24px; color: var(--corail); }
.erreur-question { font-size: 15px; font-weight: 600; line-height: 1.25; }
.erreur-reponse { margin-top: 3px; font-size: 13px; line-height: 1.3; color: var(--gris-texte); }

/* Questions */
.consigne { margin-top: 36px; min-height: 20px; text-align: center; font-size: 15px; line-height: 1.35; color: var(--gris-texte); }
.gros-micro { width: 120px; height: 120px; margin: 32px auto 0; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--vert); font-size: 48px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.gros-micro.ecoute { animation: respire 1.1s ease-in-out infinite; }
.micro-legende { margin-top: 16px; text-align: center; font-size: 14px; font-weight: 600; color: var(--gris-texte); }
.zone-reponse { display: block; width: 100%; min-height: 110px; margin-top: 16px; padding: 10px 12px; border: var(--contour); border-radius: 12px; font-size: 15px; line-height: 1.4; resize: vertical; outline: none; background: var(--blanc); }
.zone-reponse:focus { box-shadow: 0 0 0 3px var(--vert-pale); }
.zone-reponse::placeholder { color: var(--gris-clair); }
.ta-reponse { position: relative; margin-top: 8px; min-height: 72px; padding-block: 12px 12px; padding-inline: 42px 14px; border: var(--contour); border-radius: 16px; background: var(--blanc); font-size: 15px; line-height: 1.3; }
.ta-reponse .ti { position: absolute; inset-inline-start: 14px; top: 13px; font-size: 20px; color: var(--gris-texte); }
.correction { position: relative; margin-top: 16px; padding-block: 14px 14px; padding-inline: 48px 16px; border: var(--contour); border-radius: 16px; }
.correction .ti { position: absolute; inset-inline-start: 14px; top: 13px; font-size: 24px; }
.correction.juste { background: var(--vert-pale); }
.correction.juste .ti, .correction.juste .explication-titre { color: #12695F; }
.correction.presque { background: #FCEFC7; }
.correction.presque .ti, .correction.presque .explication-titre { color: #8A6400; }
.correction.faux { background: #FBD9CF; }
.correction.faux .ti, .correction.faux .explication-titre { color: #C4482C; }
/* Dans la fiche du plan : une séance qu'on peut ouvrir */
.seance-ouvrable { position: relative; display: block; width: 100%; text-align: start; background: var(--blanc); padding-inline-end: 40px; }
.seance-ouvrable .ti { position: absolute; inset-inline-end: 12px; top: 50%; margin-top: -10px; font-size: 20px; }
.seance-ouvrable:active { background: var(--vert-pale); }
/* Un gros PDF : Yalla demande avant de le lire */
.confirmation { margin-top: 24px; padding-block: 18px 18px; padding-inline: 56px 16px; position: relative; border: var(--contour); border-radius: 16px; background: #FCEFC7; }
.confirmation .ti { position: absolute; inset-inline-start: 16px; top: 18px; font-size: 26px; }
.confirmation-titre { font-size: 16px; font-weight: 600; }
.confirmation-texte { margin-top: 6px; font-size: 14px; line-height: 1.35; color: var(--gris-texte); }
.seance-changer { margin-inline-start: auto; font-size: 12px; font-weight: 600; }

/* =============================================================
   L'inscription (inscription.js) : Bienvenue, compte, école, classe, calendrier, rythme
   (mêmes mesures que tes boards Penpot welcome, signup-…)
   ============================================================= */
.inscription { position: absolute; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--blanc); }
.page.au-dessus { z-index: 95; }                  /* « Connect a calendar » ouvert depuis l'inscription */
.inscription-progres { flex-shrink: 0; padding: 16px 16px 0; }
.inscription-corps { padding: 8px 16px 24px; }
.inscription[data-etape="bienvenue"] .inscription-corps,
.inscription[data-etape="pret"] .inscription-corps { padding-top: 0; }
.inscription-pied { flex-shrink: 0; display: flex; flex-direction: column; gap: 18px; padding: 12px 16px calc(84px + env(safe-area-inset-bottom)); }
.gros-bouton { height: 56px; border: var(--contour); border-radius: 14px; background: var(--vert); font-size: 17px; font-weight: 600; }
.gros-bouton.blanc { background: var(--blanc); }
.gros-bouton:disabled { opacity: .4; cursor: default; }
.lien-centre { align-self: center; padding: 0 8px; font-size: 14px; font-weight: 600; color: var(--gris-texte); }

/* Le visage de Yalla : il cligne des yeux, regarde, se cache les yeux */
.visage-mira { margin: 0 auto; flex-shrink: 0; }
.visage-mira svg { display: block; width: 100%; height: 100%; overflow: visible; }
.visage-yeux { transition: transform .25s ease; }
.visage-yeux rect { transform-box: fill-box; transform-origin: center; animation: cligne 4s infinite; }
.visage-mira.regarde .visage-yeux { transform: translate(var(--x, 0px), 5px); }
.visage-mira .main { transition: transform .45s cubic-bezier(.3, 1.35, .5, 1); transform-box: view-box; }
.visage-mira .main-gauche { transform-origin: 10px 125px; transform: translateY(125px) rotate(-10deg); }   /* les mains attendent en bas, cachées */
.visage-mira .main-droite { transform-origin: 110px 125px; transform: translateY(125px) rotate(10deg); }
.visage-mira.cache .main { transform: none; }                                                            /* 🙈 */
.visage-mira.cache.coucou .main-droite { transform: translate(4px, 34px) rotate(5deg); }                 /* elle jette un coup d'œil 👀 */
.visage-mira.cache.coucou .visage-yeux { transform: translate(4px, 1px); }
.visage-mira.non { animation: secoue .45s ease; }
@keyframes secoue { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.visage-mira.saute-joie { animation: joie .9s ease .2s 2; }
@keyframes joie { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }

/* Bienvenue (board welcome) */
.bienvenue { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: min(90px, 10vh); }
.bienvenue-titre { margin-top: 24px; font-size: 28px; font-weight: 700; }
.bienvenue-texte { margin-top: 8px; font-size: 16px; color: var(--gris-texte); }
.atouts { margin-top: 68px; align-self: stretch; text-align: start; display: flex; flex-direction: column; gap: 32px; }
.atout { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; }
.atout-rond { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--vert-pale); font-size: 24px; }
.atout-titre { font-size: 16px; font-weight: 600; }
.atout-texte { margin-top: 3px; font-size: 13px; }
.pret .bienvenue-texte { max-width: 310px; }
.pret-liste { margin-top: 32px; align-self: stretch; }

/* Les cases (signup-account) */
.inscription-question { margin-top: 20px; text-align: center; font-size: 20px; font-weight: 600; }
.inscription-texte { margin-top: 8px; font-size: 14px; line-height: 1.35; color: var(--gris-texte); text-align: center; }
.champ-groupe { margin-top: 24px; }
.champ-groupe + .champ-groupe { margin-top: 20px; }
.champ-groupe .petit-titre { margin-top: 0; }
.champ-groupe .champ { display: block; width: 100%; margin-top: 8px; flex: none; font-size: 15px; }
.zone-mot-de-passe { position: relative; }
.zone-mot-de-passe .champ { padding-inline-end: 48px; }
.bouton-oeil { position: absolute; inset-inline-end: 2px; top: 2px; width: 44px; height: 44px; display: grid; place-items: center; font-size: 20px; }
.inscription-note { margin-top: 10px; font-size: 12px; line-height: 1.35; color: var(--gris-texte); }
.inscription-erreur { margin-top: 14px; padding: 10px 14px; border: var(--contour); border-radius: 12px; background: #FBD9CF; font-size: 13px; line-height: 1.35; white-space: pre-line; }
.lien-oublie { display: block; margin: 12px 0 0 auto; font-weight: 600; }

/* Ton école : les 2 grandes cartes */
.choix-ecole { position: relative; display: block; width: 100%; min-height: 112px; margin-top: 16px; padding-block: 18px 18px; padding-inline: 60px 48px; border: var(--contour); border-radius: 16px; background: var(--blanc); text-align: start; }
.inscription-question + .choix-ecole { margin-top: 26px; }
.choix-ecole.choisi { background: var(--vert-pale); }
.choix-icone { position: absolute; inset-inline-start: 16px; top: 20px; font-size: 32px; }
.choix-titre { display: block; font-size: 18px; font-weight: 600; }
.choix-texte { display: block; margin-top: 6px; font-size: 13px; line-height: 1.3; color: var(--gris-texte); }
.choix-coche { position: absolute; inset-inline-end: 16px; top: 16px; font-size: 24px; color: var(--vert); }

/* Ta classe : les menus déroulants */
.select { position: relative; display: block; width: 100%; height: 48px; margin-top: 8px; padding-block: 0 0; padding-inline: 12px 44px; border: var(--contour); border-radius: 12px; background: var(--blanc); text-align: start; font-size: 15px; font-weight: 600; }
.select .ti { position: absolute; inset-inline-end: 14px; top: 12px; font-size: 20px; }
.select-vide { color: var(--gris-clair); font-weight: 400; }
.liste-choix { margin-top: 6px; padding: 4px; border: var(--contour); border-radius: 12px; background: var(--blanc); display: flex; flex-direction: column; gap: 4px; animation: apparait .15s ease-out; }
.option-choix { height: 36px; padding: 0 12px; border-radius: 8px; text-align: start; font-size: 15px; font-weight: 600; }
.option-choix.choisie { background: var(--vert); border: var(--contour); }

/* Ton calendrier */
.calendriers-connectes { margin-top: 12px; }
.calendrier-connecte { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.calendrier-connecte .ti { font-size: 22px; color: var(--vert); }
.inscription .inscription-texte.centre { text-align: center; }
.inscription .jours-off { margin-top: 8px; }

/* Se déconnecter (page ⚙) */
.bouton-deconnexion { margin: 24px auto 0; display: flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: #C4482C; }
.bouton-deconnexion .ti { font-size: 18px; }

/* =============================================================
   At home (cned.js) : le mode CNED / cours à distance
   ============================================================= */
/* 2 boutons côte à côte : [Every unit] [Every 2 units], [At school] [At home] */
.segment { margin-top: 8px; display: flex; gap: 8px; }
.segment button { flex: 1; height: 44px; border: var(--contour); border-radius: 12px; background: var(--blanc); font-size: 14px; font-weight: 600; }
.segment button[aria-pressed="true"] { background: var(--vert); }
.editeur-titre { margin-top: 12px; }

/* TODAY : une séance a la couleur de sa matière à gauche, une éval est corail */
.carte-lecon::before, .carte-eval::before { content: ""; position: absolute; inset-inline-start: 4px; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: var(--couleur, var(--vert)); }
.carte-eval::before { background: var(--corail); }

/* YOUR SUBJECTS : « About 3 a day to finish by Jun 14 » */
.rythme-cned { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; margin-top: -2px; text-align: start; font-size: 13px; font-weight: 600; color: var(--gris-texte); }
.rythme-point { width: 10px; height: 10px; flex-shrink: 0; border: var(--contour); border-radius: 50%; background: var(--vert); }
.rythme-cned.serre .rythme-point { background: var(--jaune); }
.rythme-cned.trop .rythme-point { background: var(--corail); }
.rythme-cned.trop { color: #C4482C; }
.rythme-texte { flex: 1; min-width: 0; }
.rythme-cned .ti { font-size: 18px; }
/* Une matière (358 × 72) : la couleur, le nom, « Unit 3 of 10 · Lesson 2/6 », la barre */
.carte-matiere { height: 72px; }
.carte-matiere .pastille { position: absolute; inset-inline-start: 14px; top: 12px; margin: 0; }
.carte-matiere .carte-titre, .carte-matiere .carte-details { inset-inline-start: 46px; inset-inline-end: 40px; }
.carte-matiere .carte-titre { top: 9px; }
.carte-matiere .carte-details { top: 31px; }
.carte-matiere .chevron { position: absolute; inset-inline-end: 14px; top: 24px; font-size: 20px; }
.carte-matiere.attente { background: #FCEFC7; }
.carte-matiere.attente .chevron { color: #8A6400; }
.carte-matiere.finie .carte-titre { color: var(--gris-texte); }
.matiere-barre { position: absolute; inset-inline-start: 46px; inset-inline-end: 40px; bottom: 11px; height: 6px; border-radius: 3px; background: var(--gris-lignes); overflow: hidden; }
.matiere-barre span { display: block; height: 100%; border-radius: 3px; background: var(--noir); }
.bouton-ajouter-matiere { margin-top: 0; display: flex; align-items: center; justify-content: center; gap: 6px; border-style: dashed; }
.bouton-ajouter-matiere .ti { font-size: 18px; }
/* Pas encore de matières : la carte « Set up my subjects » */
.carte-config .bouton-vert { margin-top: 14px; }

/* La fiche d'une matière et la fiche « Unit 3 done! » */
.matiere-barre-fiche { max-width: none; }
.champ-matiere { display: block; width: 100%; margin-top: 8px; }
.fiche-unite #uniteEvalNote { min-height: 32px; }
/* La fiche Pace : ta journée d'étude */
.pace-interrupteur { margin-top: 4px; height: 48px; }
.pace-date { cursor: pointer; }
.champ-date { width: 160px; height: 40px; flex: none; padding: 0 10px; font-size: 15px; font-weight: 600; }

/* L'inscription : tes matières (des pastilles à toucher) */
.puces { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.puce { height: 40px; padding-block: 0 0; padding-inline: 12px 14px; display: inline-flex; align-items: center; gap: 8px; border: var(--contour); border-radius: 20px; background: var(--blanc); font-size: 15px; font-weight: 600; }
.puce.choisie { background: var(--vert-pale); }
.puce-point { width: 14px; height: 14px; flex-shrink: 0; border: var(--contour); border-radius: 50%; }
.puce:not(.choisie) { color: var(--gris-texte); }
.puce:not(.choisie) .puce-point { opacity: .45; }
.ajout-matiere { margin-top: 12px; display: flex; gap: 8px; }
.ajout-matiere .champ { flex: 1; min-width: 0; height: 48px; }
/* Où tu en es : une ligne par matière, qu'on ouvre pour régler */
.liste-matieres { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.bloc-matiere { border: var(--contour); border-radius: 16px; background: var(--blanc); overflow: hidden; }
.tete-matiere { width: 100%; min-height: 64px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; text-align: start; }
.tete-matiere .pastille { margin-top: 0; }
.tete-textes { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tete-nom { font-size: 16px; font-weight: 600; }
.tete-resume { font-size: 13px; color: var(--gris-texte); }
.tete-matiere .ti { font-size: 20px; }
.bloc-matiere.ouvert .tete-matiere { background: var(--vert-pale); border-bottom: var(--contour); }
.corps-matiere { padding: 4px 14px 16px; }

/* Main subjects et nombres à vérifier */
.note-verifier { display: flex; gap: 8px; margin: 0 0 4px; padding: 10px 12px; border: var(--contour); border-radius: 12px; background: #FCEFC7; font-size: 13px; line-height: 1.35; }
.note-verifier .ti { font-size: 18px; color: #8A6400; flex-shrink: 0; }
.carte-matiere.a-verifier .carte-details { color: #C4482C; font-weight: 600; }
#matiereVerifiee { margin-top: 20px; }
#matiereVerifiee + .bouton-vert { margin-top: 10px; }

/* =============================================================
   Voice : « Coming soon » (bientot.js) — une page blanche, Yalla construit la phrase
   ============================================================= */
.ecran.onglet-bientot .barre-vue { display: none; }
.ecran.onglet-bientot .zone-ajout { visibility: hidden; }   /* une page vraiment blanche */
.vue-bientot { height: 100%; display: flex; align-items: center; justify-content: center; padding-bottom: 24px; }
.scene-bientot { position: relative; flex-shrink: 0; width: 358px; height: 150px; overflow: hidden; }
.chantier-lettre { position: absolute; font-size: 30px; font-weight: 700; line-height: 1; transform-origin: 50% 100%; will-change: transform, opacity; }
.chantier-mira, .chantier-etincelles { position: absolute; overflow: visible; }
.chantier-yeux rect { transform-box: fill-box; transform-origin: center; animation: cligne 4s infinite; }
/* Un texte pour les lecteurs d'écran seulement */
.cache-ecran { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* La petite fiche d'une séance (At home) */
.fiche-lecon .fiche-note { margin-top: 14px; }
#leconFaite { margin-top: 20px; }
#leconFaite + #leconMatiere, #leconFaite[hidden] + #leconMatiere { margin-top: 10px; }
#leconFaite[hidden] + #leconMatiere { margin-top: 20px; }

/* =============================================================
   La page Settings (reglages.js) — board « settings » 390 × 1024
   ============================================================= */
.reglages-profil { height: 80px; padding: 0 14px; display: flex; align-items: center; gap: 16px; border: var(--contour); border-radius: 16px; background: var(--vert); }
.reglages-initiale { width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--vert-pale); font-size: 22px; font-weight: 700; }
.reglages-profil-textes { min-width: 0; }
.reglages-nom { font-size: 18px; font-weight: 700; line-height: 22px; }
.reglages-email { margin-top: 4px; font-size: 13px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reglages-titre { margin-top: 20px; }
.reglages-carte { margin-top: 8px; border: var(--contour); border-radius: 16px; background: var(--blanc); overflow: hidden; }
/* Une rangée (50 de haut + le contour de la carte = 52) : icône à X 30, texte à X 64, valeur grise, chevron */
.reglage-rangee { position: relative; width: 100%; height: 50px; padding-block: 0 0; padding-inline: 12px 14px; display: flex; align-items: center; gap: 12px; background: var(--blanc); text-align: start; }
.reglage-rangee + .reglage-rangee::before, .reglage-panneau + .reglage-rangee::before { content: ""; position: absolute; inset-inline-start: 46px; inset-inline-end: 0; top: 0; height: 1px; background: var(--gris-lignes); }
button.reglage-rangee:active { background: var(--vert-pale); }
.reglage-icone { width: 22px; flex-shrink: 0; font-size: 22px; }
.reglage-texte { flex: 1; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reglage-valeur { max-width: 150px; font-size: 14px; color: var(--gris-texte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reglage-chevron { font-size: 20px; transition: transform .2s ease; }
.reglage-rangee.depliee .reglage-chevron { transform: rotate(90deg); }
.reglage-rangee.rouge, .reglage-rangee.rouge .reglage-icone { color: #C4482C; }
.reglage-rangee.rouge .reglage-texte { font-weight: 600; }
/* Ce qui s'ouvre sous une rangée (At school / At home, la classe) */
.reglage-panneau { padding-block: 4px 16px; padding-inline: 46px 14px; background: var(--blanc); }
.reglage-sous-titre { margin-top: 12px; }
.reglage-sous-titre:first-child { margin-top: 4px; }
.reglage-select { display: block; width: 100%; height: 44px; margin-top: 8px; font-size: 15px; font-weight: 600; background: var(--blanc); }
/* Le petit message en bas de la page */
.reglages-toast { position: absolute; inset-inline-start: 16px; inset-inline-end: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); padding: 12px 14px; border: var(--contour); border-radius: 14px; background: var(--blanc); font-size: 14px; line-height: 1.35; animation: apparait .15s ease-out; }

/* =============================================================
   Ton emploi du temps en photo ou en PDF (emploi.js)
   ============================================================= */
.emploi-lecture { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: min(120px, 14vh); }
.emploi-titre { font-size: 22px; }
.emploi-question { margin-top: 4px; }
.emploi-pied { flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
.emploi-pied:empty { display: none; }
.emploi-cours { position: relative; min-height: 56px; padding-block: 8px 8px; padding-inline: 14px 8px; display: flex; align-items: center; gap: 10px; }
.emploi-cours + .emploi-cours::before { content: ""; position: absolute; inset-inline-start: 14px; inset-inline-end: 0; top: 0; height: 1px; background: var(--gris-lignes); }
.emploi-heure { width: 88px; flex-shrink: 0; font-size: 13px; font-weight: 600; }
.emploi-cours .pastille { margin-top: 0; width: 14px; height: 14px; border-radius: 4px; }
.emploi-textes { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.emploi-matiere { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emploi-details { font-size: 12px; color: var(--gris-texte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emploi-retirer { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; font-size: 18px; color: var(--gris-texte); border-radius: 10px; }
.emploi-retirer:active { background: #FBD9CF; color: #C4482C; }
#pageEmploi .petit-titre { margin-top: 18px; }
.page.tout-dessus { z-index: 96; }                /* l'emploi du temps, ouvert depuis l'inscription */

/* =============================================================
   Study : la grande carte « NOW » (une seule chose à faire), le guide, My subjects
   ============================================================= */
.carte-now { padding: 14px 16px 16px; border: var(--contour); border-radius: 18px; background: var(--vert); }
.now-label { font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.now-titre { margin-top: 4px; font-size: 22px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.now-sous { margin-top: 3px; font-size: 14px; }
.now-bouton { margin-top: 12px; width: 100%; height: 48px; border: var(--contour); border-radius: 12px; background: var(--blanc); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 600; }
.now-bouton .ti { font-size: 20px; }
.now-bouton:active { background: var(--vert-pale); }
.now-progres { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; }
.now-progres .barre-progres { margin-top: 0; flex: 1; max-width: none; }
/* At school, la 1re fois */
.guide-etapes { padding: 4px 14px; border: var(--contour); border-radius: 16px; }
.guide-etape { display: flex; gap: 12px; padding: 10px 0; }
.guide-etape + .guide-etape { border-top: 1px solid var(--gris-lignes); }
.guide-numero { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--vert-pale); font-weight: 700; }
.guide-titre { font-size: 15px; font-weight: 600; }
.guide-texte { margin-top: 2px; font-size: 13px; color: var(--gris-texte); }
.guide-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-puce { height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border: var(--contour); border-radius: 19px; background: var(--blanc); font-size: 14px; font-weight: 600; }
.guide-puce:active { background: var(--vert-pale); }
.champ.champ-vise { box-shadow: 0 0 0 4px var(--jaune); }
/* COMING UP : « Plan it » sur un contrôle pas encore planifié */
.badge-plan { position: absolute; inset-inline-end: 12px; top: 17px; padding: 3px 10px; border: var(--contour); border-radius: 12px; background: var(--vert); font-size: 13px; font-weight: 700; cursor: pointer; }
/* MY SUBJECTS : une seule ligne dans Study */
.carte-resume-matieres { display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.carte-resume-matieres .resume-icone { font-size: 22px; }
.resume-textes { position: relative; flex: 1; min-width: 0; height: 100%; }
.resume-textes .carte-titre { inset-inline-start: 0; inset-inline-end: 0; }
.resume-textes .carte-details { inset-inline-start: 0; inset-inline-end: 0; }
.carte-resume-matieres .chevron { position: static; font-size: 20px; }
.badge-rose, .badge-jaune { flex-shrink: 0; padding: 1px 8px; border: var(--contour); border-radius: 10px; font-size: 12px; font-weight: 700; }
.badge-rose { background: #FBD9CF; }
.badge-jaune { background: #FCEFC7; }
/* Les fiches au-dessus d'une page ouverte (My subjects…) */
.fiche.sur-page { z-index: 81; }
.voile.sur-page { z-index: 80; }
/* Le petit message en bas de la page My subjects */
.toast-page { position: sticky; bottom: 0; margin-top: 12px; padding: 12px 14px; border: var(--contour); border-radius: 14px; background: var(--blanc); font-size: 14px; line-height: 1.35; }
#pageMatieres .rythme-cned { margin-bottom: 8px; }
/* 8 px entre les cartes des matières (comme partout ailleurs) */
#pageMatieres .carte-matiere { margin-bottom: 8px; }
#pageMatieres .note-verifier { margin-bottom: 8px; }

/* La carte d'aide « You're not alone » (soutien.js) */
.soutien-message { margin-top: 14px; display: flex; align-items: flex-start; gap: 12px; }
.soutien-message .visage-mira { flex-shrink: 0; }
#soutienTexte { flex: 1; padding: 10px 12px; border: var(--contour); border-radius: 4px 16px 16px 16px; background: var(--vert-pale); font-size: 15px; line-height: 1.4; }
.soutien-titre { margin-top: 18px; }
/* (min-height : en français, les noms sont plus longs et passent sur 2 lignes) */
.soutien-numero { height: auto; min-height: 64px; padding-top: 6px; padding-bottom: 6px; color: inherit; text-decoration: none; }
.soutien-numero + .soutien-numero::before { content: ""; position: absolute; inset-inline-start: 46px; inset-inline-end: 0; top: 0; height: 1px; background: var(--gris-lignes); }
.soutien-textes { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.soutien-nom { font-size: 15px; font-weight: 600; }
.soutien-sous { font-size: 12px; line-height: 1.3; color: var(--gris-texte); }
.soutien-appel { flex-shrink: 0; padding: 6px 10px; border: var(--contour); border-radius: 999px; background: var(--vert); font-size: 14px; font-weight: 700; }
.fiche-soutien .fiche-note { margin-top: 10px; }
.fiche-soutien .bouton-blanc { margin-top: 14px; }

/* Les alertes de Yalla (alertes.js) : en haut du calendrier et de Study */
.zone-alertes { margin-bottom: 12px; }
.ecran.onglet-bientot .zone-alertes { display: none; }
.alerte { padding: 12px 14px 14px; border: var(--contour); border-radius: 16px; background: #FCEFC7; }
.alerte + .alerte, .alerte + .alerte-plus, .alerte-plus + .alerte { margin-top: 8px; }
.alerte.fait { background: var(--vert-pale); }
.alerte-haut { display: flex; align-items: center; gap: 8px; }
.alerte-icone { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--blanc); font-size: 17px; }
.alerte-label { flex: 1; min-width: 0; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--gris-texte); }
.alerte-fermer { width: 28px; height: 28px; display: grid; place-items: center; font-size: 20px; }
.alerte-titre { margin-top: 8px; font-size: 17px; font-weight: 700; line-height: 1.25; }
.alerte-texte { margin-top: 2px; font-size: 14px; line-height: 1.35; }
.alerte-mira { margin-top: 8px; display: flex; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.35; }
.alerte-mira .ti { flex-shrink: 0; margin-top: 1px; font-size: 16px; }
.alerte-boutons { margin-top: 10px; display: flex; gap: 8px; }
.alerte-bouton { flex: 1; height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; border: var(--contour); border-radius: 12px; background: var(--blanc); font-size: 15px; font-weight: 600; }
.alerte-bouton.vert { background: var(--vert); }
.alerte-bouton .ti { font-size: 18px; }
.alerte-bouton:disabled { opacity: .6; }
.alerte-plus { width: 100%; height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border: var(--contour); border-radius: 12px; background: #FCEFC7; font-size: 14px; font-weight: 600; text-align: start; }
.alerte-plus span { flex: 1; }
.alerte-plus .ti { font-size: 18px; }
/* Un cours annulé dans la vue Day : barré, en pointillés, avec « Cancelled » */
.carte.annulee { border-style: dashed; background: #F4F5F4; }
.carte.annulee .carte-heure, .carte.annulee .carte-titre { color: #8C9996; text-decoration: line-through; }
.etiquette-annule { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); padding: 1px 7px; border: 2px solid #C4482C; border-radius: 9px; background: var(--blanc); color: #C4482C; font-size: 12px; font-weight: 700; }
/* La vue Week ne défile pas (sa grille a son propre défilement). Bug 59 : une carte seule s'affiche toujours en entier
   (la grille se réduit, en gardant au moins 3 heures ; sur un petit écran, la vue défile) ; plusieurs cartes dépliées : 65 % au plus, avec une barre de défilement visible */
.contenu[data-vue="week"] .zone-alertes { flex-shrink: 0; margin: 0 16px 12px; overflow-y: auto; scrollbar-width: thin; }
.contenu[data-vue="week"]:has(.zone-alertes:not([hidden])) { overflow-y: auto; scrollbar-width: none; } /* petit écran : on fait défiler la vue, la carte n'est jamais coupée */
.contenu[data-vue="week"] .zone-alertes.depliees { max-height: 65%; }
.contenu[data-vue="week"] .vue-semaine { min-height: calc(110px + 3 * var(--h, 30px)); }

/* ---------- L'onglet Commute (trajet.js) ---------- */
.ecran.onglet-trajet .barre-vue { display: none; }        /* pas de bouton Day › dans Commute */
.contenu[data-vue="trajet"] { padding-top: 8px; }        /* la carte à Y 112, comme Study */
/* La carte (358 × 240) : l'image du serveur, « 25 min · Normal traffic », recharger */
.trajet-carte { position: relative; height: 240px; border: var(--contour); border-radius: 16px; overflow: hidden; background: #E9EEE8; }
.trajet-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.trajet-sans-carte { display: none; position: absolute; inset: 0; place-items: center; font-size: 13px; color: var(--gris-texte); }
.trajet-carte.sans-image .trajet-image { visibility: hidden; }
.trajet-carte.sans-image .trajet-sans-carte { display: grid; }
.trajet-puce { position: absolute; inset-inline-start: 10px; top: 10px; height: 32px; padding: 0 12px; display: flex; align-items: center; gap: 6px; border: var(--contour); border-radius: 16px; background: var(--blanc); font-size: 13px; font-weight: 600; }
.trajet-point { width: 10px; height: 10px; border: var(--contour); border-radius: 50%; }
.trajet-recharger { position: absolute; inset-inline-end: 10px; bottom: 10px; width: 36px; height: 36px; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--blanc); font-size: 18px; }
.trajet-recharger.tourne .ti { animation: tourne .8s linear infinite; }
/* LEAVE AT 07:25 (358 × 132) */
.trajet-depart { margin-top: 12px; padding: 14px 16px 16px; border: var(--contour); border-radius: 18px; background: var(--vert); }
.trajet-label { font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.trajet-heure { margin-top: 2px; font-size: 34px; font-weight: 700; line-height: 1.1; }
.trajet-sous { margin-top: 4px; font-size: 14px; line-height: 1.35; }
.trajet-cours { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.trajet-cours .ti { font-size: 14px; }
.trajet-pas-ecole { margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.trajet-titre { margin-top: 18px; }
/* LATER TODAY : le retour (358 × 60) */
.trajet-retour { margin-top: 8px; height: 60px; padding: 0 14px; display: flex; align-items: center; gap: 12px; border: var(--contour); border-radius: 16px; background: var(--blanc); }
.trajet-retour > .ti { font-size: 22px; }
.trajet-retour-textes { display: flex; flex-direction: column; }
.trajet-retour-titre { font-size: 16px; font-weight: 600; }
.trajet-retour-sous { font-size: 13px; color: var(--gris-texte); }
.trajet-editer { display: block; margin: 16px auto 4px; }
/* Pas de clé Google, à la maison, une erreur… */
.trajet-info { padding: 16px; border: var(--contour); border-radius: 16px; background: var(--blanc); }
.trajet-info-titre { margin-top: 10px; font-size: 17px; font-weight: 700; }
.trajet-info-texte { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--gris-texte); }
.trajet-info .bouton-vert { margin-top: 14px; }
/* « Your commute » : la 1re fois */
.trajet-page-titre { font-size: 22px; font-weight: 700; }
.trajet-page-sous { margin-top: 4px; font-size: 14px; color: var(--gris-texte); }
.trajet-champ-boite { position: relative; margin-top: 8px; }
.trajet-champ { height: 48px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border: var(--contour); border-radius: 12px; background: var(--blanc); }
.trajet-champ .ti { font-size: 20px; }
.trajet-champ input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; }
.trajet-champ:focus-within { box-shadow: 0 0 0 3px var(--vert-pale); }
.trajet-suggestions { position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: 52px; z-index: 5; padding: 4px; border: var(--contour); border-radius: 12px; background: var(--blanc); box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.trajet-suggestion { width: 100%; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; border-radius: 8px; text-align: start; }
.trajet-suggestion:hover, .trajet-suggestion:focus-visible { background: var(--vert-pale); }
.trajet-suggestion-titre { font-size: 15px; font-weight: 600; }
.trajet-suggestion-sous { font-size: 12px; color: var(--gris-texte); }
.trajet-suggestion-vide { padding: 10px; font-size: 13px; color: var(--gris-texte); }
.trajet-prive { margin-top: 6px; display: flex; gap: 6px; font-size: 12px; line-height: 1.35; color: var(--gris-texte); }
.trajet-prive .ti { font-size: 14px; }
.trajet-modes { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.trajet-mode { height: 38px; padding: 0 12px; display: flex; align-items: center; gap: 6px; border: var(--contour); border-radius: 19px; background: var(--blanc); font-size: 14px; font-weight: 600; }
.trajet-mode.choisi { background: var(--vert); }
.trajet-mode .ti { font-size: 16px; }
.trajet-marge { margin-top: 8px; height: 48px; padding-block: 0 0; padding-inline: 14px 8px; display: flex; align-items: center; justify-content: space-between; border: var(--contour); border-radius: 12px; font-size: 15px; }
.trajet-marge-droite { display: flex; align-items: center; gap: 12px; }
.trajet-plus-moins { width: 34px; height: 34px; display: grid; place-items: center; border: var(--contour); border-radius: 50%; font-size: 18px; }
.trajet-heure-bus { margin-top: 8px; }
.trajet-montrer { margin-top: 16px; height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; font-size: 17px; font-weight: 700; }
.trajet-montrer .ti { font-size: 20px; }
.trajet-erreur { margin-top: 8px; font-size: 13px; font-weight: 600; color: #C4482C; }

/* ---------- Le code par email (inscription.js) : 6 cases ---------- */
.code-email { color: var(--noir); }
.cases-code { margin-top: 26px; display: flex; justify-content: center; gap: 8px; }
.case-code { width: 48px; height: 58px; padding: 0; border: var(--contour); border-radius: 12px; background: var(--blanc); text-align: center; font: inherit; font-size: 26px; font-weight: 700; }
.case-code:focus { outline: 0; box-shadow: 0 0 0 3px var(--vert-pale); }
.code-spams { margin: 18px auto 0; width: fit-content; max-width: 100%; padding: 8px 14px; display: flex; align-items: center; gap: 8px; border-radius: 14px; background: var(--vert-pale); font-size: 14px; font-weight: 600; line-height: 1.3; }
.code-spams .ti { flex-shrink: 0; font-size: 20px; }
.code-renvoi { margin-top: 18px; text-align: center; font-size: 14px; font-weight: 600; color: var(--gris-texte); }
.code-renvoi .lien-texte { font-size: 14px; }
/* Le nouveau mot de passe : les règles deviennent vertes quand c'est bon */
.regle-mdp { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gris-texte); }
.regle-mdp::before { content: ""; width: 12px; height: 12px; flex-shrink: 0; border: 2px solid currentColor; border-radius: 50%; }
.regle-mdp.ok { color: #1F7A6E; }
.regle-mdp.ok::before { background: #1F7A6E; box-shadow: inset 0 0 0 2px var(--blanc); }
/* Settings → Password */
.mdp-titre { display: block; margin-top: 16px; }
.mdp-champ { display: block; width: 100%; margin-top: 8px; font-size: 15px; }
.fiche-mdp .fiche-note { margin-top: 10px; }
.fiche-mdp .inscription-erreur { margin-top: 10px; }
.fiche-mdp .bouton-vert { margin-top: 14px; }
.mdp-oublie { display: block; margin: 14px auto 0; }

/* ---------- Settings → REGION : la liste de choix (Country, Week starts on, School holidays) ---------- */
.choix-recherche { position: relative; margin-top: 14px; }
.choix-recherche .champ { width: 100%; padding-inline-start: 40px; font-size: 15px; }
.choix-recherche .ti { position: absolute; inset-inline-start: 12px; top: 13px; font-size: 20px; pointer-events: none; }
.choix-liste { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.choix-ligne { position: relative; width: 100%; min-height: 60px; padding-block: 9px 9px; padding-inline: 14px 54px; border: var(--contour); border-radius: 16px; background: var(--blanc); text-align: start; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.choix-ligne.choisi { background: var(--vert-pale); }
.choix-nom { font-size: 16px; font-weight: 600; line-height: 20px; }
.choix-detail { font-size: 13px; line-height: 16px; color: var(--gris-texte); }
.rond-choix { position: absolute; inset-inline-end: 14px; top: 50%; margin-top: -14px; width: 28px; height: 28px; border: var(--contour); border-radius: 50%; background: var(--blanc); display: grid; place-items: center; font-size: 16px; }
.choix-ligne.choisi .rond-choix { background: var(--vert); }
.fiche-choix .fiche-note { margin-top: 12px; }
/* « Public holidays » : l'interrupteur à la place du chevron */
.reglage-rangee .interrupteur { margin-inline-start: auto; }

/* ---------- L'arabe : de droite à gauche ----------
   langue.js met dir="rtl" sur la page. Presque tout se retourne tout seul
   (les marges et les positions sont « logiques » : début / fin de ligne).
   Ici, ce qui doit être retourné à la main. */
[dir="rtl"] body { font-family: "Readex Pro", "Lexend", sans-serif; }
/* L'espace entre les lettres casse l'écriture attachée de l'arabe */
[dir="rtl"] body * { letter-spacing: normal !important; }
/* Les flèches et chevrons pointent dans l'autre sens (« suivant » est à gauche) */
[dir="rtl"] .ti-chevron-right, [dir="rtl"] .ti-chevron-left,
[dir="rtl"] .ti-arrow-right, [dir="rtl"] .ti-arrow-left { transform: scaleX(-1); }
/* Les pages arrivent par la gauche */
[dir="rtl"] .page { transform: translateX(-100%); }
[dir="rtl"] .page.ouverte { transform: none; }
/* L'interrupteur s'allume vers la gauche */
[dir="rtl"] .interrupteur[aria-checked="true"] .bouton-rond { transform: translateX(-20px); }
/* La bulle de Yalla (carte d'aide) : sa pointe du côté de Yalla */
[dir="rtl"] #soutienTexte { border-radius: 16px 4px 16px 16px; }
/* Les heures, les emails et les liens restent écrits de gauche à droite */
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] #lienIcal { direction: ltr; text-align: right; }
/* « Coming soon » en arabe : un seul mot (les lettres sont attachées), dévoilé depuis la droite (bientot.js) */
.chantier-mot { white-space: nowrap; direction: rtl; text-align: right; }
/* Le choix de la langue sur « Bienvenue » (avant d'avoir un compte) : inscription.js */
/* (une barre qui ne défile pas : le bouton reste en haut, le texte passe en dessous) */
.bienvenue-haut {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding: max(16px, calc(env(safe-area-inset-top) + 8px)) 16px 8px;
  background: var(--blanc);
}
.bouton-langue {
  height: 36px;
  padding-inline: 12px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: var(--contour);
  border-radius: 18px;
  background: var(--blanc);
  font-size: 14px;
  font-weight: 600;
}
.bouton-langue .ti-world { font-size: 18px; }
.bouton-langue .ti-chevron-down { font-size: 16px; }
.bouton-langue.rond { position: static; width: 44px; height: 44px; padding: 0; justify-content: center; border: 0; background: none; }
.bouton-langue.rond .ti-world { font-size: 24px; }
/* Une fiche (ex. la langue) au-dessus de l'inscription */
.fiche.sur-inscription { z-index: 92; }
.voile.sur-inscription { z-index: 91; }
/* Un champ vidé par Yalla (après l'envoi) : son texte gris reste du côté de la page (langue.js : directionAuto) */
[dir="rtl"] :is(input, textarea)[dir="auto"]:placeholder-shown { direction: rtl; }
/* Les numéros et les codes se lisent toujours de gauche à droite, même en arabe
   (sinon « 800 4673 » s'afficherait « 4673 800 » : un enfant composerait le mauvais numéro) */
.soutien-appel, .cases-code, .code-email { direction: ltr; unicode-bidi: isolate; }

/* ---------- La page « Your route » (trajet.js) ---------- */
.trajet-carte.ouvrable { cursor: pointer; }
.trajet-agrandir { position: absolute; inset-inline-end: 10px; top: 10px; width: 36px; height: 36px; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--blanc); font-size: 18px; }
.trajet-itineraire { margin-top: 8px; width: 100%; height: 52px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border: var(--contour); border-radius: 16px; background: var(--blanc); font-size: 15px; font-weight: 600; text-align: start; }
.trajet-itineraire span { flex: 1; }
.trajet-itineraire .ti-route { font-size: 22px; }
.trajet-itineraire .ti-chevron-right { font-size: 20px; }
.iti-carte { position: relative; height: min(46vh, 380px); border: var(--contour); border-radius: 18px; overflow: hidden; background: #E9EEE8; }
.iti-carte > div, .iti-carte img { width: 100%; height: 100%; }
.iti-carte img { display: block; object-fit: cover; }
.iti-note-carte { margin-top: 8px; font-size: 12px; line-height: 1.35; color: var(--gris-texte); }
.iti-resume { margin-top: 14px; font-size: 18px; font-weight: 700; }
.iti-sous { margin-top: 4px; font-size: 14px; color: var(--gris-texte); }
.iti-etapes { margin-top: 8px; border: var(--contour); border-radius: 16px; background: var(--blanc); overflow: hidden; }
.iti-etape { position: relative; min-height: 56px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; }
.iti-etape + .iti-etape::before { content: ""; position: absolute; inset-inline-start: 58px; inset-inline-end: 0; top: 0; height: 1px; background: var(--gris-lignes); }
.iti-icone { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--vert-pale); font-size: 19px; }
.iti-etape.bout .iti-icone { background: var(--vert); }
.iti-texte { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; white-space: pre-line; }
.iti-distance { flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--gris-texte); }
.iti-source { margin-top: 10px; font-size: 12px; line-height: 1.35; color: var(--gris-texte); }
.itineraire-pied { flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); background: var(--blanc); }
.itineraire-pied .gros-bouton { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--noir); text-decoration: none; }
.itineraire-pied .gros-bouton .ti { font-size: 22px; }
.itineraire-pied p { text-align: center; font-size: 12px; color: var(--gris-texte); }

/* =============================================================
   Le panneau d'administration (admin.js) : le logo de Yalla l'ouvre
   ============================================================= */
.logo-admin { cursor: pointer; border-radius: 10px; }
.logo-admin:active { opacity: .7; }
.logo-admin:focus-visible { outline: 3px solid var(--vert); outline-offset: 4px; }
/* La carte verte : ce mois-ci */
.admin-resume { padding: 14px 16px 12px; border: var(--contour); border-radius: 18px; background: var(--vert); }
.admin-resume-titre { font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.admin-resume-montant { margin-top: 6px; font-size: 34px; font-weight: 700; line-height: 1; direction: ltr; unicode-bidi: isolate; text-align: start; }
[dir="rtl"] .admin-resume-montant { text-align: end; }
.admin-resume-sous { margin-top: 4px; font-size: 13px; line-height: 1.3; }
.admin-barre { position: relative; display: block; height: 10px; border: 2px solid var(--noir); border-radius: 999px; background: var(--blanc); overflow: hidden; }
.admin-barre-plein { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--noir); border-radius: 999px; }
.admin-barre.pleine .admin-barre-plein { background: var(--corail); }
.admin-barre-grande { margin-top: 10px; height: 14px; }
.admin-chiffres { margin-top: 12px; display: flex; gap: 8px; }
.admin-chiffre { flex: 1; min-width: 0; padding: 6px 8px; border: var(--contour); border-radius: 12px; background: var(--blanc); }
.admin-chiffre b { display: block; font-size: 18px; line-height: 1.2; }
.admin-chiffre span { display: block; font-size: 11px; line-height: 1.2; color: var(--gris-texte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-resume-pied { margin-top: 10px; font-size: 12px; line-height: 1.3; }
.admin-note { margin-top: 6px; font-size: 12px; line-height: 1.35; color: var(--gris-texte); }
.admin-code { padding: 3px 8px; border: var(--contour); border-radius: 8px; background: var(--vert-pale); font-size: 14px; font-weight: 700; letter-spacing: .06em; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .admin-code { letter-spacing: .06em; }
/* La liste des comptes */
.admin-compte { position: relative; width: 100%; min-height: 66px; padding: 10px 14px 10px 12px; padding-inline: 12px 14px; display: flex; align-items: center; gap: 12px; background: var(--blanc); text-align: start; }
.admin-compte + .admin-compte::before { content: ""; position: absolute; inset-inline-start: 60px; inset-inline-end: 0; top: 0; height: 1px; background: var(--gris-lignes); }
.admin-compte:active { background: var(--vert-pale); }
.admin-initiale { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--vert-pale); font-size: 16px; font-weight: 700; }
.admin-compte-textes { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-compte-nom { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; }
.admin-compte-email { font-size: 12px; color: var(--gris-texte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.admin-compte-adresse { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.admin-compte-nom .admin-puce { flex-shrink: 0; }
#ficheAdminTitre { direction: ltr; unicode-bidi: plaintext; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-compte-depense { width: 78px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.admin-compte-depense b { font-size: 14px; direction: ltr; unicode-bidi: isolate; }
.admin-compte-depense .admin-barre { width: 100%; height: 8px; border-width: 1.5px; }
.admin-compte-limite { font-size: 11px; color: var(--gris-texte); white-space: nowrap; }
.admin-puce { flex-shrink: 0; padding: 1px 7px; border: 1.5px solid var(--noir); border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.4; }
.admin-puce.verte { background: var(--vert); }
.admin-puce.grise { background: var(--gris-tres-clair); }
.admin-puce.rouge { background: var(--corail); }
/* Les fiches : un montant, un compte */
.fiche-admin { max-height: calc(100% - 60px); overflow-y: auto; }
.admin-montant { margin-top: 14px; }
.admin-champ-ligne { position: relative; display: flex; }
.admin-champ { flex: 1; height: 52px; padding-inline: 14px 40px; font-size: 22px; font-weight: 700; direction: ltr; }
.admin-dollar { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 700; }
.admin-presets { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.admin-preset { height: 36px; padding: 0 12px; border: var(--contour); border-radius: 999px; background: var(--blanc); font-size: 14px; font-weight: 600; }
.admin-preset.choisi { background: var(--vert); }
.admin-infos { margin-top: 12px; border: var(--contour); border-radius: 16px; overflow: hidden; }
.admin-info { position: relative; min-height: 44px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.admin-info + .admin-info::before { content: ""; position: absolute; inset-inline-start: 42px; inset-inline-end: 0; top: 0; height: 1px; background: var(--gris-lignes); }
.admin-info .ti { width: 20px; flex-shrink: 0; font-size: 20px; }
.admin-info-nom { flex-shrink: 0; color: var(--gris-texte); }
.admin-info-valeur { flex: 1; min-width: 0; text-align: end; font-weight: 600; overflow-wrap: anywhere; }
[dir="rtl"] .admin-info-valeur[dir="ltr"] { text-align: left; }
.admin-sous-titre { margin-top: 18px; }
.admin-apercu { margin-top: 10px; padding: 10px 12px; border: var(--contour); border-radius: 12px; background: #FBD9CF; font-size: 13px; line-height: 1.35; }
.admin-texte-pause { display: block; width: 100%; height: auto; min-height: 76px; margin-top: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.35; resize: none; font-family: inherit; }
.admin-texte-pause[hidden], .admin-apercu[hidden] { display: none; }

/* ---------- La page « Privacy » (confidentialite.js) ---------- */
.confi-intro { padding: 16px; border: var(--contour); border-radius: 16px; background: #CFECE8; }
.confi-intro-titre { font-size: 20px; font-weight: 700; }
.confi-intro-texte { margin-top: 8px; font-size: 14px; line-height: 1.4; }
.confi-date { margin-top: 10px; font-size: 12px; color: var(--gris-texte); }
.confi-partie { margin-top: 24px; }
.confi-entete { display: flex; align-items: center; gap: 12px; }
.confi-entete .atout-rond { width: 36px; height: 36px; font-size: 18px; }
.confi-titre { font-size: 17px; font-weight: 700; }
.confi-texte { margin-top: 8px; font-size: 14px; line-height: 1.45; }
.confi-liste { list-style: disc; margin-top: 6px; padding-inline-start: 20px; font-size: 14px; line-height: 1.45; }
.confi-liste li { margin-top: 6px; }
.confi-liste li::marker { color: var(--vert); }
/* Les liens « Privacy » (Bienvenue, la case de l'inscription) */
.lien-confi { padding: 0; font: inherit; font-weight: 600; color: var(--vert-fonce, #157A6E); text-decoration: underline; text-underline-offset: 2px; }
.bienvenue-confi { align-self: center; font-size: 13px; font-weight: 600; color: var(--gris-texte); }
.bienvenue-confi .lien-confi { color: var(--gris-texte); }
/* La case « J'ai lu… » à l'inscription */
.case-accord { margin-top: 16px; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: var(--contour); border-radius: 12px; cursor: pointer; }
.case-accord input { flex-shrink: 0; width: 22px; height: 22px; margin: 0; accent-color: var(--vert); }
.case-accord span { font-size: 13px; line-height: 1.4; }
/* Supprimer mon compte */
.supprimer-texte { margin-top: 12px; font-size: 14px; line-height: 1.4; }
.bouton-rouge {
  margin-top: 20px;
  width: 100%;
  height: 48px;
  border: var(--contour);
  border-radius: 12px;
  background: #F6B4A4;
  font-size: 15px;
  font-weight: 600;
}
.bouton-rouge[data-confirmer="1"] { background: #C4482C; color: var(--blanc); }
.bouton-rouge:disabled { opacity: .5; cursor: default; }
.admin-supprimer { display: block; margin: 18px auto 0; padding: 8px; font-size: 14px; font-weight: 600; color: #C4482C; }
.admin-supprimer[data-confirmer="1"] { text-decoration: underline; }
.note-supprime { margin: 8px 0 0; padding: 12px 14px; border: var(--contour); border-radius: 12px; background: #CFECE8; font-size: 14px; line-height: 1.4; text-align: center; }
/* « Comment Yalla protège tes données » : le schéma */
.schema-chemin { margin-top: 12px; padding: 14px; border: var(--contour); border-radius: 16px; }
.schema-etape { display: flex; align-items: flex-start; gap: 12px; }
.schema-icone { flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; border: var(--contour); border-radius: 12px; background: #CFECE8; font-size: 20px; }
.schema-titre { font-size: 14px; font-weight: 700; }
.schema-texte { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--gris-texte); }
.schema-fleche { display: flex; align-items: center; gap: 10px; margin: 6px 0; padding-inline-start: 10px; font-size: 12px; font-weight: 600; color: var(--vert); }
.schema-fleche .ti { font-size: 20px; }
.confi-accepter { margin-top: 28px; padding-top: 4px; border-top: 1px dashed var(--gris-texte); }
.confi-changee-icone { margin-top: 12px; display: grid; place-items: center; width: 56px; height: 56px; border: var(--contour); border-radius: 16px; background: #CFECE8; font-size: 28px; }
#ficheConfiChangee .bouton-vert { margin-top: 18px; }
#ficheConfiChangee .lien-sauter { margin-top: 14px; color: var(--gris-texte); }
/* Panneau admin : les appareils d'un compte, les adresses bannies */
.admin-appareil .reglage-texte, .reglages-carte .reglage-texte:has(.admin-banni) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-appareil-nom, .admin-banni { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-appareil-quand, .admin-banni-date { font-size: 12px; line-height: 1.3; color: var(--gris-texte); white-space: normal; }
.admin-debannir { flex-shrink: 0; height: 34px; padding: 0 12px; border: var(--contour); border-radius: 10px; background: var(--blanc); font-size: 13px; font-weight: 600; }

/* ---------- L'onglet Chat (chat.js) ---------- */
.ecran.onglet-chat .barre-vue { display: none; }
.ecran.onglet-chat .zone-alertes { display: none; }
.vue-chat { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
/* (collée en haut pendant qu'on fait défiler ; elle couvre aussi les 16 px de marge au-dessus) */
.chat-haut { position: sticky; top: -16px; z-index: 3; display: flex; gap: 8px; align-items: center; margin-top: -16px; padding: 16px 0 8px; background: var(--blanc); }
.chat-segment { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: var(--contour); border-radius: 14px; overflow: hidden; }
.chat-segment-bouton { height: 40px; font-size: 14px; font-weight: 700; background: var(--blanc); }
.chat-segment-bouton + .chat-segment-bouton { border-inline-start: var(--contour); }
.chat-segment-bouton.discuter[aria-selected="true"] { background: var(--vert); }
.chat-segment-bouton.reviser[aria-selected="true"] { background: var(--jaune); }
.chat-effacer { flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; color: var(--gris-texte); border-radius: 12px; }
.chat-effacer[data-confirmer="1"] { color: #C4482C; background: #FBE3DC; }
.chat-fil { display: flex; flex-direction: column; gap: 10px; }
.chat-date { align-self: center; margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: 1.4px; color: var(--gris-texte); }
.chat-moi { align-self: flex-end; max-width: 80%; padding: 11px 14px; border: var(--contour); border-radius: 16px 16px 4px 16px; background: var(--vert-pale); font-size: 15px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
[dir="rtl"] .chat-moi { border-radius: 16px 16px 16px 4px; }
.chat-mira { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.chat-visage { flex-shrink: 0; width: 28px; height: 28px; }
.chat-visage svg { width: 100%; height: 100%; display: block; }
.chat-pile { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.chat-bulle { align-self: flex-start; padding: 11px 14px; border: var(--contour); border-radius: 16px 16px 16px 4px; background: var(--blanc); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
[dir="rtl"] .chat-bulle { border-radius: 16px 16px 4px 16px; }
.chat-bulle.credit { background: #FDF3D7; }
.chat-bulle.score { background: var(--vert-pale); }
.chat-carte { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: var(--contour); border-radius: 14px; background: var(--blanc); }
.chat-carte-barre { width: 6px; align-self: stretch; border-radius: 3px; flex-shrink: 0; }
.chat-carte-textes { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.chat-carte-titre { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-carte-sous { font-size: 12px; color: var(--gris-texte); }
.chat-carte-bouton { flex-shrink: 0; height: 36px; padding: 0 14px; border: var(--contour); border-radius: 10px; background: var(--blanc); font-size: 13px; font-weight: 600; }
.chat-carte-bouton.aide { align-self: flex-start; background: #FBE3DC; }
.chat-jour { padding: 12px 14px; border: var(--contour); border-radius: 14px; background: var(--vert-pale); }
.chat-jour-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.3px; color: #2F5F59; }
.chat-jour-label .ti { font-size: 15px; }
.chat-jour-texte { margin-top: 6px; font-size: 14px; line-height: 1.4; }
.chat-idees { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chat-idees::-webkit-scrollbar { display: none; }
.chat-idee { flex-shrink: 0; height: 36px; padding: 0 14px; border: var(--contour); border-radius: 18px; background: var(--blanc); font-size: 13px; }
/* Réviser */
.chat-matieres { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chat-matieres::-webkit-scrollbar { display: none; }
.chat-matiere { flex-shrink: 0; height: 36px; padding: 0 14px; border: var(--contour); border-radius: 18px; background: var(--blanc); font-size: 13px; }
.chat-matiere.choisie { background: var(--corail); font-weight: 700; }
.chat-souvient { padding: 12px 14px; border: var(--contour); border-radius: 14px; background: #FBE3DC; }
.chat-souvient-haut { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; }
.chat-souvient-haut > span { flex: 1; min-width: 0; }
.chat-souvient-haut .ti { font-size: 16px; }
.chat-souvient-modifier { font-size: 12px; font-weight: 600; text-decoration: underline; letter-spacing: 0; padding: 6px 0 6px 8px; }
.chat-souvient-liste { list-style: disc; margin-top: 8px; padding-inline-start: 18px; font-size: 13px; line-height: 1.45; }
.chat-souvient-vide { margin-top: 6px; font-size: 13px; line-height: 1.4; color: #3E4A48; }
.chat-boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.chat-bouton { height: 44px; padding: 0 16px; border: var(--contour); border-radius: 12px; background: var(--blanc); font-size: 14px; font-weight: 600; }
.chat-bouton.vert { background: var(--vert); flex: 1; }
.chat-bouton.jaune { background: var(--jaune); }
.chat-quiz { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: var(--contour); border-radius: 14px; background: #FDF3D7; }
.chat-quiz-haut { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; }
.chat-quiz-barre { display: flex; height: 10px; border: var(--contour); border-radius: 6px; background: var(--blanc); overflow: hidden; }
.chat-quiz-barre span { background: var(--vert); transition: width .3s ease; }
.chat-quiz-question { margin-top: 2px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.chat-quiz-choix { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 12px; border: var(--contour); border-radius: 12px; background: var(--blanc); font-size: 14px; text-align: start; }
.chat-quiz-choix:disabled { cursor: default; }
.chat-quiz-choix.bonne { background: var(--vert); font-weight: 700; }
.chat-quiz-choix.fausse { background: #F6B4A4; }
.chat-quiz-choix .ti { margin-inline-start: auto; font-size: 18px; }
.chat-quiz-lettre { flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; border: var(--contour); border-radius: 8px; background: var(--blanc); font-size: 12px; font-weight: 700; }
.chat-quiz-libelle { flex: 1; min-width: 0; }
.chat-quiz-explication { font-size: 13px; line-height: 1.4; }
.chat-serie { align-self: flex-start; padding: 6px 12px; border: var(--contour); border-radius: 16px; font-size: 13px; font-weight: 600; }
.souvenir-enlever { flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; font-size: 18px; color: var(--gris-texte); }
.souvenir-ajout { display: flex; gap: 8px; }
.souvenir-champ { flex: 1; min-width: 0; }
#ficheSouvenirs .reglage-texte { white-space: normal; line-height: 1.3; }
.chat-sujets { display: flex; gap: 8px; flex-wrap: wrap; }
.chat-sujets .chat-idee { height: auto; min-height: 36px; padding: 6px 14px; text-align: start; }
/* Vue Jour d'aujourd'hui : cours passés, ligne MAINTENANT, « Réviser » sur la prochaine séance (app.js) */
.carte.passee { opacity: .45; }
.ligne-maintenant { display: flex; align-items: center; gap: 8px; height: 16px; margin: 2px 0; }
.ligne-maintenant-heure { width: 44px; font-size: 12px; font-weight: 700; color: #C4482C; }
.ligne-maintenant-rond { width: 12px; height: 12px; flex-shrink: 0; border: var(--contour); border-radius: 50%; background: var(--corail); }
.ligne-maintenant-trait { flex: 1; height: 2px; background: var(--corail); }
.ligne-maintenant-mot { font-size: 11px; font-weight: 700; letter-spacing: 1.3px; color: #C4482C; }
.carte-cadre { position: relative; }
.carte.avec-action { border-style: dashed; }
.carte.avec-action .carte-titre, .carte.avec-action .carte-details { inset-inline-end: 112px; }
.carte-reviser { position: absolute; inset-inline-end: 12px; top: 13px; height: 38px; padding: 0 14px; border: var(--contour); border-radius: 10px; background: var(--jaune); font-size: 14px; font-weight: 700; }
/* Installer Yalla sur l'écran d'accueil (appli.js) */
.installer-etapes { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.installer-etape { display: flex; align-items: center; gap: 12px; padding: 12px; border: var(--contour); border-radius: 14px; }
.installer-etape > div { flex: 1; min-width: 0; }
.installer-numero { flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; border: var(--contour); border-radius: 50%; background: var(--vert); font-size: 14px; font-weight: 700; }
.installer-texte { font-size: 14px; line-height: 1.4; }
.installer-note { margin-top: 3px; font-size: 12px; color: var(--gris-texte); }
.installer-icone { flex-shrink: 0; font-size: 24px; }
/* Trajet : Modifier en haut, pause et supprimer (trajet.js) */
.trajet-entete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.trajet-entete .petit-titre { margin: 0; }
.trajet-entete-bouton { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: var(--contour); border-radius: 999px; background: var(--blanc); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.trajet-arreter { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 24px 0 8px; padding-top: 16px; border-top: 1px solid var(--gris-lignes); }
.trajet-supprimer { color: #C4482C; font-weight: 600; }
#vueTrajet { padding-bottom: 24px; }
/* Chat : le haut reste visible (Discuter/Réviser + mot du jour, ou les matières + « Yalla se souvient ») */
.chat-fixe { position: sticky; top: -16px; z-index: 3; display: flex; flex-direction: column; gap: 8px; margin-top: -16px; padding: 16px 0 10px; background: var(--blanc); }
.chat-fixe .chat-haut { position: static; margin-top: 0; padding: 0; }
.chat-fixe .chat-jour-texte { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chat-fixe .chat-jour { padding: 10px 12px; }
.chat-fixe .chat-souvient { padding: 10px 12px; }
.chat-fixe .chat-souvient-liste { margin-top: 4px; }
.chat-fixe .chat-souvient-liste li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-souvient-plus { margin-top: 2px; font-size: 12px; font-weight: 600; text-decoration: underline; }
.carte-en-cours { font-weight: 700; color: #1B6E64; }
/* La fiche d'un événement : catégorie et « se répète » (app.js) */
#ficheCategorieZone .petit-titre { margin-top: 14px; }
.fiche-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fiche-categorie { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: var(--contour); border-radius: 18px; background: var(--blanc); font: inherit; font-size: 13px; }
.fiche-categorie.choisie { background: var(--vert); font-weight: 700; }
.fiche-jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.fiche-jour { height: 40px; border: var(--contour); border-radius: 12px; background: var(--blanc); font: inherit; font-size: 14px; font-weight: 600; text-transform: uppercase; }
.fiche-jour.choisi { background: var(--vert); }
#ficheSupprimerSerie { margin-top: 8px; }
/* CNED : chiffres pré-remplis (inscription.js, cned.js) */
.tete-resume.a-remplir { color: #C4482C; font-weight: 600; }
.editeur-plus { display: block; margin: 6px auto 0; }
/* « Prochain devoir : … » (onglet Étude, CNED) : la carte grandit d'une ligne */
.carte-matiere.avec-devoir { height: 92px; }
.carte-devoir { position: absolute; inset-inline-start: 46px; inset-inline-end: 40px; top: 51px; font-size: 12px; font-weight: 600; color: #B5452C; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lecon-pas-dispo { display: block; margin: 10px auto 0; }
/* Vue Mois : de la place sous la pile du jour (elle ne touche plus la barre « Ajoute… »),
   et les points à droite ne dépassent jamais la carte (au-delà de 5 : « +3 ») */
.contenu[data-vue="month"] { padding-bottom: 28px; }
.pile-points { max-height: 112px; overflow: hidden; }
.pile-plus { font-size: 11px; font-weight: 700; color: var(--gris-texte); margin-top: 2px; }

/* ---------- La visite guidée (visite.js) ---------- */
.visite-voile { position: fixed; inset: 0; z-index: 200; background: transparent; }
.visite-spot { position: fixed; z-index: 201; border: 3px solid var(--vert); border-radius: 18px; box-shadow: 0 0 0 4000px rgba(20, 30, 28, .6); opacity: 0; pointer-events: none;
  transition: left .6s cubic-bezier(.4,0,.2,1), top .6s cubic-bezier(.4,0,.2,1), width .6s cubic-bezier(.4,0,.2,1), height .6s cubic-bezier(.4,0,.2,1), opacity .3s; }
.visite-spot.visible { opacity: 1; }
.visite-mira { position: fixed; z-index: 203; width: 56px; height: 56px; pointer-events: none; }
.visite-visage { position: relative; width: 56px; height: 56px; display: block; transition: transform .3s; }
.visite-fatigue { display: none; }
.visite-cligne { animation: visite-cligne 3.2s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes visite-cligne { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.visite-mira.rebond .visite-visage { animation: visite-rebond .45s ease-out; }
@keyframes visite-rebond { 0%, 100% { translate: 0 0; } 40% { translate: 0 -10px; } }
/* Les mains : à gauche du visage, tendues vers la gauche (ou à droite, en miroir) */
.visite-mains { position: absolute; left: -44px; top: -6px; width: 70px; height: 70px; overflow: visible; opacity: 0; transition: opacity .2s, transform .3s; }
.visite-mira.tire-gauche .visite-mains { left: 30px; transform: scaleX(-1); }
.visite-mira.mains .visite-mains { opacity: 1; }
/* Elle tire : yeux plissés, dents serrées, une goutte de sueur, elle penche en arrière et tremble */
.visite-mira.tire .visite-normal { display: none; }
.visite-mira.tire .visite-fatigue { display: inline; }
.visite-mira.tire .visite-visage { animation: visite-effort .16s infinite alternate; transform: rotate(9deg); }
.visite-mira.tire.tire-gauche .visite-visage { transform: rotate(-9deg); }
@keyframes visite-effort { from { translate: -1px 0; } to { translate: 1px 1px; } }
.roue.roue-lente .categorie { transition-duration: 1s; }
.roue.roue-lente .categorie .roue-rond { transition-duration: .8s; }
.visite-bulle { position: fixed; z-index: 204; background: var(--blanc); color: var(--noir); border: var(--contour); border-radius: 16px; padding: 14px 16px 12px; font-size: 15px; line-height: 1.4;
  opacity: 0; transform: scale(.92); transition: opacity .2s, transform .2s; pointer-events: none; }
.visite-bulle.visible { opacity: 1; transform: none; pointer-events: auto; }
.visite-points { display: flex; gap: 5px; margin-top: 10px; }
.visite-points i { width: 7px; height: 7px; border-radius: 50%; background: var(--gris-tres-clair); }
.visite-points i.on { background: var(--vert); }
.visite-boutons { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.visite-passer { color: var(--gris-texte); font-size: 14px; font-weight: 600; padding: 8px 4px; }
.visite-suivant { background: var(--vert); border: var(--contour); border-radius: 12px; padding: 8px 18px; font-weight: 700; font-size: 14px; color: var(--noir); }
/* La visite détaillée : les gestes de Yalla */
.visite-ko, .visite-oreille, .visite-poussiere { display: none; }
.visite-mira.ko .visite-normal, .visite-mira.ko .visite-fatigue { display: none; }
.visite-mira.ko .visite-ko { display: inline; }
.visite-mira.ko .visite-visage { transform: rotate(-100deg); }
.visite-etoiles { position: absolute; left: -6px; top: -30px; width: 70px; height: 30px; opacity: 0; transition: opacity .2s; }
.visite-etoiles i { position: absolute; font-style: normal; font-size: 16px; }
.visite-etoiles i:nth-child(1) { left: 0; top: 8px; } .visite-etoiles i:nth-child(2) { left: 26px; top: 0; } .visite-etoiles i:nth-child(3) { left: 50px; top: 10px; }
.visite-mira.ko .visite-etoiles { opacity: 1; animation: visite-tourne 1s linear infinite; }
@keyframes visite-tourne { to { transform: rotate(360deg); } }
.visite-mira.epousse .visite-visage { animation: visite-pousse-poussiere .2s 4 alternate; }
@keyframes visite-pousse-poussiere { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.visite-poussiere { position: absolute; left: 4px; top: 44px; width: 48px; height: 20px; }
.visite-mira.epousse .visite-poussiere { display: block; animation: visite-pouf .8s ease-out forwards; }
@keyframes visite-pouf { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(1.6) translateY(6px); } }
.visite-oreille { position: absolute; right: -16px; top: -10px; width: 34px; height: 60px; overflow: visible; }
.visite-mira.oreille .visite-oreille { display: block; }
.visite-mira.oreille .visite-visage { transform: rotate(-8deg); }
.visite-mira.pose .visite-visage { transform: rotate(-10deg) scale(1.05); }
.visite-mira.toque .visite-visage { animation: visite-toque .26s ease-in-out; }
@keyframes visite-toque { 0%, 100% { transform: none; } 50% { transform: translateY(6px) rotate(8deg); } }
.visite-mira.pousse .visite-visage { animation: visite-pousse .42s ease-in-out; }
.visite-mira.pousse-rtl .visite-visage { animation: visite-pousse-rtl .42s ease-in-out; }
@keyframes visite-pousse { 50% { transform: translateX(10px) rotate(12deg); } }
@keyframes visite-pousse-rtl { 50% { transform: translateX(-10px) rotate(-12deg); } }
.visite-mira.marche .visite-visage { animation: visite-marche .28s ease-in-out infinite alternate; }
@keyframes visite-marche { from { transform: rotate(-7deg) translateY(0); } to { transform: rotate(7deg) translateY(-4px); } }
.visite-ecrase { transform: scaleY(.88) !important; transition: transform .12s !important; }
.visite-tourne { animation: visite-tourne .5s linear infinite; }
.visite-toc { position: fixed; z-index: 205; font-weight: 800; font-size: 14px; color: var(--noir); background: var(--blanc); border: var(--contour); border-radius: 10px; padding: 2px 8px; pointer-events: none; }
.visite-flash { position: fixed; inset: 0; z-index: 206; background: #fff; pointer-events: none; animation: visite-flash .5s ease-out forwards; }
@keyframes visite-flash { from { opacity: .95; } to { opacity: 0; } }
.visite-prise { position: fixed; z-index: 202; width: 120px; height: 40px; pointer-events: none; }
.visite-prise svg { width: 100%; height: 100%; display: block; }
.visite-eclair { position: fixed; z-index: 205; font-size: 30px; pointer-events: none; animation: visite-eclair .65s ease-out forwards; }
@keyframes visite-eclair { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; transform: scale(1.2) rotate(20deg); } 100% { opacity: 0; transform: scale(1.6) rotate(40deg); } }
.visite-branchee { background: var(--vert-pale) !important; transition: background .3s; }
.visite-tiroir { transform: translateX(26px); transition: transform .5s cubic-bezier(.4,0,.2,1); }
.visite-tiroir-rtl { transform: translateX(-26px); transition: transform .5s cubic-bezier(.4,0,.2,1); }
/* ---------- Tes devoirs en photo (photo.js) ---------- */
.photo-ligne { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--gris-tres-clair); }
.photo-ligne:last-child { border-bottom: 0; }
.photo-coche { width: 22px; height: 22px; margin-top: 8px; accent-color: var(--vert); flex: none; }
.photo-textes { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.photo-titre { font: inherit; font-weight: 600; font-size: 15px; border: 1.5px solid var(--gris-tres-clair); border-radius: 10px; padding: 7px 10px; width: 100%; background: var(--blanc); color: var(--noir); }
.photo-details { display: flex; gap: 8px; }
.photo-type, .photo-date { font: inherit; font-size: 14px; border: 1.5px solid var(--gris-tres-clair); border-radius: 10px; padding: 6px 8px; background: var(--blanc); color: var(--noir); min-width: 0; }
.photo-type { flex: 0 0 auto; }
.photo-date { flex: 1; }
.photo-doute { font-size: 13px; color: #B5541C; font-weight: 600; }
/* ---------- Sans internet (app.js) ---------- */
.bandeau-hors-ligne { position: absolute; top: max(env(safe-area-inset-top), 8px); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 8px;
  background: #FFF3D6; color: var(--noir); border: var(--contour); border-radius: 14px; padding: 6px 14px; font-size: 13px; font-weight: 600; line-height: 1.3; width: max-content; max-width: calc(100% - 32px); }
.bandeau-hors-ligne[hidden] { display: none; }
/* ---------- Le glisser-déposer (fichiers.js) ---------- */
.zone-depot { position: absolute; inset: 0; z-index: 150; background: rgba(20, 30, 28, .55); display: grid; place-items: center; opacity: 0; transition: opacity .2s; pointer-events: none; }
.zone-depot.visible { opacity: 1; }
.zone-depot-boite { background: var(--blanc); border: 3px dashed var(--vert); border-radius: 24px; padding: 22px 28px; text-align: center; width: min(300px, calc(100% - 48px)); }
.zone-depot-boite p { font-size: 18px; font-weight: 700; margin-top: 8px; }
.zone-depot-boite span { font-size: 14px; color: var(--gris-texte); }
.zone-depot-visage svg { width: 150px; height: 118px; display: block; margin: 0 auto; transition: transform .3s; }
.zone-depot-visage .main { transition: transform .3s; transform-box: fill-box; transform-origin: center bottom; }
.zone-depot.visible .zone-depot-visage svg { animation: depot-attend 1.2s ease-in-out infinite alternate; }
@keyframes depot-attend { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.zone-depot.attrape .depot-main-g { transform: rotate(30deg) translate(18px, -6px); }
.zone-depot.attrape .depot-main-d { transform: rotate(-30deg) translate(-18px, -6px); }
/* ---------- Signaler un problème (signaler.js) ---------- */
.signaler-capture { margin-top: 10px; width: 100%; }
.signaler-capture.ajoutee { border-color: var(--vert); color: #0B6B5F; }
#ficheSignaler .bouton-vert { margin-top: 12px; }
.signaler-erreur { margin-top: 8px; }
/* ---------- Les récompenses (recompenses.js) ---------- */
.carte-now { position: relative; }
.serie-pastille { position: absolute; top: 10px; inset-inline-end: 12px; display: flex; align-items: center; gap: 4px; background: var(--blanc); border: var(--contour); border-radius: 999px; padding: 3px 10px 3px 7px; font-size: 13px; color: var(--noir); }
.serie-pastille b { font-size: 15px; }
.defi-mini { margin-top: 10px; width: 100%; display: flex; align-items: center; gap: 8px; background: var(--blanc); border: var(--contour); border-radius: 12px; padding: 7px 10px; font-size: 13px; color: var(--noir); text-align: start; }
.defi-mini-titre { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.defi-barre { flex: 1; height: 8px; border: 1.5px solid #000; border-radius: 99px; overflow: hidden; background: var(--blanc); display: block; min-width: 40px; }
.defi-barre i { display: block; height: 100%; background: #F2C14E; }
.bloc-serie { background: #FFF3D6; border: var(--contour); border-radius: 20px; padding: 14px; display: flex; gap: 14px; align-items: center; margin-top: 4px; }
.grosse-flamme { width: 74px; height: 74px; flex: none; border-radius: 50%; background: #FF8A3D; border: var(--contour); display: grid; place-items: center; }
/* La flamme : elle bouge (dès 3 jours), les étincelles montent (dès 7), le halo brille (30) */
.flamme { overflow: visible; flex: none; }
.flamme-corps { transform-box: fill-box; }
.flamme-n2 .flamme-corps path:first-child, .flamme-n3 .flamme-corps path:first-child, .flamme-n4 .flamme-corps path:first-child, .flamme-n5 .flamme-corps path:first-child { transform-origin: 50% 100%; transform-box: fill-box; animation: flamme-danse 1.6s ease-in-out infinite; }
.flamme-n4 .flamme-corps path:first-child, .flamme-n5 .flamme-corps path:first-child { animation-duration: 1.1s; }
.flamme-etincelles circle { transform-box: fill-box; transform-origin: center; animation: etincelle 1.8s ease-in infinite; }
.flamme-etincelles circle:nth-child(2) { animation-delay: .6s; }
.flamme-etincelles circle:nth-child(3) { animation-delay: 1.2s; }
.flamme-halo { transform-box: fill-box; transform-origin: center; animation: halo 2.2s ease-in-out infinite; }
@keyframes flamme-danse { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 30% { transform: scale(.96, 1.05) skewX(-3deg); } 65% { transform: scale(1.03, .97) skewX(3deg); } }
@keyframes etincelle { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-9px) scale(.3); opacity: 0; } }
@keyframes halo { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: .7; transform: scale(1.08); } }
.serie-pastille.flamme-grandit .flamme { animation: flamme-grandit 1.2s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes flamme-grandit { 0% { transform: scale(1); } 35% { transform: scale(2.2) rotate(-8deg); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .flamme *, .serie-pastille.flamme-grandit .flamme { animation: none !important; } }
.serie-nb { font-size: 26px; font-weight: 800; }
.serie-sous { font-size: 13px; color: var(--gris-texte); }
.serie-joker { margin-top: 6px; font-size: 12px; background: var(--blanc); border: 1.5px solid #000; border-radius: 99px; padding: 3px 9px; width: max-content; max-width: 100%; }
.serie-semaine { display: flex; justify-content: space-between; margin: 12px 4px 4px; }
.serie-jour { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--gris-texte); text-transform: uppercase; }
.serie-jour i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #000; display: block; background: var(--blanc); }
.serie-jour.ok i { background: #FF8A3D; }
.serie-jour.joker i { border-style: dashed; background: #FFF3D6; }
.serie-jour.libre i, .serie-jour.avenir i { background: var(--gris-tres-clair); border-color: #9AB3AF; }
.serie-jour.rate i { background: var(--blanc); border-color: #9AB3AF; }
.serie-jour.aujourdhui i { border-width: 3px; border-color: var(--vert); }
.defi-carte-page { border: var(--contour); border-radius: 16px; padding: 12px; display: flex; gap: 12px; align-items: center; }
.defi-carte-page.reussi { background: #D7F0D9; }
.defi-rond { width: 46px; height: 46px; flex: none; border-radius: 50%; background: #FBE3EC; border: var(--contour); display: grid; place-items: center; }
.defi-textes { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.defi-sous { font-size: 12px; color: var(--gris-texte); }
.niveau { font-size: 11px; font-weight: 800; border: 1.5px solid #000; border-radius: 99px; padding: 2px 8px; white-space: nowrap; color: var(--noir); }
.niveau.facile { background: #D7F0D9; } .niveau.moyen { background: #FFE7B8; } .niveau.difficile { background: #D5EEFA; }
.defi-choisir { width: 100%; }
.grille-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 6px; margin-bottom: 8px; }
.case-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: none; border: 0; padding: 0; color: var(--noir); }
.case-badge .badge-nom { font-size: 12px; font-weight: 700; line-height: 1.15; }
.case-badge.bloque .badge-nom { color: #9AB3AF; }
.case-badge .badge-aide { font-size: 10.5px; color: var(--gris-texte); line-height: 1.15; }
/* La fête d'un nouveau badge */
.fete-badge { position: absolute; inset: 0; z-index: 190; background: rgba(20, 30, 28, .6); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; overflow: hidden; }
.fete-badge.visible { opacity: 1; }
.fete-rayons { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255, 230, 120, .35) 0 10deg, transparent 10deg 20deg); animation: fete-tourne 14s linear infinite; }
@keyframes fete-tourne { to { transform: rotate(360deg); } }
.fete-confettis { position: absolute; inset: 0; pointer-events: none; }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; border: 1.5px solid #000; animation: confetti-tombe linear forwards; }
@keyframes confetti-tombe { to { transform: translateY(110vh) rotate(var(--tourne)); } }
.fete-mira { position: relative; z-index: 1; width: 84px; height: 84px; margin-bottom: -6px; animation: fete-saute .7s ease-in-out infinite alternate; }
@keyframes fete-saute { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-18px) rotate(6deg); } }
.fete-carte { position: relative; z-index: 1; background: var(--blanc); border: var(--contour); border-radius: 24px; padding: 18px 22px; width: min(300px, calc(100% - 48px)); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transform: scale(.7); transition: transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.fete-badge.visible .fete-carte { transform: none; }
.fete-nouveau { font-weight: 800; letter-spacing: 2px; font-size: 13px; color: #A05CC7; }
.fete-dessin { animation: fete-badge-arrive .8s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes fete-badge-arrive { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
.fete-nom { font-size: 20px; font-weight: 800; }
.fete-raison { font-size: 14px; color: var(--gris-texte); }
.fete-carte .bouton-vert { width: 100%; margin-top: 6px; }
/* Le défi : les 3 cartes */
.cartes-defi { position: absolute; inset: 0; z-index: 190; background: rgba(20, 30, 28, .6); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 12px; opacity: 0; transition: opacity .3s; }
.cartes-defi.visible { opacity: 1; }
.cartes-defi-mira { width: 70px; height: 70px; }
.cartes-defi-bulle { background: var(--blanc); border: var(--contour); border-radius: 16px; padding: 10px 14px; font-weight: 700; margin: 10px 0 18px; text-align: center; }
.cartes-defi-rang { display: flex; gap: 10px; justify-content: center; }
.carte-defi { position: relative; width: 108px; height: 196px; border: 0; padding: 0; background: none; perspective: 700px; transition: transform .35s, opacity .35s; }
.carte-defi > span { position: absolute; inset: 0; border: var(--contour); border-radius: 16px; box-shadow: 0 4px 0 #000; backface-visibility: hidden; transition: transform .55s cubic-bezier(.4, 0, .2, 1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; text-align: center; color: var(--noir); }
.carte-defi-dos { background: var(--vert); background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .18) 0 8px, transparent 8px 16px); }
.carte-defi-dos span { width: 52px; height: 52px; border-radius: 50%; background: var(--blanc); border: var(--contour); display: grid; place-items: center; font-size: 28px; font-weight: 800; }
.carte-defi-face { transform: rotateY(180deg); justify-content: flex-start !important; }
.carte-defi.facile .carte-defi-face { background: #F2FBF3; } .carte-defi.moyen .carte-defi-face { background: #FFF8E8; } .carte-defi.difficile .carte-defi-face { background: #EEF8FD; }
.carte-defi.retournee .carte-defi-dos { transform: rotateY(-180deg); }
.carte-defi.retournee .carte-defi-face { transform: rotateY(0); }
.carte-defi.moyen { transform: translateY(-10px); }
.carte-defi-rond { width: 52px; height: 52px; border-radius: 50%; border: var(--contour); background: var(--blanc); display: grid; place-items: center; }
.carte-defi-face b { font-size: 15px; line-height: 1.15; }
.carte-defi-face small { font-size: 12px; color: var(--gris-texte); line-height: 1.2; }
.cartes-defi-rang.choisi .carte-defi:not(.elue) { opacity: 0; transform: translateY(40px) scale(.8); }
.carte-defi.elue { transform: scale(1.25) !important; z-index: 1; }
.cartes-defi-aide { color: #fff; font-weight: 700; margin-top: 24px; font-size: 14px; text-align: center; }
.cartes-defi-tard { margin-top: 14px; color: #fff; font-weight: 600; font-size: 14px; background: none; border: 0; text-decoration: underline; }
/* Le bilan */
.bilan-tete { display: flex; gap: 12px; align-items: center; background: var(--vert-pale); border: var(--contour); border-radius: 18px; padding: 12px; margin-top: 4px; }
.bilan-tete .visage-mira { width: 52px; height: 52px; flex: none; }
.bilan-phrase { font-size: 13px; color: var(--gris-texte); margin-top: 2px; }
.bilan-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.bilan-stat { border: var(--contour); border-radius: 16px; padding: 10px 12px; }
.bilan-valeur { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.bilan-valeur small { font-size: 14px; color: var(--gris-texte); }
.bilan-label { font-size: 12px; color: var(--gris-texte); margin-bottom: 6px; }
.bilan-histo { display: flex; justify-content: space-between; align-items: flex-end; height: 110px; padding: 0 6px 0; border-bottom: 2px solid #000; margin-bottom: 26px; }
.bilan-col { position: relative; display: flex; flex-direction: column; align-items: center; width: 34px; }
.bilan-col i { display: block; width: 26px; background: var(--vert); border: 2px solid #000; border-bottom: 0; border-radius: 6px 6px 0 0; }
.bilan-col i.top { background: #F2C14E; } .bilan-col i.vide { background: var(--gris-tres-clair); border-color: #9AB3AF; }
.bilan-col span { position: absolute; bottom: -22px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.bilan-meilleur { text-align: center; font-size: 13px; color: var(--gris-texte); }
.bilan-badges { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.bilan-badges .case-badge { width: 90px; }
#bilanCorps .defi-carte-page { margin-top: 14px; }
/* Le panneau admin : les badges d'un compte */
.admin-badges-grille { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 4px; }
.admin-badges-grille .case-badge .badge-nom { font-size: 10.5px; }
.admin-badges-grille .case-badge.choisi { outline: 3px solid var(--vert); outline-offset: 2px; border-radius: 12px; }
.admin-badge-action { width: 100%; margin-top: 12px; }

/* ---------- L'admin : la série d'un compte ---------- */
.admin-serie-ligne { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.admin-serie-flamme { width: 40px; display: grid; place-items: center; }
.admin-serie-pas { width: 40px; height: 40px; border: var(--contour); border-radius: 12px; background: var(--blanc); font-size: 22px; font-weight: 800; color: var(--noir); }
.admin-serie-nombre { width: 90px; height: 40px; border: var(--contour); border-radius: 12px; text-align: center; font-size: 18px; font-weight: 800; background: var(--blanc); color: var(--noir); }

/* ---------- Yalla en tenue d'école (révisions, choix du programme) ---------- */
.chat-visage.en-tenue { width: 30px; height: 32px; margin-top: -4px; }
.chargement-tenue { width: 96px; height: 141px; }
.visage-mira.tenue svg { overflow: visible; }
.mira-toque { transform-box: view-box; transform-origin: 60px 0; }
.visage-mira.tenue .mira-toque { animation: toque-pose .7s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes toque-pose { 0% { transform: translateY(-60px) rotate(-14deg); opacity: 0; } 60% { transform: translateY(4px) rotate(3deg); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .visage-mira.tenue .mira-toque { animation: none; } }
.choix-drapeau { font-size: 28px; line-height: 1; }
.programme-nom { margin-top: 18px; }
.programme-note { margin-top: 14px; }
.programme-option { display: block; width: 100%; height: auto; min-height: 36px; padding: 7px 12px; line-height: 1.3; text-align: start; margin-top: 6px; }

/* ---------- « Yalla cette semaine » (journal.js) ---------- */
/* (les pastilles 🔥 et Yalla flottent en haut à droite : le texte de la carte passe à côté, jamais dessous) */
.pastilles-now { float: inline-end; display: flex; gap: 6px; margin-block: -6px 6px; margin-inline: 10px -6px; position: relative; z-index: 1; }
.pastilles-now .serie-pastille { position: static; }
.mira-pastille svg { display: block; }
.journal-semaine { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 12px; font-weight: 700; font-size: 15px; }
.journal-fleche { width: 38px; height: 38px; border: var(--contour); border-radius: 12px; background: var(--blanc); font-size: 22px; font-weight: 800; color: var(--noir); }
.journal-fleche:disabled { opacity: .3; }
.journal-gros { display: flex; align-items: center; gap: 16px; border: var(--contour); border-radius: 22px; padding: 16px; background: var(--vert-pale); }
.journal-gros svg { flex: none; }
.journal-nombre { font-size: 44px; font-weight: 800; line-height: 1; }
.journal-label { font-weight: 800; font-size: 16px; margin-top: 4px; }
.journal-tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 18px; }
.journal-tuile { border: var(--contour); border-radius: 18px; padding: 12px; background: var(--blanc); }
.journal-tuile-haut { display: flex; align-items: center; justify-content: space-between; }
.journal-tuile-nb { font-size: 30px; font-weight: 800; }
.journal-tuile-label { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--gris-texte); line-height: 1.3; }
.journal-icone { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border: 2.5px solid #000; border-radius: 11px; }
.journal-action { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 4px; border-bottom: 2px solid var(--gris-clair, #E3E6E4); background: none; text-align: start; color: var(--noir); }
.journal-action-textes { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.journal-action-texte { font-size: 15px; line-height: 1.35; }
.journal-pourquoi { font-size: 14px; line-height: 1.35; color: #1F6E64; background: var(--vert-pale); border-radius: 12px; padding: 8px 10px; }
.journal-heure { flex: none; font-size: 12px; font-weight: 700; color: var(--gris-texte); padding-top: 3px; }
.journal-vide { font-size: 15px; color: var(--gris-texte); line-height: 1.4; padding: 8px 4px; }
.journal-note { margin-top: 14px; }
.bilan-mira { display: flex; align-items: center; gap: 14px; width: 100%; margin: 16px 0 6px; padding: 14px; border: var(--contour); border-radius: 20px; background: var(--vert-pale); text-align: start; color: var(--noir); }
.bilan-mira svg { flex: none; }
.bilan-mira > span { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.35; }
.bilan-mira b { font-size: 16px; }
.bilan-mira-lien { font-weight: 800; color: #1F6E64; }
.admin-demo .admin-code { font-size: 12px; letter-spacing: 0; padding: 4px 8px; word-break: break-all; }
.admin-demo-mdp { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
/* Les champs « choisir un fichier » : invisibles mais pas « display: none » (Safari sur Mac refuse sinon d'ouvrir la fenêtre) */
.fichiers-caches { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ---------- La fenêtre « Importe ton fichier » (sur ordinateur : fichiers.js) ---------- */
.fenetre-import { position: fixed; inset: 0; z-index: 400; background: rgba(20, 30, 28, .55); display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.fenetre-import.visible { opacity: 1; }
.fenetre-import-boite { position: relative; width: min(420px, calc(100% - 32px)); background: var(--blanc); border: var(--contour); border-radius: 26px; padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.fenetre-import-titre { font-size: 20px; font-weight: 800; text-align: center; padding: 0 36px; }
.fenetre-import-fermer { position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; border: var(--contour); border-radius: 12px; background: var(--blanc); display: grid; place-items: center; }
.fenetre-import-zone { border: 3px dashed var(--vert); border-radius: 22px; padding: 18px 16px 20px; text-align: center; background: var(--vert-pale); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fenetre-import-zone svg { width: 150px; height: 118px; overflow: visible; }
.fenetre-import-texte { font-size: 17px; font-weight: 800; margin-top: 4px; }
.fenetre-import-zone span { font-size: 14px; color: var(--gris-texte); }

/* Pas de mot tout seul sur la dernière ligne (« … pour
   toi. ») : les titres et petits textes centrés sont équilibrés, les paragraphes « jolis » */
h1, h2, h3, .bienvenue-texte, .bienvenue-titre { text-wrap: balance; }
p { text-wrap: pretty; }

/* =============================================================
   Voice : tu parles à Yalla (voix.js)
   ============================================================= */
.ecran.onglet-voix .barre-ajout { display: none; }   /* (la bulle de Yalla reste : les messages) */
.ecran.onglet-voix .zone-ajout { visibility: visible; margin-bottom: 4px; }
.vue-voix { min-height: 100%; display: flex; flex-direction: column; }
.voix-haut { text-align: center; padding-top: 8px; }
.voix-scene { position: relative; width: 230px; height: 180px; margin: 0 auto; display: grid; place-items: center; --niveau: 0; }
.voix-scene .voix-visage { width: 136px; height: 136px; }
.voix-visage { position: relative; z-index: 1; transition: width .3s ease, height .3s ease; }
.voix-onde { position: absolute; left: 50%; top: 50%; width: 136px; height: 136px; margin: -68px 0 0 -68px; border: 3px solid var(--vert); border-radius: 50%; opacity: 0; transition: transform .12s linear, opacity .2s ease; }
.vue-voix[data-mode="ecoute"] .voix-onde { opacity: .55; }
.vue-voix[data-mode="ecoute"] .o1 { transform: scale(calc(1.06 + var(--niveau) * .14)); opacity: .7; }
.vue-voix[data-mode="ecoute"] .o2 { transform: scale(calc(1.14 + var(--niveau) * .28)); opacity: .4; }
.vue-voix[data-mode="ecoute"] .o3 { transform: scale(calc(1.22 + var(--niveau) * .42)); opacity: .2; }
.voix-bouche { display: none; }
.vue-voix[data-mode="parle"] .voix-sourire { display: none; }
.vue-voix[data-mode="parle"] .voix-bouche { display: block; }
.vue-voix[data-mode="reflechit"] .voix-yeux { animation: voix-pense 1.4s ease-in-out infinite; }
@keyframes voix-pense { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-6px, -4px); } 65% { transform: translate(6px, -4px); } }
.voix-yeux rect { transform-box: fill-box; transform-origin: center; animation: cligne 4s infinite; }
.voix-etat { min-height: 20px; font-size: 14px; font-weight: 600; color: var(--vert); }
.voix-bonjour { font-size: 24px; font-weight: 700; margin-top: 2px; }
.voix-sous { font-size: 14px; color: var(--gris-texte); margin-top: 4px; }
/* Avec une conversation : le visage plus petit, le texte en dessous */
.vue-voix.avec-fil .voix-scene { width: 110px; height: 92px; }
.vue-voix.avec-fil .voix-scene .voix-visage { width: 72px; height: 72px; }
.vue-voix.avec-fil .voix-onde { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.vue-voix.avec-fil .voix-bonjour, .vue-voix.avec-fil .voix-sous, .vue-voix.avec-fil .voix-idees { display: none; }
/* Bug 37 : les idées reviennent sous la conversation quand Yalla a fini de parler */
.vue-voix.avec-fil.idees-retour .voix-idees { display: flex; margin-top: 14px; }
.voix-fil { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.voix-fil:empty { display: none; }
.voix-moi { align-self: flex-end; max-width: 85%; border: var(--contour); border-radius: 18px 18px 6px 18px; padding: 9px 13px; background: var(--vert-pale); font-size: 15px; line-height: 1.35; }
.voix-bulle { max-width: 92%; border: var(--contour); border-radius: 18px 18px 18px 6px; padding: 11px 13px; background: var(--blanc); font-size: 15px; line-height: 1.4; }
.voix-bulle.soutien { background: #FFF6E5; }
.voix-carte { border: var(--contour); border-radius: 18px; padding: 12px 13px; background: var(--blanc); }
.voix-carte.meteo { background: #FFF8D6; }
.voix-carte.trajet { background: #E8F7FA; }
.voix-carte-titre { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--gris-texte); margin-bottom: 6px; }
.voix-carte-sous { font-size: 14px; color: var(--gris-texte); }
.meteo-ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.meteo-temp { font-size: 34px; font-weight: 700; }
.meteo-details { font-size: 13px; color: var(--gris-texte); text-align: end; line-height: 1.4; }
.trajet-gros { font-size: 22px; font-weight: 700; margin-bottom: 2px; }
.voix-ev { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 5px 0; }
.voix-ev.fait .voix-ev-t { text-decoration: line-through; color: var(--gris-texte); }
.voix-ev-h { width: 62px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--gris-texte); }
.voix-ev-c { width: 8px; height: 22px; flex-shrink: 0; border-radius: 4px; border: 1.5px solid var(--noir); }
.voix-idees { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.voix-idee { border: var(--contour); border-radius: 99px; padding: 8px 13px; font-size: 14px; font-weight: 600; background: var(--blanc); }
.voix-idee.vert { background: var(--vert-pale); }
.voix-clavier { display: flex; gap: 8px; width: 100%; margin-bottom: 12px; }
.voix-clavier[hidden] { display: none; }
.voix-bas { position: sticky; bottom: 0; margin-top: auto; padding: 22px 0 6px; display: flex; flex-direction: column; align-items: center; background: linear-gradient(transparent, var(--blanc) 24px); }
.voix-boutons { display: flex; align-items: center; justify-content: center; gap: 28px; }
.voix-rond .ti-x { display: none; }
.vue-voix.clavier-ouvert .voix-rond .ti-keyboard { display: none; }
.vue-voix.clavier-ouvert .voix-rond .ti-x { display: block; }
.vue-voix.clavier-ouvert #voixBoutonClavier { background: var(--vert-pale); }
.voix-ev.passe .voix-ev-t, .voix-ev.passe .voix-ev-h { color: var(--gris-texte); }
.voix-ev.passe .voix-ev-c { opacity: .45; }
.voix-ev-salle { color: var(--gris-texte); font-size: 13px; }
.voix-carte.question { background: var(--vert-pale); }
.question-texte { font-size: 19px; font-weight: 700; line-height: 1.3; }
.voix-reglages-haut { position: relative; height: 22px; margin: -14px -18px 6px; touch-action: none; cursor: grab; }
.voix-reglages.glisse { transition: none; }
.voix-rond { width: 52px; height: 52px; border: var(--contour); border-radius: 50%; background: var(--blanc); display: grid; place-items: center; font-size: 24px; }
.voix-micro { width: 84px; height: 84px; border: 3px solid var(--noir); border-radius: 50%; background: var(--vert); display: grid; place-items: center; font-size: 38px; box-shadow: 0 5px 0 var(--noir); transition: transform .1s ease, box-shadow .1s ease, background .2s ease; }
.voix-micro:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--noir); }
.voix-micro .ti-player-stop-filled { display: none; }
.vue-voix[data-mode="ecoute"] .voix-micro { background: var(--corail); }
.vue-voix[data-mode="ecoute"] .voix-micro .ti-microphone, .vue-voix[data-mode="parle"] .voix-micro .ti-microphone { display: none; }
.vue-voix[data-mode="ecoute"] .voix-micro .ti-player-stop-filled, .vue-voix[data-mode="parle"] .voix-micro .ti-player-stop-filled { display: block; }
.vue-voix[data-mode="reflechit"] .voix-micro { opacity: .6; }
/* Les réglages de la voix */
.voix-reglages-fond { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-end; justify-content: center; }
.voix-reglages { transition: transform .2s ease; width: min(100%, 430px); background: var(--blanc); border: var(--contour); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
.voix-reglages h2 { font-size: 22px; margin-bottom: 8px; }
.voix-reglage { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 2px solid var(--gris-lignes); padding: 13px 2px; font-size: 15px; }
.voix-seg { display: flex; border: var(--contour); border-radius: 12px; overflow: hidden; }
.voix-seg button { padding: 7px 11px; font-size: 13px; font-weight: 600; background: var(--blanc); border: 0; }
.voix-seg button + button { border-inline-start: var(--contour); }
.voix-seg button.choisi { background: var(--vert); }
.voix-essai { margin-top: 14px; width: 100%; }
.voix-note { font-size: 13px; color: var(--gris-texte); margin-top: 12px; line-height: 1.4; }
.voix-note.prive { border: var(--contour); border-radius: 14px; padding: 10px 12px; background: #F4F6F5; color: var(--noir); }
@media (prefers-reduced-motion: reduce) {
  .vue-voix[data-mode="reflechit"] .voix-yeux { animation: none; }
  .voix-onde { transition: none; }
}
/* Les petits écrans (iPhone dans Safari) : Yalla un peu plus petite, pour voir les idées et le micro */
@media (max-height: 720px) {
  .voix-scene { height: 140px; }
  .voix-scene .voix-visage { width: 104px; height: 104px; }
  .voix-onde { width: 104px; height: 104px; margin: -52px 0 0 -52px; }
  .voix-bonjour { font-size: 21px; }
  .voix-idees { margin-top: 12px; }
  .voix-micro { width: 72px; height: 72px; font-size: 32px; }
}

/* Voice : la carte « ✅ Fait » (Annuler), et la page sans la voix de Google */
.voix-carte.action { background: #E3F6EF; }
.voix-carte.action.annulee { background: #F4F6F5; }
.action-ligne { font-size: 15px; line-height: 1.4; }
.action-boutons { display: flex; gap: 10px; margin-top: 10px; }
.action-boutons button { flex: 1; }
.voix-note-sans-voix { font-size: 14px; color: var(--gris-texte); margin: 8px auto 0; max-width: 320px; }
.vue-voix.sans-voix #voixMicro, .vue-voix.sans-voix #voixBoutonClavier { display: none; }

/* Voice : le quiz oral (score), « je t'explique mon cours » (✓ / ✗), la dictée */
.voix-carte.score { background: #FFF6D9; text-align: center; }
.score-gros { font-size: 44px; font-weight: 800; line-height: 1.1; margin: 4px 0; }
.score-gros span { font-size: 24px; color: var(--gris-texte); }
.voix-carte.points { background: #F1F7FF; }
.point-ligne { display: flex; gap: 8px; font-size: 15px; line-height: 1.4; padding: 3px 0; }
.point-signe { font-weight: 800; width: 18px; flex: none; text-align: center; }
.point-ligne.dit .point-signe { color: #1F9E8F; }
.point-ligne.oublie .point-signe { color: #D9534F; }
.point-ligne.oublie { color: var(--gris-texte); }
.voix-carte.dictee { background: #F4F6F5; }
.voix-carte.dictee.finie { background: #E3F6EF; }
.dictee-texte { min-height: 90px; max-height: 260px; overflow-y: auto; background: #fff; border: 2px solid #000; border-radius: 12px; padding: 10px 12px; font-size: 15px; line-height: 1.45; margin: 6px 0; outline: none; text-align: start; }
.dictee-texte:empty::before { content: attr(data-vide); color: var(--gris-texte); }

/* Les idées à toucher : plus compactes, et jamais cachées sous le micro */
.voix-idees { margin-bottom: 14px; }
.voix-idee { padding: 7px 12px; font-size: 13.5px; }

/* (bug 25) Ce que l'élève a dit : 3 lignes au maximum (touche pour tout voir) */
.voix-moi { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; max-height: calc(4.05em + 12px); }
.voix-moi.ouvert { display: block; -webkit-line-clamp: unset; line-clamp: unset; max-height: none; }

/* Compte démo : la carte de bienvenue des juges */
.demo-bienvenue { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; animation: demo-entrer .22s ease-out; }
.demo-bienvenue.partir { opacity: 0; transition: opacity .2s; }
@keyframes demo-entrer { from { opacity: 0; } to { opacity: 1; } }
.demo-carte { width: 100%; max-width: 420px; background: var(--blanc); border: var(--contour); border-radius: 22px; padding: 22px 20px 16px; box-shadow: 0 6px 0 #000; text-align: center; }
.demo-titre { font-size: 21px; font-weight: 800; line-height: 1.25; margin: 0 0 6px; }
.demo-texte { font-size: 15px; line-height: 1.4; color: var(--gris-texte); margin: 0 0 16px; }
.demo-essais { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-essai { display: flex; flex-direction: column; align-items: center; gap: 6px; border: var(--contour); border-radius: 16px; padding: 14px 8px; background: var(--vert-pale); font-size: 15px; font-weight: 700; line-height: 1.2; }
.demo-icone { font-size: 26px; }
.demo-seul { margin-top: 14px; font-size: 15px; }
/* Compte démo : le texte à lire à Yalla (« Je t'explique mon cours », la dictée) */
.voix-carte.a-lire { background: #FFF6D9; }
.a-lire-texte { font-size: 16px; line-height: 1.5; margin: 6px 0; text-align: start; white-space: pre-line; }
.dictee-exemple { margin: 6px 0; text-align: start; }
.dictee-exemple summary { font-weight: 700; font-size: 14px; cursor: pointer; }
.dictee-exemple .a-lire-texte { max-height: 220px; overflow-y: auto; background: #FFF6D9; border-radius: 10px; padding: 8px 10px; font-size: 15px; }

/* Admin : le bouton « Open the demo » (dates, chiffres) */
.admin-date { cursor: pointer; }
.admin-date-champ { width: auto; min-width: 150px; padding: 6px 10px; font-size: 15px; margin-inline-start: auto; }
.admin-vert { color: #1F7A6E; }
.admin-demo-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.admin-demo-chiffre { border: 2px solid #000; border-radius: 12px; padding: 8px 4px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.admin-demo-chiffre b { font-size: 18px; }
.admin-demo-chiffre span { font-size: 12px; color: var(--gris-texte); }
/* La page d'accueil : la carte des juges (« Open the demo ») */
.juges-carte { border: var(--contour); border-radius: 18px; background: #FFF6D9; padding: 14px; margin-top: 16px; box-shadow: 0 4px 0 #000; text-align: start; }
.juges-titre { font-weight: 800; font-size: 16px; margin: 0 0 4px; }
.juges-texte { font-size: 14px; line-height: 1.4; margin: 0 0 10px; color: #3A3A3A; }
.juges-carte .gros-bouton { background: #F5C451; width: 100%; display: block; margin: 0; }
/* L'écran de connexion automatique (démo) */
.champ.auto-rempli { background: #F1FAF8; }

/* Compte démo : la phrase « agent IA », l'aide, le bouton 🧭 Guide de l'en-tête */
.demo-agent { font-size: 14px; line-height: 1.45; background: #FFF6D9; border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; text-align: start; }
.demo-aide { font-size: 12.5px; color: var(--gris-texte); margin: 6px 0 0; }
.demo-neuf { margin-top: 8px; font-size: 13px; color: var(--gris-texte); }
.demo-guide { margin-inline-start: auto; margin-inline-end: 10px; border: 2px solid #000; border-radius: 999px; background: #FFF6D9; font-weight: 700; font-size: 14px; padding: 6px 12px; }

/* « Je l'ai déjà faite » sous le bouton Start de la grande carte */
.now-deja { display: block; margin: 10px auto 0; font-size: 14px; }
