/* Espace équipe Mocha. Couleurs, ombres, rayons et polices repris de ui/src/theme.ts (thème « Livre illustré »).
   Fredoka : titres, boutons et TOUS les chiffres ; Atkinson Hyperlegible Next : texte courant. */

:root {
  color-scheme: light;
  /* Interface (clair) */
  --fond: #EEF4F1;
  --surface: #FFFFFF;
  --ivoire: #FBF7EE;
  --encre: #0F2A30;
  --ardoise: #3D5A5F;
  --nuit: #0E5160;
  --nuit2: #1D7684;
  --petrole: #105464;
  --sur-petrole: #FFFFFF;
  --eau: #DCEFE9;
  --bleu-pale: #DCEFEA;
  --bleu-txt: #0E5160;
  --ligne: #DCE7E3;
  --bordure: #7F9396;
  --page-bord: #D3E3DE;
  --sauge: #2F7A55;
  --sauge-txt: #2A6B4B;
  --sauge-pale: #DDF0E5;
  --grenat: #A3303F;
  --grenat-txt: #A3303F;
  --grenat-pale: #FBECEE;
  --safran: #FFB938;
  --safran-pale: #FFF1D2;
  --corail: #FF7A5C;
  --lagon: #5CC8B5;
  --croq: #4A6390;
  --cru-trait: #7D4F86;
  --cuivre-txt: #8A5410;
  --cuivre-pale: #FCEFD9;
  --past-rose: #F9D3D8;
  --past-cuivre: #FFDF9E;
  --past-sauge: #C9EBD8;
  --past-bleu: #BFE6DE;
  --conseil-pale: #FDF5DC;
  --conseil-txt: #6B5310;
  --terracotta-txt: #9A4325;
  --voile: rgba(15, 42, 48, .45);
  /* Dessins (jour) */
  --il-ciel: #FFB48A;
  --il-ciel2: #BFE6DE;
  --il-astre: #FFC845;
  --il-colline: #F2865E;
  --il-sol: #3A8C93;
  --il-chat: #93A5C6;
  --il-oeil: #FFB938;
  --il-bol: #FF7A5C;
  --il-encre: #13232B;
  /* Graphiques */
  --serie-1: #1D7684;
  --serie-2: #FF7A5C;
  --t-chatterie: #2F7A55;
  --t-partenaire: #E0892E;
  --t-youtubeur: #D3714F;
  /* Ombres (theme.ts : page, douce, relief, lèvre, tonal, barre) */
  --ombre-page: 0 3px 0 #D3E3DE, 0 16px 28px -18px rgba(14, 81, 96, .38);
  --ombre-douce: 0 2px 8px rgba(15, 42, 48, .08);
  --ombre-relief: 0 10px 22px -8px rgba(14, 81, 96, .32);
  --levre: inset 0 -4px 0 rgba(0, 0, 0, .24);
  --levre-appuyee: inset 0 -2px 0 rgba(0, 0, 0, .24);
  --tonal: inset 0 -3px 0 var(--page-bord);
  --ombre-barre: 0 -3px 0 var(--page-bord);
  /* Rayons (theme.ts : carte 28, barre 26, alerte 20, galet 14) */
  --r-carte: 28px;
  --r-tuile: 22px;
  --r-galet: 14px;
  --r-barre: 26px;
  --police-texte: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-titre: "Fredoka", "Atkinson Hyperlegible Next", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fond: #0B1D21; --surface: #14292E; --ivoire: #1B2A2A; --encre: #EAF4F1; --ardoise: #A6C0BF;
    --nuit: #103A44; --nuit2: #2A6A74; --petrole: #8FD0DC; --sur-petrole: #0B1D21; --eau: #18393D;
    --bleu-pale: #18393D; --bleu-txt: #9FE3D6; --ligne: #21393E; --bordure: #668085; --page-bord: #061114;
    --sauge: #8CC79F; --sauge-txt: #8CC79F; --sauge-pale: #1C3A2C; --grenat: #A3303F; --grenat-txt: #FF9EA6;
    --grenat-pale: #2E1A1E; --safran: #FFC75C; --safran-pale: #3A3018; --corail: #FF8A6C; --lagon: #6FD3C2;
    --croq: #93AEE6; --cru-trait: #B98BC6; --cuivre-txt: #F0B866; --cuivre-pale: #3A2E1E; --past-rose: #5A3A48;
    --past-cuivre: #5A4520; --past-sauge: #24503A; --past-bleu: #1F5257; --conseil-pale: #35301D; --conseil-txt: #F8DE99;
    --terracotta-txt: #F2A688; --voile: rgba(0, 0, 0, .6);
    --il-ciel: #1F5670; --il-ciel2: #1F5257; --il-astre: #F3E3B3; --il-colline: #143F50; --il-sol: #082A31;
    --il-chat: #8597BA; --il-oeil: #FFC75C; --il-bol: #E8694D; --il-encre: #13232B;
    --serie-1: #6FD3C2; --serie-2: #FF8A6C; --t-chatterie: #8CC79F; --t-partenaire: #F0B866; --t-youtubeur: #E08A69;
    --ombre-page: 0 3px 0 #061114, 0 14px 28px -16px rgba(0, 0, 0, .6);
    --ombre-douce: 0 2px 6px rgba(0, 0, 0, .35);
    --ombre-relief: 0 8px 20px -6px rgba(0, 0, 0, .65);
    --levre: inset 0 -4px 0 rgba(0, 0, 0, .28);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fond: #0B1D21; --surface: #14292E; --ivoire: #1B2A2A; --encre: #EAF4F1; --ardoise: #A6C0BF;
  --nuit: #103A44; --nuit2: #2A6A74; --petrole: #8FD0DC; --sur-petrole: #0B1D21; --eau: #18393D;
  --bleu-pale: #18393D; --bleu-txt: #9FE3D6; --ligne: #21393E; --bordure: #668085; --page-bord: #061114;
  --sauge: #8CC79F; --sauge-txt: #8CC79F; --sauge-pale: #1C3A2C; --grenat: #A3303F; --grenat-txt: #FF9EA6;
  --grenat-pale: #2E1A1E; --safran: #FFC75C; --safran-pale: #3A3018; --corail: #FF8A6C; --lagon: #6FD3C2;
  --croq: #93AEE6; --cru-trait: #B98BC6; --cuivre-txt: #F0B866; --cuivre-pale: #3A2E1E; --past-rose: #5A3A48;
  --past-cuivre: #5A4520; --past-sauge: #24503A; --past-bleu: #1F5257; --conseil-pale: #35301D; --conseil-txt: #F8DE99;
  --terracotta-txt: #F2A688; --voile: rgba(0, 0, 0, .6);
  --il-ciel: #1F5670; --il-ciel2: #1F5257; --il-astre: #F3E3B3; --il-colline: #143F50; --il-sol: #082A31;
  --il-chat: #8597BA; --il-oeil: #FFC75C; --il-bol: #E8694D; --il-encre: #13232B;
  --serie-1: #6FD3C2; --serie-2: #FF8A6C; --t-chatterie: #8CC79F; --t-partenaire: #F0B866; --t-youtubeur: #E08A69;
  --ombre-page: 0 3px 0 #061114, 0 14px 28px -16px rgba(0, 0, 0, .6);
  --ombre-douce: 0 2px 6px rgba(0, 0, 0, .35);
  --ombre-relief: 0 8px 20px -6px rgba(0, 0, 0, .65);
  --levre: inset 0 -4px 0 rgba(0, 0, 0, .28);
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 16px/1.5 var(--police-texte);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--police-titre); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: .005em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; margin-bottom: 12px; }
p { margin: 0; }
a { color: var(--bleu-txt); }
code, .code { font-family: var(--police-titre); }
.discret { color: var(--ardoise); }
.petit { font-size: 14px; }
.cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icone { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--lagon); outline-offset: 2px; }
.negatif { color: var(--grenat-txt) !important; }
.positif { color: var(--sauge-txt); }

/* ---------- Coquille : menu latéral (ordinateur), onglets en bas (téléphone) ---------- */

.coquille { display: none; }
body.connecte .coquille {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}
.barre-mobile, .onglets { display: none; }

.menu {
  position: sticky; top: 16px;
  height: calc(100vh - 32px);
  margin: 16px 0 16px 16px;
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 22px;
  background: var(--nuit);
  color: #fff;
  border-radius: var(--r-carte);
  box-shadow: var(--ombre-relief);
}
.marque { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.marque strong { display: block; font-family: var(--police-titre); font-size: 24px; font-weight: 600; line-height: 1; }
.marque span { font-size: 13px; opacity: .8; }
.menu nav { display: grid; gap: 4px; }
.menu-bas { margin-top: auto; display: grid; gap: 4px; }
.nav-lien {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 14px;
  color: inherit; text-decoration: none;
  font: 600 16px var(--police-titre);
  background: none; border: 0; border-radius: 16px; cursor: pointer; text-align: left; width: 100%;
}
.nav-lien:hover { background: rgba(255, 255, 255, .08); }
.nav-lien.actif { background: rgba(255, 255, 255, .16); box-shadow: inset 4px 0 0 var(--safran); }
.menu-bas .nav-lien { font-size: 14px; opacity: .85; min-height: 44px; }
.nav-icone { position: relative; display: inline-flex; }
.badge-nav {
  position: absolute; top: -7px; right: -10px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  font: 600 11px var(--police-titre); color: #fff;
  background: var(--corail); border-radius: 999px; border: 2px solid var(--nuit);
}

.chat .chat-corps { fill: var(--il-chat); }
.chat .chat-oeil { fill: var(--il-oeil); }
.chat .chat-nez { fill: var(--past-rose); }
.chat .chat-trait { fill: none; stroke: var(--il-encre); stroke-width: 2; stroke-linecap: round; }

.contenu {
  min-width: 0;
  padding: 28px 32px 48px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  display: grid; gap: 22px; align-content: start;
}
.contenu:focus { outline: none; }

@media (max-width: 899px) {
  body.connecte .coquille { display: block; }
  .menu { display: none; }
  .barre-mobile {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: color-mix(in srgb, var(--fond) 88%, transparent);
    backdrop-filter: blur(10px);
  }
  .barre-mobile .marque { padding: 0; gap: 8px; }
  .barre-mobile .marque strong { font-size: 22px; color: var(--petrole); }
  .barre-actions { display: flex; gap: 4px; }
  .barre-actions .nav-texte { display: none; }
  .onglets {
    position: fixed; z-index: 6; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-radius: var(--r-barre) var(--r-barre) 0 0;
    box-shadow: var(--ombre-barre), 0 -8px 24px -12px rgba(14, 81, 96, .25);
  }
  .onglet {
    display: grid; justify-items: center; gap: 2px;
    min-height: 56px; padding: 6px 2px;
    color: var(--ardoise); text-decoration: none;
    font: 600 13px var(--police-titre);
    border-radius: 18px;
  }
  .onglet .nav-icone { padding: 3px 16px; border-radius: 999px; }
  .onglet.actif { color: var(--petrole); }
  .onglet.actif .nav-icone { background: var(--eau); }
  .onglet .badge-nav { border-color: var(--surface); right: 4px; }
  .contenu { padding: 8px 16px calc(110px + env(safe-area-inset-bottom)); gap: 18px; }
  h1 { font-size: 26px; }
}

/* ---------- Connexion ---------- */

.connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.connexion-carte { width: min(400px, 100%); padding: 28px 28px 24px; text-align: center; display: grid; gap: 6px; }
.connexion-arche { width: 160px; height: 120px; margin: 0 auto 6px; }
.connexion-carte h1 { color: var(--petrole); font-size: 34px; }
.connexion-form { display: grid; gap: 10px; margin-top: 18px; text-align: left; }
.connexion-form label { font-weight: 700; }

/* ---------- Cartes, tuiles, sections ---------- */

.carte {
  background: var(--surface);
  border-radius: var(--r-carte);
  padding: 22px 24px;
  box-shadow: var(--ombre-page);
  min-width: 0;
}
.carte.plate { box-shadow: 0 1px 0 var(--ligne); border: 1px solid var(--ligne); }
.carte.relief { box-shadow: var(--ombre-relief); }
.carte.alerte { background: var(--grenat-pale); box-shadow: none; display: grid; gap: 12px; justify-items: start; }
.carte.alerte h3 { margin: 0; color: var(--grenat-txt); }
.section { display: grid; gap: 14px; min-width: 0; }
.section-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-tete h2, .section-tete h3 { margin: 0; }
.carte > .section-tete { margin-bottom: 10px; }
.page-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-tete h1 { color: var(--petrole); }
.page-tete p { margin-top: 4px; }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grille-2.haut { align-items: stretch; }
@media (max-width: 1100px) { .grille-2 { grid-template-columns: minmax(0, 1fr); } }

.accueil {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px;
  background: linear-gradient(120deg, var(--eau), var(--surface) 70%);
  overflow: hidden;
}
.accueil h1 { color: var(--petrole); font-size: 34px; }
.accueil .surtitre { font: 600 14px var(--police-titre); color: var(--ardoise); text-transform: capitalize; }
.accueil-arche { width: 150px; height: 112px; flex: none; margin: -6px 0 -22px; }
@media (max-width: 899px) { .accueil-arche { width: 104px; height: 78px; margin-bottom: -22px; } .accueil h1 { font-size: 28px; } .accueil { padding: 18px 20px; } }

.arche .il-ciel { fill: var(--il-ciel2); }
.arche .il-astre { fill: var(--il-astre); }
.arche .il-colline { fill: var(--il-colline); }
.arche .il-sol { fill: var(--il-sol); }
.arche .il-chat { fill: var(--il-chat); }
.arche .il-oeil { fill: var(--il-oeil); }
.arche .il-bol { fill: var(--il-bol); }

.tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tuiles.cinq { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tuiles, .tuiles.cinq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .tuiles, .tuiles.cinq { gap: 10px; } }
.tuile {
  --teinte-fond: var(--past-bleu); --teinte-txt: var(--bleu-txt);
  padding: 16px 18px 15px;
  border-radius: var(--r-tuile);
  background: var(--teinte-fond);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .06);
  display: grid; gap: 4px; align-content: start;
  min-width: 0;
}
.tuile-haut { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--teinte-txt); }
.tuile-libelle { font: 600 15px/1.25 var(--police-titre); }
.tuile-valeur {
  font: 600 38px/1.05 var(--police-titre);
  color: var(--encre);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.tuile-note { font-size: 13px; color: var(--ardoise); line-height: 1.35; }
.tuiles.cinq .tuile-valeur { font-size: 32px; }
@media (max-width: 899px) { .tuile-valeur { font-size: 30px; } .tuiles.cinq .tuile-valeur { font-size: 26px; } .tuile { padding: 14px 14px 13px; } }
.teinte-bleu { --teinte-fond: var(--past-bleu); --teinte-txt: var(--bleu-txt); }
.teinte-sauge { --teinte-fond: var(--past-sauge); --teinte-txt: var(--sauge-txt); }
.teinte-safran { --teinte-fond: var(--safran-pale); --teinte-txt: var(--cuivre-txt); }
.teinte-rose { --teinte-fond: var(--past-rose); --teinte-txt: var(--cru-trait); }
.teinte-cuivre { --teinte-fond: var(--cuivre-pale); --teinte-txt: var(--cuivre-txt); }
.teinte-corail { --teinte-fond: var(--past-rose); --teinte-txt: var(--terracotta-txt); }
.teinte-corail .tuile-valeur { color: var(--terracotta-txt); }

.connecter { display: flex; gap: 16px; align-items: flex-start; background: var(--conseil-pale); box-shadow: none; border: 2px dashed var(--page-bord); }
.connecter h3 { margin-bottom: 6px; }
.connecter p + p { margin-top: 6px; font-size: 14px; }
.connecter-icone { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 18px; background: var(--past-cuivre); color: var(--cuivre-txt); }

/* ---------- Boutons et champs ---------- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px 12px;
  font: 600 16px var(--police-titre);
  color: var(--sur-petrole); background: var(--petrole);
  border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: var(--levre);
  text-decoration: none; white-space: nowrap;
}
.bouton:hover { filter: brightness(1.08); }
.bouton:active { box-shadow: var(--levre-appuyee); transform: translateY(1px); }
.bouton:disabled { opacity: .55; cursor: default; filter: none; }
.bouton.petit { min-height: 40px; padding: 7px 16px 9px; font-size: 15px; }
.bouton.large { width: 100%; }
.bouton.contour { background: var(--surface); color: var(--petrole); box-shadow: inset 0 0 0 2px var(--page-bord), var(--tonal); }
.bouton.tonal { background: var(--eau); color: var(--bleu-txt); box-shadow: var(--tonal); }
.bouton.danger { background: var(--grenat); color: #fff; }
.bouton-icone {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  color: var(--ardoise); background: none; border: 0; border-radius: 14px; cursor: pointer;
}
.bouton-icone:hover { background: var(--eau); color: var(--petrole); }
.lien-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 2px; min-height: 36px;
  font: 600 15px var(--police-titre); color: var(--bleu-txt);
  background: none; border: 0; cursor: pointer;
}
.lien-action:hover { text-decoration: underline; }
.lien-action.retour { justify-self: start; margin-bottom: -10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font: 16px/1.4 var(--police-texte); color: var(--encre);
  background: var(--surface);
  border: 2px solid var(--ligne); border-radius: var(--r-galet);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--nuit2); box-shadow: 0 0 0 3px var(--eau); }
.verifie :invalid { border-color: var(--grenat-txt); }
input.majuscules { text-transform: uppercase; font-family: var(--police-titre); letter-spacing: .04em; }
input[type="checkbox"] { width: auto; min-height: 0; }
.champ { display: grid; gap: 6px; min-width: 0; }
.champ label { font-weight: 700; font-size: 15px; }
.aide { font-size: 13px; color: var(--ardoise); }
.erreur { color: var(--grenat-txt); min-height: 1.2em; font-weight: 700; font-size: 15px; }
.erreur:empty { min-height: 0; }
.grille-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grille-champs .large { grid-column: 1 / -1; }
@media (max-width: 560px) { .grille-champs { grid-template-columns: minmax(0, 1fr); } }

.segments {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--eau); border-radius: var(--r-barre);
  overflow-x: auto; max-width: 100%;
  scrollbar-width: none;
}
.segments button {
  min-height: 40px; padding: 6px 16px;
  font: 600 15px var(--police-titre); color: var(--bleu-txt);
  background: none; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.segments button.actif { background: var(--surface); color: var(--encre); box-shadow: var(--ombre-douce), inset 0 -2px 0 var(--page-bord); }

.interrupteur { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-size: 15px; user-select: none; }
.interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.glissiere { position: relative; width: 46px; height: 28px; flex: none; border-radius: 999px; background: var(--avenir, var(--ligne)); box-shadow: inset 0 0 0 2px var(--page-bord); transition: background .15s; }
.glissiere::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.interrupteur input:checked + .glissiere { background: var(--sauge); box-shadow: none; }
.interrupteur input:checked + .glissiere::after { transform: translateX(18px); }
.interrupteur input:focus-visible + .glissiere { outline: 3px solid var(--lagon); outline-offset: 2px; }

/* ---------- États ---------- */

.vide { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 18px 12px 10px; color: var(--ardoise); }
.vide-arche { width: 120px; height: 90px; margin-bottom: 6px; }
.vide-titre { font: 600 18px var(--police-titre); color: var(--encre); }
.vide .bouton { margin-top: 10px; }
.chargement { display: flex; align-items: center; gap: 12px; padding: 22px 4px; color: var(--ardoise); }
.rond { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--eau); border-top-color: var(--nuit2); animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rond { animation-duration: 3s; } }

.toasts { position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
@media (max-width: 899px) { .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); } }
.toast { padding: 12px 18px; border-radius: 18px; background: var(--encre); color: var(--fond); font-weight: 700; box-shadow: var(--ombre-relief); transition: opacity .3s, transform .3s; }
.toast.erreur { background: var(--grenat); color: #fff; }
.toast.part { opacity: 0; transform: translateY(8px); }

/* ---------- Fenêtres (feuille du bas sur téléphone) ---------- */

.fenetre {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0; border: 0;
  color: var(--encre); background: var(--surface);
  border-radius: var(--r-carte);
  box-shadow: var(--ombre-relief);
}
.fenetre::backdrop { background: var(--voile); }
.fenetre-form { display: grid; gap: 14px; padding: 24px; }
.fenetre-form header h2 { color: var(--petrole); }
.sous-titre { color: var(--ardoise); margin-top: 4px; }
.fenetre-form footer { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .fenetre { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 30px 30px 0 0; max-height: 92vh; }
  .fenetre-form { padding: 22px 16px calc(18px + env(safe-area-inset-bottom)); }
  .fenetre-form footer .bouton { flex: 1; }
}
.apercu-points { padding: 12px 16px; border-radius: var(--r-galet); background: var(--safran-pale); color: var(--cuivre-txt); font: 600 16px var(--police-titre); }
.note-info { padding: 10px 14px; border-radius: var(--r-galet); background: var(--conseil-pale); color: var(--conseil-txt); font-size: 14px; }
.bilan-achat { display: grid; gap: 6px; padding: 12px 16px; border-radius: var(--r-galet); background: var(--eau); }
.bilan-achat:empty { display: none; }
.bilan-achat div { display: flex; justify-content: space-between; gap: 12px; }
.bilan-achat strong { font-family: var(--police-titre); font-size: 17px; }
.bilan-achat .reste { border-top: 2px solid var(--page-bord); padding-top: 6px; color: var(--sauge-txt); }
.bilan-achat .manque { border-top: 2px solid var(--page-bord); padding-top: 6px; color: var(--grenat-txt); }

/* ---------- Graphiques ---------- */

.figure { margin: 0; }
.graph-boite { position: relative; width: 100%; min-height: 120px; }
.graph { display: block; overflow: visible; touch-action: pan-y; }
.graph .grille { stroke: var(--ligne); stroke-width: 1; }
.graph .axe { fill: var(--ardoise); font: 12px var(--police-titre); }
.graph .ligne-serie { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.graph .ligne-serie.serie-1, .graph .point.serie-1 { stroke: var(--serie-1); }
.graph .ligne-serie.serie-2, .graph .point.serie-2 { stroke: var(--serie-2); }
.graph .aire.serie-1 { fill: var(--serie-1); opacity: .14; }
.graph .point { fill: var(--surface); stroke-width: 3; }
.graph .repere { stroke: var(--bordure); stroke-dasharray: 3 4; }
.graph .repere, .graph .point { visibility: hidden; }
.graph.survol .repere, .graph.survol .point { visibility: visible; }
.graph .barre { fill: var(--serie-1); }
.graph .barre.serie-2 { fill: var(--serie-2); }
.graph .barre.t-chatterie { fill: var(--t-chatterie); }
.graph .barre.t-partenaire { fill: var(--t-partenaire); }
.graph .barre.t-youtubeur { fill: var(--t-youtubeur); }
.graph .zone { fill: transparent; cursor: default; }
.graph .zone:hover { fill: var(--eau); opacity: .5; }
.bulle-graph {
  position: absolute; top: -8px; z-index: 2;
  padding: 8px 12px; border-radius: 14px;
  background: var(--encre); color: var(--fond);
  font-size: 13px; line-height: 1.35; white-space: nowrap;
  pointer-events: none; box-shadow: var(--ombre-relief);
}
.bulle-graph strong { font-family: var(--police-titre); font-weight: 600; text-transform: capitalize; }
.legende { display: flex; gap: 18px; margin-top: 10px; font-size: 14px; color: var(--ardoise); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.pastille-serie { width: 14px; height: 4px; border-radius: 2px; background: var(--serie-1); }
.pastille-serie.serie-2 { background: var(--serie-2); }

.classement { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.classement-ligne {
  display: flex; gap: 12px; align-items: center; width: 100%;
  padding: 10px 10px; border: 0; border-radius: 16px; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.classement-ligne:hover { background: var(--eau); }
.classement-ligne:disabled { cursor: default; }
.rang { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 12px; background: var(--eau); color: var(--bleu-txt); font: 600 16px var(--police-titre); }
.rang-1 { background: var(--safran); color: #4A3405; }
.classement-corps { display: grid; gap: 5px; flex: 1; min-width: 0; }
.classement-haut { display: flex; justify-content: space-between; gap: 10px; }
.classement-nom { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.classement-valeur { font: 600 16px var(--police-titre); white-space: nowrap; }
.classement-note { font-size: 13px; color: var(--ardoise); }
.jauge { height: 8px; border-radius: 999px; background: var(--ligne); overflow: hidden; }
.jauge-plein { display: block; height: 100%; border-radius: 999px; background: var(--serie-1); }
.jauge-plein.t-chatterie { background: var(--t-chatterie); }
.jauge-plein.t-partenaire { background: var(--t-partenaire); }
.jauge-plein.t-youtubeur { background: var(--t-youtubeur); }

/* ---------- Badges, avatars ---------- */

.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font: 600 13px var(--police-titre); background: var(--eau); color: var(--bleu-txt); }
.badge.t-chatterie { background: var(--past-sauge); color: var(--sauge-txt); }
.badge.t-partenaire { background: var(--past-cuivre); color: var(--cuivre-txt); }
.badge.t-youtubeur { background: var(--past-rose); color: var(--terracotta-txt); }
.badge.t-archive { background: var(--ligne); color: var(--ardoise); }
.code { display: inline-block; padding: 1px 8px; border-radius: 8px; background: var(--ivoire); border: 1px solid var(--page-bord); font-size: 13px; letter-spacing: .04em; color: var(--encre); }
.avatar {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; flex: none;
  border-radius: 16px 16px 12px 12px;
  font: 600 18px var(--police-titre);
  background: var(--past-bleu); color: var(--bleu-txt);
}
.avatar.petit { width: 40px; height: 40px; font-size: 16px; border-radius: 14px 14px 10px 10px; }
.avatar.grand { width: 72px; height: 72px; font-size: 26px; border-radius: 36px 36px 16px 16px; }
.avatar.t-chatterie { background: var(--past-sauge); color: var(--sauge-txt); }
.avatar.t-partenaire { background: var(--past-cuivre); color: var(--cuivre-txt); }
.avatar.t-youtubeur { background: var(--past-rose); color: var(--terracotta-txt); }

/* ---------- Partenaires ---------- */

.barre-outils { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 12px; border-radius: var(--r-barre); }
.recherche { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 0; padding: 0 6px 0 12px; border-radius: var(--r-galet); background: var(--fond); color: var(--ardoise); }
.recherche input { border: 0; background: none; padding-left: 0; box-shadow: none; }
.recherche:focus-within { box-shadow: 0 0 0 3px var(--eau); }
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.carte-partenaire {
  display: grid; gap: 16px; text-align: left; font: inherit; color: inherit;
  border: 0; cursor: pointer; padding: 18px 20px;
  transition: transform .15s, box-shadow .15s;
}
.carte-partenaire:hover { transform: translateY(-2px); box-shadow: var(--ombre-relief); }
.carte-partenaire.archive { opacity: .7; }
.cp-haut { display: flex; gap: 12px; align-items: center; min-width: 0; }
.cp-nom { display: grid; gap: 4px; min-width: 0; }
.cp-nom strong { font: 600 18px/1.2 var(--police-titre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-sous { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 12px 0 0; border-top: 2px dotted var(--ligne); }
.cp-stats dt { font-size: 12px; color: var(--ardoise); }
.cp-stats dd { margin: 0; font: 600 18px var(--police-titre); white-space: nowrap; }

.fiche-tete { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.fiche-titre { flex: 1; min-width: 200px; display: grid; gap: 6px; }
.fiche-titre h1 { color: var(--petrole); overflow-wrap: anywhere; }
.infos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 0; }
.infos dt { font-size: 13px; color: var(--ardoise); }
.infos dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.infos dd a { display: inline-flex; align-items: center; gap: 4px; }
.infos .large { grid-column: 1 / -1; }
.infos .notes { white-space: pre-wrap; font-weight: 400; padding: 10px 14px; background: var(--ivoire); border-radius: var(--r-galet); }

.tableau-defile { position: relative; overflow-x: auto; margin: 6px -8px 0; }
@media (max-width: 560px) {
  .tableau { font-size: 14px; }
  .tableau th, .tableau td:first-child { white-space: normal; }
  .tableau th, .tableau td { padding-left: 4px; padding-right: 4px; }
  .actions-ligne .bouton-icone { width: 38px; }
}
.tableau { width: 100%; border-collapse: collapse; font-size: 15px; }
.tableau th { text-align: left; font: 600 13px var(--police-titre); color: var(--ardoise); padding: 8px; border-bottom: 2px solid var(--ligne); white-space: nowrap; }
.tableau td { padding: 6px 8px; border-bottom: 1px solid var(--ligne); white-space: nowrap; }
.tableau td:first-child { text-transform: capitalize; font-weight: 700; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau .nb { text-align: right; font-family: var(--police-titre); font-variant-numeric: tabular-nums; }
.actions-ligne { text-align: right; width: 1%; }

.journal { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.journal li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--ligne); }
.journal li:last-child { border-bottom: 0; }
.j-type { padding: 2px 10px; border-radius: 999px; font: 600 12px var(--police-titre); min-width: 92px; text-align: center; }
.j-gain .j-type { background: var(--past-sauge); color: var(--sauge-txt); }
.j-ajustement .j-type { background: var(--conseil-pale); color: var(--conseil-txt); }
.j-achat .j-type { background: var(--past-rose); color: var(--terracotta-txt); }
.j-motif { min-width: 0; overflow-wrap: anywhere; }
.j-motif::first-letter { text-transform: uppercase; }
.j-motif time { display: block; font-size: 13px; color: var(--ardoise); }
.j-motif .lien-action { padding: 0; min-height: 0; }
.j-points { font: 600 18px var(--police-titre); white-space: nowrap; }
@media (max-width: 560px) { .j-type { min-width: 0; } .journal li { grid-template-columns: 1fr auto; } .j-type { grid-column: 1 / -1; justify-self: start; } }

/* ---------- Points et boutique ---------- */

.carte-regle { background: linear-gradient(160deg, var(--safran-pale), var(--surface) 75%); display: grid; gap: 14px; align-content: start; }
.carte-regle h2 { color: var(--petrole); }
.regle { display: grid; gap: 12px; justify-items: start; }
.regle-ligne { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 17px; }
.gros-nombre { width: 120px; font: 600 30px var(--police-titre); text-align: center; padding: 6px 10px; }
.puces { margin: 0; padding-left: 20px; color: var(--ardoise); font-size: 14px; display: grid; gap: 4px; }
.soldes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; max-height: 360px; overflow-y: auto; }
.solde-ligne { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; border-radius: 16px; cursor: pointer; }
.solde-ligne:hover { background: var(--eau); }
.solde-nom { flex: 1; min-width: 0; display: grid; }
.solde-nom strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.solde-valeur { font: 600 18px var(--police-titre); color: var(--cuivre-txt); white-space: nowrap; }
.catalogue { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 6px; }
.recompense { display: grid; grid-template-rows: auto 1fr auto; border-radius: 22px; background: var(--ivoire); box-shadow: inset 0 0 0 1px var(--page-bord); overflow: hidden; }
.recompense.inactive { opacity: .6; }
.recompense-image { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--past-cuivre); color: var(--cuivre-txt); border-radius: 60px 60px 12px 12px / 40px 40px 12px 12px; margin: 10px 10px 0; overflow: hidden; }
.recompense-image img { width: 100%; height: 100%; object-fit: cover; }
.recompense-corps { padding: 12px 16px 4px; display: grid; gap: 4px; align-content: start; }
.recompense-corps h3 { margin: 0; font-size: 17px; }
.prix { font: 600 20px var(--police-titre); color: var(--cuivre-txt); }
.recompense-actions { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 12px 8px; }

/* ---------- Tchat ---------- */

.tchat { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; height: calc(100vh - 76px); min-height: 480px; }
.conv-colonne { padding: 8px; overflow-y: auto; border-radius: var(--r-carte); }
.conv-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.conv {
  display: flex; gap: 12px; align-items: center; width: 100%;
  padding: 10px; border: 0; border-radius: 18px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.conv:hover { background: var(--fond); }
.conv.actif { background: var(--eau); }
.conv-corps { display: grid; flex: 1; min-width: 0; }
.conv-haut { display: flex; justify-content: space-between; gap: 8px; }
.conv-nom { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-date { font-size: 13px; color: var(--ardoise); white-space: nowrap; font-family: var(--police-titre); }
.conv-apercu { font-size: 14px; color: var(--ardoise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.non-lu .conv-nom, .conv.non-lu .conv-apercu { color: var(--encre); font-weight: 700; }
.point-non-lu { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--corail); }
.fil { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; min-height: 0; }
.fil > .vide { margin: auto; }
.fil-tete { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--ligne); }
.fil-tete h2 { font-size: 20px; }
.retour-fil { display: none; }
.messages { list-style: none; margin: 0; padding: 4px 2px; display: flex; flex-direction: column; gap: 10px; flex: 1; overflow-y: auto; min-height: 0; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { display: block; margin-top: 4px; font-size: 12px; opacity: .75; font-family: var(--police-titre); }
.msg.app { align-self: flex-start; background: var(--bleu-pale); border-bottom-left-radius: 6px; }
.msg.equipe { align-self: flex-end; background: var(--petrole); color: var(--sur-petrole); border-bottom-right-radius: 6px; }
.reponse { display: flex; gap: 10px; align-items: flex-end; }
.reponse textarea { min-height: 52px; max-height: 200px; border-radius: 20px; }
.rond-envoi { flex: none; }
@media (max-width: 899px) {
  .tchat { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 190px - env(safe-area-inset-bottom)); min-height: 380px; }
  .tchat.ouvert .conv-colonne { display: none; }
  .tchat:not(.ouvert) .fil { display: none; }
  .retour-fil { display: inline-grid; margin-left: -8px; }
  .rond-envoi { width: 52px; height: 52px; padding: 0; }
  .rond-envoi .texte-bouton { display: none; }
  .msg { max-width: 88%; }
  .fil { padding: 12px; }
}
body[data-page="tchat"] .contenu { gap: 0; }

/* 15/11 (porteur) : « Mocha en chiffres » (js/chiffres.js). */
:root { --serie-3: #F2A900; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --serie-3: #FFC75C; } }
:root[data-theme="dark"] { --serie-3: #FFC75C; }
.jauge-plein.serie-2 { background: var(--serie-2); }
.jauge-plein.serie-3 { background: var(--serie-3); }
.tuiles-grandes { margin-bottom: 14px; }
.tuile-grande { padding-block: 20px; }
.tuile-grande .tuile-valeur { font-size: clamp(34px, 4vw, 44px); }
.puces-store { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.puce-store {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--encre); font-size: 13px;
}
.puce-store i { width: 8px; height: 8px; border-radius: 50%; background: var(--ardoise); }
.puce-store.ios i { background: var(--serie-1); }
.puce-store.android i { background: var(--serie-2); }
.entonnoir { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 16px; }
.entonnoir-haut { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.entonnoir-haut strong { font-family: "Fredoka", sans-serif; font-size: 20px; }
.jauge.grosse { display: block; height: 14px; }
.partage { display: flex; height: 22px; border-radius: 999px; overflow: hidden; margin: 10px 0 6px; gap: 3px; }
.partage-ios { background: var(--serie-1); }
.partage-android { background: var(--serie-2); }
.partage-ligne { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--ligne); }
.partage-ligne:last-child { border-bottom: 0; }
.carte.stores { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.stores-liens { display: flex; flex-wrap: wrap; gap: 10px; }
.stores-liens .bouton { text-decoration: none; }

/* ---------- Espace partenaire (/partenaire, lecture seule) ---------- */

.espace .contenu { max-width: 1040px; padding-bottom: 56px; }
.barre-espace {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1040px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 32px 0;
}
.barre-espace .marque { padding: 0; gap: 10px; }
.barre-espace .marque > div { display: grid; line-height: 1.15; }
.barre-espace .marque strong { font: 600 22px var(--police-titre); color: var(--petrole); }
.tuiles.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 899px) {
  .barre-espace { padding: calc(10px + env(safe-area-inset-top)) 16px 0; }
  .espace .contenu { padding: 8px 16px calc(40px + env(safe-area-inset-bottom)); }
  .tuiles.trois { grid-template-columns: minmax(0, 1fr); }
}
.code-offre { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; background: linear-gradient(160deg, var(--safran-pale), var(--surface) 75%); }
.code-offre h2 { color: var(--petrole); }
.code-ligne { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.code-grand {
  padding: 8px 18px; border-radius: 16px; background: var(--surface); border: 2px dashed var(--safran);
  font: 600 26px var(--police-titre); letter-spacing: .08em; color: var(--encre); user-select: all; overflow-wrap: anywhere;
}
.champ-code { font: 600 28px var(--police-titre); letter-spacing: .4em; text-align: center; }
.liens-connexion { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.liste-nue { list-style: none; margin: 6px 0 0; padding: 0; }
.badge.t-accessible { background: var(--past-sauge); color: var(--sauge-txt); }
.pied-espace { text-align: center; }
.pied-espace a { color: var(--petrole); font-weight: 700; }
.espace-acces { display: grid; gap: 8px; justify-items: start; }
.espace-acces a { color: var(--petrole); font-weight: 700; overflow-wrap: anywhere; }

/* 21/11 (porteur) : bouton vers la future boutique et animation des points de bienvenue (espace partenaire) */
.boutique-ligne { display: flex; justify-content: center; margin: 4px 0 2px; }
.boutique-bouton { background: var(--safran); color: var(--encre); font-size: 1.05rem; padding-inline: 26px; }
.bv-voile { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: var(--voile); animation: bv-fondu .25s ease-out; overflow: hidden; }
.bv-voile.bv-sortie { opacity: 0; transition: opacity .25s; }
.bv-carte { position: relative; width: min(360px, 100%); background: var(--ivoire); border-radius: var(--r-carte); padding: 26px 24px 22px; text-align: center; box-shadow: var(--ombre-relief); animation: bv-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.bv-carte h2 { font-family: var(--police-titre); font-size: 1.6rem; margin: 6px 0 2px; color: var(--petrole); }
.bv-chat { width: 132px; height: 132px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px var(--safran-pale); animation: bv-saut 1.6s ease-in-out .5s infinite; }
.bv-points { margin: 6px 0; font-family: var(--police-titre); color: var(--cuivre-txt); }
.bv-nombre { font-size: 3.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bv-points span:last-child { font-size: 1.3rem; }
.bv-confettis { position: absolute; inset: 0; pointer-events: none; }
.bv-confettis i { position: absolute; top: -12px; left: var(--x); width: 9px; height: 14px; border-radius: 3px; background: var(--safran); animation: bv-chute 2.4s linear var(--d) 2 both; }
.bv-confettis i:nth-child(4n+1) { background: var(--corail); }
.bv-confettis i:nth-child(4n+2) { background: var(--lagon); }
.bv-confettis i:nth-child(4n+3) { background: var(--petrole); }
@keyframes bv-fondu { from { opacity: 0; } }
@keyframes bv-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes bv-saut { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px) rotate(-3deg); } }
@keyframes bv-chute { to { transform: translateY(110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) {
  .bv-voile, .bv-carte, .bv-chat, .bv-confettis i { animation: none; }
  .bv-confettis { display: none; }
}

/* 21/11 (porteur, choix A) : connexion avec le chat couronné et des étoiles qui scintillent. */
.cx-illu { position: relative; width: 150px; height: 150px; margin: -4px auto 8px; }
.cx-chat { width: 150px; height: 150px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 7px var(--safran-pale), 0 10px 24px rgba(16, 84, 100, .16); animation: bv-saut 2.4s ease-in-out infinite; }
.cx-etoile { position: absolute; width: 18px; height: 18px; background: var(--safran); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: cx-scintille 2.2s ease-in-out infinite; }
.cx-etoile.e1 { top: 6px; left: -22px; }
.cx-etoile.e2 { top: 40px; right: -30px; width: 24px; height: 24px; animation-delay: .6s; }
.cx-etoile.e3 { bottom: 14px; left: -32px; width: 13px; height: 13px; animation-delay: 1.1s; }
.cx-etoile.e4 { bottom: -2px; right: -16px; width: 14px; height: 14px; background: var(--corail); animation-delay: 1.6s; }
@keyframes cx-scintille { 0%, 100% { transform: scale(.6) rotate(0); opacity: .45; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }

/* 21/11 (porteur, choix B) : illustrations de Mocha dans l'accueil, le code d'offre et les tuiles. */
.accueil-chat { width: 120px; height: 120px; flex: none; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px var(--safran-pale); animation: bv-saut 2.8s ease-in-out infinite; }
@media (max-width: 899px) { .accueil-chat { width: 88px; height: 88px; box-shadow: 0 0 0 5px var(--safran-pale); } }
.code-offre .code-illu { width: 84px; height: 84px; flex: none; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px var(--surface); }
.code-offre .code-texte { flex: 1 1 200px; }
.tuile.avec-illu { position: relative; overflow: hidden; padding-right: 96px; animation: tuile-arrivee .5s ease-out both; }
.tuiles .tuile.avec-illu:nth-child(2) { animation-delay: .08s; }
.tuiles .tuile.avec-illu:nth-child(3) { animation-delay: .16s; }
.tuile-illu { position: absolute; right: 12px; bottom: 12px; width: 74px; height: 74px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .55); }
@keyframes tuile-arrivee { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) { .tuile.avec-illu { padding-right: 84px; } .tuile-illu { width: 64px; height: 64px; } }
@media (prefers-reduced-motion: reduce) {
  .cx-chat, .cx-etoile, .accueil-chat, .tuile.avec-illu { animation: none; }
}
