/* Dar Yusra — application devis
   Mise en page : une colonne téléphone (560 px max), bandeau bordeaux comme l'en-tête du devis,
   cartes blanches sur fond poudré, barre d'action fixe en bas. */
:root {
  --wine: #5B1219;
  --wine-2: #7A1E28;
  --wine-deep: #420C12;
  --blush: #F7EDEB;
  --blush-2: #EFDCD9;
  --line: #EADBD8;
  --ink: #2B1B1D;
  --ink-2: #6E5A5C;
  --label: #A3727A;
  --paper: #FFFFFF;
  --bg: #FBF6F5;
  --ok: #2F7A4F;

  --script: 'Pinyon Script', 'Snell Roundhand', 'Apple Chancery', cursive;
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --r: 16px;
  --shadow: 0 1px 2px rgba(66, 12, 18, .05), 0 10px 30px -14px rgba(66, 12, 18, .22);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --dock-h: 0px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font-size: 16px; } /* évite le zoom automatique sur iPhone */
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--wine-2); outline-offset: 2px; border-radius: 6px; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Structure ---------- */
.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; background: var(--bg); }
@media (min-width: 600px) {
  body { background: #EFE4E2; }
  .app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px -40px rgba(66, 12, 18, .35); }
}
#view { position: relative; }
.view { padding-bottom: calc(var(--dock-h) + 28px); min-height: 100dvh; }
.page { padding: 18px var(--gutter-r) 8px var(--gutter); display: flex; flex-direction: column; gap: 14px; }

/* ---------- Bandeau de marque ---------- */
.brand { background: var(--wine); color: #fff; padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter-r) 14px var(--gutter); }
.brand-frame { border: 1px solid rgba(255, 255, 255, .32); padding: 26px 10px 22px; display: grid; place-items: center; }

.logo { text-align: center; color: #fff; line-height: 1; font-size: 22px; }
.logo-main { display: inline-flex; align-items: flex-end; white-space: nowrap; }
.logo-d { font-family: var(--script); font-size: 2.7em; line-height: .78; margin-right: -.16em; transform: translateY(.1em); }
.logo-word { font-family: var(--serif); font-weight: 500; font-size: 1.6em; letter-spacing: .14em; }
.logo-sub { display: flex; align-items: center; justify-content: center; gap: .8em; margin-top: .5em; font-family: var(--serif); font-size: .62em; letter-spacing: .45em; }
.logo-sub span { padding-left: .45em; }
.logo-sub i { width: 3.4em; height: 1.5px; background: currentColor; }
.logo-tag { font-family: var(--serif); font-style: italic; font-size: .66em; letter-spacing: .32em; margin-top: .55em; opacity: .85; }

.brand .logo > * { animation: rise .9s var(--ease-out) both; }
.brand .logo-sub { animation-delay: .12s; }
.brand .logo-tag { animation-delay: .22s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Barres de titre ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--wine); }
.bar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) var(--gutter-r) 8px var(--gutter); background: var(--wine); color: #fff;
}
.bar-title { text-align: center; min-width: 0; }
.bar-title b { display: block; font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-title small { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; opacity: .7; }
.bar-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; transition: background .2s; }
.bar-btn:active { background: rgba(255, 255, 255, .14); }
.bar-btn .ic { width: 22px; height: 22px; }

.progress { height: 3px; background: var(--blush-2); position: sticky; top: calc(60px + env(safe-area-inset-top, 0px)); z-index: 19; }
.progress i { display: block; height: 100%; background: var(--wine-2); border-radius: 0 3px 3px 0; transition: width .5s var(--ease-out); }

.page-head { padding: calc(26px + env(safe-area-inset-top, 0px)) var(--gutter-r) 4px var(--gutter); }
.script-title { font-family: var(--script); font-weight: 400; color: var(--wine); font-size: 50px; line-height: 1.05; margin: 0; }
.page-head p, .lede { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.section-title { font-family: var(--serif); font-weight: 500; font-size: 22px; color: var(--wine); margin: 10px 0 0; display: flex; justify-content: space-between; align-items: baseline; }
.section-title a { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--wine-2); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 14px; font-weight: 600; font-size: 15px;
  transition: transform .18s var(--ease-out), background .2s, box-shadow .2s, opacity .2s;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--wine); color: #fff; box-shadow: 0 8px 20px -10px rgba(91, 18, 25, .7); }
.btn.primary:active { background: var(--wine-deep); }
.btn.ghost { background: var(--paper); color: var(--wine); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.btn-dashed { width: 100%; min-height: 50px; border-radius: 14px; border: 1.5px dashed #D5B8B5; color: var(--wine); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s, transform .18s var(--ease-out); }
.btn-dashed:active { background: var(--blush); transform: scale(.98); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); transition: background .2s, color .2s, transform .18s var(--ease-out); }
.icon-btn:active { transform: scale(.92); background: var(--blush); }
.icon-btn.danger:active { color: #B3261E; }
.link { color: var(--wine-2); font-size: 13px; font-weight: 600; }

/* ---------- Accueil ---------- */
.home-intro { padding-top: 6px; }
.home-intro .script-title { font-size: 46px; }
.action-card {
  position: relative; width: 100%; text-align: left; display: grid; grid-template-columns: 52px 1fr 20px; align-items: center; gap: 14px;
  padding: 18px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  transition: transform .22s var(--ease-out), box-shadow .22s; overflow: hidden;
}
.action-card:active { transform: scale(.98); }
.action-card .ac-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--blush); color: var(--wine); }
.action-card .ac-ic .ic { width: 24px; height: 24px; }
.action-card b { display: block; font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.1; }
.action-card small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.action-card .chev { color: var(--label); }
.action-card.primary { background: var(--wine); color: #fff; box-shadow: 0 18px 40px -20px rgba(91, 18, 25, .8); }
.action-card.primary .ac-ic { background: rgba(255, 255, 255, .12); color: #fff; }
.action-card.primary small { color: rgba(255, 255, 255, .75); font-style: italic; }
.action-card.primary .chev { color: rgba(255, 255, 255, .6); }
.action-card.primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .12) 45%, transparent 60%);
  transform: translateX(-100%); animation: sheen 3.6s 1s var(--ease-out) infinite;
}
@keyframes sheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.draft-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--blush); color: var(--wine); font-size: 14px; }
.draft-card b { font-weight: 600; }
.draft-card .grow { flex: 1; min-width: 0; }
.draft-card span.grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Cartes de devis ---------- */
.q-list { display: flex; flex-direction: column; gap: 10px; }
.q-card {
  display: block; padding: 15px 16px; border-radius: 16px; background: var(--paper);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transition: transform .2s var(--ease-out);
}
.q-card:active { transform: scale(.985); }
.q-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.q-name { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.15; min-width: 0; overflow-wrap: anywhere; }
.q-total { font-weight: 700; color: var(--wine); white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-meta { font-size: 12px; color: var(--label); letter-spacing: .04em; margin-top: 2px; }
.q-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px; border-radius: 99px; background: var(--blush); color: var(--ink-2); }
.tag .ic { width: 14px; height: 14px; }
.tag.pro { background: var(--wine); color: #fff; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--label); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--ink); }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty .script-title { font-size: 64px; opacity: .25; }
.empty p { margin: 4px 0 18px; }

/* ---------- Questionnaire ---------- */
.step { padding: 26px var(--gutter-r) 10px var(--gutter); display: flex; flex-direction: column; gap: 18px; }
.q-title { font-family: var(--serif); font-size: 31px; line-height: 1.12; font-weight: 600; margin: 0; color: var(--ink); text-wrap: balance; }
.q-hint { margin: -8px 0 0; color: var(--ink-2); font-size: 14px; }
.q-eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--label); font-weight: 600; }

.big-input { width: 100%; border: 0; border-bottom: 2px solid var(--line); background: none; padding: 10px 2px; font-family: var(--serif); font-size: 28px; outline: none; transition: border-color .25s; border-radius: 0; }
.big-input:focus { border-color: var(--wine); }
.big-input::placeholder { color: #CDB5B3; }
.money-big { display: flex; align-items: baseline; gap: 8px; }
.money-big .big-input { font-family: var(--sans); font-weight: 600; font-size: 34px; font-variant-numeric: tabular-nums; }
.money-big i { font-style: normal; font-size: 26px; color: var(--label); }

.fields { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--label); font-weight: 600; }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 0; background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line); outline: none; transition: box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--label) 50%), linear-gradient(135deg, var(--label) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { box-shadow: inset 0 0 0 2px var(--wine-2); }
.card .field input, .card .field select, .card .field textarea { background: var(--bg); }
.pro-only { display: flex; flex-direction: column; gap: 12px; }

.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  position: relative; width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto 28px; align-items: center; gap: 12px;
  padding: 16px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow .25s, background .25s, transform .2s var(--ease-out);
  animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms);
}
.choice:active { transform: scale(.98); }
.choice b { display: block; font-size: 16px; font-weight: 600; }
.choice small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.choice-price { font-weight: 700; color: var(--wine); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.choice-price small { font-weight: 500; color: var(--label); font-size: 11px; }
.choice-check { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line); color: #fff; transition: background .25s, box-shadow .25s; }
.choice-check .ic { width: 16px; height: 16px; stroke-width: 2.6; transform: scale(0); transition: transform .35s var(--ease-spring); }
.choice.is-on { background: var(--blush); box-shadow: inset 0 0 0 2px var(--wine); }
.choice.is-on .choice-check { background: var(--wine); box-shadow: none; }
.choice.is-on .choice-check .ic { transform: scale(1); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 15px; border-radius: 99px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14px; font-weight: 500; transition: background .2s, color .2s, box-shadow .2s, transform .18s var(--ease-out);
}
.chip:active { transform: scale(.95); }
.chip.is-on { background: var(--wine); color: #fff; box-shadow: none; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--blush); border-radius: 12px; padding: 4px; position: relative; isolation: isolate; }
.seg button { min-height: 42px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: color .25s; position: relative; z-index: 1; }
.stepper-row .seg { min-width: 140px; flex: none; }
.seg button.is-on { color: var(--wine); }
.seg-pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 9px; background: var(--paper); box-shadow: 0 2px 8px -2px rgba(66, 12, 18, .2); transition: transform .4s var(--ease-out), width .4s var(--ease-out); }

.stepper-block { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper-row > span { font-weight: 600; }
.stepper-row > span small { display: block; font-weight: 500; font-size: 12px; color: var(--label); }
.stepper { display: inline-grid; grid-template-columns: 44px 72px 44px; align-items: center; border-radius: 14px; background: var(--blush); padding: 3px; }
.stepper button { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; color: var(--wine); font-size: 22px; font-weight: 500; transition: background .15s, transform .15s var(--ease-out); }
.stepper button:active { background: var(--paper); transform: scale(.9); }
.stepper input { width: 100%; text-align: center; border: 0; background: none; outline: none; font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; padding: 0; }
.stepper.sm { grid-template-columns: 36px 1fr 36px; width: 100%; }
.stepper.sm button { width: 36px; height: 40px; font-size: 20px; }
.stepper.sm input { font-size: 16px; }
.pop { animation: pop .3s var(--ease-spring); }
@keyframes pop { 40% { transform: scale(1.18); } }

.note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin: 0; }
.note .ic { width: 16px; height: 16px; color: var(--wine-2); margin-top: 2px; }
.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out), opacity .3s; opacity: 0; }
.reveal > div { overflow: hidden; }
.reveal.open { grid-template-rows: 1fr; opacity: 1; }

.offer-list { display: flex; flex-direction: column; gap: 8px; }
.switch-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.switch-row .grow { flex: 1; min-width: 0; }
.switch-row small { display: block; color: var(--label); font-size: 12px; }
.switch-row input, .offer-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.switch { width: 46px; height: 28px; border-radius: 99px; background: var(--blush-2); position: relative; flex: none; transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .35s var(--ease-spring); }
input:checked + .switch { background: var(--wine); }
input:checked + .switch::after { transform: translateX(18px); }
input:focus-visible + .switch { outline: 2px solid var(--wine-2); outline-offset: 2px; }

/* ---------- Dock (barre d'action fixe) ---------- */
#dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; pointer-events: none; }
#dock > * { pointer-events: auto; }
.dock-inner {
  max-width: 560px; margin: 0 auto; padding: 12px var(--gutter-r) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  background: rgba(251, 246, 245, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 -1px 0 var(--line); display: flex; gap: 10px; align-items: center;
}
.dock-inner .btn.primary { flex: 1; }
.dock-in { animation: dockIn .45s var(--ease-out) both; }
@keyframes dockIn { from { transform: translateY(100%); } }

.checkout-sum { flex: 1; min-width: 0; line-height: 1.2; }
.checkout-sum span { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--label); font-weight: 600; }
.checkout-sum strong { display: block; font-size: 22px; font-weight: 700; color: var(--wine); font-variant-numeric: tabular-nums; white-space: nowrap; }
.checkout-sum small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.3; color: var(--ink-2); }
.dock-inner .checkout-btn { flex: none; }

/* ---------- Barre d'onglets ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  transition: transform .4s var(--ease-out);
}
.tabbar-inner {
  position: relative; max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px var(--gutter-r) calc(6px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 -1px 0 var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 11px; font-weight: 600; color: var(--label); position: relative; z-index: 1; transition: color .25s; }
.tab .ic { width: 22px; height: 22px; transition: transform .35s var(--ease-spring); }
.tab.is-on { color: var(--wine); }
.tab.is-on .ic { transform: translateY(-1px) scale(1.08); }
.tab-pill { position: absolute; z-index: 0; top: 6px; height: calc(100% - 12px - env(safe-area-inset-bottom, 0px)); border-radius: 14px; background: var(--blush); transition: transform .45s var(--ease-out), width .45s var(--ease-out); }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--wine); color: #fff; font-size: 10px; line-height: 18px; text-align: center; }
body.in-flow .tabbar { transform: translateY(110%); }
body:not(.in-flow) { --dock-h: 64px; }

/* ---------- Récapitulatif ---------- */
.card { background: var(--paper); border-radius: 20px; padding: 18px 16px; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 12px; animation: rise .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
.card-title { font-family: var(--serif); font-size: 23px; font-weight: 600; color: var(--wine); margin: 0; line-height: 1.1; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 > * { min-width: 0; }

.lines { display: flex; flex-direction: column; gap: 10px; }
.line {
  border-radius: 16px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .3s, background .3s, opacity .3s, transform .3s var(--ease-out);
}
.line.enter { animation: lineIn .5s var(--ease-out) both; }
@keyframes lineIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.line.leaving { opacity: 0; transform: translateX(-30px) scale(.96); }
.line.is-offered { background: #FBF3F1; box-shadow: inset 0 0 0 1.5px #E2C3C0; }
.line-head { display: flex; gap: 8px; align-items: flex-start; }
.line-label { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-weight: 600; font-size: 16px; padding: 6px 4px; border-radius: 8px; }
.line-detail { border: 0; background: none; outline: none; font-size: 16px; color: var(--ink-2); padding: 2px 4px; border-radius: 8px; width: 100%; }
.line-label:focus, .line-detail:focus { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--wine-2); }
.offer-toggle { flex: none; position: relative; cursor: pointer; }
.offer-toggle span { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--label); box-shadow: inset 0 0 0 1.5px var(--line); background: var(--paper); transition: all .25s; }
.offer-toggle span .ic { width: 15px; height: 15px; }
.offer-toggle input:checked + span { background: var(--wine); color: #fff; box-shadow: none; animation: pop .35s var(--ease-spring); }
.offer-toggle input:focus-visible + span { outline: 2px solid var(--wine-2); outline-offset: 2px; }
.line-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.line-grid > .lg-unit { grid-column: 1 / -1; order: 3; flex-direction: row; align-items: center; gap: 10px; }
.line-grid > .lg-unit .input { min-height: 40px; padding: 6px 10px; font-size: 16px; }
@media (min-width: 440px) {
  .line-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .line-grid > .lg-unit { grid-column: auto; order: 0; flex-direction: column; align-items: stretch; gap: 4px; }
  .line-grid > .lg-unit .input { min-height: 46px; padding: 10px; font-size: 16px; }
}
.line-grid > label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line-grid > label > span:first-child { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--label); font-weight: 600; }
.line-grid .input { min-height: 46px; padding: 10px; background: var(--paper); font-size: 16px; }
.money { position: relative; }
.money .input { padding-right: 24px; font-variant-numeric: tabular-nums; }
.money i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--label); font-size: 14px; }
.line-foot { display: flex; align-items: center; justify-content: space-between; }
.line-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.line-total s { color: var(--label); font-weight: 500; margin-right: 6px; }
.line-total em { color: var(--wine); font-family: var(--serif); font-size: 18px; font-style: italic; }
.mini-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-seg button { font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 99px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); transition: all .2s; }
.mini-seg button.is-on { background: var(--blush); color: var(--wine); box-shadow: inset 0 0 0 1.5px var(--wine); }
.line .switch-row { padding: 8px 10px; background: var(--paper); font-size: 13px; }
.line .switch { width: 40px; height: 24px; }
.line .switch::after { width: 18px; height: 18px; }
.line input:checked + .switch::after { transform: translateX(16px); }

/* ---------- Dictée ---------- */
.dictee { position: relative; }
.dictee textarea {
  width: 100%; min-height: 190px; padding: 16px 16px 76px; border-radius: 20px; border: 0; resize: vertical;
  background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line); outline: none; line-height: 1.55; transition: box-shadow .25s;
}
.dictee textarea:focus { box-shadow: var(--shadow), inset 0 0 0 2px var(--wine-2); }
.dictee.rec textarea { box-shadow: var(--shadow), inset 0 0 0 2px var(--wine); }
.mic {
  position: absolute; right: 14px; bottom: 14px; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wine); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(91, 18, 25, .7);
  transition: transform .25s var(--ease-spring), background .25s;
}
.mic:active { transform: scale(.92); }
.mic .ic { width: 26px; height: 26px; position: relative; z-index: 1; }
.mic-ring { position: absolute; inset: 0; border-radius: 50%; background: var(--wine-2); opacity: 0; }
.dictee.rec .mic { background: #B3261E; }
.dictee.rec .mic-ring { animation: ring 1.6s ease-out infinite; }
.dictee.rec .mic-ring.r2 { animation-delay: .8s; }
@keyframes ring { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.1); opacity: 0; } }
.mic-status { margin: -4px 0 0; font-size: 13px; color: var(--ink-2); min-height: 20px; }
.dictee.rec + .mic-status { color: #B3261E; font-weight: 600; }
.examples { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--label); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.examples .chip { min-height: 34px; font-size: 13px; letter-spacing: 0; text-transform: none; }
.detected { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.det { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; font-size: 13px; font-weight: 500; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.det.new { animation: chipIn .45s var(--ease-spring) both; }
@keyframes chipIn { from { opacity: 0; transform: scale(.6); } }
.det i { width: 7px; height: 7px; border-radius: 50%; background: var(--label); }
.det.k-client i { background: #8C5A9E; }
.det.k-event i { background: #C27B2E; }
.det.k-guests i { background: #2F7A4F; }
.det.k-line i { background: var(--wine); }
.det.k-price i { background: #2D6CA2; }
.det.k-gift { background: var(--wine); color: #fff; box-shadow: none; }
.det.k-gift i { background: #fff; }
.det.k-name { background: var(--blush); }
.muted { color: var(--label); font-size: 14px; }

/* ---------- Aperçu ---------- */
.preview { padding-top: 16px; }
.doc-frame { position: relative; overflow: hidden; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 24px 50px -24px rgba(66, 12, 18, .45); animation: docIn .7s var(--ease-out) both; }
@keyframes docIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.doc-frame .doc { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.preview-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; width: 100%; }
.preview-actions .btn.ghost { width: 52px; padding: 0; }
.pdf-holder { position: fixed; left: -10000px; top: 0; width: 794px; }

/* ---------- Feuilles, toasts, chargement ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(42, 10, 14, .42); animation: fade .3s ease both; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 86dvh; overflow: auto; background: var(--paper); border-radius: 24px 24px 0 0;
  padding: 10px var(--gutter-r) calc(18px + env(safe-area-inset-bottom, 0px)) var(--gutter); animation: sheetIn .45s var(--ease-out) both;
}
.sheet-wrap.closing .sheet { animation: sheetOut .28s ease-in both; }
.sheet-wrap.closing .sheet-backdrop { animation: fade .28s ease reverse both; }
@keyframes fade { from { opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--blush-2); margin: 0 auto 12px; }
.sheet h3 { font-family: var(--serif); font-size: 25px; color: var(--wine); margin: 0 0 4px; font-weight: 600; }
.sheet p { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.sheet-list { display: flex; flex-direction: column; gap: 4px; }
.sheet-item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px; border-radius: 14px; transition: background .2s; }
.sheet-item:active { background: var(--blush); }
.sheet-item .si-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--blush); color: var(--wine); display: grid; place-items: center; flex: none; }
.sheet-item b { display: block; font-weight: 600; }
.sheet-item small { display: block; color: var(--label); font-size: 12px; }
.sheet-item .grow { flex: 1; min-width: 0; }
.sheet-item .price { font-weight: 700; color: var(--wine); white-space: nowrap; }
.sheet-item.danger { color: #B3261E; }
.sheet-item.danger .si-ic { background: #FBE9E7; color: #B3261E; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

#toast { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 20px + env(safe-area-inset-bottom, 0px)); z-index: 80; transform: translateX(-50%); pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); display: flex; align-items: center; gap: 8px; animation: toastIn .4s var(--ease-spring) both; }
.toast .ic { width: 18px; height: 18px; color: #F2B8BE; }
.toast.out { animation: toastOut .3s ease-in both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

.busy { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(251, 246, 245, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .25s ease both; }
.busy-box { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--wine); font-weight: 600; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--blush-2); border-top-color: var(--wine); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shake { animation: shake .45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Réglages ---------- */
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.price-table td:last-child { text-align: right; font-weight: 700; color: var(--wine); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-table tr:last-child td { border-bottom: 0; }
.row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* =========================================================
   Document « Devis » (fidèle au modèle PDF, 794 × 1123 px)
   ========================================================= */
.doc {
  width: 794px; min-height: 1118px; background: #fff; color: #2b2b2b; font-family: var(--sans); font-size: 11px; line-height: 1.45;
  display: flex; flex-direction: column; text-align: left; -webkit-font-smoothing: antialiased;
}
.doc .d-head { background: #5B1219; padding: 18px; height: 168px; flex: none; }
.doc .d-frame { border: 1px solid rgba(255, 255, 255, .38); height: 100%; display: grid; place-items: center; }
.doc .logo { font-size: 29px; }
.doc .d-body { padding: 0 69px; flex: 1; display: flex; flex-direction: column; }
.doc .d-titlerow { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 16px; }
.doc .d-title { font-family: var(--script); font-weight: 400; font-size: 60px; color: #5B1219; line-height: 1.1; margin: 0; }
.doc .d-meta { display: grid; grid-template-columns: auto auto; column-gap: 34px; row-gap: 8px; align-items: baseline; margin: 0; }
.doc .d-meta dt { font-size: 8.5px; letter-spacing: .22em; color: #A0626A; text-transform: uppercase; }
.doc .d-meta dd { margin: 0; font-weight: 700; font-size: 11.5px; text-align: right; color: #2b2b2b; }
.doc .d-parties { background: #F6ECEA; border-top: 3px solid #5B1219; padding: 12px 22px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.doc .d-parties h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; color: #5B1219; margin: 0 0 4px; line-height: 1.2; }
.doc .d-kv { display: grid; grid-template-columns: 92px 1fr; align-items: baseline; gap: 6px; padding: 5px 0; border-bottom: 2px solid #E3D3D1; }
.doc .d-kv:last-child { border-bottom: 0; }
.doc .d-kv span:first-child { font-size: 8.5px; letter-spacing: .18em; color: #A0626A; text-transform: uppercase; }
.doc .d-kv span:last-child { font-size: 11px; color: #222; overflow-wrap: anywhere; }
.doc .d-table { width: 100%; border-collapse: collapse; margin-top: 22px; }
.doc .d-table th { background: #5B1219; color: #fff; font-size: 8.5px; letter-spacing: .2em; font-weight: 500; text-align: left; padding: 11px 18px; text-transform: uppercase; }
.doc .d-table th:nth-child(1) { width: 52%; }
.doc .d-table th:nth-child(4), .doc .d-table td:nth-child(4) { text-align: right; }
.doc .d-table td { padding: 9px 18px; border-bottom: 1.5px solid #E8DCDA; font-size: 11px; vertical-align: top; color: #333; }
.doc .d-table tr { break-inside: avoid; page-break-inside: avoid; }
.doc .d-sub { color: #666; }
.doc .d-tot { font-weight: 700; color: #222; white-space: nowrap; }
.doc .d-table s { color: #9a8a8c; }
.doc .d-offert { font-family: var(--serif); font-size: 15px; font-weight: 600; color: #5B1219; }
.doc .d-empty { text-align: center; color: #999; padding: 26px; }
.doc .d-bottom { display: grid; grid-template-columns: 1fr 326px; gap: 38px; margin-top: 16px; padding-top: 18px; border-top: 1.5px solid #E8DCDA; break-inside: avoid; }
.doc .d-cond h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; color: #5B1219; margin: 0 0 8px; }
.doc .d-cond p { margin: 0 0 6px; font-size: 9.5px; color: #333; }
.doc .d-cond strong { color: #5B1219; font-weight: 700; }
.doc .d-row { display: flex; justify-content: space-between; padding: 9px 20px; border-bottom: 1.5px solid #E8DCDA; font-size: 10px; color: #555; }
.doc .d-row span:last-child { color: #222; font-variant-numeric: tabular-nums; }
.doc .d-band { background: #5B1219; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 12px 34px 12px 20px; }
.doc .d-band span { font-family: var(--serif); font-style: italic; font-size: 24px; }
.doc .d-band strong { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.doc .d-strip { background: #F6ECEA; min-height: 28px; padding: 8px 20px; font-size: 9px; color: #7a5a5e; text-align: right; }
.doc .d-sign { border: 1.5px solid #E8DCDA; margin-top: 18px; height: 90px; padding: 12px 22px; position: relative; break-inside: avoid; }
.doc .d-sign b { display: block; font-size: 8.5px; letter-spacing: .18em; color: #5B1219; text-transform: uppercase; }
.doc .d-sign em { display: block; font-family: var(--serif); font-style: italic; font-size: 12.5px; color: #999; margin-top: 2px; }
.doc .d-sign i { position: absolute; right: 22px; bottom: 22px; width: 310px; border-top: 1.5px dashed #C98C93; }
.doc .d-thanks { text-align: center; margin-top: auto; padding: 12px 0 6px; break-inside: avoid; }
.doc .d-merci { font-family: var(--script); font-size: 38px; color: #7A2A33; line-height: 1.2; }
.doc .d-orn { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 2px; }
.doc .d-orn i { width: 110px; height: 1.5px; background: #7A2A33; }
.doc .d-orn b { width: 7px; height: 7px; background: #7A2A33; transform: rotate(45deg); }
.doc .d-brandline { font-size: 8.5px; letter-spacing: .3em; color: #A0626A; margin-top: 8px; }
.doc .d-contact { font-size: 9px; color: #8a7174; margin-top: 4px; }
.doc .d-foot { height: 44px; background: #5B1219; margin-top: 10px; flex: none; }

/* ---------- Impression ---------- */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  #print-root .doc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Suivi des devis (statuts, page client, facture) ---------- */
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--blush); color: var(--ink-2); white-space: nowrap; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-chip.s-sent { background: #FDF3E4; color: #9A5B12; }
.status-chip.s-accepted { background: #E6F0FA; color: #24598A; }
.status-chip.s-booked { background: #E5F2EA; color: var(--ok); }
.status-chip.s-refused { background: #F4E9E9; color: #8E3B3B; }
.status-chip.s-draft { background: var(--blush); color: var(--label); }
.q-status { margin-top: 10px; }
.filter-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips .chip { flex: none; min-height: 36px; font-size: 13px; }
.filter-chips .chip small { opacity: .6; margin-left: 2px; font-weight: 600; }

.status-card { gap: 10px; }
.status-card.s-accepted { box-shadow: var(--shadow), inset 0 0 0 1.5px #B9D2EA; }
.status-card.s-booked { box-shadow: var(--shadow), inset 0 0 0 1.5px #B5D9C2; }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-head small { font-size: 12px; color: var(--label); font-weight: 600; letter-spacing: .04em; }
.status-text { margin: 0; font-size: 14px; color: var(--ink-2); }
.status-text b { color: var(--ink); }
.status-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink); }
.status-note cite { display: block; font-family: var(--sans); font-style: normal; font-size: 11px; color: var(--label); margin-top: 4px; letter-spacing: .06em; text-transform: uppercase; }
.status-warn { display: flex; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: #FBEDE4; color: #8A3E12; font-size: 13px; font-weight: 500; }
.status-warn .ic { width: 16px; height: 16px; margin-top: 1px; }
.status-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status-actions .btn { min-height: 46px; flex: 1 1 auto; }
.status-big { display: flex; gap: 12px; align-items: flex-start; }
.status-big > .ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--blush); color: var(--wine); flex: none; }
.s-booked .status-big > .ic { background: #E5F2EA; color: var(--ok); }
.s-accepted .status-big > .ic { background: #E6F0FA; color: #24598A; }
.status-big p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.access-state { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--label); }
.access-state .ic { width: 16px; height: 16px; color: var(--ok); }
.sheet-seg { margin-bottom: 14px; }
.sheet-doc { margin: 4px 0 14px; }
.sheet .field { margin-bottom: 14px; }
.sheet a.btn { text-decoration: none; }

.client-page .page { padding-bottom: 40px; }
.client-loading { min-height: 60dvh; display: grid; place-items: center; }
.summary { gap: 6px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sum-row:last-of-type { border-bottom: 0; }
.sum-row span { color: var(--ink-2); font-size: 14px; }
.sum-row strong { font-size: 19px; color: var(--wine); font-variant-numeric: tabular-nums; white-space: nowrap; }
.decide p, .card > p { margin: 0; color: var(--ink-2); font-size: 14px; }
.pay-choices .choice { grid-template-columns: 40px 1fr 0 28px; }
.choice-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--blush); color: var(--wine); display: grid; place-items: center; }
.pay-info { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--bg); }
.pay-info > .ic { width: 22px; height: 22px; color: var(--wine); margin-top: 2px; }
.pay-info p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.iban-box { display: flex; flex-direction: column; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.iban-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); min-height: 52px; }
.iban-row:last-child { border-bottom: 0; }
.iban-row span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--label); font-weight: 600; }
.iban-row b { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copy-btn { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--wine); background: var(--blush); transition: transform .18s var(--ease-out); }
.copy-btn:active { transform: scale(.9); }
.copy-btn .ic { width: 18px; height: 18px; }
.fine { margin: 0; font-size: 12px; color: var(--label); }
.client-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; font-size: 14px; color: var(--ink-2); text-align: center; }
.client-foot .ic { width: 18px; height: 18px; color: var(--wine); }
.client-foot a { color: var(--wine); font-weight: 600; }
.client .doc-frame + .btn { margin-top: -2px; }
button.link { padding: 6px 0; align-self: flex-start; }

.doc .d-kind { font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: #A0626A; margin-top: -4px; }
.doc .d-row.d-rest { background: #F6ECEA; border-bottom: 0; padding: 12px 20px; font-size: 12px; font-weight: 700; color: #5B1219; }
.doc .d-row.d-rest span:last-child { color: #5B1219; font-size: 14px; }

/* ---------- Choix de l'appli mail ---------- */
.sheet-label { margin: 6px 0 4px !important; font-size: 11px !important; letter-spacing: .14em; text-transform: uppercase; color: var(--label) !important; font-weight: 600; }
.sheet .fine { margin: 12px 0 0; }
a.sheet-item { color: inherit; text-decoration: none; }
.sheet-item.is-last { background: var(--blush); }
.sheet-item > .ic:last-child { color: var(--label); width: 18px; height: 18px; }

.doc .d-sign.is-signed { background: #FBF6F5; }
.doc .d-sign.is-signed em { color: #5B1219; font-style: normal; font-family: var(--sans); font-size: 10px; margin-top: 4px; }
.doc .d-sign.is-signed em strong { font-weight: 700; }
.doc .d-signname { position: absolute; right: 22px; bottom: 28px; width: 310px; text-align: center; font-family: var(--script); font-size: 30px; line-height: 1; color: #5B1219; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc .d-sign.is-signed small { position: absolute; right: 22px; bottom: 8px; width: 310px; text-align: center; font-size: 7.5px; letter-spacing: .12em; text-transform: uppercase; color: #A0626A; }

/* ---------- Agenda et fiche d'événement ---------- */
.tab { font-size: 10.5px; }
.cal { gap: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head b { font-family: var(--serif); font-size: 22px; font-weight: 600; text-transform: capitalize; color: var(--wine); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 10px; letter-spacing: .1em; color: var(--label); font-weight: 600; padding-bottom: 4px; }
.cal-day { aspect-ratio: 1; min-height: 38px; display: grid; place-items: center; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; transition: transform .18s var(--ease-out), background .2s; position: relative; }
.cal-day.is-empty { pointer-events: none; }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font-weight: 700; }
.cal-day.is-booked { background: var(--wine); color: #fff; font-weight: 700; }
.cal-day.is-pending { background: var(--blush); color: var(--wine); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--wine-2); }
.cal-day.is-picked { outline: 2px solid var(--wine-2); outline-offset: 2px; }
.cal-day[data-action]:active { transform: scale(.9); }
.cal-legend { display: flex; gap: 16px; justify-content: center; font-size: 12px; color: var(--ink-2); padding-top: 4px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--wine); }
.cal-legend i.lg-pending { background: var(--blush); box-shadow: inset 0 0 0 1.5px var(--wine-2); }

.ev-card { display: grid; grid-template-columns: 56px 1fr 20px; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); color: inherit; text-decoration: none; transition: transform .2s var(--ease-out); animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
.ev-card:active { transform: scale(.985); }
.ev-card .chev { color: var(--label); }
.ev-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px; border-radius: 14px; background: var(--blush); color: var(--wine); line-height: 1; }
.ev-date b { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.ev-date small { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.ev-card.is-booked .ev-date { background: var(--wine); color: #fff; }
.ev-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev-main > b { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.ev-sub { font-size: 13px; color: var(--ink-2); }
.ev-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.ev-hero { gap: 6px; }
.ev-hero.is-booked { background: var(--wine); color: #fff; box-shadow: 0 18px 40px -20px rgba(91, 18, 25, .8); }
.ev-hero-date { font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.1; }
.ev-hero-sub { font-size: 14px; opacity: .8; }
.ev-hero:not(.is-booked) .ev-hero-date { color: var(--wine); }
.info-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.info-row:last-of-type { border-bottom: 0; }
.info-row span { font-size: 13px; color: var(--ink-2); flex: none; }
.info-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.info-row a { color: var(--wine); }
.ev-lines { list-style: none; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px dashed #D5B8B5; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ev-lines li { display: flex; justify-content: space-between; gap: 12px; }
.ev-lines small { color: var(--label); }
.ev-lines b { font-variant-numeric: tabular-nums; white-space: nowrap; }
