:root {
  --bg: #f7eef1;
  --ink: #2a1820;
  --muted: #7a5a66;
  --card: #ffffff;
  --line: rgba(42, 24, 32, 0.1);
  --accent: #c45c7a;
  --accent-2: #e07a5f;
  --bar: #3a1f2a;
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body, #app { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(196, 92, 122, 0.16), transparent 60%),
    radial-gradient(700px 380px at 0% 0%, rgba(224, 122, 95, 0.12), transparent 50%),
    var(--bg);
}
.site-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  background: var(--bar);
  color: #fff5f8;
  flex-wrap: wrap;
}
.site-brand {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-brand .paw,
.site-brand-hero .paw,
.brand .paw {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(196, 92, 122, 0.18);
  flex: 0 0 auto;
}
.site-brand .paw svg,
.site-brand-hero .paw svg,
.brand .paw svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.site-brand-hero {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.site-brand-hero .paw {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(196, 92, 122, 0.16);
  color: var(--accent);
}
.site-brand-hero .paw svg { width: 32px; height: 32px; }
.site-brand-hero strong { font-weight: 900; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav button {
  border: 0;
  background: transparent;
  color: #f0d0da;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
}
.site-nav button.on { background: rgba(255, 255, 255, 0.12); color: #fff; }
.site-back {
  margin-left: auto;
  color: #f0d0da;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.site-enter {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff5f8;
  font-weight: 700;
}
.site-enter.on { background: #fff5f8; color: var(--bar); }
.site-body { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 28px; flex: 1; }
.site-legal {
  margin-top: auto;
  padding: 24px;
  background: var(--bar);
  color: #f0d0da;
  text-align: center;
  font-size: 14px;
}
.site-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-hero h1 { margin: 0 0 12px; max-width: 14em; font-size: clamp(32px, 6vw, 46px); line-height: 1.08; letter-spacing: -0.04em; }
.site-hero p { margin: 0; max-width: 640px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.site-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.site-cta, .site-ghost {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
}
.site-cta { background: var(--accent); color: #fff; }
.site-ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--bar); }
.site-points, .site-features, .site-offers, .site-steps {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}
.site-points, .site-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.site-features, .site-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-points li, .site-features article, .site-offers article, .site-steps li {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(42, 24, 32, 0.06);
}
.site-points strong, .site-steps strong, .site-features h2 { display: block; margin-bottom: 6px; }
.site-points span, .site-steps span, .site-features p, .site-offers p { color: var(--muted); line-height: 1.45; margin: 0; }
.site-shot {
  margin: 22px 0 0;
  padding: 12px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(42, 24, 32, 0.08);
}
.site-shot img { display: block; width: 100%; height: auto; border-radius: 14px; }
.site-shot figcaption { margin: 10px 6px 2px; color: var(--muted); font-size: 14px; }
.site-show { margin-top: 52px; }
.site-show header {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 16px;
}
.site-show h2 { margin: 0; font-size: 32px; line-height: 1.15; color: var(--ink); }
.site-show header > p { margin: 0; color: var(--muted); line-height: 1.55; }
.site-show .site-shot { margin-top: 0; }
.site-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 28px;
  align-items: center;
  margin-top: 28px;
}
.site-split .site-shot { margin: 0; }
.site-split h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.15; color: var(--ink); }
.site-split p { margin: 0; color: var(--muted); line-height: 1.55; }
.site-steps b {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.site-offers article.featured { background: var(--bar); color: #fff5f8; }
.site-offers article.featured p { color: #f0d0da; }
.site-offers h2 { margin: 0 0 8px; font-size: 30px; }
.offer-badge {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.featured .offer-badge { color: #8fd6c0; }
.site-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.site-order {
  width: min(520px, 100%);
  margin: 22px auto 0;
  padding: 22px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(42, 24, 32, 0.08);
}
.site-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-ok { margin: 22px 0 0; padding: 16px 18px; background: var(--card); border-radius: 14px; color: var(--accent); font-weight: 800; }
.site-login { display: grid; place-items: center; padding-top: 20px; }
.site .panel {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 18px 40px rgba(42, 24, 32, 0.08);
}
.site .panel h1 { margin: 0 0 8px; }
.site .lead { margin: 0 0 16px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.field input, .field select, .field textarea, .toolbar input, .toolbar select {
  background: #e8f1ec;
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--ink);
}
.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 800;
  background: #d7e5de;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-coral { background: var(--accent-2); color: #fff; }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.login-error { color: #b42318; margin: 0 0 12px; }

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(800px 360px at 0% -10%, rgba(196, 92, 122, 0.12), transparent 55%),
    var(--bg);
}
.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}
.brand {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 0;
}
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.brand .paw {
  width: 38px;
  height: 38px;
  color: var(--accent);
}
.spacer { flex: 1; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.field.full { grid-column: 1 / -1; }
.dur-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.dur-chip, .dur-more {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
}
.dur-chip.on, .dur-more.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.dur-more {
  min-width: 36px;
  padding: 6px 0;
  font-size: 18px;
  line-height: 1;
}
.dur-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #f8eef2;
}
.dur-manual {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.dur-manual input, .dur-manual select {
  min-height: 38px;
  min-width: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}
.dur-preview {
  margin-left: auto;
  font-weight: 800;
  color: var(--accent);
  padding-bottom: 8px;
}
.suggest-field { position: relative; }
.suggest-field input[disabled] { opacity: 0.55; }
.suggest-field:has(.suggest-clear) input { padding-right: 36px; }
.suggest-clear {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  font-weight: 700;
}
.suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  z-index: 8;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(42, 24, 32, 0.12);
  max-height: 220px;
  overflow: auto;
  padding: 4px;
}
.suggest-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
}
.suggest-item:hover, .suggest-item:focus { background: #f8eef2; }
.suggest-item strong { font-size: 14px; }
.suggest-item span { font-size: 12px; color: var(--muted); }
.suggest-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}
.plain-table { width: 100%; border-collapse: collapse; }
.plain-table th, .plain-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.plain-table th { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.table-panel { overflow: hidden; }
.table-scroll {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.table-scroll-tall { max-height: 280px; }
.table-scroll .plain-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.svc-row { cursor: pointer; }
.svc-row:hover td { background: #f8eef2; }
.svc-row.on td { background: rgba(196, 92, 122, 0.12); font-weight: 700; }
.actions .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.nav-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-tabs button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  color: var(--muted);
}
.nav-tabs button.on { background: var(--accent); color: #fff; }
.page { width: min(1100px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 36px; }
.page-frise {
  width: calc(100% - 20px);
  max-width: none;
  margin: 0 auto;
  padding: 18px 0 36px;
}
.page-frise .page-head,
.page-frise .day-nav,
.page-frise .agenda-tools,
.page-frise .login-error {
  width: min(1100px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.page-head { margin-bottom: 16px; }
.page-head h1 { margin: 0 0 4px; font-size: 28px; letter-spacing: -0.03em; }
.page-head p { margin: 0; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 160px; }
.day-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-nav strong { min-width: 160px; text-align: center; }
.agenda-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}
.frise-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  width: 100%;
}
.month-cal {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(42, 24, 32, 0.05);
  position: sticky;
  top: 72px;
}
.month-cal-top {
  position: static;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 18px 20px 16px;
}
.month-cal-top .cal-day { min-height: 48px; }
.month-cal-top .cal-hint { text-align: center; }
.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}
.month-head strong {
  font-size: 14px;
  text-align: center;
  flex: 1;
}
.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  padding: 4px 0;
}
.cal-empty { min-height: 38px; }
.cal-day {
  border: 0;
  background: #f8eef2;
  border-radius: 10px;
  min-height: 42px;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-weight: 800;
}
.cal-day b { font-size: 13px; }
.cal-day i {
  font-style: normal;
  font-size: 11px;
  color: var(--accent);
  background: rgba(196, 92, 122, 0.14);
  border-radius: 999px;
  min-width: 18px;
  padding: 0 5px;
}
.cal-day.busy { background: #f3dce5; }
.cal-day.on {
  background: var(--accent);
  color: #fff;
}
.cal-day.on i { background: rgba(255, 255, 255, 0.22); color: #fff; }
.cal-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.agenda-tools {
  margin-top: -4px;
}
.field.compact {
  margin: 0;
  min-width: 120px;
}
.field.compact select {
  margin-top: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}
.view-toggle {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.view-toggle button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  color: var(--muted);
}
.view-toggle button.on {
  background: var(--accent);
  color: #fff;
}
.agenda {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.agenda-frise { display: block; width: 100%; }
.frise-wrap { min-width: 0; width: 100%; }
.frise-scroll {
  overflow-x: auto;
  width: 100%;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(42, 24, 32, 0.05);
  padding: 14px 12px 16px;
}
.frise { position: relative; min-width: 100%; }
.frise-scale {
  position: relative;
  height: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.frise-hour {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.frise-track {
  position: relative;
  min-height: 148px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(196, 92, 122, 0.1),
      rgba(196, 92, 122, 0.1) 1px,
      transparent 1px,
      transparent var(--hour, 144px)
    );
  border-radius: 12px;
}
.frise-block {
  position: absolute;
  top: 12px;
  height: 84px;
  border: 0;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  background: #f7e0e8;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 2px;
  box-shadow: 0 6px 14px rgba(42, 24, 32, 0.08);
}
.frise-block.arrive { background: #ffe8d9; }
.frise-block.en_cours { background: #fff1c9; }
.frise-block.termine { background: #ebe6e8; }
.frise-block.annule { background: #fde2e2; opacity: 0.75; }
.frise-block strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frise-block span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frise-add {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(42, 24, 32, 0.08);
}
.slot {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: stretch;
}
.slot-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding-top: 10px;
}
.slot-body {
  min-height: 52px;
  background: var(--card);
  border-radius: 14px;
  border: 1px dashed rgba(196, 92, 122, 0.25);
  padding: 8px;
}
.appt {
  border: 0;
  width: 100%;
  text-align: left;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f7e0e8;
  display: grid;
  gap: 2px;
  margin-bottom: 6px;
}
.appt.arrive { background: #ffe8d9; }
.appt.en_cours { background: #fff1c9; }
.appt.termine { background: #ebe6e8; }
.appt.annule { background: #fde2e2; opacity: 0.75; }
.appt strong { font-size: 15px; }
.appt span { color: var(--muted); font-size: 13px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 0;
  text-align: left;
  box-shadow: 0 10px 24px rgba(42, 24, 32, 0.05);
}
.card h2 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.card .meta { margin-top: 10px; font-size: 12px; font-weight: 800; color: var(--accent); }
.form-card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(42, 24, 32, 0.05);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.brand-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 8px;
}
.brand-card {
  background: #faf3f6;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 180px;
}
.brand-card strong { font-size: 14px; }
.brand-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.brand-empty {
  flex: 1;
  min-height: 88px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px dashed rgba(196, 92, 122, 0.35);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}
.brand-img {
  flex: 1;
  width: 100%;
  min-height: 88px;
  max-height: 140px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
}
.brand-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.brand-file { display: inline-flex; align-items: center; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.animal-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: #f3e0e7;
  border-radius: 999px;
  padding: 6px 10px;
  margin: 4px 4px 0 0;
  font-size: 13px;
  font-weight: 700;
}
.empty { color: var(--muted); padding: 18px; text-align: center; }
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(42, 24, 32, 0.35);
  display: grid;
  place-items: end center;
  z-index: 20;
  padding: 12px;
}
.sheet .form-card {
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  margin-bottom: 0;
}
@media (min-width: 760px) {
  .sheet { place-items: center; }
}
@media (max-width: 960px) {
  .agenda-layout { grid-template-columns: 1fr; }
  .month-cal { position: static; }
  .page-frise { width: calc(100% - 16px); }
  .month-cal-top { width: 100%; }
}
@media (max-width: 800px) {
  .site-points, .site-features, .site-offers, .site-steps, .grid-2, .brand-row { grid-template-columns: 1fr; }
  .site-show header, .site-split { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 24px; }
}
