/* Thème : neutres, un seul rouge d'accent, rayon 0.25rem, titres légers,
   sur-titres rouges en capitales espacées. Sombre par défaut. */
:root {
  --background: 0 0% 100%; --foreground: 0 0% 15%;
  --card: 0 0% 100%; --muted: 0 0% 96%; --muted-foreground: 0 0% 42%;
  --border: 0 0% 89%; --red: 8 75% 50%; --green: 142 60% 36%;
  --radius: 0.25rem;
}
.dark {
  --background: 0 0% 8%; --foreground: 0 0% 92%;
  --card: 0 0% 12%; --muted: 0 0% 18%; --muted-foreground: 0 0% 60%;
  --border: 0 0% 20%; --red: 8 75% 55%; --green: 142 55% 50%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: hsl(var(--background)); color: hsl(var(--foreground));
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid hsl(var(--red)); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── En-tête ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 30; min-height: 3.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 1rem; border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.92); backdrop-filter: blur(8px);
}
.wordmark { display: block; flex-shrink: 0; }
.wordmark img { height: 2.1rem; width: auto; }
.logo-on-light, .dark .logo-on-dark { display: block; }
.logo-on-dark, .dark .logo-on-light { display: none; }
.site-nav { display: none; gap: 0.25rem; }
.site-nav a {
  padding: 0.4rem 0.7rem; border-radius: var(--radius); font-size: 0.8rem; text-decoration: none;
  color: hsl(var(--muted-foreground)); transition: color .15s, background .15s;
}
.site-nav a:hover { color: hsl(var(--foreground)); background: hsl(var(--muted)); }
/* À droite : l'espace sponsor (contour), « Devenir partenaire » (plein), puis le thème tout au bout. */
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.account-link svg { flex-shrink: 0; }
.partner-link .arrow { transition: transform .2s; }
.partner-link:hover .arrow { transform: translateX(3px); }
#theme-toggle { margin-left: 0.15rem; }
.icon-sun, .dark .icon-moon { display: none; }
.dark .icon-sun, .icon-moon { display: block; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem;
  border: 0; border-radius: var(--radius); background: none; color: hsl(var(--muted-foreground));
}
.icon-btn:hover { color: hsl(var(--foreground)); background: hsl(var(--muted)); }
@media (min-width: 960px) { .site-nav { display: flex; } .site-header { padding: 0 1.5rem; } }
/* Petit écran : l'espace sponsor se réduit à son icône, « Devenir partenaire » reste lisible. */
@media (max-width: 640px) {
  .header-actions { gap: 0.35rem; }
  .header-actions .account-link { width: 2.25rem; height: 2.25rem; padding: 0; }
  .account-link span { display: none; }
  .header-actions .partner-link { padding: 0.4rem 0.75rem; }
  .partner-link .arrow { display: none; }
  #theme-toggle { margin-left: 0; width: 2.25rem; height: 2.25rem; }
}
@media (max-width: 380px) { .site-header { gap: 0.5rem; padding: 0 0.75rem; } .wordmark img { height: 1.8rem; } }

/* ── Boutons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.15rem; border-radius: 999px; border: 1px solid hsl(var(--foreground));
  background: hsl(var(--foreground)); color: hsl(var(--background));
  font-size: 0.88rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: transform .2s, opacity .2s;
}
.btn:hover { transform: scale(1.03); }
.btn[disabled] { opacity: .55; transform: none; cursor: progress; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.78rem; }
.btn-ghost { background: none; color: hsl(var(--foreground)); border-color: hsl(var(--border)); }
.btn-ghost:hover { border-color: hsl(var(--foreground) / 0.5); transform: none; }
.btn-danger { background: none; color: hsl(var(--red)); border-color: hsl(var(--red) / .6); }
.text-link { font-size: 0.85rem; color: hsl(var(--muted-foreground)); text-decoration: none; transition: color .15s; border: 0; background: none; padding: 0; }
.text-link:hover { color: hsl(var(--foreground)); }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.25rem; padding: 0.3rem 0.85rem;
  border: 1px solid hsl(var(--border)); border-radius: 999px; background: none;
  font-size: 0.78rem; color: hsl(var(--muted-foreground)); transition: all .15s;
}
.chip:hover { color: hsl(var(--foreground)); border-color: hsl(var(--foreground) / .4); }
.chip.is-on { color: hsl(var(--background)); background: hsl(var(--foreground)); border-color: hsl(var(--foreground)); }
.chip[disabled] { opacity: .4; cursor: default; text-decoration: line-through; }

.cta { position: relative; display: inline-flex; text-decoration: none; }
.cta-glow { position: absolute; inset: -0.75rem; border-radius: 999px; background: hsl(var(--red)); opacity: .35; filter: blur(28px); transition: opacity .5s; }
.cta:hover .cta-glow { opacity: .6; }
.cta-body {
  position: relative; display: inline-flex; align-items: center; gap: 0.9rem;
  padding: 0.7rem 0.7rem 0.7rem 1.4rem; border-radius: 999px;
  background: hsl(var(--foreground)); color: hsl(var(--background));
  font-size: 1.05rem; font-weight: 500; box-shadow: 0 20px 40px rgb(0 0 0 / .35); transition: transform .3s;
}
.cta:hover .cta-body { transform: scale(1.04); }
.cta-arrow {
  display: inline-flex; align-items: center; justify-content: center; width: 2.3rem; height: 2.3rem;
  border-radius: 999px; background: hsl(var(--red)); color: #fff;
}

/* ── Typo commune ────────────────────────────────────────── */
.kicker { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: hsl(var(--red)); }
.label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: hsl(var(--red)); }
.muted { color: hsl(var(--muted-foreground)); }
.small { font-size: 0.8rem; }
.center { text-align: center; }
h1, h2 { font-weight: 300; line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); margin-top: 0.75rem; }
h2 { font-size: clamp(2.1rem, 5vw, 3.75rem); margin-top: 0.75rem; }
h3 { font-size: 1rem; font-weight: 500; }
.body, .lead { max-width: 36rem; margin-top: 1.25rem; color: hsl(var(--muted-foreground)); }
.body a { color: hsl(var(--foreground)); }
.body b, .lead strong { color: hsl(var(--foreground)); font-weight: 500; }

/* ── Accueil : la photo en pleine largeur, le titre posé dessus ── */
main { overflow-x: clip; }
.hero { position: relative; }
.hero-media img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 28% 40%; }
.hero-inner { max-width: 80rem; margin: 0 auto; padding: 1.75rem 1rem 2.5rem; }
/* Le titre du site : « KUB! » en grand, « aka. Lylian KUBIAK » dessous, plus discret. */
.hero h1 { font-size: clamp(3.4rem, 9vw, 6.5rem); line-height: 1; }
/* « KUB! » est un tracé vectoriel en Futura PT Extra Bold Oblique : il prend la couleur du texte. */
.kub-word { display: block; }
.kub-word svg { display: block; height: 0.8em; width: auto; fill: currentColor; }
.hero h1 .aka { display: block; margin-top: 0.7rem; font-size: 0.3em; font-weight: 300; letter-spacing: 0; line-height: 1.2; opacity: 0.85; }
.hero-cta { margin-top: 1.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.motto { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
@media (min-width: 900px) {
  .hero { height: clamp(31rem, calc(100dvh - 10.5rem), 50rem); overflow: hidden; color: #f2f2f2; background: #0a0a0a; }
  .hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
  .hero-media::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgb(8 8 8 / .97) 0%, rgb(8 8 8 / .82) 30%, rgb(8 8 8 / .28) 58%, transparent 78%),
                linear-gradient(to right, rgb(8 8 8 / .5), transparent 55%);
  }
  .hero-inner { position: absolute; inset: auto 0 0 0; padding: 0 3rem 2.75rem; }
  .hero .lead { color: #cfcfcf; } .hero .lead strong { color: #fff; }
  .hero .motto { color: #a8a8a8; }
  .hero .kicker { color: hsl(8 80% 60%); }
  .hero .cta-body { background: #f2f2f2; color: #141414; }
}
.stats {
  max-width: 80rem; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid hsl(var(--border));
}
.stats div { padding: 1.1rem 1rem; border-right: 1px solid hsl(var(--border)); }
.stats div:nth-child(2n) { border-right: 0; }
.stats div:nth-child(-n+2) { border-bottom: 1px solid hsl(var(--border)); }
.stats dt, .mini-stats dt { font-size: 1.6rem; font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; }
.stats dd, .mini-stats dd { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats div { padding: 1.4rem 3rem; border-bottom: 0 !important; border-right: 1px solid hsl(var(--border)) !important; }
  .stats div:last-child { border-right: 0 !important; }
}

/* ── Chapitres ───────────────────────────────────────────── */
.chapter { max-width: 80rem; margin: 0 auto; padding: 4rem 1rem; border-top: 1px solid hsl(var(--border)); }
.stats + .chapter { border-top: 0; }
.chapter-head { margin-bottom: 2.25rem; }
@media (min-width: 900px) { .chapter { padding: 6rem 3rem; } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

.card, .panel-box { padding: 1.4rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--card)); }
.card p { margin-top: 0.75rem; font-size: 0.95rem; }
.grid-2, .grid-4 { display: grid; gap: 0.75rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.verbs { font-size: 1.6rem !important; font-weight: 300; line-height: 1.25; letter-spacing: -0.01em; margin-top: 1.25rem !important; }
.checks { margin-top: 0.9rem; display: grid; gap: 0.55rem; font-size: 0.92rem; }
.checks li { position: relative; padding-left: 1.3rem; }
.checks li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 0.6rem; height: 2px; background: hsl(var(--red)); }
.mini-stats { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid hsl(var(--border)); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mini-stats dt { font-size: 1.25rem; }
.num { font-family: ui-monospace, Consolas, monospace; font-size: 0.75rem; color: hsl(var(--red)); }
.grid-4 h3 { margin-top: 0.4rem; font-size: 1.15rem; }
.grid-4 p { color: hsl(var(--muted-foreground)); }
.fineprint { margin-top: 1.25rem; font-size: 0.75rem; color: hsl(var(--muted-foreground)); max-width: 62rem; }
.fineprint a { color: hsl(var(--foreground)); }

/* ── Jauge de financement ────────────────────────────────── */
.gauge { margin-bottom: 1rem; padding: 1.25rem 1.4rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--card)); }
.gauge-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; }
.gauge-head b { font-size: 2rem; font-weight: 300; letter-spacing: -0.03em; }
.gauge-head span { color: hsl(var(--muted-foreground)); font-size: 0.9rem; }
.gauge-head .muted { font-size: 0.85rem; }
.gauge-bar { margin-top: 0.8rem; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.gauge-bar i { height: 12px; border-radius: 2px; background: hsl(var(--muted)); }
.gauge-bar i.taken { background: hsl(var(--red)); }
.gauge-bar i.review { background: repeating-linear-gradient(135deg, hsl(var(--red) / .75) 0 3px, hsl(var(--red) / .25) 3px 6px); }
.gauge-dons { margin-top: 0.6rem; font-size: 0.85rem; color: hsl(var(--foreground)); }
.gauge-legend { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.72rem; color: hsl(var(--muted-foreground)); }
.gauge-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.lg { width: 0.9rem; height: 0.55rem; border-radius: 2px; background: hsl(var(--muted)); }
.lg-taken { background: hsl(var(--red)); }
.lg-review { background: repeating-linear-gradient(135deg, hsl(var(--red) / .75) 0 3px, hsl(var(--red) / .25) 3px 6px); }

/* ── Choix du format d'emplacement ───────────────────────── */
.format-bar { margin-bottom: 1rem; display: grid; gap: 0.6rem; }
.formats { display: grid; gap: 0.5rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .formats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .formats { grid-template-columns: repeat(6, 1fr); } }
.format {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.85rem; text-align: left;
  border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--card)); transition: border-color .15s, box-shadow .15s;
}
.format:hover { border-color: hsl(var(--foreground) / .45); }
.format.is-on { border-color: hsl(var(--red)); box-shadow: inset 0 0 0 1px hsl(var(--red)); }
.fmt-icon { flex-shrink: 0; display: grid; grid-template-columns: repeat(var(--c), 0.7rem); gap: 2px; width: 2.3rem; justify-content: center; }
.fmt-icon i { height: 0.7rem; border-radius: 1px; background: hsl(var(--muted-foreground) / .55); }
.format.is-on .fmt-icon i { background: hsl(var(--red)); }
.fmt-text { display: grid; min-width: 0; }
.fmt-text b { font-size: 0.86rem; font-weight: 500; line-height: 1.3; }
.fmt-text small { font-size: 0.72rem; color: hsl(var(--muted-foreground)); }

/* ── La combinaison ──────────────────────────────────────── */
.suit-tool { display: grid; gap: 1rem; }
.suit-stage { padding: 0.75rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--card)); }
.view-tabs { display: flex; gap: 0.4rem; }
.suit-views { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
/* Un fond de studio derrière chaque vue : la combinaison noire se détache dans les deux thèmes. */
.suit-view {
  text-align: center; padding: 0.75rem 0.5rem 0.6rem; border-radius: 0.4rem;
  background: radial-gradient(ellipse 66% 50% at 50% 38%, #fff, hsl(0 0% 86%) 82%);
}
.dark .suit-view { background: radial-gradient(ellipse 66% 50% at 50% 38%, hsl(0 0% 40%), hsl(0 0% 15%) 82%); }
.suit-view figcaption { margin-top: 0.25rem; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.suit-view svg { width: 100%; height: auto; max-height: 78vh; margin: 0 auto; }
.suit-views[data-show="face"] .suit-view[data-view="dos"],
.suit-views[data-show="dos"] .suit-view[data-view="face"] { display: none; }
.suit-hint { margin-top: 0.75rem; text-align: center; font-size: 0.78rem; color: hsl(var(--muted-foreground)); }
@media (min-width: 700px) {
  .view-tabs { display: none; }
  .suit-views { grid-template-columns: 1fr 1fr; margin-top: 0; }
  .suit-views .suit-view { display: block !important; }
}
@media (min-width: 1060px) {
  .suit-tool { grid-template-columns: minmax(0, 1fr) 23rem; align-items: start; }
  .suit-panel { position: sticky; top: 4.5rem; }
}

/* Les cases sont tracées en pixels des photos : épaisseurs et textes sont à cette échelle. */
.suit-mark, .area { pointer-events: none; }
.area .patch { fill: #fff; }
.area.bare .patch { fill: none; stroke: none; } /* logo clair ou image pleine : posé directement sur le tissu, sans étiquette */

.slot { cursor: pointer; }
.slot:focus-visible { outline: none; }
.slot rect.box { fill: rgb(255 255 255 / .1); stroke: #e8e8e8; stroke-width: 2.2; transition: fill .15s; }
.slot text { fill: #f0f0f0; font: 600 16px ui-monospace, Consolas, monospace; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.slot:hover rect.box, .slot:focus-visible rect.box { fill: rgb(255 255 255 / .3); }
/* Survol : l'emplacement que poserait le format choisi (hachuré rouge s'il ne tient pas ici). */
.slot.pv rect.box { fill: hsl(8 75% 55% / .55); stroke: #fff; stroke-width: 3; }
.slot.pv text { fill: #fff; }
.slot.pv-bad { cursor: not-allowed; }
.slot.pv-bad rect.box { fill: rgb(255 255 255 / .03); stroke: hsl(8 75% 55%); stroke-width: 2.5; stroke-dasharray: 6 4; }
.slot.in-cart rect.box { fill: hsl(8 75% 55%); stroke: #fff; stroke-width: 3.2; }
.slot.in-cart text { fill: #fff; }
.slot.is-held rect.box { fill: rgb(255 255 255 / .02); stroke: #9a9a9a; stroke-dasharray: 6 5; }
.slot.is-held text { fill: #9a9a9a; }
.slot.is-taken rect.box { fill: #2e2e2e; stroke: #575757; }
.slot.is-taken text { fill: #7c7c7c; }
/* Le bouton de rotation, au bas de l'emplacement choisi. */
.turn-handle { cursor: pointer; }
.turn-handle:focus-visible { outline: none; }
.turn-handle circle { fill: #f4f4f4; stroke: #141414; stroke-width: 2; transition: fill .15s; }
.turn-handle path { fill: none; stroke: #141414; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.turn-handle:hover circle, .turn-handle:focus-visible circle { fill: hsl(8 75% 55%); stroke: #fff; }
.turn-handle:hover path, .turn-handle:focus-visible path { stroke: #fff; }
/* Une case couverte par un logo : le logo se voit, la case reste cliquable et survolable. */
.slot.is-covered rect.box { fill: transparent; stroke: transparent; }
.slot.is-covered text { display: none; }
.slot.is-covered:hover rect.box, .slot.is-covered:focus-visible rect.box { fill: rgb(255 255 255 / .16); stroke: #fff; }
.area.trial .patch { stroke: hsl(8 75% 55%); stroke-width: 4; } /* le contour de la sélection, sans traits de grille sur le logo */

/* ── Panneau : la grille, la sélection, l'essai de logo ───── */
.suit-panel { display: grid; gap: 0.75rem; }
.panel-box { padding: 1.15rem; }
.grid-board { margin-top: 0.8rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.35rem; }
.tile {
  display: grid; gap: 0; justify-items: center; padding: 0.4rem 0.1rem; min-height: 3rem;
  border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: none; transition: all .15s;
}
.tile b { font: 600 0.85rem ui-monospace, Consolas, monospace; }
.tile small { font-size: 0.62rem; color: hsl(var(--muted-foreground)); }
.tile:hover { border-color: hsl(var(--foreground) / .5); }
.tile.pv { background: hsl(var(--red) / .35); border-color: hsl(var(--red)); }
.tile.pv-bad { border-color: hsl(var(--red)); border-style: dashed; cursor: not-allowed; }
.tile.in-cart { background: hsl(var(--red)); border-color: hsl(var(--red)); color: #fff; }
.tile.in-cart small { color: rgb(255 255 255 / .85); }
.tile.taken { background: hsl(var(--muted)); border-color: transparent; }
.tile.taken b { color: hsl(var(--muted-foreground)); text-decoration: line-through; }
.tile.held { border-style: dashed; }
.tile.held b { color: hsl(var(--muted-foreground)); }
.shortcuts { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.shortcuts .chip { min-height: 1.9rem; font-size: 0.72rem; padding: 0.2rem 0.7rem; }

.cart-note { margin-top: 0.6rem; padding: 0.5rem 0.7rem; border-left: 2px solid hsl(var(--red)); font-size: 0.82rem; }
#cart > .muted { margin-top: 0.6rem; font-size: 0.88rem; }
.cart-list { margin-top: 0.8rem; display: grid; gap: 0.35rem; }
.cart-list li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 0.5rem; align-items: center; padding: 0.45rem 0.3rem 0.45rem 0.7rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius); font-size: 0.82rem; }
.cart-list b { font-weight: 600; }
.cart-list small { display: block; color: hsl(var(--muted-foreground)); font-family: ui-monospace, Consolas, monospace; font-size: 0.72rem; }
.cart-list em { font-style: normal; font-family: ui-monospace, Consolas, monospace; font-size: 0.78rem; }
.rm { width: 1.9rem; height: 1.9rem; border: 0; border-radius: var(--radius); background: none; color: hsl(var(--muted-foreground)); font-size: 0.75rem; }
.rm:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.rm.turn { font-size: 1.05rem; }
.cart-list li.todo { grid-template-columns: 1fr auto auto; border-style: dashed; border-color: hsl(var(--red) / .7); }
.cart-list li.todo strong { color: hsl(var(--red)); font-weight: 500; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
#cart .cart-note { margin-top: 0.7rem; }
.cart-list li .rm + .rm { margin-left: -0.5rem; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid hsl(var(--border)); font-size: 0.85rem; }
.cart-total span b { font-weight: 600; }
.cart-total > b { font-size: 2.1rem; font-weight: 300; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
#cart .btn { margin-top: 1rem; width: 100%; }
#cart .clear { display: block; margin: 0.7rem auto 0; }
.logo-tool .muted { margin-top: 0.3rem; }
.logo-actions { margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.logo-actions label { cursor: pointer; }

.tip {
  position: fixed; z-index: 60; pointer-events: none; display: grid; gap: 0.05rem; max-width: 17rem;
  padding: 0.5rem 0.75rem; border-radius: 0.4rem; background: #f4f4f4; color: #141414;
  font-size: 0.76rem; line-height: 1.35; box-shadow: 0 12px 30px rgb(0 0 0 / .45);
  transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .12s;
}
.tip.below { transform: translate(-50%, 10px); }
.tip.is-on { opacity: 1; }
.tip b { font-size: 0.9rem; }
.tip span { color: #555; }
.tip em { font-style: normal; font-weight: 600; color: hsl(8 75% 45%); }

.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: hsl(var(--card)); border-top: 1px solid hsl(var(--border));
  transform: translateY(110%); transition: transform .25s;
}
.cart-bar.is-on { transform: none; }
.cart-bar b { font-size: 1.3rem; font-weight: 400; }
.cart-bar span { font-size: 0.85rem; color: hsl(var(--muted-foreground)); }
@media (min-width: 1060px) { .cart-bar { display: none; } }

/* ── Dons ────────────────────────────────────────────────── */
.don { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .don { grid-template-columns: minmax(0, 26rem) 1fr; gap: 3rem; align-items: start; } }
#don-form { display: grid; gap: 0.9rem; }
.don-amounts { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
/* Le montant libre tient sur la même ligne que les montants proposés, juste après 100 €, et prend la place qui reste. */
.don-amounts .chip { padding-inline: 0.7rem; }
.don-custom { flex: 1 1 4.25rem; min-width: 4.25rem; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0 0.7rem; border: 1px solid hsl(var(--border)); border-radius: 999px; min-height: 2.25rem; }
.don-custom input { flex: 1; width: 100%; min-width: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 0.95rem; text-align: right; padding: 0.2rem 0; }
@media (max-width: 480px) { .don-amounts { gap: 0.3rem; } .don-amounts .chip { padding-inline: 0.5rem; font-size: 0.74rem; } .don-custom { padding: 0 0.55rem; } }
.don-custom input:focus { outline: none; }
.don-custom:focus-within { border-color: hsl(var(--foreground) / .6); }
.don-custom span { color: hsl(var(--muted-foreground)); font-size: 0.85rem; }
.don-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.don-total b { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.don-total span { color: hsl(var(--muted-foreground)); }
.donors { margin-top: 1.25rem; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.4rem; }
.donors li { padding: 0.25rem 0.8rem; border: 1px solid hsl(var(--border)); border-radius: 999px; font-size: 0.82rem; }
.donors li b { font-weight: 500; }
/* Le statut du donateur, à côté de son nom. */
.donors .who { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.5rem; }
.donors .amt { font: 0.8rem ui-monospace, Consolas, monospace; color: hsl(var(--foreground)); white-space: nowrap; }
.donors .lvl { font-style: normal; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: hsl(var(--red)); }
/* Formulaire : le statut que donne le montant choisi, puis l'échelle des statuts. */
.don-status { font-size: 0.88rem; color: hsl(var(--muted-foreground)); }
.don-status b { color: hsl(var(--foreground)); font-weight: 600; }
.don-status .next { display: block; margin-top: 0.15rem; font-size: 0.78rem; }
.don-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
.don-levels li { display: grid; gap: 0.1rem; padding: 0.5rem 0.55rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius); font-size: 0.78rem; line-height: 1.25; color: hsl(var(--muted-foreground)); transition: border-color .15s, color .15s; }
.don-levels li b { font-weight: 500; overflow-wrap: anywhere; }
.don-levels li span { font: 0.68rem ui-monospace, Consolas, monospace; }
.don-levels li.is-on { border-color: hsl(var(--red)); color: hsl(var(--foreground)); }
.don-levels li.is-on b { color: hsl(var(--red)); }
@media (max-width: 380px) { .don-levels { grid-template-columns: repeat(2, 1fr); } }
.donors li.anon b { color: hsl(var(--muted-foreground)); }
.donors li.anon { border-style: dashed; }
/* Un don accompagné d'un petit mot : le nom, puis le message entre guillemets. */
.donors li.with-msg { display: grid; gap: 0.15rem; padding: 0.6rem 0.9rem; border-radius: 0.5rem; max-width: 22rem; }
.donors q { color: hsl(var(--muted-foreground)); font-style: italic; overflow-wrap: anywhere; quotes: '« ' ' »'; }

/* ── Partenaires et niveaux ──────────────────────────────── */
.partners { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.partner .p-logo { aspect-ratio: 1 / 1; height: auto; padding: 12%; } /* chaque logo dans un carré */
.partner { display: grid; grid-template-rows: auto 1fr; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--card)); overflow: hidden; }
.p-logo { display: flex; align-items: center; justify-content: center; height: 7rem; padding: 1.25rem 1.5rem; background: #fff; }
.p-logo.dark { background: #0d0d0d; border-bottom: 1px solid hsl(var(--border)); }
.p-logo img { max-height: 100%; max-width: 100%; object-fit: contain; }
.p-body { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 1.15rem 1.1rem; }
.p-body h3 { font-size: 1.1rem; font-weight: 500; }
.p-body small { color: hsl(var(--muted-foreground)); font-size: 0.76rem; }
.p-body p { margin-top: 0.5rem; font-size: 0.9rem; line-height: 1.5; color: hsl(var(--muted-foreground)); overflow-wrap: anywhere; }
.p-link { margin-top: auto; padding-top: 0.8rem; font-size: 0.88rem; font-weight: 500; text-decoration: none; }
.p-link:hover { color: hsl(var(--red)); }
.count { justify-self: end; font: 0.72rem ui-monospace, Consolas, monospace; color: hsl(var(--muted-foreground)); }
.levels { margin-top: 0.75rem; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.level { padding: 1.2rem 1.4rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; }
.level-cases { margin-top: 0.4rem; font-size: 1.5rem; font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; }
.level-price { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; margin-bottom: 0.5rem; }

/* ── Saison ──────────────────────────────────────────────── */
.timeline { display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 2rem 2rem; border-left: 2px solid hsl(var(--border)); }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 0.3rem; width: 12px; height: 12px; border-radius: 50%; background: hsl(var(--foreground)); }
.timeline li.goal { border-left-style: dashed; border-left-color: hsl(var(--red)); padding-bottom: 0; }
.timeline li.goal::before { background: hsl(var(--red)); }
.timeline .when { font-family: ui-monospace, Consolas, monospace; font-size: 0.72rem; color: hsl(var(--muted-foreground)); }
.timeline h3 { margin-top: 0.15rem; font-size: 1.5rem; font-weight: 300; }
.timeline p { margin-top: 0.3rem; font-size: 0.92rem; color: hsl(var(--muted-foreground)); max-width: 28rem; }
/* Où en est-on aujourd'hui (app.js : renderTimeline). Une étape à venir a un point creux, une étape
   passée un point plein, l'étape en cours un point rouge ; la ligne est remplie jusqu'à la date du jour. */
.timeline li:not(.is-past):not(.is-now)::before { background: hsl(var(--background)); box-shadow: inset 0 0 0 2px hsl(var(--muted-foreground)); }
.timeline li.goal:not(.is-past):not(.is-now)::before { box-shadow: inset 0 0 0 2px hsl(var(--red)); }
.timeline li.is-now::before { background: hsl(var(--red)); box-shadow: 0 0 0 4px hsl(var(--red) / .25); z-index: 1; }
.timeline li::after { content: ''; position: absolute; left: -2px; top: 0; width: 2px; height: calc(var(--p, 0) * 100%); background: hsl(var(--foreground)); }
.timeline .state { margin-left: 0.6rem; font-size: 0.62rem; font-weight: 600; line-height: 1; letter-spacing: 0.12em; text-transform: uppercase; }
.timeline .state:empty { display: none; }
.timeline .is-now .state { padding: 0.2rem 0.5rem; border-radius: 999px; background: hsl(var(--red)); color: #fff; }
.timeline .today { position: absolute; left: -6px; top: calc(var(--p, 0) * 100%); width: 10px; height: 2px; background: hsl(var(--red)); font-size: 0; }
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(4, 1fr); }
  .timeline li { padding: 1.5rem 1.5rem 0 0; border-left: 0; border-top: 2px solid hsl(var(--border)); }
  .timeline li::before { left: 0; top: -7px; }
  .timeline li.goal { border-top-style: dashed; border-top-color: hsl(var(--red)); }
  .timeline li::after { left: 0; top: -2px; height: 2px; width: calc(var(--p, 0) * 100%); }
  /* Le repère « Aujourd'hui » : un trait sur la ligne et sa date au-dessus, qui ne débordent jamais de l'étape. */
  .timeline { padding-top: 1.6rem; }
  .timeline .today {
    left: calc(var(--p, 0) * 100%); top: -1.75rem; width: auto; height: auto; background: none;
    transform: translateX(calc(var(--p, 0) * -100%)); white-space: nowrap;
    font: 0.66rem ui-monospace, Consolas, monospace; color: hsl(var(--red));
  }
  .timeline .today::after { content: ''; position: absolute; left: calc(var(--p, 0) * 100% - 1px); top: 1.2rem; width: 2px; height: 0.85rem; background: hsl(var(--red)); }
}
.indicators { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.indicators .label { margin-right: 0.5rem; }
.pill { padding: 0.25rem 0.75rem; border: 1px solid hsl(var(--border)); border-radius: 999px; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.pill b { color: hsl(var(--foreground)); font-weight: 500; margin-right: 0.25rem; }

/* ── Budget ──────────────────────────────────────────────── */
.budget { display: grid; gap: 2.5rem; }
.big { font-size: clamp(3.2rem, 9vw, 6rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.budget-total .label { margin-top: 0.75rem; }
.budget-total .muted { margin-top: 0.75rem; font-size: 0.85rem; max-width: 26rem; }
.trace { margin-top: 1.25rem; padding-left: 0.9rem; border-left: 2px solid hsl(var(--red)); font-size: 0.85rem; max-width: 26rem; }
.bars { display: grid; gap: 1.15rem; }
.bars div { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.95rem; }
.bars b { font-weight: 500; }
.bars span { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
.bars i { display: block; height: 6px; margin-top: 0.4rem; background: hsl(var(--muted)); border-radius: 3px; overflow: hidden; }
.bars i::after { content: ''; display: block; height: 100%; width: 0; background: hsl(var(--foreground)); transition: width 1.1s cubic-bezier(.2,.7,.2,1) .2s; }
.is-in .bars i::after { width: calc(var(--v) * 1%); }
.bars li:first-child i::after { background: hsl(var(--red)); }
.bars p { margin-top: 0.35rem; font-size: 0.8rem; color: hsl(var(--muted-foreground)); }
@media (min-width: 900px) { .budget { grid-template-columns: 5fr 6fr; gap: 4rem; align-items: start; } }

/* ── Formulaires (réservation, dons, compte) ─────────────── */
dialog#checkout {
  width: min(44rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); padding: 0;
  border: 1px solid hsl(var(--border)); border-radius: 0.75rem;
  background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: 0 30px 80px rgb(0 0 0 / .5);
}
dialog#checkout::backdrop { background: rgb(0 0 0 / .65); backdrop-filter: blur(3px); }
#checkout-form { padding: 1.25rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { #checkout-form { padding: 1.75rem 2rem; } }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.dlg-head h2 { margin-top: 0.25rem; font-size: 2rem; }
.dlg-summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--card)); font-size: 0.88rem; }
.dlg-summary p { margin-top: 0.3rem; }
.dlg-summary b { font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
@media (max-width: 480px) { .dlg-summary { flex-direction: column; align-items: flex-start; gap: 0.5rem; } }
.sum-price { margin: 0 !important; font-size: 1.9rem; font-weight: 300; letter-spacing: -0.03em; white-space: nowrap; }
fieldset.seg { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.seg legend { margin-bottom: 0.5rem; padding: 0; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0.3rem 0.9rem; border: 1px solid hsl(var(--border)); border-radius: 999px; font-size: 0.82rem; color: hsl(var(--muted-foreground)); transition: all .15s; }
.seg input:checked + span { background: hsl(var(--foreground)); border-color: hsl(var(--foreground)); color: hsl(var(--background)); }
.seg input:focus-visible + span { outline: 2px solid hsl(var(--red)); outline-offset: 2px; }
.label.group { margin-top: 0.25rem; margin-bottom: -0.4rem; }
.fields { display: grid; gap: 0.75rem; }
@media (min-width: 560px) { .fields { grid-template-columns: 1fr 1fr; } .fields .wide { grid-column: 1 / -1; } }
.fields label { display: grid; gap: 0.3rem; align-content: start; font-size: 0.78rem; color: hsl(var(--muted-foreground)); }
.fields label i { font-style: normal; opacity: .7; }
.fields input, .fields textarea {
  width: 100%; padding: 0.6rem 0.7rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  background: hsl(var(--card)); color: hsl(var(--foreground)); font: inherit; font-size: 0.95rem;
}
.fields input[readonly] { color: hsl(var(--muted-foreground)); background: hsl(var(--muted)); }
.fields input[type="file"] { padding: 0.45rem; font-size: 0.85rem; }
.fields textarea { resize: vertical; }
.fields input:focus, .fields textarea:focus { outline: none; border-color: hsl(var(--foreground) / .6); }
.invalid { border-color: hsl(var(--red)) !important; outline: 1px solid hsl(var(--red)); }
.field-error { color: hsl(var(--red)); font-size: 0.75rem; }
.logo-kept { font-size: 0.78rem; color: hsl(var(--foreground)); }
form[data-type="particulier"] .only-org { display: none; }
form[data-auth="user"] .only-guest, form[data-auth="guest"] .only-user { display: none; }
form .only-guest a { color: hsl(var(--foreground)); }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.6rem; align-items: start; font-size: 0.82rem; color: hsl(var(--muted-foreground)); cursor: pointer; }
.consent input { margin-top: 0.2rem; width: 1rem; height: 1rem; accent-color: hsl(var(--red)); }
.consent .field-error { grid-column: 2; }
.dlg-error { padding: 0.7rem 0.9rem; border: 1px solid hsl(var(--red)); border-radius: var(--radius); color: hsl(var(--red)); font-size: 0.88rem; }
.dlg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; }
.dlg-foot .btn { padding: 0.75rem 1.3rem; }

.demo-banner { display: none; position: fixed; left: 50%; top: 4.1rem; z-index: 40; transform: translateX(-50%); margin: 0; padding: 0.3rem 0.9rem; border-radius: 999px; background: hsl(48 96% 55%); color: #1a1a1a; font-size: 0.72rem; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 20px rgb(0 0 0 / .4); }
body.demo .demo-banner { display: block; }

/* ── Contact + pied ──────────────────────────────────────── */
.closing {
  min-height: 80dvh; padding: 5rem 1.5rem; border-top: 1px solid hsl(var(--border));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; text-align: center;
}
.closing h2, .closing .body { margin-top: 0; }
.closing .kicker { margin-bottom: -1.25rem; }
/* Le formulaire de contact : aligné à gauche dans une section centrée ; « Contacter KUB! » l'envoie. */
.contact-form, .contact-done { width: 100%; max-width: 38rem; text-align: left; }
.contact-form { display: grid; gap: 1rem; }
.contact-form .cta { justify-self: center; margin: 0.6rem 0 0.4rem; }
.contact-form .muted { text-align: center; }
.contact-form textarea { min-height: 7rem; }
.contact-form .captcha b { color: hsl(var(--foreground)); font-weight: 500; }
.contact-form .captcha input { max-width: 16rem; }
button.cta { padding: 0; border: 0; background: none; }
button.cta[disabled] { opacity: .6; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { display: grid; gap: 0.6rem; justify-items: start; }
.contact-done:focus { outline: none; }
.contact-done .text-link { text-decoration: underline; text-underline-offset: 3px; }
.contact-lines { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; font-size: 0.9rem; color: hsl(var(--muted-foreground)); }
.contact-lines a { text-decoration: none; }
.contact-lines .insta { display: inline-flex; align-items: center; gap: 0.4rem; }
.contact-lines a:hover { color: hsl(var(--foreground)); }
.site-footer { padding: 1.25rem 1.5rem 5rem; border-top: 1px solid hsl(var(--border)); text-align: center; font-size: 0.72rem; color: hsl(var(--muted-foreground)); display: grid; gap: 0.5rem; }
.site-footer p { max-width: 60rem; margin: 0 auto; }
@media (min-width: 1060px) { .site-footer { padding-bottom: 1.25rem; } }

/* ── Pages « merci », espace sponsor, admin ──────────────── */
.page { min-height: calc(100dvh - 3.5rem); max-width: 44rem; margin: 0 auto; padding: 3.5rem 1.25rem 5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.page.narrow { max-width: 30rem; }
.page.wide { max-width: 64rem; }
.page.centered { justify-content: center; }
.page h1 { font-size: clamp(2.3rem, 6.5vw, 3.8rem); margin: 0; }
.page h2 { font-size: 1.6rem; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.25rem; font-size: 0.88rem; }
.meta dt { color: hsl(var(--muted-foreground)); }
.meta dd { text-align: right; overflow-wrap: anywhere; }
.steps { display: grid; gap: 0.6rem; counter-reset: s; font-size: 0.92rem; color: hsl(var(--muted-foreground)); }
.steps li { counter-increment: s; position: relative; padding-left: 2rem; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 0.15em; font: 0.72rem ui-monospace, Consolas, monospace; color: hsl(var(--red)); }
.steps a { color: hsl(var(--foreground)); }
.badge { display: inline-block; padding: 0.1rem 0.65rem; border-radius: 999px; font-size: 0.72rem; border: 1px solid hsl(var(--border)); white-space: nowrap; }
.badge.ok { color: hsl(var(--green)); border-color: hsl(var(--green) / .5); }
.badge.wait { color: hsl(40 90% 45%); border-color: hsl(40 90% 45% / .5); }
.badge.no { color: hsl(var(--muted-foreground)); }
.stack { display: grid; gap: 0.9rem; }
.tabs { display: flex; gap: 0.4rem; }
.order { display: grid; gap: 1rem; }
@media (min-width: 640px) { .order { grid-template-columns: 9rem 1fr; } }
.order-logo { display: grid; gap: 0.4rem; align-content: start; }
.order-logo .p-logo { height: 6.5rem; margin: 0; padding: 0.9rem; border-radius: var(--radius); background: hsl(0 0% 55%); } /* gris moyen : lisible pour un logo clair comme foncé */
.order-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.4rem 1rem; }
.order-head b { font-size: 1.15rem; font-weight: 500; }
.order-head .amount { font-size: 1.5rem; font-weight: 300; letter-spacing: -0.02em; }
.order .meta { margin-top: 0.7rem; }
.order .actions { margin-top: 0.9rem; }
/* Liste des factures : numéro, description, montant, bouton. */
.docs { display: grid; gap: 0.5rem; }
.docs li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; padding: 0.8rem 1rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--card)); }
.docs li b { font: 600 0.9rem ui-monospace, Consolas, monospace; white-space: nowrap; }
.docs li span { flex: 1 1 12rem; font-size: 0.85rem; color: hsl(var(--muted-foreground)); }
.docs li .amount { flex: none; font-size: 1.1rem; font-weight: 300; color: hsl(var(--foreground)); white-space: nowrap; }
.empty { padding: 2rem; border: 1px dashed hsl(var(--border)); border-radius: 0.5rem; text-align: center; color: hsl(var(--muted-foreground)); font-size: 0.9rem; }
