/* =========================================================
   VISION 24 CRM — Design System
   Palette : bordeaux #560216 · beige #EDE1D8
   Typos  : Cormorant Garamond (serif italique) · Inter (sans)
========================================================= */

:root{
  --bordeaux: #560216;
  --bordeaux-2: #6b0a22;
  --bordeaux-3: #7a1230;
  --beige: #ede1d8;
  --beige-2: #f6ede5;
  --beige-3: #faf4ee;
  --ink: #1a1113;
  --ink-2: #4a3a3f;
  --muted: #8a7a7f;
  --line: #e8dcd2;
  --line-2: #f0e6dd;
  --white: #ffffff;
  --success: #2e7d5b;
  --warning: #b8860b;
  --danger: #b53a2b;
  --hot: #c0392b;
  --warm: #e67e22;
  --cold: #5b8db8;
  --neutral: #9a8a8f;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(86,2,22,.05);
  --shadow: 0 4px 20px rgba(86,2,22,.08);
  --shadow-lg: 0 20px 60px rgba(86,2,22,.15);

  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body{
  font-family: var(--font-sans);
  background: var(--beige-3);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
h1,h2,h3,h4 { margin: 0; font-weight: 500; }

/* =========================================================
   SHELL
========================================================= */
.app{
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar{
  background: var(--bordeaux);
  color: var(--beige);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

/* =========================================================
   LOGIN OVERLAY
========================================================= */
.login{
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #560216 0%, #7a1230 100%);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from{ opacity: 0; } to{ opacity: 1; } }
@keyframes fadeOut { to{ opacity: 0; } }
.login__card{
  background: #faf4ee;
  border-radius: 20px;
  padding: 40px 44px;
  width: min(420px, 92%);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  text-align: center;
}
.login__logo{ width: 140px; height: auto; margin: 0 auto 20px; display: block; filter: brightness(0.15) sepia(1) hue-rotate(-20deg) saturate(5); }
.login__title{
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 500; color: #560216;
  margin: 0 0 6px;
}
.login__sub{
  font-size: 13px; color: #8a7a7f;
  margin: 0 0 24px; line-height: 1.5;
}
.login__field{ margin-bottom: 14px; text-align: left; }
.login__field label{
  display: block;
  font-size: 12px; font-weight: 600; color: #4a3a3f;
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px;
}
.login__field input{
  width: 100%; box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e8dcd2;
  border-radius: 10px;
  font-size: 14px; font-family: inherit;
  background: white; outline: none;
  transition: border-color .15s;
}
.login__field input:focus{ border-color: #560216; }
.login__error{
  background: rgba(192,57,43,.1); color: #c0392b;
  padding: 10px 12px; border-radius: 8px;
  font-size: 12.5px; margin-bottom: 12px;
}
.login__btn{
  width: 100%; padding: 13px;
  background: #560216; color: #faf4ee;
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: background .15s;
}
.login__btn:hover{ background: #7a1230; }
.login__foot{ margin-top: 16px; }
.login__pass-wrap{ position: relative; }
.login__pass-wrap input{ padding-right: 44px; }
.login__eye{
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; padding: 8px;
  font-size: 18px; cursor: pointer; opacity: .6;
  border-radius: 6px;
}
.login__eye:hover{ opacity: 1; background: rgba(86,2,22,.06); }

.brand{ display: flex; align-items: center; gap: 12px; padding: 4px 8px 0; }
.brand__logo-img{
  width: 130px; height: auto; display: block;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.2));
}

.nav{ display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__item{
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(237,225,216,.75); font-weight: 500;
  cursor: pointer; transition: all .15s ease;
  font-size: 13.5px;
}
.nav__item svg{ width: 18px; height: 18px; opacity: .85; }
.nav__item:hover{ background: rgba(237,225,216,.08); color: var(--beige); }
.nav__item.is-active{
  background: var(--beige);
  color: var(--bordeaux);
}
.nav__item.is-active svg{ opacity: 1; }
.nav__badge{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px; padding: 0 6px;
  background: #c0392b; color: white;
  border-radius: 10px; font-size: 11px; font-weight: 700;
  margin-left: 6px; vertical-align: middle;
  animation: badge-pop .4s cubic-bezier(.2,.9,.3,1.3);
}
.nav__badge[hidden]{ display: none !important; }
@keyframes badge-pop{
  0%   { transform: scale(0);   opacity: 0; }
  60%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

.sidebar__foot{ display: flex; flex-direction: column; gap: 6px; }
.btn-ghost{
  padding: 8px 12px; border-radius: 8px; text-align: left;
  color: rgba(237,225,216,.7); font-size: 12.5px;
  transition: all .15s;
}
.btn-ghost:hover{ background: rgba(237,225,216,.08); color: var(--beige); }

/* =========================================================
   TOPBAR
========================================================= */
.main{ display: flex; flex-direction: column; min-width: 0; }

.topbar{
  display: flex; align-items: center; gap: 16px;
  padding: 16px 32px;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}

.search{
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 14px;
  transition: border-color .15s;
}
.search:focus-within{ border-color: var(--bordeaux); }
.search svg{ color: var(--muted); }
.search input{ flex: 1; border: none; outline: none; background: none; font-size: 14px; }
.search input::placeholder{ color: var(--muted); }

.topbar__actions{ margin-left: auto; }

/* =========================================================
   BUTTONS
========================================================= */
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  font-weight: 500; font-size: 13.5px;
  transition: all .15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg{ width: 16px; height: 16px; }
.btn--primary{ background: var(--bordeaux); color: var(--beige); }
.btn--primary:hover{ background: var(--bordeaux-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--secondary{ background: var(--white); color: var(--bordeaux); border-color: var(--line); }
.btn--secondary:hover{ border-color: var(--bordeaux); }
.btn--ghost{ color: var(--ink-2); }
.btn--ghost:hover{ background: var(--beige-2); }
.btn--danger{ background: var(--white); color: var(--danger); border-color: var(--line); }
.btn--danger:hover{ background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn--sm{ padding: 6px 12px; font-size: 12.5px; }

/* =========================================================
   VIEW
========================================================= */
.view{ padding: 28px 32px 60px; flex: 1; overflow-y: auto; }

.view-header{
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.view-title{
  font-family: var(--font-serif); font-size: 34px; font-weight: 400;
  color: var(--bordeaux); letter-spacing: -.5px;
}
.view-title em{ font-style: italic; }
.view-subtitle{ color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.view-tabs{
  display: flex; gap: 4px; padding: 4px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px;
}
.view-tabs button{
  padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 500;
  color: var(--muted); transition: all .15s;
}
.view-tabs button.is-active{ background: var(--bordeaux); color: var(--beige); }
.view-tabs button:not(.is-active):hover{ color: var(--ink); }

/* =========================================================
   CARDS / KPI
========================================================= */
.card{
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card--pad-lg{ padding: 28px; }

.grid{ display: grid; gap: 16px; }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px){ .grid-4{ grid-template-columns: repeat(2,1fr); } .grid-3{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 720px){ .grid-4, .grid-3, .grid-2{ grid-template-columns: 1fr; } }

.kpi{
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line);
  transition: all .15s;
}
.kpi:hover{ border-color: var(--bordeaux); transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi__label{ font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 500; }
.kpi__value{ font-family: var(--font-serif); font-size: 34px; color: var(--bordeaux); font-weight: 500; }
.kpi__hint{ font-size: 12px; color: var(--muted); }
.kpi__hint strong{ color: var(--success); }

.section-title{
  font-family: var(--font-serif); font-size: 22px; color: var(--bordeaux);
  margin-bottom: 12px; font-weight: 500;
}
.section-title em{ font-style: italic; }

/* =========================================================
   TABLE / LIST
========================================================= */
.list{ background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list__head, .list__row{
  display: grid;
  padding: 12px 20px;
  align-items: center;
  gap: 12px;
}
.list__head{
  background: var(--beige-3); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.list__row{
  border-bottom: 1px solid var(--line-2);
  cursor: pointer; transition: background .1s;
}
.list__row:last-child{ border-bottom: none; }
.list__row:hover{ background: var(--beige-3); }
.list__empty{ padding: 40px; text-align: center; color: var(--muted); }

.avatar{
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--beige); color: var(--bordeaux);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 500; font-size: 15px;
  flex-shrink: 0;
}

.contact-cell{ display: flex; align-items: center; gap: 12px; min-width: 0; }
.contact-cell__name{ font-weight: 500; color: var(--ink); }
.contact-cell__meta{ font-size: 12px; color: var(--muted); }

/* =========================================================
   BADGES / STATUS
========================================================= */
.badge{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.badge::before{ content:""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--hot   { background: rgba(192,57,43,.1);  color: var(--hot); }
.badge--warm  { background: rgba(230,126,34,.12); color: var(--warm); }
.badge--cold  { background: rgba(91,141,184,.12); color: var(--cold); }
.badge--neutral{ background: rgba(154,138,143,.14); color: var(--neutral); }
.badge--client{ background: rgba(46,125,91,.1); color: var(--success); }
.badge--prospect{ background: rgba(86,2,22,.08); color: var(--bordeaux); }
.badge--pro    { background: rgba(184,134,11,.12); color: var(--warning); }
.badge--partner{ background: rgba(91,141,184,.12); color: var(--cold); }

.tag{
  display: inline-flex; padding: 2px 8px; border-radius: 6px;
  background: var(--beige); color: var(--bordeaux);
  font-size: 11px; font-weight: 500;
}

/* =========================================================
   PIPELINE / KANBAN
========================================================= */
.pipeline{
  display: flex; gap: 14px; overflow-x: auto;
  padding-bottom: 20px; margin: 0 -32px; padding: 4px 32px 20px;
  align-items: flex-start;   /* chaque colonne prend sa propre hauteur */
}
.column{
  flex: 0 0 280px;
  align-self: flex-start;   /* n'étire pas la colonne à la taille des autres */
  background: var(--beige-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: flex; flex-direction: column;
  min-height: 480px;   /* place pour ~3 cartes même quand la colonne est vide */
}
.column__head{
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.column__title{ font-weight: 600; font-size: 13px; color: var(--ink); }
.column__count{
  background: var(--white); color: var(--muted);
  padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.column__body{ display: flex; flex-direction: column; gap: 8px; min-height: 100px; }
.column.is-drop-target{ background: var(--beige-2); border-color: var(--bordeaux); }

.deal-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  transition: all .12s;
  box-shadow: var(--shadow-sm);
}
.deal-card:hover{ border-color: var(--bordeaux); transform: translateY(-1px); }
.deal-card.is-dragging{ opacity: .5; cursor: grabbing; }
.deal-card__title{ font-weight: 500; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.deal-card__meta{ font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; margin-bottom: 8px; }
.deal-card__amount{ font-family: var(--font-serif); font-size: 18px; color: var(--bordeaux); font-weight: 500; }
.deal-card__foot{ display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

/* =========================================================
   DRAWER (fiche contact/deal)
========================================================= */
.drawer, .modal{
  position: fixed; inset: 0; z-index: 100;
  display: flex;
}
.drawer[hidden], .modal[hidden]{ display: none; }
.drawer__backdrop, .modal__backdrop{
  position: absolute; inset: 0;
  background: rgba(26,17,19,.4);
  animation: fade-in .2s;
}
.drawer__panel{
  position: relative; margin-left: auto;
  width: min(720px, 100%);
  background: var(--white);
  height: 100vh; overflow-y: auto;
  animation: slide-in .25s cubic-bezier(.2,.9,.3,1);
  box-shadow: var(--shadow-lg);
}
.drawer__close, .modal__close{
  position: absolute; top: 16px; right: 20px;
  width: 32px; height: 32px; border-radius: 8px;
  font-size: 22px; color: var(--muted);
  z-index: 2;
}
.drawer__close:hover, .modal__close:hover{ background: var(--beige-3); color: var(--ink); }
.drawer__body{ padding: 32px; }

.modal__panel{
  position: relative; margin: auto;
  width: min(860px, 96%);
  background: var(--white); border-radius: var(--radius-lg);
  max-height: 94vh; overflow-y: auto;
  animation: pop-in .2s cubic-bezier(.2,.9,.3,1);
  box-shadow: var(--shadow-lg);
  /* 🚀 GPU compositing + isolation paint → scroll fluide même sur grand devis */
  will-change: transform;
  transform: translateZ(0);
  contain: paint;
  -webkit-overflow-scrolling: touch;   /* momentum iOS/iPad */
  overscroll-behavior: contain;
}
.v24-doc{ width: 210mm; max-width: 100%; margin: 0 auto; }

/* Mode export : plein A4, pas d'arrondis, marges nulles */
.v24-doc.is-exporting,
.v24-doc.is-exporting *{
  border-radius: 0 !important;
}
.v24-doc.is-exporting{
  box-shadow: none !important;
  margin: 0 !important;
  overflow: hidden !important;
}
.modal__body{ padding: 32px; }

@keyframes fade-in { from{ opacity: 0; } to{ opacity: 1; } }
@keyframes slide-in { from{ transform: translateX(20px); opacity: 0; } to{ transform: none; opacity: 1; } }
@keyframes pop-in { from{ transform: scale(.96); opacity: 0; } to{ transform: none; opacity: 1; } }

/* =========================================================
   FICHE DETAIL
========================================================= */
.fiche__head{
  display: flex; align-items: flex-start; gap: 16px;
  padding-bottom: 20px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.fiche__avatar{
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--bordeaux); color: var(--beige);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 26px; font-weight: 500;
  flex-shrink: 0;
}
.fiche__title{ font-family: var(--font-serif); font-size: 28px; color: var(--bordeaux); font-weight: 500; }
.fiche__meta{ display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.fiche__meta a{ color: var(--bordeaux); }

.fiche__actions{ display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }

.tabs{
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.tabs button{
  padding: 10px 14px; font-size: 13px; font-weight: 500;
  color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all .15s;
}
.tabs button.is-active{ color: var(--bordeaux); border-color: var(--bordeaux); }
.tabs button:not(.is-active):hover{ color: var(--ink); }

.info-grid{ display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 13.5px; }
.info-grid dt{ color: var(--muted); font-weight: 500; }
.info-grid dd{ margin: 0; color: var(--ink); }

.timeline{ display: flex; flex-direction: column; gap: 4px; }
.timeline__item{
  display: grid; grid-template-columns: 32px 1fr; gap: 12px;
  padding: 12px 0; position: relative;
}
.timeline__item::before{
  content:""; position: absolute; left: 15px; top: 32px; bottom: -8px;
  width: 2px; background: var(--line-2);
}
.timeline__item:last-child::before{ display: none; }
.timeline__dot{
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--beige); color: var(--bordeaux);
  display: grid; place-items: center;
  z-index: 1; border: 2px solid var(--white);
}
.timeline__dot svg{ width: 14px; height: 14px; }
.timeline__content{ padding-top: 4px; }
.timeline__title{ font-weight: 500; font-size: 13.5px; }
.timeline__body{ font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.timeline__date{ font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* =========================================================
   FORMS
========================================================= */
.field{ display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label{ font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea{
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--white);
  outline: none; transition: border-color .15s;
  font-size: 14px;
}
.field textarea{ resize: vertical; min-height: 80px; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus{ border-color: var(--bordeaux); }
.field-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3{ display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.form-title{ font-family: var(--font-serif); font-size: 26px; color: var(--bordeaux); margin-bottom: 4px; }
.form-sub{ color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.form-actions{ display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }

/* =========================================================
   CALENDAR
========================================================= */
.calendar-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-nav{ display: flex; gap: 6px; }
.calendar-nav button{ padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.calendar-nav button:hover{ border-color: var(--bordeaux); }
.calendar-month{ font-family: var(--font-serif); font-size: 24px; color: var(--bordeaux); text-transform: capitalize; }

.calendar{ background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calendar__grid{ display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar__dow{
  padding: 10px; text-align: center; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  background: var(--beige-3); border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.calendar__cell{
  min-height: 100px; padding: 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer;
}
.calendar__cell:nth-child(7n){ border-right: none; }
.calendar__cell:hover{ background: var(--beige-3); }
.calendar__day{ font-size: 12.5px; font-weight: 500; color: var(--ink); align-self: flex-end; }
.calendar__cell.is-out .calendar__day{ color: var(--muted); opacity: .5; }
.calendar__cell.is-today .calendar__day{
  background: var(--bordeaux); color: var(--beige);
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11.5px;
}
.calendar__event{
  background: var(--bordeaux); color: var(--beige);
  padding: 2px 6px; border-radius: 4px;
  font-size: 10.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid rgba(255,255,255,.35);
}
/* 🎨 Code couleur par statut du deal — pour voir d'un coup d'œil quelles
   dates sont juste "devis envoyé" (à confirmer) vs déjà réservées/gagnées */
.calendar__event--s_received{ background: #9a8a8f; }
.calendar__event--s_quote_p { background: var(--warning); }
.calendar__event--s_quote_s { background: var(--cold); color: #fff; }
.calendar__event--s_followup{ background: var(--warm); }
.calendar__event--s_billing { background: #7a5ea8; }
.calendar__event--s_won     { background: var(--success); }
.calendar__event--s_lost    { background: #b5a5a8; text-decoration: line-through; opacity: .75; }
.calendar__event--manual    { background: #2f6b5e; cursor: pointer; }
.calendar__event--manual:hover{ opacity: .85; }
.calendar__cell[data-add-event-day]{ cursor: pointer; }
.calendar__cell[data-add-event-day]:hover{ background: var(--beige-3); }

/* Mini-agenda compact (tableau de bord) — juste les numéros + un point,
   en cellules de hauteur FIXE (pas aspect-ratio) pour que la carte entière
   reste à peu près à la hauteur de "Relances & tâches" à côté. */
.mini-cal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.mini-cal-month{ font-family: var(--font-serif); font-size:14px; color: var(--bordeaux); text-transform: capitalize; }
.mini-cal-nav{ display:flex; gap:4px; }
.mini-cal-nav button{ padding:1px 6px; border:1px solid var(--line); border-radius:6px; background:var(--white); font-size:11px; }
.mini-cal-nav button:hover{ border-color: var(--bordeaux); }
.mini-cal{
  display:grid; grid-template-columns: repeat(7,1fr); gap:1px;
  background: var(--line-2); border: 1px solid var(--line-2); border-radius: 8px;
  overflow: hidden;
}
.mini-cal__dow{ text-align:center; font-size:9px; color:var(--muted); font-weight:600; padding-bottom:2px; }
.mini-cal__cell{
  height: 22px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:1px; font-size:10.5px; position:relative; cursor:default;
  background: var(--white);
}
.mini-cal__cell.is-out{ color: var(--muted); opacity:.5; background: var(--beige-3); }
.mini-cal__cell.is-today{ background: var(--bordeaux); color: var(--beige); font-weight:600; }
.mini-cal__cell[data-deal]{ cursor:pointer; }
.mini-cal__cell[data-deal]:hover{ background: var(--beige-3); }
.mini-cal__cell.is-today[data-deal]:hover{ background: var(--bordeaux); }
.mini-cal__dot{ width:3px; height:3px; border-radius:50%; background: var(--bordeaux); }
.mini-cal__cell.is-today .mini-cal__dot{ background: var(--beige); }

/* =========================================================
   PRESTATIONS
========================================================= */
.presta-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.presta{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
  transition: all .15s; cursor: pointer;
}
.presta:hover{ border-color: var(--bordeaux); transform: translateY(-2px); box-shadow: var(--shadow); }
.presta__cat{ font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; }
.presta__name{ font-family: var(--font-serif); font-size: 20px; color: var(--bordeaux); font-weight: 500; }
.presta__desc{ font-size: 12.5px; color: var(--ink-2); flex: 1; }
.presta__price{ font-family: var(--font-serif); font-size: 22px; color: var(--ink); font-weight: 500; }

/* =========================================================
   TOAST
========================================================= */
.toast{
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  background: var(--bordeaux); color: var(--beige);
  padding: 12px 18px; border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: slide-up .25s cubic-bezier(.2,.9,.3,1);
  font-size: 13.5px;
}
@keyframes slide-up { from{ transform: translateY(10px); opacity: 0; } to{ transform: none; opacity: 1; } }

/* =========================================================
   MISC
========================================================= */
.toolbar{ display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.chip{
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px;
  background: var(--white); border: 1px solid var(--line);
  cursor: pointer; transition: all .15s;
}
.chip:hover{ border-color: var(--bordeaux); }
.chip.is-active{ background: var(--bordeaux); color: var(--beige); border-color: var(--bordeaux); }

.stat-line{ display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.stat-line:last-child{ border-bottom: none; }
.stat-line strong{ font-family: var(--font-serif); font-size: 16px; color: var(--bordeaux); }

.money{ font-family: var(--font-serif); font-weight: 500; color: var(--bordeaux); }

.mini{ font-size: 12px; color: var(--muted); }

.divider{ height: 1px; background: var(--line); margin: 20px 0; }

.quote-doc{
  background: var(--white); padding: 40px; border-radius: 12px;
  border: 1px solid var(--line); font-size: 13px;
}
.quote-doc h1{ font-family: var(--font-serif); color: var(--bordeaux); font-size: 32px; }
.quote-doc table{ width: 100%; border-collapse: collapse; margin: 20px 0; }
.quote-doc th, .quote-doc td{ padding: 10px; text-align: left; border-bottom: 1px solid var(--line); }
.quote-doc th{ background: var(--beige-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.quote-doc tfoot td{ font-weight: 600; }

/* SCROLL */
::-webkit-scrollbar{ width: 8px; height: 8px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover{ background: var(--muted); }

/* =========================================================
   QUOTE EDITOR
========================================================= */
.qe{ margin: -28px -32px -60px; padding: 0; background: var(--beige-3); min-height: calc(100vh - 60px); }
.qe__topbar{
  display: flex; align-items: center; gap: 16px;
  padding: 18px 32px; background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 60px; z-index: 5;
}
.qe__title{ flex: 1; }
.qe__title .mini{ text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.qe__title h2{ font-family: var(--font-serif); font-size: 24px; color: var(--bordeaux); font-weight: 500; margin: 2px 0 0; display:flex; align-items:center; gap:10px; }
.qe__actions{ display: flex; gap: 8px; }

.qe__grid{
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 340px;
  gap: 20px;
  padding: 20px 32px 60px;
  align-items: flex-start;
}
.qe__grid > div{ display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.qe__left, .qe__right{ position: sticky; top: 140px; }

@media (max-width: 1400px){
  .qe__grid{ grid-template-columns: 300px minmax(0, 1fr); }
  .qe__right{ grid-column: 1 / -1; position: static; }
}
@media (max-width: 900px){
  .qe__grid{ grid-template-columns: 1fr; padding: 16px; }
  .qe__left, .qe__right{ position: static; }
}

/* Normalise inputs / selects / dates inside qe */
.qe .field input,
.qe .field select,
.qe .field textarea{
  width: 100%; box-sizing: border-box;
  height: 40px; padding: 8px 12px;
}
.qe .field textarea{ height: auto; min-height: 80px; }
.qe .field select{ appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a7a7f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}
.qe .field input[type="date"]{ font-family: inherit; }
.qe .field-row, .qe .field-row-3{ align-items: end; }

.qe-item{
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; margin-bottom: 10px;
  transition: border-color .15s;
}
.qe-item:hover{ border-color: var(--bordeaux); }
.qe-item__head{ display: flex; gap: 10px; align-items: flex-start; }
.qe-item__title{
  border: none; outline: none; background: transparent;
  font-family: var(--font-serif); font-size: 18px; color: var(--bordeaux);
  padding: 4px 6px; border-radius: 6px; width: 100%; font-weight: 500;
}
.qe-item__title:focus{ background: var(--beige-3); }
.qe-item__qte{ width: 55px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; text-align: center; font-size: 13px; }
.qe-item__prix{ width: 90px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; text-align: right; font-size: 13px; }
.qe-item__total{ min-width: 90px; text-align: right; font-size: 16px; }
.qe-item__del{
  width: 28px; height: 28px; border-radius: 6px; color: var(--muted);
  font-size: 18px;
}
.qe-item__del:hover{ background: rgba(181,58,43,.1); color: var(--danger); }
.qe-item__desc{
  width: 100%; min-height: 140px; margin-top: 10px;
  padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px;
  font-family: inherit; font-size: 13px; line-height: 1.55;
  resize: vertical; color: var(--ink-2);
  transition: border-color .15s, background .15s;
  background: #fefaf5;
}
.qe-item__desc:focus{
  border-color: var(--bordeaux); outline: none;
  background: white;
  box-shadow: 0 0 0 3px rgba(86,2,22,.08);
}
.qe-item__desc::placeholder{ color: rgba(86,2,22,.35); font-style: italic; }
.qe-item__opts{
  margin-top: 10px; padding: 8px 10px;
  background: var(--beige-3); border-radius: 8px;
}
.qe-opt{
  display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px;
  cursor: pointer;
}
.qe-opt input{ accent-color: var(--bordeaux); }

.cat-card{
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--white);
  margin-bottom: 10px; transition: all .15s;
  cursor: pointer;
}
.cat-card:hover{ border-color: var(--bordeaux); box-shadow: var(--shadow); }

/* =========================================================
   REVENUE PAGE — chart + calendar
========================================================= */
.rev-chart{
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 6px; height: 220px; align-items: end;
  padding: 12px 0 4px;
}
.rev-bar-group{
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; height: 100%; justify-content: flex-end;
}
.rev-bars{
  display: flex; gap: 3px; align-items: flex-end;
  height: 100%; width: 100%; justify-content: center;
}
.rev-bar{
  width: 14px; min-height: 2px;
  border-radius: 3px 3px 0 0;
  position: relative; transition: transform .15s;
  display: flex; justify-content: center; align-items: flex-end;
}
.rev-bar-group:hover .rev-bar{ transform: scaleY(1.02); }
.rev-bar--cur{ background: linear-gradient(180deg, var(--bordeaux) 0%, #7a1230 100%); }
.rev-bar--prev{ background: var(--beige); border: 1px solid var(--muted); opacity: .8; }
.rev-bar__val{
  position: absolute; top: -18px;
  font-size: 9.5px; color: var(--bordeaux); font-weight: 600;
  white-space: nowrap; opacity: 0; transition: opacity .15s;
}
.rev-bar-group:hover .rev-bar__val{ opacity: 1; }
.rev-bar__lbl{
  font-size: 10.5px; color: var(--muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: .3px;
}

.rev-calendar{
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1100px){ .rev-calendar{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px){ .rev-calendar{ grid-template-columns: 1fr; } }
.rev-month{
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--white);
  transition: all .15s;
}
.rev-month:hover{ border-color: var(--bordeaux); transform: translateY(-1px); box-shadow: var(--shadow); }
.rev-month.is-current{
  background: linear-gradient(180deg, var(--beige-3) 0%, var(--white) 100%);
  border-color: var(--bordeaux);
}
.rev-month__head{
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; margin-bottom: 8px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line-2);
}
.rev-month__name{
  font-family: var(--font-serif); font-size: 18px; color: var(--bordeaux); font-weight: 500;
}
.rev-month__ca{
  font-family: var(--font-serif); font-size: 18px; color: var(--ink); font-weight: 500;
}
.rev-month__events{ display: flex; flex-direction: column; gap: 4px; }
.rev-event{
  display: grid; grid-template-columns: 30px 1fr auto;
  gap: 8px; align-items: center;
  padding: 4px 6px; border-radius: 6px;
  font-size: 12px; transition: background .1s;
}
.rev-event:hover{ background: var(--beige-3); }
.rev-event__day{
  background: var(--bordeaux); color: var(--beige);
  border-radius: 4px; padding: 1px 0;
  text-align: center; font-weight: 600; font-size: 10.5px;
}
.rev-event__title{
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink);
}
.rev-event__amt{
  color: var(--bordeaux); font-weight: 500; font-size: 11.5px;
  font-family: var(--font-serif);
}

/* =========================================================
   V24 DOCUMENT (devis / facture) — Charte Vision 24
========================================================= */
.v24-doc{
  font-family: var(--font-sans);
  color: #2a1a20;
  background: #faf4ee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(86,2,22,.08);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ---------- HEADER BORDEAUX ---------- */
.v24-doc__head{
  background: var(--bordeaux);
  color: var(--beige);
  padding: 22px 40px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}
.v24-doc__brand{
  display: flex; flex-direction: column; gap: 10px;
}
.v24-doc__logo-img{
  width: 180px; height: auto; display: block;
}

/* ============================================================
   HEADER FORMAT "MR SHERER" — logo/titre en haut, ligne pleine
   largeur, coords/dates en dessous
============================================================ */
.v24-doc__head--sherer{
  display: block !important;      /* on quitte la grille 2 colonnes */
  padding: 22px 40px 18px;
}
.v24-doc__head-row{
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px;
}
.v24-doc__head-row--top{ padding-bottom: 10px; }
.v24-doc__head-row--top .v24-doc__logo-img{
  width: 180px; height: auto; display: block;
}
.v24-doc__head-title{
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 30px;
  color: var(--beige);
  margin: 0;
  letter-spacing: .3px;
}
.v24-doc__head-hr{
  height: 1px;
  background: var(--beige);
  opacity: .55;
  margin: 4px 0 12px;
}
.v24-doc__head-row--bottom{ align-items: flex-start; }
.v24-doc__head-row--bottom .v24-doc__coords{
  font-size: 11.5px;
  line-height: 1.6;
  opacity: .92;
}
.v24-doc__head-row--bottom .v24-doc__dates{
  text-align: right;
  font-size: 11.5px;
  line-height: 1.7;
}
.v24-doc__head-row--bottom .v24-doc__dates strong{ font-weight: 700; }

/* Compatibilité force-single + is-exporting : garde la structure Sherer
   Spécificité renforcée (.head.head--sherer = 4 classes) pour battre les
   règles is-exporting/force-single existantes plus loin dans le fichier. */
.v24-doc.is-exporting .v24-doc__head.v24-doc__head--sherer,
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer{
  display: block !important;
  grid-template-columns: none !important;
  padding: 22px 40px 18px !important;
}
.v24-doc.is-exporting .v24-doc__head.v24-doc__head--sherer .v24-doc__head-row,
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer .v24-doc__head-row{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 30px !important;
}
.v24-doc.is-exporting .v24-doc__head.v24-doc__head--sherer .v24-doc__head-row--bottom,
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer .v24-doc__head-row--bottom{
  align-items: flex-start !important;
}
.v24-doc.is-exporting .v24-doc__head.v24-doc__head--sherer .v24-doc__head-hr,
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer .v24-doc__head-hr{
  display: block !important;
  height: 1px !important;
  background: var(--beige) !important;
  opacity: .55 !important;
  margin: 4px 0 12px !important;
  width: 100% !important;
}
.v24-doc.is-exporting .v24-doc__head.v24-doc__head--sherer .v24-doc__head-title,
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer .v24-doc__head-title{
  font-family: var(--font-serif) !important;
  font-weight: 700 !important;
  font-size: 30px !important;
  color: var(--beige) !important;
  margin: 0 !important;
  text-align: right !important;
  border-left: none !important;
  padding: 0 !important;
}
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer .v24-doc__head-title{ font-size: 24px !important; }
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer .v24-doc__logo-img{ width: 140px !important; }
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer .v24-doc__head-hr{ margin: 3px 0 8px !important; }
.v24-doc.is-exporting .v24-doc__head.v24-doc__head--sherer .v24-doc__coords,
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer .v24-doc__coords{
  font-size: 11.5px !important;
  line-height: 1.6 !important;
  opacity: .92 !important;
  text-align: left !important;
}
.v24-doc.is-exporting .v24-doc__head.v24-doc__head--sherer .v24-doc__dates,
.v24-doc.is-force-single .v24-doc__head.v24-doc__head--sherer .v24-doc__dates{
  font-size: 11.5px !important;
  line-height: 1.7 !important;
  text-align: right !important;
}
.v24-doc__coords{
  font-size: 11.5px;
  opacity: .88;
  line-height: 1.55;
}
.v24-doc__title{
  text-align: right;
  padding-left: 24px;
  border-left: 1px solid rgba(237,225,216,.25);
}
.v24-doc__title h1{
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--beige);
  margin: 0 0 10px;
  letter-spacing: .5px;
}
.v24-doc__title-hr{
  height: 1px; background: rgba(237,225,216,.35);
  margin: 6px 0 10px;
}
.v24-doc__dates{ font-size: 11.5px; line-height: 1.7; }
.v24-doc__dates strong{ font-weight: 600; }

/* ---------- INFO (CLIENT + INFORMATION) ---------- */
.v24-doc__info{
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
  padding: 18px 40px 12px;
  background: #faf4ee;
}
.v24-doc__col h2{
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--bordeaux);
  margin: 0 0 10px;
  letter-spacing: .5px;
}
.v24-doc__col-body div{ margin-bottom: 3px; font-size: 12.5px; color: #2a1a20; }
.v24-doc__col-body strong{ font-weight: 600; }
.v24-doc__col:first-child{ padding-right: 24px; }
.v24-doc__col:last-child{ padding-left: 24px; }
.v24-doc__col-sep{ background: var(--bordeaux); opacity: .25; }

.v24-doc__divider{
  height: 1px; background: var(--bordeaux); opacity: .3;
  margin: 2px 40px 14px;
}

/* ---------- BODY / PRESTATIONS ---------- */
.v24-doc__body{ padding: 0 40px 18px; }
.v24-doc__section{
  font-size: 12px;
  font-weight: 700;
  color: var(--bordeaux);
  margin: 0 0 12px;
  letter-spacing: .3px;
}

.v24-item{ margin-bottom: 14px; }
.v24-item h3{
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--bordeaux);
  margin: 0 0 5px;
  letter-spacing: .2px;
}
.v24-item__price{ font-weight: 700; color: var(--bordeaux); }
.v24-strike{ text-decoration: line-through; opacity: .6; font-weight: 500; margin-right: 4px; }
.v24-arrow{ margin: 0 2px; opacity: .6; }
.v24-item__meta{
  font-size: 11px;
  color: #2a1a20;
  margin-bottom: 5px;
}
.v24-item__desc{
  font-size: 11.5px;
  line-height: 1.5;
  color: #2a1a20;
  margin-bottom: 5px;
  white-space: pre-wrap;
}
.v24-list{
  margin: 4px 0 4px 0;
  padding-left: 18px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #2a1a20;
}
.v24-list li{ margin-bottom: 2px; }
.v24-list li em{ color: var(--bordeaux); font-style: normal; font-weight: 500; }

/* Sous-titres 1) Prestation / 2) Déroulement — discrets et professionnels */
.v24-item__section-lbl{
  font-family: var(--font-sans);
  font-size: 9.5px;
  color: #7a4a55;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 14px 0 4px;   /* respire avant chaque section */
}
.v24-item__section-lbl:first-child{ margin-top: 6px; }  /* pas de gros écart pour le premier */
.v24-list--deroulement{ margin-top: 2px; }
.v24-list--deroulement li{ font-weight: 500; margin-bottom: 4px; }

/* ---------- FOOTER ---------- */
.v24-doc__footer{ padding: 0 40px 22px; }
.v24-doc__footer-hr{
  display: none;
}
.v24-doc__totals{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: start;
  margin-bottom: 16px;
}
.v24-doc__pay h4{
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--bordeaux);
  margin: 0 0 8px;
  letter-spacing: .3px;
}
.v24-doc__pay ul{
  margin: 0; padding-left: 20px;
  font-size: 11.5px;
  color: #2a1a20;
  line-height: 1.55;
}
.v24-doc__totals-col{ text-align: right; min-width: 220px; }
.v24-doc__tva-mention{
  font-size: 11.5px;
  font-weight: 700;
  color: var(--bordeaux);
  margin-bottom: 4px;
}
.v24-doc__total-line{
  font-size: 13px;
  color: #2a1a20;
  margin-bottom: 2px;
}
.v24-doc__total-line--big{
  font-size: 15px;
  font-weight: 700;
  color: var(--bordeaux);
  padding-top: 4px;
}
.v24-doc__acompte-line{
  font-size: 11.5px;
  color: #2a1a20;
  margin-top: 6px;
}

.v24-doc__signature{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding-top: 22px;   /* respire avant les traits */
  padding-bottom: 6px;
  page-break-inside: avoid;
}
.v24-doc__signature-line{
  border-top: 2px solid var(--bordeaux);
  margin-bottom: 6px;
  margin-top: 18px;    /* espace pour la signature manuscrite */
}
.v24-doc__signature-label{
  text-align: center;
  font-size: 12px;
  color: #2a1a20;
  font-weight: 500;
}

/* ---------- PRINT ---------- */
@media print {
  html, body{ background: white !important; margin: 0 !important; padding: 0 !important; }
  /* Hide the whole app UI */
  .app, .sidebar, .topbar, .drawer, .toast,
  .modal__backdrop, .modal__close, .form-actions,
  #btn-quick-add, .btn, button{ display: none !important; }

  /* Show only the modal panel with the v24-doc inside */
  .modal{ position: static !important; display: block !important; inset: auto !important; }
  .modal[hidden]{ display: none !important; }
  .modal__panel{
    position: static !important;
    width: 100% !important; max-width: 100% !important;
    min-height: 0 !important; max-height: none !important;
    margin: 0 !important; padding: 0 !important;
    box-shadow: none !important; border-radius: 0 !important;
    overflow: visible !important; animation: none !important;
  }
  .modal__body{ padding: 0 !important; }

  .v24-doc{
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #faf4ee !important;
    page-break-inside: auto;
  }
  .v24-doc, .v24-doc *{
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  /* Chaque prestation reste solidaire ; le footer reste attaché à la dernière prestation */
  .v24-item, .v24-doc__signature, .v24-doc__pay, .v24-doc__totals,
  .v24-doc__info, .v24-doc__head, .v24-doc__footer{
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  /* 🔧 COMPACTAGE IMPRESSION : 1 prestation = 1 A4 exact
     Neutralise les grosses marges "is-exporting" prévues pour le PDF html2canvas
     et laisse le flux tenir sur une feuille physique. */
  .v24-doc .v24-item{ padding: 6mm 0 !important; }
  .v24-doc .v24-doc__footer{ padding: 10mm 40px 8mm !important; }
  .v24-doc .v24-doc__signature{ padding-top: 20px !important; padding-bottom: 4px !important; }
  .v24-doc .v24-item h3{ font-size: 14px !important; margin-bottom: 8px !important; }
  .v24-doc .v24-item__desc,
  .v24-doc .v24-list{ font-size: 11.5px !important; line-height: 1.55 !important; }
  .v24-doc .v24-item__section-lbl{ margin: 10px 0 6px !important; font-size: 10.5px !important; }
  .v24-doc__head{
    padding: 16px 40px 14px !important;
  }
  .v24-doc__info{
    padding: 14px 40px 10px !important;
  }

  /* A4 exact + suppression des en-têtes/pieds navigateur */
  @page { size: A4 portrait; margin: 0; }
  @page :first { margin: 0; }
}

/* PRINT (devis) */
@media print {
  .sidebar, .topbar, .drawer__close, .modal__close, .panel-back, .btn { display: none !important; }
  body { background: white; }
  .modal__backdrop { display: none; }
  .modal__panel { box-shadow: none; max-height: none; }
}

/* =========================================================
   MOBILE (< 900px) — hamburger + adaptations tactiles
========================================================= */
.mobile-menu-btn{
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 8px; margin-right: 4px;
}
.mobile-menu-btn:hover{ background: var(--beige-2); }
.mobile-menu-btn svg{ width: 22px; height: 22px; color: var(--bordeaux); }
.btn-label-desktop{ display: inline; }
.sidebar__backdrop{ display: none; }

@media (max-width: 900px){
  .app{ grid-template-columns: 1fr; }
  .sidebar{
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px; z-index: 200;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.2,.9,.3,1);
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
  }
  .sidebar.is-open{ transform: translateX(0); }
  .sidebar__backdrop{
    display: block;
    position: fixed; inset: 0; z-index: 190;
    background: rgba(26,17,19,.5);
    opacity: 0; pointer-events: none;
    transition: opacity .2s;
  }
  .sidebar__backdrop.is-open{ opacity: 1; pointer-events: auto; }
  .mobile-menu-btn{ display: inline-flex; }

  .topbar{
    padding: 10px 14px; gap: 8px;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .search{ padding: 8px 10px; }
  .search input{ font-size: 15px; }
  .btn-label-desktop{ display: none; }
  .topbar__actions .btn{ padding: 9px 12px; }

  .view{ padding: 18px 14px 80px; }
  .view-header{ flex-direction: column; align-items: flex-start; gap: 12px; }
  .view-title{ font-size: 26px; }
  .view-subtitle{ font-size: 12.5px; }

  .grid-4, .grid-3, .grid-2{ grid-template-columns: 1fr; }
  .kpi__value{ font-size: 28px; }

  .list__head{ display: none; }
  .list__row{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 14px !important;
  }
  .list__row > div{ min-width: 0; }

  .pipeline{ margin: 0 -14px; padding: 4px 14px 20px; }
  .column{ flex: 0 0 82vw; max-width: 320px; }

  .qe__topbar{ top: 60px; padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .qe__title h2{ font-size: 18px; }
  .qe__actions{ flex-wrap: wrap; }
  .qe__actions .btn{ flex: 1; min-width: 90px; }
  .qe__grid{ padding: 14px; gap: 14px; }
  .qe-item__head{ flex-direction: column; align-items: stretch; }
  .qe-item__head > div:last-child{ display: flex; gap: 6px; margin-top: 8px; }

  .modal__panel{
    width: 100% !important; max-width: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  .modal__body{ padding: 20px 16px 40px; }
  .drawer__panel{ width: 100%; }
  .drawer__body{ padding: 20px 16px 40px; }

  .field input, .field select, .field textarea{
    font-size: 16px; padding: 12px 14px;
  }
  .field-row, .field-row-3{ grid-template-columns: 1fr; }

  .fiche__head{ flex-direction: column; align-items: flex-start; }
  .fiche__actions{ margin-left: 0; width: 100%; }
  .fiche__actions .btn{ flex: 1; }
  .fiche__title{ font-size: 22px; }
  .info-grid{ grid-template-columns: 1fr; gap: 4px 8px; }
  .info-grid dt{ font-size: 11px; text-transform: uppercase; letter-spacing: .5px; margin-top: 8px; }
  .info-grid dd{ font-size: 14px; margin-bottom: 4px; }

  .tabs{ overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar{ display: none; }
  .tabs button{ white-space: nowrap; padding: 12px 14px; font-size: 13px; }

  .toolbar{ overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .toolbar::-webkit-scrollbar{ display: none; }
  .chip{ white-space: nowrap; flex-shrink: 0; padding: 8px 14px; font-size: 13px; }

  .btn{ padding: 11px 16px; font-size: 14px; min-height: 42px; }
  .btn--sm{ padding: 8px 12px; font-size: 12.5px; min-height: 36px; }

  .calendar__cell{ min-height: 60px; padding: 4px; }
  .calendar__day{ font-size: 11px; }
  .calendar__event{ font-size: 9.5px; padding: 1px 4px; }
  .calendar-month{ font-size: 18px; }

  .rev-chart{ height: 160px; gap: 4px; }
  .rev-bar{ width: 10px; }
  .rev-bar__lbl{ font-size: 9.5px; }
  .rev-calendar{ grid-template-columns: 1fr; }
  .rev-month__name{ font-size: 16px; }

  /* Le devis (.v24-doc) garde son format A4 Mr Sherer sur mobile aussi.
     Le conteneur parent (.modal) autorise le scroll horizontal si nécessaire. */

  .brand__logo-img{ width: 110px; }
  .login__card{ padding: 28px 24px; border-radius: 14px; }
  .login__title{ font-size: 22px; }
  .login__field input{ font-size: 16px; padding: 14px; }
  .toast{ left: 14px; right: 14px; bottom: 14px; text-align: center; }
}

@media (max-width: 400px){
  .view{ padding: 14px 10px 80px; }
  .view-title{ font-size: 22px; }
  .kpi__value{ font-size: 24px; }
  .card, .kpi{ padding: 16px 12px; }
}

/* =========================================================
   DEMANDES — Design épuré
========================================================= */
.dm-stats{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.dm-stat{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 2px;
  transition: transform .15s;
}
.dm-stat:hover{ transform: translateY(-1px); }
.dm-stat--accent{ background: var(--bordeaux); color: var(--beige); border-color: var(--bordeaux); }
.dm-stat__num{
  font-family: var(--font-serif);
  font-size: 30px; font-weight: 500;
  color: var(--bordeaux);
  line-height: 1;
}
.dm-stat--accent .dm-stat__num{ color: var(--beige); }
.dm-stat__lbl{
  font-size: 11.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 500;
  margin-top: 4px;
}
.dm-stat--accent .dm-stat__lbl{ color: rgba(237,225,216,.75); }

.dm-filters{
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.dm-segment{
  display: inline-flex;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
}
.dm-segment__btn{
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  transition: all .15s;
  border: none; background: transparent; cursor: pointer;
  font-family: inherit;
}
.dm-segment__btn:hover{ color: var(--ink); }
.dm-segment__btn.is-active{
  background: var(--bordeaux); color: var(--beige);
}
.dm-select{
  padding: 9px 14px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-size: 13px; font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a7a7f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  min-width: 180px;
}
.dm-select:hover{ border-color: var(--bordeaux); }

.dm-list{
  display: flex; flex-direction: column;
  gap: 8px;
}
.dm-card{
  display: flex;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all .15s;
}
.dm-card:hover{
  border-color: var(--bordeaux);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.dm-card.is-new{
  border-left: 3px solid var(--hot);
  background: linear-gradient(90deg, rgba(192,57,43,.03) 0%, var(--white) 15%);
}
.dm-card__left{ flex-shrink: 0; }
.dm-card__left .avatar{ width: 44px; height: 44px; font-size: 17px; }
.dm-card__body{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dm-card__head{
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
}
.dm-card__name{
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.dm-card__meta{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dm-source{
  font-size: 11px;
  padding: 2px 8px;
  background: var(--beige-3);
  color: var(--muted);
  border-radius: 5px;
  font-weight: 500;
  letter-spacing: .2px;
}
.dm-card__event{
  font-size: 13px; color: var(--ink-2);
}
.dm-card__event strong{ color: var(--bordeaux); font-weight: 500; }
.dm-card__foot{
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
}

.dm-empty{
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 16px;
}
.dm-empty__icon{ font-size: 42px; margin-bottom: 12px; opacity: .5; }
.dm-empty__title{
  font-family: var(--font-serif);
  font-size: 20px; color: var(--bordeaux);
  margin-bottom: 4px;
}
.dm-empty__sub{
  font-size: 13px; color: var(--muted);
}

@media (max-width: 700px){
  .dm-stats{ grid-template-columns: 1fr 1fr; }
  .dm-card__head{ flex-direction: column; gap: 6px; }
  .dm-card__foot{ flex-direction: column; align-items: flex-start; gap: 8px; }
  .dm-select{ width: 100%; }
  .dm-segment{ width: 100%; }
  .dm-segment__btn{ flex: 1; }
}

/* Stats compactes en pill */
.dm-stats-inline{
  display: flex; gap: 8px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.dm-stat-pill{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px; color: var(--muted);
  font-weight: 500;
  transition: all .15s;
}
.dm-stat-pill:hover{ border-color: var(--bordeaux); }
.dm-stat-pill__num{
  font-family: var(--font-serif);
  font-size: 18px; color: var(--bordeaux);
  font-weight: 500; line-height: 1;
}
.dm-stat-pill--accent{
  background: var(--bordeaux); color: var(--beige); border-color: var(--bordeaux);
}
.dm-stat-pill--accent .dm-stat-pill__num{ color: var(--beige); }

/* =========================================================
   FICHE CONTACT v2 — clean & intuitive
========================================================= */
.ficheV2__head{
  display: flex; gap: 16px; align-items: flex-start;
  padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.ficheV2__id{ display: flex; gap: 14px; align-items: center; flex: 1; min-width: 0; }
.ficheV2__avatar{
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bordeaux); color: var(--beige);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 24px; font-weight: 500;
  flex-shrink: 0;
}
.ficheV2__title{
  font-family: var(--font-serif); font-size: 26px; color: var(--bordeaux);
  font-weight: 500; margin: 0;
}
.ficheV2__badges{
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin-top: 6px;
}
.ficheV2__company{
  font-size: 12px; color: var(--muted);
  padding-left: 4px;
}
.ficheV2__actions{ display: flex; gap: 6px; flex-shrink: 0; }

.ficheV2__quick{
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.ficheV2__quick-btn{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ink);
  cursor: pointer; transition: all .15s;
  font-family: inherit;
  text-decoration: none;
}
.ficheV2__quick-btn:hover{ border-color: var(--bordeaux); background: var(--beige-3); }
.ficheV2__quick-btn span{ font-size: 15px; }

.tab-count{
  display: inline-block;
  padding: 1px 7px; margin-left: 4px;
  background: var(--beige-3); color: var(--muted);
  border-radius: 999px; font-size: 11px; font-weight: 600;
}
.tabs button.is-active .tab-count{
  background: var(--bordeaux); color: var(--beige);
}

.ficheV2__coords{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.ficheV2__coord{
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: all .15s;
}
a.ficheV2__coord:hover{ border-color: var(--bordeaux); background: var(--beige-3); }
.ficheV2__coord-ico{
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--beige-3); display: grid; place-items: center;
  font-size: 15px; flex-shrink: 0;
}
.ficheV2__coord-lbl{
  font-size: 10.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .5px; font-weight: 600;
}
.ficheV2__coord-val{
  font-size: 13.5px; color: var(--ink); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ficheV2__notes{
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; margin-bottom: 18px;
}
.ficheV2__notes-head{
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
  font-size: 13px; font-weight: 600; color: var(--bordeaux);
}
.ficheV2__notes textarea{
  width: 100%; box-sizing: border-box;
  min-height: 90px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: inherit; font-size: 13.5px; line-height: 1.5;
  resize: vertical;
  background: var(--beige-3);
}
.ficheV2__notes textarea:focus{ outline: none; border-color: var(--bordeaux); background: var(--white); }

.ficheV2__row{
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 18px;
}
.ficheV2__segment-block{
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.ficheV2__lbl{
  display: block;
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
  margin-bottom: 8px;
}
.ficheV2__pillbar{
  display: flex; gap: 4px; flex-wrap: wrap;
}
.ficheV2__pill{
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; transition: all .1s;
  font-family: inherit;
}
.ficheV2__pill:hover{ border-color: var(--bordeaux); color: var(--bordeaux); }
.ficheV2__pill.is-active{
  background: var(--bordeaux); color: var(--beige); border-color: var(--bordeaux);
}
.ficheV2__pill--hot.is-active{ background: var(--hot); border-color: var(--hot); }
.ficheV2__pill--warm.is-active{ background: var(--warm); border-color: var(--warm); }
.ficheV2__pill--cold.is-active{ background: var(--cold); border-color: var(--cold); }

.ficheV2__last{
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; margin-bottom: 18px;
}
.ficheV2__last-head{
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
  margin-bottom: 8px;
}
.ficheV2__last-body{ display: flex; gap: 12px; align-items: flex-start; }

.ficheV2__foot{
  text-align: center; font-size: 11.5px; color: var(--muted);
  padding: 12px 0 0;
}

@media (max-width: 700px){
  .ficheV2__head{ flex-direction: column; align-items: stretch; }
  .ficheV2__actions{ width: 100%; }
  .ficheV2__actions .btn{ flex: 1; }
  .ficheV2__coords{ grid-template-columns: 1fr; }
  .ficheV2__row{ grid-template-columns: 1fr; }
}

/* =========================================================
   FICHE DEMANDE v2 — colorée, cellule bordeaux mise en avant
========================================================= */
.dmV2__head{
  display: flex; gap: 16px; align-items: flex-start; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.dmV2__id{ display: flex; gap: 14px; align-items: center; flex: 1; min-width: 0; }
.dmV2__avatar{
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bordeaux) 0%, #7a1230 100%);
  color: var(--beige);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 22px; font-weight: 500;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(86,2,22,.2);
}
.dmV2__title{
  font-family: var(--font-serif); font-size: 24px; color: var(--bordeaux);
  font-weight: 500; margin: 0;
}
.dmV2__badges{
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin-top: 6px;
}
.dmV2__source{
  font-size: 11px; padding: 2px 8px;
  background: var(--beige-3); color: var(--muted);
  border-radius: 5px; font-weight: 500;
}
.dmV2__received{ font-size: 12px; color: var(--muted); }
.dmV2__actions{ display: flex; gap: 6px; flex-wrap: wrap; }

/* 🎯 BLOC BORDEAUX — l'essentiel de l'événement */
.dmV2__hero{
  background: linear-gradient(135deg, var(--bordeaux) 0%, #7a1230 100%);
  color: var(--beige);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 8px 32px rgba(86,2,22,.2);
  position: relative;
  overflow: hidden;
}
.dmV2__hero::before{
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(237,225,216,.08);
  border-radius: 50%;
  pointer-events: none;
}
.dmV2__hero-title{
  font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase;
  opacity: .7; font-weight: 600;
  margin-bottom: 4px;
}
.dmV2__hero-main{
  font-family: var(--font-serif); font-size: 28px;
  font-weight: 500; line-height: 1.1;
  margin-bottom: 18px;
}
.dmV2__hero-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px 20px;
  position: relative; z-index: 1;
}
.dmV2__hero-cell{ display: flex; flex-direction: column; gap: 2px; }
.dmV2__hero-lbl{
  font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase;
  opacity: .65; font-weight: 600;
}
.dmV2__hero-val{
  font-size: 15px; font-weight: 500;
}
.dmV2__hero-services{
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid rgba(237,225,216,.2);
}
.dmV2__hero-tags{ display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dmV2__tag{
  padding: 4px 12px;
  background: var(--beige);
  color: var(--bordeaux);
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
}

/* Coordonnées cliquables colorées */
.dmV2__coords{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.dmV2__coord{
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: all .15s;
}
a.dmV2__coord{ cursor: pointer; }
a.dmV2__coord:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }
.dmV2__coord--email:hover{ border-color: var(--cold); }
.dmV2__coord--phone:hover{ border-color: var(--success); }
.dmV2__coord-ico{
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 16px; flex-shrink: 0;
}
.dmV2__coord--email .dmV2__coord-ico{ background: rgba(91,141,184,.12); }
.dmV2__coord--phone .dmV2__coord-ico{ background: rgba(46,125,91,.12); }
.dmV2__coord--company .dmV2__coord-ico{ background: rgba(184,134,11,.14); }
.dmV2__coord--type .dmV2__coord-ico{ background: var(--beige-3); }
.dmV2__coord-lbl{
  font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
}
.dmV2__coord-val{
  font-size: 13.5px; color: var(--ink); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Message : fond beige chaleureux */
.dmV2__msg{
  background: linear-gradient(180deg, var(--beige-2) 0%, var(--beige-3) 100%);
  border: 1px solid var(--beige);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.dmV2__msg-head{
  font-size: 12px; color: var(--bordeaux); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 8px;
}
.dmV2__msg-body{
  font-size: 14px; color: var(--ink); line-height: 1.6;
  white-space: pre-wrap;
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 16px;
}

/* Statut */
.dmV2__statut{
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
  margin-bottom: 12px;
}
.dmV2__statut-lbl{
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
  margin-bottom: 8px;
}

/* Prospect / Devis lié — carte colorée cliquable */
.dmV2__linked{
  display: flex; gap: 14px; align-items: center;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cold);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all .15s;
}
.dmV2__linked:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.dmV2__linked--quote{
  border-left-color: var(--warning);
  background: linear-gradient(90deg, rgba(184,134,11,.05) 0%, var(--white) 20%);
}
.dmV2__linked-ico{
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(91,141,184,.14);
  display: grid; place-items: center;
  font-size: 18px; flex-shrink: 0;
}
.dmV2__linked--quote .dmV2__linked-ico{ background: rgba(184,134,11,.14); }
.dmV2__linked-lbl{
  font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
}
.dmV2__linked-name{
  font-size: 15px; color: var(--ink); font-weight: 500;
}
.dmV2__linked-arrow{
  font-size: 20px; color: var(--muted);
  transition: transform .15s;
}
.dmV2__linked:hover .dmV2__linked-arrow{ transform: translateX(4px); color: var(--bordeaux); }

@media (max-width: 700px){
  .dmV2__head{ flex-direction: column; align-items: stretch; }
  .dmV2__actions{ width: 100%; }
  .dmV2__actions .btn, .dmV2__actions a{ flex: 1; text-align: center; }
  .dmV2__coords{ grid-template-columns: 1fr; }
  .dmV2__hero-main{ font-size: 22px; }
  .dmV2__hero{ padding: 18px; }
}

/* Section label commun aux fiches v2 */
.dmV2__section-lbl{
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
  margin-bottom: 8px;
}
.dmV2__linked--empty{
  border-left-color: var(--muted);
  opacity: .8;
}
.dmV2__linked--empty:hover{ opacity: 1; border-left-color: var(--bordeaux); }
.dmV2__linked--invoice{
  border-left-color: var(--success);
  cursor: default;
}
.dmV2__linked--invoice .dmV2__linked-ico{
  background: rgba(46,125,91,.14);
}

/* =========================================================
   CONTACTS — cards colorées selon température
========================================================= */
.contact-card--hot{
  border-left: 3px solid var(--hot);
  background: linear-gradient(90deg, rgba(192,57,43,.04) 0%, var(--white) 15%);
}
.contact-card--warm{
  border-left: 3px solid var(--warm);
}
.contact-card--cold{
  border-left: 3px solid var(--cold);
}
.contact-card--neutral{
  border-left: 3px solid var(--line);
}
.contact-card:hover{
  border-left-width: 3px !important;
}
.contact-info{
  display: inline-flex; align-items: center; gap: 4px;
  margin-right: 12px;
  color: var(--ink-2); font-size: 13px;
}
.contact-info__ico{
  opacity: .6; font-size: 13px;
}

/* =========================================================
   QUOTE EDITOR v2 — moderne & intuitif
========================================================= */
.qeV2{ background: var(--beige-3); min-height: calc(100vh - 60px); margin: -28px -32px -60px; }

/* Cache le bandeau coloré du view sur l'éditeur devis (redondant avec le topbar) */
.view--quote-editor::before{ display: none; }

.qeV2__topbar{
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(86,2,22,.06);
  position: sticky; top: 60px; z-index: 30;
  min-height: 56px;
}
.qeV2__back{
  padding: 8px 14px; border-radius: 8px;
  background: var(--white); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.qeV2__back:hover{ border-color: var(--bordeaux); color: var(--bordeaux); }
.qeV2__title-block{ display: flex; align-items: center; gap: 12px; flex: 1; }
.qeV2__num{
  font-family: var(--font-serif);
  font-size: 20px; color: var(--bordeaux); font-weight: 500;
  line-height: 1;
}
.qeV2__status{ display: inline-flex; }
.qeV2__actions{ display: flex; gap: 6px; flex-wrap: wrap; }

.qeV2__grid{
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 20px;
  padding: 32px 28px 60px;
  align-items: flex-start;
}
.qeV2__left, .qeV2__center, .qeV2__right{ display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.qeV2__left, .qeV2__right{ position: sticky; top: 148px; max-height: calc(100vh - 160px); overflow-y: auto; padding-right: 4px; scrollbar-width: none; }
.qeV2__left::-webkit-scrollbar, .qeV2__right::-webkit-scrollbar{ width: 0; height: 0; display: none; }
.qeV2__left::-webkit-scrollbar-thumb, .qeV2__right::-webkit-scrollbar-thumb{ background: transparent; }

.qeV2__card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.qeV2__card-title{
  font-family: var(--font-serif);
  font-size: 17px; color: var(--bordeaux); font-weight: 500;
  margin: 0 0 14px;
}

/* Client card */
.qeV2__client{
  display: flex; gap: 12px; align-items: center;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}
.qeV2__client-avatar{
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bordeaux) 0%, #7a1230 100%);
  color: var(--beige);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 18px; font-weight: 500;
  flex-shrink: 0;
}
.qeV2__client-name{
  font-family: var(--font-serif); font-size: 20px; color: var(--bordeaux);
  font-weight: 500; line-height: 1.1;
}
.qeV2__client-company{
  font-size: 12px; color: var(--muted); margin-top: 2px;
}
.qeV2__client-coords{ display: flex; flex-direction: column; gap: 6px; }
.qeV2__client-line{
  font-size: 13px; color: var(--ink-2);
  display: flex; gap: 8px; align-items: center;
}
.qeV2__client-line span{ opacity: .7; font-size: 13px; }

/* Prestations head */
.qeV2__items-head{
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.qeV2__items-actions{ display: flex; gap: 6px; }

.qeV2__empty{
  text-align: center; padding: 40px 20px;
  background: linear-gradient(180deg, var(--beige-2) 0%, var(--beige-3) 100%);
  border: 1px dashed var(--beige);
  border-radius: 14px;
  margin-top: 8px;
}
.qeV2__empty-icon{ font-size: 44px; margin-bottom: 12px; opacity: .6; }
.qeV2__empty-title{
  font-family: var(--font-serif);
  font-size: 22px; color: var(--bordeaux); margin-bottom: 6px;
}
.qeV2__empty-sub{
  font-size: 13px; color: var(--muted);
  margin-bottom: 16px;
}

/* 🍷 Hero bordeaux TTC */
.qeV2__hero{
  background: linear-gradient(135deg, var(--bordeaux) 0%, #7a1230 100%);
  color: var(--beige);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(86,2,22,.2);
  position: relative; overflow: hidden;
}
.qeV2__hero::before{
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(237,225,216,.08);
  border-radius: 50%;
}
.qeV2__hero-lbl{
  font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase;
  opacity: .75; font-weight: 600;
  margin-bottom: 6px;
}
.qeV2__hero-num{
  font-family: var(--font-serif);
  font-size: 40px; font-weight: 500; line-height: 1;
  position: relative; z-index: 1;
}
.qeV2__hero-sub{
  margin-top: 10px; font-size: 12.5px;
  opacity: .85;
  padding-top: 10px;
  border-top: 1px solid rgba(237,225,216,.2);
  position: relative; z-index: 1;
}
.qeV2__hero-sub strong{ font-weight: 600; }

/* Petits inputs numériques */
.qeV2__mini-input{
  width: 80px; text-align: right;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  background: var(--beige-3);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.qeV2__mini-input:focus{
  outline: none;
  background: var(--white);
  border-color: var(--bordeaux);
  box-shadow: 0 0 0 2px rgba(86,2,22,.12);
}

/* Conditions collapse */
.qeV2__conditions summary::-webkit-details-marker{ display: none; }
.qeV2__conditions summary{
  position: relative;
  padding-right: 20px;
}
.qeV2__conditions summary::after{
  content: "▾"; position: absolute; right: 0; top: 0;
  color: var(--muted); font-size: 12px;
  transition: transform .2s;
}
.qeV2__conditions[open] summary::after{ transform: rotate(180deg); }
.qeV2__conditions textarea{
  width: 100%; box-sizing: border-box;
  min-height: 90px; padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit; font-size: 12px; line-height: 1.5;
  background: var(--beige-3);
  margin-top: 10px;
}
.qeV2__conditions textarea:focus{ outline: none; border-color: var(--bordeaux); background: var(--white); }

@media (max-width: 1300px){
  .qeV2__grid{ grid-template-columns: 280px minmax(0, 1fr); }
  .qeV2__right{ grid-column: 1 / -1; position: static; max-height: none; overflow: visible; }
}
@media (max-width: 900px){
  .qeV2{ margin: -18px -14px -60px; }
  .qeV2__grid{ grid-template-columns: 1fr; padding: 20px 14px 60px; }
  .qeV2__left, .qeV2__right{ position: static; max-height: none; overflow: visible; }
  .qeV2__topbar{ padding: 12px 14px; top: 60px; flex-wrap: wrap; }
  .qeV2__hero-num{ font-size: 32px; }
}

/* =========================================================
   DEVIS & FACTURES groupés par client
========================================================= */
.qz-group{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .15s;
}
.qz-group:hover{ border-color: var(--bordeaux); }
.qz-group[open]{ box-shadow: var(--shadow-sm); }

.qz-group__head{
  display: grid;
  grid-template-columns: 1fr auto 30px;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.qz-group__head::-webkit-details-marker{ display: none; }
.qz-group__client{ display: flex; gap: 12px; align-items: center; min-width: 0; }
.qz-group__client .avatar{ width: 40px; height: 40px; font-size: 15px; }
.qz-group__name{
  font-family: var(--font-serif);
  font-size: 18px; color: var(--bordeaux);
  font-weight: 500; line-height: 1.2;
}
.qz-group__type{ display: flex; gap: 8px; align-items: center; margin-top: 2px; }

.qz-group__totals{ display: flex; gap: 20px; align-items: center; }
.qz-group__stat{ display: flex; flex-direction: column; gap: 2px; text-align: right; }
.qz-group__stat span{
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); font-weight: 600;
}
.qz-group__stat strong{
  font-family: var(--font-serif);
  font-size: 17px; color: var(--ink); font-weight: 500;
}
.qz-group__stat--warn strong{ color: var(--warm); }
.qz-group__stat--ok strong{ color: var(--success); }

.qz-group__toggle{
  color: var(--muted);
  transition: transform .2s;
  font-size: 14px;
}
.qz-group[open] .qz-group__toggle{ transform: rotate(180deg); }

.qz-group__content{
  border-top: 1px solid var(--line);
  padding: 16px 18px;
  background: var(--beige-3);
}

.qz-subhead{
  font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
  margin-bottom: 8px;
}

.qz-line{
  display: grid;
  grid-template-columns: 120px 1fr 140px 130px auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 6px;
  transition: all .15s;
  cursor: pointer;
}
.qz-line:hover{ border-color: var(--bordeaux); transform: translateY(-1px); }
.qz-line--invoice{ cursor: default; }
.qz-line--invoice:hover{ transform: none; }

.qz-line__num{
  font-weight: 600; color: var(--bordeaux); font-size: 13px;
}
.qz-line__title{ font-size: 13.5px; color: var(--ink); }
.qz-line__money{
  font-family: var(--font-serif);
  font-size: 16px; color: var(--bordeaux); font-weight: 500;
  text-align: right;
}
.qz-line__badge{ text-align: center; }
.qz-line__actions{ display: flex; gap: 4px; }

@media (max-width: 900px){
  .qz-group__head{ grid-template-columns: 1fr 24px; }
  .qz-group__totals{ display: none; }
  .qz-line{ grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; }
  .qz-line__money{ text-align: left; }
  .qz-line__actions{ margin-top: 4px; }
}

/* Bloc finance dans dm-card */
.dm-card__finance{
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 8px;
}
.dm-card__fin-cell{
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 12px;
  background: var(--beige-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 120px;
}
.dm-card__fin-cell--ok{ border-color: rgba(46,125,91,.3); background: rgba(46,125,91,.06); }
.dm-card__fin-cell--warn{ border-color: rgba(230,126,34,.35); background: rgba(230,126,34,.08); }
.dm-card__fin-lbl{
  font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.dm-card__fin-val{
  font-family: var(--font-serif);
  font-size: 17px; color: var(--bordeaux); font-weight: 500;
}
.dm-card__fin-cell--ok .dm-card__fin-val{ color: var(--success); }
.dm-card__fin-cell--warn .dm-card__fin-val{ color: var(--warm); }

.dm-card__actions{
  display: flex; gap: 6px; align-items: center;
  margin-top: 10px; flex-wrap: wrap;
}
.dm-card__statut-select{
  padding: 6px 26px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 12.5px; font-weight: 500; color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238a7a7f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.dm-card__statut-select:hover{ border-color: var(--bordeaux); }

@media (max-width: 700px){
  .dm-card__finance{ flex-direction: column; }
  .dm-card__fin-cell{ min-width: 0; width: 100%; }
  .dm-card__actions{ flex-direction: column; align-items: stretch; }
  .dm-card__actions .btn{ width: 100%; margin-left: 0 !important; }
}

/* =========================================================
   FACTURE — cellules finance + progression
========================================================= */
.qz-invoice{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
}
.qz-invoice__head{
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 10px;
}
.qz-invoice__num{
  font-size: 14px; color: var(--bordeaux); font-weight: 600;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}

.qz-invoice__cells{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.qz-invoice__cell{
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.qz-invoice__cell--ok{
  background: rgba(46,125,91,.06);
  border-color: rgba(46,125,91,.25);
}
.qz-invoice__cell--warn{
  background: rgba(230,126,34,.08);
  border-color: rgba(230,126,34,.3);
}
.qz-invoice__lbl{
  font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.qz-invoice__val{
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 500; line-height: 1.1;
}
.qz-invoice__cell--ok .qz-invoice__val{ color: var(--success); }
.qz-invoice__cell--warn .qz-invoice__val{ color: var(--warm); }

.qz-invoice__progress{
  height: 8px;
  background: var(--beige-3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.qz-invoice__progress-bar{
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, #4aa375 100%);
  border-radius: 999px;
  transition: width .3s ease;
}

.qz-invoice__actions{
  display: flex; gap: 6px; flex-wrap: wrap;
}

@media (max-width: 700px){
  .qz-invoice__cells{ grid-template-columns: 1fr; }
  .qz-invoice__actions .btn{ flex: 1; }
}

/* =========================================================
   DASHBOARD — KPI colorées + accents visuels
========================================================= */
.dash-kpis{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}
@media (max-width: 1100px){ .dash-kpis{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px){ .dash-kpis{ grid-template-columns: 1fr; } }

.dash-kpi{
  display: flex; gap: 14px; align-items: center;
  padding: 18px 20px;
  border-radius: 16px;
  color: white;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(86,2,22,.08);
  transition: transform .18s, box-shadow .18s;
}
.dash-kpi:hover{ transform: translateY(-3px); box-shadow: 0 12px 40px rgba(86,2,22,.15); }
.dash-kpi::before{
  content: ""; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
}
.dash-kpi--pros{ background: linear-gradient(135deg, #560216 0%, #7a1230 100%); }
.dash-kpi--devis{ background: linear-gradient(135deg, #b8860b 0%, #d4a53d 100%); }
.dash-kpi--ca{ background: linear-gradient(135deg, #2e7d5b 0%, #4aa375 100%); }
.dash-kpi--prev{ background: linear-gradient(135deg, #5b8db8 0%, #7ba8cf 100%); }

.dash-kpi__ico{
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(255,255,255,.18);
  display: grid; place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  z-index: 1;
}
.dash-kpi__body{ flex: 1; min-width: 0; z-index: 1; position: relative; }
.dash-kpi__lbl{
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  opacity: .85; font-weight: 600; margin-bottom: 2px;
}
.dash-kpi__num{
  font-family: var(--font-serif);
  font-size: 30px; font-weight: 500; line-height: 1.1;
  color: white;
}
.dash-kpi__hint{
  font-size: 12px; opacity: .9; margin-top: 4px;
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.dash-tag{
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px;
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
}

/* Cards du dashboard avec accents colorés à gauche */
.dash-card{ border-left: 4px solid var(--line); transition: border-color .15s; }
.dash-card--warn{ border-left-color: var(--warm); }
.dash-card--ok{ border-left-color: var(--success); }
.dash-card--bord{ border-left-color: var(--bordeaux); }
.dash-card--cold{ border-left-color: var(--cold); }

.section-ico{
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  font-size: 15px;
  margin-right: 6px;
  vertical-align: middle;
}
.dash-card--warn .section-ico{ background: rgba(230,126,34,.12); }
.dash-card--ok .section-ico{ background: rgba(46,125,91,.12); }
.dash-card--bord .section-ico{ background: rgba(86,2,22,.08); }
.dash-card--cold .section-ico{ background: rgba(91,141,184,.12); }

/* Améliore les stat-line dans les cards colorées */
.dash-card .stat-line{
  padding: 10px 4px;
  border-color: rgba(0,0,0,.04);
}
.dash-card .stat-line:hover{ background: rgba(0,0,0,.02); border-radius: 6px; }

/* =========================================================
   IDENTITÉ COLORÉE PAR PAGE
========================================================= */
/* Bandeau discret en haut de chaque page */
.view{ position: relative; }
.view::before{
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--v-c1, var(--bordeaux)) 0%, var(--v-c2, #7a1230) 100%);
  border-radius: 4px 4px 0 0;
  opacity: .9;
}

/* Grosse icône colorée devant le titre */
.view-title::before{
  content: attr(data-ico);
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--v-c1, var(--bordeaux)) 0%, var(--v-c2, #7a1230) 100%);
  color: white;
  font-size: 24px;
  margin-right: 14px;
  vertical-align: middle;
  box-shadow: 0 4px 14px var(--v-shadow, rgba(86,2,22,.2));
  font-family: 'Apple Color Emoji','Segoe UI Emoji',sans-serif;
}

/* Palettes par page */
.view--dashboard  { --v-c1:#560216; --v-c2:#7a1230; --v-shadow: rgba(86,2,22,.25); }
.view--demandes   { --v-c1:#b8860b; --v-c2:#d4a53d; --v-shadow: rgba(184,134,11,.3); }
.view--contacts   { --v-c1:#5b8db8; --v-c2:#7ba8cf; --v-shadow: rgba(91,141,184,.3); }
.view--pipeline   { --v-c1:#560216; --v-c2:#a83250; --v-shadow: rgba(86,2,22,.25); }
.view--events     { --v-c1:#2e7d5b; --v-c2:#4aa375; --v-shadow: rgba(46,125,91,.3); }
.view--revenue    { --v-c1:#c9a447; --v-c2:#e0be6a; --v-shadow: rgba(201,164,71,.35); }
.view--quotes     { --v-c1:#560216; --v-c2:#8b3a5a; --v-shadow: rgba(86,2,22,.25); }
.view--tasks      { --v-c1:#e67e22; --v-c2:#f39c46; --v-shadow: rgba(230,126,34,.3); }
.view--prestations{ --v-c1:#8b4a8b; --v-c2:#b070b0; --v-shadow: rgba(139,74,139,.3); }

.view-header{ padding-top: 8px; }
@media (max-width: 700px){
  .view-title::before{ width: 40px; height: 40px; font-size: 20px; margin-right: 10px; border-radius: 12px; }
}

/* =========================================================
   PIPELINE — colonnes colorées par étape
========================================================= */
.column{ position: relative; overflow: hidden; }
.column::before{
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--col-c, var(--muted));
  border-radius: 4px 4px 0 0;
}
.column__head{ position: relative; }
.column__title{ position: relative; padding-left: 20px; }
.column__title::before{
  content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--col-c, var(--muted));
  box-shadow: 0 0 0 3px var(--col-halo, rgba(154,138,143,.15));
}

.column--s_received{
  --col-c: #8a7a7f; --col-halo: rgba(138,122,127,.15);
  background: linear-gradient(180deg, rgba(138,122,127,.06) 0%, var(--beige-3) 60%);
}
.column--s_meeting{
  --col-c: #5b8db8; --col-halo: rgba(91,141,184,.18);
  background: linear-gradient(180deg, rgba(91,141,184,.08) 0%, var(--beige-3) 60%);
}
.column--s_quote_p{
  --col-c: #b8860b; --col-halo: rgba(184,134,11,.18);
  background: linear-gradient(180deg, rgba(184,134,11,.08) 0%, var(--beige-3) 60%);
}
.column--s_quote_s{
  --col-c: #e67e22; --col-halo: rgba(230,126,34,.18);
  background: linear-gradient(180deg, rgba(230,126,34,.08) 0%, var(--beige-3) 60%);
}
.column--s_followup{
  --col-c: #c0392b; --col-halo: rgba(192,57,43,.18);
  background: linear-gradient(180deg, rgba(192,57,43,.08) 0%, var(--beige-3) 60%);
}
.column--s_billing{
  --col-c: #8b4a8b; --col-halo: rgba(139,74,139,.18);
  background: linear-gradient(180deg, rgba(139,74,139,.08) 0%, var(--beige-3) 60%);
}
.column--s_won{
  --col-c: #2e7d5b; --col-halo: rgba(46,125,91,.18);
  background: linear-gradient(180deg, rgba(46,125,91,.08) 0%, var(--beige-3) 60%);
}
.column--s_lost{
  --col-c: #9a8a8f; --col-halo: rgba(154,138,143,.15);
  background: linear-gradient(180deg, rgba(154,138,143,.06) 0%, var(--beige-3) 60%);
  opacity: .85;
}

/* Compteur de la colonne coloré */
.column__count{
  background: var(--col-c, var(--muted));
  color: white;
  border: none;
}

/* Deal card avec bordure gauche assortie à la colonne */
.column--s_received .deal-card{ border-left: 3px solid #8a7a7f; }
.column--s_meeting .deal-card{ border-left: 3px solid #5b8db8; }
.column--s_quote_p .deal-card{ border-left: 3px solid #b8860b; }
.column--s_quote_s .deal-card{ border-left: 3px solid #e67e22; }
.column--s_followup .deal-card{ border-left: 3px solid #c0392b; background: linear-gradient(90deg, rgba(192,57,43,.03) 0%, var(--white) 15%); }
.column--s_billing .deal-card{ border-left: 3px solid #8b4a8b; }
.column--s_won .deal-card{ border-left: 3px solid #2e7d5b; background: linear-gradient(90deg, rgba(46,125,91,.04) 0%, var(--white) 15%); }
.column--s_lost .deal-card{ border-left: 3px solid #9a8a8f; opacity: .8; }

/* =========================================================
   CONTACTS — code couleur par TYPE (client / prospect / pro / partner)
========================================================= */
.contact-card{
  position: relative;
  padding-left: 22px; /* place pour le ruban vertical */
}

/* Ruban vertical à gauche (identité du TYPE) */
.contact-card::before{
  content: "";
  position: absolute; top: 12px; bottom: 12px; left: 0;
  width: 5px; border-radius: 0 4px 4px 0;
  background: var(--contact-c, var(--muted));
}

/* Badge de coin haut-droit avec le type (en cursive discrète) */
.contact-card::after{
  content: attr(data-type-label);
  position: absolute; top: 0; right: 14px;
  padding: 2px 10px;
  background: var(--contact-c, var(--muted));
  color: white;
  font-size: 10px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700;
  border-radius: 0 0 8px 8px;
}

/* PROSPECT : bordeaux (marque) */
.contact-card--prospect{
  --contact-c: #560216;
  background: linear-gradient(90deg, rgba(86,2,22,.03) 0%, var(--white) 25%);
}
/* CLIENT : vert (succès, signé) */
.contact-card--client{
  --contact-c: #2e7d5b;
  background: linear-gradient(90deg, rgba(46,125,91,.06) 0%, var(--white) 25%);
  box-shadow: 0 2px 12px rgba(46,125,91,.08);
}
.contact-card--client .avatar{ background: linear-gradient(135deg, #2e7d5b 0%, #4aa375 100%); color: white; }
/* PRO : doré (business) */
.contact-card--pro{
  --contact-c: #b8860b;
  background: linear-gradient(90deg, rgba(184,134,11,.05) 0%, var(--white) 25%);
}
.contact-card--pro .avatar{ background: linear-gradient(135deg, #b8860b 0%, #d4a53d 100%); color: white; }
/* PARTNER : bleu (relation) */
.contact-card--partner{
  --contact-c: #5b8db8;
  background: linear-gradient(90deg, rgba(91,141,184,.05) 0%, var(--white) 25%);
}
.contact-card--partner .avatar{ background: linear-gradient(135deg, #5b8db8 0%, #7ba8cf 100%); color: white; }

/* Étiquette dans l'avatar pour renforcer le repère */
.contact-card--prospect .avatar{ background: linear-gradient(135deg, #560216 0%, #7a1230 100%); color: white; }

/* La température se traduit désormais par un anneau autour de l'avatar */
.contact-card__temp-dot{
  position: absolute;
  bottom: -2px; right: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--white);
}
.contact-card--temp-hot .avatar{ box-shadow: 0 0 0 3px rgba(192,57,43,.35); }
.contact-card--temp-warm .avatar{ box-shadow: 0 0 0 3px rgba(230,126,34,.35); }
.contact-card--temp-cold .avatar{ box-shadow: 0 0 0 3px rgba(91,141,184,.35); }
.contact-card--temp-neutral .avatar{ box-shadow: 0 0 0 3px rgba(154,138,143,.25); }

/* Retire l'ancienne bordure gauche (remplacée par le ruban ::before) */
.contact-card{ border-left: 1px solid var(--line) !important; }

/* Ligne devis dans l'onglet Devis de la fiche contact */
.fiche-quote{
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bordeaux);
  border-radius: 10px;
  transition: all .15s;
}
.fiche-quote:hover{ box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.fiche-quote__info{ min-width: 0; }
.fiche-quote__money{ display: flex; gap: 8px; align-items: center; }
.fiche-quote__actions{ display: flex; gap: 4px; }

@media (max-width: 600px){
  .fiche-quote{ grid-template-columns: 1fr; gap: 6px; }
  .fiche-quote__actions{ flex-wrap: wrap; }
  .fiche-quote__actions .btn{ flex: 1; }
}

/* =========================================================
   DEVIS/FACTURES — sections par TYPE (client/prospect/pro/partner)
========================================================= */
.qz-section{
  margin-top: 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.qz-section__head{
  display: grid;
  grid-template-columns: 48px 1fr auto 30px;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  background: var(--sec-bg, var(--beige-3));
  border-left: 5px solid var(--sec-c, var(--muted));
  transition: background .15s;
}
.qz-section__head::-webkit-details-marker{ display: none; }
.qz-section__head:hover{ filter: brightness(0.98); }
.qz-section__ico{
  width: 46px; height: 46px; border-radius: 14px;
  background: white;
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.qz-section__label{
  font-family: var(--font-serif);
  font-size: 22px; color: var(--sec-c, var(--bordeaux)); font-weight: 500;
  line-height: 1;
}
.qz-section__meta{
  font-size: 12.5px; color: var(--muted);
  margin-top: 4px;
}
.qz-section__count{
  min-width: 40px; height: 40px; padding: 0 12px;
  background: var(--sec-c, var(--bordeaux));
  color: white;
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 700;
  font-family: var(--font-serif);
}
.qz-section__toggle{
  color: var(--sec-c, var(--muted));
  font-size: 16px;
  transition: transform .2s;
}
.qz-section[open] .qz-section__toggle{ transform: rotate(180deg); }
.qz-section__body{
  padding: 16px 20px;
  display: flex; flex-direction: column;
  gap: 10px;
  background: var(--white);
}

/* Palette des sections : chaque section a ses propres accents */
.qz-section--client { background: linear-gradient(180deg, rgba(46,125,91,.03) 0%, transparent 40%); }
.qz-section--prospect { background: linear-gradient(180deg, rgba(86,2,22,.03) 0%, transparent 40%); }
.qz-section--pro { background: linear-gradient(180deg, rgba(184,134,11,.04) 0%, transparent 40%); }
.qz-section--partner { background: linear-gradient(180deg, rgba(91,141,184,.04) 0%, transparent 40%); }

/* Les cards de groupe à l'intérieur d'une section prennent la couleur du type */
.qz-section--client .qz-group{ border-left: 3px solid #2e7d5b; }
.qz-section--client .qz-group__name{ color: #2e7d5b; }
.qz-section--client .qz-group__client .avatar{ background: linear-gradient(135deg, #2e7d5b 0%, #4aa375 100%); color: white; }

.qz-section--prospect .qz-group{ border-left: 3px solid #560216; }
.qz-section--prospect .qz-group__client .avatar{ background: linear-gradient(135deg, #560216 0%, #7a1230 100%); color: white; }

.qz-section--pro .qz-group{ border-left: 3px solid #b8860b; }
.qz-section--pro .qz-group__name{ color: #b8860b; }
.qz-section--pro .qz-group__client .avatar{ background: linear-gradient(135deg, #b8860b 0%, #d4a53d 100%); color: white; }

.qz-section--partner .qz-group{ border-left: 3px solid #5b8db8; }
.qz-section--partner .qz-group__name{ color: #5b8db8; }
.qz-section--partner .qz-group__client .avatar{ background: linear-gradient(135deg, #5b8db8 0%, #7ba8cf 100%); color: white; }

@media (max-width: 700px){
  .qz-section__head{ grid-template-columns: 44px 1fr auto; padding: 14px 16px; }
  .qz-section__toggle{ display: none; }
  .qz-section__label{ font-size: 18px; }
  .qz-section__body{ padding: 12px 14px; }
}

/* ============================================================
   FICHE 360° — vue unifiée contact (tout sur une seule page)
============================================================ */
.fiche360__head{
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; margin: -20px -20px 16px;
  background: linear-gradient(135deg, var(--beige-2) 0%, #f5ebe1 100%);
  border-bottom: 1px solid rgba(86,2,22,.08);
  box-shadow: 0 2px 12px rgba(86,2,22,.04);
}
.fiche360__head--client{ background: linear-gradient(135deg, #e8f5ee 0%, #d5ecdf 100%); }
.fiche360__head--pro{ background: linear-gradient(135deg, #fbf3e0 0%, #f5e6bd 100%); }
.fiche360__head--partner{ background: linear-gradient(135deg, #e8f0f8 0%, #d5e3f0 100%); }

.fiche360__id{ display: flex; gap: 12px; align-items: center; }
.fiche360__avatar{
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bordeaux) 0%, #7a1230 100%);
  color: white; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 22px; font-style: italic;
  flex-shrink: 0;
}
.fiche360__title{
  margin: 0; font-family: var(--font-serif); font-size: 26px;
  color: var(--bordeaux); font-weight: 500; line-height: 1.1;
}
.fiche360__badges{ display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; align-items: center; }

.fiche360__kpis{ display: flex; gap: 8px; }
.fiche360__kpi{
  flex: 1; padding: 10px 12px; background: white; border-radius: 10px;
  border: 1px solid rgba(86,2,22,.08); text-align: left;
}
.fiche360__kpi-lbl{ font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.fiche360__kpi-num{ font-family: var(--font-serif); font-size: 20px; color: var(--bordeaux); font-weight: 600; margin-top: 2px; }
.fiche360__kpi--due .fiche360__kpi-num{ color: #d54848; }
.fiche360__kpi--ok .fiche360__kpi-num{ color: #2e7d5b; }

.fiche360__quick{
  display: flex; gap: 6px; overflow-x: auto; padding: 12px 0;
  margin: 0 -20px 8px; padding-left: 20px; padding-right: 20px;
  border-bottom: 1px solid var(--beige-3);
  scrollbar-width: none;
}
.fiche360__quick::-webkit-scrollbar{ display: none; }
.fiche360__q-btn{
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 12px; background: white; border: 1px solid var(--beige-3);
  border-radius: 20px; font-size: 12.5px; color: var(--bordeaux);
  text-decoration: none; cursor: pointer; font-weight: 500;
  transition: all .15s;
}
.fiche360__q-btn:hover{ background: var(--beige-2); border-color: var(--bordeaux); }
.fiche360__q-btn--primary{ background: var(--bordeaux); color: white; border-color: var(--bordeaux); }
.fiche360__q-btn--primary:hover{ background: #7a1230; }
.fiche360__q-btn--convert{ background: #2e7d5b; color: white; border-color: #2e7d5b; }
.fiche360__q-btn--convert:hover{ background: #256a4b; }
.fiche360__q-btn span{ font-size: 14px; }

.fiche360__sec{
  padding: 14px 0; border-top: 1px solid var(--beige-3);
  animation: fadeIn .25s;
}
.fiche360__sec:first-of-type{ border-top: none; padding-top: 0; }
.fiche360__sec-title{
  margin: 0 0 10px; font-family: var(--font-serif); font-size: 18px;
  color: var(--bordeaux); font-weight: 500; display: flex; align-items: center; gap: 8px;
}
.fiche360__sec-title em{ font-style: italic; color: var(--bord-lite, #8a1f36); }
.fiche360__sec-title span:first-child{ font-size: 20px; }

/* Événement principal */
.fiche360__sec--event{ }
.fiche360__event{
  padding: 14px; background: var(--beige-2); border-radius: 12px;
  border-left: 3px solid var(--bordeaux);
}
.fiche360__event-main{
  font-family: var(--font-serif); font-size: 18px; color: var(--bordeaux);
  font-weight: 500; margin-bottom: 10px;
}
.fiche360__event-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.fiche360__event-grid > div{ display: flex; flex-direction: column; gap: 2px; }
.fiche360__lbl{
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); font-weight: 600;
}
.fiche360__val{ font-size: 13.5px; color: var(--ink); font-weight: 500; }
.fiche360__notes-mini{
  margin-top: 10px; padding: 10px; background: white; border-radius: 8px;
  font-size: 13px; color: var(--muted); font-style: italic; line-height: 1.5;
}
/* Prestations demandées (venant du formulaire du site) */
.fiche360__prestas{
  background: rgba(86,2,22,.06);
  border: 1px solid rgba(86,2,22,.15);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.fiche360__prestas-tags{
  display: flex; flex-wrap: wrap; gap: 6px;
}
.fiche360__presta-tag{
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  background: var(--bordeaux);
  color: var(--beige);
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .2px;
}

/* Devis */
.fiche360__quotes{ display: flex; flex-direction: column; gap: 8px; }
.fiche360__quote{
  display: flex; gap: 10px; padding: 10px 12px;
  background: white; border: 1px solid var(--beige-3); border-radius: 10px;
  align-items: center;
}
.fiche360__quote:hover{ border-color: var(--bordeaux); }

/* Factures */
.fiche360__invs{ display: flex; flex-direction: column; gap: 6px; }
.fiche360__inv{
  display: flex; gap: 10px; justify-content: space-between; align-items: center;
  padding: 10px 12px; background: white; border-radius: 10px;
  border-left: 3px solid #ccc;
}
.fiche360__inv--paid{ border-left-color: #2e7d5b; background: #f4faf6; }
.fiche360__inv--due{ border-left-color: #d54848; background: #fdf5f5; }
.fiche360__inv--wait{ border-left-color: #b8860b; background: #fbf7ee; }

.fiche360__pillrow{
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px;
}

.fiche360__foot{
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--beige-3);
  font-size: 11px; color: var(--muted); text-align: center;
}

@keyframes fadeIn{ from{ opacity: 0; transform: translateY(4px); } to{ opacity: 1; transform: none; } }

@media (max-width: 700px){
  .fiche360__event-grid{ grid-template-columns: repeat(2, 1fr); }
  .fiche360__pillrow{ grid-template-columns: 1fr; }
  .fiche360__kpi-num{ font-size: 16px; }
  .fiche360__title{ font-size: 22px; }
}

/* ============================================================
   PALETTE DE RECHERCHE UNIVERSELLE (⌘K)
============================================================ */
.palette{
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 10vh; animation: paletteIn .18s;
}
.palette[hidden]{ display: none; }
@keyframes paletteIn{ from{ opacity: 0; } to{ opacity: 1; } }
.palette__backdrop{
  position: absolute; inset: 0; background: rgba(30,15,20,.5);
  backdrop-filter: blur(4px);
}
.palette__panel{
  position: relative; width: 92%; max-width: 620px;
  background: white; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  animation: paletteSlide .22s cubic-bezier(.2,.9,.3,1);
  max-height: 76vh; display: flex; flex-direction: column;
}
@keyframes paletteSlide{ from{ transform: translateY(-14px); opacity:0 } to{ transform:none; opacity:1 } }
.palette__searchbar{
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--beige-3);
}
.palette__searchbar svg{ color: var(--bordeaux); }
.palette__searchbar input{
  flex: 1; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 15px; color: var(--ink);
}
.palette__hint{
  padding: 3px 8px; background: var(--beige-2); border-radius: 6px;
  font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px;
}
.palette__results{ overflow-y: auto; padding: 6px 0; flex: 1; }
.palette__group{
  padding: 8px 16px 4px; font-size: 10px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted); font-weight: 700;
}
.palette__item{
  display: flex; gap: 12px; align-items: center;
  padding: 10px 16px; cursor: pointer; transition: background .12s;
}
.palette__item.is-selected,
.palette__item:hover{ background: var(--beige-2); }
.palette__ico{
  width: 30px; height: 30px; display: flex; align-items: center;
  justify-content: center; font-size: 16px; flex-shrink: 0;
  background: var(--beige-3); border-radius: 8px;
}
.palette__item > div:not(.palette__ico){ min-width: 0; flex: 1; }
.palette__t{ font-size: 14px; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette__m{ font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.palette__empty{ padding: 30px; text-align: center; color: var(--muted); font-size: 13px; font-style: italic; }

@media (max-width: 700px){
  .palette{ padding-top: 4vh; }
  .palette__panel{ width: 96%; max-height: 90vh; }
}

/* ============================================================
   SIDEBAR — divider secondaire pour vues avancées
============================================================ */
.nav__divider{
  height: 1px; background: rgba(237,225,216,.15);
  margin: 12px 12px; border: none;
}
.nav__item--secondary{ opacity: .65; font-size: 13px; }
.nav__item--secondary:hover{ opacity: 1; }
.nav__item--secondary svg{ width: 16px; height: 16px; }

/* ============================================================
   PROSPECTS — vue commerciale
============================================================ */
.view--prospects{ background: linear-gradient(180deg, #fbf6f2 0%, transparent 200px); }

.pros-filters{
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px;
  margin-bottom: 16px; scrollbar-width: none;
  border-bottom: 1px solid var(--beige-3);
}
.pros-filters::-webkit-scrollbar{ display: none; }
.pros-chip{
  flex-shrink: 0; padding: 7px 14px; background: white;
  border: 1px solid var(--beige-3); border-radius: 20px;
  font-size: 12.5px; color: var(--muted); cursor: pointer;
  font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s; white-space: nowrap;
}
.pros-chip:hover{ border-color: var(--bordeaux); color: var(--bordeaux); }
.pros-chip.is-active{ background: var(--bordeaux); color: white; border-color: var(--bordeaux); }
.pros-chip.is-active .pros-chip__n{ background: rgba(255,255,255,.2); color: white; }
.pros-chip__n{
  padding: 1px 7px; background: var(--beige-3); border-radius: 10px;
  font-size: 11px; font-weight: 600; color: var(--bordeaux);
}
.pros-chip--hot.is-active{ background: #d54848; border-color: #d54848; }
.pros-chip--warm.is-active{ background: #b8860b; border-color: #b8860b; }
.pros-chip--cold.is-active{ background: #5b8db8; border-color: #5b8db8; }
.pros-chip--client.is-active{ background: #2e7d5b; border-color: #2e7d5b; }

.pros-list{ display: flex; flex-direction: column; gap: 10px; }
.pros-card{
  display: grid; grid-template-columns: 80px 1fr auto; gap: 14px;
  padding: 14px 16px; background: white; border-radius: 14px;
  border: 1px solid var(--beige-3); cursor: pointer;
  transition: all .15s; align-items: center;
}
.pros-card:hover{ border-color: var(--bordeaux); box-shadow: 0 4px 16px rgba(86,2,22,.06); transform: translateY(-1px); }
.pros-card--hot{ border-left: 4px solid #d54848; }
.pros-card--warm{ border-left: 4px solid #b8860b; }
.pros-card--cold{ border-left: 4px solid #5b8db8; }
.pros-card--client{ border-left: 4px solid #2e7d5b; }

.pros-card__left{ display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 90px; }
.pros-card__left .avatar{
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bordeaux) 0%, #7a1230 100%);
  color: white; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 16px; font-style: italic;
}
.pros-card__statut{
  padding: 2px 7px; border-radius: 10px; font-size: 10px;
  font-weight: 600; letter-spacing: .3px; text-transform: uppercase;
  text-align: center; white-space: nowrap;
}
.pros-card__statut--hot{ background: #fde8e8; color: #a02020; }
.pros-card__statut--warm{ background: #fbf3e0; color: #7c5a08; }
.pros-card__statut--cold{ background: #e8f0f8; color: #3a5a7c; }
.pros-card__statut--client{ background: #d5ecdf; color: #1e5a3d; }

.pros-card__body{ min-width: 0; }
.pros-card__head{
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin-bottom: 6px;
}
.pros-card__name{
  font-family: var(--font-serif); font-size: 18px; color: var(--bordeaux);
  font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============================================================
   Badge de statut inline à droite du nom (Prospects list)
============================================================ */
.pros-status-badge{
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .12s, box-shadow .12s;
  text-align: center;
  max-width: 100%;
}
.pros-status-badge__dot{
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255,255,255,.5);
}
.pros-card:hover .pros-status-badge{ transform: scale(1.04); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.pros-status-badge--hot{
  background: linear-gradient(135deg, #fde3e3, #fbcece);
  color: #a02020;
  border-color: rgba(160,32,32,.2);
}
.pros-status-badge--hot .pros-status-badge__dot{ background: #d54848; animation: pros-dot-pulse 1.8s ease-in-out infinite; }
@keyframes pros-dot-pulse{
  0%,100%{ box-shadow: 0 0 0 2px rgba(255,255,255,.5), 0 0 0 0 rgba(213,72,72,.5); }
  50%   { box-shadow: 0 0 0 2px rgba(255,255,255,.5), 0 0 0 6px rgba(213,72,72,0); }
}

.pros-status-badge--warm{
  background: linear-gradient(135deg, #fdf1d4, #fce7b8);
  color: #8a6a10;
  border-color: rgba(138,106,16,.2);
}
.pros-status-badge--warm .pros-status-badge__dot{ background: #b8860b; }

.pros-status-badge--cold{
  background: linear-gradient(135deg, #dfeaf5, #cadaeb);
  color: #33607d;
  border-color: rgba(51,96,125,.2);
}
.pros-status-badge--cold .pros-status-badge__dot{ background: #5b8db8; }

.pros-status-badge--client{
  background: linear-gradient(135deg, #d5ecdf, #b8dcc7);
  color: #1e5a3d;
  border-color: rgba(30,90,61,.25);
}
.pros-status-badge--client .pros-status-badge__dot{ background: #2e7d5b; }

.pros-status-badge--lost{
  background: linear-gradient(135deg, #e8e0e0, #d4c8c8);
  color: #6a5555;
  border-color: rgba(106,85,85,.2);
}
.pros-status-badge--lost .pros-status-badge__dot{ background: #8a6a6a; }
.pros-card__amount{
  font-family: var(--font-serif); font-size: 16px; color: #2e7d5b;
  font-weight: 600; white-space: nowrap;
}
.pros-card__event{
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px;
  align-items: center;
}
.pros-info{
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--ink);
  font-weight: 500;
}
.pros-info > span:first-child{
  font-size: 15px;
  filter: saturate(1.3);
}
.pros-info em{ color: var(--bordeaux); font-style: normal; font-weight: 600; }
/* Prestations demandées sur la façade du prospect */
.pros-card__prestas{
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px;
  margin: 6px 0 4px;
  padding: 8px 10px;
  background: rgba(86,2,22,.05);
  border-radius: 8px;
  border-left: 3px solid var(--bordeaux);
}
.pros-card__prestas-lbl{
  font-size: 12px; font-weight: 700;
  color: var(--bordeaux);
  margin-right: 4px;
  letter-spacing: .2px;
}
.pros-card__presta-tag{
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  background: var(--bordeaux);
  color: var(--beige);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .2px;
  transition: transform .12s;
}
.pros-card:hover .pros-card__presta-tag{ transform: translateY(-1px); }

.pros-card__coords{
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink);
  padding-top: 4px;
  border-top: 1px solid rgba(86,2,22,.06);
  margin-top: 2px;
}
.pros-card__coords a{
  color: var(--ink); text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.pros-card__coords a:hover{ color: var(--bordeaux); }
.pros-card__right{
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
}

/* ============================================================
   CLIENTS — dossiers complets
============================================================ */
.view--clients{ background: linear-gradient(180deg, #f2faf5 0%, transparent 200px); }

.cli-list{ display: flex; flex-direction: column; gap: 10px; }
.cli-card{
  display: grid; grid-template-columns: 64px 1fr 300px; gap: 14px;
  padding: 14px 16px; background: white; border-radius: 14px;
  border: 1px solid var(--beige-3); border-left: 4px solid #2e7d5b;
  cursor: pointer; transition: all .15s; align-items: center;
}
.cli-card:hover{ border-left-color: #1e5a3d; box-shadow: 0 4px 16px rgba(46,125,91,.08); }
.avatar--client{
  background: linear-gradient(135deg, #2e7d5b 0%, #4aa375 100%) !important;
}
.cli-card__left .avatar{
  width: 48px; height: 48px; border-radius: 50%;
  color: white; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 18px; font-style: italic;
}
.cli-card__body{ min-width: 0; }
.cli-card__head{ display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.cli-card__name{
  font-family: var(--font-serif); font-size: 19px; color: #1e5a3d;
  font-weight: 500;
}
.cli-card__event{
  font-size: 13px; color: var(--ink); margin: 4px 0;
}
.cli-card__coords{
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted);
}
.cli-card__coords a{ color: var(--muted); text-decoration: none; }
.cli-card__coords a:hover{ color: #1e5a3d; }
.cli-card__money{
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 8px; background: #f6faf7; border-radius: 10px;
}
.cli-money-cell{ text-align: center; padding: 6px; background: white; border-radius: 8px; }
.cli-money-lbl{
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); font-weight: 600;
}
.cli-money-val{
  font-family: var(--font-serif); font-size: 16px; color: var(--bordeaux);
  font-weight: 600; margin: 2px 0;
}
.cli-money-cell--due .cli-money-val{ color: #d54848; }
.cli-money-cell--ok .cli-money-val{ color: #2e7d5b; }

@media (max-width: 900px){
  .pros-card{ grid-template-columns: 60px 1fr; grid-template-rows: auto auto; }
  .pros-card__right{ grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .cli-card{ grid-template-columns: 1fr; }
  .cli-card__left{ display: none; }
  .cli-card__money{ grid-template-columns: 1fr 1fr; }
}

/* Select statut de devis inline sur la fiche 360° */
.fiche360__quote-statut{
  appearance: none;
  -webkit-appearance: none;
  padding: 4px 22px 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23560216' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px;
  transition: all .15s;
}
.fiche360__quote-statut--brouillon{ background-color: #f0e8dd; color: #7a5a2b; }
.fiche360__quote-statut--envoyé{ background-color: #f5e6ed; color: #7a1230; }
.fiche360__quote-statut--consulté{ background-color: #e8f0f8; color: #3a5a7c; }
.fiche360__quote-statut--accepté{ background-color: #d5ecdf; color: #1e5a3d; }
.fiche360__quote-statut--refusé{ background-color: #fde8e8; color: #a02020; }
.fiche360__quote-statut--expiré{ background-color: #fbf3e0; color: #7c5a08; }
.fiche360__quote-statut:hover{ filter: brightness(.95); }

/* Bordure gauche par statut sur la card devis */
.fiche360__quote--brouillon{ border-left: 3px solid #b8860b; }
.fiche360__quote--envoyé{ border-left: 3px solid var(--bordeaux); }
.fiche360__quote--consulté{ border-left: 3px solid #5b8db8; }
.fiche360__quote--accepté{ border-left: 3px solid #2e7d5b; }
.fiche360__quote--refusé{ border-left: 3px solid #d54848; }
.fiche360__quote--expiré{ border-left: 3px solid #b8860b; }

/* Bouton × delete plus discret */
.fiche360__quote .btn--danger{
  min-width: 28px; padding: 4px 8px; font-size: 15px; line-height: 1;
  font-weight: 700;
}

/* Bouton "Voir fiche" sur les groupes de la vue Devis & factures */
.qz-group__head{ position: relative; }
.qz-group__open-btn{
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  z-index: 2;
}
.qz-group__open-btn:hover{ background: #7a1230; }

@media (max-width: 700px){
  .qz-group__open-btn{
    position: static;
    transform: none;
    margin-top: 10px;
    width: 100%;
  }
}

/* ============================================================
   PRÉPARATION ÉVÉNEMENT — checklist par prestation
============================================================ */
.fiche360__sec--prep{
  background: linear-gradient(180deg, #fbf7ee 0%, transparent 100%);
  padding: 14px;
  border-radius: 12px;
  border-left: 3px solid #b8860b;
  margin-top: 12px;
}
.prep-progress-lbl{ font-weight: 600; color: #b8860b; margin-left: 6px; }
.prep-progress{
  height: 6px; background: #f0e4c3; border-radius: 3px;
  overflow: hidden; margin: 4px 0 14px;
}
.prep-progress-bar{
  height: 100%; background: linear-gradient(90deg, #b8860b 0%, #2e7d5b 100%);
  transition: width .3s ease;
}

.prep-group{ margin-bottom: 12px; }
.prep-group__head{
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid rgba(184,134,11,.15);
  margin-bottom: 6px;
}
.prep-group__title{
  font-family: var(--font-serif); font-style: italic;
  font-size: 14px; color: var(--bordeaux); font-weight: 500;
}

.prep-task{
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; background: white; border-radius: 8px;
  margin-bottom: 4px; border-left: 2px solid transparent;
  transition: all .15s;
}
.prep-task label{
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  flex: 1; min-width: 0;
}
.prep-task input[type="checkbox"]{
  width: 16px; height: 16px; cursor: pointer;
  accent-color: #2e7d5b;
}
.prep-task__titre{
  font-size: 13px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prep-task__due{
  font-size: 11px; color: var(--muted); font-weight: 500;
  padding: 2px 8px; background: var(--beige-2); border-radius: 10px;
  white-space: nowrap; margin-left: 8px;
}
.prep-task__del{
  flex-shrink: 0; margin-left: 8px; padding: 4px 6px; border-radius: 6px;
  font-size: 14px; opacity: .45; background: none; border: none; cursor: pointer;
}
.prep-task__del:hover{ opacity: 1; background: rgba(213,72,72,.1); }
.prep-add{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.prep-add input[type="text"]{
  flex: 1 1 220px; min-width: 0; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px;
  background: transparent; font-size: 13px;
}
.prep-add input[type="text"]:focus{ border-style: solid; border-color: var(--bordeaux); outline: none; background: var(--white); }
.prep-add input[type="date"]{ padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; background: var(--white); }
.prep-task--done{ opacity: .55; }
.prep-task--done .prep-task__titre{ text-decoration: line-through; }
.prep-task--done{ border-left-color: #2e7d5b; }
.prep-task--late{ border-left-color: #d54848; background: #fdf5f5; }
.prep-task__due--late{ background: #fde8e8; color: #a02020; }

/* Bouton "Voir X de plus" dans les colonnes du pipeline */
.pipeline-more{
  display: block; width: 100%;
  padding: 8px 10px; margin-top: 6px;
  background: transparent; border: 1px dashed rgba(86,2,22,.3);
  border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--bordeaux);
  transition: all .15s;
}
.pipeline-more:hover{
  background: var(--beige-2); border-style: solid; border-color: var(--bordeaux);
}
.pipeline-more--less{
  color: var(--muted); border-color: rgba(0,0,0,.15);
}
.pipeline-more--less:hover{
  color: var(--bordeaux); border-color: var(--bordeaux);
}

/* Facture finale (récapitulative) — mise en valeur */
.fiche360__inv--final{
  border-left-color: #b8860b;
  background: linear-gradient(135deg, #fdf6e3 0%, #f5ecd5 100%);
  border: 2px solid #b8860b;
  box-shadow: 0 3px 12px rgba(184, 134, 11, .18);
  position: relative;
}
.fiche360__inv--final::before{
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #b8860b 0%, #f4d47a 50%, #b8860b 100%);
  border-radius: 8px 8px 0 0;
}
.fiche360__final-badge{
  display: inline-block;
  padding: 2px 8px; margin-left: 6px;
  background: linear-gradient(135deg, #b8860b 0%, #d4a53d 100%);
  color: white; font-size: 9.5px; font-weight: 700;
  letter-spacing: 1px; border-radius: 10px;
  vertical-align: middle;
}

/* Encart notice dans les factures (acompte/solde/finale) */
.v24-doc__notice{
  margin: 16px 0 4px;
  padding: 12px 16px;
  background: var(--beige-2);
  border-left: 3px solid var(--bordeaux);
  border-radius: 6px;
  font-size: 12.5px;
  color: #2a1a20;
  line-height: 1.5;
}
.v24-doc__notice--final{
  background: linear-gradient(135deg, #fdf6e3 0%, #f5ecd5 100%);
  border-left-color: #b8860b;
}

/* Preview facture : minimum une page A4 */
#invoice-print{
  min-height: 297mm;  /* hauteur d'une page A4 */
  display: flex;
  flex-direction: column;
}
#invoice-print .v24-doc__body{
  flex: 1;  /* étire le corps pour remplir la page */
}

/* Tableau détail facture — propre et pro */
.v24-inv-table{
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 12.5px;
}
.v24-inv-table thead th{
  text-align: left;
  padding: 8px 12px;
  background: var(--bordeaux);
  color: var(--beige);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.v24-inv-table tbody td{
  padding: 12px;
  border-bottom: 1px solid rgba(86,2,22,.12);
  vertical-align: top;
}
.v24-inv-table tbody tr:last-child td{
  border-bottom: none;
}
.v24-inv-table strong{ color: var(--bordeaux); font-weight: 600; }
.v24-inv-opts{
  margin-top: 4px;
  font-size: 11px;
  color: #5a3a44;
  font-style: italic;
  page-break-inside: avoid; break-inside: avoid;
}
/* Pas de page-break-inside:avoid sur .v24-inv-row entière — un pack avec une
   description longue (plusieurs sous-sections) peut dépasser la hauteur d'une
   page ; forcer l'unité complète empêche toute coupure "propre" et provoque
   une coupure au milieu du texte. On protège des unités plus fines à la place
   (titre, chaque ligne, bloc d'options) — voir .v24-inv-row__title / .v24-inv-line. */
.v24-inv-row__title{
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  page-break-inside: avoid; break-inside: avoid;
}
.v24-inv-row__desc{
  margin-top: 5px; font-size: 11px; line-height: 1.55;
  color: var(--ink); opacity: .85;
}
.v24-inv-line{ page-break-inside: avoid; break-inside: avoid; }
.v24-inv-row__disc{
  font-size: 10px; font-weight: 600; color: var(--warning);
  background: rgba(184,134,11,.12); padding: 1px 7px; border-radius: 20px;
}

/* Bannière statut intake sur la vue Prospects */
.intake-banner{
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; margin: 0 0 14px;
  background: linear-gradient(135deg, #fef3e0 0%, #fce8bd 100%);
  border-left: 4px solid #b8860b;
  border-radius: 12px;
}
.intake-banner--ok{
  background: linear-gradient(135deg, #e8f5ee 0%, #d5ecdf 100%);
  border-left-color: #2e7d5b;
}

/* Bouton supprimer dans la fiche 360° */
.fiche360__q-btn--delete{
  background: white; color: #a02020; border-color: #f0d0d0;
}
.fiche360__q-btn--delete:hover{
  background: #d54848; color: white; border-color: #d54848;
}

/* Bouton corbeille sur les cards prospect */
.pros-card__right .btn--danger{
  min-width: 32px; padding: 6px 8px;
}

/* Preview devis : minimum une page A4 comme la facture (aperçu écran) */
#quote-print{
  min-height: 297mm;
  display: flex;
  flex-direction: column;
}
#quote-print .v24-doc__body{
  flex: 1;
}
/* Pendant l'export PDF : on retire min-height pour éviter le débordement A4 */
#quote-print.is-exporting,
#invoice-print.is-exporting{
  min-height: 0 !important;
}

/* ============================================================
   DEVIS — mise en avant remise (minimaliste + élégante)
============================================================ */
.v24-doc__offer-tag{
  display: inline-block;
  padding: 3px 12px;
  margin: 6px 0 4px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--bordeaux);
  border-top: 1px solid rgba(86,2,22,.35);
  border-bottom: 1px solid rgba(86,2,22,.35);
  letter-spacing: .5px;
}
.v24-doc__subtotal-line{
  font-size: 11px;
  color: #7a5a55;
  margin: 2px 0 6px;
}
.v24-doc__subtotal-line strong{
  color: var(--bordeaux);
  font-weight: 600;
}
.v24-doc__strike{
  text-decoration: line-through;
  opacity: .65;
  margin: 0 3px;
}

/* Chip "Refusé · Perdu" avec sa couleur propre */
.pros-chip--lost{ border-color: rgba(150,150,150,.35); color: #6a6a6a; }
.pros-chip--lost.is-active{ background: #6a6a6a; border-color: #6a6a6a; color: white; }
.pros-chip--lost.is-active .pros-chip__n{ background: rgba(255,255,255,.2); color: white; }
.pros-card--lost{ border-left: 4px solid #999; opacity: .75; }
.pros-card__statut--lost{ background: #e5e5e5; color: #4a4a4a; }

/* Barre "Terminer" du catalog picker : sticky en bas du drawer */
.cat-picker__done-bar{
  position: sticky; bottom: 0; left: 0; right: 0;
  padding: 14px 32px;
  background: white;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(86,2,22,.06);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  z-index: 5;
}
.chip--add{
  background: white;
  border: 1px dashed rgba(86,2,22,.35);
  transition: all .15s;
}
.chip--add:hover{
  background: var(--bordeaux);
  color: white;
  border-style: solid;
  border-color: var(--bordeaux);
}
.chip--add:hover strong{ color: white; }

/* Boutons "Ajouter une prestation" en bas de la liste (visibles après scroll) */
.qeV2__add-more{
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 18px;
  border-top: 1px dashed rgba(86,2,22,.2);
  justify-content: center;
}
.qeV2__add-more .btn{
  min-height: 44px;
}
.qeV2__add-more .btn--big{
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(86,2,22,.18);
}
.qeV2__add-more .btn--big:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(86,2,22,.24);
}

/* Règles de césure PDF multi-page — devis long réparti proprement */
.v24-doc.is-exporting .v24-item,
.v24-doc.is-exporting .v24-doc__signature,
.v24-doc.is-exporting .v24-doc__pay,
.v24-doc.is-exporting .v24-doc__totals,
.v24-doc.is-exporting .v24-doc__info,
.v24-doc.is-exporting .v24-doc__head{
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}
.v24-doc.is-exporting .v24-doc__footer{
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

/* 📄 Flux naturel style "Mr Sherer" — spacing compact, tient en 1 A4 pour 1 prestation */
.v24-doc.is-exporting .v24-item{
  padding: 6mm 0;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}
.v24-doc.is-exporting .v24-item__body{ padding: 0; }
.v24-doc.is-exporting .v24-doc__footer{
  padding: 8mm 40px 8mm;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}
.v24-doc.is-exporting .v24-doc__signature{
  padding-top: 20px;
  padding-bottom: 10px;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}
.v24-doc.is-exporting .v24-item h3{
  font-size: 15px;
  margin-bottom: 10px;
  line-height: 1.3;
}
.v24-doc.is-exporting .v24-item__desc{
  font-size: 12.5px;
  line-height: 1.65;
}
.v24-doc.is-exporting .v24-item__section-lbl{
  margin: 12px 0 6px;
  font-size: 11px;
}
.v24-doc.is-exporting .v24-list{
  font-size: 12.5px;
  line-height: 1.65;
}

/* ============================================================
   NUMÉROTATION DES PAGES du devis
============================================================ */
.v24-doc__page-num{
  margin-top: auto;
  padding-top: 20px;
  text-align: right;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px;
  color: var(--bordeaux);
  opacity: .55;
  letter-spacing: .5px;
}

/* Aperçu à l'écran : simple séparation entre prestations, pas de "Page suivante" trompeur */
#quote-print .v24-item + .v24-item{
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(86,2,22,.12);
}

/* Numéro de page du footer signature (bas droite) */
.v24-doc__page-num--footer{
  margin-top: 30px;
  padding-top: 10px;
  border-top: 1px dashed rgba(86,2,22,.15);
}

/* Dans l'aperçu écran : séparateur simple avant le footer */
#quote-print .v24-doc__footer{
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--bordeaux);
}

/* ============================================================
   MINI-HEADER BORDEAUX répété sur pages 2+ (style Mr Sherer)
============================================================ */
.v24-doc__mini-head{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 20px 40px;
  background: var(--bordeaux);
  color: var(--beige);
  margin: 0 -40px 20mm;
  align-items: center;
}
.v24-doc__mini-brand{
  display: flex; flex-direction: column; gap: 6px;
}
.v24-doc__mini-logo{
  width: 130px; height: auto; filter: drop-shadow(0 1px 0 rgba(0,0,0,.12));
}
.v24-doc__mini-coords{
  font-size: 10.5px; line-height: 1.5; opacity: .9;
}
.v24-doc__mini-title{
  text-align: right;
  padding-left: 18px;
  border-left: 1px solid rgba(237,225,216,.28);
}
.v24-doc__mini-num{
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 500;
  color: var(--beige);
  letter-spacing: .3px;
}
.v24-doc__mini-hr{
  height: 1px; background: rgba(237,225,216,.35);
  margin: 4px 0 6px;
}
.v24-doc__mini-dates{
  font-size: 10.5px; line-height: 1.6;
}
.v24-doc__mini-event{
  margin-top: 4px;
  font-size: 10.5px;
  font-style: italic;
  opacity: .9;
}

/* Numéro de page en bas à droite, style Mr Sherer */
.v24-doc__page-num{
  position: absolute;
  bottom: 8mm; right: 40px;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--bordeaux);
  font-weight: 600;
  letter-spacing: 1px;
  opacity: .8;
  margin: 0;
  padding: 0;
  border: none;
}

/* Le mini-header s'affiche uniquement en mode export (pas dans l'aperçu) */
.v24-doc__mini-head{ display: none; }
.v24-doc.is-exporting .v24-doc__mini-head{ display: grid; }

/* ============================================================
   FORCE LA MISE EN PAGE "MR SHERER" QUAND is-exporting
   (bat les media queries mobile qui cassent le layout dans la modale)
============================================================ */
.v24-doc.is-exporting{
  min-width: unset !important;
  width: 210mm !important;
  max-width: 100% !important;
  background: #faf4ee !important;
}
.v24-doc.is-exporting .v24-doc__head{
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 30px !important;
  padding: 22px 40px 18px !important;
  align-items: center !important;
}
.v24-doc.is-exporting .v24-doc__title{
  text-align: right !important;
  padding-left: 24px !important;
  padding-top: 0 !important;
  border-left: 1px solid rgba(237,225,216,.25) !important;
  border-top: none !important;
}
.v24-doc.is-exporting .v24-doc__info{
  display: grid !important;
  grid-template-columns: 1fr 1px 1fr !important;
  padding: 18px 40px 12px !important;
}
.v24-doc.is-exporting .v24-doc__col-sep{ display: block !important; }
.v24-doc.is-exporting .v24-doc__col:first-child{ padding-right: 24px !important; padding-bottom: 0 !important; }
.v24-doc.is-exporting .v24-doc__col:last-child{ padding-left: 24px !important; border-top: none !important; padding-top: 0 !important; }
.v24-doc.is-exporting .v24-doc__body,
.v24-doc.is-exporting .v24-doc__footer{
  padding-left: 40px !important;
  padding-right: 40px !important;
}
.v24-doc.is-exporting .v24-doc__totals{
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 30px !important;
}
.v24-doc.is-exporting .v24-doc__signature{
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 40px !important;
}
.v24-doc.is-exporting .v24-doc__signature--single{
  grid-template-columns: 320px !important;
  justify-content: center !important;
}

/* 🔧 COMPACTAGE global pour tenir 1 prestation = 1 A4 */
.v24-doc.is-exporting .v24-doc__head{
  padding: 14px 40px 12px !important;
}
.v24-doc.is-exporting .v24-doc__title h1{
  font-size: 26px !important;
  margin: 0 0 6px !important;
}
.v24-doc.is-exporting .v24-doc__logo-img{
  width: 140px !important;
}
.v24-doc.is-exporting .v24-doc__coords{ font-size: 10.5px !important; line-height: 1.4 !important; }
.v24-doc.is-exporting .v24-doc__info{
  padding: 12px 40px 8px !important;
}
.v24-doc.is-exporting .v24-doc__col h2{ font-size: 12px !important; margin-bottom: 6px !important; }
.v24-doc.is-exporting .v24-doc__divider{ margin: 4px 40px 10px !important; }
.v24-doc.is-exporting .v24-doc__body{ padding: 0 40px 8px !important; }
.v24-doc.is-exporting .v24-doc__section{ margin: 0 0 8px !important; font-size: 12px !important; }
.v24-doc.is-exporting .v24-item{ padding: 4mm 0 !important; margin-bottom: 0 !important; }
.v24-doc.is-exporting .v24-item + .v24-item{ border-top: 1px solid rgba(86,2,22,.10) !important; }
.v24-doc.is-exporting .v24-item h3{ font-size: 13px !important; margin-bottom: 6px !important; }
.v24-doc.is-exporting .v24-item__desc,
.v24-doc.is-exporting .v24-list{ font-size: 11.5px !important; line-height: 1.5 !important; }
.v24-doc.is-exporting .v24-item__section-lbl{ margin: 8px 0 4px !important; font-size: 10px !important; }
.v24-doc.is-exporting .v24-doc__footer{ padding: 8mm 40px 6mm !important; }
.v24-doc.is-exporting .v24-doc__signature{ padding-top: 14px !important; padding-bottom: 0 !important; }
.v24-doc.is-exporting .v24-doc__signature-line{ margin-top: 12px !important; }

/* ============================================================
   PREVIEW TOOLBAR — toggle vue continue/paginée + forcer 1 page
============================================================ */
.quote-preview-toolbar{
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 16px; margin: 16px 0 8px;
  background: rgba(86,2,22,.05); border: 1px solid rgba(86,2,22,.12);
  border-radius: 10px;
}
.quote-preview-toolbar__group{ display: flex; gap: 6px; }
.qpv-btn{
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  color: var(--bordeaux); background: white;
  border: 1px solid rgba(86,2,22,.2); border-radius: 8px;
  cursor: pointer; transition: all .15s;
}
.qpv-btn:hover{ border-color: var(--bordeaux); }
.qpv-btn.is-active{ background: var(--bordeaux); color: var(--beige); border-color: var(--bordeaux); }

.qpv-switch{
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.qpv-switch input{ display: none; }
.qpv-switch__slider{
  width: 40px; height: 22px; background: rgba(86,2,22,.2);
  border-radius: 11px; position: relative; transition: all .2s;
  flex-shrink: 0;
}
.qpv-switch__slider::before{
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; background: white; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.qpv-switch input:checked + .qpv-switch__slider{ background: var(--bordeaux); }
.qpv-switch input:checked + .qpv-switch__slider::before{ transform: translateX(18px); }
.qpv-switch__lbl{ font-size: 13px; font-weight: 600; color: var(--bordeaux); }

/* ---------- Boutons Édition libre & Restauration ---------- */
.qpv-btn--edit{
  background: white;
  border: 1.5px solid var(--bordeaux);
  color: var(--bordeaux);
  font-weight: 700;
}
.qpv-btn--edit:hover{ background: rgba(86,2,22,.05); }
.qpv-btn--saving{
  background: #2d7a4d !important;
  color: white !important;
  border-color: #2d7a4d !important;
  animation: qpv-pulse 1.8s ease-in-out infinite;
}
@keyframes qpv-pulse{
  0%,100%{ box-shadow: 0 0 0 0 rgba(45,122,77,.4); }
  50%   { box-shadow: 0 0 0 6px rgba(45,122,77,0); }
}
.qpv-btn--reset{
  background: transparent;
  border: 1px dashed rgba(86,2,22,.35);
  color: var(--muted);
  font-weight: 500;
}
.qpv-btn--reset:hover{
  background: rgba(86,2,22,.05);
  color: var(--bordeaux);
  border-color: var(--bordeaux);
  border-style: solid;
}

/* ---------- Mode Édition libre : contentEditable actif ---------- */
.v24-doc.is-editing{
  outline: 3px dashed rgba(45,122,77,.5);
  outline-offset: 4px;
  cursor: text;
}
.v24-doc.is-editing [contenteditable="true"],
.v24-doc.is-editing *{ cursor: text; }
.v24-doc.is-editing .v24-doc__body{
  padding: 8px 40px 12px !important;
  outline: 2px solid rgba(45,122,77,.3);
  outline-offset: 2px;
}
.v24-doc.is-editing .v24-doc__body:focus-within{
  outline-color: rgba(45,122,77,.8);
}
.v24-doc.is-editing .v24-item h3,
.v24-doc.is-editing .v24-item__desc,
.v24-doc.is-editing .v24-list li{
  transition: background .2s;
}
.v24-doc.is-editing .v24-item h3:hover,
.v24-doc.is-editing .v24-item__desc:hover,
.v24-doc.is-editing .v24-list li:hover{
  background: rgba(45,122,77,.08);
}
/* Petite indication en haut du doc en mode édition */
.v24-doc.is-editing::before{
  content: '✏️  Mode édition actif — clique n\'importe où pour modifier le texte';
  display: block;
  background: #2d7a4d;
  color: white;
  padding: 8px 16px;
  font-family: -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  letter-spacing: .3px;
}

/* ---------- Séparateurs de page A4 (vue paginée) ---------- */
.v24-doc.is-paginated-view{
  background: #e8dbd0 !important;
  padding: 20px 0 !important;
}
.qpv-page-break{
  position: relative;
  margin: 24px 0;
  padding: 8px 0;
  text-align: center;
  border-top: 2px dashed rgba(86,2,22,.35);
  border-bottom: none;
}
.qpv-page-break::before{
  content: '';
  position: absolute; top: -1px; left: 0; right: 0;
  border-top: 2px dashed rgba(86,2,22,.35);
}
.qpv-page-break span{
  display: inline-block;
  padding: 4px 14px;
  background: white;
  border: 1px solid rgba(86,2,22,.3);
  border-radius: 12px;
  font-size: 11px; font-weight: 700;
  color: var(--bordeaux);
  letter-spacing: .5px;
}
.qpv-page-break--first{
  margin-top: 0;
  border-top: none;
}
.qpv-page-break--first::before{ display: none; }

/* ---------- Mode "Forcer sur 1 page" (compression appliquée à la volée) ---------- */
.v24-doc.is-force-single .v24-doc__head{ padding: 12px 40px 10px !important; }
.v24-doc.is-force-single .v24-doc__head h1{ font-size: 26px !important; margin: 0 0 4px !important; }
.v24-doc.is-force-single .v24-doc__logo-img{ width: 130px !important; }
.v24-doc.is-force-single .v24-doc__coords{ font-size: 10px !important; line-height: 1.4 !important; }
.v24-doc.is-force-single .v24-doc__info{ padding: 10px 40px 6px !important; }
.v24-doc.is-force-single .v24-doc__col h2{ font-size: 11px !important; margin-bottom: 5px !important; }
.v24-doc.is-force-single .v24-doc__col-body{ font-size: 11px !important; line-height: 1.4 !important; }
.v24-doc.is-force-single .v24-doc__divider{ margin: 2px 40px 8px !important; }
.v24-doc.is-force-single .v24-doc__body{ padding: 0 40px 4px !important; }
.v24-doc.is-force-single .v24-doc__section{ font-size: 11px !important; margin: 0 0 8px !important; }
.v24-doc.is-force-single .v24-item{ padding: 3mm 0 !important; margin-bottom: 0 !important; }
.v24-doc.is-force-single .v24-item h3{ font-size: 12px !important; margin-bottom: 4px !important; }
.v24-doc.is-force-single .v24-item__desc,
.v24-doc.is-force-single .v24-list{ font-size: 10.5px !important; line-height: 1.4 !important; }
.v24-doc.is-force-single .v24-doc__footer{ padding: 5mm 40px 4mm !important; }
.v24-doc.is-force-single .v24-doc__footer-hr{ margin-bottom: 4px !important; }
.v24-doc.is-force-single .v24-doc__pay h4{ font-size: 10px !important; margin-bottom: 3px !important; }
.v24-doc.is-force-single .v24-doc__pay ul{ font-size: 10px !important; line-height: 1.4 !important; }
.v24-doc.is-force-single .v24-doc__tva-mention{ font-size: 10px !important; }
.v24-doc.is-force-single .v24-doc__total-line--big{ font-size: 15px !important; }
.v24-doc.is-force-single .v24-doc__acompte-line{ font-size: 10.5px !important; margin-top: 4px !important; }
.v24-doc.is-force-single .v24-doc__signature{ padding-top: 10px !important; padding-bottom: 0 !important; }
.v24-doc.is-force-single .v24-doc__signature-line{ margin-top: 10px !important; }
.v24-doc.is-force-single .v24-doc__signature-label{ font-size: 10.5px !important; }

/* Login — mot de passe oublié */
.login__remember{ display:flex; align-items:center; gap:6px; font-size:12px; color:#8a7a7f; cursor:pointer; margin: 4px 0 14px; }
.login__link{ display:block; margin: 14px auto 0; background:none; border:0; color:#560216; font-size:13px; text-decoration:underline; cursor:pointer; }
.login__btn--ghost{ background: transparent !important; color:#560216 !important; border:1px solid #560216 !important; margin-bottom: 14px; }
.login__info{ background:#f3ece4; color:#3d2a2f; border-radius:8px; padding:10px 12px; font-size:13px; margin-bottom:14px; text-align:left; }

/* Mobile : barre « ‹ Retour » toujours visible en haut des fiches et fenêtres */
.panel-back{ display: none; }
@media (max-width: 900px){
  .panel-back{
    display: flex; align-items: center; gap: 4px;
    position: sticky; top: 0; z-index: 20;
    width: 100%;
    padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
    background: rgba(255,255,255,.96);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 0; border-bottom: 1px solid var(--beige-3, #eee3da);
    color: #560216; font-size: 17px; font-weight: 600; text-align: left;
    cursor: pointer;
  }
  .panel-back:active{ background: #f3ece4; }
  .drawer__close, .modal__close{ display: none; }
  .drawer__body, .modal__body{ padding-top: 14px; }
  /* l'en-tête de fiche défile normalement (plus de place, rien de caché) */
  .fiche360__head{ position: static; margin-top: -14px; }
}

/* Prospects : température (Chaud / Tiède / Froid) sur la carte */
.pros-temp{
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 10px; vertical-align: middle;
  padding: 3px 10px; border-radius: 999px;
  font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0; text-transform: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.pros-temp:hover{ transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.pros-temp--hot    { background: #fde8e6; color: #b3261e; border-color: #f5c2bd; }
.pros-temp--warm   { background: #fff1dc; color: #b45f06; border-color: #f6d3a1; }
.pros-temp--cold   { background: #e5f0fa; color: #2f6690; border-color: #bcd6ec; }
.pros-temp--neutral{ background: #f1eeee; color: #7b6d71; border-color: #e2dcdd; }
.pros-card--t-hot  .pros-card__left .avatar{ box-shadow: 0 0 0 3px #fff, 0 0 0 5px #e0574b; }
.pros-card--t-warm .pros-card__left .avatar{ box-shadow: 0 0 0 3px #fff, 0 0 0 5px #f0a23b; }
.pros-card--t-cold .pros-card__left .avatar{ box-shadow: 0 0 0 3px #fff, 0 0 0 5px #6fa3cf; }
.pros-card__head .pros-temp{ margin-left: 0; flex-shrink: 0; }
.pros-card__head .pros-card__name{ min-width: 0; }
.pros-card__head .pros-card__amount{ margin-left: auto; }
.pros-card__head{ justify-content: flex-start; align-items: center; flex-wrap: wrap; }

/* Prospects · téléphone : avatar + statut en ligne au-dessus, texte en pleine largeur */
@media (max-width: 700px){
  .pros-card{ grid-template-columns: 1fr !important; gap: 12px; padding: 16px; }
  .pros-card__left{
    flex-direction: row; justify-content: flex-start; align-items: center;
    gap: 12px; min-width: 0;
  }
  .pros-card__left .avatar{ width: 44px; height: 44px; font-size: 16px; }
  .pros-card__left .pros-status-badge{ white-space: nowrap; }
  .pros-card__name{ white-space: normal; font-size: 17px; }
  .pros-card__event{ gap: 6px 12px; }
  .pros-card__coords{ flex-direction: column; align-items: flex-start; gap: 6px; }
  .pros-card__coords a{ word-break: break-all; }
  .pros-card__right{ grid-column: 1 / -1; flex-direction: row; justify-content: stretch; gap: 8px; }
  .pros-card__right .btn{ flex: 1; justify-content: center; }
  .pros-card__right .btn--danger{ flex: 0 0 44px; }
}

/* Éditeur de devis · téléphone : la barre d'actions défile avec la page
   (elle ne recouvre plus les champs) */
@media (max-width: 900px){
  .qeV2__topbar{ position: static !important; top: auto; padding: 12px 14px; gap: 10px; flex-wrap: wrap; box-shadow: none; }
  .qeV2__left, .qeV2__right, .qe__left, .qe__right{ position: static !important; max-height: none !important; overflow: visible !important; }
}


/* Menu : groupe « Devis & Facturation » avec sous-parties */
.nav__group-head{
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  color: rgba(237,225,216,.75); font: inherit; font-weight: 500; font-size: 13.5px;
  cursor: pointer; text-align: left; transition: all .15s ease;
}
.nav__group-head svg{ width: 18px; height: 18px; opacity: .85; }
.nav__group-head:hover{ background: rgba(237,225,216,.08); color: var(--beige); }
.nav__group-head .nav__chev{ margin-left: auto; width: 16px; height: 16px; transition: transform .2s; transform: rotate(-90deg); }
.nav__group.is-open .nav__chev{ transform: rotate(0deg); }
.nav__group:has(.nav__item.is-active) .nav__group-head{ color: var(--beige); }
.nav__sub{ display: none; flex-direction: column; gap: 2px; margin: 2px 0 4px 21px; padding-left: 12px; border-left: 1px solid rgba(237,225,216,.15); }
.nav__group.is-open .nav__sub{ display: flex; }
.nav__item--sub{ padding: 8px 12px; font-size: 13px; }
.fin-card{ cursor: pointer; }

/* Factures électroniques */
.einv-info{ display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin: 4px 0 18px; }
.einv-info__col{ background: var(--white, #fff); border: 1px solid rgba(86,2,22,.08); border-radius: 14px; padding: 16px 18px; }
.einv-info__title{ font-weight: 600; color: var(--bordeaux); margin-bottom: 8px; }
.einv-info ul{ margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--ink, #2a1d20); }
.einv-pa{ width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid rgba(86,2,22,.15); border-radius: 10px; font: inherit; font-size: 14px; }
.einv-kind{ font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.einv-kind--pro{ background: #e5f0fa; color: #2f6690; }
.einv-kind--b2c{ background: #f1eeee; color: #7b6d71; }
.einv-warn{ color: #b3261e; font-size: 12.5px; font-weight: 500; }
.einv-ok{ color: #2e7d5b; font-size: 12.5px; font-weight: 500; }
.einv-select{ padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(86,2,22,.2); font: inherit; font-size: 12.5px; background: #fff; }
@media (max-width: 900px){ .einv-info{ grid-template-columns: 1fr; } }
.einv-btn.is-on{ background: #fff6dd; border-color: #e6c35c; color: #7c5a08; }

/* Tableau de bord : CRM vide → importer la sauvegarde */
.import-hero{ display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 20px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(135deg, #fff6dd, #fbeee3); border: 1px solid #ecd39a; }
.import-hero__ico{ font-size: 30px; }
.import-hero__title{ font-weight: 700; color: var(--bordeaux); font-size: 16px; }
.import-hero__sub{ font-size: 13px; color: #5a4a4e; margin-top: 4px; line-height: 1.5; }
