/* Kovra — interface (charte v1 : un seul accent, titres Barlow Condensed italique).
 *
 * Thème CLAIR : fond très légèrement grisé, surfaces blanches, texte encre.
 * Le kit (kovra-tokens.css) fournit des jetons de thème sombre ; on les redéfinit ci-dessous, sans toucher au kit.
 * Charte : « Lime sur blanc ne passe pas ». L'accent ne sert donc qu'en aplat (boutons, pastilles, repères) ;
 * pour du texte ou une icône sur fond clair on utilise --accent-text (l'encre, ou l'accent assombri pour les
 * couleurs de coach trop claires/trop vives), calculé côté serveur dans Workspace::themeStyle().
 */
:root {
  --kv-bg: #F6F6F8;
  --kv-surface: #FFFFFF;
  --kv-surface-2: #F0F0F4;
  --kv-border: #E2E2EA;
  --kv-text: #0B0B0F;
  --kv-text-muted: #636877;
  /* Sémantique : versions foncées, lisibles sur blanc (≥ 4,5:1) */
  --kv-success: #15803D;
  --kv-warning: #B45309;
  --kv-danger: #C8223C;
  --kv-info: #0369A1;
  color-scheme: light;
}
[data-tenant] { --accent-text: #0B0B0F; }

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--kv-bg);
  color: var(--kv-text);
  font-family: var(--kv-font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
[hidden] { display: none !important; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ---- Typographie ---- */
.display, h1.page-title {
  font-family: var(--kv-font-display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  line-height: .98;
  letter-spacing: .005em;
}
h1.page-title { font-size: clamp(34px, 7vw, 52px); }
.eyebrow { display: flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--kv-text-muted); font-weight: 700; margin-bottom: 8px; }
/* Le repère de marque : un trait incliné de 10°, aux couleurs du coach */
.eyebrow::before { content: ""; width: 18px; height: 5px; border-radius: 2px; background: var(--accent); transform: skewX(-10deg); flex: none; }
.muted { color: var(--kv-text-muted); }
.small { font-size: 13px; }
.num { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; }
.nowrap { white-space: nowrap; }
h2.section-title { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--kv-text-muted); font-weight: 700; margin: 28px 0 12px; }

/* ---- Boutons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 15px; cursor: pointer;
  transition: transform .08s ease, filter .15s ease; text-align: center;
  box-shadow: inset 0 0 0 1px rgba(11, 11, 15, .1);   /* lime sur blanc : le contour garde le bouton lisible */
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: var(--kv-surface-2); color: var(--kv-text); border-color: var(--kv-border); font-weight: 700; box-shadow: none; }
.btn-ghost { background: var(--kv-surface); color: var(--kv-text); border-color: var(--kv-border); font-weight: 700; box-shadow: none; }
.btn-danger { background: var(--kv-surface); color: var(--kv-danger); border-color: color-mix(in srgb, var(--kv-danger) 45%, transparent); font-weight: 700; box-shadow: none; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link { color: var(--accent-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.link-muted { color: var(--kv-text-muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Cartes & listes ---- */
.card { background: var(--kv-surface); border: 1px solid var(--kv-border); border-radius: var(--kv-radius-md); padding: 18px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.card, .stat, .step, .slot-card, .hero, .notice { box-shadow: 0 1px 2px rgba(11, 11, 15, .05); }
.card-tight { padding: 0; overflow: hidden; }
.card h3 { font-size: 15px; font-weight: 800; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.row + .row { border-top: 1px solid var(--kv-border); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13px; color: var(--kv-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub .icon { display: inline-block; vertical-align: -3px; }
a.row:hover { background: var(--kv-surface-2); }
.slot .row-title { white-space: normal; }
.row > .icon:last-child { color: var(--kv-text-muted); }

.avatar { width: 42px; height: 42px; border-radius: 13px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.avatar-muted { background: var(--kv-surface-2); color: var(--kv-text-muted); border: 1px solid var(--kv-border); }

.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; border: 1px solid var(--kv-border); color: var(--kv-text-muted); white-space: nowrap; }
.badge-accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.badge-ok { color: var(--kv-success); border-color: color-mix(in srgb, var(--kv-success) 40%, transparent); }
.badge-warn { color: var(--kv-warning); border-color: color-mix(in srgb, var(--kv-warning) 40%, transparent); }
.badge-danger { color: var(--kv-danger); border-color: color-mix(in srgb, var(--kv-danger) 40%, transparent); }

.empty { text-align: center; padding: 34px 20px; color: var(--kv-text-muted); }
.empty .display { font-size: 26px; color: var(--kv-text); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

/* ---- Messages ---- */
.flashes { display: grid; gap: 10px; margin-bottom: 18px; }
.flash { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; border: 1px solid var(--kv-border); background: var(--kv-surface); font-size: 15px; }
.flash .icon { margin-top: 2px; }
.flash-success { border-color: color-mix(in srgb, var(--kv-success) 50%, transparent); }
.flash-success .icon { color: var(--kv-success); }
.flash-error { border-color: color-mix(in srgb, var(--kv-danger) 55%, transparent); }
.flash-error .icon { color: var(--kv-danger); }
.flash-info .icon { color: var(--kv-info); }

/* ---- Formulaires ---- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.label { font-size: 13px; font-weight: 700; color: var(--kv-text); }
.opt { font-weight: 500; color: var(--kv-text-muted); margin-left: 4px; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; background: var(--kv-surface-2); border: 1px solid var(--kv-border);
  border-radius: 12px; color: var(--kv-text); font-size: 16px;
}
.textarea { min-height: 88px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--kv-text-muted) 70%, transparent); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--kv-text-muted) 50%), linear-gradient(135deg, var(--kv-text-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.hint { font-size: 13px; color: var(--kv-text-muted); }
.error-text { font-size: 13px; color: var(--kv-danger); font-weight: 600; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--kv-danger); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.grid-3 { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 480px) { .grid-2.stay { grid-template-columns: 1fr 1fr; } .grid-2:not(.stay) { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--kv-border); background: var(--kv-surface-2); font-weight: 700; font-size: 14px; }
.chip input:checked + span { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.chip input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch span { display: block; width: 46px; height: 46px; border-radius: 14px; border: 2px solid transparent; background: var(--c); }
.swatch span { box-shadow: inset 0 0 0 1px rgba(11, 11, 15, .12); }
.swatch input:checked + span { border-color: var(--kv-surface); box-shadow: 0 0 0 2px var(--kv-text); }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--kv-surface-2); border: 1px solid var(--kv-border); border-radius: 14px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px; font-weight: 700; font-size: 14px; text-align: center; padding: 0 8px; }
.segmented input:checked + span { background: var(--accent); color: var(--on-accent); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent-text); }
.segmented input:checked + span { box-shadow: inset 0 0 0 1px rgba(11, 11, 15, .1); }

/* ---- Application coach : coque ---- */
.shell { min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: color-mix(in srgb, var(--kv-bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--kv-border); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--kv-surface-2); border: 1px solid var(--kv-border); cursor: pointer; }
.dot { position: absolute; top: 7px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; display: grid; place-items: center; }

.sidenav { display: none; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--kv-surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--kv-border); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 11px; font-weight: 700; color: var(--kv-text-muted); border-radius: 12px; }
.tab[aria-current="page"] { color: var(--kv-text); }
/* Onglet actif : l'icône repose sur une pastille aux couleurs du coach (l'accent seul, en texte, serait illisible sur blanc) */
.tab[aria-current="page"] .icon { box-sizing: border-box; width: 44px; height: 28px; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.tab-add .tab-fab { display: grid; place-items: center; width: 46px; height: 46px; margin-top: -22px; border-radius: 16px; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.tab-add { color: var(--kv-text-muted); }

.page { width: 100%; max-width: 920px; margin: 0 auto; padding: 22px 16px calc(110px + env(safe-area-inset-bottom)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .btn-row { margin-left: auto; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--kv-text-muted); font-size: 14px; font-weight: 600; margin-bottom: 10px; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 250px 1fr; }
  .topbar { grid-column: 2; }
  .sidenav { display: flex; flex-direction: column; gap: 4px; grid-row: 1 / span 3; padding: 22px 14px; border-right: 1px solid var(--kv-border); position: sticky; top: 0; height: 100dvh; background: var(--kv-surface); }
  .sidenav .brand { flex: none; padding: 0 8px 22px; }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 700; color: var(--kv-text-muted); }
  .side-link:hover { background: var(--kv-surface-2); color: var(--kv-text); }
  .side-link[aria-current="page"] { background: var(--kv-surface-2); color: var(--kv-text); box-shadow: inset 3px 0 0 var(--accent); }
  .side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--kv-border); }
  .tabbar { display: none; }
  .topbar .brand { display: none; }
  .topbar { justify-content: flex-end; }
  .page { padding: 30px 32px 60px; grid-column: 2; }
}

/* ---- Tableau de bord ---- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--kv-surface); border: 1px solid var(--kv-border); border-radius: var(--kv-radius-md); padding: 14px; }
.stat b { display: block; font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 40px; line-height: 1; }
.stat span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--kv-text-muted); font-weight: 700; }
/* Le chiffre clé : surligné à l'accent, comme au marqueur */
.stat.is-key b { display: block; width: fit-content; padding-right: 6px; margin-bottom: 2px; background: linear-gradient(transparent 56%, var(--accent) 56%, var(--accent) 90%, transparent 90%); }

.steps { display: grid; gap: 10px; }
.step { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--kv-surface); border: 1px solid var(--kv-border); border-radius: var(--kv-radius-md); }
.step .n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--kv-surface-2); border: 1px solid var(--kv-border); flex: none; }
.step.done .n { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.step.done { opacity: .6; }

/* ---- Créneaux & agenda ---- */
.slot-time { flex: none; width: 74px; font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 26px; line-height: 1; }
.slot-time small { display: block; font-family: var(--kv-font-ui); font-style: normal; font-weight: 600; font-size: 12px; color: var(--kv-text-muted); margin-top: 3px; }
.slot.is-canceled { opacity: .5; }
.slot.is-canceled .row-title { text-decoration: line-through; }
.cap { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.cap.is-full { color: var(--kv-warning); }


.preview-list .row.is-skipped { opacity: .5; }
.preview-day { padding: 8px 16px; background: var(--kv-surface-2); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--kv-text-muted); }

/* ---- Lien client / QR ---- */
.qr { width: 100%; max-width: 280px; margin: 0 auto; background: #fff; border: 1px solid var(--kv-border); border-radius: 20px; padding: 10px; }
.qr svg { width: 100%; height: auto; }
.qr svg path { fill: #0B0B0F; }
.link-box { display: flex; align-items: center; gap: 8px; background: var(--kv-surface-2); border: 1px solid var(--kv-border); border-radius: 12px; padding: 6px 6px 6px 12px; }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--kv-text-muted); }
.share-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .share-grid { grid-template-columns: repeat(4, 1fr); } }
.share-grid .btn, .share-grid form { width: 100%; }
.status-list { display: grid; gap: 8px; font-size: 14px; }
.status-list li { list-style: none; display: flex; align-items: center; gap: 10px; }
.status-list .icon { color: var(--kv-text-muted); }
.status-list .ok .icon { color: var(--kv-success); }

.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--kv-text-muted); }
.search .input { padding-left: 42px; }

/* ---- Application client ---- */
.client-shell { min-height: 100dvh; max-width: 520px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.client-head { display: flex; align-items: center; gap: 12px; padding: 18px 0 14px; }
.client-head b { display: block; font-size: 16px; line-height: 1.2; }
.client-head small { color: var(--kv-text-muted); font-size: 13px; }
.client-head .icon-btn { margin-left: auto; }

.hero { position: relative; overflow: hidden; background: var(--kv-surface); border: 1px solid var(--kv-border); border-radius: var(--kv-radius-lg); padding: 20px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%); pointer-events: none; }
.hero > * { position: relative; }
.hero .eyebrow { font-size: 10px; letter-spacing: .16em; color: var(--kv-text-muted); }
.hero h2 { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 34px; line-height: 1; margin-bottom: 12px; }
.hero-meta { display: grid; gap: 6px; font-size: 14px; color: var(--kv-text-muted); margin-bottom: 16px; }
.hero-meta span { display: flex; align-items: center; gap: 8px; }
.hero-meta b { color: var(--kv-text); }

.clientnav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--kv-surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--kv-border); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.clientnav-inner { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }

.daystrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; margin: 0 -16px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 0 16px; }
.daystrip::-webkit-scrollbar { display: none; }
.daychip { flex: none; scroll-snap-align: start; width: 62px; padding: 10px 0; text-align: center; border-radius: 16px; background: var(--kv-surface); border: 1px solid var(--kv-border); }
.daychip small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--kv-text-muted); font-weight: 700; }
.daychip b { display: block; font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 28px; line-height: 1.1; }
.daychip i { display: block; font-style: normal; font-size: 11px; color: var(--kv-text-muted); }
.daychip[aria-current="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.daychip[aria-current="true"] small, .daychip[aria-current="true"] i { color: inherit; opacity: .8; }

.filters { display: flex; gap: 8px; margin: 4px 0 6px; }
.filter { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--kv-border); font-size: 13px; font-weight: 700; color: var(--kv-text-muted); }
.filter[aria-current="true"] { color: var(--kv-text); border-color: var(--kv-text); background: var(--kv-surface); }

.slot-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--kv-surface); border: 1px solid var(--kv-border); border-radius: var(--kv-radius-md); }
.slot-card + .slot-card { margin-top: 10px; }
.slot-card.is-full { opacity: .55; }
.slot-card .grow { flex: 1; min-width: 0; }
.slot-card .row-title, .slot-card .row-sub { white-space: normal; }
.slot-card form { margin: 0; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--kv-radius-md); background: var(--kv-surface); border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--kv-border)); }
.notice .icon { color: var(--accent-text); margin-top: 2px; }
.notice p { font-size: 14px; }
.notice .btn { margin-top: 10px; }

.poweredby { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 26px 0 8px; font-size: 11px; color: var(--kv-text-muted); }
.poweredby img { height: 11px; width: auto; }

/* ---- Pages publiques / authentification ---- */
.public { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 18px; position: relative; }
.public::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 520px; background: radial-gradient(60% 80% at 80% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%); pointer-events: none; }
.public > * { position: relative; width: 100%; max-width: 420px; }
.public-logo { display: flex; justify-content: center; margin-bottom: 26px; }
.public-logo img { width: min(240px, 70%); height: auto; }
.public h1 { font-size: 46px; margin-bottom: 10px; }
.public .lead { color: var(--kv-text-muted); margin-bottom: 24px; }
.public-links { margin-top: 18px; text-align: center; font-size: 14px; color: var(--kv-text-muted); }
.public-links a { color: var(--kv-text); font-weight: 700; }

.landing { text-align: left; }
.landing ul { list-style: none; padding: 0; display: grid; gap: 12px; margin: 26px 0; }
.landing li { display: flex; gap: 12px; align-items: flex-start; color: var(--kv-text); }
.landing li .icon { color: var(--accent-text); margin-top: 3px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Mini-site du coach (page publique, mobile d'abord) ---- */
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; border-radius: 16px; }
.site-wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.site-bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--kv-bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--kv-border); }
.site-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.site-brand { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 22px; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.site-hero { position: relative; overflow: hidden; padding: 34px 0 40px; }
.site-hero::before { content: ""; position: absolute; inset: -20% -10% auto 30%; height: 560px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 28%, transparent), transparent); pointer-events: none; }
.site-hero-grid { position: relative; display: grid; gap: 28px; }
.site-h1 { font-size: clamp(44px, 11vw, 84px); margin: 6px 0 16px; }
.site-h2 { font-size: clamp(34px, 7vw, 52px); margin: 4px 0 14px; }
.site-lead { font-size: 18px; line-height: 1.6; color: var(--kv-text); opacity: .86; max-width: 56ch; }
.site-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }

.site-photo { position: relative; border-radius: var(--kv-radius-lg); overflow: hidden; background: var(--kv-surface-2); aspect-ratio: 4 / 4.4; box-shadow: 0 24px 60px -28px rgba(11, 11, 15, .45); }
.site-photo img { width: 100%; height: 100%; object-fit: cover; }
.site-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--accent); }
.site-photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(160deg, #1C1C25, #050507); color: #fff; font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 96px; }

.site-section { padding: 44px 0; border-top: 1px solid var(--kv-border); }
.method-grid { display: grid; gap: 14px; margin-top: 22px; }
.method-card { background: var(--kv-surface); border: 1px solid var(--kv-border); border-radius: var(--kv-radius-md); padding: 22px; box-shadow: 0 1px 2px rgba(11, 11, 15, .05); }
.method-n { display: inline-block; font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 44px; line-height: 1; padding-right: 6px; background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 92%, transparent 92%); }
.method-card h3 { margin: 12px 0 6px; font-size: 20px; font-weight: 800; }
.method-card p { color: var(--kv-text-muted); }

.site-first { background: var(--kv-surface); }
.first-card { display: grid; gap: 22px; }
.first-list { list-style: none; padding: 0; display: grid; gap: 12px; align-content: start; }
.first-list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--kv-bg); border: 1px solid var(--kv-border); border-radius: var(--kv-radius-md); }
.first-list .icon { flex: none; width: 26px; height: 26px; padding: 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent); margin-top: 1px; }

.site-form-wrap { max-width: 640px; }
.site-form { margin-top: 22px; padding: 22px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--accent-text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.first-steps { padding-left: 22px; display: grid; gap: 10px; font-size: 16px; margin-top: 16px; }

.site-foot { border-top: 1px solid var(--kv-border); padding: 28px 0 40px; font-size: 14px; }
.site-foot-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }

@media (min-width: 860px) {
  .site-hero { padding: 64px 0 72px; }
  .site-hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 56px; }
  .method-grid { grid-template-columns: repeat(3, 1fr); }
  .first-card { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .site-section { padding: 72px 0; }
}

/* ---- Accueil guidé du client ---- */
.steps-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.wstep { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--kv-surface); border: 1px solid var(--kv-border); border-radius: var(--kv-radius-md); box-shadow: 0 1px 2px rgba(11, 11, 15, .05); }
.wstep h2 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.wstep-body { flex: 1; min-width: 0; }
.wstep-n { position: relative; flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--kv-surface-2); border: 1px solid var(--kv-border); font-weight: 800; }
.wstep-n i { font-style: normal; }
.wstep-n .icon { display: none; }
.wstep.is-done .wstep-n { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.wstep.is-done .wstep-n i { display: none; }
.wstep.is-done .wstep-n .icon { display: block; }

/* ---- Générateur de créneaux ---- */
.gen-block { border: 1px solid var(--kv-border); border-radius: var(--kv-radius-md); padding: 16px; margin: 0; display: grid; gap: 16px; min-width: 0; background: var(--kv-surface); }
.gen-block > legend { padding: 0 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--kv-text-muted); }
.time-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.time-row .input { width: 132px; flex: none; }
.time-end { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--kv-text-muted); white-space: nowrap; }
.gen-more summary { cursor: pointer; font-weight: 700; font-size: 14px; }

/* ==== Agenda : mois, semaine, jour (7 h – 23 h) ==== */
.cal { --hour: 62px; --gutter: 52px; --colmin: 112px; }
.cal[data-view="jour"] { --colmin: 220px; --hour: 68px; }


/* Sélecteur de vue : trois onglets d'un geste */
.cal-seg { display: inline-grid; grid-auto-flow: column; gap: 3px; padding: 3px; background: var(--kv-surface-2); border: 1px solid var(--kv-border); border-radius: 13px; }
.cal-seg a { display: grid; place-items: center; min-height: 34px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--kv-text-muted); }
.cal-seg a[aria-current="page"] { background: var(--kv-surface); color: var(--kv-text); box-shadow: 0 1px 3px rgba(11, 11, 15, .14); }

.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; font-size: 12px; color: var(--kv-text-muted); font-weight: 600; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 14px; height: 14px; border-radius: 5px; display: inline-block; }
.cal-legend a { display: inline-flex; align-items: center; gap: 4px; }

/* États d'une séance : le coup d'œil suffit à lire la journée */
.is-empty { background: var(--kv-surface); border: 1.5px dashed rgba(11, 11, 15, .3); }
.is-partial { background: color-mix(in srgb, var(--accent) 24%, #fff); border: 1.5px solid color-mix(in srgb, var(--accent) 70%, rgba(11, 11, 15, .15)); }
.is-full { background: var(--accent); border: 1.5px solid color-mix(in srgb, var(--accent) 70%, rgba(11, 11, 15, .35)); color: var(--on-accent); }
.is-canceled { background: repeating-linear-gradient(135deg, #F0F0F4 0 6px, #E6E6EC 6px 12px); border: 1.5px solid var(--kv-border); color: var(--kv-text-muted); }
.is-past:not(.is-canceled) { opacity: .6; }

.cal-card { background: var(--kv-surface); border: 1px solid var(--kv-border); border-radius: var(--kv-radius-md); overflow: hidden; box-shadow: 0 1px 2px rgba(11, 11, 15, .05); }
.cal-hint { margin-top: 10px; }

/* ---- Grille horaire (semaine, jour) ---- */
.cal-scroll { overflow: auto; max-height: calc(100dvh - 235px); min-height: 420px; position: relative; overscroll-behavior: contain; }
.cal-grid { --cols: 7; --hours: 16; min-width: calc(var(--gutter) + var(--cols) * var(--colmin)); }
.cal-head, .cal-body { display: grid; grid-template-columns: var(--gutter) repeat(var(--cols), minmax(var(--colmin), 1fr)); }
.cal-head { position: sticky; top: 0; z-index: 5; background: var(--kv-surface); border-bottom: 1px solid var(--kv-border); }
.cal-corner, .cal-gutter { position: sticky; left: 0; z-index: 4; background: var(--kv-surface); }
.cal-corner { z-index: 6; }
.cal-dayhead { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 9px; border-left: 1px solid var(--kv-border); }
.cal-dayhead small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--kv-text-muted); }
.cal-dayhead b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 24px; line-height: 1; }
.cal-dayhead span { font-size: 12px; color: var(--kv-text-muted); font-weight: 600; }
.cal-dayhead.is-today small { color: var(--kv-text); }
.cal-dayhead.is-today b { background: var(--accent); color: var(--on-accent); }

.cal-body { position: relative; height: calc(var(--hours) * var(--hour)); }
.cal-gutter { position: sticky; left: 0; height: 100%; border-right: 1px solid var(--kv-border); }
.cal-gutter span { position: absolute; right: 8px; top: calc(var(--i) * var(--hour)); transform: translateY(-50%); font-size: 11px; font-weight: 700; color: var(--kv-text-muted); background: var(--kv-surface); padding: 0 2px; }
.cal-gutter span:first-child { transform: translateY(2px); }

.cal-col {
  position: relative; border-left: 1px solid var(--kv-border); cursor: copy;
  /* lignes d'heure pleines, demi-heures en pointillé léger */
  background-image:
    linear-gradient(to bottom, var(--kv-border) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--kv-border) 55%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2);
}
.cal-col.is-today { background-color: color-mix(in srgb, var(--accent) 7%, var(--kv-surface)); }
.cal-col { container-type: inline-size; }
/* Colonne étroite : une séance courte ne garde que l'heure et le compteur */
@container (max-width: 125px) {
  .cal-ev.is-short .cal-ev-title { display: none; }
}

.cal-ev {
  position: absolute; z-index: 2; cursor: pointer;
  top: calc(var(--s) * var(--hour) / 60 + 1px);
  height: calc(var(--d) * var(--hour) / 60 - 2px);
  min-height: 24px;
  left: calc(var(--lane) * 100% / var(--lanes) + 3px);
  width: calc(100% / var(--lanes) - 6px);
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; column-gap: 6px; row-gap: 1px; align-content: start; overflow: hidden;
  padding: 4px 8px 5px; border-radius: 10px; line-height: 1.2;
  transition: transform .12s ease, box-shadow .12s ease;
}
.cal-ev:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -8px rgba(11, 11, 15, .45); z-index: 3; }
.cal-ev-time { grid-area: 1 / 1; font-size: 12px; font-weight: 800; white-space: nowrap; }
.cal-ev-title { grid-area: 2 / 1 / 3 / 3; font-size: 13px; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.cal-ev-meta { grid-area: 1 / 2; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.cal-ev-meta .icon { width: 13px; height: 13px; }
.cal-ev.is-canceled .cal-ev-title { text-decoration: line-through; }
.cal-ev.is-short { display: flex; align-items: center; gap: 8px; padding: 2px 8px; }
.cal-ev.is-short .cal-ev-title { display: block; white-space: nowrap; text-overflow: ellipsis; }
.cal-ev.is-short .cal-ev-meta { margin: 0 0 0 auto; }
.cal-ev.is-outside { box-shadow: inset 0 0 0 2px rgba(11, 11, 15, .25); }

/* Heure courante */
.cal-now { position: absolute; z-index: 4; left: 0; right: 0; top: calc(var(--now) * var(--hour) / 60); height: 0; border-top: 2px solid var(--kv-danger); pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--kv-danger); }

/* ---- Vue mois ---- */
.cal-month { padding: 0; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--kv-border); background: var(--kv-surface-2); }
.cal-dow span { padding: 9px 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--kv-text-muted); }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-week + .cal-week .cal-cell { border-top: 1px solid var(--kv-border); }
.cal-cell { position: relative; min-height: 118px; padding: 8px 6px 6px; border-left: 1px solid var(--kv-border); display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; transition: background .12s ease; }
.cal-cell:nth-child(7n+1) { border-left: 0; }
.cal-cell:hover { background: var(--kv-surface-2); }
.cal-cell.is-out { background: color-mix(in srgb, var(--kv-surface-2) 70%, var(--kv-surface)); }
.cal-cell.is-out .cal-num { color: var(--kv-text-muted); opacity: .6; }
.cal-num { align-self: flex-start; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 4px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.cal-cell.is-today .cal-num { background: var(--accent); color: var(--on-accent); }

.cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-chip { display: flex; align-items: baseline; gap: 5px; padding: 3px 7px; border-radius: 7px; font-size: 12px; line-height: 1.25; min-width: 0; overflow: hidden; white-space: nowrap; transition: transform .1s ease; }
.cal-chip:hover { transform: translateX(1px); }
.cal-chip b { font-weight: 800; flex: none; }
.cal-chip span { overflow: hidden; text-overflow: ellipsis; font-weight: 600; min-width: 0; }
.cal-chip em { font-style: normal; font-weight: 800; margin-left: auto; flex: none; }
.cal-chip.is-canceled span { text-decoration: line-through; }
.cal-more { font-size: 12px; font-weight: 700; color: var(--kv-text-muted); padding: 1px 7px; }
.cal-dots { display: none; }

/* ---- Fiches (aperçu d'une séance, création rapide) ---- */
dialog.sheet { border: 0; padding: 0; margin: auto; width: min(460px, calc(100vw - 24px)); max-height: 92dvh; overflow: auto; border-radius: 22px; background: var(--kv-surface); color: var(--kv-text); box-shadow: 0 30px 80px -20px rgba(11, 11, 15, .5); }
dialog.sheet::backdrop { background: rgba(11, 11, 15, .45); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: sheet-in .16s ease-out; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-body { position: relative; padding: 24px 22px 22px; }
.sheet-close { position: absolute; top: 14px; right: 14px; }
.sheet-title { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 32px; line-height: 1; margin: 2px 40px 14px 0; }
.sheet-meta { list-style: none; padding: 0; display: grid; gap: 10px; }
.sheet-meta li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; font-weight: 600; }
.sheet-meta .icon { color: var(--kv-text-muted); margin-top: 1px; }
.sheet-names { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-names span { padding: 4px 10px; border-radius: 999px; background: var(--kv-surface-2); border: 1px solid var(--kv-border); font-size: 13px; font-weight: 700; }
.sheet-names p { font-size: 14px; color: var(--kv-text-muted); }
.quick-end { font-size: 14px; font-weight: 700; color: var(--kv-text-muted); margin: -4px 0 0; min-height: 20px; }

/* ---- Téléphone ---- */
@media (max-width: 700px) {
  .cal { --hour: 58px; --gutter: 44px; --colmin: 116px; }
  .cal[data-view="jour"] { --colmin: 0px; }
  .cal-legend a { display: none; }
  .cal-scroll { max-height: calc(100dvh - 300px); }

  /* Mois : des repères colorés, un toucher ouvre la journée */
  .cal-cell { min-height: 62px; align-items: center; padding: 6px 2px; }
  .cal-num { align-self: center; }
  .cal-chips { display: none; }
  .cal-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 40px; }
  .cal-dots i { width: 8px; height: 8px; border-radius: 50%; border-width: 1.5px; }
  .cal-dots small { font-size: 10px; font-weight: 800; line-height: 8px; }
  .cal-dow span { text-align: center; padding: 8px 0; }

  dialog.sheet { margin: auto 0 0 0; width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; max-height: 88dvh; }
  .sheet-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* Agenda : la date entre les flèches ; vue et création dans la barre du haut */
.cal-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cal-title { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(26px, 4.4vw, 36px); line-height: 1; letter-spacing: .005em; margin: 0 6px; min-width: 0; }
.cal-today-pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 13px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 13px; box-shadow: inset 0 0 0 1px rgba(11, 11, 15, .1); white-space: nowrap; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.topbar .cal-seg a { min-height: 34px; padding: 0 12px; }

@media (max-width: 700px) {
  .topbar.has-actions .brand { flex: none; }
  .topbar.has-actions .brand-name { display: none; }
  .topbar-actions .btn-label { display: none; }
  .topbar-actions .btn { padding: 0 11px; }
  .topbar .cal-seg a { padding: 0 10px; font-size: 13px; }
  .cal-top { gap: 8px; }
  .cal-title { font-size: clamp(22px, 7vw, 28px); }
}

/* Ligne avec actions : sur petit écran, les boutons passent sous le texte plutôt que d'écraser le titre */
.row-wrap { flex-wrap: wrap; }
.row-wrap > .row-main { flex: 1 1 150px; }
.row-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
@media (max-width: 480px) {
  .row-actions { flex: 0 0 100%; padding-left: 54px; margin-left: 0; }
}

/* ---- Mini-site : choix du créneau de visio (un jour, puis une heure) ---- */
.slotpick { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 0; }
.slotpick > legend { padding: 0; margin-bottom: 10px; }
.sp { background: var(--kv-bg); border: 1px solid var(--kv-border); border-radius: 20px; padding: 16px 14px 14px; }
.has-error .sp { border-color: var(--kv-danger); }

.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 10px; }
.sp-month { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 22px; line-height: 1; }
.sp-nav { display: flex; gap: 6px; }
.sp-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--kv-surface); border: 1px solid var(--kv-border); color: var(--kv-text); cursor: pointer; }
.sp-arrow:hover:not([disabled]) { border-color: var(--kv-text); }
.sp-arrow[disabled] { opacity: .35; cursor: default; }

/* Les jours : cartes qui défilent (le doigt ou les flèches) */
.sp-days { position: relative; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px; margin: 0 -2px; scrollbar-width: none; }
.sp-days::-webkit-scrollbar { display: none; }
.sp-day { position: relative; flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 64px; padding: 10px 0 9px; border-radius: 16px; background: var(--kv-surface); border: 1px solid var(--kv-border); transition: transform .12s ease, border-color .12s ease; }
.sp-day:hover { border-color: var(--kv-text); transform: translateY(-1px); }
.sp-day small { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--kv-text-muted); }
.sp-day b { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 28px; line-height: 1.05; }
.sp-day i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--kv-text-muted); }
.sp-day.is-active { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: inset 0 0 0 1px rgba(11, 11, 15, .1), 0 8px 20px -12px rgba(11, 11, 15, .5); }
.sp-day.is-active small, .sp-day.is-active i { color: inherit; opacity: .78; }
/* Un créneau est choisi ce jour-là, même si l'on regarde un autre jour */
.sp-day.has-choice::after { content: ""; position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-text); box-shadow: 0 0 0 2px var(--kv-surface); }
.sp-day.is-active.has-choice::after { background: var(--on-accent); box-shadow: none; }

/* Les heures du jour choisi : pastilles */
.sp-panel { padding-top: 4px; }
.sp-panel-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; font-weight: 800; font-size: 15px; margin: 0 2px 12px; }
.sp-panel-title span { font-size: 12px; font-weight: 600; color: var(--kv-text-muted); }
.sp-part { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--kv-text-muted); margin: 14px 2px 8px; }
.sp-part:first-of-type { margin-top: 0; }
.sp-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.sp-time { position: relative; }
.sp-time input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sp-time span { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 14px; background: var(--kv-surface); border: 1px solid var(--kv-border); font-weight: 800; font-size: 15px; transition: transform .1s ease, border-color .12s ease; }
.sp-time:hover span { border-color: var(--kv-text); }
.sp-time input:checked + span { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: inset 0 0 0 1px rgba(11, 11, 15, .12); }
.sp-time input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* Récapitulatif du choix */
.sp-chosen { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 20%, var(--kv-surface)); border: 1px solid color-mix(in srgb, var(--accent) 65%, rgba(11, 11, 15, .15)); }
.sp-chosen > .icon { flex: none; width: 26px; height: 26px; padding: 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent); }
.sp-chosen span { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.sp-chosen small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--kv-text-muted); }
.sp-chosen b { font-size: 15px; }
.sp-clear { flex: none; background: none; border: 0; padding: 4px 2px; font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; color: var(--kv-text); cursor: pointer; }

@media (max-width: 480px) {
  .sp { padding: 14px 10px 12px; }
  .sp-times { grid-template-columns: repeat(3, 1fr); }
  .sp-arrow { display: none; }
}


/* Le bandeau des jours défile dans sa carte : il ne doit jamais élargir la page */
.site-form { grid-template-columns: minmax(0, 1fr); }
.slotpick, .sp, .sp-days, .sp-panels { min-width: 0; max-width: 100%; }

/* ---- Forfaits et paiements ---- */
.pay-form { display: flex; align-items: center; gap: 6px; }
.pay-form .select { width: auto; min-height: 36px; padding: 0 34px 0 12px; font-size: 13px; border-radius: 11px; background-position: calc(100% - 17px) 50%, calc(100% - 11px) 50%; }
.pay-form .input { width: 110px; min-height: 36px; padding: 0 10px; font-size: 13px; border-radius: 11px; }
@media (max-width: 480px) {
  .row-actions { flex-wrap: wrap; }
}

.balance { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 4px 16px 14px; }
.balance b { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 44px; line-height: 1; background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 90%, transparent 90%); padding-right: 6px; }
.balance span { color: var(--kv-text-muted); font-size: 14px; }
.pack { display: grid; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--kv-border); }
.pack.is-over { opacity: .62; }
.pack-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pack-name { font-weight: 800; }
.pack-meta { font-size: 13px; color: var(--kv-text-muted); }
.pack-meter { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--kv-text) 9%, var(--kv-surface)); overflow: hidden; }
.pack-meter > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.pack-log { font-size: 12.5px; color: var(--kv-text-muted); white-space: pre-line; border-left: 3px solid var(--kv-border); padding-left: 10px; }
.pack-due { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--kv-warning) 11%, var(--kv-surface)); border: 1px solid color-mix(in srgb, var(--kv-warning) 35%, transparent); font-size: 14px; }

details.fold > summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 13px; color: var(--kv-text); display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { margin-bottom: 8px; }
details.fold .form { padding: 14px; border: 1px solid var(--kv-border); border-radius: 14px; background: var(--kv-bg); }
.pack-sell { padding: 14px 16px 16px; border-top: 1px solid var(--kv-border); }

/* Carte « Mon forfait » côté client */
.mypack { display: grid; gap: 12px; }
.mypack-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mypack-top b { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 48px; line-height: 1; background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 90%, transparent 90%); padding-right: 6px; }
.mypack-alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, var(--kv-warning) 11%, var(--kv-surface)); border: 1px solid color-mix(in srgb, var(--kv-warning) 35%, transparent); }
.mypack-alert .icon { flex: none; color: var(--kv-warning); margin-top: 1px; }
.pay-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--kv-text-muted); }
.pay-chip.is-due { color: var(--kv-warning); }
.pay-chip.is-pack { color: var(--kv-success); }

/* ---- Achat en ligne : cartes de forfait ---- */
.packcard-price { font-family: var(--kv-font-display); font-style: italic; font-weight: 800; font-size: 30px; line-height: 1; white-space: nowrap; }
.packcard .pack-head { align-items: center; }
