/* ==========================================================================
   Vauclair Rénovation — Espace client
   Feuille de style unique, sans dépendance externe.
   Compatible : Safari iOS 12+, Chrome / Samsung Internet (Android 7+),
   Firefox, Edge, Safari macOS.
   ========================================================================== */

:root {
  /* Couleurs Vauclair Rénovation : vert sapin et or */
  --ink: #063823;
  --ink-2: #0d4a31;
  --ink-3: #3e5249;
  --paper: #ffffff;
  --paper-2: #f3f1ec;
  --surface: #ffffff;
  --line: #e8e4dc;
  --line-2: #d8d1c3;
  --text: #1b2520;
  --muted: #66706a;
  --muted-2: #8f9690;
  --accent: #bc9150;
  --accent-2: #8a6530;
  --accent-soft: #f8f2e6;
  --sand: #cba86a;
  --ok: #2f6e4f;
  --ok-soft: #e3efe8;
  --warn: #9a6512;
  --warn-soft: #f8edd9;
  --danger: #a83232;
  --danger-soft: #f7e3e1;
  --info: #2f5a86;
  --info-soft: #e3ebf4;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(6, 56, 35, .06), 0 2px 8px rgba(6, 56, 35, .04);
  --shadow-lg: 0 10px 30px rgba(6, 56, 35, .16);
  --sidebar: 268px;
  --topbar: 64px;
  --bottomnav: 62px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Base ---------- */
*, *::before, *::after { -webkit-box-sizing: border-box; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; color: var(--ink); }
p { margin: 0 0 .75em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.show-sm { display: none; }
.view:focus { outline: none; }
.sheet [data-sm] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.serif { font-family: var(--serif); }

.icon { width: 20px; height: 20px; -ms-flex-negative: 0; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* ---------- Logo ---------- */
.brand { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 12px; color: inherit; text-decoration: none !important; }
.brand-logo { display: block; height: 46px; width: auto; max-width: none; }
.brand .logo-dark { display: none; }
.sidebar-head .brand .logo-light, .auth-visual .brand .logo-light { display: none; }
.sidebar-head .brand .logo-dark, .auth-visual .brand .logo-dark { display: block; }
.auth-card .brand-logo { height: 70px; }
.auth-visual .brand-logo { height: 60px; }
.sidebar-head .brand-logo { height: 50px; }
.sheet-head .brand-logo { height: 62px; }
.brand-equipe { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; gap: 6px; }
.brand-tag { font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.sidebar-head .brand-tag { color: var(--sand); }

/* ---------- Boutons ---------- */
.btn {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: 14px; letter-spacing: .01em; line-height: 1.2;
  text-decoration: none !important; white-space: nowrap;
  -webkit-transition: background-color .15s, border-color .15s, color .15s; transition: background-color .15s, border-color .15s, color .15s;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--sand); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #e3c3bf; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: transparent; color: inherit; position: relative;
}
.icon-btn:hover { background: rgba(0, 0, 0, .05); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-2); font-weight: 600; font-size: 14px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 18px; }
.field label, .label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 46px; padding: 11px 14px;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  -webkit-transition: border-color .15s, box-shadow .15s; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); -webkit-box-shadow: 0 0 0 3px rgba(6, 56, 35, .1); box-shadow: 0 0 0 3px rgba(6, 56, 35, .1); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23063823' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input-group { position: relative; }
.input-group .input { padding-right: 52px; }
.input-group .icon-btn { position: absolute; right: 2px; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); color: var(--muted); }
.hint { margin-top: 6px; font-size: 13px; color: var(--muted); }
.error-text { margin-top: 6px; font-size: 13px; color: var(--danger); }
.check { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); -ms-flex-negative: 0; flex-shrink: 0; }

.alert { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; border: 1px solid transparent; }
.alert .icon { margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: #7a2323; border-color: #ecc8c4; }
.alert-info { background: var(--info-soft); color: #23466b; border-color: #cbd9e8; }
.alert-warn { background: var(--warn-soft); color: #6f4709; border-color: #edd7b0; }
.alert-ok { background: var(--ok-soft); color: #1f5038; border-color: #c4dccf; }
.alert p:last-child { margin-bottom: 0; }

.pw-rules { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.pw-rules li { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 8px; padding: 2px 0; }
.pw-rules li::before { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--line-2); border-radius: 50%; -ms-flex-negative: 0; flex-shrink: 0; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='white' stroke-width='1.6'/%3E%3C/svg%3E") center no-repeat; }
.strength { height: 4px; border-radius: 2px; background: var(--paper-2); margin-top: 10px; overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--danger); -webkit-transition: width .2s, background-color .2s; transition: width .2s, background-color .2s; }

/* ==========================================================================
   Écrans d'authentification
   ========================================================================== */
.auth { display: -webkit-box; display: -ms-flexbox; display: flex; min-height: 100vh; min-height: 100dvh; background: var(--paper); }
.auth-visual {
  position: relative; -webkit-box-flex: 1; -ms-flex: 1 1 52%; flex: 1 1 52%;
  background: var(--ink) url("../img/appartement-renove.jpg") 40% center / cover no-repeat;
  color: #fff; display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 48px 56px;
}
.auth-visual::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, rgba(4, 38, 24, .9) 0%, rgba(4, 38, 24, .72) 48%, rgba(4, 38, 24, .3) 100%), linear-gradient(180deg, rgba(4, 38, 24, .25) 0%, rgba(4, 38, 24, 0) 40%, rgba(4, 38, 24, .55) 100%); }
.auth-visual > * { position: relative; }
.auth-quote { max-width: 460px; }
.auth-quote h2 { font-family: var(--serif); font-weight: 500; color: #fff; font-size: 34px; line-height: 1.2; margin-bottom: 18px; }
.auth-quote p { color: rgba(255, 255, 255, .82); font-size: 16px; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: -ms-grid; display: grid; gap: 10px; }
.auth-points li { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 12px; -webkit-box-align: center; -ms-flex-align: center; align-items: center; color: rgba(255, 255, 255, .9); font-size: 15px; }
.auth-points .icon { color: var(--sand); }
.auth-foot { font-size: 12px; color: rgba(255, 255, 255, .6); letter-spacing: .02em; }

.auth-panel {
  -webkit-box-flex: 1; -ms-flex: 1 1 48%; flex: 1 1 48%;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  padding: 48px 32px; padding-top: calc(48px + var(--safe-top)); padding-bottom: calc(32px + var(--safe-bottom));
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { color: var(--ink); margin-bottom: 44px; }
.auth-card h1 { font-family: var(--serif); font-size: 30px; font-weight: 500; margin-bottom: 8px; }
.auth-card .lead { color: var(--muted); margin-bottom: 28px; }
.auth-meta { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.auth-meta a { font-weight: 600; }
.demo-box { margin-top: 22px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); font-size: 13px; color: var(--muted); background: rgba(255, 255, 255, .5); }
.demo-box strong { color: var(--ink); }
.demo-box code { font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--ink); background: var(--paper-2); padding: 1px 5px; border-radius: 3px; }
.row-between { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 12px; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.steps-indicator { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 6px; margin-bottom: 26px; }
.steps-indicator span { height: 3px; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; background: var(--line); border-radius: 2px; }
.steps-indicator span.on { background: var(--accent); }

@media (max-width: 960px) {
  .auth-visual { display: none; }
  .auth-panel { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; padding: 36px 22px; padding-top: calc(36px + var(--safe-top)); }
  .auth-card .brand { margin-bottom: 36px; }
}

/* ==========================================================================
   Structure de l'application
   ========================================================================== */
.app { min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: var(--sidebar);
  background: var(--ink); color: #e8efe9;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  padding-top: var(--safe-top);
}
.sidebar-head { padding: 22px 22px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
.sidebar-head .brand { color: #fff; }
.sidebar { border-right: 1px solid rgba(203, 168, 106, .25); }
.sidebar-head .icon-btn { display: none; color: #fff; }
.sidebar-project { margin: 18px 16px 6px; padding: 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); }
.sidebar-project .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.sidebar-project .v { color: #fff; font-weight: 600; margin-top: 4px; font-size: 14px; line-height: 1.35; }
.sidebar-project .bar { margin-top: 10px; height: 4px; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
.sidebar-project .bar span { display: block; height: 100%; background: var(--sand); }
.sidebar-project .pct { margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .6); }
.nav { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px 16px; }
.nav-label { padding: 16px 12px 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .4); }
.nav a {
  display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 12px;
  min-height: 42px; padding: 9px 12px; margin: 1px 0; border-radius: var(--radius);
  color: rgba(255, 255, 255, .78); font-size: 14px; text-decoration: none; position: relative;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 2px 2px 0; background: var(--sand); }
.nav a .icon { opacity: .85; }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--ink); font-size: 11px; font-weight: 700; display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
.sidebar-foot { padding: 14px 16px; padding-bottom: calc(14px + var(--safe-bottom)); border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: rgba(255, 255, 255, .55); }
.sidebar-foot a { color: rgba(255, 255, 255, .85); }

.main { margin-left: var(--sidebar); min-height: 100vh; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
.topbar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 30;
  height: calc(var(--topbar) + var(--safe-top)); padding: var(--safe-top) 28px 0;
  display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(150%) blur(8px); backdrop-filter: saturate(150%) blur(8px);
}
.topbar .menu-btn { display: none; margin-left: -8px; }
.topbar .brand-compact { display: none; color: var(--ink); }
.crumbs { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs strong { color: var(--ink); font-weight: 600; }
.topbar-actions { margin-left: auto; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 4px; }
.badge-dot { position: absolute; top: 8px; right: 8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--ink); font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; border: 2px solid var(--paper); }
.user-chip { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; margin-left: 6px; border: 0; background: transparent; border-radius: 24px; }
.user-chip:hover { background: rgba(0, 0, 0, .04); }
.user-chip .who { text-align: left; line-height: 1.2; }
.user-chip .who b { display: block; font-size: 14px; color: var(--ink); }
.user-chip .who span { font-size: 12px; color: var(--muted); }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--paper-2); color: var(--ink); display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; font-weight: 700; font-size: 13px; letter-spacing: .03em; -ms-flex-negative: 0; flex-shrink: 0; border: 1px solid var(--line); }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.avatar-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.avatar-accent { background: var(--accent-soft); color: var(--accent-2); border-color: #ece0c8; }

.view { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 28px 64px; }
.page-head { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 16px 24px; -ms-flex-wrap: wrap; flex-wrap: wrap; margin-bottom: 26px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; margin-bottom: 8px; }
.page-title { font-family: var(--serif); font-size: 32px; font-weight: 500; letter-spacing: -.005em; }
.page-sub { color: var(--muted); margin-top: 6px; max-width: 640px; }

/* ---------- Cartes & grilles ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); -webkit-box-shadow: var(--shadow); box-shadow: var(--shadow); }
.card-pad { padding: 22px 24px; }
.card-head { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 600; font-family: var(--sans); }
.card-body { padding: 20px 24px; }
.card-foot { padding: 14px 24px; border-top: 1px solid var(--line); background: #fafaf8; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.section-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 34px 0 14px; }

.grid { display: -ms-grid; display: grid; gap: 20px; }
.grid-2 { -ms-grid-columns: 1fr 1fr; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 20px; }

/* ---------- Bandeau projet (tableau de bord) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--ink); color: #fff; padding: 30px 32px; -webkit-box-shadow: var(--shadow); box-shadow: var(--shadow);
}
.hero-grid { display: -ms-grid; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; -webkit-box-align: end; -ms-flex-align: end; align-items: end; }
.hero .eyebrow { color: var(--sand); }
.hero h1 { color: #fff; font-family: var(--serif); font-weight: 500; font-size: 30px; }
.hero .addr { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 8px; margin-top: 8px; color: rgba(255, 255, 255, .72); font-size: 14px; }
.hero-pct { text-align: right; }
.hero-pct .num { font-family: var(--serif); font-size: 64px; line-height: 1; font-weight: 500; letter-spacing: -.02em; }
.hero-pct .num small { font-size: 28px; margin-left: 2px; color: rgba(255, 255, 255, .7); }
.hero-pct .lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-top: 6px; }
.progress-track { position: relative; margin-top: 26px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .14); }
.progress-track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--sand); -webkit-transition: width .8s cubic-bezier(.2, .7, .2, 1); transition: width .8s cubic-bezier(.2, .7, .2, 1); }
.progress-track .marker { position: absolute; top: -6px; bottom: -6px; width: 2px; background: #fff; border-radius: 1px; }
.progress-track .marker span { position: absolute; bottom: 16px; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: rgba(255, 255, 255, .7); }
.progress-legend { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; margin-top: 10px; font-size: 12px; color: rgba(255, 255, 255, .6); }
.hero-facts { display: -ms-grid; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); }
.hero-facts .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.hero-facts .v { margin-top: 4px; font-weight: 600; font-size: 15px; color: #fff; }
.hero-facts .v a { color: #fff; text-decoration: underline; -webkit-text-decoration-color: rgba(255, 255, 255, .35); text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }

.progress { height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.progress.accent > span { background: var(--accent); }
.progress.ok > span { background: var(--ok); }

/* ---------- Statuts ---------- */
.pill { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--paper-2); color: var(--ink-3); line-height: 1.5; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-plain::before { display: none; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-accent { background: var(--accent-soft); color: var(--accent-2); }
.pill-light { background: rgba(255, 255, 255, .14); color: #fff; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-3); }

/* ---------- Chiffres clés ---------- */
.kpi { padding: 20px 22px; }
.kpi .k { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi .v { margin-top: 8px; font-family: var(--serif); font-size: 28px; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .s { margin-top: 6px; font-size: 13px; color: var(--muted); }
.kpi.highlight { background: var(--accent-soft); border-color: #ece0c8; }
.kpi.highlight .v { color: var(--accent-2); }

/* ---------- Listes ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 14px; -webkit-box-align: center; -ms-flex-align: center; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
.list .title { font-weight: 600; color: var(--ink); }
.list .meta { font-size: 13px; color: var(--muted); }
.list a.row-link { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 14px; -webkit-box-align: center; -ms-flex-align: center; align-items: center; color: inherit; text-decoration: none; width: 100%; }
.file-ico { width: 40px; height: 40px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; color: var(--ink-3); -ms-flex-negative: 0; flex-shrink: 0; }
.file-ico.pdf { color: var(--accent-2); background: var(--accent-soft); border-color: #ece0c8; }

.next-step { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 16px; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
.date-block { width: 58px; -ms-flex-negative: 0; flex-shrink: 0; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.date-block .m { background: var(--ink); color: #fff; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 0; }
.date-block .d { font-family: var(--serif); font-size: 24px; padding: 4px 0 2px; color: var(--ink); }
.date-block .w { font-size: 11px; color: var(--muted); padding-bottom: 5px; }

/* ---------- Photos ---------- */
.photo-strip { display: -ms-grid; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); cursor: -webkit-zoom-in; cursor: zoom-in; }
.photo::after { content: ""; display: block; padding-top: 72%; }
.photo img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; -webkit-transition: -webkit-transform .4s; transition: transform .4s; }
.photo:hover img { -webkit-transform: scale(1.03); transform: scale(1.03); }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); text-align: left; }

/* ---------- Planning ---------- */
.seg { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; padding: 3px; border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--line); }
.seg button { min-height: 36px; padding: 6px 14px; border: 0; background: transparent; border-radius: 4px; font-size: 13px; font-weight: 600; color: var(--muted); display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--ink); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .08); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: -ms-grid; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 14px; padding-bottom: 6px; }
.tl-item::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: -2px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 34px; height: 34px; border-radius: 50%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; background: var(--surface); border: 2px solid var(--line-2); color: var(--muted); position: relative; z-index: 1; }
.tl-item.done .tl-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-item.done::before { background: #b9d3c4; }
.tl-item.current .tl-dot { background: var(--accent); border-color: var(--accent); color: #fff; -webkit-box-shadow: 0 0 0 5px var(--accent-soft); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-item.pause .tl-dot { border-style: dashed; }
.tl-card { margin-bottom: 14px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.tl-item.current .tl-card { border-color: #e4d2b0; -webkit-box-shadow: 0 0 0 1px #f3ead8, var(--shadow); box-shadow: 0 0 0 1px #f3ead8, var(--shadow); }
.tl-item.next .tl-card { border-color: var(--ink); }
.tl-item.pause .tl-card { background: #f8f7f4; border-style: dashed; }
.tl-top { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 10px 16px; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
.tl-top h3 { font-size: 16px; }
.tl-dates { display: -ms-grid; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin-top: 12px; font-size: 13px; }
.tl-dates .k { color: var(--muted); font-size: 12px; }
.tl-dates .v { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-dates .v.late { color: var(--warn); }
.tl-detail { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.tl-motif { margin-top: 12px; }

.cal-head { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cal-head h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; text-transform: capitalize; }
.cal-grid { display: -ms-grid; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; text-align: center; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 96px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; border-top: 0; border-left: 0; display: block; width: 100%; font-size: 13px; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: #f8f7f4; color: var(--muted-2); }
.cal-day.weekend { background: #fafaf8; }
.cal-day.today .n { background: var(--ink); color: #fff; }
.cal-day.sel { -webkit-box-shadow: inset 0 0 0 2px var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day .n { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 12px; font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.cal-ev { display: block; margin-top: 3px; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; line-height: 1.5; }
.cal-dots { display: none; gap: 3px; margin-top: 4px; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.ev-termine { background: var(--ok); }
.ev-en_cours { background: var(--accent); color: var(--ink); }
.ev-a_venir { background: var(--ink-3); }
.ev-pause { background: #b9b2a5; }
.cal-legend { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 8px 18px; -ms-flex-wrap: wrap; flex-wrap: wrap; padding: 12px 18px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.cal-legend span { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 6px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ---------- Journal ---------- */
.filters { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 10px; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-align: center; -ms-flex-align: center; align-items: center; margin-bottom: 20px; }
.filters .select { width: auto; min-width: 180px; min-height: 42px; padding-top: 8px; padding-bottom: 8px; font-size: 15px; }
.chips { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 8px; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 6px 14px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-3); }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.feed-day { margin: 28px 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 12px; }
.feed-day::after { content: ""; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; height: 1px; background: var(--line); }
.feed-day:first-child { margin-top: 0; }
.post { padding: 20px 22px; margin-bottom: 14px; }
.post-head { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 12px; -webkit-box-align: center; -ms-flex-align: center; align-items: center; margin-bottom: 12px; }
.post-head .who { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; line-height: 1.3; }
.post-head .who b { color: var(--ink); }
.post-head .who span { display: block; font-size: 13px; color: var(--muted); }
.post-text { font-size: 15px; color: var(--text); margin: 0; }
.post-photos { margin-top: 14px; display: -ms-grid; display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-photos.n1 { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
.post-photos.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-tags { margin-top: 14px; display: -webkit-box; display: -ms-flexbox; display: flex; gap: 6px; -ms-flex-wrap: wrap; flex-wrap: wrap; }

/* ---------- Documents ---------- */
.doc-cat { margin-bottom: 20px; }
.doc-actions { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 6px; -ms-flex-negative: 0; flex-shrink: 0; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafaf8; white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }

/* ---------- Finances ---------- */
.fin-bar { height: 12px; border-radius: 6px; background: var(--paper-2); overflow: hidden; display: -webkit-box; display: -ms-flexbox; display: flex; }
.fin-bar .paid { background: var(--ok); }
.fin-bar .pending { background: repeating-linear-gradient(45deg, var(--sand), var(--sand) 6px, #dcc39a 6px, #dcc39a 12px); }
.fin-legend { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 8px 20px; -ms-flex-wrap: wrap; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.fin-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Comptes rendus ---------- */
.report-card { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 18px; -webkit-box-align: center; -ms-flex-align: center; align-items: center; padding: 18px 22px; }
.report-week { width: 64px; height: 64px; -ms-flex-negative: 0; flex-shrink: 0; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
.report-week small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.report-week b { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--ink); line-height: 1; }

/* ---------- Équipe ---------- */
.person { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 16px; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
.person h3 { font-size: 17px; }
.person .role { font-size: 13px; color: var(--accent-2); font-weight: 600; margin-top: 2px; }
.contact-lines { margin-top: 12px; display: -ms-grid; display: grid; gap: 6px; font-size: 14px; }
.contact-lines a, .contact-lines span { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 8px; color: var(--ink); }
.contact-lines .icon { color: var(--muted); }
.urgent-card { background: #fff9f7; border-color: #ecc8c4; }
.urgent-card .card-head { border-color: #f0d6d2; }
.urgent-card h2 { color: var(--danger); }

/* ---------- Messagerie ---------- */
.chat { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; min-height: 520px; }
.chat-log { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; padding: 20px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: 62vh; background: #fafaf8; }
.msg { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 10px; margin-bottom: 18px; max-width: 86%; }
.msg.me { margin-left: auto; -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
.bubble { padding: 12px 15px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; word-wrap: break-word; overflow-wrap: break-word; }
.msg.me .bubble { background: var(--ink); border-color: var(--ink); color: #fff; }
.msg .meta { font-size: 12px; color: var(--muted); margin-top: 5px; }
.msg.me .meta { text-align: right; }
.msg .cat { display: inline-block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-bottom: 4px; }
.msg-attach { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 6px; -ms-flex-wrap: wrap; flex-wrap: wrap; margin-top: 8px; }
.msg-attach img { width: 120px; height: 90px; -o-object-fit: cover; object-fit: cover; border-radius: 4px; cursor: pointer; }
.msg-attach .file { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; gap: 6px; -webkit-box-align: center; -ms-flex-align: center; align-items: center; padding: 6px 10px; border-radius: 4px; background: rgba(255, 255, 255, .12); font-size: 13px; border: 1px solid rgba(0, 0, 0, .08); }
.system-note { text-align: center; font-size: 12.5px; color: var(--muted); margin: 6px 0 18px; }
.system-note span { display: inline-block; padding: 4px 12px; border-radius: 12px; background: var(--paper-2); }
.composer { border-top: 1px solid var(--line); padding: 14px 16px; background: var(--surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.composer-row { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 8px; -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; }
.composer textarea { min-height: 46px; max-height: 160px; resize: none; }
.composer .select { min-height: 40px; padding-top: 7px; padding-bottom: 7px; font-size: 14px; margin-bottom: 10px; max-width: 320px; }
.pending-files { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 8px; -ms-flex-wrap: wrap; flex-wrap: wrap; margin-bottom: 10px; }
.pending-files .pf { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); font-size: 12.5px; max-width: 220px; }
.pending-files .pf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-files .pf button { border: 0; background: none; padding: 2px; display: -webkit-box; display: -ms-flexbox; display: flex; color: var(--muted); }

.faq details { border-top: 1px solid var(--line); }
.faq details:first-of-type { border-top: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 15px 24px; font-weight: 600; color: var(--ink); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 12px; -webkit-box-align: center; -ms-flex-align: center; align-items: center; font-size: 14.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { -webkit-transition: -webkit-transform .2s; transition: transform .2s; color: var(--muted); }
.faq details[open] summary .icon { -webkit-transform: rotate(45deg); transform: rotate(45deg); }
.faq .ans { padding: 0 24px 16px; color: var(--ink-3); font-size: 14px; }

/* ---------- Satisfaction ---------- */
.stars { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; gap: 6px; }
.star { width: 48px; height: 48px; border: 0; background: none; padding: 4px; color: var(--line-2); }
.star svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.star.on { color: var(--sand); }
.rating-label { margin-top: 6px; font-size: 14px; color: var(--muted); min-height: 21px; }
.mini-rating { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 8px; }
.mini-rating button { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }

/* ---------- Paramètres ---------- */
.switch { position: relative; display: inline-block; width: 46px; height: 28px; -ms-flex-negative: 0; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .track { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 14px; background: var(--line-2); -webkit-transition: background-color .2s; transition: background-color .2s; cursor: pointer; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .2); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); -webkit-transition: -webkit-transform .2s; transition: transform .2s; }
.switch input:checked + .track { background: var(--ink); }
.switch input:checked + .track::after { -webkit-transform: translateX(18px); transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Notifications ---------- */
.dropdown { position: absolute; right: 16px; top: calc(var(--topbar) + var(--safe-top) - 6px); width: 380px; max-width: calc(100vw - 24px); z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); -webkit-box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.dropdown .card-head { padding: 14px 18px; }
.dropdown .list { max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dropdown .list > li { padding: 12px 18px; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; cursor: pointer; }
.dropdown .list > li:hover { background: #fafaf8; }
.dropdown .list > li.unread { background: #fbf7ee; }
.notif-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--paper); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; color: var(--ink-3); -ms-flex-negative: 0; flex-shrink: 0; }
.unread .notif-ico { background: var(--accent-soft); color: var(--accent-2); }
.user-menu { width: 260px; }
.user-menu a, .user-menu button { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 10px; -webkit-box-align: center; -ms-flex-align: center; align-items: center; width: 100%; padding: 12px 18px; border: 0; background: none; text-align: left; color: var(--ink); font-size: 14px; text-decoration: none; }
.user-menu a:hover, .user-menu button:hover { background: #fafaf8; }

/* ---------- Visionneuse & fenêtres ---------- */
.overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90; background: rgba(4, 30, 19, .55); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; padding: 20px; -webkit-animation: fade .18s ease-out; animation: fade .18s ease-out; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border-radius: var(--radius-lg); -webkit-box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg); }
.modal .card-head h2 { font-family: var(--serif); font-weight: 500; font-size: 20px; }
.lightbox { background: rgba(10, 13, 17, .94); padding: 0; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
.lightbox-top { position: absolute; top: 0; left: 0; right: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -ms-flex-align: center; align-items: center; padding: 10px 12px; padding-top: calc(10px + var(--safe-top)); color: #fff; font-size: 14px; z-index: 2; }
.lightbox img { max-width: 92vw; max-height: 76vh; -o-object-fit: contain; object-fit: contain; border-radius: 4px; }
.lightbox-cap { color: rgba(255, 255, 255, .8); font-size: 14px; margin-top: 14px; padding: 0 20px; text-align: center; max-width: 720px; }
.lightbox .nav-arrow { position: absolute; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
.lightbox .nav-arrow:hover { background: rgba(255, 255, 255, .2); }
.lightbox .prev { left: 16px; }
.lightbox .next { right: 16px; }
.lightbox .icon-btn { color: #fff; }
@-webkit-keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: 28px; bottom: calc(28px + var(--safe-bottom)); z-index: 100; -webkit-transform: translate(-50%, 20px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius); font-size: 14px; -webkit-box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg); -webkit-transition: opacity .2s, -webkit-transform .2s; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0); }

.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; color: var(--line-2); margin: 0 auto 12px; }

/* ==========================================================================
   Documents imprimables (devis, factures, comptes rendus)
   ========================================================================== */
.doc-toolbar { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 10px; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; margin-bottom: 18px; }
.sheet { background: #fff; max-width: 860px; margin: 0 auto 24px; padding: 56px 60px; border: 1px solid var(--line); -webkit-box-shadow: var(--shadow); box-shadow: var(--shadow); color: #1f2328; font-size: 13.5px; }
.sheet + .sheet { margin-top: 24px; }
.sheet-head { border-bottom-color: var(--accent) !important; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 2px solid var(--ink); }
.sheet-head .brand { color: var(--ink); }
.sheet-company { text-align: right; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.sheet-title { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 24px; margin: 28px 0 24px; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.sheet-title h1 { font-family: var(--serif); font-weight: 500; font-size: 26px; }
.sheet-title .ref { color: var(--muted); margin-top: 4px; }
.sheet-box { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; min-width: 240px; font-size: 13px; line-height: 1.6; }
.sheet-box .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.sheet table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.sheet th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--ink); }
.sheet td { padding: 8px; border-bottom: 1px solid #ece9e2; vertical-align: top; }
.sheet .lot-row td { background: #f5f3ee; font-weight: 700; color: var(--ink); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.sheet .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet-totals { margin: 18px 0 0 auto; width: 300px; max-width: 100%; }
.sheet-totals div { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #ece9e2; font-variant-numeric: tabular-nums; }
.sheet-totals .grand { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 10px; font-weight: 700; font-size: 15px; color: var(--ink); }
.sheet-section { margin-top: 26px; }
.sheet-section h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 10px; font-family: var(--sans); }
.sheet-section ul { margin: 0; padding-left: 18px; }
.sheet-section li { margin-bottom: 4px; }
.sheet-sign { display: -ms-grid; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 34px; }
.sheet-sign > div { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; min-height: 110px; font-size: 12.5px; }
.sheet-sign .signed { margin-top: 12px; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink); }
.sheet-foot { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); text-align: center; line-height: 1.6; }
.sheet-photos { display: -ms-grid; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sheet-photos img { width: 100%; height: 150px; -o-object-fit: cover; object-fit: cover; border-radius: 3px; }
.stamp { display: inline-block; padding: 4px 10px; border: 2px solid var(--ok); color: var(--ok); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; border-radius: 3px; -webkit-transform: rotate(-4deg); transform: rotate(-4deg); }
.stamp.wait { border-color: var(--warn); color: var(--warn); }
.plan-svg { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #fafaf8; }

/* ==========================================================================
   Assistance (bas à droite)
   ========================================================================== */
.assist-btn {
  position: fixed; right: 24px; bottom: 24px; bottom: calc(24px + var(--safe-bottom)); z-index: 70;
  display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 10px;
  height: 52px; padding: 0 20px 0 16px; border-radius: 26px; border: 0;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; -webkit-box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), var(--shadow-lg); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), var(--shadow-lg);
}
.assist-btn:hover { background: var(--ink-2); }
.assist-btn .icon { color: var(--sand); }
.assist-panel {
  position: fixed; right: 24px; bottom: 24px; bottom: calc(24px + var(--safe-bottom)); z-index: 80;
  width: 400px; height: 600px; max-height: calc(100vh - 48px);
  display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; -webkit-box-shadow: 0 18px 50px rgba(6, 56, 35, .25); box-shadow: 0 18px 50px rgba(6, 56, 35, .25); overflow: hidden;
  -webkit-animation: rise .2s ease-out; animation: rise .2s ease-out;
}
@-webkit-keyframes rise { from { opacity: 0; -webkit-transform: translateY(12px); transform: translateY(12px); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes rise { from { opacity: 0; -webkit-transform: translateY(12px); transform: translateY(12px); } to { opacity: 1; -webkit-transform: none; transform: none; } }
.assist-head { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 12px; padding: 14px 10px 14px 18px; background: var(--ink); color: #fff; }
.assist-head .t { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; line-height: 1.25; }
.assist-head .t b { display: block; font-size: 15px; }
.assist-head .t span { font-size: 12px; color: rgba(255, 255, 255, .65); }
.assist-head .icon-btn { color: #fff; }
.assist-head .icon-btn:hover { background: rgba(255, 255, 255, .1); }
.assist-log { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; background: #fafaf8; }
.a-msg { margin-bottom: 14px; max-width: 92%; }
.a-msg.me { margin-left: auto; }
.a-msg .b { padding: 11px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.a-msg.me .b { background: var(--ink); border-color: var(--ink); color: #fff; }
.a-msg .b p { margin: 0 0 8px; }
.a-msg .b p:last-child { margin-bottom: 0; }
.a-msg .b ul { margin: 6px 0 8px; padding-left: 18px; }
.a-msg .b li { margin-bottom: 3px; }
.a-msg .b h4 { font-size: 13px; margin: 10px 0 4px; font-family: var(--sans); }
.a-msg .b .urg { margin: 6px 0; padding: 10px 12px; border-radius: 6px; background: var(--danger-soft); color: #7a2323; border: 1px solid #ecc8c4; }
.a-msg .b .urg a { color: #7a2323; font-weight: 700; font-size: 16px; }
.a-actions { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 6px; -ms-flex-wrap: wrap; flex-wrap: wrap; margin-top: 8px; }
.a-actions .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.a-photos { display: -ms-grid; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.a-photos .photo::after { padding-top: 80%; }
.a-chips { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px 0; background: var(--surface); border-top: 1px solid var(--line); scrollbar-width: none; }
.a-chips::-webkit-scrollbar { display: none; }
.a-chips button { -ms-flex-negative: 0; flex-shrink: 0; min-height: 32px; padding: 5px 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.a-chips button:hover { border-color: var(--ink); color: var(--ink); }
.assist-form { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 8px; padding: 10px 12px 12px; padding-bottom: calc(12px + var(--safe-bottom)); background: var(--surface); }
.assist-form .input { min-height: 44px; padding-top: 9px; padding-bottom: 9px; }
.assist-form .btn { min-height: 44px; padding: 0 14px; }
.assist-note { font-size: 11px; color: var(--muted-2); text-align: center; padding: 0 12px 8px; background: var(--surface); }
.typing { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; gap: 4px; padding: 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); -webkit-animation: blink 1s infinite; animation: blink 1s infinite; }
.typing i:nth-child(2) { -webkit-animation-delay: .15s; animation-delay: .15s; }
.typing i:nth-child(3) { -webkit-animation-delay: .3s; animation-delay: .3s; }
@-webkit-keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ==========================================================================
   Barre de navigation mobile
   ========================================================================== */
.bottom-nav { display: none; }
body.nav-open .assist-btn { display: none; }
.scrim { display: none; }

/* ---------- Tablette & petits ordinateurs ---------- */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .sidebar { -webkit-transform: translateX(-102%); transform: translateX(-102%); -webkit-transition: -webkit-transform .25s ease; transition: transform .25s ease; -webkit-box-shadow: none; box-shadow: none; width: 300px; max-width: 86vw; }
  .app.nav-open .sidebar { -webkit-transform: none; transform: none; -webkit-box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg); z-index: 65; }
  .app.nav-open .scrim { display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; background: rgba(4, 30, 19, .45); }
  .sidebar-head .icon-btn { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; }
  .main { margin-left: 0; }
  .topbar { padding-left: 16px; padding-right: 12px; }
  .topbar .menu-btn { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .view { padding: 26px 22px 56px; }
}

/* ---------- Téléphones ---------- */
@media (max-width: 767px) {
  body { font-size: 15px; }
  .topbar { height: calc(56px + var(--safe-top)); }
  .topbar .crumbs { display: none; }
  .topbar .brand-compact { display: -webkit-box; display: -ms-flexbox; display: flex; }
  .topbar .brand-compact .brand-mark { width: 30px; height: 30px; }
  .topbar .brand-compact .brand-name { font-size: 16px; }
  .topbar .brand-compact .brand-sub { display: none; }
  .topbar .brand-compact .brand-logo { height: 36px; }
  .user-chip .who { display: none; }
  .dropdown { right: 8px; left: 8px; width: auto; max-width: none; top: calc(56px + var(--safe-top) - 2px); }

  .view { padding: 20px 16px; padding-bottom: calc(var(--bottomnav) + 96px + var(--safe-bottom)); }
  .page-head { margin-bottom: 20px; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
  .page-title { font-size: 26px; }
  .grid { gap: 14px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-pad, .card-body { padding: 18px; }
  .card-head { padding: 14px 18px; }
  .list > li { padding: 13px 18px; }
  .kpi { padding: 16px; }
  .kpi .v { font-size: 22px; }

  .hero { padding: 22px 20px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero h1 { font-size: 24px; }
  .hero-pct { text-align: left; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline; gap: 12px; }
  .hero-pct .num { font-size: 48px; }
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .photo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-strip .photo:nth-child(3) { display: none; }
  .post { padding: 16px; }
  .post-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-photos.n3 .photo:first-child { grid-column: 1 / -1; }
  .filters .select { -webkit-box-flex: 1; -ms-flex: 1 1 140px; flex: 1 1 140px; min-width: 0; }

  .tl-dates { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tl-card { padding: 14px 16px; }
  .cal-day { min-height: 54px; padding: 4px 2px; text-align: center; }
  .cal-ev { display: none; }
  .cal-dots { display: -webkit-box; display: -ms-flexbox; display: flex; }
  .cal-dow { padding: 8px 2px; font-size: 10px; letter-spacing: .04em; }

  /* tableaux -> cartes */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { padding: 3px 0 !important; border: 0; text-align: left !important; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 12px; }
  .table-cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 400; }
  .table-cards td.primary { font-weight: 600; color: var(--ink); font-size: 15px; padding-bottom: 6px !important; }
  .table-cards td.primary::before { display: none; }

  .msg { max-width: 94%; }
  .chat-log { max-height: none; min-height: 50vh; padding: 16px; }
  .composer .select { max-width: none; }
  .report-card { padding: 16px; gap: 14px; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
  .report-card .btn-text { display: none; }
  .doc-actions .btn-text { display: none; }
  .star { width: 44px; height: 44px; }

  .sheet { padding: 26px 18px; font-size: 12.5px; margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; }
  .sheet-head { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
  .sheet-company { text-align: left; }
  .sheet-sign { grid-template-columns: minmax(0, 1fr); }
  .sheet-photos img { height: 100px; }
  .hide-sm, .sheet .hide-sm { display: none; }
  .show-sm { display: inline; }
  .sheet [data-sm] { display: inline !important; }

  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: -webkit-box; display: -ms-flexbox; display: flex;
    height: calc(var(--bottomnav) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: saturate(150%) blur(10px); backdrop-filter: saturate(150%) blur(10px);
  }
  .bottom-nav a, .bottom-nav button {
    -webkit-box-flex: 1; -ms-flex: 1; flex: 1; display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
    gap: 3px; border: 0; background: none; font-size: 10.5px; font-weight: 600; color: var(--muted); text-decoration: none; position: relative; padding: 0;
  }
  .bottom-nav .active { color: var(--ink); }
  .bottom-nav .active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; background: var(--accent); border-radius: 0 0 2px 2px; }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .bottom-nav .dot { position: absolute; top: 7px; left: 50%; margin-left: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

  .assist-btn { right: 14px; bottom: calc(var(--bottomnav) + 14px + var(--safe-bottom)); height: 48px; padding: 0 16px 0 14px; }
  .assist-panel { right: 0; left: 0; bottom: 0; top: 0; width: auto; height: auto; max-height: none; border-radius: 0; border: 0; padding-top: var(--safe-top); }
  .assist-head { padding-top: 12px; }
  .toast { bottom: calc(var(--bottomnav) + 20px + var(--safe-bottom)); }
}

@media (max-width: 340px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .hero-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .assist-btn span { display: none; }
  .assist-btn { width: 48px; padding: 0; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
}

/* Réduction des animations si demandé par l'utilisateur */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { -webkit-animation: none !important; animation: none !important; -webkit-transition: none !important; transition: none !important; }
}

/* ==========================================================================
   Impression / enregistrement en PDF
   ========================================================================== */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 12px; }
  .sidebar, .topbar, .bottom-nav, .assist-btn, .assist-panel, .doc-toolbar, .toast, .scrim, .no-print { display: none !important; }
  .main { margin: 0 !important; }
  .view { padding: 0 !important; max-width: none; }
  .sheet { border: 0; -webkit-box-shadow: none; box-shadow: none; padding: 0; margin: 0; max-width: none; }
  .sheet + .sheet { page-break-before: always; break-before: page; margin-top: 0; }
  .sheet tr, .sheet-sign, .sheet-totals, .sheet-photos { page-break-inside: avoid; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
