/* Couche visuelle moderne, chargée après les styles de rubrique. */

:root {
  --bg: #f4f2f7;
  --line: rgba(30, 26, 40, .09);
  --text: #1c1a24;
  --muted: #6b6878;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(28, 24, 40, .04), 0 14px 34px -16px rgba(28, 24, 40, .22);
  --glass: color-mix(in oklab, var(--card) 72%, transparent);
  --r1: var(--accent);
  --r2: var(--accent-soft);
  --r3: var(--accent);
}
@supports (color: oklch(from red l c h)) {
  :root, html[class] {
    --r1: oklch(from var(--accent) calc(l + .12) calc(c * 1.45 + .04) h);
    --r2: oklch(from var(--accent) calc(l + .26) calc(c * 1.3 + .05) calc(h - 25));
    --r3: oklch(from var(--accent) calc(l - .05) calc(c * 1.15 + .01) h);
  }
}

/* Thème sombre, prêt mais pas encore activé. */
html.theme-dark {
  color-scheme: dark;
  --bg: #0f0e14;
  --bg2: #16151d;
  --card: #1b1a23;
  --soft: #24222e;
  --text: #f1eff7;
  --muted: #a29fb2;
  --line: rgba(241, 239, 247, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .6);
}

html:not(.r-quiz):not(.theme-dark) { --bg: #f4f2f7; --soft: #f0eef5; }
html.r-cost { --accent: #0f766e; --accent-soft: #d3f1ea; }
body::before {
  background:
    radial-gradient(60% 40% at 0% -8%, rgba(255, 176, 92, .22), transparent 70%),
    radial-gradient(60% 42% at 100% -6%, rgba(124, 92, 230, .2), transparent 72%),
    var(--bg);
}
html.r-quiz body::before,
html.theme-dark body::before {
  background:
    radial-gradient(60% 40% at 0% -8%, rgba(255, 140, 60, .12), transparent 70%),
    radial-gradient(60% 42% at 100% -6%, rgba(124, 92, 230, .16), transparent 72%),
    var(--bg);
}

/* Titres */
h1 {
  font-size: clamp(2.1rem, 9vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1.04;
  padding: 0 .14em .08em 0;
  margin-right: -.14em;
  width: fit-content;
  max-width: 100%;
  color: var(--text);
  background: linear-gradient(100deg, var(--text) 0%, var(--text) 30%, var(--r3) 72%, var(--r1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 { letter-spacing: -.025em; }
.kicker,
.home-head .kicker,
.fiche-head .kicker,
.mus-kicker,
.h-sec,
.fiche-card h2 {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.home-head .kicker,
.fiche-head .kicker,
.mus-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 11%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 18%, transparent);
}
.home-head .kicker::before,
.fiche-head .kicker::before,
.mus-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--r1), var(--r3));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--r1) 22%, transparent);
}
.label,
.heading {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.heading { background: transparent; border-bottom-color: var(--line); }
.lead, .muted, .meta { color: var(--muted); }

/* Bouton retour */
.back {
  gap: 4px;
  min-height: 36px;
  margin: 0 0 .9rem;
  padding: 0 14px 0 8px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line), 0 2px 8px -4px rgba(28, 24, 40, .18);
  color: var(--text);
  font-size: .86rem;
  font-weight: 600;
}
.back::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.back.fwd { padding: 0 8px 0 14px; flex-direction: row-reverse; }
.back.fwd::before { transform: scaleX(-1); }

/* Boutons */
.btn {
  min-height: var(--tap);
  padding: 0 20px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-weight: 650;
  letter-spacing: -.01em;
  box-shadow: inset 0 0 0 1px var(--line), 0 2px 8px -4px rgba(28, 24, 40, .16);
}
.btn.primary, .primary, #add-btn {
  background: linear-gradient(135deg, var(--r1), var(--r3));
  color: #fff;
  -webkit-text-fill-color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 12px 24px -12px color-mix(in oklab, var(--r3) 85%, transparent);
}
.btn.danger {
  color: var(--err);
  background: color-mix(in oklab, var(--err) 9%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--err) 22%, transparent);
}
.btn:disabled, .btn[disabled] { opacity: .45; filter: none; transform: none; }

/* Pastilles de filtre et sélecteurs */
.chip {
  min-height: 36px;
  padding: 0 1rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
}
.chip.on, .chip.active {
  background: linear-gradient(135deg, var(--r1), var(--r3));
  color: #fff;
  box-shadow: 0 8px 18px -10px color-mix(in oklab, var(--r3) 90%, transparent);
}
.seg {
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg button {
  width: 34px;
  height: 30px;
  border-radius: 999px;
  transition: background-color .15s ease, color .15s ease;
}
.seg button.on {
  background: linear-gradient(135deg, var(--r1), var(--r3));
  color: #fff;
  box-shadow: 0 4px 10px -4px color-mix(in oklab, var(--r3) 80%, transparent);
}

/* Champs */
input, select, textarea {
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(28, 24, 40, .04);
}
input:focus, select:focus, textarea:focus {
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in oklab, var(--accent) 16%, transparent);
}

/* Cartes et listes */
.card,
.list,
.block {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.item {
  padding: .95rem 1.05rem;
  border-top-color: var(--line);
  transition: background-color .15s ease;
}
@media (hover: hover) {
  .list a.item:hover,
  .list button.item:hover,
  .block a.item:hover { background: color-mix(in oklab, var(--accent) 5%, transparent); }
}
.item .name { font-weight: 600; letter-spacing: -.01em; }
.chev { color: color-mix(in oklab, var(--text) 30%, transparent); }
.kico,
.item .thumb.ico {
  border-radius: 12px;
  background: linear-gradient(145deg, var(--r1), var(--r3));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.badge {
  padding: .15rem .6rem;
  border: 0;
  background: color-mix(in oklab, var(--accent) 12%, var(--card));
  color: var(--accent);
  font-weight: 600;
}

/* Tuiles de couleur : dégradé calculé depuis la teinte de chaque tuile */
.app-btn,
.tile:has(.ico2),
.fest-tile,
.jeux-hub .tile,
.jeux-hub .list .item {
  --c1: color-mix(in oklab, var(--ink) 55%, var(--tint));
  --c2: var(--tint);
  --c3: var(--ink);
}
@supports (color: oklch(from red l c h)) {
  .app-btn,
  .tile:has(.ico2),
  .fest-tile,
  .jeux-hub .tile,
  .jeux-hub .list .item {
    --c1: oklch(from var(--ink) .72 min(calc(c * 1.9 + .08), .17) calc(h + 8));
    --c2: oklch(from var(--tint) .8 min(calc(c * 2.6 + .09), .14) calc(h + 24));
    --c3: oklch(from var(--ink) .52 min(calc(c * 1.6 + .06), .17) calc(h - 6));
  }
}
.app-btn,
.tile:has(.ico2),
.fest-tile,
.jeux-hub .tile,
.jeux-hub .list .item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(95% 85% at 100% 0%, color-mix(in oklab, var(--c2) 75%, transparent), transparent 62%),
    linear-gradient(150deg, var(--c1), var(--c3));
  color: #fff;
  -webkit-text-fill-color: currentColor;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .12),
    0 16px 34px -18px color-mix(in oklab, var(--c3) 90%, transparent);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease, filter .2s ease;
}
.app-btn > *,
.tile:has(.ico2) > *,
.fest-tile > *,
.jeux-hub .tile > *,
.jeux-hub .list .item > * { --ink: #fff; }
.tile:has(.ico2) .name,
.tile:has(.ico2) .sub,
.jeux-hub .tile .name,
.jeux-hub .tile .sub,
.jeux-hub .list .item .name,
.jeux-hub .list .item .sub { color: #fff; }
.tile:has(.ico2) .sub,
.jeux-hub .tile .sub,
.jeux-hub .list .item .sub { opacity: .82; }
.tile:has(.ico2) .sub.warn { color: #ffd7cc; opacity: 1; }
.tile:has(.ico2) .name,
.app-btn .label,
.fest-tile .fest-name,
.jeux-hub .tile .name {
  font-weight: 700;
  letter-spacing: -.03em;
}
.app-btn.t-cost { --tint: #d3f1ea; --ink: #0f766e; }
.tile.k-docs,
.tile.k-utilitaire,
.tile.k-autre,
.tile.k-pieces,
.tile.k-maison { --tint: #d9def0; --ink: #3b4a6b; }
.jeux-hub .g-coloriage { --tint: #f6d2c2; --ink: #9a3412; }
.jeux-hub .g-cherche { --tint: #cfe3f5; --ink: #1d4e89; }
.jeux-hub .g-quizz { --tint: #e2d4f6; --ink: #5b2a9a; }
.jeux-hub .g-spider { --tint: #cdeedd; --ink: #166534; }
.tile.k-prairie { --tint: #d6ecb8; --ink: #3f6212; }
.tile.k-bois { --tint: #efd6c0; --ink: #7c4a26; }
.app-btn .label {
  color: #fff;
  font-size: 1.08rem;
  text-transform: none;
  line-height: 1.15;
}
.app-ico,
.tile .ico2 {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
  color: #fff;
}
.app-ico svg { width: 22px; height: 22px; }
.jeux-hub .tile .cover,
.jeux-hub .list .item .thumb {
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 70% at 30% 20%, rgba(255, 255, 255, .28), transparent 70%),
    rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  color: #fff;
}
.jeux-hub .tile .cover { aspect-ratio: 4 / 3; }
.jeux-hub .tile .cover svg.g-ico { width: 46%; height: auto; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .18)); }
.jeux-hub .list .item .thumb svg.g-ico { width: 60%; height: auto; }
.ico2 svg { width: 24px; height: 24px; }
.kico svg { width: 20px; height: 20px; }
.kico { display: inline-grid; place-items: center; }

/* Bandeaux (En ce moment, Échéances, totaux) */
.now,
.result {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(90% 80% at 100% 0%, color-mix(in oklab, var(--r2) 80%, transparent), transparent 62%),
    linear-gradient(150deg, var(--r1), var(--r3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 18px 36px -18px color-mix(in oklab, var(--r3) 90%, transparent);
}
.now::after,
.result::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  pointer-events: none;
}
.now-kicker,
.result .hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.now-kicker::before,
.result .hint::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}
.now-when {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -.02em;
  color: #fff;
}
.now-lines { display: grid; gap: 6px; }
.now-lines li { margin: 0; }
.now-lines > li:not(:has(button)),
.now-lines button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  line-height: 1.35;
}
.now-lines button:active { background: rgba(255, 255, 255, .24); }
.now-lines .now-ico {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
}
.now-lines .now-ico svg { width: 18px; height: 18px; }
.now-lines .warn { color: #fff; font-weight: 700; }
.now-lines li:has(.warn) button,
.now-lines li:has(.warn):not(:has(button)) {
  background: rgba(255, 255, 255, .26);
  box-shadow: inset 3px 0 0 #ffd2c4;
}
.result .big { color: #fff; font-size: 2rem; letter-spacing: -.03em; }
.result .kpis {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}
.result .kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px 10px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.result .kpi .hint { margin: 0; flex-shrink: 0; white-space: nowrap; }
.result .kpi .big {
  margin: 0;
  font-size: clamp(1.6rem, 8vw, 2.1rem);
  white-space: nowrap;
}
@media (min-width: 560px) {
  .result .kpis { grid-template-columns: 1fr 1fr; }
  .result .kpi { flex-direction: column; align-items: flex-start; gap: 8px; }
}
.result .split {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: rgba(255, 255, 255, .82);
}
.result .split strong { color: #fff; }

.toolbar button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  color: var(--text);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(28, 24, 40, .05);
  cursor: pointer;
}
.toolbar button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--r1), var(--r3));
  box-shadow: 0 10px 22px -12px color-mix(in oklab, var(--r3) 90%, transparent);
}
.toolbar button.danger {
  color: var(--err);
  background: color-mix(in oklab, var(--err) 10%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--err) 22%, transparent);
}

.notice {
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in oklab, var(--accent) 10%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 18%, transparent);
  color: var(--text);
}
.notice.err {
  background: color-mix(in oklab, var(--err) 10%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--err) 25%, transparent);
  color: var(--err);
}
.fest-tile.is-next {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .85),
    0 16px 34px -14px color-mix(in oklab, var(--c3) 95%, transparent);
}
@media (hover: hover) {
  .app-btn:hover,
  .tile:has(.ico2):hover,
  .fest-tile:hover,
  .jeux-hub .tile:hover,
  .jeux-hub .list .item:hover {
    filter: none;
    transform: translateY(-2px);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, .16),
      0 22px 40px -18px color-mix(in oklab, var(--c3) 95%, transparent);
  }
}
.app-btn:active,
.tile:has(.ico2):active,
.fest-tile:active,
.jeux-hub .tile:active,
.jeux-hub .list .item:active { transform: scale(.98); }
.app-btn.dragging { transform: scale(1.04); }

/* Accueil */
.home-head { padding: 22px 4px 26px; }
.home-head h1 {
  font-size: clamp(2.8rem, 13vw, 3.6rem);
  background: linear-gradient(100deg, #f97316 0%, #ec4899 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
body.home .home-head .kicker { color: #c2410c; background: #fff1e8; box-shadow: inset 0 0 0 1px #fed7c2; }
body.home .home-head .kicker::before { background: linear-gradient(135deg, #f97316, #ec4899); box-shadow: 0 0 0 3px rgba(249, 115, 22, .18); }
.home-hello { font-weight: 500; }
.app-grid { gap: 14px; }
.app-btn {
  min-height: 156px;
  padding: 16px 16px 18px;
  font-size: 1.12rem;
}
.app-btn::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E") center / 15px no-repeat,
    rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  pointer-events: none;
}
.app-btn.wide::after { top: 50%; transform: translateY(-50%); }

@media (max-width: 700px), (max-height: 500px) {
  body.home .page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  body.home .home-head { flex-shrink: 0; padding: 4px 4px 12px; }
  body.home .home-head .kicker { margin-bottom: 6px; }
  body.home .home-head h1 { font-size: clamp(2.2rem, 10.5vw, 3rem); }
  body.home .app-grid {
    flex: 1 0 auto;
    grid-auto-rows: minmax(88px, 1fr);
    gap: 12px;
  }
  body.home .app-btn { min-height: 0; padding: 14px 14px 14px; }
  body.home .app-ico { width: 40px; height: 40px; border-radius: 13px; }
  body.home .app-ico svg { width: 21px; height: 21px; }
  body.home .app-btn::after { top: 12px; right: 12px; width: 26px; height: 26px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  body.home .page { max-width: 900px; }
  body.home .home-head { padding: 0 4px 8px; }
  body.home .home-head { display: flex; align-items: center; gap: 12px; flex-direction: row-reverse; justify-content: flex-end; }
  body.home .home-head .kicker { margin: 0; }
  body.home .home-head h1 { font-size: 1.9rem; }
  body.home .app-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(76px, 1fr); gap: 10px; }
}

/* Tuiles claires avec image (recettes, jeux, jardin) */
.tile:not(:has(.ico2)) {
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}

/* Fêtes */
.next {
  background:
    radial-gradient(90% 80% at 100% 0%, color-mix(in oklab, var(--r2) 80%, transparent), transparent 62%),
    linear-gradient(150deg, var(--r1), var(--r3)) !important;
  box-shadow: 0 18px 36px -18px color-mix(in oklab, var(--r3) 90%, transparent) !important;
}
.next .kicker { color: rgba(255, 255, 255, .78); }
.moon-card {
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(122, 108, 230, .45), transparent 60%),
    linear-gradient(150deg, #2c2c6e, #11142e);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 36px -18px rgba(17, 20, 46, .9);
}
.moon-card .moon-info .kicker { color: rgba(255, 255, 255, .7); opacity: 1; }
.moon-card .chev { color: rgba(255, 255, 255, .6); }

/* Liste de courses */
html.r-shop .meta { margin-top: .2rem; }
html.r-shop #count { font-weight: 600; color: var(--text); }
html.r-shop .actions .btn {
  min-height: 34px;
  padding: 0 .85rem;
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: .82rem;
}
html.r-shop .actions .btn:disabled { opacity: .45; background: var(--glass); }
html.r-shop body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
html.r-shop .site-foot { margin-top: 0; }
html.r-shop .page { width: 100%; margin-bottom: 14px; }
html.r-shop .progress {
  height: 6px;
  margin: .7rem 0 0;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 12%, var(--card));
  overflow: hidden;
}
html.r-shop .progress span {
  display: block;
  width: var(--p, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--r1), var(--r3));
  transition: width .35s cubic-bezier(.2, .8, .2, 1);
}
html.r-shop .section { margin: 1.1rem 0 1.2rem; }
html.r-shop .section.cat-fruits { --sec-ink: #e0662a; }
html.r-shop .section.cat-legumes { --sec-ink: #2f9e44; }
html.r-shop .section.cat-viandes { --sec-ink: #d9403a; }
html.r-shop .section.cat-poissons { --sec-ink: #1c7ed6; }
html.r-shop .section.cat-cremerie { --sec-ink: #d99a06; }
html.r-shop .section.cat-pain { --sec-ink: #a0612a; }
html.r-shop .section.cat-epicerie { --sec-ink: #7a9a10; }
html.r-shop .section.cat-boissons { --sec-ink: #7048e8; }
html.r-shop .section.cat-surgeles { --sec-ink: #0c9fb8; }
html.r-shop .section.cat-hygiene { --sec-ink: #d6336c; }
html.r-shop .section.cat-autres { --sec-ink: #6c6f7d; }
html.r-shop .section h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 .55rem .1rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--text);
}
html.r-shop .section h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: var(--sec-ink, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--sec-ink, var(--accent)) 18%, transparent);
}
html.r-shop .section h2 .n {
  min-width: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--sec-ink, var(--accent)) 12%, var(--card));
  color: var(--sec-ink, var(--accent));
  font-size: .7rem;
  letter-spacing: 0;
  text-align: center;
}
html.r-shop .section ul {
  background: var(--card);
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
html.r-shop .section .item {
  padding: 0;
  gap: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}
html.r-shop .section .item:first-child { border-top: 0; }
html.r-shop .toggle { gap: .8rem; padding: .75rem .4rem .75rem 1rem; }
html.r-shop .name { font-size: 1.02rem; font-weight: 560; letter-spacing: -.01em; }
html.r-shop .check {
  width: 24px;
  height: 24px;
  border: 2px solid color-mix(in oklab, var(--sec-ink, var(--accent)) 35%, var(--line));
  background: var(--card);
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
html.r-shop .toggle:active .check { transform: scale(.9); }
html.r-shop .item.done .check {
  border-color: transparent;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat,
    linear-gradient(135deg, color-mix(in oklab, var(--sec-ink, var(--accent)) 70%, #fff), var(--sec-ink, var(--accent)));
}
html.r-shop .item.done .check::after { content: none; }
html.r-shop .item.done .name { color: var(--muted); -webkit-text-fill-color: var(--muted); text-decoration: line-through 1.5px; text-decoration-color: var(--muted); }
html.r-shop .item.done .qty { opacity: .5; }
html.r-shop .qty {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--sec-ink, var(--accent)) 12%, var(--card));
  color: var(--sec-ink, var(--accent));
  -webkit-text-fill-color: var(--sec-ink, var(--accent));
  font-size: .8rem;
  font-weight: 700;
}
html.r-shop .del {
  display: grid;
  place-items: center;
  width: 44px;
  color: color-mix(in oklab, var(--muted) 70%, transparent);
}
html.r-shop .del svg {
  width: 30px;
  height: 30px;
  padding: 8px;
  border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}
html.r-shop .del:active svg,
html.r-shop .del:hover svg { background: color-mix(in oklab, var(--err) 12%, transparent); color: var(--err); }
html.r-shop .empty {
  margin-top: 1rem;
  padding: 2.2rem 1.2rem;
  border-radius: 22px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
}
html.r-shop .composer {
  position: sticky;
  z-index: 20;
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 640px;
  margin: auto auto 0;
  box-sizing: border-box;
  padding: 10px;
  border: 0;
  border-radius: 26px;
  background: color-mix(in oklab, var(--card) 78%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -16px rgba(28, 24, 40, .35);
}
html.r-shop #item-input,
html.r-shop #qty-input {
  border-radius: 16px;
  background: var(--soft);
  box-shadow: none;
}
html.r-shop #item-input:focus,
html.r-shop #qty-input:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--ring, color-mix(in oklab, var(--accent) 18%, transparent)); }
html.r-shop #add-btn {
  border-radius: 16px;
  font-size: 1.5rem;
  font-weight: 600;
}
html.r-shop .chips { margin-top: .5rem; padding: 0 2px 2px; }
html.r-shop .chip {
  min-height: 32px;
  border: 0;
  background: var(--soft);
  box-shadow: none;
  font-weight: 600;
}
html.r-shop .chip.active {
  background: linear-gradient(135deg, var(--r1), var(--r3));
  color: #fff;
  -webkit-text-fill-color: #fff;
}

/* Fiches des fêtes */
.fiche-lead { font-size: 1.08rem; line-height: 1.55; }
.fiche-card {
  position: relative;
  margin-bottom: 14px;
  padding: 16px 16px 10px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.fiche-card h2 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 11%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.fiche-card h2::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--r1), var(--r3));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--r1) 22%, transparent);
}
.fiche-card li {
  padding: .6rem 0 .6rem 1.55rem;
  line-height: 1.5;
  border-top-color: var(--line);
}
.fiche-card li:first-child { padding-top: .2rem; }
.fiche-card li::before {
  top: calc(.6rem + .22em);
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat,
    linear-gradient(135deg, var(--r1), var(--r3));
}
.fiche-card li:first-child::before { top: calc(.2rem + .22em); }

.fiche-spirit,
.fiche-spirit.spring,
.fiche-spirit.winter,
.fiche-spirit.summer,
.fiche-spirit.autumn,
.fiche-spirit.moon {
  overflow: hidden;
  padding: 18px 18px 16px;
  color: #fff;
  background:
    radial-gradient(90% 80% at 100% 0%, color-mix(in oklab, var(--r2) 80%, transparent), transparent 62%),
    linear-gradient(150deg, var(--r1), var(--r3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 18px 36px -18px color-mix(in oklab, var(--r3) 90%, transparent);
}
.fiche-spirit::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  pointer-events: none;
}
.fiche-spirit h2,
.fiche-spirit.spring h2,
.fiche-spirit.winter h2,
.fiche-spirit.summer h2,
.fiche-spirit.autumn h2,
.fiche-spirit.moon h2 {
  background: rgba(255, 255, 255, .18);
  box-shadow: none;
  color: #fff;
}
.fiche-spirit h2::before { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.fiche-spirit .fiche-words {
  position: relative;
  font-size: 1.22rem;
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.fiche-spirit p { position: relative; color: rgba(255, 255, 255, .9); }
.fiche-spirit .fiche-words { color: #fff; }

/* Quizz (thème sombre) */
html.r-quiz .btn:not(.primary):not(.danger),
html.r-quiz .btn.mute {
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
html.r-quiz .btn.primary {
  background: linear-gradient(135deg, #5aa9ff, #2f6fe0);
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(47, 111, 224, .85);
}
html.r-quiz .btn.danger {
  background: linear-gradient(135deg, #ff7a66, #d9403a);
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(217, 64, 58, .85);
}
html.r-quiz .btn.mute[aria-pressed="true"] {
  background: linear-gradient(135deg, #5aa9ff, #2f6fe0);
  color: #fff;
  box-shadow: none;
}
html.r-quiz .quiz-live .btn.mute {
  background: #eef1f6;
  color: #1d2533;
  -webkit-text-fill-color: #1d2533;
  box-shadow: inset 0 0 0 1px rgba(20, 30, 50, .14);
}
html.r-quiz .quiz-live .btn.mute:hover { background: #e2e7ef; }
html.r-quiz .chip {
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13);
}
html.r-quiz .chip.on,
html.r-quiz .chip.active {
  background: linear-gradient(135deg, #5aa9ff, #2f6fe0);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(47, 111, 224, .9);
}
html.r-quiz .seg {
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13);
}
html.r-quiz .seg button.on { background: linear-gradient(135deg, #5aa9ff, #2f6fe0); color: #fff; }
html.r-quiz input,
html.r-quiz select,
html.r-quiz textarea {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
html.r-quiz input::placeholder,
html.r-quiz textarea::placeholder { color: rgba(243, 239, 230, .45); }
html.r-quiz input:focus,
html.r-quiz select:focus,
html.r-quiz textarea:focus {
  box-shadow: inset 0 0 0 1.5px #5aa9ff, 0 0 0 4px rgba(90, 169, 255, .2);
}
html.r-quiz .quiz-list .pick-del {
  border-radius: 12px;
  background: rgba(255, 107, 87, .16);
  color: #ffb3a7;
  box-shadow: inset 0 0 0 1px rgba(255, 107, 87, .35);
}
html.r-quiz .quiz-list .pick-del[data-done] {
  background: rgba(61, 207, 122, .16);
  color: #9ff0c0;
  box-shadow: inset 0 0 0 1px rgba(61, 207, 122, .35);
}
html.r-quiz .quiz-list.list .item {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
html.r-quiz .quiz-list.list .item .name { color: var(--text); }
html.r-quiz .quiz-list.list .item .sub { color: var(--muted); }
html.r-quiz .buzz-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 6px 0 22px;
  text-align: center;
}
html.r-quiz .buzzer {
  display: grid;
  place-items: center;
  width: min(72vw, 300px);
  aspect-ratio: 1;
  margin: 8px 0 6px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ff9a8a 0%, #ef3b30 42%, #b0141a 100%);
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-family: inherit;
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .14em;
  text-shadow: 0 2px 6px rgba(80, 0, 0, .45);
  box-shadow:
    0 10px 0 #7a0f14,
    0 26px 44px -12px rgba(239, 59, 48, .7),
    inset 0 -10px 22px rgba(60, 0, 0, .35),
    inset 0 8px 16px rgba(255, 255, 255, .35);
  transition: transform .08s ease, box-shadow .08s ease, filter .25s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  opacity: 1;
}
html.r-quiz .buzzer:disabled { opacity: 1; cursor: default; }
html.r-quiz .buzzer.is-ready:active {
  transform: translateY(7px);
  box-shadow:
    0 3px 0 #7a0f14,
    0 12px 26px -12px rgba(239, 59, 48, .7),
    inset 0 -6px 16px rgba(60, 0, 0, .35),
    inset 0 8px 16px rgba(255, 255, 255, .3);
}
html.r-quiz .buzzer.is-off {
  filter: grayscale(.8) brightness(.5);
  box-shadow: 0 6px 0 #3a1416, inset 0 -8px 18px rgba(0, 0, 0, .35);
  transform: translateY(4px);
}
html.r-quiz .buzzer.is-mine { animation: buzz-blink .45s ease-in-out infinite alternate; }
@keyframes buzz-blink {
  from {
    filter: brightness(1.3) saturate(1.2);
    box-shadow: 0 10px 0 #7a0f14, 0 0 0 12px rgba(255, 96, 84, .4), 0 0 70px 10px rgba(255, 80, 70, .85), inset 0 8px 16px rgba(255, 255, 255, .45);
  }
  to {
    filter: brightness(.75);
    box-shadow: 0 10px 0 #7a0f14, 0 0 0 0 rgba(255, 96, 84, 0), 0 0 0 0 rgba(255, 80, 70, 0), inset 0 -10px 22px rgba(60, 0, 0, .35);
  }
}
html.r-quiz .buzz-player .quiz-board-n {
  margin: 0;
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
html.r-quiz .buzz-state { margin: 0; font-size: 1.12rem; font-weight: 650; }
html.r-quiz .buzz-player[hidden],
html.r-quiz .buzz-host[hidden],
html.r-quiz .buzz-judge[hidden] { display: none; }
html.r-quiz .buzz-host { text-align: center; }
html.r-quiz .buzz-host .quiz-board-meta { margin: 0 0 12px; color: #5c615a; }
html.r-quiz .buzz-host #bzText {
  margin: 0 0 14px;
  color: #141614;
  -webkit-text-fill-color: #141614;
}
html.r-quiz .buzz-answer {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #dceee1;
  color: #1e5c32;
  -webkit-text-fill-color: #1e5c32;
  font-weight: 750;
}
html.r-quiz .buzz-answer:empty { display: none; }
html.r-quiz .buzz-who {
  margin: 16px 0 4px;
  font-size: 1.05rem;
  font-weight: 650;
  color: #5c615a;
  -webkit-text-fill-color: #5c615a;
}
html.r-quiz .buzz-who.on {
  font-size: 1.55rem;
  font-weight: 800;
  color: #d9403a;
  -webkit-text-fill-color: #d9403a;
  animation: buzz-who .6s ease-in-out infinite alternate;
}
html.r-quiz .buzz-host #bzBlocked { margin: 0; color: #5c615a; }
html.r-quiz .buzz-host #bzBlocked:empty { display: none; }
@keyframes buzz-who { from { opacity: 1; } to { opacity: .55; } }
html.r-quiz .buzz-judge {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
html.r-quiz .buzz-judge .btn.buzz-ok,
html.r-quiz .buzz-judge .btn.buzz-ko { min-height: 58px; padding: 0 10px; font-size: .98rem; font-weight: 750; color: #fff; -webkit-text-fill-color: #fff; }
html.r-quiz #buzzBox > .quiz-kicker { margin-top: 18px; }
#bzReportBox { margin: 14px 0; }
#bzReportBox textarea { width: 100%; min-height: 80px; resize: vertical; }
#bzReportBox .btn { width: 100%; margin-top: 8px; }
html.quiz-tv #btnBzReport,
html.quiz-tv #bzReportBox { display: none !important; }
html.r-quiz .buzz-judge .btn.buzz-ok { background: linear-gradient(135deg, #3dcf7a, #1f9d55); box-shadow: 0 12px 26px -12px rgba(31, 157, 85, .85); }
html.r-quiz .buzz-judge .btn.buzz-ko { background: linear-gradient(135deg, #ff7a66, #d9403a); box-shadow: 0 12px 26px -12px rgba(217, 64, 58, .85); }
html.r-quiz .buzz-judge .btn:disabled { opacity: .55; }
html.quiz-tv #bzAnswer { display: none; }
html.quiz-tv .buzz-host .quiz-q { font-size: clamp(1.6rem, 4.6vw, 3.2rem); line-height: 1.2; }
html.quiz-tv .buzz-who.on { font-size: clamp(2rem, 6vw, 4rem); }
html.r-quiz #busyList li { padding: 0; }
html.r-quiz .busy-seat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  -webkit-text-fill-color: currentColor;
  font: inherit;
  cursor: pointer;
}
html.r-quiz .busy-seat::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
html.r-quiz .busy-seat:active { transform: scale(.97); }

html.r-quiz .quiz-ans button,
html.r-quiz .quiz-ans .quiz-choice {
  --c: #2f74d6;
  position: relative;
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: #2f74d6;
  background: var(--c, #2f74d6);
  box-shadow: 0 8px 18px rgba(20, 30, 50, .28), inset 0 0 0 1px rgba(255, 255, 255, .16);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .15s ease, opacity .2s ease, box-shadow .2s ease;
}
html.r-quiz .quiz-ans button:nth-child(1),
html.r-quiz .quiz-ans .quiz-choice:nth-child(1) { --c: #2f74d6; background: #2f74d6; }
html.r-quiz .quiz-ans button:nth-child(2),
html.r-quiz .quiz-ans .quiz-choice:nth-child(2) { --c: #d99a12; background: #d99a12; }
html.r-quiz .quiz-ans button:nth-child(3),
html.r-quiz .quiz-ans .quiz-choice:nth-child(3) { --c: #1a9a6c; background: #1a9a6c; }
html.r-quiz .quiz-ans button:nth-child(4),
html.r-quiz .quiz-ans .quiz-choice:nth-child(4) { --c: #e0563a; background: #e0563a; }
html.r-quiz .quiz-ans:has(.ok, .bad) button:not(.ok):not(.bad) {
  background: #eceef3;
  color: #6b7080;
  -webkit-text-fill-color: #6b7080;
  text-shadow: none;
  box-shadow: none;
}
html.r-quiz .quiz-ans button:not(:disabled):active { transform: scale(.97); }
html.r-quiz .quiz-ans button.picked {
  background: var(--c, #2f74d6);
  color: #fff;
  -webkit-text-fill-color: #fff;
}
html.r-quiz .quiz-board .quiz-ans button.picked {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c, #2f74d6), 0 12px 26px rgba(20, 30, 50, .35);
}
html.r-quiz .quiz-ans button.ok,
html.r-quiz .quiz-ans .btn.ok {
  --c: #1f9d57;
  background: #1f9d57;
  color: #fff;
  -webkit-text-fill-color: #fff;
}
html.r-quiz .quiz-ans button.bad,
html.r-quiz .quiz-ans .btn.bad {
  --c: #d9523f;
  background: #d9523f;
  color: #fff;
  -webkit-text-fill-color: #fff;
}
html.r-quiz .quiz-ans button.host-ok { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #1f9d57; }

/* Feuilles (panneaux plein écran) */
.sheet-bar {
  background: color-mix(in oklab, var(--card) 80%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* Pied de page */
.site-foot a, .home-foot a { font-weight: 500; }
