/* ============ Atelier — wedding planner design tokens ============ */
:root{
  --bg: #F4F1EA;
  --bg-deep: #EDE9DF;
  --surface: #FDFCF9;
  --surface-2: #F8F6F0;
  --ink: #28231C;
  --ink-2: #6E665A;
  --ink-3: #A39A8B;
  --line: #E4DECF;
  --line-2: #D6CEBC;
  --accent: oklch(0.58 0.09 80);        /* brass */
  --accent-deep: oklch(0.46 0.09 80);
  --accent-soft: oklch(0.94 0.025 85);
  --accent-line: oklch(0.84 0.055 85);
  --st-lead: oklch(0.52 0.08 310);
  --st-confirme: oklch(0.52 0.10 155);
  --st-attente: oklch(0.58 0.11 75);
  --st-cours: oklch(0.52 0.09 245);
  --st-annule: oklch(0.52 0.13 25);
  --st-done: oklch(0.52 0.02 80);
  --shadow-sm: 0 1px 2px rgba(46,38,26,.06), 0 1px 6px rgba(46,38,26,.04);
  --shadow-md: 0 2px 6px rgba(46,38,26,.07), 0 8px 28px rgba(46,38,26,.08);
  --shadow-lg: 0 4px 12px rgba(46,38,26,.10), 0 24px 64px rgba(46,38,26,.18);
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; height:100%; }
body{ font-family:var(--sans); color:var(--ink); background:var(--bg); font-size:14px; line-height:1.5;
  -webkit-font-smoothing:antialiased; }
#root{ height:100%; }
h1,h2,h3,h4{ margin:0; font-weight:600; }
p{ margin:0; }
button{ font-family:inherit; font-size:inherit; color:inherit; background:none; border:none; padding:0; cursor:pointer; }
input,textarea,select{ font-family:inherit; font-size:inherit; color:inherit; }
::placeholder{ color:var(--ink-3); }

/* ---------- type ---------- */
.display{ font-family:var(--serif); font-weight:600; letter-spacing:-0.01em; line-height:1.08; }
.label{ font-size:11px; font-weight:600; letter-spacing:0.13em; text-transform:uppercase; color:var(--ink-2); }
.label .ct{ color:var(--ink-3); font-weight:500; margin-left:6px; letter-spacing:0.08em; }
.meta{ font-size:12.5px; color:var(--ink-2); }
.meta-3{ font-size:12px; color:var(--ink-3); }

/* ---------- app frame ---------- */
.frame{ display:grid; grid-template-columns:auto 1fr; grid-template-rows:54px 1fr; height:100vh; }
.topbar{ grid-column:2; grid-row:1; display:flex; align-items:center; gap:14px; padding:0 18px 0 12px;
  background:var(--surface); border-bottom:1px solid var(--line); position:relative; z-index:40; }
.rail{ grid-column:1; grid-row:1/3; display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:10px 10px 14px; background:var(--surface); border-right:1px solid var(--line);
  width:60px; transition:width .22s cubic-bezier(.4,0,.2,1); overflow:hidden; position:relative; z-index:30; }
.rail.rail-open{ width:220px; align-items:stretch; }
.main{ grid-column:2; grid-row:2; overflow:auto; position:relative; }
.page{ max-width:1180px; margin:0 auto; padding:36px 44px 80px; }
.page-wide{ max-width:1380px; }

/* topbar pieces */
.logo-mark{ display:flex; align-items:center; gap:10px; padding:6px 10px 6px 6px; border-radius:var(--r-sm); }
.logo-mark:hover{ background:var(--surface-2); }
.logo-glyph{ width:30px; height:30px; border-radius:50%; background:var(--ink); color:#F3EDDF;
  display:grid; place-items:center; font-family:var(--serif); font-size:17px; font-weight:600; }
.logo-name{ font-family:var(--serif); font-size:19px; font-weight:600; letter-spacing:0.01em; }
.crumb-sep{ color:var(--line-2); font-size:16px; }
.room-select{ display:flex; align-items:center; gap:9px; padding:7px 12px; border-radius:var(--r-sm);
  border:1px solid transparent; }
.room-select:hover{ background:var(--surface-2); border-color:var(--line); }
.room-select b{ font-weight:600; }
.role-switch{ margin-left:auto; display:flex; background:var(--surface-2); border:1px solid var(--line);
  border-radius:99px; padding:3px; gap:2px; }
.role-switch button{ padding:5px 14px; border-radius:99px; font-size:12.5px; font-weight:600; color:var(--ink-2); }
.role-switch button.on{ background:var(--ink); color:#F6F1E6; }

/* rail */
.rail-toggle{ width:36px; height:36px; border-radius:var(--r-md); display:grid; place-items:center;
  color:var(--ink-3); flex:none; margin-bottom:6px; transition:background .12s, color .12s; }
.rail-toggle:hover{ background:var(--surface-2); color:var(--ink); }
.rail-open .rail-toggle{ align-self:flex-end; margin-right:2px; }
.rail-divider{ width:26px; height:1px; background:var(--line); margin:0 0 6px; flex:none; }
.rail-open .rail-divider{ width:100%; }
.rail-btn{ width:40px; height:40px; border-radius:var(--r-md); display:flex; align-items:center;
  justify-content:center; color:var(--ink-2); position:relative; flex:none;
  transition:background .12s, color .12s; }
.rail-btn:hover{ background:var(--surface-2); color:var(--ink); }
.rail-btn.on{ background:var(--accent-soft); color:var(--accent-deep); }
.rail-btn.on::before{ content:""; position:absolute; right:-10px; left:auto; top:8px; bottom:8px; width:3px;
  border-radius:3px; background:var(--accent); }
.rail-open .rail-btn{ width:100%; justify-content:flex-start; padding:0 10px; gap:12px; }
.rail-open .rail-btn.on::before{ right:0; left:auto; }
.rail-label{ font-size:13px; font-weight:500; white-space:nowrap; display:none; }
.rail-open .rail-label{ display:block; }
.rail-sep{ width:26px; height:1px; background:var(--line); margin:8px 0; flex:none; }
.rail-open .rail-sep{ width:calc(100% - 4px); margin-left:2px; }
.rail-btn .tip{ position:absolute; left:calc(100% + 8px); right:auto; top:50%;
  transform:translateY(-50%); background:var(--ink); color:#F6F1E6; font-size:12px; font-weight:500;
  padding:4px 10px; border-radius:5px; white-space:nowrap;
  opacity:0; pointer-events:none; transition:opacity .12s; z-index:60; }
.rail-btn:hover .tip{ opacity:1; }
.rail-open .rail-btn .tip{ display:none; }

/* ---------- buttons ---------- */
.btn{ display:inline-flex; align-items:center; gap:7px; padding:8px 16px; border-radius:var(--r-sm);
  font-weight:600; font-size:13.5px; border:1px solid transparent; transition:all .12s; white-space:nowrap; }
.btn-primary{ background:var(--ink); color:#F6F1E6; }
.btn-primary:hover{ background:#3D362C; }
.btn-outline{ border-color:var(--line-2); background:var(--surface); }
.btn-outline:hover{ border-color:var(--ink-3); }
.btn-ghost{ color:var(--ink-2); }
.btn-ghost:hover{ background:rgba(46,38,26,.06); color:var(--ink); }
.btn-accent{ background:var(--accent-soft); color:var(--accent-deep); border-color:var(--accent-line); }
.btn-accent:hover{ background:oklch(0.91 0.04 85); }
.btn-danger{ color:var(--st-annule); }
.btn-danger:hover{ background:oklch(0.52 0.13 25 / .08); }
.btn-sm{ padding:5px 11px; font-size:12.5px; }
.btn-icon{ width:30px; height:30px; padding:0; justify-content:center; border-radius:var(--r-sm); color:var(--ink-2); }
.btn-icon:hover{ background:rgba(46,38,26,.07); color:var(--ink); }
.btn[disabled]{ opacity:.45; cursor:default; }

/* ---------- status ---------- */
.status{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600;
  padding:3px 10px 3px 8px; border-radius:99px; border:1px solid; white-space:nowrap; }
.status .dot{ width:6px; height:6px; border-radius:50%; background:currentColor; }
.status-lead{ color:var(--st-lead); border-color:oklch(0.52 0.08 310/.3); background:oklch(0.52 0.08 310/.07); }
.status-confirme{ color:var(--st-confirme); border-color:oklch(0.52 0.10 155/.3); background:oklch(0.52 0.10 155/.07); }
.status-attente{ color:var(--st-attente); border-color:oklch(0.58 0.11 75/.35); background:oklch(0.58 0.11 75/.08); }
.status-cours{ color:var(--st-cours); border-color:oklch(0.52 0.09 245/.3); background:oklch(0.52 0.09 245/.07); }
.status-annule{ color:var(--st-annule); border-color:oklch(0.52 0.13 25/.3); background:oklch(0.52 0.13 25/.07); }
.status-done{ color:var(--st-done); border-color:oklch(0.52 0.02 80/.3); background:oklch(0.52 0.02 80/.07); }

/* ---------- cards / lists ---------- */
.card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow-sm); }
.card-hover{ transition:box-shadow .15s, border-color .15s, transform .15s; cursor:pointer; }
.card-hover:hover{ box-shadow:var(--shadow-md); border-color:var(--line-2); transform:translateY(-1px); }
.row-list{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  box-shadow:var(--shadow-sm); overflow:hidden; }
.row-list > * + *{ border-top:1px solid var(--line); }

/* table */
table.tbl{ width:100%; border-collapse:collapse; }
.tbl th{ text-align:left; font-size:11px; font-weight:600; letter-spacing:0.11em; text-transform:uppercase;
  color:var(--ink-3); padding:10px 16px; border-bottom:1px solid var(--line); }
.tbl td{ padding:12px 16px; border-bottom:1px solid var(--line); vertical-align:middle; }
.tbl tbody tr:last-child td{ border-bottom:none; }
.tbl tbody tr:hover{ background:var(--surface-2); }

/* ---------- avatar ---------- */
.avatar{ width:28px; height:28px; border-radius:50%; display:grid; place-items:center;
  font-size:11px; font-weight:700; color:#fff; flex:none; }
.avatar-stack{ display:flex; }
.avatar-stack .avatar{ border:2px solid var(--surface); margin-left:-7px; }
.avatar-stack .avatar:first-child{ margin-left:0; }

/* ---------- inputs ---------- */
.input, .select, .textarea{ width:100%; padding:8px 12px; border:1px solid var(--line-2); border-radius:var(--r-sm);
  background:var(--surface); transition:border-color .12s, box-shadow .12s; }
.input:focus, .select:focus, .textarea:focus{ outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft); }
.textarea{ resize:vertical; min-height:90px; line-height:1.55; }
.field{ display:flex; flex-direction:column; gap:6px; }
.field > .label{ letter-spacing:0.1em; }
.saved-flash{ font-size:11.5px; color:var(--st-confirme); font-weight:600; display:inline-flex; align-items:center;
  gap:4px; animation:fadeSlide .25s; }
@keyframes fadeSlide{ from{ opacity:0; transform:translateY(2px);} }

/* search */
.search{ display:flex; align-items:center; gap:8px; padding:8px 12px; border:1px solid var(--line-2);
  border-radius:var(--r-sm); background:var(--surface); color:var(--ink-2); }
.search input{ border:none; outline:none; background:none; flex:1; color:var(--ink); }

/* pills */
.pills{ display:flex; gap:6px; flex-wrap:wrap; }
.pill{ padding:6px 13px; border-radius:99px; border:1px solid var(--line-2); font-size:12.5px;
  font-weight:600; color:var(--ink-2); background:var(--surface); }
.pill:hover{ border-color:var(--ink-3); color:var(--ink); }
.pill.on{ background:var(--ink); color:#F6F1E6; border-color:var(--ink); }

/* view toggle */
.vtoggle{ display:flex; border:1px solid var(--line-2); border-radius:var(--r-sm); overflow:hidden; background:var(--surface); }
.vtoggle button{ padding:6px 10px; color:var(--ink-3); display:grid; place-items:center; }
.vtoggle button.on{ background:var(--surface-2); color:var(--ink); }
.vtoggle button + button{ border-left:1px solid var(--line); }

/* progress */
.prog{ height:5px; border-radius:99px; background:var(--bg-deep); overflow:hidden; flex:1; }
.prog > div{ height:100%; border-radius:99px; background:var(--accent); transition:width .3s; }
.prog.green > div{ background:var(--st-confirme); }

/* ---------- modal ---------- */
.modal-veil{ position:fixed; inset:0; background:rgba(40,33,22,.42); z-index:100; display:grid;
  place-items:center; padding:30px; animation:veilIn .18s; backdrop-filter:blur(2px); }
@keyframes veilIn{ from{ opacity:0; } }
.modal{ background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--shadow-lg); width:520px;
  max-width:100%; max-height:86vh; display:flex; flex-direction:column; animation:modalIn .2s cubic-bezier(.2,.9,.3,1); }
@keyframes modalIn{ from{ opacity:0; transform:translateY(10px) scale(.985); } }
.modal-head{ display:flex; align-items:center; justify-content:space-between; padding:18px 22px 0; }
.modal-title{ font-family:var(--serif); font-size:24px; font-weight:600; }
.modal-body{ padding:18px 22px; overflow:auto; display:flex; flex-direction:column; gap:16px; }
.modal-foot{ display:flex; justify-content:flex-end; gap:10px; padding:14px 22px 18px; border-top:1px solid var(--line); }

/* ---------- empty / loading ---------- */
.empty{ display:flex; flex-direction:column; align-items:center; gap:12px; padding:54px 20px; text-align:center; }
.empty-glyph{ width:52px; height:52px; border-radius:50%; background:var(--surface-2); border:1px dashed var(--line-2);
  display:grid; place-items:center; color:var(--ink-3); }
.empty h3{ font-family:var(--serif); font-size:21px; font-weight:600; }
.empty p{ color:var(--ink-2); max-width:340px; font-size:13px; }
.skeleton{ border-radius:var(--r-sm); background:linear-gradient(100deg, var(--bg-deep) 30%, #F3EFE6 50%, var(--bg-deep) 70%);
  background-size:200% 100%; animation:shimmer 1.3s infinite linear; }
@keyframes shimmer{ from{ background-position:130% 0;} to{ background-position:-70% 0;} }

/* ---------- imagery placeholder ---------- */
.ph{ position:relative; background:repeating-linear-gradient(-45deg, #EFEAE0 0 10px, #E9E3D6 10px 20px);
  display:grid; place-items:center; overflow:hidden; }
.ph span{ font-family:ui-monospace, monospace; font-size:11px; color:var(--ink-3); letter-spacing:0.06em;
  background:rgba(253,252,249,.85); padding:3px 9px; border-radius:4px; }

/* ---------- page headers ---------- */
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:26px; }
.page-head h1{ font-size:38px; }
.page-kicker{ font-size:11.5px; font-weight:700; letter-spacing:0.16em; text-transform:uppercase;
  color:var(--accent-deep); margin-bottom:8px; }
.head-actions{ display:flex; gap:10px; align-items:center; }

/* section header */
.sec-head{ display:flex; align-items:center; gap:10px; margin:30px 0 12px; }
.sec-head:first-child{ margin-top:0; }
.sec-head .rule{ flex:1; height:1px; background:var(--line); }

/* tabs */
.tabs{ display:flex; gap:2px; border-bottom:1px solid var(--line); }
.tabs button{ padding:10px 16px; font-weight:600; font-size:13.5px; color:var(--ink-2); border-bottom:2px solid transparent;
  margin-bottom:-1px; }
.tabs button:hover{ color:var(--ink); }
.tabs button.on{ color:var(--ink); border-bottom-color:var(--accent); }

/* checkbox */
.ck{ width:17px; height:17px; border-radius:5px; border:1.5px solid var(--line-2); background:var(--surface);
  display:grid; place-items:center; color:transparent; flex:none; transition:all .12s; cursor:pointer; }
.ck.on{ background:var(--st-confirme); border-color:var(--st-confirme); color:#fff; }
.ck:hover{ border-color:var(--ink-3); }
.ck.on:hover{ border-color:var(--st-confirme); }

/* misc */
.flex{ display:flex; align-items:center; gap:10px; }
.grow{ flex:1; min-width:0; }
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.dim{ opacity:.55; }
.num-badge{ font-family:var(--serif); font-size:15px; font-weight:600; color:var(--ink-3); }
.kbd-hint{ font-size:11px; color:var(--ink-3); }
a{ color:var(--accent-deep); }
.divider-v{ width:1px; height:22px; background:var(--line); }

/* editor toolbar toggles */
.ed-toggle{ display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:7px;
  font-size:11.5px; font-weight:600; color:var(--ink-3); border:1px solid transparent; }
.ed-toggle:hover{ background:var(--surface-2); color:var(--ink-2); }
.ed-toggle.on{ background:var(--accent-soft); color:var(--accent-deep); border-color:var(--accent-line); }

input[type="range"]{ accent-color: var(--accent); width:100%; }

/* scrollbars */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:var(--line-2); border-radius:99px; border:3px solid var(--bg); }
::-webkit-scrollbar-track{ background:transparent; }
