/*
 * Design tokens pulled from quiterie-scherrer.com's stylesheet (FSD §4.1):
 * Red Hat Display for headings, Roboto for body text, and its warm
 * cream/pink/coral palette with teal/navy accents.
 */

/* Self-hosted (2026-08-02, GDPR audit #3) — previously loaded from
   fonts.googleapis.com/fonts.gstatic.com on every page view, sending
   every visitor's IP to Google with no disclosure. Same families/
   weights as before, just served first-party now. */
@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/red-hat-display-500.41c9fb5ac13f.woff2") format("woff2");
}
@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/red-hat-display-700.530924bfbe0a.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/roboto-400.e0c3e645eaec.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/roboto-500.ad19ae535df0.woff2") format("woff2");
}

:root {
  --color-bg: #ffffff;
  --color-text: #212934;
  --color-cream: #faf1e9;
  --color-pink: #f9d3d7;
  --color-coral: #f2a9a1;
  --color-coral-strong: #f16b56;
  --color-teal: #9ab2ba;
  --color-teal-deep: #2f6679;
  --color-navy: #09263f;

  --font-heading: "Red Hat Display", Arial, Helvetica, sans-serif;
  --font-body: Roboto, Arial, Helvetica, sans-serif;

  /* Dashboard-only additions (bookings/dashboard.html) */
  --color-ink-soft: #5b6472;
  --color-border: #e7dcd2;
  --color-status-paid-bg: #e1edef;
  --color-status-paid-fg: #1f4f5e;
  --color-status-pending-bg: #fde7e1;
  --color-status-pending-fg: #b8391f;
  --color-status-cancelled-bg: #ece9e4;
  --color-status-cancelled-fg: #726f66;
  --shadow-card: 0 1px 2px rgba(9, 38, 63, 0.06), 0 10px 28px -14px rgba(9, 38, 63, 0.22);
  --shadow-pop: 0 4px 10px rgba(9, 38, 63, 0.1), 0 18px 40px -16px rgba(9, 38, 63, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 0.5em;
}

a {
  color: var(--color-teal-deep);
}

a:hover {
  color: var(--color-coral-strong);
}

.site-header {
  background: var(--color-cream);
  padding: 1.5rem 1rem;
  text-align: center;
}

.site-header__banner img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
}

.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.site-main--wide {
  max-width: 1100px;
}

.site-footer {
  background: var(--color-navy);
  color: var(--color-bg);
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.button {
  display: inline-block;
  background: var(--color-coral-strong);
  color: var(--color-bg);
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--color-coral);
  color: var(--color-navy);
}

.card {
  background: var(--color-pink);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.intro-text {
  margin-bottom: 2rem;
}

.intro-text p {
  margin: 0 0 1em;
}

/* Landing page (home.html) */
.home-actions {
  margin: 1.75rem 0;
}
.home-actions .settings-card h3 { color: var(--color-navy); }
.home-more {
  color: var(--color-ink-soft);
  font-size: 0.92rem;
}

/* Form sections (booking form) — grouped, numbered steps instead of a
   flat list of fields, replacing the n8n-inherited layout. */
.form-section {
  margin-bottom: 2.5rem;
}

.form-section__title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.form-section__step {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-coral-strong);
  font-size: 1rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-teal);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-bg);
  color: var(--color-text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-coral-strong);
  box-shadow: 0 0 0 2px rgba(241, 107, 86, 0.2);
}

.field-error {
  color: var(--color-coral-strong);
  font-size: 0.9rem;
  margin: 0.3rem 0 0;
}

.field-hint {
  color: var(--color-ink-soft, #5b6472);
  font-size: 0.85rem;
  margin: 0.75rem 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.newsletter-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.newsletter-cta input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-teal);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-bg);
  color: var(--color-text);
}

.newsletter-cta input[type="email"]:focus {
  outline: none;
  border-color: var(--color-coral-strong);
  box-shadow: 0 0 0 2px rgba(241, 107, 86, 0.2);
}

.field-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field-check label {
  margin-bottom: 0;
  font-weight: 400;
}

/* Formula selector — clickable cards instead of a plain <select>
   disconnected from the informational list above it. */
.formula-options {
  display: grid;
  gap: 1rem;
}

.formula-option {
  display: block;
  cursor: pointer;
  position: relative;
}

.formula-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.formula-option__card {
  background: var(--color-pink);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  border: 2px solid transparent;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.formula-option input:checked ~ .formula-option__card {
  border-color: var(--color-coral-strong);
  background: var(--color-cream);
}

.formula-option input:focus-visible ~ .formula-option__card {
  outline: 2px solid var(--color-teal-deep);
  outline-offset: 2px;
}

.formula-option__card h3 {
  margin-bottom: 0.25rem;
}

.formula-option__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.formula-option__head h3 {
  margin-bottom: 0;
}

/* Small icon (2026-07-31, synced from Notion's "image couleur" — see
   bookings.notion_sync) — an accent next to the formula name, not a
   full-tile photo. */
.formula-option__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}

.formula-option__price {
  font-weight: 700;
  color: var(--color-coral-strong);
}

/* Session list — same "checkable card row" language as formulas, so the
   two selection steps read as one system rather than two different
   widgets bolted together. */
.session-list {
  display: grid;
  gap: 0.5rem;
}

.session-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--color-cream);
  border-radius: 6px;
  padding: 0.65rem 1rem;
}

.session-option--full {
  opacity: 0.55;
}

.session-option__remaining {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--color-teal-deep);
  white-space: nowrap;
}

.session-option__topic {
  display: block;
  font-size: 0.85rem;
  color: var(--color-ink-light, #6b6b6b);
}

/* ==================================================================
   Dashboard (bookings/dashboard.html) — "Le mur des ateliers"
   ================================================================== */

.dash-search {
  position: relative;
  max-width: 480px;
  margin-bottom: 1.5rem;
}
.dash-search input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-bg);
  color: var(--color-text);
}
.dash-search input:focus {
  outline: none;
  border-color: var(--color-coral-strong);
  box-shadow: 0 0 0 2px rgba(241, 107, 86, 0.18);
}
.dash-search__results {
  top: calc(100% + 0.4rem);
  left: 0;
  width: 100%;
}

.dash-frame {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

/* Two rows instead of one — actions (new subscription/session, settings,
   logout) sit above the filters, not squeezed into the same row. Only
   dashboard.html uses this; settings_list.html's single-row brand+actions
   .dash-toolbar is untouched. */
.dash-toolbar--stacked {
  flex-direction: column;
  align-items: stretch;
}

.dash-toolbar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dash-toolbar__filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dash-toolbar__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.entity-filter {
  display: inline-flex;
  gap: 0.15rem;
  background: var(--color-bg);
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
}

.entity-filter button {
  border: none;
  background: transparent;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: var(--font-body);
  color: var(--color-ink-soft);
  cursor: pointer;
  white-space: nowrap;
}

.entity-filter button.active {
  background: var(--color-cream);
  color: var(--color-navy);
  font-weight: 500;
  box-shadow: var(--shadow-card);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-primary { background: var(--color-coral-strong); color: #fff; }
.btn-primary:hover { background: var(--color-coral); color: var(--color-navy); }

.btn-secondary { background: var(--color-bg); color: var(--color-navy); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-cream); }

.btn-ghost { background: transparent; color: var(--color-ink-soft); padding: 0.6rem; }
.btn-ghost:hover { color: var(--color-navy); background: var(--color-cream); }

.dash-body { position: relative; display: flex; align-items: flex-start; }

.dash-wall {
  flex: 1;
  min-width: 0;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.dash-tile {
  position: relative;
  display: block;
  text-align: left;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dash-tile:hover { box-shadow: var(--shadow-card); }
.dash-tile.active { border-color: var(--color-coral-strong); box-shadow: var(--shadow-card); }
.dash-tile:focus-visible { outline: 2px solid var(--color-teal-deep); outline-offset: 2px; }

/* Past sessions (dashboard_views._session_payload's is_past) — visibly
   muted, read-only: dashboard.js skips rendering their add/remove/move
   controls and drop-zone entirely, this just signals it at a glance. */
.dash-tile--past { opacity: 0.65; }
.dash-tile--past.active { border-color: var(--color-ink-soft); opacity: 0.85; }
.dash-tile__past-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-ink-soft);
  background: var(--color-status-cancelled-bg);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.4rem;
}

.dash-tile__mail {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--color-cream);
  color: var(--color-ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dash-tile__mail:hover { background: var(--color-pink); color: var(--color-navy); }
.dash-tile__mail svg { width: 14px; height: 14px; }
.dash-tile__date { font-family: var(--font-heading); font-weight: 700; color: var(--color-navy); font-size: 1.05rem; }
.dash-tile__time { color: var(--color-ink-soft); font-size: 0.85rem; margin-top: 0.15rem; }
.dash-tile__topic { margin-top: 0.5rem; font-size: 0.92rem; }
.dash-tile__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.6rem; }
.dash-tile__count { font-size: 0.78rem; color: var(--color-ink-soft); font-variant-numeric: tabular-nums; }
.dash-tile__avatars { display: flex; margin-left: -4px; }
.dash-tile__avatars .avatar { margin-left: -8px; width: 24px; height: 24px; font-size: 0.62rem; }

.dash-empty { grid-column: 1 / -1; color: var(--color-ink-soft); font-size: 0.9rem; }

.fill-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
  margin-top: 0.55rem;
}
.fill-bar__inner { height: 100%; border-radius: 999px; background: var(--color-teal-deep); transition: width 0.2s ease; }
.fill-bar__inner.full { background: var(--color-coral-strong); }

.revenue-line { font-size: 0.78rem; color: var(--color-ink-soft); margin-top: 0.3rem; }
.revenue-line strong { color: var(--color-navy); font-weight: 500; }

.entity-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-ink-soft);
  margin-bottom: 0.3rem;
}
.entity-tag .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--color-teal-deep); }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.72rem;
  color: #fff;
  flex: none;
  box-shadow: 0 0 0 2px var(--color-bg);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.3;
}
.chip svg { width: 11px; height: 11px; }
.chip-paid { background: var(--color-status-paid-bg); color: var(--color-status-paid-fg); }
.chip-pending { background: var(--color-status-pending-bg); color: var(--color-status-pending-fg); }
.chip-cancelled,
.chip-expired,
.chip-refunded { background: var(--color-status-cancelled-bg); color: var(--color-status-cancelled-fg); }
.chip-gift { background: var(--color-coral); color: var(--color-coral-strong); }

.formula-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--color-ink-soft);
  white-space: nowrap;
}
.formula-tag .swatch { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.attendee {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  cursor: grab;
  transition: box-shadow 0.15s ease, opacity 0.15s ease;
}
.attendee:active { cursor: grabbing; }
.attendee.dragging { opacity: 0.4; }
.attendee:hover { box-shadow: var(--shadow-card); }
.attendee__body { flex: 1; min-width: 0; }
.attendee__name {
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  text-align: left;
  display: block;
}
.attendee__name:hover { color: var(--color-coral-strong); text-decoration: underline; }
.attendee__meta { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.2rem; flex-wrap: wrap; }
.attendee__actions { position: relative; display: flex; align-items: center; gap: 0.1rem; flex: none; }

.attendee__icon-btn {
  background: none;
  border: none;
  color: var(--color-ink-soft);
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.attendee__icon-btn:hover { background: var(--color-status-pending-bg); color: var(--color-status-pending-fg); }
.attendee__icon-btn svg { width: 13px; height: 13px; }

.drop-target {
  outline: 2px dashed transparent;
  outline-offset: 3px;
  border-radius: 10px;
  transition: outline-color 0.12s ease, background-color 0.12s ease;
}
.drop-target.drop-hover { outline-color: var(--color-coral-strong); background: var(--color-pink); }

.pop {
  position: absolute;
  z-index: 40;
  width: 280px;
  max-width: calc(100vw - 2.2rem);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  padding: 0.7rem;
  display: none;
}
.pop.open { display: block; }
/* .attendee__actions sits flush against the right edge of the attendee
   row, so a popover growing rightward from its static position runs off
   the viewport on narrow screens — anchor it to grow leftward instead. */
.attendee__actions .pop { left: auto; right: 0; }
.pop input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  background: var(--color-bg);
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.pop input[type="text"]:focus {
  outline: none;
  border-color: var(--color-coral-strong);
  box-shadow: 0 0 0 2px rgba(241, 107, 86, 0.18);
}
.pop__list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.2rem; }
.pop__row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 0.45rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--color-text);
}
.pop__row:hover { background: var(--color-cream); }
.pop__row .name { font-size: 0.86rem; font-weight: 500; }
.pop__row .sub { font-size: 0.74rem; color: var(--color-ink-soft); }
.pop__empty { font-size: 0.82rem; color: var(--color-ink-soft); padding: 0.6rem 0.3rem; }

.dash-drawer {
  width: 360px;
  flex: none;
  border-left: 1px solid var(--color-border);
  background: var(--color-cream);
  display: flex;
  flex-direction: column;
  /* Scales with the actual browser window instead of a fixed guess, so
     the attendee list (the part that actually scrolls, __list below)
     gets whatever room the viewport allows rather than always being
     capped at a desktop-sized 640px. */
  max-height: calc(100vh - 260px);
}
.dash-drawer__head { padding: 1rem 1.1rem 0.8rem; position: relative; }
.dash-drawer__head h3 { font-size: 1.1rem; }
.dash-drawer__head p { margin: 0.3rem 0 0; color: var(--color-ink-soft); font-size: 0.85rem; }
.dash-drawer__close { display: none; }
.dash-drawer__addbar { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0 1.1rem 0.8rem; position: relative; }

.session-cancel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0 1.1rem 0.8rem;
  font-size: 0.78rem;
}
.session-cancel-trigger {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-ink-soft);
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
}
.session-cancel-trigger:hover { color: var(--color-coral-strong); }
.session-cancel-confirm {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-coral-strong);
  background: var(--color-coral-strong);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.session-cancel-cancel {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.dash-drawer__list { flex: 1; overflow-y: auto; padding: 0 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.dash-drawer__empty { color: var(--color-ink-soft); font-size: 0.88rem; }

.toast-stack {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  padding: 0 1rem;
}
.toast {
  background: var(--color-navy);
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow: var(--shadow-pop);
}
.toast button {
  background: none;
  border: none;
  color: var(--color-coral);
  font-weight: 500;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-body);
}
.toast button:hover { color: var(--color-coral-strong); }

.dash-backdrop {
  display: none;
}

/* Attendee history modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(9, 38, 63, 0.45);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  position: relative;
  background: var(--color-bg);
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: var(--shadow-pop);
}
.modal h3 { font-size: 1.2rem; padding-right: 2rem; }
.modal__subtitle { color: var(--color-ink-soft); font-size: 0.88rem; margin-top: -0.6rem; }
.modal__close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--color-cream);
  color: var(--color-ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal__close svg { width: 14px; height: 14px; }
.purchase {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-top: 0.8rem;
}
.purchase__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.purchase__code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  background: var(--color-cream);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  user-select: all;
}

.purchase__sessions {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--color-ink-soft);
}
.purchase__sessions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.purchase__session--past {
  opacity: 0.6;
  text-decoration: line-through;
  text-decoration-color: var(--color-border);
}
.purchase__goto {
  flex: none;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-teal-deep);
  cursor: pointer;
  white-space: nowrap;
}
.purchase__goto:hover { border-color: var(--color-teal-deep); background: var(--color-cream); }

.purchase__payment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.82rem;
}
.purchase__payment--paid { background: var(--color-status-paid-bg); color: var(--color-status-paid-fg); }
.purchase__payment--pending { background: var(--color-status-pending-bg); color: var(--color-status-pending-fg); }
.purchase__payment-icon { display: inline-flex; flex: none; opacity: 0.8; }
.purchase__payment-icon svg { width: 15px; height: 15px; }
.purchase__payment-label { font-weight: 600; }
.purchase__payment-date {
  margin-left: auto;
  font-weight: 400;
  font-size: 0.78rem;
  opacity: 0.85;
}
.purchase__mark-paid,
.purchase__pay-confirm,
.purchase__pay-cancel {
  flex: none;
  margin-left: auto;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--color-bg);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.purchase__mark-paid:hover,
.purchase__pay-confirm:hover { background: var(--color-bg); box-shadow: 0 0 0 1px currentColor inset; }
.purchase__pay-cancel { font-weight: 400; opacity: 0.75; margin-left: 0; }
.purchase__pay-date {
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--color-bg);
  color: var(--color-text);
  margin-left: auto;
}

.purchase__add-session { margin-top: 0.7rem; position: relative; }
.purchase__add-session-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-coral-strong);
  background: var(--color-bg);
  color: var(--color-coral-strong);
  cursor: pointer;
  white-space: nowrap;
}
.purchase__add-session-trigger svg { width: 13px; height: 13px; }
.purchase__add-session-trigger:hover { background: var(--color-pink); }

.purchase__delete {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--color-border);
  font-size: 0.78rem;
}
.purchase__delete-trigger {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-ink-soft);
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
}
.purchase__delete-trigger:hover { color: var(--color-coral-strong); }
.purchase__delete-confirm {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-coral-strong);
  background: var(--color-coral-strong);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.purchase__delete-cancel {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-ink-soft);
  cursor: pointer;
  white-space: nowrap;
}

/* Smartphone: single-column wall; the drawer becomes a full-screen
   sheet that slides up over the wall instead of reflowing below a long
   tile list, so opening a session never means scrolling past everything
   else first. */
@media (max-width: 780px) {
  .dash-wall { grid-template-columns: 1fr; }

  .dash-drawer {
    position: fixed;
    inset: 0;
    width: auto;
    max-height: none;
    z-index: 101;
    border-left: none;
    border-radius: 16px 16px 0 0;
    margin-top: 12vh;
    transform: translateY(100%);
    transition: transform 0.22s ease;
  }
  .dash-drawer.open { transform: translateY(0); }
  .dash-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--color-bg);
    color: var(--color-ink-soft);
    cursor: pointer;
  }
  .dash-drawer__close svg { width: 16px; height: 16px; }

  .dash-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(9, 38, 63, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-drawer { transition: none; }
}

/* ==================================================================
   Réglages avancés (settings_home.html / settings_list.html /
   settings_form.html) — branded Entity/Formula/EmailTemplate/
   MagicLink management, linked from the dashboard's gear icon.
   ================================================================== */

.settings-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.settings-card {
  display: block;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.settings-card:hover { border-color: var(--color-coral-strong); box-shadow: var(--shadow-card); }
.settings-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.settings-card p { margin: 0; color: var(--color-ink-soft); font-size: 0.88rem; }
.settings-card__count {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-coral-strong);
  font-size: 1.3rem;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.settings-table th {
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-navy);
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.settings-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.settings-table tbody tr:hover { background: var(--color-cream); }

.magic-link-url {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  word-break: break-all;
}
.btn-copy {
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-teal-deep);
  cursor: pointer;
  white-space: nowrap;
}
.btn-copy:hover { border-color: var(--color-teal-deep); background: var(--color-cream); }
