/* Permanence de soins : feuille de style commune (patients + espace admin) */

@font-face { font-family: 'Poppins'; src: url('../fonts/poppins-400.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fonts/poppins-500.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fonts/poppins-700.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --blue: #1f5fd6;
  --blue-700: #143e94;
  --blue-300: #84a7e8;
  --blue-100: #dce7fb;
  --blue-50: #edf3fd;
  --ink: #0e1b3d;
  --muted: #4f5f85;
  --line: #dbe4f4;
  --bg: #f3f7fe;
  --card: #ffffff;
  --danger: #c21d22;
  --danger-50: #fdecec;
  --ok: #0d7246;
  --ok-50: #e6f5ee;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 28px rgba(14, 27, 61, .08);
  --shadow-sm: 0 3px 10px rgba(14, 27, 61, .06);
  --grad: linear-gradient(160deg, #2e6be0 0%, #1f5fd6 45%, #143e94 100%);
  --grad-btn: linear-gradient(120deg, #2f6fe2, #1b4fb4);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--blue); }
a:hover { color: var(--blue-700); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; color: #fff; }

.demo-banner {
  margin: 0; padding: 10px 16px; text-align: center; font-size: 14px; font-weight: 500;
  background: #fff4d6; color: #5c4300; border-bottom: 1px solid #f0dc9e;
}
.demo-banner a { color: inherit; font-weight: 700; white-space: nowrap; }

/* ------------------------------------------------------------------ logo */
.badge-logo {
  width: 104px; height: 104px; margin: 0 auto; border-radius: 50%; padding: 6px;
  background: linear-gradient(145deg, #9dbcf0, #1f5fd6 45%, #123a8a);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 16px 34px rgba(6, 20, 60, .35);
}
.badge-disc {
  width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff 0%, #f4f7fd 55%, #dfe7f6 100%);
  box-shadow: inset 0 3px 8px rgba(14, 27, 61, .18), inset 0 -2px 4px rgba(255, 255, 255, .9);
  display: flex; align-items: center; justify-content: center;
}
.badge-disc img { height: 74%; width: auto; filter: drop-shadow(2px 4px 3px rgba(14, 27, 61, .30)); }
.badge-logo.is-small { width: 76px; height: 76px; padding: 5px; }

/* ------------------------------------------------------------------ en-tête patients */
.hero {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background: var(--grad); border-radius: 0 0 36px 36px;
  padding: calc(26px + env(safe-area-inset-top)) 20px 46px;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .13); pointer-events: none;
}
.hero::before { width: 420px; height: 420px; top: -250px; right: -170px; }
.hero::after { width: 300px; height: 300px; bottom: -190px; left: -140px; }
.hero-inner { position: relative; max-width: 560px; margin: 0 auto; }
.hero-name { margin-top: 14px; font-size: 25px; font-weight: 700; letter-spacing: .01em; line-height: 1.2; }
.hero-title { font-size: 15px; font-weight: 500; }
.hero-h1 {
  display: inline-block; margin: 14px 0 8px; padding: 7px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .17); font-size: 19px; font-weight: 700; line-height: 1.3;
}
.hero-hours { font-size: 15px; font-weight: 500; }

/* ------------------------------------------------------------------ mise en page */
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 28px; outline: none; }
.page-patient .wrap { position: relative; }
.page-patient .wrap.lift { margin-top: -26px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card, .card + div, div + .card, .step + .card { margin-top: 16px; }
.small { font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.status-msg { margin: 22px 4px 0; color: var(--muted); font-weight: 500; }

/* ------------------------------------------------------------------ infos pratiques */
.info-card { display: grid; gap: 14px; }
.info-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.info-icon {
  width: 40px; height: 40px; border-radius: 12px; background: var(--blue-50); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.info-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.info-text { font-size: 16px; padding-top: 8px; }
.info-phone { font-weight: 700; text-decoration: none; font-size: 18px; display: inline-block; padding-top: 6px; }
.info-link { display: inline-block; margin-top: 2px; font-size: 15px; font-weight: 500; }

/* ------------------------------------------------------------------ étapes */
.step { margin-top: 24px; }
.step-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; line-height: 1.25; margin: 0 2px 12px; }
.step-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff;
  font-size: 15px; display: inline-flex; align-items: center; justify-content: center;
}
.step-sub { margin: -4px 2px 12px; font-weight: 500; color: var(--muted); }

/* Jours */
.day-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -16px; padding-left: 18px; padding-right: 18px;
  scroll-snap-type: x proximity; scrollbar-width: thin;
}
.day-chip {
  flex: none; width: 82px; min-height: 104px; border: 2px solid transparent; border-radius: 18px; background: var(--card);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  padding: 10px 4px; cursor: pointer; scroll-snap-align: start; color: var(--ink);
}
.day-chip .day-wd { font-size: 14px; font-weight: 500; text-transform: capitalize; color: var(--muted); }
.day-chip .day-num { font-size: 26px; font-weight: 700; line-height: 1.15; }
.day-chip .day-mo { font-size: 14px; font-weight: 500; color: var(--muted); }
.day-chip .day-free { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--ok); }
.day-chip:hover:not(:disabled) { border-color: var(--blue-300); }
.day-chip.is-selected { background: var(--grad-btn); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(31, 95, 214, .35); }
.day-chip.is-selected .day-wd, .day-chip.is-selected .day-mo, .day-chip.is-selected .day-free { color: #fff; }
.day-chip:disabled { cursor: not-allowed; background: #eef2f9; box-shadow: none; color: #5d6a86; }
.day-chip:disabled .day-free { color: #5d6a86; }

/* Créneaux */
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.slot {
  min-height: 58px; border-radius: var(--radius-sm); border: 2px solid var(--blue-100); background: var(--card);
  font-size: 19px; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.1; box-shadow: var(--shadow-sm);
}
.slot:hover:not(:disabled) { border-color: var(--blue); }
.slot.is-selected { background: var(--grad-btn); border-color: transparent; color: #fff; }
.slot.is-taken { cursor: not-allowed; background: #eef2f9; border-color: #dbe2ef; color: #8691a8; box-shadow: none; }
.slot.is-taken span { text-decoration: line-through; text-decoration-thickness: 2px; }
.slot.is-current { cursor: default; background: var(--blue-50); border-style: dashed; border-color: var(--blue-300); color: var(--blue-700); box-shadow: none; }
.slot small { font-size: 12px; font-weight: 500; margin-top: 2px; }

/* ------------------------------------------------------------------ formulaires */
.form-card { display: grid; gap: 16px; }
.recap {
  padding: 12px 14px; border-radius: var(--radius-sm); background: var(--blue-50); color: var(--blue-700);
  font-weight: 700; text-align: center;
}
.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: 15px; font-weight: 700; }
.field .hint { font-size: 14px; color: var(--muted); }
input[type=text], input:not([type]), input[type=tel], input[type=email], input[type=password], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: 54px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: #fbfcff;
  padding: 12px 14px; font-size: 18px; color: var(--ink); appearance: none; -webkit-appearance: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; font-size: 16px; }
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 95, 214, .15); background: #fff; }
input[aria-invalid=true] { border-color: var(--danger); }
input::placeholder, textarea::placeholder { color: #75819f; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: 15px; }
.check input { width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--blue); }
.check input[aria-invalid=true] { outline: 2px solid var(--danger); outline-offset: 2px; }
.form-error {
  padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-50); color: var(--danger);
  font-weight: 500; font-size: 15px;
}
.step .form-error { margin-bottom: 12px; }

/* ------------------------------------------------------------------ boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 22px;
  border-radius: 999px; border: 2px solid transparent; font-size: 17px; font-weight: 700; text-decoration: none;
  cursor: pointer; text-align: center; line-height: 1.2;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: 0 10px 22px rgba(31, 95, 214, .30); }
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-ghost { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue-50); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.06); }
.btn-link { background: none; color: var(--blue); text-decoration: underline; min-height: 48px; font-weight: 500; }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn:disabled { opacity: .6; cursor: progress; }
.actions { display: grid; gap: 10px; margin-top: 18px; }

/* ------------------------------------------------------------------ confirmation / annulation */
.done-card, .cancel-card { margin-top: 24px; text-align: center; outline: none; }
.done-icon {
  width: 72px; height: 72px; margin: 4px auto 12px; border-radius: 50%; background: var(--ok-50); color: var(--ok);
  display: flex; align-items: center; justify-content: center;
}
.done-icon svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done-card h2, .cancel-card h2 { font-size: 23px; font-weight: 700; }
.done-when { margin-top: 10px; font-size: 21px; font-weight: 700; color: var(--blue-700); }
.done-where { margin-top: 6px; color: var(--muted); }
.done-bring { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--blue-50); font-size: 15px; text-align: left; }
.keep-box { margin-top: 18px; padding: 14px; border-radius: var(--radius-sm); border: 2px dashed var(--blue-100); text-align: left; font-size: 15px; display: grid; gap: 10px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.copy-row input { min-height: 44px; font-size: 14px; padding: 8px 12px; }
.cancel-card p { margin-top: 10px; }

/* ------------------------------------------------------------------ données personnelles */
.privacy { margin-top: 28px; box-shadow: none; border: 2px solid var(--line); font-size: 15px; }
.privacy h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.privacy p + p { margin-top: 8px; }

.error-card, .empty-card { margin-top: 22px; display: grid; gap: 12px; justify-items: start; }
.foot { padding: 10px 16px calc(28px + env(safe-area-inset-bottom)); text-align: center; font-size: 14px; color: var(--muted); }

/* ================================================================== espace praticien */
.page-admin { font-size: 16px; }
.login {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; background: var(--grad);
}
.login-card { width: 100%; max-width: 420px; text-align: center; padding: 26px 22px; }
.login-card h1 { margin-top: 14px; font-size: 24px; font-weight: 700; }
.login-card form { display: grid; gap: 14px; margin-top: 18px; text-align: left; }

.admin-top { background: var(--grad); color: #fff; padding: calc(14px + env(safe-area-inset-top)) 16px 46px; border-radius: 0 0 26px 26px; }
.admin-top-inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.badge-mini {
  flex: none; width: 46px; height: 46px; border-radius: 50%; padding: 3px; background: rgba(255, 255, 255, .85);
  box-shadow: 0 6px 14px rgba(6, 20, 60, .3);
}
.badge-mini span { display: flex; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #fff, #e3eaf7); align-items: center; justify-content: center; }
.badge-mini img { height: 32px; width: auto; }
.admin-kicker { font-size: 13px; font-weight: 500; opacity: .95; }
.admin-title { font-size: 19px; font-weight: 700; line-height: 1.2; }
.icon-btn {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; background: rgba(255, 255, 255, .18); color: #fff;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.light { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.tabs-wrap { position: relative; z-index: 2; margin-top: -30px; padding: 0 16px; }
.tabs {
  max-width: 728px; margin: 0 auto; display: flex; gap: 2px;
  background: #fff; border-radius: 999px; padding: 5px; box-shadow: var(--shadow);
}
.tabs button {
  flex: 1 1 auto; min-height: 46px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--ink);
  font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer;
}
.tabs button:hover { background: var(--blue-50); }
.tabs button[aria-selected=true] { background: var(--grad-btn); color: #fff; }
.page-admin .wrap { max-width: 760px; padding-top: 22px; }
.page-admin .card + .card { margin-top: 16px; }
.section-title { font-size: 18px; font-weight: 700; margin: 26px 2px 10px; }

.day-nav { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 10px; }
.day-nav-center { text-align: center; }
.day-label { font-size: 20px; font-weight: 700; line-height: 1.25; }
.chip-btn { margin-top: 4px; border: 0; background: var(--blue-50); color: var(--blue-700); font-weight: 700; font-size: 13px; border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 32px; }
.day-summary { margin: 14px 2px 10px; color: var(--muted); font-weight: 500; }
.day-summary.is-closed { color: var(--danger); }

.slot-list, .upcoming, .closure-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.slot-row {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; background: var(--card);
  border-radius: 18px; box-shadow: var(--shadow-sm); padding: 12px 12px 12px 14px; min-height: 64px;
}
.slot-row .slot-time { font-size: 18px; font-weight: 700; }
.slot-row .who { font-weight: 700; line-height: 1.3; word-break: break-word; }
.slot-row .meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.slot-row .meta a { font-weight: 700; text-decoration: none; }
.slot-row.is-free { background: transparent; box-shadow: none; border: 2px dashed var(--line); }
.slot-row.is-free .who { color: var(--muted); font-weight: 500; }
.slot-row.is-past { opacity: .7; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--blue-50); color: var(--blue-700); }
.tag.phone { background: #f1ecfb; color: #4b2a8c; }
.btn-row { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--blue); background: #fff; color: var(--blue); font-weight: 700; font-size: 14px; cursor: pointer; }
.btn-row.danger { border-color: #f0b8ba; color: var(--danger); }
.btn-row.danger.is-armed { background: var(--danger); border-color: var(--danger); color: #fff; }

.upcoming button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px;
  border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); padding: 10px 16px; cursor: pointer; text-align: left;
}
.upcoming .up-day { font-weight: 700; }
.upcoming .up-count { font-size: 14px; font-weight: 700; color: var(--blue-700); background: var(--blue-50); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.upcoming .up-count.is-closed { color: var(--danger); background: var(--danger-50); }

.link-card h2, .settings-card h2, .closure-card h2 { font-size: 18px; font-weight: 700; }
.link-card p { margin-top: 6px; font-size: 15px; color: var(--muted); }
.link-card .copy-row { margin-top: 12px; }
.link-card a.open-link { display: inline-block; margin-top: 12px; font-weight: 500; }

.closure-card, .settings-card { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row2 > * { min-width: 0; }
input[type=date], input[type=time] { min-width: 0; display: block; font-size: 16px; padding: 12px 10px; }
.closure-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--card);
  border-radius: 16px; box-shadow: var(--shadow-sm); padding: 12px 12px 12px 16px;
}
.closure-list .c-dates { font-weight: 700; }
.closure-list .c-label { font-size: 14px; color: var(--muted); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 15px; font-weight: 700; margin-bottom: 8px; padding: 0; }
.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekdays label { position: relative; }
.weekdays input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.weekdays span {
  display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; border: 2px solid var(--line);
  background: #fbfcff; font-weight: 700; cursor: pointer; user-select: none;
}
.weekdays input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.weekdays input:focus-visible + span { outline: 3px solid var(--blue-300); outline-offset: 2px; }
.preview { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--blue-50); color: var(--blue-700); font-size: 15px; font-weight: 500; }
.preview.is-error { background: var(--danger-50); color: var(--danger); }
.subhead { font-size: 18px; font-weight: 700; margin-top: 8px; }
.subhead-first { margin-top: 0; }
.small-gap { margin-top: 6px; }
.closure-list li.list-empty { box-shadow: none; background: none; padding: 0 4px; }

dialog {
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto;
  width: min(460px, calc(100vw - 24px)); border: 0; border-radius: var(--radius); padding: 22px; box-shadow: 0 24px 60px rgba(6, 20, 60, .35);
  color: var(--ink);
}
dialog::backdrop { background: rgba(14, 27, 61, .45); }
dialog h2 { font-size: 21px; font-weight: 700; }
dialog .dlg-when { margin-top: 4px; color: var(--blue-700); font-weight: 700; }
dialog form { display: grid; gap: 14px; margin-top: 14px; }
dialog .dlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  max-width: calc(100vw - 32px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px;
  font-size: 15px; font-weight: 500; box-shadow: 0 12px 30px rgba(6, 20, 60, .35);
}

/* ================================================================== ajouts : soins, planning, fiche */
.care-select { margin-top: 2px; }
.flow-alert { margin-top: 22px; }
.done-care {
  display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: var(--blue-50);
  color: var(--blue-700); font-weight: 700; font-size: 15px;
}
.step-title label { cursor: pointer; }

/* Semaine / Jour */
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-width: 320px; margin: 0 auto 18px; padding: 4px;
  background: var(--blue-50); border-radius: 999px;
}
.seg button {
  min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--blue-700);
  font-weight: 700; font-size: 15px; cursor: pointer;
}
.seg button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* Vue semaine : une colonne par jour, une ligne par horaire */
.planning-wrap { position: relative; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 10px; -webkit-overflow-scrolling: touch; }
.planning {
  display: grid; grid-template-columns: 44px repeat(var(--cols, 7), minmax(78px, 1fr));
  grid-auto-rows: minmax(36px, auto); gap: 3px;
}
.planning.is-empty { display: block; padding: 18px; text-align: center; color: var(--muted); background: var(--card); border-radius: 16px; }
.pl-head {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 54px;
  border: 0; border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm);
  cursor: pointer; padding: 4px 2px; line-height: 1.15;
}
.pl-head .pl-wd { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: capitalize; }
.pl-head .pl-num { font-size: 18px; font-weight: 700; }
.pl-head .pl-flag { font-size: 10px; font-weight: 700; color: var(--danger); }
.pl-head.is-today { background: var(--grad-btn); color: #fff; }
.pl-head.is-today .pl-wd { color: #fff; }
.pl-head.is-closed { background: #fbf0f0; }
.pl-time {
  position: sticky; left: 0; z-index: 1; display: flex; justify-content: flex-end; align-items: flex-start;
  padding: 3px 6px 0 0; background: var(--bg); font-size: 11.5px; font-weight: 500; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pl-cell { min-width: 0; border-radius: 8px; }
.pl-cell.is-free { border: 1px dashed #cfdaee; background: #fbfcff; cursor: pointer; padding: 0; }
.pl-cell.is-free:hover, .pl-cell.is-free:focus-visible { border-color: var(--blue); background: var(--blue-50); }
.pl-cell.is-past { background: repeating-linear-gradient(135deg, #eef2f9 0 6px, #f6f8fc 6px 12px); }
.pl-cell.is-closed { background: repeating-linear-gradient(135deg, #f8e7e8 0 6px, #fcf3f3 6px 12px); }
.pl-booking {
  display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; overflow: hidden; text-align: left;
  border: 0; border-left: 4px solid var(--blue); background: var(--blue-100); color: var(--blue-700);
  padding: 3px 5px; cursor: pointer;
}
.pl-booking.is-phone { border-left-color: #6b46c1; background: #ece4fa; color: #4b2a8c; }
.pl-booking.is-past { opacity: .6; }
.pl-booking:hover { filter: brightness(.97); }
.pl-name, .pl-care { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.pl-name { font-size: 12px; font-weight: 700; }
.pl-care { font-size: 11px; font-weight: 500; }
.pl-booking:not(.is-long) .pl-care { display: none; }
.planning-hint { margin: 10px 2px 0; }

/* Vue jour */
.slot-row .slot-time { font-variant-numeric: tabular-nums; line-height: 1.15; }
.slot-row .slot-time small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.slot-row .care { font-size: 14px; font-weight: 500; color: var(--blue-700); margin-top: 1px; }

/* Fiche d'un rendez-vous */
.sheet-head { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px solid var(--line); }
.sheet-when { font-size: 14px; font-weight: 700; color: var(--blue-700); }
.sheet-head h2 { margin-top: 2px; word-break: break-word; }
.sheet-care { margin-top: 2px; font-weight: 500; }
.sheet-meta { margin-top: 6px; font-size: 15px; color: var(--muted); }
.sheet-meta a { font-weight: 700; text-decoration: none; }
.sheet-pane { display: grid; gap: 10px; }
.sheet-sub { font-size: 17px; font-weight: 700; }
.sheet-day { font-weight: 500; color: var(--muted); font-size: 15px; }
.sheet-question { font-size: 16px; }
.sheet-done {
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ok-50); color: var(--ok); font-weight: 700; font-size: 15px;
}
.btn-ghost-danger { background: #fff; color: var(--danger); border-color: #f0b8ba; }
.btn-ghost-danger:hover { background: var(--danger-50); }
.move-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.move-day {
  flex: none; width: 62px; min-height: 74px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
  scroll-snap-align: start; padding: 4px 2px; line-height: 1.15;
}
.move-day .day-wd, .move-day .day-mo { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: capitalize; }
.move-day .day-num { font-size: 20px; font-weight: 700; }
.move-day.is-selected { background: var(--grad-btn); border-color: transparent; color: #fff; }
.move-day.is-selected .day-wd, .move-day.is-selected .day-mo { color: #fff; }
.move-slots .slot { min-height: 50px; font-size: 17px; }
.notify-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.notify-actions #notify-sms { grid-column: 1 / -1; }
.notify-actions .btn { min-height: 50px; padding: 0 12px; font-size: 16px; }
.field .hint.is-ok { color: var(--ok); font-weight: 500; }

/* Soins */
.care-card { display: grid; gap: 14px; }
.care-card h2 { font-size: 18px; font-weight: 700; }
.care-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.care-list li { display: grid; grid-template-columns: minmax(0, 1fr) 112px auto; gap: 8px; align-items: center; }
.care-list input, .care-list select { min-height: 48px; font-size: 16px; padding: 8px 12px; }
.care-list select { padding-right: 34px; background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; }
.care-list li.list-empty { display: block; }
.care-add-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; }
.care-add-row > * { min-width: 0; }

/* E-mails */
.email-card { display: grid; gap: 14px; }
.email-card h2 { font-size: 18px; font-weight: 700; }
.howto { border-radius: var(--radius-sm); background: var(--blue-50); padding: 10px 14px; font-size: 15px; }
.howto summary { cursor: pointer; font-weight: 700; color: var(--blue-700); }
.howto ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.email-card .actions { margin-top: 0; }

@media (max-width: 400px) {
  .tabs button { padding: 0 5px; font-size: 13px; }
  .care-list li { grid-template-columns: minmax(0, 1fr) 96px; }
  .care-list li .btn-row { grid-column: 1 / -1; justify-self: end; }
}

@media (min-width: 640px) {
  .hero { padding-top: 36px; }
  .slot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
#rdv-notify-pane textarea { min-height: 170px; }
.care-note { margin-top: 12px; }
