/* Newsflip web : même langage visuel que l'appli (marine profond, violet électrique,
   cartes arrondies avec arête pleine en bas, soleil jaune et corail). */
:root, :root[data-theme="light"] {
  --bg: #F3F1FF; --card: #FFFFFF; --soft: #F2F1F8; --line: #E6E4F2;
  --ink: #17162B; --muted: #5A5F70;
  --hl: #4B2FE0; --hl-dk: #3420B0; --hl-soft: #EEEAFF;
  --sun: #FFE36E; --coral: #F0836A;
  --ok: #147A42; --ok-dk: #0B4F2A; --ok-bg: #E6F6EC;
  --bad: #D0331F; --bad-dk: #8E1F11; --bad-bg: #FDECEA;
  --warn: #B07F00; --warn-bg: #FFF4D6;
  --desk: #F3F1FF;
}
:root[data-theme="dark"] {
  --bg: #100F1F; --card: #1B1A30; --soft: #24233B; --line: #2F2D4A;
  --ink: #F1F0FA; --muted: #A6A9BC;
  --hl: #7A63FF; --hl-dk: #4E37D6; --hl-soft: #28234D;
  --ok: #25A05E; --ok-bg: #12301F;
  --bad: #F0543E; --bad-bg: #3A1915;
  --warn: #FFC21A; --warn-bg: #3A2E0E;
  --desk: #100F1F;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--desk); color: var(--ink);
  font: 500 16px/1.4 ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select { font: inherit; color: inherit; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.fill { fill: currentColor; stroke: none; }
.display { font-weight: 800; letter-spacing: -.01em; }

/* ---------- coque « téléphone » ---------- */
.shell { position: relative; min-height: 100dvh; background: var(--bg); overflow-x: hidden; }
.wrap { max-width: 720px; margin: 0 auto; padding: 8px 20px calc(110px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .wrap { padding-bottom: 60px; } }
.screen { padding: 0 18px calc(110px + env(safe-area-inset-bottom)); }
.screen.full { max-width: 560px; margin: 0 auto; width: 100%; padding-bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; min-height: 100dvh; }
h1.title { font-size: 34px; margin: 0; padding-top: 14px; font-weight: 800; letter-spacing: -.02em; }
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.stack > * { min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; font-weight: 600; }

/* ---------- panneaux, boutons, puces ---------- */
.panel { background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--line); }
.panel.hlrow { background: var(--hl-soft); border-color: color-mix(in srgb, var(--hl) 50%, var(--line)); box-shadow: 0 5px 0 color-mix(in srgb, var(--hl) 50%, transparent); }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 16px; border-radius: 999px; font-weight: 800; font-size: 18px; color: #fff;
  background: var(--hl); box-shadow: 0 5px 0 var(--hl-dk); margin-bottom: 5px; transition: transform .08s, box-shadow .08s;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--hl-dk); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sun { background: var(--sun); color: #17162B; box-shadow: 0 5px 0 #D9B83A; }
.btn.sun:active:not(:disabled) { box-shadow: 0 1px 0 #D9B83A; }
.btn.white { background: #fff; color: var(--hl-dk); box-shadow: 0 5px 0 #C9C2FF; }
.btn.ok { background: var(--ok); box-shadow: 0 5px 0 var(--ok-dk); }
.btn.bad { background: var(--bad); box-shadow: 0 5px 0 var(--bad-dk); }
.btn.ok:active:not(:disabled) { box-shadow: 0 1px 0 var(--ok-dk); }
.btn.bad:active:not(:disabled) { box-shadow: 0 1px 0 var(--bad-dk); }
.linkbtn { color: var(--hl); font-weight: 800; display: inline-flex; gap: 8px; align-items: center; justify-content: center; width: 100%; padding: 8px; }
.round { width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 16px; color: var(--ink); flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--hl)) 18%, transparent); color: var(--c, var(--hl)); white-space: nowrap; }
.chip.onart { --c: #fff; background: rgba(0,0,0,.28); }

/* ---------- accueil ---------- */
.brandbar { display: flex; align-items: center; gap: 10px; padding: calc(24px + env(safe-area-inset-top)) 0 14px; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--hl); color: #fff; display: grid; place-items: center; font-size: 17px; }
.brand { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.brand b { color: var(--hl); margin-left: 2px; }
.spacer { flex: 1; }
.avatar { width: var(--s, 38px); height: var(--s, 38px); border-radius: calc(var(--s, 38px) * .3); display: grid; place-items: center; font-weight: 800; font-size: calc(var(--s, 38px) * .5); color: #17162B; flex: none; }

.hero { position: relative; border-radius: 28px; padding: 22px 20px 16px; color: #fff; overflow: hidden; min-height: 250px;
  background: linear-gradient(135deg, #3B2FD9, #C63BD0); display: flex; flex-direction: column; gap: 10px; }
.hero::before { content: ""; position: absolute; top: 8px; right: 6px; width: 140px; height: 98px; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.2) 2.5px, transparent 3px); background-size: 14px 14px; }
.hero h2 { margin: 0; font-size: 32px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.hero p { margin: 0; font-size: 15px; font-weight: 600; opacity: .92; max-width: 205px; }
.hero .flip { position: absolute; width: 62px; height: 82px; border-radius: 18px; background: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.2); display: grid; place-items: center; font-size: 28px; }
.hero .flip.a { right: 70px; top: 28px; transform: rotate(-12deg); background: rgba(255,255,255,.95); color: var(--bad); }
.hero .flip.b { right: 22px; top: 58px; transform: rotate(11deg); color: var(--ok); }
.hero .flip svg { stroke-width: 3.4; }
.hero .grow { flex: 1; min-height: 6px; }
.hero .status { display: flex; gap: 8px; align-items: center; font-weight: 800; font-size: 15px; }
.hero .status.wide { font-size: 14px; }
.spin { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modes { padding: 16px 0 16px 16px; }
.modes h3 { margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 24px 6px 0; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.mode { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 10px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; background: var(--soft); box-shadow: 0 3px 0 var(--line); }
.mode.sel { background: var(--hl); color: #fff; box-shadow: 0 3px 0 var(--hl-dk); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { padding: 16px; }
.stat .ic { font-size: 22px; }
.stat .v { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat .l { font-size: 13px; font-weight: 600; color: var(--muted); }
.catch { display: flex; align-items: center; gap: 14px; padding: 16px; width: 100%; text-align: left; }
.catch .sq { width: 48px; height: 48px; border-radius: 14px; background: var(--sun); color: #17162B; display: grid; place-items: center; font-size: 22px; flex: none; }
.catch b { font-size: 17px; font-weight: 800; display: block; }

/* ---------- barre d'onglets ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(14px); border-top: 1.5px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
.tab { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 800; color: var(--muted); }
.tab svg { font-size: 22px; }
.tab.sel { color: var(--hl); }

/* ---------- illustration ---------- */
.art { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; }
.art i { position: absolute; display: block; }
.art .sun { width: calc(var(--h) * .9); height: calc(var(--h) * .9); border-radius: 50%; background: var(--sun); right: calc(var(--h) * -.35); top: calc(var(--h) * -.35); }
.art .coral { width: calc(var(--h) * .5); height: calc(var(--h) * .5); border-radius: 22px; background: var(--coral); left: calc(var(--h) * -.12); bottom: calc(var(--h) * -.1); transform: rotate(18deg); }
.art .ring { width: calc(var(--h) * .6); height: calc(var(--h) * .6); border-radius: 50%; border: 10px solid rgba(255,255,255,.25); left: calc(var(--h) * .12); top: calc(var(--h) * -.12); }
.art .sym { position: relative; font-size: calc(var(--h) * .36); line-height: 1; filter: drop-shadow(0 5px 0 rgba(0,0,0,.25)); }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- jeu ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 0 14px; }
.pips { display: flex; gap: 6px; flex: 1; }
.pips i { flex: 1; height: 8px; border-radius: 99px; background: var(--line); }
.pips i.done { background: var(--hl); } .pips i.cur { background: color-mix(in srgb, var(--hl) 50%, transparent); }
.count { font-weight: 800; font-size: 15px; color: var(--muted); }
.cardwrap { flex: 1; display: flex; min-height: 0; padding-bottom: 6px; touch-action: pan-y; }
.card { position: relative; flex: 1; display: flex; flex-direction: column; background: var(--card); border-radius: 28px; border: 1.5px solid var(--line); box-shadow: 0 6px 0 var(--line); overflow: hidden; touch-action: none; user-select: none; cursor: grab; will-change: transform; }
.card.drag { cursor: grabbing; }
.card .ring-ok, .card .ring-bad { position: absolute; inset: 0; border-radius: 28px; border: 5px solid; opacity: 0; pointer-events: none; }
.card .ring-ok { border-color: var(--ok); } .card .ring-bad { border-color: var(--bad); }
.card .overlay { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.stamp { font-weight: 800; font-size: 26px; color: #fff; padding: 6px 12px; border-radius: 10px; opacity: 0; }
.stamp.t { background: var(--ok); transform: rotate(8deg); } .stamp.f { background: var(--bad); transform: rotate(-8deg); }
.card .body { padding: 18px; display: grid; gap: 12px; align-content: start; }
.card .chips2 { display: flex; gap: 8px; flex-wrap: wrap; }
.card h2 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.card p { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 8px; }
.btn.flyL { transition: transform .22s ease-in; }

/* ---------- réponse ---------- */
.answer { flex: 1; overflow-y: auto; padding: 4px 0 16px; display: grid; gap: 16px; align-content: start; }
.res { display: flex; align-items: center; gap: 10px; font-size: 30px; font-weight: 800; }
.res svg { font-size: 34px; }
.banner { text-align: center; color: #fff; font-size: 38px; font-weight: 800; padding: 14px; border-radius: 18px; box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 50%, transparent); background: var(--c); margin-bottom: 5px; }
.hcard { border-radius: 22px; overflow: hidden; }
.hcard .t { padding: 16px; display: grid; gap: 8px; }
.hcard .k { font-size: 12px; font-weight: 800; color: var(--muted); }
.hcard h3 { margin: 0; font-size: 18px; font-weight: 800; }
.hcard h3.struck { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 70%, transparent); }
.block { padding: 16px; border-radius: 20px; display: grid; gap: 8px; background: var(--f); border: 1.5px solid color-mix(in srgb, var(--c) 35%, transparent); }
.block h4 { margin: 0; display: flex; gap: 8px; align-items: center; font-size: 17px; font-weight: 800; color: var(--c); }
.block p { margin: 0; line-height: 1.5; }
.source { display: inline-flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 999px; font-weight: 800; font-size: 15px; background: var(--hl-soft); color: var(--hl); text-decoration: none; justify-self: start; }

/* ---------- résultat ---------- */
.result { flex: 1; display: grid; align-content: center; justify-items: center; gap: 16px; text-align: center; }
.score { width: 190px; height: 190px; border-radius: 50%; background: var(--sun); color: #17162B; display: grid; place-content: center; }
.score b { font-size: 64px; line-height: 1; font-weight: 800; } .score span { font-size: 18px; font-weight: 800; opacity: .7; }
.result h2 { margin: 0; font-size: 32px; font-weight: 800; }
.note { font-size: 13px; font-weight: 800; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.dots { display: flex; gap: 8px; }
.dots i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 16px; }
.streakcard { width: 100%; padding: 16px; display: grid; gap: 10px; justify-items: center; }
.streakcard .big { display: flex; gap: 8px; align-items: center; font-size: 22px; font-weight: 800; }
.week { display: flex; gap: 10px; }
.week div { display: grid; gap: 4px; justify-items: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.week svg { font-size: 18px; }

/* ---------- jours passés / classement / profil ---------- */
.sec { font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; padding-top: 6px; }
.rules { padding: 16px; display: grid; gap: 8px; }
.rules b { display: flex; gap: 8px; align-items: center; font-size: 16px; }
.day { display: flex; align-items: center; gap: 12px; padding: 12px; width: 100%; text-align: left; border-radius: 18px; }
.day:disabled { opacity: .5; cursor: default; }
.date { width: 52px; height: 52px; border-radius: 14px; display: grid; place-content: center; text-align: center; color: #17162B; line-height: 1; flex: none; }
.date b { font-size: 22px; font-weight: 800; } .date span { font-size: 11px; font-weight: 800; margin-top: 2px; }
.day .m { flex: 1; display: grid; gap: 4px; }
.day .m b { font-size: 17px; font-weight: 800; }
.day .m span { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.day .r { display: grid; gap: 6px; justify-items: end; color: var(--hl); font-size: 13px; }
.tag { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }

.row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; }
.row .rk { width: 34px; text-align: center; font-size: 22px; font-weight: 800; color: var(--muted); }
.row .nm { flex: 1; display: grid; }
.row .nm b { font-size: 17px; font-weight: 800; }
.row .nm span { font-size: 12px; font-weight: 800; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.row .pt { font-size: 20px; font-weight: 800; }
.select { appearance: none; background: var(--hl-soft); color: var(--hl); font-weight: 800; font-size: 13px; border: 0; border-radius: 999px; padding: 8px 28px 8px 12px; max-width: 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%237A63FF' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.hrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.profile-head { display: flex; align-items: center; gap: 14px; padding: 16px; }
.profile-head .n { flex: 1; display: grid; gap: 2px; }
.profile-head .n b { font-size: 24px; font-weight: 800; }
.profile-head .n span { color: #FF9500; font-weight: 800; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.box { padding: 16px; display: grid; gap: 16px; }
.line { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; width: 100%; text-align: left; }
.line .grow { flex: 1; }
.line.dis { opacity: .5; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 99px; background: var(--line); flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch.on { background: var(--hl); } .switch.on::after { transform: translateX(20px); }
.input { width: 100%; padding: 14px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); box-shadow: 0 5px 0 var(--line); font-weight: 800; font-size: 20px; outline: none; }
.input:focus { border-color: var(--hl); }
.presets { display: flex; gap: 10px; flex-wrap: wrap; }
.presets button { border-radius: 14px; outline-offset: 2px; }
.presets button.sel { outline: 3px solid var(--hl); }

/* ---------- pseudo, dialogue, toast ---------- */
.welcome { min-height: 100dvh; display: grid; align-content: center; gap: 18px; padding: 0 24px; }
.welcome .big { font-size: 40px; font-weight: 800; color: var(--hl); letter-spacing: -.02em; }
.welcome h1 { margin: 0; font-size: 30px; font-weight: 800; }
dialog { border: 0; border-radius: 24px; padding: 20px; width: min(92vw, 380px); background: var(--card); color: var(--ink); box-shadow: 0 5px 0 var(--line), 0 20px 60px rgba(0,0,0,.4); }
dialog::backdrop { background: rgba(8,7,20,.6); }
dialog h3 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
dialog .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
dialog .btn { font-size: 16px; padding: 12px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 800; font-size: 14px; opacity: 0; transition: .25s; z-index: 20; max-width: 90vw; text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.err { color: var(--bad); font-weight: 700; font-size: 13px; }
.slide-in { animation: slide .3s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .slide-in { animation: none; } }

/* ---------- site : en-tête, bannière, tuiles (organisation inspirée de Tipoki) ---------- */
@media (min-width: 700px) { .tabbar { display: none; } }
.site { position: sticky; top: 0; z-index: 6; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); padding-top: env(safe-area-inset-top); }
.site-in { max-width: 720px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 10px; }
.brandlink { display: flex; align-items: center; gap: 10px; }
.brandlink .brand { font-size: 26px; }
.topnav { display: none; gap: 6px; margin-left: 14px; }
@media (min-width: 700px) { .topnav { display: flex; } }
.navpill { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; font-weight: 800; font-size: 14px; color: var(--muted); }
.navpill:hover { color: var(--ink); background: var(--soft); }
.navpill.sel { color: var(--hl); background: var(--hl-soft); }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px; font-weight: 800; font-size: 13px; background: var(--card); border: 1.5px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.pill.icon { width: 36px; padding: 0; justify-content: center; font-size: 15px; }
.pill:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
@media (max-width: 420px) { .pill .lbl { display: none; } .pill:not(.icon) { width: 36px; padding: 0; justify-content: center; } }
.avbtn { display: grid; border-radius: 12px; }

.herorow { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 14px; }
.hero2 { position: relative; overflow: hidden; border-radius: 24px; padding: 26px 24px; color: #fff; min-height: 150px; display: grid; align-content: center; gap: 8px;
  background: linear-gradient(135deg, #7A63FF, #8E78FF); box-shadow: 0 5px 0 #4E37D6; }
.hero2 h1 { margin: 0; font-size: clamp(26px, 5.4vw, 40px); line-height: 1.04; font-weight: 800; letter-spacing: -.025em; max-width: 14ch; position: relative; }
.hero2 p { margin: 0; font-weight: 600; font-size: 15px; opacity: .92; max-width: 34ch; position: relative; }
.hero2 i { position: absolute; border-radius: 50%; }
.hero2 .sun { width: 150px; height: 150px; background: var(--sun); right: -34px; top: -56px; }
.hero2 .coral { width: 84px; height: 84px; background: var(--coral); right: 38px; bottom: -42px; border-radius: 30px; transform: rotate(14deg); }
.tplay { display: grid; align-content: center; justify-items: center; gap: 2px; border-radius: 24px; padding: 14px 8px; text-align: center; background: #271D9E; color: #fff; box-shadow: 0 5px 0 #170F6B; margin-bottom: 5px; }
.tplay b { font-size: 15px; font-weight: 800; margin-top: 8px; }
.tplay > span:last-child { font-size: 12px; font-weight: 700; opacity: .75; }
button.tplay:active { transform: translateY(4px); box-shadow: 0 1px 0 #170F6B; }
.tplay.static { cursor: default; }
.pcirc { width: 52px; height: 52px; border-radius: 50%; background: var(--sun); color: #17162B; display: grid; place-items: center; font-size: 22px; box-shadow: 0 4px 0 #D9B83A; }
.pcirc.ok { background: #3DDC84; box-shadow: 0 4px 0 #1F9A57; }
.spin.dark { border-color: rgba(23,22,43,.25); border-top-color: #17162B; }
.statusline { font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; padding: 2px 8px; }
@media (max-width: 460px) { .herorow { grid-template-columns: minmax(0, 1fr) 104px; } .hero2 { padding: 22px 18px; } .pcirc { width: 44px; height: 44px; } }

.step { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.step .num { width: 24px; height: 24px; border-radius: 50%; background: var(--hl); color: #fff; font-size: 13px; display: grid; place-items: center; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qtile { position: relative; overflow: hidden; display: grid; align-content: start; gap: 4px; min-height: 146px; padding: 14px 14px 16px; text-align: left; border-radius: 20px;
  color: var(--ink); background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 5px 0 color-mix(in srgb, var(--c1) 60%, #000 20%); margin-bottom: 5px; transition: transform .08s, box-shadow .08s; }
.qtile > * { position: relative; }
.qtile::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.28); right: -30px; top: -34px; }
.qtile:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c1) 60%, #000 20%); }
.qtile .badge { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: #17162B; display: grid; place-items: center; font-size: 19px; margin-bottom: 6px; }
.qtile .qt { font-size: 17px; font-weight: 800; line-height: 1.12; letter-spacing: -.01em; padding-right: 36px; }
.qtile .qs { font-size: 12px; font-weight: 700; opacity: .8; line-height: 1.25; padding-right: 36px; }
.qtile .go { position: absolute; right: 12px; bottom: 12px; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #17162B; display: grid; place-items: center; font-size: 16px; }
.qtile.sel { outline: 3px solid var(--ink-ring, #fff); outline-offset: 2px; }
:root[data-theme="light"] .qtile.sel { outline-color: var(--hl); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .qtile.sel { outline-color: var(--hl); } }
.qtile.sel .go { background: var(--hl); color: #fff; }

.joinbox { padding: 18px 20px; display: grid; gap: 12px; }
.joinbox h2, .profbox h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.joinbox p { margin: 0; }
.joinrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.input.code { text-align: center; letter-spacing: .3em; text-transform: uppercase; font-size: 18px; box-shadow: none; background: var(--bg); padding: 14px; }
.input.code::placeholder { letter-spacing: .3em; color: var(--muted); opacity: .7; }
.btn.slim { width: auto; padding: 14px 22px; font-size: 16px; margin-bottom: 0; }
.profbox { padding: 18px 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: center; }
.avbig { position: relative; display: grid; grid-row: span 1; }
.avbig .plus { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--hl); color: #fff; font-weight: 800; font-size: 15px; line-height: 20px; text-align: center; border: 2px solid var(--card); }
.pname { font-size: 22px; font-weight: 800; line-height: 1.1; }
.textlink { color: var(--hl); font-weight: 800; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; justify-self: start; }
.pbody { display: grid; gap: 2px; justify-items: start; }
.pnote { grid-column: 1 / -1; margin: 6px 0 0; padding-top: 12px; border-top: 1.5px solid var(--line); }
@media (max-width: 800px) { .pill .lbl { display: none; } .pill:not(.icon) { width: 36px; padding: 0; justify-content: center; } .topnav { margin-left: 4px; } }
@media (max-width: 460px) { .hero2 .sun { width: 96px; height: 96px; right: -30px; top: -44px; } .hero2 .coral { width: 64px; height: 64px; right: 22px; bottom: -34px; } }

.step.sub { font-size: 18px; margin-top: 20px; }
.step.sub .opt { font-size: 12px; font-weight: 800; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 3px 9px; }
.areas { display: flex; flex-wrap: wrap; gap: 8px; }
.areas .mode { margin-bottom: 3px; }
.picked { margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--muted); }
.picked b { color: var(--ink); }

/* ---------- calendrier des jours passés ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 800; font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend .sw { width: 16px; height: 16px; border-radius: 6px; display: block; }
.sw.ok { background: var(--ok); } .sw.bad { background: var(--bad); }
svg.i.flip { transform: scaleX(-1); }
.cal { padding: 16px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.round:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding-bottom: 4px; }
.cal-cell, .cal-blank { aspect-ratio: 1; min-height: 40px; }
.cal-cell { position: relative; display: grid; place-items: center; border-radius: 12px; font-size: 15px; color: var(--ink);
  background: color-mix(in srgb, var(--c) 20%, transparent); border: 2px solid color-mix(in srgb, var(--c) 55%, transparent); }
.cal-cell.ok { --c: var(--ok); } .cal-cell.bad { --c: var(--bad); }
.cal-cell b { font-weight: 800; }
button.cal-cell:hover { border-color: var(--c); }
button.cal-cell:active { transform: translateY(2px); }
.cal-cell.done { background: var(--c); border-color: var(--c); color: #fff; }
.cal-cell.today { outline: 3px solid var(--hl); outline-offset: 2px; }
.cal-cell.off { opacity: .42; }
.cal-cell.future { background: none; border: 2px dashed var(--line); color: var(--muted); opacity: .7; }
.cal-cell svg { position: absolute; right: 3px; bottom: 3px; font-size: 12px; stroke-width: 3.2; }
.cal-cell .dot { position: absolute; right: 5px; bottom: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* Boutons du haut : trois ronds de 38 px comme dans l'appli (son, mode sombre, avatar), jamais écrasés ni coupés. */
.pill, .pill.icon, .avbtn { flex: none; }
.pill, .pill.icon { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; font-size: 16px; box-shadow: none; }
.pill:active { transform: none; }
.site-in { gap: 8px; }
.topnav { min-width: 0; flex: 0 1 auto; }
@media (max-width: 860px) { .navpill { padding: 8px 10px; font-size: 13px; } }
@media (max-width: 860px) { .navpill svg { display: none; } }
/* Menu du haut en texte seul : tout tient dans la colonne de 720 px, rien ne déborde sur les boutons ronds. */
.navpill svg { display: none; }
.navpill { padding: 8px 11px; }
.topnav { margin-left: 6px; gap: 2px; }
.brandlink .brand { font-size: 24px; }

.topnav { margin-left: 26px; }


/* ================= Nouveau style : crème, cartes pastel, titres très gras, boutons pilule sombres (comme l'appli) ================= */
:root, :root[data-theme="light"] {
  --bg: #E8F6EE; --card: #FFFFFF; --soft: #DAEDE2; --line: #CDE4D7; --ink: #1B1A2E; --muted: #66645F;
  --hl: #2438D6; --hl-dk: #1A2899; --hl-soft: #E1E4FF; --sun: #FFD95A; --desk: #E8F6EE;
}
:root[data-theme="dark"] {
  --bg: #15131D; --card: #201E2D; --soft: #2B2939; --line: #2F2D40; --ink: #F6F1E6; --muted: #A9A7B5;
  --hl: #7F8CFF; --hl-dk: #4D5BE0; --hl-soft: #2A2D55; --desk: #15131D;
}
body { font-family: "Inter", "SF Pro Display", system-ui, -apple-system, "Segoe UI", sans-serif; }
.display, h1, h2, h3, .brand, .btn { font-weight: 800; }
.panel { border: 0; border-radius: 26px; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.panel.hlrow { background: var(--hl-soft); box-shadow: 0 4px 12px rgba(0,0,0,.06); border: 0; }
.btn { background: var(--ink); color: var(--bg); box-shadow: none; margin-bottom: 0; }
.btn:active:not(:disabled) { transform: scale(.97); box-shadow: none; }
.btn.sun { background: var(--sun); color: #1B1A2E; box-shadow: none; }
.btn.white { background: #fff; color: #1B1A2E; box-shadow: none; }
.btn.ok { background: var(--ok); color: #fff; box-shadow: none; } .btn.bad { background: var(--bad); color: #fff; box-shadow: none; }
.btn.ok:active:not(:disabled), .btn.bad:active:not(:disabled) { box-shadow: none; }
.round, .pill, .pill.icon { border: 0; background: var(--card); box-shadow: none; }
.chip { background: color-mix(in srgb, var(--c, var(--hl)) 16%, transparent); }
.brand b { color: #6A5CFF; }
.brandlink .brand { font-size: 30px; }
.navpill.sel { color: var(--bg); background: var(--ink); }
.logo { display: none; }

/* carte du jour : gros bloc corail avec cercles doux */
.hero2 { background: #FF6B4A; box-shadow: none; border-radius: 30px; }
.hero2 .sun { background: rgba(0,0,0,.07); width: 190px; height: 190px; right: -50px; top: -70px; }
.hero2 .coral { background: rgba(0,0,0,.07); width: 130px; height: 130px; border-radius: 50%; right: 70px; bottom: -70px; transform: none; }
.hero2 h1 { font-size: clamp(28px, 6vw, 44px); letter-spacing: -.03em; }
.tplay { background: #1B1A2E; box-shadow: none; margin-bottom: 0; border-radius: 30px; }
button.tplay:active { transform: scale(.97); box-shadow: none; }
.pcirc { background: #FFD95A; box-shadow: none; } .pcirc.ok { background: #B6EBA0; box-shadow: none; }

/* tuiles de thèmes et pastilles de régions */
.qtile { box-shadow: none; margin-bottom: 0; border-radius: 26px; color: #1B1A2E; background: var(--c1); }
.qtile::after { background: rgba(0,0,0,.07); }
.qtile:active { transform: scale(.97); box-shadow: none; }
.qtile .badge { background: rgba(255,255,255,.7); border-radius: 50%; }
.qtile .go { background: #1B1A2E; color: #fff; }
.qtile.sel { outline: 3px solid var(--ink); }
.qtile.sel .go { background: #1B1A2E; color: #fff; }
.mode { background: #EADFC6; color: #1B1A2E; box-shadow: none; }
.mode.sel { background: var(--ink); color: var(--bg); box-shadow: none; }
.step .num { background: var(--ink); color: var(--bg); }

/* tuiles de stats pastel */
.stat.pastel { position: relative; overflow: hidden; background: var(--p); color: #1B1A2E; border-radius: 26px; padding: 16px; }
.stat.pastel::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: rgba(0,0,0,.07); right: -30px; top: -40px; }
.stat.pastel .l { color: rgba(27,26,46,.7); font-weight: 700; }
.stat.pastel .ic { color: #1B1A2E; }
.stat.pastel .v { font-size: 38px; }
.gamesbar { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: 999px; padding: 14px 20px; font-weight: 800; }
.gamesbar span { display: inline-flex; gap: 8px; align-items: center; } .gamesbar b { font-size: 22px; }
.catch .sq { border-radius: 50%; }
.datacard { position: relative; overflow: hidden; background: #F8C0B8; color: #1B1A2E; border-radius: 24px; padding: 16px; display: grid; gap: 10px; }
.datacard::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(0,0,0,.07); right: -40px; top: -50px; pointer-events: none; }
.datacard b { display: flex; gap: 8px; align-items: center; font-size: 18px; }
.datacard p { margin: 0; font-size: 14px; font-weight: 600; color: rgba(27,26,46,.85); position: relative; }
.darkbtn { justify-self: start; background: #1B1A2E; color: #fff; font-weight: 800; padding: 10px 16px; border-radius: 999px; position: relative; }

/* illustrations des actus : pastel, symbole sombre */
.art .sun, .art .coral { background: rgba(0,0,0,.07); border-radius: 50%; }
.art .ring { border: 0; background: rgba(0,0,0,.07); }
.art .sym { filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); font-size: calc(var(--h) * .38); }
.art .sun, .art .coral { background: rgba(255,255,255,.28); }
.art .ring { background: none; border: calc(var(--h) * .05) solid rgba(255,255,255,.4); }
.art .dots { inset: 0; background-image: radial-gradient(rgba(255,255,255,.55) 1.6px, transparent 2px); background-size: 18px 18px; opacity: .45; -webkit-mask-image: linear-gradient(135deg, #000, transparent 70%); mask-image: linear-gradient(135deg, #000, transparent 70%); }
.art .orb { position: absolute; width: calc(var(--h) * .62); height: calc(var(--h) * .62); border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 8px 22px rgba(0,0,0,.12), inset 0 0 0 calc(var(--h) * .02) rgba(255,255,255,.7); }
.art .mini { position: absolute; font-size: calc(var(--h) * .15); opacity: .55; line-height: 1; filter: saturate(.9); }
.art .m1 { left: 10%; top: 22%; transform: rotate(-18deg); } .art .m2 { right: 12%; top: 58%; transform: rotate(14deg); font-size: calc(var(--h) * .19); }
.art .m3 { left: 20%; bottom: 10%; transform: rotate(10deg); font-size: calc(var(--h) * .12); } .art .m4 { right: 24%; top: 10%; transform: rotate(-8deg); font-size: calc(var(--h) * .11); }
.card, .hcard { border: 0; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.input { border: 1.5px solid var(--line); box-shadow: none; }
.switch.on { background: var(--hl); }
.tabbar { background: color-mix(in srgb, var(--card) 94%, transparent); border-top: 0; }
.tab { font-weight: 800; }
.tab.sel { color: var(--hl); }
.pips i.done { background: var(--ink); } .pips i.cur { background: color-mix(in srgb, var(--ink) 40%, transparent); }
.score { background: var(--sun); }
.source { background: var(--hl-soft); color: var(--hl); }

/* carte du jour (comme l'appli) : tout dans le bloc corail, puces de thèmes en pastel */
.herocard { position: relative; overflow: hidden; background: #FF6B4A; color: #fff; border-radius: 30px; padding: 22px; min-height: 268px; display: flex; flex-direction: column; gap: 10px; }
.herocard i.c1, .herocard i.c2 { position: absolute; border-radius: 50%; background: rgba(0,0,0,.07); pointer-events: none; }
.herocard i.c1 { width: 190px; height: 190px; right: -50px; top: -70px; } .herocard i.c2 { width: 150px; height: 150px; left: -50px; bottom: -80px; }
.herocard > * { position: relative; }
.herocard i { position: absolute; }
.herocard .kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; opacity: .85; }
.herocard h1 { margin: 0; font-size: clamp(30px, 7vw, 44px); line-height: 1.03; font-weight: 800; letter-spacing: -.03em; }
.herocard p { margin: 0; font-weight: 600; font-size: 15px; opacity: .92; max-width: 250px; }
.herocard .grow { flex: 1; min-height: 8px; }
.herocard .flip { position: absolute; width: 62px; height: 82px; border-radius: 18px; background: #fff; display: grid; place-items: center; font-size: 28px; }
.herocard .flip.a { right: 70px; top: 40px; transform: rotate(-12deg); color: var(--bad); } .herocard .flip.b { right: 22px; top: 70px; transform: rotate(11deg); color: var(--ok); }
.herocard .flip svg { stroke-width: 3.4; }
.herobtn { width: 100%; padding: 16px; border-radius: 999px; background: #1B1A2E; color: #fff; font-weight: 800; font-size: 17px; }
.herobtn.light { background: #fff; color: #1B1A2E; margin-top: 4px; }
.herobtn:active { transform: scale(.97); }
.herostatus { display: flex; gap: 8px; align-items: center; font-weight: 800; font-size: 15px; }
.statusline.onhero { color: rgba(255,255,255,.9); text-align: left; padding: 0; margin-bottom: 12px; }
.modes2 { padding: 16px; display: grid; gap: 10px; }
.modes2 h2 { margin: 0; font-size: 19px; font-weight: 800; }
.modes2 .sub { font-weight: 800; margin-top: 4px; }
.modes2 .mode { background: var(--t, #EADFC6); color: #1B1A2E; }
.modes2 .mode.sel { background: var(--ink); color: var(--bg); }
.modes2 .picked { margin-top: 2px; }

/* une seule ligne qui défile, avec un fondu à droite, comme dans l'appli */
.modes2 { padding: 16px 0 16px 16px; }
.modes2 h2, .modes2 .sub { padding-right: 16px; }
.chiprow { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 0 28px 2px 0; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow .mode { flex: none; padding: 10px 14px; }

/* texte long : la carte reste dans l'écran, l'image rétrécit et le texte défile, les boutons restent visibles */
#gameCard.screen.full { height: 100dvh; min-height: 0; overflow: hidden; }
.cardwrap { min-height: 0; }
.card { min-height: 0; }
.card .art { height: clamp(120px, 26dvh, 260px) !important; flex: none; }
.card .body { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; }

/* ---------- badges, flair, statistiques, « à retenir » ---------- */
.bi { --b: #FFD95A; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--b); color: #1B1A2E; font-size: 24px; flex: none; }
.bi.sm { width: 36px; height: 36px; font-size: 17px; }
.badge .bi { background: var(--soft); color: var(--muted); }
.badge.on .bi { background: var(--b); color: #1B1A2E; }
.badge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.badge { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 22px; background: var(--card); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.badge b { font-size: 15px; font-weight: 800; line-height: 1.2; }
.badge:not(.on) { opacity: .85; }
.badge .bok { color: var(--ok); font-weight: 800; display: flex; gap: 4px; align-items: center; }
.bprog { display: block; height: 7px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bprog i { display: block; height: 100%; background: var(--hl); border-radius: 99px; }
.linkcard { display: flex; align-items: center; gap: 10px; padding: 16px; width: 100%; text-align: left; font-weight: 800; font-size: 18px; }
.linkcard .grow, .badgecard .grow { flex: 1; }
.badgecard { display: grid; gap: 12px; padding: 16px; width: 100%; text-align: left; }
.badgecard .bh { display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 800; }
.badgecard .bh b, .badgecard .bh span { display: inline-flex; gap: 6px; align-items: center; }
.bicons { display: flex; gap: 8px; flex-wrap: wrap; }
.flaircard { background: #B8C0FF; color: #1B1A2E; border-radius: 24px; padding: 16px; display: grid; gap: 6px; position: relative; overflow: hidden; }
.flaircard::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(0,0,0,.07); right: -30px; top: -40px; }
.flaircard b { font-size: 18px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.flaircard p { margin: 0; font-weight: 600; font-size: 14px; }
.flaircard .fv { font-size: 44px; font-weight: 800; line-height: 1; }
.flaircard .fl { font-weight: 800; font-size: 14px; opacity: .75; }
.newbadges, .recap { width: 100%; padding: 14px; display: grid; gap: 10px; text-align: left; }
.newbadges .nbh { color: var(--warn); display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; }
.nbrow { display: flex; gap: 12px; align-items: center; }
.nbrow > span:last-child { display: grid; }
.recap .rh { font-size: 17px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.rl { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 14px; }
.crowd { padding: 16px; display: grid; gap: 10px; }
.crowd b { display: flex; gap: 8px; align-items: center; font-size: 16px; font-weight: 800; }
.cbar { height: 10px; border-radius: 99px; background: var(--bad); overflow: hidden; }
.cbar i { display: block; height: 100%; background: var(--ok); }
.cleg { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; }
dialog.sheet { width: min(94vw, 520px); max-height: 88dvh; padding: 0; overflow: hidden; }
dialog.sheet[open] { display: flex; flex-direction: column; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 8px; }
.sheet-head h3 { margin: 0; font-size: 26px; }
.sheet-body { padding: 8px 18px 20px; overflow-y: auto; display: grid; gap: 14px; align-content: start; grid-auto-rows: max-content; }
.insight { background: #FFD95A; color: #1B1A2E; border-radius: 22px; padding: 16px; display: grid; gap: 4px; font-weight: 600; }
.insight .ih { display: flex; gap: 6px; align-items: center; font-weight: 800; font-size: 15px; }
.insight b { font-size: 19px; font-weight: 800; line-height: 1.2; }
.ssec { display: grid; gap: 10px; }
.ssec h4 { margin: 0; font-size: 17px; font-weight: 800; }
.sbar { display: grid; gap: 5px; }
.srow { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.srow .grow { flex: 1; }
.chart { width: 100%; height: auto; }
.chart .g { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 8px; font-weight: 700; }
.chart .l { fill: none; stroke: var(--hl); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart circle { fill: var(--hl); }

.datacard .dhead { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font-size: 18px; font-weight: 800; color: inherit; }
.datacard .dhead .grow { flex: 1; }
.datacard .dhead svg.open { transform: rotate(90deg); }

.result + .btn { margin-top: 20px; }
.result { padding-bottom: 4px; }

.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 30; }
.confetti i { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px; animation: cf linear forwards; }
@keyframes cf { to { transform: translateY(110vh) rotate(var(--r)); } }
.redwash { position: fixed; inset: 0; pointer-events: none; z-index: 5; background: linear-gradient(180deg, rgba(208,51,31,.26), rgba(208,51,31,.03)); animation: rw .5s ease-out; }
@keyframes rw { from { opacity: 0; } }

/* ---------- duels ---------- */
.duel { display: grid; gap: 14px; align-content: start; padding-top: 4px; }
.duel h1.title { padding-top: 6px; }
.duelmsg { padding: 18px; line-height: 1.5; }
.duelbanner { text-align: center; font-weight: 800; font-size: 24px; padding: 14px; border-radius: 20px; color: #fff; background: var(--c, var(--hl)); display: flex; gap: 8px; align-items: center; justify-content: center; }
.duelbanner.wait { background: var(--soft); color: var(--muted); font-size: 17px; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.vsmid { font-weight: 800; color: var(--muted); }
.side { display: grid; justify-items: center; gap: 4px; padding: 16px 8px; border-radius: 24px; background: var(--card); box-shadow: 0 4px 12px rgba(0,0,0,.06); text-align: center; word-break: break-word; }
.side.win { background: #FFD95A; color: #1B1A2E; }
.side.win .muted { color: rgba(27,26,46,.7); }
.side .sc { font-size: 40px; font-weight: 800; line-height: 1; }
.qhead { display: grid; grid-template-columns: 1fr 52px 52px; gap: 6px; font-size: 12px; font-weight: 800; color: var(--muted); text-align: center; }
.qhead span:nth-child(2), .qhead span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow { display: grid; grid-template-columns: 1fr 52px 52px; gap: 6px; align-items: center; padding: 12px 14px; }
.qh { font-size: 14px; font-weight: 700; line-height: 1.3; }
.qm { text-align: center; font-size: 22px; }
.duelable { cursor: pointer; }
.duelchip { font-size: 12px; font-weight: 800; padding: 6px 10px; border-radius: 999px; background: var(--hl-soft); color: var(--hl); margin-left: 8px; }

.herorow { display: flex; gap: 10px; }
.herorow .herobtn:first-child { flex: 1; }
.herobtn.duelbtn { flex: none; width: 58px; background: #fff; color: #1B1A2E; display: grid; place-items: center; font-size: 24px; padding: 0; }

.herobtn.small { width: auto; align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; font-size: 14px; margin-top: 8px; }

/* code de duel */
.duelcode { text-align: center; font-weight: 900; font-size: 44px; letter-spacing: .25em; padding: 16px 8px 16px 20px; border-radius: 18px; background: var(--hlsoft, var(--card)); color: var(--hl); border: 2px dashed var(--hl); user-select: all; }
.duelinput { text-align: center; letter-spacing: .3em; text-transform: uppercase; font-size: 26px; }

/* rejouer + partager */
.replayrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.replayrow .herobtn.small { margin-top: 0; }
.herobtn.iconbtn { padding: 8px 12px; }
.herobtn.iconbtn svg { width: 18px; height: 18px; }

/* ================= Version « Wordle » : un quiz par jour, en-tête à icônes, fenêtres ================= */
.site.wd { border-bottom: 1.5px solid var(--line); background: var(--bg); }
.site.wd .site-in { display: grid; grid-template-columns: 1fr auto 1fr; padding: 10px 16px; }
.wd-side { display: flex; gap: 8px; align-items: center; }
.wd-side.right { justify-content: flex-end; }
.herorow .herobtn { flex: 1; margin-top: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.dots.mini { gap: 6px; } .dots.mini i { width: 30px; height: 30px; font-size: 13px; background: rgba(255,255,255,.28); }
.dots.mini i.ok { background: var(--ok); } .dots.mini i.bad { background: var(--bad); }
.statusline.onhero b, .nextrow b { font-variant-numeric: tabular-nums; }
.nextrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; width: 100%; text-align: left; }
.nextrow > div { display: grid; }
.nextrow b { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.nextrow .btn { width: auto; flex: none; }
.result .nextrow { margin-top: 4px; }
.result .btn { max-width: 420px; }
.lead { margin: 0; font-size: 18px; line-height: 1.4; }
.rules2 { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.45; }
.nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.num { display: grid; gap: 2px; } .num b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.num span { font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.dist { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.dcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; }
.dcol > b { font-size: 13px; min-height: 16px; }
.dcol > i { display: block; width: 100%; min-height: 4px; background: var(--hl); border-radius: 8px 8px 4px 4px; opacity: .4; }
.dcol > i.hit { background: var(--ok); opacity: 1; }
.nickbox { padding: 16px; display: grid; gap: 12px; }
.gap { text-align: center; line-height: 1; }
dialog.sheet .row.panel { margin-bottom: 8px; }
.sheet-body > .btn { margin-top: 4px; }
.herorow .herobtn.duelbtn { flex: none; width: 58px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--soft); }
.seg button { padding: 9px 8px; border-radius: 999px; font-weight: 800; font-size: 14px; color: var(--muted); }
.seg button.sel { background: var(--ink); color: var(--bg); }
@media (max-width: 420px) {
  .site.wd .site-in { padding: 10px 10px; }
  .wd-side { gap: 5px; } .site.wd .pill.icon { width: 34px; height: 34px; font-size: 15px; }
  .site.wd .brand { font-size: 22px; }
}
.step2 { display: flex; align-items: center; gap: 10px; }
.step2 .num { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 13px; display: grid; place-items: center; flex: none; }
.wrapchips { flex-wrap: wrap; overflow: visible; padding: 0; -webkit-mask-image: none; mask-image: none; }
.wrapchips .mode { background: var(--t, #EADFC6); color: #1B1A2E; }
.wrapchips .mode.sel { background: var(--ink); color: var(--bg); }
.sheet-body .cal { padding: 12px; box-shadow: none; background: var(--soft); }
.copyright { margin: 6px 0 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); opacity: .75; }
.wrap { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.stack.home { display: flex; flex-direction: column; min-height: calc(100dvh - 76px - 20px - env(safe-area-inset-bottom)); }
.stack.home > .copyright { margin-top: auto; padding-top: 28px; }
.result { padding-top: calc(36px + env(safe-area-inset-top)); }
.welcome.splash { justify-items: center; text-align: center; max-width: 360px; margin: 0 auto; }
.splash .logo-big { width: 96px; height: 96px; border-radius: 24px; }
.splash .big b { color: #F0836A; }
.splash p { margin: 0; }
.splash .slogan { font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--ink); }
.splash .small { font-size: 14px; }
.splash .btn { margin-top: 10px; }
.splash .big { color: var(--ink); }

.catch .herobtn.slimbtn { width: auto; flex: none; padding: 10px 18px; font-size: 15px; }
/* calendrier : vert = il y a des actus, rouge = pas d'actus, blanc = à venir */
.cal-cell.future { background: #fff; border: 2px solid #fff; color: #1B1A2E; opacity: 1; }

/* classement anonyme */
.rankcard { position: relative; overflow: hidden; background: #FFD95A; color: #1B1A2E; border-radius: 26px; padding: 20px; display: grid; gap: 2px; }
.rankcard::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(0,0,0,.07); right: -40px; top: -50px; }
.rankcard > * { position: relative; z-index: 1; }
.rk1 { font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.rk2 { font-size: 17px; font-weight: 800; }
.rk3 { font-size: 14px; font-weight: 600; opacity: .8; margin-top: 4px; }
.hist { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 6px; }
.hcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.hcol i { display: block; width: 100%; background: var(--muted); opacity: .45; border-radius: 6px 6px 3px 3px; }
.hcol i.me { background: #FF6B4A; opacity: 1; }
.hcol span { font-size: 10px; font-weight: 700; color: var(--muted); }
.topscores { display: flex; flex-wrap: wrap; gap: 8px; }

/* « See more » du bloc « à retenir » et sa fenêtre par domaine */
.recap .rhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.recap .rhead .rh { flex: 1; }
.seemore { display: inline-flex; align-items: center; gap: 4px; flex: none; background: var(--hl-soft); color: var(--hl); font-weight: 800; font-size: 13px; padding: 6px 10px 6px 12px; border-radius: 999px; white-space: nowrap; }
.rtheme { display: flex; align-items: center; gap: 10px; }
.rlist { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-weight: 600; font-size: 15px; line-height: 1.4; }
.herorow .herobtn.sidebtn { flex: none; width: 58px; background: #fff; color: #1B1A2E; display: grid; place-items: center; font-size: 22px; padding: 0; }
.herorow .herobtn.sidebtn svg { width: 22px; height: 22px; }
/* Grands écrans : tous les domaines visibles d'un coup (une souris ne défile pas à l'horizontale) */
@media (min-width: 700px) {
  .modes2 .chiprow { flex-wrap: wrap; overflow: visible; padding: 0 16px 0 0; -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 440px) { .herocard p { max-width: 190px; } .herocard .flip.a { right: 64px; } }
.copyright a, .copyright .linkbtn { color: inherit; text-decoration: underline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.mailaddr { margin: 0 0 14px; text-align: center; font-weight: 800; font-size: 17px; word-break: break-all; }
.mailaddr a { color: var(--hl); }
a.line { color: inherit; text-decoration: none; }

/* Troisième réponse : partiellement faux (bouton large sous Fake / True, ou carte glissée vers le haut) */
.btn.warn { background: var(--warn); color: #fff; box-shadow: 0 5px 0 color-mix(in srgb, var(--warn) 70%, #000); grid-column: 1 / -1; }
.btn.warn:active:not(:disabled) { box-shadow: 0 1px 0 color-mix(in srgb, var(--warn) 70%, #000); }
:root[data-theme="dark"] .btn.warn { color: #1c1500; }
.card .ring-warn { position: absolute; inset: 0; border-radius: 28px; border: 5px solid var(--warn); opacity: 0; pointer-events: none; }
.stamp.p { background: var(--warn); transform: rotate(0deg); }


/* ---------- accessibilité ---------- */
:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; }
html.a11y-big { zoom: 1.15; }
html.a11y-calm *, html.a11y-calm *::before, html.a11y-calm *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
/* Contraste renforcé : fond et texte à fort contraste, bordures nettes, plus d'opacité réduite. */
:root.a11y-contrast[data-theme="light"] { --bg: #FFFFFF; --desk: #FFFFFF; --card: #FFFFFF; --soft: #FFFFFF; --line: #17162B; --ink: #000000; --muted: #17162B;
  --hl: #2A12B8; --hl-soft: #E4DEFF; --ok: #0B5E31; --bad: #A4210F; --warn: #6E5000; }
:root.a11y-contrast[data-theme="dark"] { --bg: #000000; --desk: #000000; --card: #000000; --soft: #0E0E0E; --line: #FFFFFF; --ink: #FFFFFF; --muted: #FFFFFF;
  --hl: #B3A6FF; --hl-soft: #1E1A44; --ok: #4ADE80; --bad: #FF7B6B; --warn: #FFD34D; }
html.a11y-contrast body { font-weight: 600; }
html.a11y-contrast .panel, html.a11y-contrast .card, html.a11y-contrast .mode, html.a11y-contrast .round, html.a11y-contrast dialog { border: 2px solid var(--line) !important; box-shadow: none !important; }
html.a11y-contrast .muted, html.a11y-contrast .small, html.a11y-contrast .copyright, html.a11y-contrast .kicker, html.a11y-contrast .herocard p,
html.a11y-contrast .chip, html.a11y-contrast .statusline { color: var(--muted); opacity: 1 !important; }
html.a11y-contrast .herocard { background: #B5300F; color: #fff; }
html.a11y-contrast .herocard p, html.a11y-contrast .herocard .kicker, html.a11y-contrast .statusline.onhero { color: #fff; }
html.a11y-contrast .chip { border: 1.5px solid currentColor; }
html.a11y-contrast .btn, html.a11y-contrast .herobtn { border: 2px solid var(--ink); }
html.a11y-contrast .switch { background: var(--muted); } html.a11y-contrast .switch.on { background: var(--hl); outline: 2px solid var(--ink); }
html.a11y-contrast a { text-decoration: underline; }

/* Choix de la langue (réglages) */
.seg { display: inline-flex; border-radius: 99px; background: var(--soft); border: 1.5px solid var(--line); padding: 3px; gap: 2px; }
.seg button { padding: 6px 12px; border-radius: 99px; font-weight: 800; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--hl); color: #fff; }

/* comment jouer */
.swipes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.swt { display: grid; justify-items: center; align-content: start; gap: 3px; padding: 14px 6px 12px; border-radius: 20px; text-align: center; background: var(--f); border: 1.5px solid color-mix(in srgb, var(--c) 35%, transparent); }
.swt .swi { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; margin-bottom: 4px; }
.swt .swi svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.swt small { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b6b7a); }
.swt b { font-size: 16px; font-weight: 800; color: var(--c); line-height: 1.15; }
.swt > span:last-child { font-size: 12.5px; line-height: 1.3; font-weight: 600; }
.hnote { margin: 0; font-size: 13.5px; line-height: 1.45; }
.hsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hsteps li { display: flex; align-items: center; gap: 12px; font-weight: 700; line-height: 1.3; }
.hsteps .hn { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; background: var(--soft, rgba(0,0,0,.06)); }
.hscore { display: grid; gap: 8px; padding: 14px; border-radius: 20px; background: var(--soft, rgba(0,0,0,.05)); }
.hscore span { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.hscore svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
