/* « TES CHIFFRES » (02/12/2026) : la page des statistiques et de l'historique d'un planning (popotam-chiffres.js).
   Écrite à la main d'après la maquette Design « Tes chiffres Popotam ». Toutes les classes en `chf-`, sous `.chf`.
   Couleurs : celles de l'ambiance (variables de styles.css) ; les trois couleurs du graphique végé / poisson / viande
   sont fixes, validées daltonisme compris (outil dataviz, 02/12/2026). Les animations ne passent que par `transform`,
   `opacity` et `stroke-dashoffset`, et se coupent avec « réduire les animations ». */

.chf {
  --chf-veg: #3B9150; --chf-poi: #3E6FB0; --chf-via: #E8692F;
  --chf-ink: var(--ink, #20231C); --chf-soft: var(--ink-soft, #4C5340); --chf-pale: #5F6452;
  --chf-ligne: var(--line, #F0E7CE); --chf-ligne2: var(--line-soft, #F6EFD9);
  max-width: 720px; margin: 0 auto; padding: 0 0 48px; color: var(--chf-ink);
  font-family: var(--font-body, "Hanken Grotesk", system-ui, sans-serif);
  display: flex; flex-direction: column; gap: 18px; position: relative; overflow-x: clip;
}
.chf * { box-sizing: border-box; }
.chf h1, .chf h2, .chf h3, .chf-tit { font-family: var(--font-display, "Bricolage Grotesque", system-ui, sans-serif); }
.chf-n { font-variant-numeric: tabular-nums; }

/* La ligne du haut : Retour et le nom de la page */
.chf-haut { display: flex; align-items: center; gap: 6px; margin: 4px 0 -6px -8px; }
.chf-retour { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--chf-ink); display: grid; place-items: center; cursor: pointer; }
.chf-retour:hover { background: var(--surface-2, #FFF8E6); }
.chf-haut-t { font: 800 17px var(--font-display, "Bricolage Grotesque", sans-serif); }

/* La tête de page */
.chf-tete { position: relative; padding-right: 104px; min-height: 104px; }
.chf-pp-tete { position: absolute; right: 0; top: -4px; width: 96px; height: 106px; transform: rotate(5deg); }
.chf-pp-tete svg, .chf-pp svg { width: 100%; height: 100%; display: block; }
.chf-kick { display: block; font: 700 21px/1 "Caveat", cursive; color: var(--primary-ink, #C2410C); transform: rotate(-1.5deg); transform-origin: 0 50%; }
.chf-tete h1 { margin: 6px 0 8px; font-size: 33px; line-height: 1.02; font-weight: 800; letter-spacing: -.03em; }
.chf-tete p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--chf-soft); }

/* LA PÉRIODE, COLLÉE sous la barre de l'appli (--chf-haut, mesurée par le module) */
.chf-per { position: sticky; top: var(--chf-haut, 0px); z-index: 20; margin: -6px -16px 0; padding: 8px 16px 10px; background: var(--bg, #FFFCF3); transition: box-shadow .2s ease; }
.chf-per.is-colle { box-shadow: 0 12px 18px -16px rgba(80, 50, 20, .5); }
.chf-per .chf-seg { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.chf-per.is-colle .chf-seg { transform: scale(.985); }
.chf-per[hidden] { display: none; }
.chf-seg { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--gold-bg, #FFF4D6); }
.chf-pill { position: absolute; left: 4px; top: 4px; bottom: 4px; width: 0; border-radius: 999px; background: var(--surface, #FFFFFF);
  box-shadow: 0 2px 6px rgba(80, 50, 20, .14); transition: transform .42s cubic-bezier(.3, 1.3, .45, 1), width .42s cubic-bezier(.3, 1.3, .45, 1); }
.chf-mo, .chf-tout { position: relative; z-index: 1; border-radius: 999px; transition: color .25s ease; }
.chf-mo { flex: 1.3; min-width: 0; display: flex; align-items: center; }
.chf-tout { flex: 1; }
.chf-opt { flex: 1; min-width: 0; min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--chf-soft); font: 700 15px var(--font-body, "Hanken Grotesk", sans-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-radius: 999px; transition: color .25s ease; }
.chf-lab { display: inline-block; }
.chf-mo.is-on .chf-opt, .chf-tout.is-on { color: var(--chf-ink); }
.chf-chev { flex: none; width: 38px; min-height: 44px; padding: 0; overflow: hidden; border: 0; border-radius: 999px; background: transparent; color: var(--chf-ink); display: grid; place-items: center; cursor: pointer; transition: width .32s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, color .2s ease; }
.chf-mo:not(.is-on) .chf-chev { width: 0; opacity: 0; pointer-events: none; }
.chf-chev:disabled { color: #C9C2A8; cursor: default; }
.chf-opt:focus-visible, .chf-chev:focus-visible, .chf-retour:focus-visible, .chf-cta:focus-visible { outline: 3px solid var(--primary, #F26B33); outline-offset: 2px; }

.chf-corps { display: flex; flex-direction: column; gap: 18px; }
.chf-debut { margin: -6px 0 0; text-align: center; font-size: 13.5px; color: var(--chf-pale); }
.chf-debut b { color: var(--chf-ink); }

/* Les cartes */
.chf-carte { position: relative; background: var(--surface, #FFFFFF); border: 1px solid var(--chf-ligne); border-radius: 22px; padding: 20px 18px; box-shadow: 0 2px 4px rgba(80, 50, 20, .04), 0 10px 24px -16px rgba(120, 70, 30, .22); min-width: 0; }
.chf-tit { margin: 4px 0 0; font-size: 23px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.chf-sous { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--chf-soft); }
.chf-sous .chf-n { font-weight: 800; color: var(--chf-ink); }
.chf-h3 { margin: 22px 0 10px; font-size: 16px; font-weight: 800; }
.chf-pied { margin: 14px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--chf-pale); }
.chf-pied.chf-c { text-align: center; }

/* Le grand compteur */
.chf-compteur { background: #20231C; border-color: #20231C; color: #FFFCF3; }
.chf-compteur .chf-kick { color: #FFC53D; }
.chf-tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; margin-top: 18px; }
.chf-tuile { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chf-tuile .chf-n { font: 800 34px/1 var(--font-display, "Bricolage Grotesque", sans-serif); letter-spacing: -.03em; color: #FFFCF3; white-space: nowrap; }
.chf-tuile.chf-or .chf-n { color: #FFC53D; }
.chf-tuile > span:last-child { font-size: 13.5px; line-height: 1.3; color: #E9E4D2; }
@media (min-width: 640px) { .chf-tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* La bulle de Popotam */
.chf-bulle { display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; }
.chf-bulle .chf-pp { flex: none; width: 54px; height: 60px; }
.chf-bulle p { margin: 0; flex: 1; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: #FFF1C9; font: 700 19px/1.15 "Caveat", cursive; color: #3D2E12; transform-origin: 0 100%; }
.chf-carte:not(.is-vu) .chf-bulle p, .chf-carte:not(.is-vu) .chf-bulle .chf-pp { opacity: 0; }
.chf-carte.is-vu:not(.is-direct) .chf-bulle p { animation: chfMot .55s .35s cubic-bezier(.3, 1.3, .45, 1) both; }
.chf-carte.is-vu:not(.is-direct) .chf-bulle .chf-pp { animation: chfSaute .5s .25s cubic-bezier(.3, 1.4, .45, 1) both; }
@keyframes chfSaute { from { opacity: 0; transform: translateY(14px) scale(.8); } }
@keyframes chfMot { from { opacity: 0; transform: translateY(8px) scale(.92); } }

/* Les barres horizontales */
.chf-barres { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.chf-bl { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr) 48px; align-items: center; gap: 10px; }
.chf-bn { font-size: 13.5px; line-height: 1.25; }
.chf-bt { height: 10px; border-radius: 0 5px 5px 0; overflow: hidden; }
.chf-bf { display: block; height: 10px; width: 100%; border-radius: 0 5px 5px 0; background: var(--primary-ink, #D2521E); transform-origin: 0 50%; transition: transform .8s cubic-bezier(.25, 1.15, .4, 1); }
.chf-violet .chf-bf { background: var(--info, #7E6BA6); }
.chf-bv { text-align: right; font-size: 13.5px; font-weight: 800; }

/* Les graphiques des semaines */
.chf-g { margin-top: 14px; }
.chf-g svg { display: block; width: 100%; height: auto; overflow: visible; }
.chf-ax { fill: var(--chf-pale); font: 500 10.5px var(--font-body, "Hanken Grotesk", sans-serif); }
.chf-base { stroke: #C9C2A8; stroke-width: 1; }
.chf-grille path { stroke: var(--chf-ligne); stroke-width: 1; fill: none; }
.chf-cible { stroke: var(--chf-ink); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.chf-bar { fill: var(--primary-ink, #D2521E); }
.chf-vg { transform-box: view-box; transition: transform .75s cubic-bezier(.25, 1.2, .4, 1); cursor: default; }
.chf-vg:hover .chf-bar { fill: var(--primary-ink, #A23C1C); filter: brightness(.85); }
.chf-c-veg { fill: var(--chf-veg); background: var(--chf-veg); }
.chf-c-poisson { fill: var(--chf-poi); background: var(--chf-poi); }
.chf-c-viande { fill: var(--chf-via); background: var(--chf-via); }
.chf-trace { fill: none; stroke: var(--info, #7E6BA6); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.chf-carte.is-vu .chf-trace { animation: chfTrace 1s .1s cubic-bezier(.3, .7, .2, 1) both; }
.chf-carte.is-direct .chf-trace { animation: none; stroke-dashoffset: 0; }
@keyframes chfTrace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.chf-pt { fill: var(--info, #7E6BA6); stroke: var(--surface, #FFFFFF); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.chf-carte.is-vu .chf-pt { animation: chfPoint .4s .7s cubic-bezier(.3, 1.4, .45, 1) both; }
.chf-carte.is-direct .chf-pt { animation: none; opacity: 1; }
.chf-pt:hover { stroke-width: 3; }
@keyframes chfPoint { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
.chf-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; }
.chf-leg span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.chf-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* La bulle d'un graphique */
.chf-tip { position: absolute; z-index: 25; transform: translate(-50%, -100%); padding: 6px 10px; border-radius: 10px; background: #20231C; color: #FFFCF3; font-size: 12.5px; white-space: nowrap; pointer-events: none; }
.chf-tip[hidden] { display: none; }

/* Ce que tu manges */
.chf-classiques { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chf-classiques li { display: flex; align-items: center; gap: 12px; }
.chf-rang { width: 18px; flex: none; font: 800 15px var(--font-display, "Bricolage Grotesque", sans-serif); color: var(--chf-pale); }
.chf-classiques img, .chf-ph { width: 48px; height: 48px; flex: none; border-radius: 12px; object-fit: cover; }
.chf-ph { display: grid; place-items: center; background: var(--gold-bg, #FFF1C9); color: var(--gold-ink, #9A6A04); font: 800 20px var(--font-display, "Bricolage Grotesque", sans-serif); }
.chf-pn { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.chf-fois { flex: none; padding: 4px 10px; border-radius: 999px; background: #FFF1C9; font-size: 13px; font-weight: 800; color: #3D2E12; white-space: nowrap; }
.chf-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.chf-puces span { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--green-bg, #E1F4DF); font-size: 14px; font-weight: 700; color: #1F4A27; }
.chf-puces .chf-n { font-weight: 500; color: #2F5E36; }
.chf-genres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chf-genres div { padding: 10px; border-radius: 14px; background: var(--surface-2, #FFF8E6); text-align: center; }
.chf-genres .chf-n { display: block; font: 800 22px var(--font-display, "Bricolage Grotesque", sans-serif); }
.chf-genres span:last-child { font-size: 12.5px; color: var(--chf-soft); }

/* La saison */
.chf-anneaux { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.chf-anneau { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; transition: opacity .3s ease; }
.chf-anneau.chf-pale { opacity: .4; }
.chf-an-fond { fill: none; stroke: var(--green-bg, #E1F4DF); stroke-width: 9; }
.chf-an { fill: none; stroke: var(--chf-veg); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .85s cubic-bezier(.2, .8, .2, 1); }
.chf-anneau text { fill: var(--chf-ink); font: 800 17px var(--font-display, "Bricolage Grotesque", sans-serif); }

/* Autour de la table */
.chf-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.chf-mini > div { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; }
.chf-mini .chf-n { font: 800 26px/1 var(--font-display, "Bricolage Grotesque", sans-serif); }
.chf-mini > div > span:last-child { font-size: 13px; line-height: 1.3; color: var(--chf-soft); }
.chf-mic { width: 34px; height: 34px; border-radius: 50%; background: #FFFFFF; display: grid; place-items: center; }
.chf-m-rose { background: #FDE4EF; color: #B8326B; }
.chf-m-vert { background: #E1F4DF; color: #2E7A3E; }
.chf-m-or { background: #FFF1C9; color: #8A5E04; }
.chf-m-violet { background: #EDE8F6; color: #5E4B8C; }
.chf-m-orange { background: #FFE7D6; color: #A23C1C; }
.chf-mini > div .chf-n, .chf-mini > div > span:last-child { color: var(--chf-ink); }

/* Records et médailles */
.chf-records { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; }
.chf-records li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--chf-ligne2); }
.chf-med { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 3px #FFFFFF; }
.chf-med.chf-m-or { background: #FFC53D; color: #3D2E12; }
.chf-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chf-rt > span { font-size: 12.5px; color: var(--chf-pale); }
.chf-rt b { font-size: 15px; font-weight: 800; line-height: 1.25; }
.chf-dec { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px; border-radius: 16px; background: var(--gold-bg, #FFF4D6); }
.chf-dec img, .chf-ph-g { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.chf-dec > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chf-dec-k { font: 700 19px/1 "Caveat", cursive; color: var(--primary-ink, #C2410C); }
.chf-dec b { font-size: 14.5px; font-weight: 800; line-height: 1.25; }
.chf-dec > span:last-child > span:last-child { font-size: 12.5px; color: var(--chf-soft); }

/* Le bouton vers les semaines, l'attente, la page vide */
.chf-cta { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 0; border-radius: 22px; background: var(--primary, #F26B33); color: #FFFFFF; text-align: left; cursor: pointer; box-shadow: 0 4px 0 var(--primary-ink, #D2521E); font-family: inherit; }
.chf-cta > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.chf-cta b { font: 800 18px var(--font-display, "Bricolage Grotesque", sans-serif); }
.chf-cta > span > span { font-size: 13.5px; color: #FFF1E6; }
.chf-cta:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--primary-ink, #D2521E); }
.chf-attente { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0; text-align: center; }
.chf-attente .chf-pp { width: 92px; height: 102px; animation: chfAttend 1.2s ease-in-out infinite alternate; }
.chf-attente p { margin: 0; font: 700 22px "Caveat", cursive; color: var(--chf-soft); }
@keyframes chfAttend { to { transform: translateY(-6px) rotate(3deg); } }
.chf-vide { display: flex; flex-direction: column; gap: 16px; }

/* Les cartes apparaissent en douceur au défilement, là où le navigateur sait le faire en CSS seul */
@supports (animation-timeline: view()) {
  .chf-carte { animation: chfEntre linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
}
@keyframes chfEntre { from { opacity: 0; transform: translateY(26px) scale(.985); } }

/* Pendant qu'on pose le point de départ d'une animation : rien ne glisse */
.chf-fige .chf-bf, .chf-fige .chf-vg, .chf-fige .chf-an { transition: none !important; }

/* Les listes d'une carte arrivent en cascade quand la carte apparaît (une seule fois par période) */
.chf-carte:not(.is-vu) .chf-cascade > * { opacity: 0; }
.chf-carte.is-vu:not(.is-direct) .chf-cascade > * { animation: chfCascade .45s cubic-bezier(.3, 1.25, .45, 1) both; }
.chf-cascade > :nth-child(2) { animation-delay: .06s !important; }
.chf-cascade > :nth-child(3) { animation-delay: .12s !important; }
.chf-cascade > :nth-child(4) { animation-delay: .18s !important; }
.chf-cascade > :nth-child(5) { animation-delay: .24s !important; }
.chf-cascade > :nth-child(6) { animation-delay: .3s !important; }
.chf-cascade > :nth-child(n+7) { animation-delay: .36s !important; }
@keyframes chfCascade { from { opacity: 0; transform: translateY(10px) scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  .chf-carte, .chf-trace, .chf-pt, .chf-bulle p, .chf-bulle .chf-pp, .chf-attente .chf-pp, .chf-cascade > * { animation: none !important; opacity: 1 !important; }
  .chf-trace { stroke-dashoffset: 0 !important; }
  .chf-bf, .chf-vg, .chf-an, .chf-mo, .chf-tout, .chf-anneau, .chf-pill, .chf-chev, .chf-per .chf-seg { transition: none !important; }
}

/* Un sous-titre posé juste sous un intertitre (« Tes ingrédients chouchous ») */
.chf-h3 + .chf-sous-h { margin: -6px 0 10px; }

/* ================================================================================================================
   « TES SEMAINES », LA FRISE (popotam-frise.js) : un écran plein par-dessus la page, classes en `chs-`.
   z-index 412 : sous « Ajouter au planning » (425) et la fenêtre du plan (420), qui s'ouvrent depuis elle.
   ================================================================================================================ */
html.chs-on, html.chs-on body { overflow: hidden; }
.chs {
  --chf-ink: var(--ink, #20231C); --chf-soft: var(--ink-soft, #4C5340); --chf-pale: #5F6452;
  position: fixed; inset: 0; z-index: 412; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--bg, #FFFCF3); color: var(--chf-ink); font-family: var(--font-body, "Hanken Grotesk", system-ui, sans-serif);
}
.chs * { box-sizing: border-box; }
.chs.is-entre { animation: chsEntre .38s cubic-bezier(.2, .8, .2, 1) both; }
.chs.is-sort { animation: chsSort .22s ease-in both; pointer-events: none; }
@keyframes chsEntre { from { opacity: 0; transform: translateY(28px); } }
@keyframes chsSort { to { opacity: 0; transform: translateY(20px); } }
.chs-page { max-width: 720px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(48px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 16px; }
.chs-haut { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 6px; margin: 0 -16px; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; background: var(--bg, #FFFCF3); border-bottom: 1px solid var(--line, #F0E7CE); }
.chs-retour { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--chf-ink); display: grid; place-items: center; cursor: pointer; }
.chs-retour:hover { background: var(--surface-2, #FFF8E6); }
.chs-haut-t { font: 800 18px var(--font-display, "Bricolage Grotesque", sans-serif); }
.chs-intro { padding-top: 6px; }
.chs-kick { display: block; font: 700 21px/1 "Caveat", cursive; color: var(--primary-ink, #C2410C); transform: rotate(-1.5deg); transform-origin: 0 50%; }
.chs-intro h1 { margin: 6px 0 8px; font: 800 31px/1.04 var(--font-display, "Bricolage Grotesque", sans-serif); letter-spacing: -.03em; }
.chs-intro p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--chf-soft); }

/* La recherche et les filtres */
.chs-cherche { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line, #F0E7CE); background: var(--surface, #FFFFFF); color: var(--chf-pale); transition: border-color .2s ease, box-shadow .2s ease; }
.chs-cherche:focus-within { border-color: var(--primary, #F26B33); box-shadow: 0 0 0 3px rgba(242, 107, 51, .18); }
.chs-q { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 16px var(--font-body, "Hanken Grotesk", sans-serif); color: var(--chf-ink); }
.chs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chs-filtres { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 0; padding: 2px 16px 4px; scrollbar-width: none; }
.chs-filtres::-webkit-scrollbar { display: none; }
.chs-chip { flex: none; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line, #F0E7CE); background: var(--surface, #FFFFFF); color: var(--chf-soft); font: 700 14px var(--font-body, "Hanken Grotesk", sans-serif); white-space: nowrap; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.chs-chip[aria-pressed="true"] { background: var(--chf-ink); border-color: var(--chf-ink); color: #FFFCF3; }
.chs-compte { margin: 0; font-size: 14px; color: var(--chf-soft); }
.chs-liste { display: flex; flex-direction: column; gap: 12px; }
.chs-liste mark { background: #FFE08A; color: inherit; border-radius: 3px; padding: 0 1px; }

/* Les mois */
.chs-mois { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; font: 800 20px var(--font-display, "Bricolage Grotesque", sans-serif); }
.chs-mois small { font: 500 13px var(--font-body, "Hanken Grotesk", sans-serif); color: var(--chf-pale); }

/* Une semaine */
.chs-sem { background: var(--surface, #FFFFFF); border: 1px solid var(--line, #F0E7CE); border-radius: 22px; box-shadow: 0 10px 24px -16px rgba(120, 70, 30, .22); overflow: hidden; }
/* La cascade des semaines, à l'ouverture seulement (pas à chaque lettre de la recherche) */
.chs-arrivee .chs-sem { animation: chsCarte .45s calc(var(--i, 0) * 45ms + .1s) cubic-bezier(.2, .8, .2, 1) both; }
@keyframes chsCarte { from { opacity: 0; transform: translateY(16px); } }
.chs-tete { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding: 16px 18px; border: 0; background: transparent; color: var(--chf-ink); text-align: left; cursor: pointer; font-family: inherit; }
.chs-tete:focus-visible, .chs-btn:focus-visible, .chs-chip:focus-visible, .chs-retour:focus-visible, .chs-remettre:focus-visible { outline: 3px solid var(--primary, #F26B33); outline-offset: 2px; }
.chs-l1 { display: flex; align-items: center; gap: 10px; }
.chs-titre { flex: 1; min-width: 0; font: 800 16.5px var(--font-display, "Bricolage Grotesque", sans-serif); }
.chs-badge { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.chs-b-vert { background: #E1F4DF; color: #1F4A27; }
.chs-b-orange { background: #FFE7D6; color: #8A3414; }
.chs-b-or { background: #FFF1C9; color: #6B4E08; }
.chs-chev { flex: none; display: grid; place-items: center; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.chs-sem.is-ouverte .chs-chev { transform: rotate(180deg); }
.chs-quand { margin-top: -4px; font-size: 13px; color: var(--chf-pale); }
.chs-chif { font-size: 13.5px; color: var(--chf-soft); font-variant-numeric: tabular-nums; }
.chs-l3 { display: flex; align-items: center; gap: 10px; }
.chs-vig { display: flex; flex: none; }
.chs-vig img, .chs-ini { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; margin-right: -8px; box-shadow: 0 0 0 2px var(--surface, #FFFFFF); }
.chs-ini { display: grid; place-items: center; background: var(--gold-bg, #FFF1C9); color: var(--gold-ink, #9A6A04); font: 800 14px var(--font-display, "Bricolage Grotesque", sans-serif); }
.chs-res { flex: 1; min-width: 0; margin-left: 10px; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chs-mini-note { display: flex; align-items: center; gap: 6px; font: 700 17px/1.1 "Caveat", cursive; color: #6B4E08; }
.chs-mini-note[hidden] { display: none; }

/* Le dépli : la hauteur s'anime par la grille (0fr vers 1fr), sans mesurer */
.chs-corps { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s cubic-bezier(.2, .8, .2, 1); }
.chs-sem.is-ouverte .chs-corps { grid-template-rows: 1fr; }
.chs-in { min-height: 0; overflow: hidden; padding: 0 18px; opacity: 0; visibility: hidden; transition: opacity .25s ease, padding .38s ease, visibility 0s .38s; }
.chs-sem.is-ouverte .chs-in { padding-bottom: 18px; opacity: 1; visibility: visible; transition: opacity .25s .06s ease, padding .38s ease, visibility 0s; }
.chs-tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chs-tuiles div { padding: 10px; border-radius: 14px; background: var(--surface-2, #FFF8E6); }
.chs-tuiles b { display: block; font: 800 20px var(--font-display, "Bricolage Grotesque", sans-serif); font-variant-numeric: tabular-nums; }
.chs-tuiles span { font-size: 12.5px; color: var(--chf-soft); }
.chs-note { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: #FFF1C9; transform: rotate(-.6deg); }
.chs-note span { display: block; font-size: 12px; font-weight: 700; color: #6B4E08; }
.chs-note p { margin: 2px 0 0; font: 700 20px/1.15 "Caveat", cursive; color: #3D2E12; white-space: pre-line; }
.chs-note-edit { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.chs-lbl { font-size: 13px; font-weight: 700; color: var(--chf-soft); }
.chs-note-edit textarea { width: 100%; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line, #F0E7CE); background: #FFFDF5; font: 700 19px/1.2 "Caveat", cursive; color: #3D2E12; resize: vertical; }
.chs-note-edit textarea:focus { outline: 0; border-color: var(--primary, #F26B33); }
.chs-note-act { display: flex; gap: 8px; }
.chs-jours { list-style: none; margin: 14px 0 0; padding: 0; }
.chs-jours li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft, #F6EFD9); }
.chs-jour { font: 800 14px var(--font-display, "Bricolage Grotesque", sans-serif); padding-top: 9px; }
.chs-repas { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chs-r { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 0; border-radius: 10px; }
.chs-r.is-trouve { background: #FFF8E0; box-shadow: 0 0 0 4px #FFF8E0; }
.chs-mom { flex: none; width: 38px; font-size: 11.5px; font-weight: 700; color: var(--chf-pale); }
.chs-nom { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.chs-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: #E1F4DF; color: #1F4A27; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.chs-remettre { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--primary-bg, #FFE7D6); color: var(--primary-ink, #D2521E); display: grid; place-items: center; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.chs-remettre:hover { background: var(--primary, #F26B33); color: #FFFFFF; transform: scale(1.06); }
.chs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 16px; border: 1.5px solid var(--line, #F0E7CE); border-radius: 999px; background: var(--surface, #FFFFFF); color: var(--chf-ink); font: 700 14.5px var(--font-body, "Hanken Grotesk", sans-serif); cursor: pointer; }
.chs-btn-p { flex: 1; border: 0; background: var(--primary, #F26B33); color: #FFFFFF; font-weight: 800; box-shadow: 0 3px 0 var(--primary-ink, #D2521E); }
.chs-btn-p:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--primary-ink, #D2521E); }
.chs-suppr, .chs-effacer { display: block; margin: 12px auto 0; padding: 8px 10px; border: 0; background: transparent; color: var(--chf-pale); font: 600 13px var(--font-body, "Hanken Grotesk", sans-serif); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.chs-suppr:hover, .chs-effacer:hover { color: #A23C1C; }

/* La fin de la frise, la frise vide */
.chs-fin, .chs-vide { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 14px; border-radius: 18px; background: var(--gold-bg, #FFF4D6); }
.chs-fin .chs-pp, .chs-vide .chs-pp { flex: none; width: 52px; height: 58px; }
.chs-pp svg { width: 100%; height: 100%; display: block; }
.chs-fin p, .chs-vide p { margin: 0; font: 700 19px/1.15 "Caveat", cursive; color: #3D2E12; }

@media (prefers-reduced-motion: reduce) {
  .chs.is-entre, .chs.is-sort, .chs-sem { animation: none !important; }
  .chs-corps, .chs-in, .chs-chev, .chs-chip, .chs-remettre { transition: none !important; }
}

/* « Ton année avec Popotam » : le bandeau de décembre et janvier, en tête de « Tes chiffres » */
.chf-annee { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px 14px 12px; border: 0; border-radius: 22px; background: #A8322A; color: #FFF7EA; text-align: left; cursor: pointer; font-family: inherit; overflow: hidden; box-shadow: 0 10px 24px -14px rgba(120, 30, 20, .55); }
.chf-annee::before { content: ""; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 197, 61, .22), transparent 70%); pointer-events: none; }
.chf-annee-pp { flex: none; width: 58px; height: 64px; }
.chf-annee-pp svg { width: 100%; height: 100%; display: block; }
.chf-annee-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chf-annee-k { font: 700 19px/1 "Caveat", cursive; color: #FFC53D; }
.chf-annee b { font: 800 18px/1.15 var(--font-display, "Bricolage Grotesque", sans-serif); }
.chf-annee-t > span:last-child { font-size: 13.5px; line-height: 1.35; color: #F6D9D2; }
.chf-annee:hover { filter: brightness(1.05); }
.chf-annee:focus-visible { outline: 3px solid var(--primary, #F26B33); outline-offset: 2px; }
.chf-annee { animation: chfAnnee .5s .2s cubic-bezier(.3, 1.3, .45, 1) both; }
@keyframes chfAnnee { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .chf-annee { animation: none; } }

/* SUR ORDINATEUR (980 px et plus) : deux colonnes, en mosaïque (les cartes n'ont pas la même hauteur, une grille
   laisserait des trous). Le grand compteur, le bandeau de l'année, le bouton des semaines et les petites lignes
   prennent toute la largeur. La tête de page garde une largeur de lecture. */
@media (min-width: 980px) {
  .chf { max-width: 1120px; }
  .chf-tete { max-width: 760px; }
  .chf-seg { max-width: 560px; }
  .chf-corps { display: block; columns: 2; column-gap: 18px; }
  .chf-corps > * { break-inside: avoid; margin: 0 0 18px; }
  .chf-corps > .chf-compteur, .chf-corps > .chf-annee, .chf-corps > .chf-debut, .chf-corps > .chf-cta, .chf-corps > .chf-pied, .chf-corps > .chf-attente, .chf-corps > .chf-vide { column-span: all; }
  .chf-compteur .chf-tuiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .chf-compteur .chf-bulle { max-width: 640px; }
  .chf-cta { max-width: 560px; margin-left: auto; margin-right: auto; }
}

/* Une phrase pour les lecteurs d'écran (la période choisie), invisible à l'écran */
.chf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
