/* ===================================================================================================
   randooom (site « hasard ») : les outils. Posé sur core.css (la DA figée de la série).
   Mêmes règles : le blanc et la couleur de la page ; le cadre maison pour tout ce qu'on touche ;
   les résultats en Anton (comme les chiffres de clooock) ; des glissements, pas de fondus.
   =================================================================================================== */
.hero { --pkf: clamp(56px, min(10.5vw, 11.4vh), 140px); }
@media (min-width: 721px) and (max-height: 780px) { .hero { --pkf: clamp(52px, min(10.5vw, 9.8vh), 120px); } }
@media (max-width: 720px) { .hero { --pkf: clamp(52px, min(15vw, 9.6vh), 92px); } }

/* ---------- Petits éléments communs ---------- */
.tb-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 0 12px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.tb-stat b { font-family: var(--f-display); font-weight: 400; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.tb-note { padding: 0 10px; font-size: 14px; font-weight: 500; opacity: .8; white-space: nowrap; }
.tb-count:empty { display: none; }
.tb-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--white); color: var(--bg); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.chip-btn:disabled { opacity: .45; }
.bump { animation: bump .28s var(--ease); }
.nav-more { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--frame); color: var(--white); font: inherit; font-weight: 600; font-size: 16px; white-space: nowrap; cursor: pointer; transition: background-color .15s; }
.nav-more:hover { background: var(--frame-hi); }
/* La borne d'un tirage (« between [1] and [100] ») : le cadre maison, comme un choix au toucher */
.bound { display: inline-flex; align-items: baseline; padding: .1em .42em .14em; border: 0; border-radius: 14px; background: var(--frame); color: var(--white); font: inherit; line-height: 1.3; font-variant-numeric: tabular-nums; transition: background-color .15s, transform .12s; }
.bound:hover { background: var(--frame-hi); }
.bound:active { transform: scale(.97); }
/* Une question, tapée ou pensée : une ligne dans le cadre maison */
.q-input { width: min(560px, 100%); min-height: 54px; padding: 0 20px; border: 0; border-radius: var(--r); background: var(--frame); color: var(--white); font: inherit; font-size: clamp(18px, 1.8vw, 22px); font-weight: 500; text-align: center; outline: none; transition: background-color .15s; }
.q-input::placeholder { color: color-mix(in srgb, var(--white) 62%, transparent); }
.q-input:hover, .q-input:focus { background: var(--frame-hi); }
.q-input:focus-visible { box-shadow: 0 0 0 3px var(--white); }
/* Les derniers résultats, en petites pastilles sous les boutons */
.history { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: min(720px, 100%); max-height: 64px; overflow: hidden; margin-top: calc(var(--gap) * -.5); }
.h-chip { padding: 3px 10px; border-radius: 9px; background: var(--frame); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-chip.is-new { background: var(--white); color: var(--bg); animation: slide-in .32s var(--ease); }
.h-chip:not(.is-new) { opacity: .85; }
button.h-chip, .tool--color .h-chip { cursor: pointer; }
@keyframes slide-in { from { transform: translateX(-14px); } }
.r-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: min(720px, 100%); }
.r-chip { min-width: 2.2em; padding: 4px 12px; border-radius: 12px; background: var(--frame); font-family: var(--f-display); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; text-align: center; animation: chip-up .34s var(--ease) both; }
.r-chip.is-first { background: var(--white); color: var(--bg); }
/* Des glissements, jamais de fondus : la pastille monte et se dévoile par le bas (cachée tant qu'elle attend son tour). */
@keyframes chip-up { from { transform: translateY(14px); clip-path: inset(100% -10px -10px -10px); } to { clip-path: inset(-10px); } }

/* ---------- Le rouleau : la roue de clooock, en grand, pour un résultat ---------- */
.reel-hit { display: inline-flex; justify-content: center; max-width: 100%; border-radius: .2em; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.reel-hit:focus-visible .reel::before { box-shadow: 0 0 0 3px var(--white); }
.reel { position: relative; display: grid; height: 3.4em; max-width: 100%; font-family: var(--f-display); font-weight: 400; font-size: var(--pkf); line-height: 1; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .5) 14%, #000 32%, #000 68%, rgba(0, 0, 0, .5) 86%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .5) 14%, #000 32%, #000 68%, rgba(0, 0, 0, .5) 86%, transparent 100%); }
.reel::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.12em; margin-top: -.56em; border-radius: .14em; background: var(--frame); transition: background-color .15s; }
.reel-hit:hover .reel::before { background: var(--frame-hi); }
.reel .wheel-track { position: absolute; inset: 0; }
.reel-sizer { display: grid; align-self: center; visibility: hidden; }
.reel-sizer span { grid-area: 1 / 1; height: 0; overflow: hidden; padding: 0 .32em; white-space: nowrap; }
.reel .w-item { overflow: hidden; text-overflow: ellipsis; padding: 0 .2em; }
.reel--num { min-width: 2.4em; }
.reel--letter { min-width: 1.6em; }
.reel--word { min-width: 2.6em; }
.reel--name { font-size: clamp(42px, min(7.6vw, 9.6vh), 112px); min-width: 3em; max-width: min(100%, 11em); }
.zoom-box { display: flex; justify-content: center; max-width: 100%; }
[data-answer="yes"] .reel::before, [data-answer="no"] .reel::before { background: var(--frame-hi); }

/* ---------- Liste de noms : la colonne de droite, dans le cadre maison ---------- */
.entries { display: flex; flex-direction: column; width: 100%; min-height: 0; border-radius: var(--r); background: var(--frame); text-align: left; overflow: hidden; }
.entries-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 6px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.entries-n { min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--white); color: var(--bg); font-size: 13px; letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; }
.entries-text { flex: 1; min-height: 120px; width: 100%; margin: 0; padding: 4px 16px 16px; border: 0; background: transparent; color: var(--white); font: inherit; font-size: 17px; line-height: 1.55; resize: none; outline: none; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--white) 40%, transparent) transparent; }
.entries-text::placeholder { color: color-mix(in srgb, var(--white) 60%, transparent); }
.entries:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--white) 70%, transparent); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(20px, 3vw, 48px); align-items: stretch; width: min(1120px, 100%); }
.split-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 2.4vh, 26px); min-width: 0; }
.split > .entries { height: clamp(220px, calc(100svh - 400px), 480px); }
.split--two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: min(860px, 100%); }
.hero.is-fs .split > .entries, .hero.is-fs .split { grid-template-columns: minmax(0, 1fr); }
.hero.is-fs .split > .entries { display: none; }

/* ---------- Roue : deux couleurs, le pointeur à droite, le moyeu blanc plein ---------- */
.tool--wheel { --wd: clamp(260px, min(calc(100svh - 312px), 50vw), 600px); }
.wh-stage { display: grid; grid-template-columns: auto 300px; gap: clamp(24px, 4vw, 64px); align-items: center; }
.wh-stage > .entries { height: var(--wd); }
.wh-zoom { padding: 0 18px; }
.wh { position: relative; width: var(--wd); aspect-ratio: 1; }
.wh-svg { display: block; width: 100%; height: 100%; max-width: none; overflow: visible; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; filter: drop-shadow(0 18px 40px var(--shadow)); }
.wh.is-spinning .wh-svg { cursor: default; }
.wh-back { fill: var(--bg); }
.wh-rim { fill: none; stroke: var(--white); stroke-width: 3.2; }
.wh-seg { stroke: var(--bg); stroke-width: .6; }
.wh-seg.s0 { fill: var(--white); }
.wh-seg.s1 { fill: var(--frame-hi); }
.wh-seg.s2 { fill: var(--frame); }
.wh-txt { font-family: var(--f-body); font-weight: 700; letter-spacing: -.01em; pointer-events: none; }
.wh-txt.s0 { fill: var(--bg); }
.wh-txt.s1, .wh-txt.s2 { fill: var(--white); }
.wh.is-empty .wh-txt { opacity: .7; }
/* Le pointeur : un triangle blanc qui bat à chaque part */
.wh-pointer { position: absolute; right: -10px; top: 50%; width: 46px; height: 40px; margin-top: -20px; transform-origin: 85% 50%; filter: drop-shadow(0 4px 10px var(--shadow)); }
.wh-pointer i { position: absolute; inset: 0; background: var(--white); clip-path: polygon(0 50%, 100% 0, 88% 50%, 100% 100%); border-radius: 4px; }
.wh-pointer.flap { animation: flap .14s ease-out; }
@keyframes flap { 40% { transform: rotate(-16deg); } }
.wh-hub { position: absolute; left: 50%; top: 50%; width: 24%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: var(--white); color: var(--bg); font-family: var(--f-display); font-size: clamp(20px, calc(var(--wd) * .07), 38px); letter-spacing: .02em; text-transform: uppercase; transform: translate(-50%, -50%); box-shadow: 0 0 0 6px var(--bg), 0 0 0 9px var(--white), 0 10px 28px var(--shadow); transition: transform .15s var(--ease), box-shadow .2s; }
.wh-hub:hover { box-shadow: 0 0 0 6px var(--bg), 0 0 0 9px var(--white), 0 0 0 16px color-mix(in srgb, var(--white) 25%, transparent); }
.wh-hub:active { transform: translate(-50%, -50%) scale(.95); }
.wh.is-spinning .wh-hub { pointer-events: none; }
.hero.is-fs .tool--wheel { --wd: min(calc(100svh - 200px), 86vw); }
.hero.is-fs .wh-stage { grid-template-columns: auto; }
.hero.is-fs .wh-stage > .entries { display: none; }

/* ---------- Pile ou face : des pièces blanches, en 3D ---------- */
.coins { --cd: clamp(150px, min(30vh, 26vw), 270px); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: calc(var(--cd) * .1); max-width: min(980px, 100%); min-height: calc(var(--cd) * 1.04); perspective: 1200px; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.coins[data-n="2"] { --cd: clamp(130px, min(26vh, 22vw), 230px); }
.coins[data-n="3"] { --cd: clamp(110px, min(22vh, 19vw), 200px); }
.coins[data-n="5"] { --cd: clamp(84px, min(17vh, 14vw), 150px); }
.coins[data-n="10"] { --cd: clamp(64px, min(11.5vh, 11vw), 112px); }
.coins:focus-visible .coin-face { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--white); }
.coin-hop { width: var(--cd); height: var(--cd); }
.coin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.coin-edge { position: absolute; inset: 0; border-radius: 50%; background: color-mix(in srgb, var(--white) 72%, var(--bg)); }
.coin-face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; filter: drop-shadow(0 10px 22px var(--shadow)); }
.coin-face--h { transform: translateZ(3.2px); }
.coin-face--t { transform: rotateX(180deg) translateZ(3.2px); }
.coin-face svg { display: block; width: 100%; height: 100%; max-width: none; }
.cf-disc { fill: var(--white); }
.cf-ring { fill: none; stroke: var(--bg); stroke-width: 3; }
.cf-reed { stroke: var(--bg); stroke-width: 2; opacity: .55; }
.cf-mark { fill: var(--bg); }
.cf-mark--line { fill: none; stroke: var(--bg); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.cf-word { fill: var(--bg); font-family: var(--f-display); font-size: 40px; letter-spacing: .04em; }

/* ---------- Dés : blancs, des points de la couleur de la page ; les autres, des formes avec le chiffre ---------- */
.dice { --dd: clamp(84px, min(19vh, 15vw), 150px); display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--dd) * .22); max-width: min(980px, 100%); min-height: calc(var(--dd) * 1.25); align-items: center; cursor: pointer; }
.dice[data-n="1"] { --dd: clamp(130px, min(28vh, 22vw), 220px); }
.dice[data-n="2"] { --dd: clamp(110px, min(24vh, 19vw), 190px); }
.dice[data-n="3"], .dice[data-n="4"] { --dd: clamp(96px, min(21vh, 16vw), 160px); }
.dice[data-n="7"], .dice[data-n="8"], .dice[data-n="9"], .dice[data-n="10"] { --dd: clamp(64px, min(13vh, 10vw), 104px); }
.die { position: relative; width: var(--dd); height: var(--dd); padding: 0; border: 0; border-radius: 22%; background: var(--white); color: var(--bg); box-shadow: 0 12px 26px var(--shadow), inset 0 -6px 0 color-mix(in srgb, var(--bg) 14%, var(--white)); transition: transform .25s var(--ease), box-shadow .2s; }
.die:not(.die--d6) { background: transparent; box-shadow: none; filter: drop-shadow(0 12px 22px var(--shadow)); }
.die svg { display: block; width: 100%; height: 100%; max-width: none; }
.die-shape { fill: var(--white); stroke: var(--white); stroke-width: 4; stroke-linejoin: round; }
.die-num { fill: var(--bg); font-family: var(--f-display); }
.pips { position: absolute; inset: 14%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); place-items: center; }
.pips i { width: 62%; aspect-ratio: 1; border-radius: 50%; }
.pips i.on { background: var(--bg); }
.die.is-held { transform: translateY(-10px); box-shadow: 0 0 0 4px var(--bg), 0 0 0 8px var(--white), 0 18px 30px var(--shadow); }
.die:not(.die--d6).is-held { filter: drop-shadow(0 0 0 var(--white)) drop-shadow(0 12px 22px var(--shadow)); }
.die.is-held::after { content: attr(data-keep); position: absolute; left: 50%; top: calc(100% + 14px); transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; background: var(--white); color: var(--bg); font-family: var(--f-body); font-weight: 700; font-size: 11px; letter-spacing: .12em; }
.die.is-rolling { animation: die-roll .64s cubic-bezier(.3, .7, .3, 1); }
@keyframes die-roll { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(var(--rx), -26%) rotate(calc(var(--rr) * .4)); } 60% { transform: translate(calc(var(--rx) * -.4), 4%) rotate(calc(var(--rr) * .85)); } 100% { transform: translate(0, 0) rotate(var(--rr)); } }
.lead .tot { font-family: var(--f-display); font-weight: 400; font-size: 1.6em; line-height: 1; vertical-align: -.12em; margin-left: .15em; display: inline-block; }

/* ---------- Boule magique : blanche, une fenêtre ronde de la couleur de la page, un triangle blanc ---------- */
.ball { --bd: clamp(190px, min(34vh, 28vw), 330px); position: relative; width: var(--bd); height: var(--bd); padding: 0; border: 0; border-radius: 50%; background: radial-gradient(circle at 34% 28%, var(--white) 0 18%, color-mix(in srgb, var(--white) 88%, var(--bg)) 62%, color-mix(in srgb, var(--white) 70%, var(--bg)) 100%); box-shadow: 0 24px 50px var(--shadow); display: flex; align-items: center; justify-content: center; outline: none; -webkit-tap-highlight-color: transparent; transition: transform .2s var(--ease); }
.ball:hover { transform: scale(1.02); }
.ball:focus-visible { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--white), 0 24px 50px var(--shadow); }
.ball-win { position: relative; width: 52%; height: 52%; border-radius: 50%; background: var(--bg); box-shadow: inset 0 6px 18px rgba(0, 0, 0, .25), 0 0 0 calc(var(--bd) * .02) color-mix(in srgb, var(--white) 75%, var(--bg)); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ball-tri { position: relative; width: 86%; height: 78%; margin-top: 8%; display: flex; align-items: flex-start; justify-content: center; padding-top: 16%; clip-path: polygon(50% 100%, 0 6%, 100% 6%); background: var(--white); color: var(--bg); transform: translateY(70%) scale(.6) rotate(10deg); opacity: 0; transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .35s; }
.ball.is-shown .ball-tri, .ball:not([data-kind]) .ball-tri { transform: none; opacity: 1; }
.ball-ans { width: 76%; font-weight: 800; font-size: calc(var(--bd) * .06); line-height: 1.12; text-transform: uppercase; letter-spacing: .02em; text-align: center; text-wrap: balance; }

/* ---------- Tarot : un paquet, une carte qui sort et se retourne ---------- */
.tarot { --tw: clamp(110px, min(20vh, 15vw), 190px); display: flex; align-items: center; justify-content: center; gap: clamp(24px, 4vw, 60px); min-height: calc(var(--tw) * 1.7); perspective: 1400px; }
.deck { position: relative; width: var(--tw); aspect-ratio: 3 / 5; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .2s var(--ease); }
.deck:hover { transform: translateY(-4px); }
.deck i, .deck-top { position: absolute; inset: 0; border-radius: 14px; }
.deck i { background: color-mix(in srgb, var(--white) 30%, var(--bg)); box-shadow: 0 2px 0 var(--bg); }
.deck i:nth-child(1) { transform: translate(8px, 8px); opacity: .55; }
.deck i:nth-child(2) { transform: translate(5px, 5px); opacity: .75; }
.deck i:nth-child(3) { transform: translate(2.5px, 2.5px); }
.deck-top, .tc-back { background: var(--frame-hi); border: 3px solid var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 34px var(--shadow); }
.deck-top { background: var(--bg); }
.deck-top svg, .tc-back svg { width: 74%; height: auto; }
.tb-line { fill: none; stroke: var(--white); stroke-width: 2.4; }
.tb-star { fill: var(--white); }
.tarot:has(.tcard:not([hidden])) .deck { width: calc(var(--tw) * .62); }
.tcard { position: relative; width: var(--tw); aspect-ratio: 3 / 5; padding: 0; border: 0; background: none; cursor: pointer; }
.tc-inner { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateX(-60%) rotateY(180deg); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.tcard.is-up .tc-inner { transform: none; }
.tc-back, .tc-front { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tc-back { transform: rotateY(180deg); background: var(--bg); }
.tc-front { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12% 8% 10%; background: var(--white); color: var(--bg); box-shadow: 0 16px 34px var(--shadow); }
.tc-num { font-family: var(--f-display); font-size: calc(var(--tw) * .12); line-height: 1; }
.tc-emb { width: 58%; height: auto; fill: var(--bg); }
.tc-emb .emb-line { fill: none; stroke: var(--bg); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.tc-emb .emb-thick { stroke-width: 5; }
.tc-emb .emb-inv { stroke: var(--white); }
.tc-name { font-weight: 800; font-size: calc(var(--tw) * .085); line-height: 1.1; text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.tc-ans { padding: 2px 14px; border-radius: 10px; background: var(--bg); color: var(--white); font-family: var(--f-display); font-size: calc(var(--tw) * .16); line-height: 1.1; }
.t-line { min-height: 1.45em; max-width: 34em; margin: 0; font-size: clamp(18px, 1.7vw, 22px); font-weight: 500; line-height: 1.45; text-wrap: balance; transform: translateY(12px); opacity: 0; transition: transform .45s var(--ease), opacity .3s; }
.t-line.is-shown { transform: none; opacity: 1; }

/* ---------- Équipes : des cartes dans le cadre maison ---------- */
.teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; width: 100%; max-height: clamp(180px, calc(100svh - 420px), 440px); overflow: auto; scrollbar-width: thin; text-align: left; }
.teams[data-n="2"], .teams[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.teams[data-n="3"], .teams[data-n="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team { padding: 14px 16px 16px; border-radius: var(--r); background: var(--frame); }
.team-h { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.1; }
.team-h span { font-family: var(--f-body); font-weight: 700; font-size: 13px; opacity: .8; }
.team-list { margin: 0; padding: 0; list-style: none; font-size: 16px; font-weight: 500; line-height: 1.6; }
.teams.is-dealt .team-list li { animation: deal .38s var(--ease) both; animation-delay: calc(var(--i) * 40ms + var(--k) * 70ms); }
@keyframes deal { from { transform: translate(-24px, -10px) rotate(-4deg); clip-path: inset(-10px 100% -10px -10px); } to { clip-path: inset(-10px); } }
.teams.is-empty .team { min-height: 120px; background: color-mix(in srgb, var(--white) 9%, transparent); }

/* ---------- Liste mélangée ---------- */
.shuffled-box { display: flex; flex-direction: column; height: clamp(220px, calc(100svh - 420px), 460px); border-radius: var(--r); background: var(--frame); text-align: left; overflow: hidden; }
.shuffled { flex: 1; margin: 0; padding: 4px 16px 16px; list-style: none; overflow: auto; scrollbar-width: thin; font-size: 17px; line-height: 1.55; }
.shuffled li { display: flex; gap: 12px; }
.shuffled .ln { flex: none; min-width: 1.6em; font-family: var(--f-display); font-size: 1.15em; line-height: 1.35; opacity: .75; text-align: right; }
.shuffled.is-dealt li { animation: deal .36s var(--ease) both; animation-delay: calc(var(--k) * 35ms); }
.shuffled-box.is-empty .shuffled { display: flex; align-items: center; justify-content: center; }
.shuffled .ph { opacity: .7; font-weight: 500; }

/* ---------- Père Noël secret ---------- */
.santa { width: 100%; }
.santa[data-state="setup"] .s-drawn, .santa[data-state="drawn"] .s-setup { display: none; }
.s-setup, .s-drawn { display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2.6vh, 28px); }
.santa.shake .s-setup { animation: nudge .3s var(--ease); }
.gift { width: clamp(110px, 20vh, 180px); }
.gift svg { display: block; width: 100%; height: auto; overflow: visible; }
.g-box { fill: var(--white); }
.g-lid { fill: var(--white); }
.g-rib { stroke: var(--bg); stroke-width: 10; }
.g-bow { fill: none; stroke: var(--white); stroke-width: 7; stroke-linejoin: round; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; width: 100%; max-height: clamp(160px, calc(100svh - 420px), 420px); overflow: auto; }
.who { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--white); color: var(--bg); font-weight: 700; font-size: 18px; transition: transform .12s, background-color .15s; }
.who:active { transform: scale(.97); }
.who.is-seen { background: var(--frame); color: var(--white); }
.reveal-modal .rev-shown { display: none; }
.reveal-modal.is-open-name .rev-shown { display: inline; animation: chip-up .4s var(--ease); }
.reveal-modal.is-open-name .rev-hidden, .reveal-modal.is-open-name .rev-show-btn { display: none; }
.rev-hidden { opacity: .5; letter-spacing: .1em; }
.hero.is-private .tbar { display: none; }
.link-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; margin: 0 0 18px; padding: 0; list-style: none; overflow: auto; }
.link-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--tint); font-weight: 700; }
.link-copy { min-height: 40px; background: var(--bg); color: var(--white); }
.link-copy:hover { background: var(--bg); }
.links-card { width: min(480px, 100%); }

/* ---------- Tu préfères : deux grandes options, « or » au milieu ---------- */
.wyr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; width: min(980px, 100%); }
.wyr-opt { min-height: clamp(150px, 28vh, 260px); padding: 24px 34px; border: 0; border-radius: 24px; background: var(--frame); color: var(--white); font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, min(3vw, 4.6vh), 44px); line-height: 1.12; text-wrap: balance; transition: background-color .2s, color .2s, transform .2s var(--ease), opacity .25s; }
.wyr-opt:hover { background: var(--frame-hi); }
.wyr-opt.is-chosen { background: var(--white); color: var(--bg); transform: scale(1.02); }
.wyr.has-choice .wyr-opt:not(.is-chosen) { opacity: .55; }
.wyr-or { position: absolute; left: 50%; top: 50%; z-index: 1; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 4px var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--f-display); font-size: 22px; text-transform: uppercase; }
.wyr.is-new .wyr-opt { animation: opt-in .42s var(--swift) both; }
.wyr.is-new .wyr-opt:last-child { animation-delay: 60ms; }
/* L'option glisse depuis la droite et se dévoile, sans fondu. */
@keyframes opt-in { from { transform: translateX(40px); clip-path: inset(-10px -10px -10px 100%); } to { clip-path: inset(-10px); } }
.counter { margin-left: .4em; font-size: .7em; opacity: .75; font-variant-numeric: tabular-nums; }

/* ---------- Action ou vérité : une grande carte ---------- */
.tod-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; width: min(860px, 100%); min-height: clamp(180px, 34vh, 320px); padding: clamp(24px, 4vh, 44px) clamp(24px, 4vw, 56px); border-radius: 28px; background: var(--frame); }
.tod-kind { padding: 4px 14px; border-radius: 10px; background: var(--white); color: var(--bg); font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.tod-text { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, min(3.6vw, 5.6vh), 56px); line-height: 1.12; text-wrap: balance; }
.tod-card.is-new .tod-text, .tod-card.is-new .tod-kind { animation: opt-in .42s var(--swift) both; }
.tod-card[data-kind="dare"] { background: var(--frame-hi); }

/* ---------- Pierre, feuille, ciseaux ---------- */
.rps { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 40px); }
.rps .reel { font-size: clamp(40px, min(6.6vw, 8.6vh), 100px); }
.rps-side { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rps-who { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.rps-vs { font-family: var(--f-display); font-size: 26px; opacity: .7; }
.hands { display: flex; gap: 12px; justify-content: center; }
.hand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: clamp(96px, 11vw, 132px); min-height: clamp(96px, 14vh, 132px); padding: 10px; border: 0; border-radius: 20px; background: var(--white); color: var(--bg); font-weight: 600; font-size: 16px; transition: transform .12s, box-shadow .2s; }
.hand svg { width: 46%; height: auto; }
.hand:hover { box-shadow: 0 0 0 5px color-mix(in srgb, var(--white) 28%, transparent); }
.hand:active { transform: scale(.96); }
.hand[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--white); }
.hero[data-res="win"] .rps-side:first-child .reel::before, .hero[data-res="lose"] .rps-side:last-of-type .reel::before { background: var(--white); }
.hero[data-res="win"] .rps-side:first-child .w-item.is-center, .hero[data-res="lose"] .rps-side:last-of-type .w-item.is-center { color: var(--bg); }

/* ---------- Listes générées (prénoms, mots) : de grands mots en Anton, chacun dans le cadre maison ---------- */
.gen { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 12px; width: min(1040px, 100%); min-height: clamp(150px, 26vh, 260px); margin: 0; padding: 0; list-style: none; max-height: clamp(200px, calc(100svh - 360px), 520px); overflow: auto; }
.gen li { display: flex; }
.g-item { min-height: 0; padding: .18em .5em .22em; border: 0; border-radius: .28em; background: var(--frame); color: var(--white); font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, min(3.6vw, 6vh), 52px); line-height: 1.1; white-space: nowrap; transition: background-color .15s, color .15s, transform .12s; }
.g-item:hover { background: var(--frame-hi); }
.g-item:active { transform: scale(.97); }
.g-item.is-copied { background: var(--white); color: var(--bg); }
.gen[data-n="1"] .g-item { font-size: clamp(56px, min(8vw, 13vh), 120px); }
.gen[data-n="3"] .g-item { font-size: clamp(40px, min(5vw, 9vh), 80px); }
.gen[data-n="10"] .g-item { font-size: clamp(24px, min(2.6vw, 4.4vh), 38px); }
.gen[data-n="20"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-content: start; }
.gen[data-n="20"] .g-item { width: 100%; font-size: clamp(20px, 1.9vw, 26px); }
.gen.is-dealt li { animation: chip-up .36s var(--ease) both; animation-delay: calc(var(--k) * 40ms); }

/* ---------- Couleur au hasard : le code, en très grand ---------- */
.hex-out { padding: 0 .16em; border: 0; border-radius: .12em; background: var(--frame); color: var(--white); font-family: var(--f-display); font-weight: 400; font-size: clamp(64px, min(13vw, 17vh), 200px); line-height: 1.12; letter-spacing: .02em; transition: background-color .15s, transform .12s; }
.hex-out:hover { background: var(--frame-hi); }
.hex-out:active { transform: scale(.98); }
.hex-out [data-v] { display: inline-block; }
.codes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin: 0; font-size: clamp(17px, 1.6vw, 21px); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Pop-up du résultat : le nom en très grand, des confettis blancs ---------- */
.res-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; color: #FFFFFF; }
:root[data-light] .res-confetti { color: var(--ink); }
.modal-card.res-card { width: min(640px, 100%); text-align: center; }
.res-eyebrow { margin: 0 0 6px; font-size: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .9; }
.res-big { margin: 0 0 14px; font-family: var(--f-display); font-weight: 400; font-size: clamp(64px, 12vw, 140px); line-height: 1.02; overflow-wrap: anywhere; text-wrap: balance; animation: res-in .5s var(--swift) both; }
@keyframes res-in { from { transform: translateY(30%) scale(.9); } }
.res-text { margin: 0 0 22px; font-size: 17px; line-height: 1.5; }
.res-text:empty { display: none; }
.res-card .modal-actions { width: min(360px, 100%); margin: 0 auto; }

/* ---------- Pavé numérique ---------- */
.kp-card { width: min(340px, 100%); }
.kp-display { margin: 0; font-family: var(--f-display); font-size: 64px; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kp-display.is-empty { opacity: .45; }
.kp-was { margin: 2px 0 16px; font-size: 14px; font-weight: 500; opacity: .8; }
.kp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kp-grid button { min-height: 60px; border: 0; border-radius: 14px; background: var(--tint); color: var(--bg); font-family: var(--f-display); font-size: 28px; display: flex; align-items: center; justify-content: center; transition: background-color .12s, transform .1s; }
.kp-grid button:hover { background: var(--tint-2); }
.kp-grid button:active { transform: scale(.96); }
.kp-grid .kp-ok { background: var(--bg); color: var(--white); font-family: var(--f-body); font-weight: 700; font-size: 18px; }

/* ---------- Aperçu seulement : comparer les deux noms ---------- */
.mock-switch { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: 4px; padding: 5px 5px 5px 14px; border-radius: 999px; background: var(--white); color: var(--bg); box-shadow: 0 10px 28px var(--shadow); font-size: 13px; font-weight: 700; view-transition-name: mock; }
.mock-switch button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--tint); color: var(--bg); font-weight: 700; font-size: 13px; }
.mock-switch button[aria-pressed="true"] { background: var(--bg); color: var(--white); }
.page > .mock-switch { --bg: var(--user, var(--tool)); --tint: color-mix(in srgb, var(--bg) 12%, #FFFFFF); }
.hero.is-fs ~ .mock-switch { display: none; }
::view-transition-group(mock), ::view-transition-new(mock) { animation: none; }
::view-transition-old(mock) { animation: none; opacity: 0; }

/* ---------- Écrans d'ordinateur bas (13 pouces) ---------- */
@media (min-width: 721px) and (max-height: 760px) {
  .tool--wheel { --wd: clamp(240px, min(calc(100svh - 290px), 46vw), 520px); }
  .hand { min-height: 88px; }
  .wyr-opt { min-height: clamp(130px, 25vh, 220px); }
}

@media (min-width: 721px) and (max-height: 720px) {
  .q-input { min-height: 46px; }
  .tool--yesno, .tool--magic, .tool--tarot, .tool--rps { --pkf: clamp(48px, min(10.5vw, 8.4vh), 110px); }
  .ball { --bd: clamp(180px, 30vh, 300px); }
  .tarot { --tw: clamp(104px, 17vh, 170px); }
  .rps .reel { font-size: clamp(36px, min(6.6vw, 7vh), 90px); }
  .hand { min-height: 78px; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 720px) {
  .tool--wheel { --wd: min(86vw, 52svh); }
  .wh-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; width: 100%; }
  .wh-stage > .entries { height: 180px; }
  .wh-pointer { right: -6px; width: 36px; height: 32px; margin-top: -16px; }
  .split, .split--two { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .split > .entries, .shuffled-box { height: 200px; }
  .teams, .gen, .who-grid { max-height: none; }
  .teams[data-n="3"], .teams[data-n="6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-item { font-size: 28px; }
  .gen[data-n="1"] .g-item { font-size: 52px; }
  .gen[data-n="3"] .g-item { font-size: 36px; }
  .wyr { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wyr-opt { min-height: 120px; padding: 18px 22px; }
  .wyr-or { width: 46px; height: 46px; margin: -23px 0 0 -23px; font-size: 18px; }
  .tb-note { display: none; }
  .tb-stat { padding: 0 8px; font-size: 14px; }
  .hands { width: 100%; }
  .hand { flex: 1; width: auto; min-height: 92px; }
  .rps .reel { font-size: clamp(34px, 11vw, 56px); }
  .tarot { --tw: clamp(118px, 34vw, 160px); gap: 18px; }
  .ball { --bd: min(72vw, 40svh); }
  .mock-switch { padding: 3px 3px 3px 10px; }
  .mock-switch button { min-height: 32px; padding: 0 10px; }
}

/* Autres outils : 8 cartes, deux rangées de 4 */
@media (min-width: 900px) { .tool-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Barre de consentement (Google Analytics) : une carte qui glisse depuis le bas, rien ne bouge dessous (comme clooock) */
.consent { position: fixed; left: 16px; bottom: 16px; z-index: 120; width: min(440px, calc(100vw - 32px)); padding: 16px 16px 14px; border-radius: 20px; background: var(--white); color: var(--bg); box-shadow: 0 24px 64px var(--shadow); font-family: var(--f-body); font-size: 15px; line-height: 1.45; transform: translateY(calc(100% + 32px)); transition: transform .45s var(--ease); }
.consent.is-in { transform: none; }
.consent-t { margin: 0 0 12px; font-weight: 500; }
.consent-t a { color: inherit; font-weight: 700; }
.consent-b { display: flex; gap: 8px; }
.consent-b button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; }
.consent-yes { background: var(--bg); color: var(--white); }
.consent-no { background: var(--tint); color: var(--bg); }
@media (max-width: 720px) { .consent { left: 10px; bottom: 10px; width: calc(100vw - 20px); } .consent-b button { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .consent { transition: none; } }

/* ---------- Plein écran : la scène du visuel (dés, pièces, cartes, tarot, boule magique, bingo) épouse son visuel ----------
   Sur téléphone, la scène occupe d'habitude la place libre du bandeau (hauteur fixe, container-type: size) ; en plein écran,
   le visuel grandit avec la taille − / + : une scène de hauteur fixe le laissait déborder sur la phrase et le bouton sans
   que le calcul de taille le voie. Ici, la scène prend la hauteur du visuel et le calcul de taille le garde dans l'écran. */
.hero.is-fs :is(.dice-stage, .coin-stage, .card-stage, .tr-stage, .mg-stage, .bb-stage) { flex: none; min-height: 0; container-type: normal; }
/* Plein écran sur ordinateur : l'outil se centre dans la place libre, entre la citation et les deux barres du bas
   (réglages, taille), et non au milieu de l'écran : il gagne la place perdue en haut, le visuel peut être plus grand. */
@media (min-width: 721px) { .hero.is-fs:has(main.tool > .tbar) main.tool { margin-bottom: 60px; } }
/* Plein écran : le rouleau garde la largeur de son plus long résultat (sans plafond) ; trop grand, c'est la taille qui baisse,
   au lieu de couper le nom tiré (« Cap… » pour Capucine sur téléphone). */
.hero.is-fs .zoomable :is(.reel-hit, .reel) { max-width: none; flex-shrink: 0; }

/* ===================================================================================================
   Version 2 : plusieurs langues, la palette qu'on lance, et le téléphone repensé.
   =================================================================================================== */

/* ---------- En-tête : la langue, le titre court ---------- */
.lang { min-height: 40px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent; color: var(--white); font: inherit; font-weight: 700; font-size: 15px; letter-spacing: .04em; cursor: pointer; transition: background-color .15s; }
.lang:hover { background: var(--frame); text-decoration: none; }
.tt-short { display: none; }
.lang-pop { display: grid; gap: 8px; }
.lang-pop a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 20px; border-radius: var(--r); background: var(--tint); color: var(--bg); font-weight: 700; font-size: 18px; text-decoration: none; transition: background-color .15s; }
.lang-pop a:hover { background: var(--tint-2); }
.lang-pop a[aria-current] { background: var(--bg); color: var(--white); }
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.foot-langs a[aria-current] { font-weight: 700; text-decoration: underline; }
.foot-cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Les sites frères (src/series.mjs) : pied de page, bloc de l'accueil, cartes « Sur nos autres sites » ---------- */
.foot-series { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 24px 40px; padding-block: 36px 40px; border-bottom: 1px solid color-mix(in srgb, var(--white) 30%, transparent); }
.foot-series-head p:not(.foot-h) { margin: 0; font-size: 15px; opacity: .85; }
.foot-sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.foot-site { display: grid; align-content: start; gap: 8px; }
.foot-site > p { margin: 0; font-size: 15px; opacity: .85; }
.site-foot .logo--sister .logo-word { --lf: 30px; padding-block: .2em; }
.foot-site .foot-links { grid-template-columns: repeat(2, minmax(0, max-content)); column-gap: 24px; }
.logo--sister { cursor: pointer; }
.logo--sister .lo-wheel { cursor: inherit; }
.band--series .series-sites { display: grid; gap: clamp(28px, 4vw, 44px); }
.series-site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-bottom: 14px; }
.series-site-head p { margin: 0; font-weight: 500; opacity: .8; }
.below .logo--sister { color: var(--bg); }
.below .site-foot .logo--sister { color: var(--white); }
@media (min-width: 900px) { .band--series .pop-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.below .logo--sister .logo-word { --lf: 34px; padding-block: .25em; }
.series-rel-title { margin: clamp(32px, 4vw, 48px) 0 16px; font-family: var(--f-display); font-weight: 400; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.1; }
.tool-card .tool-card-host { font-size: 13px; font-weight: 700; letter-spacing: .04em; opacity: .7; }

/* ---------- La liste (noms…) : à droite sur ordinateur ; sur téléphone, un bouton l'ouvre en feuille ---------- */
.entries-open { display: none; }
.tbar .entries-open, .entries-open--all { align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--white); font: inherit; font-weight: 700; font-size: 15px; white-space: nowrap; cursor: pointer; transition: background-color .15s; }
.tbar .entries-open:hover, .entries-open--all:hover { background: var(--frame); }
.entries-open svg { flex: none; width: 18px; height: 18px; }
.eo-n { font-variant-numeric: tabular-nums; }
.entries-open--all { display: inline-flex; }
.entries-hold { display: none; }
.entries:not(.in-sheet) .entries-done { display: none !important; }
.entries-done { align-items: center; justify-content: center; min-height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--white); color: var(--bg); font: inherit; font-weight: 700; font-size: 14px; letter-spacing: 0; text-transform: none; cursor: pointer; }
.show-sm-flex { display: none !important; }

/* La feuille : la liste (ou le tableau du bingo) en grand, par-dessus la page */
.sheet-card { width: min(560px, 100%); height: min(680px, calc(100svh - 32px)); display: flex; }
.sheet-body { flex: 1; display: flex; min-height: 0; width: 100%; }
.sheet-body > * { flex: 1; height: auto !important; max-height: none !important; }
.sheet-card .in-sheet { --white: #FFFFFF; --bg: var(--accent); --frame: rgba(255, 255, 255, .17); --frame-hi: rgba(255, 255, 255, .27); display: flex !important; color: var(--white); background: color-mix(in srgb, var(--accent) 90%, #FFFFFF); box-shadow: 0 -10px 40px color-mix(in srgb, var(--accent) 40%, transparent); }
:root[data-light] .sheet-card .in-sheet { --white: var(--ink); --frame: color-mix(in srgb, var(--ink) 12%, transparent); --frame-hi: color-mix(in srgb, var(--ink) 20%, transparent); }
.sheet-card .entries-text { font-size: 18px; }
.sheet-card .entries:focus-within { box-shadow: none; }

/* ---------- La palette qu'on lance : elle rebondit dans le bandeau ; la niche la rappelle ---------- */
.theme-fab.is-free { position: absolute; left: 0; top: 0; z-index: 40; cursor: grab; will-change: transform; transition: box-shadow .2s; }
.theme-fab.is-held { cursor: grabbing; box-shadow: 0 22px 44px var(--shadow); }
.theme-fab { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.fab-home { position: relative; z-index: 2; flex: none; width: 56px; height: 56px; padding: 0; border: 2.5px dashed color-mix(in srgb, var(--white) 75%, transparent); border-radius: 50%; background: var(--frame); color: var(--white); display: grid; place-items: center; pointer-events: auto; cursor: pointer; opacity: 0; transform: scale(.4) rotate(-90deg); transition: transform .4s var(--ease), opacity .25s, background-color .15s; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.fab-home.is-on { opacity: 1; transform: none; animation: niche-call 2.6s ease-in-out 1.2s infinite; }
.fab-home:hover { background: var(--frame-hi); }
.fab-home svg { width: 22px; height: 22px; }
.fab-home[hidden] { display: none; }
@keyframes niche-call { 0%, 80%, 100% { transform: none; } 88% { transform: scale(1.1) rotate(-12deg); } 94% { transform: scale(.96) rotate(6deg); } }
.page > .cbar .fab-home { color: var(--white); }

/* ---------- Une autre langue ? (proposée, jamais imposée) ---------- */
/* La proposition de langue se pose en bas à gauche (loin des listes et des boutons de l'outil) et monte depuis le bord de l'écran. */
.lang-hint { position: absolute; bottom: max(16px, env(safe-area-inset-bottom, 0px)); left: max(var(--gutter), env(safe-area-inset-left, 0px)); z-index: 5; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 16px; background: var(--white); color: var(--bg); box-shadow: 0 12px 30px var(--shadow); animation: hint-up .5s var(--ease) .8s both; }
@keyframes hint-up { from { transform: translateY(calc(100% + 60px)); } }
/* Sur une page d'outil, elle se range dans la rangée de Partager et Widget (en bas à gauche) ; sur téléphone, la flèche du bas lui laisse la place. */
.hero-acts .lang-hint { position: static; margin-left: 4px; }
@media (max-width: 720px) { .hero:has(.hero-acts .lang-hint) .scroll-down { display: none; } }
.lang-hint a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: inherit; font-weight: 700; text-decoration: none; }
.lang-hint a:hover { background: var(--tint); }
.lang-hint button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.hero.is-fs .lang-hint { display: none; }

/* ---------- Choix de langue (roue des langues) ---------- */
.hero.is-fs .lang { display: none; }

/* ---------- Pages des versions prêtes (préréglages) ---------- */
.crumbs { padding-top: 22px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; font-weight: 500; }
.crumbs li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.crumbs a { color: inherit; }
.band--intro .content--intro { max-width: 760px; margin: 0 auto; }
/* Bloc calculé d'une page préréglée (tableau de probabilités, liste tirée des données) : même largeur que l'intro, collé à elle. */
.band--data .content--data { max-width: 760px; margin: 0 auto; }
.band--intro + .band--data { padding-top: 0; }
.nowrap { white-space: nowrap; }
.preset-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.preset-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 14px; background: var(--tint); color: var(--bg); font-weight: 700; text-decoration: none; transition: background-color .15s, transform .12s; }
.preset-link:hover { background: var(--tint-2); transform: translateY(-1px); }
/* Les plus demandées : rangée en tête de la partie basse d'un outil, et grille sur l'accueil */
.band--popular { padding: 22px 0 0; }
.band--popular + .band { padding-top: clamp(28px, 4vw, 48px); }
.pop-title { margin: 0 0 12px; text-align: center; font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.pop-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pop-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 14px; background: var(--tint); color: var(--bg); font-weight: 700; text-decoration: none; transition: background-color .15s, transform .12s; }
.pop-link:hover { background: var(--tint-2); transform: translateY(-1px); }
.pop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pop-card { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 76px; padding: 12px 18px; border-radius: 18px; background: var(--tint); color: var(--bg); text-decoration: none; transition: background-color .15s, transform .25s var(--ease); }
.pop-card b { font-size: 17px; line-height: 1.25; }
.pop-card span { font-size: 14px; font-weight: 500; opacity: .75; }
.pop-card:hover { background: var(--tint-2); transform: translateY(-2px); }
@media (max-width: 720px) { .pop-cards { grid-template-columns: 1fr 1fr; gap: 8px; } .pop-card { min-height: 64px; padding: 10px 12px; border-radius: 14px; } .pop-card b { font-size: 15px; } .pop-card span { font-size: 13px; } }

/* ---------- Écrans d'ordinateur bas (13 pouces) ---------- */
@media (min-width: 721px) and (max-height: 760px) {
  .tbar .chip-btn, .tbar .entries-open { min-height: 40px; }
  .dice[data-n="1"] { --dd: clamp(120px, 24vh, 180px); }
  .bingo-ball { --bb: clamp(140px, 24vh, 200px); }
}

/* ---------- Téléphone : une main, le pouce ---------- */
@media (max-width: 720px) {
  .tt-long { display: none; }
  .tt-short { display: inline; }
  .top-title { font-size: 20px; }
  /* La liste sort de la page : un bouton dans la barre l'ouvre en grand */
  .split > .entries, .wh-stage > .entries { display: none; }
  .tbar .entries-open { display: inline-flex; }
  .show-sm-flex { display: inline-flex !important; }
  .sheetable:not(.in-sheet) { display: none !important; }
  #sheet-modal { padding: 0; align-items: end; }
  #sheet-modal .sheet-card { width: 100%; height: min(86svh, 720px); animation: sheet-up .38s var(--swift); }
  #sheet-modal .sheet-body > * { border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  /* La barre du bas : des icônes, sur une seule ligne */
  .hero .tbar { flex-wrap: nowrap; gap: 2px; max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; }
  .hero .tbar::-webkit-scrollbar { display: none; }
  .tbar .tb-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tbar .chip-btn { min-width: 46px; justify-content: center; padding: 0 12px; }
  .tbar .bar-sep { margin: 0 2px; }
  /* Les gros boutons : pleine largeur, sous le pouce */
  .hero .tool .actions { width: 100%; }
  .hero .tool .actions .btn-primary { flex: 1 1 100%; min-height: 64px; font-size: 20px; }
  .hero .tool .actions .btn-ghost { flex: 1 1 auto; min-height: 54px; }
  .lead { font-size: 21px; line-height: 1.45; }
  .foot-cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-series { grid-template-columns: 1fr; padding-block: 28px 32px; }
  .foot-sites { grid-template-columns: 1fr; gap: 28px; }
  .foot-site .foot-links { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .fab-home { width: 50px; height: 50px; }
}
@media (max-width: 440px) {
  /* Petit téléphone : avec le bouton Partager, le nom de l'outil ne tient plus à côté du logo ; il reste pour les lecteurs d'écran et Google. */
  .top-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@keyframes sheet-up { from { transform: translateY(40%); } }
.tool--yesno .reel { text-transform: uppercase; }

/* Sur la partie blanche : la niche prend la couleur du site (fond plein, flèche blanche), comme la palette. */
.cbar.on-white .fab-home { background: var(--page); border-color: rgba(255, 255, 255, .75); color: #FFFFFF; box-shadow: 0 10px 28px var(--shadow); }
.cbar.on-white .fab-home:hover { background: var(--dark); }
:root[data-light] .cbar.on-white .fab-home { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 60%, transparent); }

/* Téléphone : « Plus d'outils » montre seulement le nom du milieu (sans les voisins estompés) ;
   sur téléphone, la proposition de langue colle au bord gauche. */
@media (max-width: 720px) {
  .mt-wheel { height: 40px; overflow: hidden; -webkit-mask-image: none; mask-image: none; }
  .mt-wheel .w-item:not(.is-center) { visibility: hidden; }
  .lang-hint { bottom: max(14px, env(safe-area-inset-bottom, 0px)); left: 12px; }
}

/* Guides : le titre tient sur deux ou trois lignes, le bouton de l'outil juste dessous ; l'article se lit sur le blanc. */
.hero--guide .guide-title { font-size: clamp(38px, 5.2vw, 76px); line-height: 1.04; max-width: 18ch; }
.hero--guide .lead { max-width: 46ch; }
.hero--guide .actions { margin-top: 28px; }
.content--guide table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: 16px; }
.content--guide th, .content--guide td { padding: 8px 12px; text-align: left; border-bottom: 1px solid color-mix(in srgb, var(--dark, #222) 14%, transparent); }
.content--guide th { font-weight: 700; }
.content--guide .guide-date { margin-top: 32px; font-size: 14px; opacity: .7; }
@media (max-width: 640px) { .content--guide table { font-size: 14px; display: block; overflow-x: auto; } .hero--guide .guide-title { font-size: 38px; } }
.guide-cards .tool-card b { font-size: clamp(22px, 2vw, 28px); line-height: 1.12; hyphens: auto; overflow-wrap: break-word; }

/* ---------- Accueil (le même gabarit que celui de clooock) ----------
   Bandeau : la formule, le mini-jeu (pile ou face géant), la phrase des outils, « Trouver un outil ». Partie basse : tous les outils par famille, une valeur en Anton par carte. */
.hero--home { min-height: min(calc(100vh - var(--peek)), 1100px); min-height: min(calc(100svh - var(--peek)), 1100px); }
.home-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(1100px, 100%); margin: 0 auto; padding: 0 0 clamp(14px, 3vh, 24px); text-align: center; }
.home-formula { max-width: 640px; margin: 0; font-family: var(--f-body); font-weight: 700; font-size: clamp(26px, 2.47vw, 36px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.home-sub { max-width: 800px; margin: clamp(10px, 1.8vh, 18px) 0 0; font-size: clamp(17px, 1.45vw, 20px); font-weight: 500; line-height: 1.45; text-wrap: balance; }
/* Trouver un outil */
.home-find { position: relative; z-index: 4; display: flex; gap: 6px; width: min(680px, 100%); margin-top: clamp(14px, 2.4vh, 24px); padding: 6px; border-radius: 18px; background: var(--frame); transition: background-color .15s; }
.home-find:focus-within { background: var(--frame-hi); }
.home-q { flex: 1; min-width: 0; height: 50px; padding: 0 14px; border: 0; background: transparent; color: var(--white); font: inherit; font-size: 17px; font-weight: 500; outline: none; -webkit-appearance: none; appearance: none; }
.home-q::placeholder { color: var(--white); opacity: .62; }
.home-q::-webkit-search-cancel-button { display: none; }
.home-go { flex: none; height: 50px; padding: 0 20px; border: 0; border-radius: 13px; background: var(--white); color: var(--bg); font: inherit; font-size: 16px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: transform .12s; }
.home-go:active { transform: scale(.97); }
.home-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); display: flex; flex-direction: column; padding: 8px; border-radius: 18px; background: var(--white); color: var(--bg); text-align: left; box-shadow: 0 18px 40px var(--shadow); }
.home-results a { display: block; padding: 12px 14px; border-radius: 12px; color: inherit; font-weight: 700; text-decoration: none; }
.home-results a:hover, .home-results a.is-cur { background: color-mix(in srgb, var(--bg) 12%, transparent); }
.home-none { position: absolute; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 16px; border-radius: 18px; background: var(--white); color: var(--bg); font-weight: 600; text-align: left; }
/* Mini-jeu : pile ou face géant. La pièce au centre (le même dessin que l'outil), « Pile » à gauche et « Face » à droite
   dans le cadre maison ; on parie, elle saute et tourne (glissement, jamais de fondu). Un toucher sur la pièce la lance sans pari. */
.cg { display: flex; flex-direction: column; align-items: center; margin-top: clamp(12px, 2.4vh, 26px); }
.cg-row { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3vw, 44px); }
.cg-coin { --cd: clamp(150px, min(24vh, 17vw), 220px); flex: none; width: var(--cd); height: var(--cd); padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; perspective: 1200px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cg-coin:focus-visible { outline: 3px solid var(--white); outline-offset: 6px; }
.cg-coin .coin-hop { display: block; width: 100%; height: 100%; }
.cg-coin .coin { display: block; }
.cg-btn { flex: none; width: clamp(108px, 9.5vw, 140px); height: clamp(64px, 8vh, 80px); padding: 0 10px; border: 0; border-radius: 22px; background: var(--frame); color: var(--white); font: inherit; font-family: var(--f-display); font-size: clamp(26px, 2.4vw, 34px); letter-spacing: .02em; white-space: nowrap; cursor: pointer; transition: background-color .15s, transform .12s; -webkit-tap-highlight-color: transparent; }
.cg-btn:hover { background: var(--frame-hi); }
.cg-btn:active { transform: scale(.95); }
.cg-btn.is-bet { background: var(--white); color: var(--bg); }
.hl-msg { position: relative; width: min(680px, 100%); height: 1.45em; margin: clamp(8px, 1.6vh, 16px) 0 0; overflow: hidden; font-size: clamp(17px, 1.5vw, 21px); font-weight: 700; line-height: 1.45; }
.hl-msg .hg-in { display: block; white-space: nowrap; }
.hl-score { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; opacity: .9; }
.hl-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .6; }
.cg.is-win [data-cg-streak] { animation: hl-up .4s var(--ease); }
@keyframes hl-up { 40% { transform: translateY(-4px) scale(1.08); } }

/* ---------- Mini-jeu « calcul éclair » : une question en Anton, trois réponses dans le cadre maison ---------- */
.qz { display: flex; flex-direction: column; align-items: center; margin-top: clamp(10px, 2.2vh, 24px); }
.qz-q { position: relative; height: 1.15em; margin: 0; overflow: hidden; font-family: var(--f-display); font-weight: 400; font-size: clamp(54px, min(7vw, 9vh), 104px); line-height: 1.12; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qz-q .hsv-in { display: block; }
.qz-row { display: flex; justify-content: center; gap: clamp(10px, 1.6vw, 20px); margin-top: clamp(10px, 2vh, 22px); }
.qz-a { position: relative; width: clamp(110px, 10vw, 150px); height: clamp(64px, 8vh, 82px); padding: 0 10px; overflow: hidden; border: 0; border-radius: 22px; background: var(--frame); color: var(--white); font-family: var(--f-display); font-size: clamp(28px, 2.6vw, 38px); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: background-color .15s, transform .12s, color .15s; -webkit-tap-highlight-color: transparent; }
.qz-a .hsv-in { display: block; }
.qz-a:hover { background: var(--frame-hi); }
.qz-a:active { transform: scale(.95); }
.qz-a.is-right { background: var(--white); color: var(--bg); }
.qz-a.is-wrong { background: transparent; box-shadow: inset 0 0 0 2px var(--white); }
.qz.is-win [data-qz-streak] { animation: hl-up .4s var(--ease); }
@media (max-width: 720px) { .qz-a { width: clamp(88px, 27vw, 112px); height: 60px; border-radius: 18px; font-size: 26px; } .qz-row { gap: 10px; } .qz-q { font-size: clamp(46px, 13vw, 64px); } }
@media (min-width: 721px) and (max-height: 700px) { .qz-q { font-size: clamp(46px, 8vh, 72px); } }

/* ---------- Partie basse : tous les outils (le même gabarit que l'accueil de clooock) ----------
   Des familles qui se déplient (toutes ouvertes au départ) ; chaque carte : une illustration animée, le nom, une phrase, une valeur en Anton.
   Au survol, la carte prend la couleur foncée, la valeur s'envole et une flèche arrive. */
.band--home { padding: clamp(56px, 8vw, 104px) 0 40px; }
.home-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.home-head .section-title { margin: 0; }
.home-head p { margin: 0; font-weight: 500; opacity: .8; }
.home-fam { margin-bottom: clamp(20px, 3vw, 40px); color: var(--bg); }
.home-fam summary { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 8px; padding: 0 4px; list-style: none; cursor: pointer; border-radius: 14px; -webkit-tap-highlight-color: transparent; }
.home-fam summary::-webkit-details-marker { display: none; }
.home-fam summary:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.home-fam h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.home-fam-n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--tint); font-size: 13px; font-weight: 700; }
.home-fam summary svg { flex: none; width: 20px; height: 20px; margin-left: auto; transition: transform .3s var(--ease); }
.home-fam[open] summary svg { transform: rotate(180deg); }
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.home-card { position: relative; display: flex; align-items: center; gap: 16px; min-width: 0; min-height: 96px; padding: 16px 20px 16px 16px; border-radius: 22px; overflow: hidden; background: var(--tint); color: var(--bg); text-decoration: none; transition: transform .35s var(--ease), background-color .25s, color .25s, box-shadow .35s var(--ease); }
.home-art { flex: none; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--page) 13%, transparent); transition: background-color .25s, transform .35s var(--ease); }
.home-card-t { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; }
.home-card-t b { font-size: 17px; font-weight: 700; line-height: 1.2; }
.home-card-t span { font-size: 14px; font-weight: 500; line-height: 1.35; opacity: .8; }
.home-card-go { position: absolute; right: 18px; top: 50%; display: flex; transform: translate(70px, -50%); transition: transform .35s var(--ease); }
.home-card-go svg { width: 22px; height: 22px; }
@media (hover: hover) {
  .home-card:hover, .home-card:focus-visible { transform: translateY(-4px); background: var(--bg); color: var(--white); box-shadow: 0 18px 40px color-mix(in srgb, var(--bg) 30%, transparent); }
  .home-card:hover .home-art, .home-card:focus-visible .home-art { background: rgba(255, 255, 255, .18); transform: scale(1.06); }
  .home-card:hover .home-card-go, .home-card:focus-visible .home-card-go { transform: translate(0, -50%); }
}

/* Les illustrations (src/build/home-art.mjs) : toujours en mouvement (demande de Fabrice, 3 nov.), sauf si le visiteur
   a demandé moins d'animations. Chaque élément animé (classe an) porte son animation dans --a. */
.art { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.art .f { fill: currentColor; stroke: none; }
.art .o { opacity: .3; }
.art .t { stroke-width: 2.5; }
.art .an { transform-box: view-box; }
@media (prefers-reduced-motion: no-preference) {
  .art .an { animation: var(--a); }
}
.art--widgets .wg-tile { transform-origin: 32px 37px; --a: k-plug 2.4s cubic-bezier(.7, 0, .2, 1) infinite; }
@keyframes k-plug { 0%, 12% { transform: translateY(-22px) scale(.6); } 40%, 82% { transform: none; } 100% { transform: translateY(-22px) scale(.6); } }
.art--percent .pc-bar { transform-origin: 32px 32px; --a: k-sway 2s ease-in-out infinite; }
.art--discount .ds-tag { transform-origin: 46px 16px; --a: k-swing 1.8s ease-in-out infinite; }
.art--vat .vt-coin { --a: k-drop 2s cubic-bezier(.7, 0, .2, 1) infinite; }
.art--margin .mg-bar { transform-box: fill-box; transform-origin: bottom; --a: k-grow 2.4s cubic-bezier(.7, 0, .2, 1) infinite; }
.art--loan .ln-fill { transform-box: fill-box; transform-origin: bottom; --a: k-grow 3s cubic-bezier(.7, 0, .2, 1) infinite; }
.art--interest .in-curve { stroke-dasharray: 80; stroke-dashoffset: 80; --a: k-branch 2.6s ease-in-out infinite; }
.art--unitprice .up-beam { transform-origin: 32px 20px; --a: k-sway 2.2s ease-in-out infinite; }
.art--tip .tp-bill { --a: k-slot 2.2s cubic-bezier(.7, 0, .2, 1) infinite; }
.art--salary .sl-cut { --a: k-away 2.4s cubic-bezier(.7, 0, .2, 1) infinite; }
.art--hourly .hr-hand { transform-origin: 32px 32px; --a: k-quarter 3.2s cubic-bezier(.7, 0, .2, 1) infinite; }
.art--rule3 .r3-q { transform-box: fill-box; transform-origin: center; --a: k-stamp 2.4s ease-out infinite; }
.art--average .av-line { --a: k-settle 2.4s cubic-bezier(.7, 0, .2, 1) infinite; }
.art--wordcount .wc-w { transform-box: fill-box; transform-origin: left center; --a: k-type 1.4s cubic-bezier(.7, 0, .2, 1) infinite alternate; }
@keyframes k-drop { 0%, 10% { transform: translateY(-18px); } 40%, 85% { transform: none; } 100% { transform: translateY(-18px); } }
@keyframes k-grow { 0%, 10% { transform: scaleY(.35); } 50%, 85% { transform: scaleY(1); } 100% { transform: scaleY(.35); } }
@keyframes k-slot { 0%, 10% { transform: translateY(-6px); } 50%, 80% { transform: translateY(22px); } 100% { transform: translateY(-6px); } }
@keyframes k-away { 0%, 20% { transform: none; } 55%, 85% { transform: translate(8px, -6px); } 100% { transform: none; } }
@keyframes k-settle { 0% { transform: translateY(-16px); } 45%, 80% { transform: translateY(2px); } 100% { transform: translateY(-16px); } }

@keyframes k-roulette { 0% { transform: rotate(0); } 70%, 100% { transform: rotate(874.3deg); } }
@keyframes k-sway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-9deg); } 60% { transform: rotate(5deg); } }
@keyframes k-pick3 { 0%, 12% { transform: translateY(0); } 22%, 34% { transform: translateY(14px); } 44%, 56% { transform: translateY(28px); } 66%, 74% { transform: translateY(14px); } 84%, 100% { transform: translateY(28px); } }
@keyframes k-hop { 0%, 100% { transform: translateY(0) scale(1.06, .92); } 15% { transform: translateY(0) scale(1); } 50% { transform: translateY(-9px) scale(.95, 1.05); } 85% { transform: translateY(0) scale(1); } }
@keyframes k-rock { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes k-lid { 0%, 30% { transform: translateY(0) rotate(0); } 45% { transform: translateY(-11px) rotate(-7deg); } 60% { transform: translateY(-11px) rotate(5deg); } 75%, 100% { transform: translateY(0) rotate(0); } }
@keyframes k-coin { 0%, 100% { transform: translateY(0) scaleX(1); } 25% { transform: translateY(-9px) scaleX(-1); } 50% { transform: translateY(-12px) scaleX(1); } 75% { transform: translateY(-6px) scaleX(-1); } }
@keyframes k-tumble { 0% { transform: translateY(0) rotate(0); } 20% { transform: translateY(-10px) rotate(45deg); } 40% { transform: translateY(0) rotate(90deg); } 55% { transform: translateY(-4px) rotate(135deg); } 70%, 100% { transform: translateY(0) rotate(180deg); } }
@keyframes k-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-9px); } 60% { transform: translateY(0); } 75% { transform: translateY(-3px); } }
@keyframes k-stamp { 0% { transform: scale(0); } 12% { transform: scale(1.35); } 20%, 85% { transform: scale(1); } 95%, 100% { transform: scale(0); } }
@keyframes k-draw { 0%, 15% { transform: translate(0, 0) rotate(0); } 45%, 70% { transform: translate(7px, -9px) rotate(14deg); } 100% { transform: translate(0, 0) rotate(0); } }
@keyframes k-alt { 0% { transform: scale(1); opacity: .3; } 10% { transform: scale(1.22); opacity: 1; } 22%, 45% { transform: scale(1); opacity: 1; } 50%, 100% { transform: scale(1); opacity: .3; } }
@keyframes k-shake { 0%, 50%, 100% { transform: rotate(0); } 5%, 15%, 25%, 35%, 45% { transform: rotate(9deg); } 10%, 20%, 30%, 40% { transform: rotate(-9deg); } }
@keyframes k-cardflip { 0%, 25% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 75%, 100% { transform: scaleX(1); } }
@keyframes k-branch { 0% { stroke-dashoffset: 100; } 30%, 45% { stroke-dashoffset: 0; } 50%, 100% { stroke-dashoffset: 100; } }
@keyframes k-swing { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(6deg); } 75% { transform: rotate(-6deg); } }
@keyframes k-type { from { transform: scaleX(.1); } to { transform: scaleX(1); } }
@keyframes k-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.14); } 30% { transform: scale(1); } 45% { transform: scale(1.09); } 60% { transform: scale(1); } }
@keyframes k-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes k-quarter { 0%, 18% { transform: rotate(0); } 25%, 43% { transform: rotate(90deg); } 50%, 68% { transform: rotate(180deg); } 75%, 93% { transform: rotate(270deg); } 100% { transform: rotate(360deg); } }
@keyframes k-snipA { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
@keyframes k-snipB { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(14deg); } }
@keyframes k-fillup { 0% { transform: translateY(54px); } 60%, 85% { transform: translateY(0); } 100% { transform: translateY(54px); } }

/* 13 pouces peu hauts : tout tient sans défiler */
@media (min-width: 721px) and (max-height: 820px) {
  .home-formula { font-size: clamp(24px, 4.2vh, 34px); }
  .cg-coin { --cd: clamp(130px, 22vh, 190px); }
  .home-sub { font-size: 18px; margin-top: 8px; }
  .home-find { margin-top: 14px; }
}
@media (min-width: 721px) and (max-height: 700px) { .cg-coin { --cd: clamp(120px, 20vh, 170px); } .home-sub { font-size: 17px; } }
/* Téléphone : les familles se replient, deux raccourcis par ligne */
@media (max-width: 720px) {
  .home-hero { justify-content: flex-start; padding-top: clamp(10px, 4vh, 40px); }
  .home-formula { font-size: 24px; }
  .home-sub { font-size: 16px; }
  .home-find { padding: 5px; border-radius: 16px; }
  .home-q { height: 48px; padding: 0 10px; font-size: 16px; }
  .home-go { height: 48px; padding: 0 14px; font-size: 15px; }
  .cg-coin { --cd: clamp(118px, min(36vw, 21vh), 160px); }
  .cg-btn { width: clamp(84px, 24vw, 104px); height: 60px; padding: 0 6px; border-radius: 18px; font-size: 24px; }
  .cg-row { gap: 12px; }
  .hl-msg { height: 2.9em; font-size: 16px; }
  .hl-msg .hg-in { white-space: normal; text-wrap: balance; }
  .band--home { padding-block: 48px 8px; }
  .home-head { margin-bottom: 18px; }
  .home-fam { margin-bottom: 10px; border-radius: 18px; background: var(--tint); }
  .home-fam summary { min-height: 58px; margin: 0; padding: 0 16px; }
  .home-fam-n { background: var(--white); }
  .home-cards { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 0 6px 8px; }
  .home-card { min-height: 72px; gap: 12px; padding: 10px; background: transparent; border-radius: 14px; }
  .home-art { width: 48px; height: 48px; border-radius: 14px; }
  .art { width: 34px; height: 34px; }
}

/* =====================================================================================
   cooount : les calculs. Posé sur core.css (la DA figée de la série) et site.css.
   La phrase du haut contient les champs (le cadre maison), le résultat tombe en grand en Anton, une ligne dessous l'explique.
   ===================================================================================== */

/* ---------- Un champ dans la phrase : le cadre maison ; on écrit dedans. En cours de saisie, il passe en blanc plein. ---------- */
.fld { position: relative; display: inline-flex; align-items: baseline; gap: .08em; margin: .08em 0; padding: .06em .4em .1em; border-radius: 14px; background: var(--frame); color: var(--white); cursor: text; vertical-align: baseline; white-space: nowrap; transition: background-color .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.fld:hover { background: var(--frame-hi); }
.fld:focus-within { background: var(--white); color: var(--bg); }
.fld-in { all: unset; box-sizing: content-box; min-width: .6em; padding: 0; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; color: inherit; caret-color: currentColor; line-height: inherit; }
.fld-in::selection { background: color-mix(in srgb, var(--bg) 30%, transparent); }
.fld-u { font-weight: 500; opacity: .85; }
.fld.is-bad { background: transparent; box-shadow: inset 0 0 0 2px var(--white); }
.fld.is-bad:focus-within { box-shadow: none; }
.fld-meter { position: absolute; left: -9999px; top: 0; visibility: hidden; white-space: pre; pointer-events: none; }
/* Un choix au toucher dans la phrase garde la même taille qu'un champ */
.calc-q .cyc-btn { font-weight: 700; }

/* ---------- La phrase (une par mode ; la suivante arrive en glissant) ---------- */
.calc-qs { position: relative; display: flex; justify-content: center; width: 100%; }
.calc-q { max-width: min(1000px, 100%); text-wrap: balance; }
.calc-q .nowrap, .nowrap { white-space: nowrap; }
.calc-mode { margin: 0 0 clamp(2px, .6vh, 8px); font-size: clamp(16px, 1.4vw, 19px); font-weight: 500; opacity: .95; }
.calc-mode .cyc-btn { font-weight: 700; }

/* ---------- Le résultat ---------- */
.calc-out { display: flex; flex-direction: column; align-items: center; width: min(100%, 1180px); margin-top: clamp(4px, 1.4vh, 18px); }
.calc-res { --fit: 1; margin: 0; font-family: var(--f-display); font-weight: 400; font-size: calc(var(--pkf) * 1.18 * var(--fit)); line-height: 1.06; letter-spacing: .005em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-res .res-in { display: inline-block; }
.calc-res.is-empty { opacity: .45; }
.calc-line { min-height: 1.5em; margin: clamp(2px, .8vh, 10px) 0 0; max-width: min(900px, 100%); font-size: clamp(16px, 1.45vw, 20px); font-weight: 500; line-height: 1.5; text-wrap: balance; opacity: .92; }
.calc-line b { font-weight: 700; }
.calc-line .sep { display: inline-block; width: .9em; text-align: center; opacity: .6; }

/* Petites valeurs à côté du résultat (salaire : par mois, par an ; prêt : coût total…) */
.calc-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: clamp(6px, 1.2vh, 14px) 0 0; padding: 0; list-style: none; }
.calc-facts li { display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 14px; border-radius: 14px; background: var(--frame); font-size: 15px; font-weight: 500; }
.calc-facts b { font-family: var(--f-display); font-weight: 400; font-size: 21px; letter-spacing: .01em; font-variant-numeric: tabular-nums; }

/* ---------- La feuille de détail (cotisations, tableau d'amortissement) ---------- */
.calc-sheet { display: flex; flex-direction: column; min-height: 0; padding: 22px 20px 18px; border-radius: 24px; color: #FFFFFF; background: color-mix(in srgb, var(--accent) 90%, #FFFFFF); box-shadow: 0 -10px 40px color-mix(in srgb, var(--accent) 40%, transparent); }
:root[data-light] .calc-sheet { color: var(--ink); }
.cs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cs-head .modal-title { margin: 0; text-align: left; }
.cs-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .17); color: inherit; font-size: 26px; line-height: 1; }
.cs-close:hover { background: rgba(255, 255, 255, .27); }
:root[data-light] .cs-close { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.cs-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; font-size: 15px; }
.cs-body p { margin: 0 0 10px; line-height: 1.45; }
.cs-body .cs-note { margin-top: 12px; font-size: 13px; opacity: .85; }
.cs-body .cs-note a { color: inherit; }
.calc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calc-table th, .calc-table td { padding: 7px 6px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .22); vertical-align: top; }
:root[data-light] .calc-table th, :root[data-light] .calc-table td { border-bottom-color: color-mix(in srgb, var(--ink) 20%, transparent); }
.calc-table th { position: sticky; top: 0; background: color-mix(in srgb, var(--accent) 90%, #FFFFFF); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.calc-table .num { text-align: right; white-space: nowrap; }
.calc-table tr.is-total td { font-weight: 800; border-bottom: 0; }
.calc-table tr.is-sub td { font-weight: 700; }
.calc-table td small { display: block; font-size: 12px; opacity: .8; }
#sheet-modal .sheet-body > .calc-sheet { height: auto !important; }

/* ---------- Compteur de mots : la zone de texte dans le cadre maison ---------- */
.wc-box { width: min(100%, 900px); }
.wc-text { display: block; width: 100%; height: clamp(120px, 24vh, 260px); padding: 14px 18px; border: 0; border-radius: 18px; background: var(--frame); color: var(--white); font: inherit; font-size: 18px; line-height: 1.5; resize: none; outline: none; transition: background-color .15s; }
.wc-text::placeholder { color: inherit; opacity: .7; }
.wc-text:hover { background: var(--frame-hi); }
.wc-text:focus { background: color-mix(in srgb, var(--white) 24%, transparent); }
.wc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: min(100%, 900px); margin: 0; padding: 0; list-style: none; }
.wc-stats li { display: flex; flex-direction: column; align-items: center; padding: 8px 6px; border-radius: 16px; background: var(--frame); }
.wc-stats b { font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; font-variant-numeric: tabular-nums; }
.wc-stats li:first-child { background: var(--white); color: var(--bg); }
.wc-stats span { font-size: 14px; font-weight: 500; }

/* ---------- Moyenne : la liste des notes et coefficients ---------- */
.avg-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: min(1000px, 100%); max-height: calc(var(--pkf) * 1.9); overflow: auto; padding: 2px; }
.avg-item { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 2px; border-radius: 16px; background: var(--frame); font-size: clamp(18px, 1.6vw, 22px); }
.avg-item .fld { background: transparent; margin: 0; }
.avg-item .fld:hover { background: var(--frame); }
.avg-item .fld:focus-within { background: var(--white); }
.avg-item .avg-x { font-weight: 500; opacity: .75; padding: 0 2px; }
.avg-item .avg-rm { width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: inherit; font-size: 20px; line-height: 1; opacity: .7; }
.avg-item .avg-rm:hover { background: var(--frame); opacity: 1; }
.avg-add { min-height: 44px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--frame); color: var(--white); font: inherit; font-weight: 700; }
.avg-add:hover { background: var(--frame-hi); }
.hero:not(.avg-weighted) .avg-co { display: none; }

/* ---------- Comparer deux prix (prix au kilo) ---------- */
.up-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.up-row .calc-q { margin: 0; }
.up-tag { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; margin-right: .2em; border-radius: 50%; background: var(--white); color: var(--bg); font-family: var(--f-display); font-size: .8em; vertical-align: .1em; }

/* ---------- Plein écran : le résultat seul, en très grand ---------- */
.hero.is-fs .calc-out { width: min(100%, 1600px); }

/* ---------- Téléphone ---------- */
@media (max-width: 720px) {
  .calc-q { font-size: 20px; line-height: 1.7; }
  .fld { border-radius: 12px; }
  .calc-res { font-size: calc(var(--pkf) * 1.05 * var(--fit)); }
  .calc-line { font-size: 15px; }
  .calc-facts li { font-size: 13px; padding: 5px 10px; }
  .calc-facts b { font-size: 18px; }
  .wc-text { height: clamp(96px, 20vh, 180px); font-size: 17px; }
  .wc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wc-stats li { padding: 4px; }
  .wc-stats b { font-size: 30px; }
  .avg-list { max-height: 30vh; }
}
@media (max-width: 720px) and (max-height: 700px) {
  .calc-q { font-size: 18px; line-height: 1.6; }
  .wc-text { height: 84px; }
}

/* ---------- Barèmes : la date et la source, sous le résultat (salaire, TVA) ; le bloc « Sources et mises à jour » plus bas ---------- */
.calc-src { margin: clamp(4px, 1vh, 10px) 0 0; font-size: 13px; font-weight: 500; opacity: .85; }
.calc-src a { color: inherit; text-underline-offset: 3px; }
.band--law .law-promise { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--bg); }
.band--law .law-date { margin: 0 0 18px; font-weight: 500; }
.law-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.law-list li { padding: 14px 18px; border-radius: 18px; background: var(--tint); line-height: 1.5; }
.law-list li span { opacity: .8; }
.law-list a { color: var(--bg); font-weight: 700; text-underline-offset: 3px; }
@media (max-width: 720px) { .calc-src { font-size: 12px; } }

/* ---------- Téléphone, serré : les petites valeurs en une rangée (libellé au-dessus du chiffre), Copier et Détail côte à côte ---------- */
@media (max-width: 720px) {
  .calc-out { margin-top: 2px; }
  .calc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; width: 100%; margin-top: 8px; }
  .calc-facts li { flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: 6px 4px; border-radius: 12px; font-size: 12px; line-height: 1.2; text-align: center; }
  .calc-facts b { font-size: clamp(15px, 4.6vw, 18px); white-space: nowrap; }
  .calc-line { font-size: 14px; line-height: 1.4; }
  .hero .tool--calc .actions { flex-wrap: nowrap; }
  .hero .tool--calc .actions .btn-primary { flex: 2 1 0; min-width: 0; min-height: 58px; }
  .hero .tool--calc .actions .btn-ghost { flex: 1 1 0; min-width: 0; min-height: 58px; padding: 0 10px; font-size: 16px; }
  .calc-src { margin-top: 6px; font-size: 11.5px; }
  .calc-mode { margin: 0; font-size: 15px; }
}
@media (max-width: 720px) and (max-height: 700px) {
  .calc-res { font-size: calc(var(--pkf) * .92 * var(--fit)); }
  .calc-facts li { padding: 4px 3px; }
}

/* ---------- Tableaux des articles : ils défilent dans leur cadre sur téléphone, jamais la page ---------- */
.content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 13 pouces peu hauts (1280×680) : un peu moins d'air entre la phrase, le résultat et les petites valeurs ---------- */
@media (min-width: 721px) and (max-height: 700px) {
  .tool--calc .when { gap: 4px; }
  .tool--calc .calc-out { margin-top: 0; }
  .tool--calc .calc-facts { margin-top: 6px; }
  .tool--calc .calc-src { margin-top: 4px; }
  .tool--calc .calc-mode { margin-bottom: 0; }
}

/* ---------- Téléphone : un libellé long (« Amortissement ») passe à la ligne dans son bouton ; la barre du pourboire garde 3 taux ---------- */
@media (max-width: 720px) {
  .hero .tool--calc .actions .btn-ghost { white-space: normal; line-height: 1.15; }
  .hero .tool--calc .actions .btn-ghost [data-label] { overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  .tool--tip [data-tip]:nth-of-type(4) { display: none; }
}














/* La machine à widgets : la phrase du choix de l'outil, puis la machine (aperçu, tailles, boutons ; voir src/core/widget.js). */
.tool--widgets .wgt { width: min(1040px, 100%); }
.wgt-box { width: 100%; margin-top: clamp(10px, 2vh, 20px); }
/* cooount : écrans peu hauts, l'aperçu remonte un peu pour que tout tienne. */
@media (max-height: 700px) { .wgt-box { margin-top: 0; } .tool--widgets .lead { margin-bottom: 0; } .hero--widgets .tool { padding-top: 6px; } }
