/* =========================================================
   NAIL SOCIETY — Design system
   Palette : #BB174E framboise · #FFC3DC rose · #F6F4F0 crème
   ========================================================= */

@font-face { font-family: "Jost"; src: url("../fonts/jost-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --brand: #BB174E;
  --brand-600: #A3123F;
  --brand-700: #7E0D31;
  --brand-glow: rgba(187, 23, 78, .28);
  --rose: #FFC3DC;
  --rose-100: #FFE3EE;
  --rose-50: #FFF4F8;
  --cream: #F6F4F0;

  --bg: #F6F4F0;
  --bg-2: #EFEBE5;
  --card: #FFFFFF;
  --card-2: #FBFAF8;
  --ink: #1B1517;
  --ink-2: #4A3F43;
  --muted: #8C8185;
  --line: rgba(27, 21, 23, .08);
  --line-2: rgba(27, 21, 23, .14);
  --field: #FFFFFF;
  --ok: #1E9E6A;
  --ok-bg: #E4F6EE;
  --warn: #C27B0E;
  --warn-bg: #FDF2DD;
  --danger: #D32F45;
  --danger-bg: #FDE8EB;

  --pm-cb: #BB174E;
  --pm-especes: #E8759E;
  --pm-virement: #6B2340;
  --pm-cheque: #C9A27E;
  --pm-mobile: #3A3034;
  --pm-cadeau: #F5A8C6;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(27, 21, 23, .04), 0 1px 1px rgba(27, 21, 23, .03);
  --shadow: 0 1px 2px rgba(27, 21, 23, .04), 0 8px 24px -8px rgba(27, 21, 23, .10);
  --shadow-lg: 0 2px 6px rgba(27, 21, 23, .05), 0 24px 60px -20px rgba(27, 21, 23, .25);
  --shadow-brand: 0 10px 30px -10px var(--brand-glow);
  --sidebar-w: 272px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0E0A0B;
  --bg-2: #161012;
  --card: #1A1416;
  --card-2: #211A1C;
  --ink: #F6F4F0;
  --ink-2: #D6CDD0;
  --muted: #9A8E92;
  --line: rgba(246, 244, 240, .08);
  --line-2: rgba(246, 244, 240, .14);
  --field: #120D0F;
  --rose-50: #2A1720;
  --rose-100: #3A1C29;
  --ok-bg: rgba(30, 158, 106, .15);
  --warn-bg: rgba(194, 123, 14, .16);
  --danger-bg: rgba(211, 47, 69, .16);
  --pm-mobile: #CFC4C8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(255, 195, 220, .45), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(187, 23, 78, .08), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(187, 23, 78, .18), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(255, 195, 220, .05), transparent 60%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
h2 { font-size: 1.05rem; }
p { margin: 0; }
em { font-style: normal; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88em; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--rose); color: var(--brand-700); }

.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.d-block { display: block; }
.accent { color: var(--brand) !important; }
.strong { font-weight: 600; }
.grow { flex: 1; min-width: 0; }
.center { justify-content: center; }
.eyebrow {
  display: inline-block;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow.light { color: var(--rose); }
.link { color: var(--brand); font-weight: 500; display: inline-flex; align-items: center; gap: .3em; font-size: .9rem; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.align-start { align-items: start; }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: inline; }
:root[data-theme="dark"] .only-light { display: none; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 16px 16px;
  background: var(--card);
  border-right: 1px solid var(--line);
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #D12460, var(--brand) 55%, var(--brand-700));
  color: #fff;
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .25);
  transform: perspective(200px) rotateX(8deg) rotateY(-10deg);
  transition: transform .5s var(--spring);
}
.brand:hover .brand-mark { transform: perspective(200px) rotateX(0) rotateY(0) scale(1.05); }
.brand-mark svg { width: 30px; height: auto; }
.brand-text strong { display: block; font-size: .95rem; letter-spacing: .16em; font-weight: 700; }
.brand-text small { color: var(--muted); font-size: .78rem; }

.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; margin: 0 -6px; padding: 0 6px; scrollbar-width: none; }
.nav-label { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 12px 6px; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: 12px;
  color: var(--ink-2); font-weight: 500; font-size: .93rem;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav-link .i { width: 20px; height: 20px; opacity: .8; }
.nav-link:hover { background: var(--rose-50); color: var(--brand); }
.nav-link.is-active {
  background: linear-gradient(135deg, var(--brand), #D12460);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.nav-link.is-active .i { opacity: 1; }
.nav-badge {
  margin-left: auto;
  min-width: 22px; height: 22px; padding: 0 7px;
  display: grid; place-items: center;
  border-radius: 99px;
  background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 600;
}
.nav-link.is-active .nav-badge { background: #fff; color: var(--brand); }

.sidebar-foot { border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; gap: 8px; }
.me { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px; border-radius: 12px; }
.me:hover { background: var(--bg); }
.me strong { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: .76rem; }
.me span { min-width: 0; }
.foot-actions { display: flex; gap: 2px; }
.foot-actions form { margin: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 22px 36px 18px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar h1 { font-size: 1.65rem; font-weight: 600; letter-spacing: -.02em; }
.topbar p { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.burger { display: none; }
.content { padding: 8px 36px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1440px; width: 100%; }
.scrim { display: none; }

/* ---------- Avatars ---------- */
.avatar {
  --c: var(--brand);
  flex: none;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;
  font-weight: 600; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 75%, #fff), var(--c));
  box-shadow: 0 0 0 2px var(--card), 0 2px 8px -2px rgba(0, 0, 0, .2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 34px; height: 34px; font-size: .75rem; }
.avatar-md { width: 44px; height: 44px; font-size: .88rem; }
.avatar-lg { width: 58px; height: 58px; font-size: 1.05rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2rem; }
.avatar.all { background: var(--ink); }
.avatar.all .i { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border: 0; border-radius: 12px;
  font-weight: 500; font-size: .92rem; white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #D12460, var(--brand) 50%, var(--brand-600));
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn-primary:hover { box-shadow: 0 14px 34px -10px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, .2); transform: translateY(-1px); }
.btn-dark { color: var(--bg); background: var(--ink); }
.btn-dark:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-soft { color: var(--brand); background: var(--rose-50); }
.btn-soft:hover { background: var(--rose-100); }
.btn-ghost { color: var(--ink-2); background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-sm); }
.btn-ghost.danger, .btn-danger { color: var(--danger); }
.btn-danger { background: var(--danger-bg); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 10px; gap: 6px; }
.btn-lg { height: 52px; font-size: 1rem; border-radius: 14px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 11px;
  background: transparent; color: var(--ink-2);
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: var(--rose-50); color: var(--brand); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.is-disabled { opacity: .3; pointer-events: none; }
.icon-btn .i { width: 20px; height: 20px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 1.08rem; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- KPIs ---------- */
.kpis { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: transform .4s var(--ease), box-shadow .3s;
}
.kpi-icon {
  width: 38px; height: 38px; margin-bottom: 8px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--rose-50); color: var(--brand);
}
.kpi-label { font-size: .8rem; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.kpi-value { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.kpi-sub { font-size: .82rem; color: var(--muted); }
.kpi-sub b.up { color: var(--ok); }
.kpi-sub b.down { color: var(--danger); }
.kpi-hero {
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 195, 220, .55), transparent 55%),
    linear-gradient(145deg, #D12460, var(--brand) 45%, var(--brand-700));
  border: 0;
  box-shadow: 0 20px 40px -18px var(--brand-glow);
}
.kpi-hero .kpi-label, .kpi-hero .kpi-sub { color: rgba(255, 255, 255, .78); }
.kpi-hero .kpi-value { font-size: 2.1rem; }
.kpi-mark { position: absolute; right: -14px; bottom: -22px; width: 130px; opacity: .14; transform: rotate(-12deg); }
.kpi-accent { background: linear-gradient(160deg, var(--rose-50), var(--card)); }
.kpi-accent .kpi-value { color: var(--brand); }

/* ---------- Alerts / toasts ---------- */
.alert {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: .92rem;
}
.alert .i { width: 20px; height: 20px; }
.alert span { flex: 1; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--rose-50); color: var(--brand); }
a.alert { transition: transform .2s var(--ease); }
a.alert:hover { transform: translateX(3px); }
.alerts-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.notice { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--rose-50); color: var(--brand-700); font-size: .86rem; }
:root[data-theme="dark"] .notice { color: var(--rose); }

.toasts { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 420px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-size: .92rem; font-weight: 500;
  animation: toast-in .6s var(--spring) both, toast-out .5s var(--ease) 5s forwards;
}
.toast .i { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.toast-success .i { background: var(--ok); color: #fff; }
.toast-error .i { background: var(--danger); color: #fff; }
.toast-info .i { background: var(--brand); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); visibility: hidden; } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; border: 0; padding: 0; margin: 0; }
.label { font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.label .opt { font-weight: 400; color: var(--muted); font-size: .78rem; margin-left: 4px; }
input, select, textarea {
  font: inherit; color: var(--ink);
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--field);
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 80px; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C8185' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-right: 40px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-glow); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input[type="date"], input[type="time"] { font-variant-numeric: tabular-nums; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: .82rem; }
.field-error .i { width: 15px; height: 15px; }
.has-error { border-color: var(--danger) !important; }

.input-icon { position: relative; display: block; }
.input-icon > .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.input-icon input { padding-left: 44px; padding-right: 46px; }
.reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 9px; cursor: pointer; }
.reveal:hover { color: var(--brand); background: var(--rose-50); }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: .9rem; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
  flex: none;
  width: 22px; height: 22px; margin-top: 1px;
  display: grid; place-items: center;
  border-radius: 7px;
  border: 1.5px solid var(--line-2);
  background: var(--field);
  color: transparent;
  transition: all .25s var(--spring);
}
.check-box .i { width: 14px; height: 14px; }
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); color: #fff; transform: scale(1.06); box-shadow: 0 4px 12px -4px var(--brand-glow); }
.check input:focus-visible + .check-box { box-shadow: 0 0 0 4px var(--brand-glow); }
.check.small { font-size: .8rem; margin-top: 6px; gap: 8px; }
.check.small .check-box { width: 18px; height: 18px; border-radius: 6px; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.cash-mid .divider { margin: 10px 0; }

.strength { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--danger); transition: width .3s var(--ease), background .3s; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px;
  border-radius: 99px;
  font-size: .76rem; font-weight: 500;
  background: var(--bg-2); color: var(--ink-2);
  white-space: nowrap;
}
.chip .i { width: 13px; height: 13px; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-muted { background: var(--bg-2); color: var(--muted); }
.chip-dark { background: var(--ink); color: var(--bg); }
.chip-rdv { background: var(--rose-50); color: var(--brand); }

.pm {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 99px;
  font-size: .76rem; font-weight: 500;
  background: color-mix(in srgb, var(--pmc, var(--brand)) 12%, transparent);
  color: color-mix(in srgb, var(--pmc, var(--brand)) 85%, var(--ink));
  white-space: nowrap;
}
.pm .i { width: 14px; height: 14px; }
.pm-cb { --pmc: var(--pm-cb); }
.pm-especes { --pmc: var(--pm-especes); }
.pm-virement { --pmc: var(--pm-virement); }
.pm-cheque { --pmc: var(--pm-cheque); }
.pm-mobile { --pmc: var(--pm-mobile); }
.pm-cadeau { --pmc: var(--pm-cadeau); }
.sw-cb { background: var(--pm-cb) !important; }
.sw-especes { background: var(--pm-especes) !important; }
.sw-virement { background: var(--pm-virement) !important; }
.sw-cheque { background: var(--pm-cheque) !important; }
.sw-mobile { background: var(--pm-mobile) !important; }
.sw-cadeau { background: var(--pm-cadeau) !important; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row small { display: block; }
.list.compact .list-row { padding: 8px 2px; font-size: .88rem; }
.list.compact .i { color: var(--brand); }
a.grow:hover strong { color: var(--brand); }
.amount { text-align: right; font-weight: 600; white-space: nowrap; }
.amount small { display: block; font-weight: 500; color: var(--ok); font-size: .76rem; }
.time-pill {
  display: inline-grid; place-items: center;
  min-width: 56px; height: 30px; padding: 0 8px;
  border-radius: 9px;
  background: var(--rose-50); color: var(--brand);
  font-weight: 600; font-size: .84rem;
}
.date-pill {
  flex: none;
  width: 48px; height: 52px;
  display: grid; place-content: center; text-align: center;
  border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); line-height: 1.1;
}
.date-pill b { display: block; font-size: 1.15rem; color: var(--ink); letter-spacing: 0; }
.bar { display: block; height: 6px; border-radius: 6px; background: var(--bg-2); overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rose), var(--brand)); transform-origin: left; animation: grow 1.2s var(--ease) both; }
.bar-lg { height: 8px; }
@keyframes grow { from { transform: scaleX(0); } }
.rank-n { width: 22px; font-weight: 600; color: var(--muted); font-size: .85rem; text-align: center; }
.rank .list-row:first-child .rank-n { color: var(--brand); }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; color: var(--muted);
  padding: 34px 16px;
}
.empty .i { width: 44px; height: 44px; padding: 10px; border-radius: 16px; background: var(--rose-50); color: var(--brand); }
.empty.small { padding: 20px 12px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left; font-weight: 500;
  font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--card-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot th { font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 600; border-top: 2px solid var(--line-2); border-bottom: 0; padding-top: 14px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-actions { text-align: right; white-space: nowrap; }
.td-actions > * { vertical-align: middle; }
.cell-user { display: inline-flex; align-items: center; gap: 12px; }
.cell-user strong { display: block; font-weight: 500; }
.cell-user small { display: block; }
a.cell-user:hover strong { color: var(--brand); }
tr.is-inactive { opacity: .55; }
.note { color: var(--warn); font-size: .8rem; }
.last-seen { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-2); }
.last-seen i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.last-seen.is-online i { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- Thumbnails & lightbox ---------- */
.thumbs { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.thumb {
  position: relative;
  width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 12px; overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
  transition: transform .3s var(--spring);
}
.thumb:hover { transform: scale(1.08) rotate(-2deg); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb em { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; }
.thumb em .i { width: 11px; height: 11px; }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 40px 20px;
  background: rgba(14, 10, 11, .88);
  backdrop-filter: blur(10px);
  animation: fade .3s var(--ease);
}
.lightbox img { max-width: min(1100px, 100%); max-height: calc(100vh - 140px); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: zoom-in .45s var(--spring); }
.lb-caption { color: rgba(255, 255, 255, .8); font-size: .9rem; text-align: center; }
.lb-close { position: absolute; top: 18px; right: 18px; color: #fff; background: rgba(255, 255, 255, .1); }
@keyframes fade { from { opacity: 0; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.9) translateY(10px); } }

/* ---------- Dialogs (sheets) ---------- */
dialog.sheet {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  padding: 0; border: 0;
  border-radius: var(--r-xl);
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}
dialog.sheet[open] { animation: sheet-in .45s var(--spring); }
dialog.sheet::backdrop { background: rgba(14, 10, 11, .45); backdrop-filter: blur(6px); animation: fade .3s; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.sheet-body { padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 1.3rem; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- Calendar ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 22px; align-items: start; }
.cal-layout-admin { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); }
.cal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky; top: 100px;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head h3 { font-size: 1.15rem; font-weight: 600; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow span { text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); padding-bottom: 6px; letter-spacing: .08em; }
.cal-day {
  position: relative;
  aspect-ratio: 1 / 1.05;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 13px;
  font-size: .92rem; font-weight: 500;
  color: var(--ink-2);
  transition: transform .25s var(--spring), background .2s, box-shadow .2s;
}
.cal-day.has-activity { background: color-mix(in srgb, var(--brand) calc(var(--heat) * 14%), var(--card)); }
.cal-day:hover { transform: translateY(-2px) scale(1.05); background: var(--rose-50); z-index: 1; }
.cal-day.is-today .cal-num { color: var(--brand); font-weight: 700; }
.cal-day.is-today::after { content: ""; position: absolute; inset: 3px; border-radius: 11px; border: 1.5px solid var(--brand); opacity: .5; }
.cal-day.is-future { color: var(--ink-2); }
.cal-day.is-selected {
  background: linear-gradient(145deg, #D12460, var(--brand) 55%, var(--brand-700)) !important;
  color: #fff !important;
  box-shadow: var(--shadow-brand);
  transform: scale(1.06);
}
.cal-day.is-selected .cal-num { color: #fff; }
.cal-day.is-selected .dot { background: #fff !important; }
.cal-day.is-selected .cal-sum { color: rgba(255, 255, 255, .85); }
.cal-dots { display: flex; gap: 3px; height: 5px; }
.dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.dot-rdv { background: var(--pm-cheque); }
.dot-presta { background: var(--brand); }
.cal-sum { font-size: .6rem; color: var(--muted); font-weight: 500; letter-spacing: -.01em; }
.cal-legend { display: flex; gap: 16px; justify-content: center; margin-top: 14px; font-size: .78rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }

.day-panel { min-height: 420px; }
.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; position: relative; }
.agenda::before { content: ""; position: absolute; left: 62px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--rose), transparent); border-radius: 2px; }
.ag-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 24px; padding: 10px 0; position: relative; animation: rise .5s var(--ease) both; }
.ag-item:nth-child(2) { animation-delay: .05s; } .ag-item:nth-child(3) { animation-delay: .1s; } .ag-item:nth-child(4) { animation-delay: .15s; } .ag-item:nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.ag-item time { font-weight: 600; font-size: .9rem; text-align: right; padding-top: 12px; }
.ag-item time small { display: block; color: var(--muted); font-weight: 400; font-size: .76rem; }
.ag-item::before { content: ""; position: absolute; left: 57px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--brand); z-index: 1; }
.ag-rdv::before { border-color: var(--pm-cheque); }
.ag-rdv.status-cancelled { opacity: .5; }
.ag-body { padding: 12px 16px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; transition: box-shadow .2s, transform .2s var(--ease); }
.ag-body:hover { box-shadow: var(--shadow); transform: translateX(2px); }
.ag-presta .ag-body { background: linear-gradient(135deg, var(--rose-50), var(--card-2)); }
.ag-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ag-price { font-weight: 600; color: var(--brand); }
.ag-note { font-size: .84rem; color: var(--ink-2); padding: 6px 10px; border-radius: 8px; background: var(--bg); }
.ag-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ag-actions form { margin: 0; }

.day-nav { display: flex; align-items: center; gap: 10px; }
.day-picker input { min-height: 40px; padding: 7px 12px; width: auto; font-weight: 500; }

/* ---------- Employee dashboard ---------- */
.dash-employee { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 22px; align-items: start; }
.dash-employee .hero-card-wrap { grid-row: span 2; }
.dash-employee .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-employee > .card { grid-column: span 1; }
.dash-employee .chart-card { grid-column: 2; }

/* 3D wallet card */
.hero-card-wrap { perspective: 1400px; display: flex; flex-direction: column; gap: 12px; }
.card3d { width: 100%; aspect-ratio: 1.586; cursor: pointer; transform-style: preserve-3d; transition: transform .2s ease-out; }
.card3d-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s var(--spring); }
.card3d.is-flipped .card3d-inner { transform: rotateY(180deg); }
.card3d-face {
  position: absolute; inset: 0;
  border-radius: 24px;
  padding: 24px 26px;
  color: #fff;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(126, 13, 49, .7), 0 0 0 1px rgba(255, 255, 255, .08) inset;
}
.card3d-front {
  display: flex; flex-direction: column;
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(255, 195, 220, .7), transparent 50%),
    radial-gradient(90% 90% at 0% 100%, rgba(40, 0, 15, .55), transparent 60%),
    linear-gradient(135deg, #D82A67, var(--brand) 45%, #6E0B2B);
}
.card3d-front::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, .035) 22px 23px);
}
.c3-top { display: flex; justify-content: space-between; align-items: center; position: relative; }
.c3-logo svg { width: 56px; height: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.c3-chip { width: 44px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #F8E3C4, #C9A27E 50%, #F3D9B5); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); position: relative; }
.c3-chip::after { content: ""; position: absolute; inset: 7px 10px; border: 1px solid rgba(0, 0, 0, .2); border-radius: 4px; }
.c3-label { margin-top: auto; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; position: relative; }
.c3-amount { font-size: clamp(2rem, 6vw, 2.7rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; position: relative; text-shadow: 0 2px 12px rgba(0, 0, 0, .2); }
.c3-bottom { display: flex; justify-content: space-between; margin-top: 16px; font-size: .84rem; font-weight: 500; letter-spacing: .06em; position: relative; }
.c3-bottom small { display: block; font-size: .62rem; letter-spacing: .14em; opacity: .7; text-transform: uppercase; }
.c3-shine {
  position: absolute; inset: -50%;
  background: radial-gradient(circle at var(--mx, 30%) var(--my, 20%), rgba(255, 255, 255, .35), transparent 35%);
  mix-blend-mode: overlay;
  pointer-events: none;
  transition: background .1s;
}
.card3d-back { transform: rotateY(180deg); background: linear-gradient(135deg, #2A1A20, #1B1517); display: flex; flex-direction: column; padding-top: 0; padding-left: 0; padding-right: 0; }
.c3-stripe { height: 46px; margin-top: 24px; background: #0b0809; }
.c3-details { margin: 18px 26px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.c3-details dt { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.c3-details dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 600; color: var(--rose); }
.c3-hint { margin: auto 26px 18px; font-size: .74rem; opacity: .5; }
.hint-flip { text-align: center; font-size: .8rem; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }

.chart { position: relative; height: 200px; }
.chart-lg { height: 260px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .c-area { fill: url(#chart-grad); }
.chart .c-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .c-grid { stroke: var(--line); stroke-dasharray: 3 5; }
.chart .c-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .c-dot { fill: var(--card); stroke: var(--brand); stroke-width: 2.5; }
.chart-tip {
  position: absolute; pointer-events: none;
  padding: 7px 11px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  font-size: .8rem; font-weight: 500; white-space: nowrap;
  transform: translate(-50%, -130%);
  box-shadow: var(--shadow-lg);
  transition: opacity .15s;
}
.chart-tip b { display: block; font-size: .95rem; }

/* Donut */
.donut { position: relative; width: 190px; height: 190px; margin: 4px auto; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 22; transition: stroke-dasharray 1.2s var(--ease); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center small { color: var(--muted); font-size: .76rem; }
.donut-center strong { font-size: 1.3rem; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend span { flex: 1; }
.legend em { color: var(--muted); font-size: .8rem; width: 40px; text-align: right; }
.sw { width: 10px; height: 10px; border-radius: 3px; }

.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.span-2 { grid-column: span 2; }

/* ---------- Prestation form ---------- */
.presta-form { display: flex; flex-direction: column; gap: 22px; }
.presta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.step-head { display: flex; align-items: center; gap: 12px; }
.step-n {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #D12460, var(--brand));
  color: #fff; font-weight: 600;
  box-shadow: var(--shadow-brand);
}
.step-n .i { width: 18px; height: 18px; }
.price-input { position: relative; display: block; }
.price-input input { font-size: 2rem; font-weight: 600; height: 72px; padding-right: 52px; letter-spacing: -.02em; text-align: right; }
.price-input b { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--muted); font-weight: 500; }
.price-input.sm input { font-size: 1rem; height: 40px; min-height: 40px; padding-right: 34px; }
.price-input.sm b { font-size: .95rem; right: 12px; }
.commission-live {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose-50), transparent);
  border: 1px dashed color-mix(in srgb, var(--brand) 35%, transparent);
  font-size: .88rem; color: var(--ink-2);
}
.commission-live strong { font-size: 1.15rem; color: var(--brand); transition: transform .3s var(--spring); }
.commission-live.bump strong { transform: scale(1.15); }

.pm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pm-option { position: relative; cursor: pointer; }
.pm-option input { position: absolute; opacity: 0; pointer-events: none; }
.pm-option span {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px;
  border-radius: 14px;
  border: 1.5px solid var(--line-2);
  background: var(--field);
  font-size: .8rem; text-align: center;
  transition: all .25s var(--spring);
}
.pm-option .i { width: 24px; height: 24px; color: var(--muted); transition: color .2s, transform .3s var(--spring); }
.pm-option b { font-weight: 500; }
.pm-option:hover span { border-color: var(--rose); transform: translateY(-2px); }
.pm-option input:checked + span {
  border-color: var(--brand);
  background: var(--rose-50);
  color: var(--brand);
  box-shadow: 0 8px 20px -10px var(--brand-glow);
  transform: translateY(-2px);
}
.pm-option input:checked + span .i { color: var(--brand); transform: scale(1.15) rotate(-6deg); }
.pm-option input:focus-visible + span { box-shadow: 0 0 0 4px var(--brand-glow); }

.photo-inputs { display: grid; gap: 12px; }
.photo-drop {
  position: relative;
  min-height: 150px;
  display: grid; place-items: center;
  border-radius: 18px;
  border: 2px dashed var(--line-2);
  background: var(--card-2);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .3s var(--spring);
}
.photo-drop:hover { border-color: var(--brand); background: var(--rose-50); transform: scale(1.01); }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pd-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px; pointer-events: none; }
.pd-empty .i { width: 30px; height: 30px; color: var(--brand); margin-bottom: 4px; }
.pd-empty small { color: var(--muted); font-size: .78rem; }
.photo-drop.has-preview { border-style: solid; border-color: var(--brand); }
.photo-drop .pd-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; animation: zoom-in .4s var(--spring); }
.photo-drop.has-preview::after {
  content: "✓ Photo prête"; position: absolute; left: 10px; bottom: 10px;
  padding: 4px 10px; border-radius: 99px;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: .74rem; font-weight: 500;
  pointer-events: none;
}
.photo-drop.has-error { border-color: var(--danger); }
.sticky-submit { position: sticky; bottom: 18px; z-index: 5; max-width: 520px; margin: 0 auto; width: 100%; }
.sticky-submit .btn { box-shadow: 0 18px 40px -12px var(--brand-glow); }

/* ---------- Avatar picker ---------- */
.avatar-picker { display: flex; align-items: center; gap: 18px; }
.avatar-drop {
  position: relative; flex: none;
  width: 92px; height: 92px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--rose-50);
  cursor: pointer;
  box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--rose);
  transition: transform .3s var(--spring);
}
.avatar-drop:hover { transform: scale(1.05); }
.avatar-drop img, .avatar-drop .pd-preview { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; border-radius: 50%; }
.avatar-placeholder .i { width: 32px; height: 32px; color: var(--brand); }
.avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 0 0 3px var(--card); pointer-events: none; }
.avatar-edit .i { width: 16px; height: 16px; }
.avatar-picker.has-error .avatar-drop { box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--danger); }
.avatar-xl { width: 112px; height: 112px; margin: 0 auto; }
.avatar-xl .avatar { box-shadow: none; }

/* ---------- Login ---------- */
.is-bare { background: var(--bg); }
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-stage {
  position: relative; overflow: hidden;
  background:
    radial-gradient(80% 60% at 70% 30%, #E23B75 0%, transparent 60%),
    radial-gradient(60% 50% at 20% 80%, #5A0A25 0%, transparent 70%),
    linear-gradient(160deg, #C41A55, #8A0F38 60%, #3D0618);
  color: #fff;
}
.login-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.stage-fallback svg { width: 38%; max-width: 280px; color: #fff; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .35)); animation: float 6s ease-in-out infinite; }
.has-3d .stage-fallback { opacity: 0; transition: opacity .8s; }
@keyframes float { 50% { transform: translateY(-14px) rotate(-2deg); } }
.stage-copy { position: absolute; left: 56px; bottom: 56px; right: 56px; z-index: 2; pointer-events: none; }
.stage-title { font-size: clamp(1.8rem, 3.2vw, 2.8rem); font-weight: 500; line-height: 1.12; letter-spacing: -.02em; margin-top: 10px; }
.stage-title em, .onboard h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--rose); }
.onboard h1 em { color: var(--brand); }
.stage-grain { position: absolute; inset: 0; pointer-events: none; opacity: .18; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.login-panel { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; animation: rise .8s var(--ease) both; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, #D12460, var(--brand) 55%, var(--brand-700)); color: #fff; box-shadow: var(--shadow-brand); }
.login-mark svg { width: 34px; height: auto; }
.wordmark { font-weight: 700; letter-spacing: .22em; font-size: 1.05rem; }
.login-card h1 { font-size: 2rem; letter-spacing: -.02em; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: .8rem; margin-top: 10px; }
.login-foot .i { color: var(--ok); }

.onboard { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.onboard-card {
  width: min(620px, 100%);
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 20px;
  animation: rise .7s var(--ease) both;
}
.onboard-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 6px; }
.onboard-head .login-mark { margin-bottom: 8px; }
.onboard-head h1 { font-size: 1.9rem; }

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 460px; }
.error-mark { width: 90px; color: var(--brand); margin-bottom: 14px; animation: float 5s ease-in-out infinite; }
.error-card h1 { font-size: 2rem; }
.error-card p { color: var(--muted); margin-bottom: 10px; }

/* ---------- Tabbar (mobile employé) ---------- */
.tabbar { display: none; }

/* ---------- Balance ---------- */
.balance-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
  padding: 40px;
  border-radius: var(--r-xl);
  color: #fff;
  background:
    radial-gradient(70% 120% at 90% 0%, rgba(255, 195, 220, .55), transparent 55%),
    linear-gradient(140deg, #D12460, var(--brand) 40%, #5E0A26);
  box-shadow: 0 30px 60px -30px rgba(126, 13, 49, .8);
}
.balance-main { position: relative; z-index: 1; }
.balance-amount { display: block; font-size: clamp(2.6rem, 7vw, 4.2rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; margin: 8px 0; }
.balance-main p { opacity: .85; }
.balance-meta { position: relative; z-index: 1; margin: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px 24px; border-radius: 20px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .15); min-width: 230px; }
.balance-meta dt { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.balance-meta dd { margin: 0; font-size: 1.2rem; font-weight: 600; }
.balance-orb span { position: absolute; border-radius: 50%; filter: blur(2px); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .5), rgba(255, 195, 220, .15) 50%, transparent 70%); animation: orb 12s ease-in-out infinite; }
.balance-orb span:nth-child(1) { width: 260px; height: 260px; right: 18%; top: -120px; }
.balance-orb span:nth-child(2) { width: 140px; height: 140px; left: 40%; bottom: -70px; animation-delay: -4s; }
.balance-orb span:nth-child(3) { width: 70px; height: 70px; left: 8%; top: 20px; animation-delay: -8s; }
@keyframes orb { 50% { transform: translate(20px, 18px) scale(1.08); } }
.timeline .list-row { position: relative; padding-left: 22px; }
.tl-dot { position: absolute; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--rose-50); }

/* ---------- Cash ---------- */
.cash-grid { display: grid; grid-template-columns: 1fr .9fr 1fr; gap: 22px; align-items: stretch; }
.cash-card.is-done { background: linear-gradient(160deg, var(--ok-bg), var(--card) 50%); }
.cash-value { font-size: 2rem; font-weight: 600; letter-spacing: -.02em; }
.cash-mid { justify-content: center; text-align: center; gap: 6px; background: var(--card-2); }
.gap { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 99px; font-weight: 600; font-size: .85rem; }
.gap.ok { background: var(--ok-bg); color: var(--ok); }
.gap.ko { background: var(--danger-bg); color: var(--danger); }
.cash-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cash-flow li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); }
.cash-flow li b { display: block; font-weight: 500; }
.cash-flow li strong { font-size: 1.05rem; }
.cash-flow .cf-total { background: var(--rose-50); color: var(--brand); }
.cf-ic, .ar-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--card); color: var(--brand); box-shadow: var(--shadow-sm); }
.cf-ic .i, .ar-ic .i { width: 18px; height: 18px; }
.disclosure summary { cursor: pointer; color: var(--muted); font-size: .86rem; display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary:hover { color: var(--brand); }
.disclosure[open] summary { margin-bottom: 12px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .price-input { flex: 1; }

.check-list { display: flex; flex-direction: column; gap: 6px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; cursor: pointer; transition: background .2s; }
.check-row:hover { background: var(--card-2); }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--line-2); transition: background .25s; flex: none; }
.switch i { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .35s var(--spring); }
.check-row input:checked ~ .switch { background: var(--brand); }
.check-row input:checked ~ .switch i { transform: translateX(18px); }
.check-row input:focus-visible ~ .switch { box-shadow: 0 0 0 4px var(--brand-glow); }

/* ---------- Payment method cards ---------- */
.pm-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.pm-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); transition: transform .3s var(--spring); }
.pm-card:hover { transform: translateY(-3px); }
.pm-card.is-empty { opacity: .45; }
.pm-card strong { font-size: 1.25rem; letter-spacing: -.01em; }
.pm-name { font-size: .82rem; color: var(--muted); font-weight: 500; }
.pm-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 8px; color: #fff; background: var(--pmc); box-shadow: 0 8px 18px -8px var(--pmc); }
.pm-ic .i { width: 20px; height: 20px; }
.pm-card .bar i { animation-delay: .2s; }

.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini-stats > div { padding: 12px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); min-width: 0; }
.mini-stats small { display: block; color: var(--muted); font-size: .74rem; }
.mini-stats strong { font-size: 1.1rem; white-space: nowrap; }
.mini-stats-wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.range-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.range-form input[type="date"] { width: auto; min-height: 38px; padding: 6px 10px; font-size: .88rem; }
.range-form span { color: var(--muted); }
.filter-bar { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 14px 18px; gap: 12px; }
form.filter-bar { justify-content: flex-start; }
.filter-bar select { width: auto; min-height: 38px; padding: 6px 36px 6px 12px; font-size: .88rem; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 7px 14px; border-radius: 99px; font-size: .85rem; font-weight: 500; color: var(--ink-2); background: var(--bg); transition: all .2s; }
.pill:hover { color: var(--brand); background: var(--rose-50); }
.pill.is-active { background: var(--ink); color: var(--bg); }

/* ---------- Performance ---------- */
.perf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.perf-card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .4s var(--ease), box-shadow .3s;
}
.perf-card.is-inactive { opacity: .6; }
.perf-card header { display: flex; align-items: center; gap: 14px; }
.perf-card h3 { font-size: 1.1rem; }
.perf-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.perf-figures small { display: block; color: var(--muted); font-size: .76rem; }
.perf-figures strong { font-size: 1.2rem; }
.perf-balance { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; margin: 0 -6px -6px; border-radius: 18px; background: var(--card-2); }
.perf-balance small { display: block; font-size: .76rem; color: var(--muted); }
.perf-balance strong { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.perf-balance form { margin: 0; }
.paid-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line-2); cursor: pointer; font-weight: 600; transition: all .25s var(--spring); }
.paid-toggle:hover { border-color: var(--brand); transform: translateY(-1px); }
.paid-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pt-box { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--line-2); color: transparent; transition: all .3s var(--spring); }
.pt-box .i { width: 16px; height: 16px; }
.paid-toggle input:checked + .pt-box { background: var(--ok); border-color: var(--ok); color: #fff; transform: scale(1.1); }
.paid-toggle.is-paid { color: var(--ok); border-color: var(--ok-bg); background: var(--ok-bg); cursor: default; }

/* ---------- People ---------- */
.people-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card-2); transition: all .25s var(--ease); }
.person strong { display: block; font-weight: 500; }
.person small { color: var(--muted); font-size: .8rem; }
.person:hover { border-color: var(--rose); }
.person.is-active { border-color: var(--brand); background: var(--rose-50); box-shadow: 0 10px 24px -14px var(--brand-glow); }
.head-user { display: flex; align-items: center; gap: 14px; }
.people-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.ptab { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; font-weight: 500; font-size: .88rem; transition: all .2s; }
.ptab:hover { border-color: var(--rose); }
.ptab.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ptab .avatar { box-shadow: none; width: 30px; height: 30px; }

/* ---------- Users ---------- */
.credentials { padding: 20px 22px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--ink), #3A1C29); color: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; animation: rise .6s var(--spring); }
.cred-head { display: flex; align-items: center; gap: 14px; }
.cred-head > .i { width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--brand); }
.cred-head small { display: block; opacity: .7; }
.cred-grid { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.cred-grid small { display: block; font-size: .72rem; opacity: .6; text-transform: uppercase; letter-spacing: .1em; }
.cred-grid code { font-size: 1.15rem; color: var(--rose); user-select: all; }
.grid-profile { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 22px; align-items: start; }
.profile-card { align-items: center; text-align: center; }
.profile-card .mini-stats { width: 100%; }
.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); margin: 0; }
.action-row strong { display: block; font-weight: 500; }
.action-row small { display: block; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch input { position: absolute; opacity: 0; }
.swatch i { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: 0 0 0 3px var(--card); transition: transform .25s var(--spring), box-shadow .2s; }
.swatch input:checked + i { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--c); transform: scale(1.08); }
.meta-list { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.meta-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.meta-list > div:last-child { border: 0; padding: 0; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 500; text-align: right; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 25%, transparent); align-items: flex-start; gap: 8px; }
.sec-list .i { color: var(--ok) !important; }

/* ---------- Reports ---------- */
.segmented { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); align-self: flex-start; }
.segmented a { padding: 8px 16px; border-radius: 10px; font-weight: 500; font-size: .9rem; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.segmented a em { font-size: .74rem; padding: 1px 7px; border-radius: 99px; background: var(--bg); }
.segmented a.is-active { background: var(--ink); color: var(--bg); }
.segmented a.is-active em { background: var(--brand); color: #fff; }
.report-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
.report-card header { display: flex; align-items: center; gap: 12px; }
.report-card header strong, .report-card header small { display: block; }
.report-target { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-size: .88rem; transition: border-color .2s; }
.report-target:hover { border-color: var(--brand); }
.report-target .i { color: var(--brand); }
blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--brand); background: var(--rose-50); border-radius: 0 12px 12px 0; font-size: .93rem; }
.reply-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reply-form input { flex: 1 1 220px; min-height: 38px; padding: 7px 12px; font-size: .88rem; }
.reply { display: flex; gap: 6px; align-items: flex-start; color: var(--ok); font-size: .86rem; margin-top: 4px; }
.reply .i { margin-top: 2px; }
.report-row .grow { white-space: normal; }

/* ---------- Gallery ---------- */
.gallery-day { display: flex; flex-direction: column; gap: 14px; }
.gallery-title { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 600; }
.gallery-title em { font-size: .74rem; padding: 2px 9px; border-radius: 99px; background: var(--rose-50); color: var(--brand); font-weight: 600; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.g-item { position: relative; margin: 0; border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .3s; }
.g-item:hover { box-shadow: var(--shadow-lg); }
.g-item > button { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; cursor: zoom-in; overflow: hidden; background: var(--bg-2); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.g-item:hover img { transform: scale(1.06); }
.g-item figcaption { position: relative; padding: 10px 12px 12px; font-size: .82rem; }
.g-item figcaption strong { display: block; font-weight: 500; margin-top: 4px; }
.g-item figcaption small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-kind { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.g-kind.service { color: var(--pm-cheque); }
.g-kind .i { width: 12px; height: 12px; }
.g-dl { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); }
.g-dl:hover { background: var(--rose-50); color: var(--brand); }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pager a { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--card); border: 1px solid var(--line); font-weight: 500; }
.pager a.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Audit ---------- */
.audit .list-row { align-items: flex-start; }
.audit .grow strong { display: inline; }
.audit-meta { text-align: right; }
.audit-meta small { display: block; font-size: .78rem; color: var(--ink-2); }
.audit-meta code { font-size: .74rem; color: var(--muted); }

/* ---------- Confirm dialog ---------- */
.confirm-box { text-align: center; align-items: center; }
.confirm-box .confirm-ic { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: var(--rose-50); color: var(--brand); }
.confirm-box .confirm-ic .i { width: 28px; height: 28px; }
.confirm-box p { color: var(--ink-2); }
.confirm-box .sheet-actions { justify-content: center; width: 100%; }
.confirm-box .sheet-actions .btn { flex: 1; }

/* ---------- 3D tilt ---------- */
[data-tilt], [data-tilt-soft] { transform-style: preserve-3d; will-change: transform; }

/* ---------- Page entrance ---------- */
.content > * { animation: rise .45s var(--ease) both; }
.content > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4) { animation-delay: .12s; }
.content > *:nth-child(5) { animation-delay: .16s; }
.kpi:nth-child(2) { animation-delay: .05s; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1280px) {
  .pm-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .presta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .presta-grid > .card:last-child { grid-column: span 2; }
  .photo-inputs { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid .span-2 { grid-column: span 2; }
}

@media (max-width: 1080px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform .45s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(14, 10, 11, .4); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sidebar.is-open + .scrim { opacity: 1; pointer-events: auto; }
  .burger { display: inline-grid; }
  .topbar { padding: 16px 22px 14px; }
  .content { padding: 6px 22px 40px; }
  .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-layout, .cal-layout-admin { grid-template-columns: 1fr; }
  .cal { position: static; }
  .dash-employee { grid-template-columns: 1fr; }
  .dash-employee .hero-card-wrap { grid-row: auto; max-width: 440px; margin: 0 auto; width: 100%; }
  .dash-employee .chart-card { grid-column: auto; }
  .cash-grid { grid-template-columns: 1fr; }
  .grid-profile { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; grid-template-rows: 42vh auto; }
  .stage-copy { left: 28px; right: 28px; bottom: 28px; }
  .stage-title { font-size: 1.6rem; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .hide-sm { display: none !important; }
  .topbar h1 { font-size: 1.3rem; }
  .topbar p { font-size: .82rem; }
  .topbar { padding: 14px 16px 12px; gap: 10px; }
  .content { padding: 4px 16px 32px; gap: 16px; }
  .card { padding: 18px; border-radius: 20px; }
  .kpis, .kpis-3 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpis .kpi:first-child:nth-last-child(3) { grid-column: span 2; }
  .dash-employee .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 16px; }
  .kpi-value { font-size: 1.35rem; }
  .kpi-hero .kpi-value { font-size: 1.6rem; }
  .kpi-icon { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 .field:first-child { grid-column: span 2; }
  .presta-grid { grid-template-columns: 1fr; }
  .presta-grid > .card:last-child { grid-column: auto; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid .span-2 { grid-column: auto; }
  .pm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-stats { grid-template-columns: 1fr 1fr 1fr; }
  .balance-hero { grid-template-columns: 1fr; padding: 28px 22px; }
  .balance-meta { min-width: 0; }
  .perf-grid, .report-list { grid-template-columns: 1fr; }
  .toasts { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; max-width: none; }

  /* Tables → cartes */
  .table-wrap { margin: 0; padding: 0; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td, .table tfoot { display: block; width: 100%; }
  .table tr { padding: 12px 0; border-bottom: 1px solid var(--line); position: relative; }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; text-align: left; flex: none; }
  .table td:not([data-label])::before { content: none; }
  .table td.td-actions { justify-content: flex-end; }
  .table .num { text-align: right; }
  .table tfoot tr { display: none; }
  .table td[data-label="Utilisateur"], .table td[data-label="Prothésiste"] { justify-content: flex-start; text-align: left; }
  .table td[data-label="Utilisateur"]::before, .table td[data-label="Prothésiste"]::before { content: none; }

  /* Tabbar app employé */
  .role-employee .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    height: 68px; padding: 0 6px;
    border-radius: 24px;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    border: 1px solid var(--line);
    box-shadow: 0 20px 40px -12px rgba(27, 21, 23, .3);
    z-index: 50;
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .66rem; font-weight: 500; color: var(--muted); padding: 6px 0; }
  .tabbar a .i { width: 22px; height: 22px; transition: transform .3s var(--spring); }
  .tabbar a.is-active { color: var(--brand); }
  .tabbar a.is-active .i { transform: translateY(-2px) scale(1.1); }
  .tab-cta { position: relative; }
  .cta-dot { width: 54px; height: 54px; margin-top: -26px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #D82A67, var(--brand) 55%, var(--brand-700)); box-shadow: 0 12px 24px -8px var(--brand-glow), 0 0 0 5px var(--bg); transform: rotate(45deg); transition: transform .4s var(--spring); }
  .cta-dot .i { transform: rotate(-45deg); width: 26px !important; height: 26px !important; }
  .tab-cta:active .cta-dot { transform: rotate(45deg) scale(.9); }
  .role-employee .content { padding-bottom: 110px; }
  .role-employee .sticky-submit { bottom: 96px; }

  dialog.sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 28px 28px 0 0; max-height: 92vh; }
  dialog.sheet[open] { animation: sheet-up .45s var(--ease); }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  .sheet-body { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }

  .login { grid-template-rows: 34vh auto; }
  .stage-copy { display: none; }
  .login-card h1 { font-size: 1.6rem; }
  .login-brand { display: none; }
  .onboard-card { padding: 26px 20px; }
  .avatar-picker { flex-direction: column; text-align: center; }
  .cal { padding: 14px; }
  .cal-day { border-radius: 10px; font-size: .86rem; }
  .cal-sum { display: none; }
  .agenda::before { left: 50px; }
  .ag-item { grid-template-columns: 42px minmax(0, 1fr); gap: 18px; }
  .ag-item::before { left: 45px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar select, .range-form input[type="date"] { flex: 1; width: 100%; }
  .action-row { flex-wrap: wrap; }
  .photo-inputs { grid-template-columns: 1fr 1fr; }
  .pm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perf-balance { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
