/* ============================================================
       DECOPIERRE · ATELIER  (Vue 3, single-file demo)
       ============================================================ */

    :root {
      --bg:           #F2EBE0;
      --bg-alt:       #E8DFD0;
      --paper:        #FBF8F2;
      --paper-dark:   #ECE4D3;
      --ink:          #1F1A14;
      --ink-soft:     #5C5247;
      --ink-mute:     #8C8378;
      --line:         #D7CCB8;
      --line-soft:    #E5DCC9;
      --cuivre:       #B05A2C;
      --cuivre-deep:  #823C18;
      --ocre:         #C99757;
      --mousse:       #6B7E55;
      --mousse-deep:  #4A5C3A;
      --rouille:      #8B2E1F;
      --shadow-soft:  0 1px 0 rgba(31,26,20,0.04), 0 12px 32px -16px rgba(31,26,20,0.18);
      --shadow-card:  0 2px 0 rgba(31,26,20,0.03), 0 20px 50px -28px rgba(31,26,20,0.22);
      --shadow-modal: 0 40px 80px -20px rgba(31,26,20,0.5);
      --radius:       4px;
      --radius-lg:    14px;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { background: var(--bg); }

    body {
      font-family: 'Outfit', system-ui, -apple-system, sans-serif;
      font-weight: 400;
      color: var(--ink);
      line-height: 1.55;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      min-height: 100vh;
      background-color: var(--bg);
      background-image:
        radial-gradient(at 10% 0%, rgba(201,151,87,0.10) 0%, transparent 50%),
        radial-gradient(at 90% 10%, rgba(176,90,44,0.07) 0%, transparent 50%),
        radial-gradient(at 50% 100%, rgba(107,126,85,0.06) 0%, transparent 60%);
      background-attachment: fixed;
    }

    body::before {
      content: '';
      position: fixed; inset: 0;
      pointer-events: none;
      opacity: 0.35;
      mix-blend-mode: multiply;
      z-index: 1;
      background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.10  0 0 0 0 0.08  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    }

    .wrap { position: relative; z-index: 2; }

    button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
    input, select, textarea { font: inherit; color: inherit; }

    /* ============================================================
       TYPOGRAPHY
       ============================================================ */
    .display {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 30;
      font-weight: 500;
      letter-spacing: -0.025em;
      line-height: 0.95;
    }
    .serif { font-family: 'Fraunces', serif; font-variation-settings: "opsz" 36, "SOFT" 30; }
    .mono  { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: 'tnum' 1; }
    .tnum  { font-variant-numeric: tabular-nums; }

    .eyebrow {
      font-family: 'Outfit', sans-serif;
      font-weight: 500;
      font-size: 11px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--ink-mute);
    }
    .eyebrow-cuivre { color: var(--cuivre); }

    /* ============================================================
       HEADER
       ============================================================ */
    .header {
      position: sticky; top: 0; z-index: 50;
      backdrop-filter: blur(14px) saturate(140%);
      -webkit-backdrop-filter: blur(14px) saturate(140%);
      background: rgba(242,235,224,0.78);
      border-bottom: 1px solid var(--line);
    }
    .header-inner {
      max-width: 1480px; margin: 0 auto;
      padding: 16px 40px;
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 32px;
    }

    .logo-block { display: flex; align-items: center; gap: 14px; }
    .logo-mark {
      width: 44px; height: 44px;
      display: grid; place-items: center;
      color: var(--ink);
    }
    .logo-mark svg { width: 100%; height: 100%; }
    .logo-text { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
    .logo-name {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 17px;
      letter-spacing: 0.18em;
      color: var(--ink);
    }
    .logo-tag {
      font-family: 'Fraunces', serif;
      font-style: italic;
      font-variation-settings: "opsz" 14, "SOFT" 80;
      font-weight: 400;
      font-size: 11px;
      color: var(--ink-soft);
      letter-spacing: 0.02em;
    }

    .nav {
      display: flex; gap: 28px;
      justify-content: center;
    }
    .nav a {
      font-family: 'Outfit', sans-serif;
      font-size: 13px;
      font-weight: 500;
      color: var(--ink-soft);
      text-decoration: none;
      letter-spacing: 0.02em;
      transition: color 0.2s ease;
      position: relative;
      padding: 4px 0;
      cursor: pointer;
    }
    .nav a::after {
      content: '';
      position: absolute; left: 50%; bottom: -2px;
      width: 0; height: 1px;
      background: var(--cuivre);
      transition: width 0.25s ease, left 0.25s ease;
    }
    .nav a:hover { color: var(--ink); }
    .nav a:hover::after { width: 100%; left: 0; }
    .nav a.active { color: var(--ink); }
    .nav a.active::after { width: 100%; left: 0; }

    .header-right { display: flex; align-items: center; gap: 16px; }

    /* ============================================================
       ROLE SWITCHER  (key demo control)
       ============================================================ */
    .role-switcher {
      display: flex;
      padding: 4px;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 100px;
      gap: 0;
      position: relative;
    }
    .role-pill {
      padding: 7px 14px;
      border-radius: 100px;
      font-size: 12px;
      font-weight: 500;
      color: var(--ink-soft);
      transition: color 150ms ease, background-color 150ms ease;
      display: flex; align-items: center; gap: 8px;
      white-space: nowrap;
    }
    .role-pill:hover { color: var(--ink); }
    .role-pill.active {
      background: var(--ink);
      color: var(--paper);
    }
    .role-pill .dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: currentColor;
      opacity: 0.5;
    }
    .role-pill.active .dot { opacity: 1; background: var(--ocre); }

    .reset-btn {
      width: 36px; height: 36px;
      border-radius: 50%;
      background: var(--paper);
      border: 1px solid var(--line);
      display: grid; place-items: center;
      color: var(--ink-soft);
      transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
    }
    .reset-btn:hover {
      color: var(--rouille);
      border-color: var(--rouille);
      transform: rotate(-90deg);
    }
    .reset-btn svg { width: 14px; height: 14px; }

    .user-avatar {
      width: 38px; height: 38px;
      border-radius: 50%;
      color: var(--paper);
      display: grid; place-items: center;
      font-family: 'Fraunces', serif;
      font-weight: 500;
      font-size: 13px;
      letter-spacing: 0.02em;
      cursor: pointer;
      border: 2px solid var(--paper);
      box-shadow: 0 0 0 1px var(--line);
      transition: transform 0.2s ease;
    }
    .user-avatar:hover { transform: scale(1.05); }
    .user-avatar.bg-cuivre { background: linear-gradient(135deg, var(--cuivre), var(--cuivre-deep)); }
    .user-avatar.bg-mousse { background: linear-gradient(135deg, var(--mousse), var(--mousse-deep)); }
    .user-avatar.bg-terre  { background: linear-gradient(135deg, #8B5A4E, #5C3A2E); }

    .agence-pill {
      display: flex; align-items: center; gap: 8px;
      padding: 7px 12px 7px 10px;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 100px;
      font-size: 12px;
      color: var(--ink-soft);
      cursor: pointer;
      transition: color 150ms ease, border-color 150ms ease;
    }
    .agence-pill:hover { border-color: var(--cuivre); color: var(--ink); }
    .agence-pill .live-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: var(--mousse);
      box-shadow: 0 0 0 3px rgba(107,126,85,0.18);
    }

    /* ============================================================
       MAIN LAYOUT
       ============================================================ */
    main {
      max-width: 1480px;
      margin: 0 auto;
      padding: 48px 40px 80px;
    }

    section + section { margin-top: 96px; }

    /* ============================================================
       HERO
       ============================================================ */
    .hero {
      display: grid;
      grid-template-columns: 1.4fr 1fr;
      gap: 80px;
      align-items: end;
      padding-bottom: 48px;
      border-bottom: 1px solid var(--line);
    }
    .hero-left { animation: rise 420ms cubic-bezier(0.23,1,0.32,1) both; }
    .hero-meta {
      display: flex; gap: 18px; align-items: center;
      margin-bottom: 24px;
    }
    .hero-meta-dash {
      width: 36px; height: 1px; background: var(--ink); opacity: 0.6;
    }
    .hero-title {
      font-size: clamp(54px, 6.5vw, 96px);
      color: var(--ink);
      transition: opacity 0.4s ease;
    }
    .hero-title em {
      font-family: 'Fraunces', serif;
      font-style: italic;
      font-variation-settings: "opsz" 144, "SOFT" 100;
      font-weight: 300;
      color: var(--cuivre-deep);
      display: inline-block;
    }
    .hero-sub {
      margin-top: 28px;
      font-size: 16px;
      max-width: 520px;
      color: var(--ink-soft);
      line-height: 1.6;
    }
    .hero-sub strong { color: var(--ink); font-weight: 600; }
    .hero-sub .accent { color: var(--cuivre); font-weight: 500; }

    .hero-right {
      display: flex; flex-direction: column;
      gap: 18px;
      animation: rise 420ms 60ms cubic-bezier(0.23,1,0.32,1) both;
    }
    .hero-date-block {
      padding: 22px 24px;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      display: grid;
      grid-template-columns: auto 1fr;
      align-items: center;
      gap: 22px;
      box-shadow: var(--shadow-soft);
    }
    .hero-date-num {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 50;
      font-weight: 300;
      font-size: 76px;
      line-height: 0.9;
      color: var(--cuivre);
    }
    .hero-date-info { display: flex; flex-direction: column; gap: 4px; }
    .hero-date-day { font-size: 16px; font-weight: 600; color: var(--ink); }
    .hero-date-month { font-size: 13px; color: var(--ink-soft); }
    .hero-date-quote {
      margin-top: 10px;
      font-family: 'Fraunces', serif;
      font-style: italic;
      font-variation-settings: "opsz" 14, "SOFT" 80;
      font-size: 13px;
      color: var(--ink-mute);
      max-width: 220px;
    }

    .hero-quick {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    .hero-quick-card {
      padding: 14px 16px;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 10px;
      display: flex; flex-direction: column; gap: 4px;
      transition: border-color 150ms ease, transform 200ms cubic-bezier(0.23,1,0.32,1);
      cursor: default;
    }
    .hero-quick-card:hover { border-color: var(--cuivre); transform: translateY(-1px); }
    .hero-quick-card .label {
      font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.16em;
      color: var(--ink-mute); font-weight: 500;
    }
    .hero-quick-card .value {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 500;
      font-size: 22px;
      color: var(--ink);
      letter-spacing: -0.01em;
    }
    .hero-quick-card .delta {
      font-size: 11px; font-weight: 500;
    }
    .delta-up    { color: var(--mousse); }
    .delta-down  { color: var(--rouille); }
    .delta-warn  { color: var(--cuivre); }
    .hero-quick-card.accent-card {
      border-color: var(--cuivre);
      background: linear-gradient(180deg, var(--paper) 0%, rgba(176,90,44,0.06) 100%);
    }
    .hero-quick-card.accent-card .label { color: var(--cuivre); }
    .hero-quick-card.accent-card .value { color: var(--cuivre-deep); }

    /* ============================================================
       SECTION HEAD
       ============================================================ */
    .section-head {
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: end;
      gap: 32px;
      margin-bottom: 36px;
    }
    .section-num {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 50;
      font-weight: 300;
      font-style: italic;
      font-size: 86px;
      line-height: 0.85;
      color: var(--cuivre);
      opacity: 0.85;
    }
    .section-titles { display: flex; flex-direction: column; gap: 10px; }
    .section-titles h2 {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 40;
      font-weight: 500;
      font-size: 42px;
      letter-spacing: -0.02em;
      line-height: 1.0;
      color: var(--ink);
    }
    .section-titles h2 em {
      font-style: italic;
      font-variation-settings: "opsz" 144, "SOFT" 100;
      font-weight: 300;
      color: var(--cuivre-deep);
    }
    .section-titles .sub {
      font-size: 14px; color: var(--ink-soft);
      max-width: 580px;
    }
    .btn-primary {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 10px 16px;
      background: var(--ink);
      color: var(--paper);
      border: 1px solid var(--ink);
      border-radius: 100px;
      font-size: 13px; font-weight: 500;
      transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms cubic-bezier(0.23,1,0.32,1);
    }
    .btn-primary:active { transform: scale(0.97); }
    .btn-primary:hover {
      background: var(--cuivre);
      border-color: var(--cuivre);
    }
    .btn-primary svg { width: 12px; height: 12px; }

    .btn-secondary {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 10px 16px;
      background: var(--paper);
      color: var(--ink);
      border: 1px solid var(--line);
      border-radius: 100px;
      font-size: 13px; font-weight: 500;
      transition: border-color 150ms ease, color 150ms ease, transform 160ms cubic-bezier(0.23,1,0.32,1);
    }
    .btn-secondary:active { transform: scale(0.97); }
    .btn-secondary:hover { border-color: var(--cuivre); color: var(--cuivre); }
    .btn-secondary svg { width: 12px; height: 12px; }

    /* ============================================================
       COMMISSIONS BOARD
       ============================================================ */
    .commission-board {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: var(--shadow-card);
    }
    .commission-banner {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 40px;
      padding: 36px 40px;
      background: linear-gradient(135deg, var(--ink) 0%, #2A2218 100%);
      color: var(--paper);
      align-items: center;
      position: relative;
      overflow: hidden;
    }
    .commission-banner::before {
      content: '';
      position: absolute;
      right: -100px; top: -60px;
      width: 360px; height: 360px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(176,90,44,0.4) 0%, transparent 70%);
      pointer-events: none;
    }
    .commission-banner-text { position: relative; }
    .commission-banner h3 {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 30;
      font-weight: 400;
      font-size: 30px;
      line-height: 1.1;
      letter-spacing: -0.015em;
      margin-bottom: 10px;
    }
    .commission-banner h3 em {
      font-style: italic;
      font-variation-settings: "opsz" 144, "SOFT" 100;
      color: var(--ocre);
    }
    .commission-banner p {
      font-size: 14px;
      color: rgba(251,248,242,0.7);
      max-width: 540px;
    }
    .commission-banner-amount { position: relative; text-align: right; }
    .commission-banner-amount .num {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144;
      font-weight: 300;
      font-size: 72px;
      line-height: 1;
      color: var(--ocre);
      letter-spacing: -0.03em;
      transition: color 300ms ease;
    }
    .commission-banner-amount .label {
      font-size: 11px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(251,248,242,0.6);
      margin-top: 6px;
    }

    .commission-list { display: flex; flex-direction: column; }
    .commission-row {
      display: grid;
      grid-template-columns: 1.4fr 2fr 1.6fr 1fr auto;
      gap: 24px;
      padding: 24px 40px;
      align-items: center;
      border-bottom: 1px solid var(--line-soft);
      transition: background 0.2s ease;
    }
    .commission-row:last-child { border-bottom: none; }
    .commission-row:hover { background: var(--paper-dark); }

    .comm-person { display: flex; align-items: center; gap: 14px; }
    .comm-avatar {
      width: 44px; height: 44px;
      border-radius: 50%;
      display: grid; place-items: center;
      font-family: 'Fraunces', serif;
      font-weight: 500;
      font-size: 13px;
      letter-spacing: 0.02em;
      border: 1px solid var(--line);
      color: var(--paper);
    }
    .comm-avatar.bg-cuivre { background: linear-gradient(135deg, #C99757, #B05A2C); }
    .comm-avatar.bg-mousse { background: linear-gradient(135deg, #6B7E55, #4A5C3A); }
    .comm-avatar.bg-terre  { background: linear-gradient(135deg, #8B5A4E, #5C3A2E); }
    .comm-info { display: flex; flex-direction: column; gap: 2px; }
    .comm-name { font-size: 14px; font-weight: 600; color: var(--ink); }
    .comm-meta { font-size: 11.5px; color: var(--ink-mute); }

    .comm-progress { display: flex; flex-direction: column; gap: 8px; }
    .comm-progress-top {
      display: flex; justify-content: space-between;
      font-size: 11.5px;
      color: var(--ink-soft);
    }
    .comm-progress-top .label { letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
    .comm-progress-top .pct {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 14;
      font-weight: 500;
      font-size: 13px;
      color: var(--ink);
    }
    .bar {
      height: 6px;
      background: var(--paper-dark);
      border-radius: 100px;
      overflow: hidden;
      position: relative;
    }
    .bar > i {
      display: block;
      height: 100%;
      border-radius: 100px;
      background: linear-gradient(90deg, var(--cuivre) 0%, var(--ocre) 100%);
      transition: width 0.6s cubic-bezier(.2,.7,.2,1);
    }
    .bar > i.ok    { background: linear-gradient(90deg, var(--mousse) 0%, #88A06D 100%); }
    .bar > i.warn  { background: linear-gradient(90deg, var(--cuivre) 0%, var(--ocre) 100%); }
    .bar > i.alert { background: linear-gradient(90deg, var(--rouille) 0%, #C56B5A 100%); }

    .comm-missing { display: flex; flex-wrap: wrap; gap: 6px; }
    .chip {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 4px 9px;
      background: var(--paper-dark);
      border: 1px solid var(--line);
      border-radius: 100px;
      font-size: 11px;
      color: var(--ink-soft);
      font-weight: 500;
    }
    .chip.warn { background: rgba(176,90,44,0.08); border-color: rgba(176,90,44,0.25); color: var(--cuivre-deep); }
    .chip.ok { background: rgba(107,126,85,0.10); border-color: rgba(107,126,85,0.25); color: #3F4F2F; }
    .chip.alert { background: rgba(139,46,31,0.08); border-color: rgba(139,46,31,0.25); color: var(--rouille); }
    .chip-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

    .comm-amount {
      text-align: right;
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 500;
      font-size: 24px;
      color: var(--ink);
      transition: color 0.3s ease;
    }
    .comm-amount.locked { color: var(--rouille); }
    .comm-amount.released { color: var(--mousse); }
    .comm-amount small {
      display: block;
      font-family: 'Outfit', sans-serif;
      font-size: 10.5px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      font-weight: 500;
      margin-top: 4px;
      color: var(--ink-mute);
    }

    .comm-action {
      width: 38px; height: 38px;
      border-radius: 50%;
      border: 1px solid var(--line);
      background: var(--paper);
      display: grid; place-items: center;
      color: var(--ink-soft);
      transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
    }
    .comm-action:hover {
      background: var(--ink); color: var(--paper);
      border-color: var(--ink);
    }
    .comm-action svg { width: 14px; height: 14px; }

    /* ============================================================
       DOSSIERS GRID
       ============================================================ */
    .dossiers-toolbar {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
    }
    .filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
    .filter-pill {
      padding: 8px 14px;
      border: 1px solid var(--line);
      border-radius: 100px;
      font-size: 12px;
      font-weight: 500;
      color: var(--ink-soft);
      background: var(--paper);
      transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 160ms cubic-bezier(0.23,1,0.32,1);
    }
    .filter-pill:active { transform: scale(0.97); }
    .filter-pill:hover { color: var(--ink); }
    .filter-pill.active {
      background: var(--ink); color: var(--paper); border-color: var(--ink);
    }
    .filter-pill .count {
      font-family: 'JetBrains Mono', monospace;
      margin-left: 4px; opacity: 0.6; font-size: 10.5px;
    }

    .search-input {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 14px;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 100px;
      min-width: 260px;
    }
    .search-input svg { width: 14px; height: 14px; color: var(--ink-mute); flex-shrink: 0; }
    .search-input input {
      border: none; background: none; outline: none;
      font-size: 13px; color: var(--ink); width: 100%;
    }
    .search-input input::placeholder { color: var(--ink-mute); }

    .dossier-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 22px;
    }
    .dossier-card {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      overflow: hidden;
      transition: transform 200ms cubic-bezier(0.23,1,0.32,1), box-shadow 200ms ease, border-color 150ms ease;
      cursor: pointer;
      display: flex; flex-direction: column;
      text-align: left;
    }
    .dossier-card:hover {
      transform: translateY(-4px);
      border-color: var(--cuivre);
      box-shadow: var(--shadow-card);
    }

    .dossier-header {
      padding: 20px 22px 16px;
      display: flex; justify-content: space-between; align-items: flex-start;
      gap: 16px;
      border-bottom: 1px solid var(--line-soft);
    }
    .dossier-header-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
    .dossier-ref {
      display: flex; gap: 8px; align-items: center;
      font-family: 'JetBrains Mono', monospace;
      font-size: 10.5px;
      color: var(--ink-mute);
      letter-spacing: 0.08em;
    }
    .stage-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
    .stage-dot.s-commercial { background: var(--ink-mute); }
    .stage-dot.s-validation { background: var(--ocre); }
    .stage-dot.s-admin      { background: var(--cuivre); }
    .stage-dot.s-planning   { background: var(--cuivre-deep); }
    .stage-dot.s-pose       { background: var(--mousse); }
    .stage-dot.s-facture    { background: var(--mousse-deep); }
    .stage-dot.s-termine    { background: var(--ink); }

    .dossier-name {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 40;
      font-weight: 500;
      font-size: 26px;
      line-height: 1.05;
      letter-spacing: -0.015em;
      color: var(--ink);
    }
    .dossier-city {
      font-family: 'Fraunces', serif;
      font-style: italic;
      font-variation-settings: "opsz" 14, "SOFT" 60;
      font-size: 13px;
      color: var(--ink-soft);
    }

    .dossier-header-right { text-align: right; flex-shrink: 0; }
    .dossier-amount {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 500;
      font-size: 20px;
      color: var(--ink);
      letter-spacing: -0.01em;
    }
    .dossier-amount small {
      display: block;
      font-family: 'Outfit', sans-serif;
      font-size: 9.5px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      font-weight: 500;
      color: var(--ink-mute);
      margin-top: 2px;
    }

    .dossier-body {
      padding: 20px 22px;
      display: flex; flex-direction: column; gap: 18px;
      flex: 1;
    }

    .stepper {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 4px;
      align-items: center;
    }
    .step { display: flex; flex-direction: column; gap: 6px; }
    .step-bar {
      height: 3px;
      background: var(--paper-dark);
      border-radius: 100px;
      overflow: hidden;
    }
    .step-bar > i { display: block; height: 100%; width: 0; transition: width 0.5s ease; }
    .step.done .step-bar > i { width: 100%; background: var(--mousse); }
    .step.current .step-bar > i { width: 60%; background: var(--cuivre); }
    .step-label {
      font-size: 8.5px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-weight: 500;
      color: var(--ink-mute);
    }
    .step.done .step-label { color: var(--mousse); }
    .step.current .step-label { color: var(--cuivre); font-weight: 600; }

    .completion-row {
      display: flex; justify-content: space-between; align-items: center;
      gap: 12px;
    }
    .completion-left { display: flex; flex-direction: column; gap: 4px; }
    .completion-pct {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 500;
      font-size: 22px;
      color: var(--ink);
      letter-spacing: -0.01em;
    }
    .completion-pct sup {
      font-size: 12px; color: var(--ink-mute);
      vertical-align: top; margin-left: 1px;
    }
    .completion-label {
      font-size: 10.5px; letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--ink-mute);
      font-weight: 500;
    }

    .ring {
      --p: 75;
      --c: var(--cuivre);
      width: 52px; height: 52px;
      border-radius: 50%;
      background: conic-gradient(var(--c) calc(var(--p)*1%), var(--paper-dark) 0);
      display: grid; place-items: center;
      position: relative;
      transition: background 0.5s ease;
    }
    .ring::before {
      content: '';
      position: absolute; inset: 5px;
      background: var(--paper);
      border-radius: 50%;
    }
    .ring span {
      position: relative;
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 14;
      font-weight: 600;
      font-size: 12px;
      color: var(--ink);
    }

    .dossier-footer {
      padding: 14px 22px;
      border-top: 1px solid var(--line-soft);
      display: flex; justify-content: space-between; align-items: center;
      background: var(--paper-dark);
      gap: 12px;
    }
    .dossier-footer-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
    .dossier-meta-item {
      display: flex; align-items: center; gap: 6px;
      font-size: 11px;
      color: var(--ink-soft);
    }
    .dossier-meta-item strong { font-weight: 600; color: var(--ink); }

    .commercial-tag {
      display: flex; align-items: center; gap: 7px;
      padding: 4px 10px 4px 4px;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 100px;
      font-size: 11px;
      font-weight: 500;
      color: var(--ink);
    }
    .micro-avatar {
      width: 18px; height: 18px;
      border-radius: 50%;
      display: grid; place-items: center;
      color: var(--paper);
      font-size: 9px;
      font-family: 'Fraunces', serif;
      font-weight: 500;
    }
    .micro-avatar.bg-cuivre { background: var(--cuivre); }
    .micro-avatar.bg-mousse { background: var(--mousse); }
    .micro-avatar.bg-terre  { background: #8B5A4E; }

    .empty-state {
      grid-column: 1 / -1;
      padding: 80px 40px;
      text-align: center;
      background: var(--paper);
      border: 1px dashed var(--line);
      border-radius: var(--radius-lg);
    }
    .empty-state h4 {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 60;
      font-weight: 400;
      font-style: italic;
      font-size: 28px;
      margin-bottom: 8px;
      color: var(--ink-soft);
    }
    .empty-state p { font-size: 14px; color: var(--ink-mute); }

    /* ============================================================
       PLANNING GANTT
       ============================================================ */
    .planning-board {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: var(--shadow-card);
    }
    .planning-head {
      display: grid;
      grid-template-columns: 200px 1fr;
      border-bottom: 1px solid var(--line);
      background: var(--paper-dark);
    }
    .planning-head-equipes {
      padding: 18px 24px;
      display: flex; align-items: center; justify-content: space-between;
    }
    .planning-head-equipes .label {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 500;
      font-size: 15px;
      color: var(--ink);
    }
    .planning-head-dates {
      display: grid;
      grid-template-columns: repeat(14, 1fr);
      position: relative;
    }
    .day-head {
      padding: 16px 4px 14px;
      text-align: center;
      border-left: 1px solid var(--line-soft);
    }
    .day-head .day-num {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 500;
      font-size: 17px;
      color: var(--ink);
      line-height: 1;
    }
    .day-head .day-name {
      font-size: 9.5px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--ink-mute);
      margin-top: 4px;
      font-weight: 500;
    }
    .day-head.we { background: rgba(31,26,20,0.025); }
    .day-head.we .day-num { color: var(--ink-mute); }
    .day-head.today { background: var(--ink); }
    .day-head.today .day-num { color: var(--ocre); }
    .day-head.today .day-name { color: rgba(251,248,242,0.6); }

    .gantt-row {
      display: grid;
      grid-template-columns: 200px 1fr;
      border-bottom: 1px solid var(--line-soft);
      min-height: 86px;
      align-items: stretch;
    }
    .gantt-row:last-child { border-bottom: none; }

    .equipe-cell {
      padding: 16px 24px;
      display: flex; align-items: center; gap: 12px;
      border-right: 1px solid var(--line);
      background: var(--paper-dark);
    }
    .equipe-avatar {
      width: 36px; height: 36px;
      border-radius: 8px;
      display: grid; place-items: center;
      font-family: 'Fraunces', serif;
      font-weight: 500;
      font-size: 13px;
      color: var(--paper);
    }
    .equipe-cell .info { display: flex; flex-direction: column; gap: 2px; }
    .equipe-cell .name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
    .equipe-cell .stat { font-size: 10.5px; color: var(--ink-mute); }

    .gantt-track {
      position: relative;
      display: grid;
      grid-template-columns: repeat(14, 1fr);
    }
    .gantt-cell {
      border-left: 1px solid var(--line-soft);
      min-height: 86px;
    }
    .gantt-cell.we { background: rgba(31,26,20,0.025); }

    .today-line {
      position: absolute;
      top: 0; bottom: 0;
      width: 2px;
      background: var(--ocre);
      pointer-events: none;
      z-index: 5;
    }
    .today-line::before {
      content: '';
      position: absolute; top: -6px; left: -5px;
      width: 12px; height: 12px;
      border-radius: 50%;
      background: var(--ocre);
      box-shadow: 0 0 0 4px rgba(201,151,87,0.25);
    }

    .gantt-bar {
      position: absolute;
      top: 12px;
      height: calc(100% - 24px);
      border-radius: 8px;
      padding: 10px 14px;
      display: flex; flex-direction: column; justify-content: center; gap: 2px;
      cursor: pointer;
      transition: transform 160ms cubic-bezier(0.23,1,0.32,1), box-shadow 160ms ease;
      box-shadow: 0 4px 14px -6px rgba(31,26,20,0.3);
      overflow: hidden;
    }
    .gantt-bar:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px -8px rgba(31,26,20,0.4);
    }
    .gantt-bar .client {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 600;
      font-size: 14px;
      color: var(--paper);
      letter-spacing: -0.01em;
    }
    .gantt-bar .meta {
      font-size: 10.5px;
      color: rgba(251,248,242,0.85);
      letter-spacing: 0.02em;
    }
    .bar-cuivre { background: linear-gradient(135deg, var(--cuivre) 0%, var(--cuivre-deep) 100%); }
    .bar-ocre   { background: linear-gradient(135deg, var(--ocre) 0%, #A77A3D 100%); }
    .bar-mousse { background: linear-gradient(135deg, var(--mousse) 0%, #4A5C3A 100%); }
    .bar-terre  { background: linear-gradient(135deg, #8B5A4E 0%, #5C3A2E 100%); }
    .bar-ink    { background: linear-gradient(135deg, #3A2F22 0%, var(--ink) 100%); }

    /* ============================================================
       SAV + MOBILE
       ============================================================ */
    .split-two {
      display: grid;
      grid-template-columns: 1.1fr 1fr;
      gap: 40px;
      align-items: start;
    }
    .sav-panel {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: var(--shadow-card);
    }
    .sav-head {
      padding: 24px 28px;
      display: flex; justify-content: space-between; align-items: center;
      border-bottom: 1px solid var(--line-soft);
      background: var(--paper-dark);
    }
    .sav-head h3 {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 40;
      font-weight: 500;
      font-size: 22px;
      letter-spacing: -0.01em;
    }
    .sav-head h3 em {
      font-style: italic;
      font-variation-settings: "opsz" 144, "SOFT" 100;
      color: var(--rouille);
    }
    .sav-count {
      padding: 4px 12px;
      background: var(--rouille);
      color: var(--paper);
      border-radius: 100px;
      font-size: 12px;
      font-weight: 600;
    }

    /* Ligne de ticket SAV : vignette, contenu, urgence, action.
       Quatre colonnes, le contenu occupe toute la largeur disponible.
       (Avant : trois colonnes pour quatre enfants, l'action retombait
       donc sur une seconde ligne, collée à gauche.) */
    /* Cinq colonnes : vignette, de quoi il s'agit, où et qui appeler, urgence,
       actions. Les deux colonnes de contenu se partagent l'espace, il n'y a
       plus de vide au milieu de la ligne. */
    .sav-item {
      padding: 22px 28px;
      display: grid;
      grid-template-columns: auto minmax(0, 1.25fr) minmax(0, 1fr) auto auto;
      gap: 26px;
      align-items: center;
      border-bottom: 1px solid var(--line-soft);
      transition: background 0.2s ease;
      cursor: pointer;
    }
    .sav-item:hover { background: var(--paper-dark); }
    .sav-item:last-child { border-bottom: none; }

    /* Photos jointes sur la card SAV (lecture) */
    .sav-photo-strip {
      display: flex; flex-wrap: wrap; gap: 6px;
      margin-top: 8px;
    }
    .sav-photo-chip {
      display: block;
      width: 44px; height: 44px;
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid var(--line);
      background: var(--paper-dark);
      transition: transform 0.15s ease, border-color 0.15s ease;
    }
    .sav-photo-chip:hover { transform: scale(1.06); border-color: var(--cuivre); }
    .sav-photo-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }

    /* Vignettes des photos en attente d'upload (création SAV) */
    .sav-photo-previews {
      display: flex; flex-wrap: wrap; gap: 8px;
      margin-top: 8px;
    }
    .sav-photo-prev {
      position: relative;
      width: 72px; height: 72px;
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid var(--line);
      background: var(--paper-dark);
    }
    .sav-photo-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .sav-photo-prev-remove {
      position: absolute; top: 2px; right: 2px;
      width: 20px; height: 20px;
      border-radius: 50%;
      border: none;
      background: rgba(31,26,20,0.85);
      color: var(--paper);
      font-size: 14px; line-height: 1;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
    }
    .sav-photo-prev-remove:hover { background: var(--rouille); }
    .sav-thumb {
      width: 72px; height: 72px;
      border-radius: 10px;
      flex-shrink: 0;
      border: 1px solid var(--line);
    }
    .sav-thumb.t1 { background: linear-gradient(135deg, #8B5A4E, #C99757); }
    .sav-thumb.t2 { background: linear-gradient(135deg, #C99757, #A26B3F); }
    .sav-thumb.t3 { background: linear-gradient(135deg, #6B7E55, #4A5C3A); }

    .sav-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
    .sav-client {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 600;
      font-size: 19px;
      line-height: 1.25;
      color: var(--ink);
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    }
    /* Titre du ticket : c'est l'information qu'on lit en premier après le client. */
    .sav-desc {
      font-size: 15px;
      line-height: 1.45;
      color: var(--ink);
      font-weight: 500;
      max-width: none;
    }
    .sav-description {
      font-size: 13.5px;
      line-height: 1.5;
      color: var(--ink-soft);
      max-width: 70ch;
    }
    .sav-meta {
      display: flex; gap: 10px; flex-wrap: wrap;
      margin-top: 4px;
      font-size: 12px;
      color: var(--ink-mute);
      letter-spacing: 0.02em;
    }
    .sav-meta b { color: var(--ink-soft); font-weight: 600; }
    .sav-contact { font-size: 13px; line-height: 1.5; }
    .sav-severity { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; justify-content: center; }
    .sav-cta { display: flex; align-items: center; justify-content: flex-end; }
    .severity-badge {
      padding: 5px 13px;
      border-radius: 100px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }
    .severity-haute  { background: rgba(139,46,31,0.1); color: var(--rouille); border: 1px solid rgba(139,46,31,0.3); }
    .severity-moyenne{ background: rgba(176,90,44,0.1); color: var(--cuivre-deep); border: 1px solid rgba(176,90,44,0.3); }
    .severity-basse  { background: rgba(107,126,85,0.1); color: var(--mousse); border: 1px solid rgba(107,126,85,0.3); }
    .sav-days {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10.5px;
      color: var(--ink-mute);
    }

    /* Mobile mockup */
    .mobile-wrap {
      display: flex; flex-direction: column; gap: 28px;
      align-items: center;
    }
    .mobile-frame {
      width: 320px;
      background: var(--ink);
      border-radius: 44px;
      padding: 12px;
      box-shadow:
        0 30px 60px -20px rgba(31,26,20,0.5),
        0 0 0 1px rgba(0,0,0,0.05),
        inset 0 0 0 2px #2A2218;
      position: relative;
    }
    .mobile-frame::before {
      content: '';
      position: absolute;
      top: 18px; left: 50%;
      transform: translateX(-50%);
      width: 80px; height: 24px;
      background: var(--ink);
      border-radius: 100px;
      z-index: 3;
    }
    .mobile-screen {
      background: var(--bg);
      border-radius: 34px;
      overflow: hidden;
      min-height: 600px;
      position: relative;
    }
    .mobile-statusbar {
      padding: 16px 24px 6px;
      display: flex; justify-content: space-between;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      font-weight: 600;
      color: var(--ink);
    }
    .mobile-statusbar .icons { display: flex; gap: 4px; }
    .mobile-statusbar svg { width: 12px; height: 12px; }

    .mobile-header {
      padding: 32px 22px 18px;
      display: flex; justify-content: space-between; align-items: flex-start;
    }
    .mobile-header-text { display: flex; flex-direction: column; gap: 2px; }
    .mobile-greeting {
      font-size: 11.5px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      font-weight: 500;
      color: var(--ink-mute);
    }
    .mobile-date {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 40;
      font-weight: 500;
      font-size: 26px;
      line-height: 1;
      color: var(--ink);
      letter-spacing: -0.015em;
    }
    .mobile-date em {
      font-style: italic;
      font-variation-settings: "opsz" 144, "SOFT" 100;
      color: var(--cuivre);
    }
    .mobile-avatar {
      width: 38px; height: 38px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--mousse), #4A5C3A);
      color: var(--paper);
      display: grid; place-items: center;
      font-family: 'Fraunces', serif;
      font-weight: 500;
      font-size: 13px;
      border: 2px solid var(--paper);
      box-shadow: 0 0 0 1px var(--line);
    }

    .mobile-todo-banner {
      margin: 6px 22px 22px;
      padding: 12px 16px;
      background: linear-gradient(135deg, var(--cuivre), var(--cuivre-deep));
      color: var(--paper);
      border-radius: 12px;
      display: flex; justify-content: space-between; align-items: center;
    }
    .mobile-todo-banner .label {
      font-size: 9.5px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      opacity: 0.8;
      font-weight: 500;
    }
    .mobile-todo-banner .count {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 600;
      font-size: 14px;
    }
    .mobile-todo-banner .arrow {
      width: 28px; height: 28px;
      border-radius: 50%;
      background: rgba(255,255,255,0.15);
      display: grid; place-items: center;
    }
    .mobile-todo-banner .arrow svg { width: 12px; height: 12px; }

    .mobile-chantier {
      margin: 0 22px;
      background: var(--paper);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--shadow-card);
      border: 1px solid var(--line);
    }
    .mobile-chantier-photo {
      height: 130px;
      background:
        linear-gradient(180deg, transparent 50%, rgba(31,26,20,0.55) 100%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='200'><defs><pattern id='p' x='0' y='0' width='80' height='40' patternUnits='userSpaceOnUse'><rect width='80' height='40' fill='%23C99757'/><rect x='0' y='0' width='40' height='20' fill='%23B05A2C' opacity='0.6'/><rect x='40' y='20' width='40' height='20' fill='%23823C18' opacity='0.4'/><rect x='2' y='2' width='36' height='16' rx='2' fill='%23D4A878'/><rect x='42' y='22' width='36' height='16' rx='2' fill='%23A26B3F'/></pattern></defs><rect width='400' height='200' fill='url(%23p)'/></svg>");
      background-size: cover;
      background-position: center;
      position: relative;
    }
    .mobile-chantier-badge {
      position: absolute;
      top: 12px; left: 12px;
      padding: 4px 10px;
      background: rgba(251,248,242,0.95);
      backdrop-filter: blur(8px);
      border-radius: 100px;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--ink);
    }
    .mobile-chantier-badge .dot {
      display: inline-block;
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--mousse);
      margin-right: 5px;
      vertical-align: middle;
      animation: pulse 2s ease-in-out infinite;
    }
    .mobile-chantier-title {
      position: absolute;
      bottom: 12px; left: 14px; right: 14px;
      color: var(--paper);
    }
    .mobile-chantier-title .name {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 40;
      font-weight: 500;
      font-size: 20px;
      letter-spacing: -0.015em;
      line-height: 1;
    }
    .mobile-chantier-title .addr {
      font-size: 11px;
      opacity: 0.85;
      margin-top: 3px;
    }
    .mobile-chantier-stats {
      padding: 14px 16px;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      border-bottom: 1px solid var(--line-soft);
    }
    .m-stat { display: flex; flex-direction: column; gap: 2px; }
    .m-stat .label {
      font-size: 8.5px; letter-spacing: 0.15em;
      text-transform: uppercase; color: var(--ink-mute);
      font-weight: 600;
    }
    .m-stat .value {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 500;
      font-size: 15px;
      color: var(--ink);
    }
    .mobile-actions {
      padding: 14px;
      display: flex; flex-direction: column; gap: 8px;
    }
    .m-action {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 14px;
      border-radius: 10px;
      font-size: 12.5px;
      font-weight: 500;
      transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
    }
    .m-action.primary {
      background: var(--ink); color: var(--paper);
    }
    .m-action.primary:hover { background: var(--cuivre); }
    .m-action.secondary {
      background: var(--bg-alt); color: var(--ink);
    }
    .m-action .icon {
      width: 26px; height: 26px;
      border-radius: 6px;
      display: grid; place-items: center;
      flex-shrink: 0;
    }
    .m-action.primary .icon { background: rgba(255,255,255,0.1); }
    .m-action.secondary .icon { background: var(--paper); border: 1px solid var(--line); }
    .m-action svg { width: 14px; height: 14px; }

    .mobile-tabbar {
      position: absolute;
      bottom: 0; left: 0; right: 0;
      background: var(--paper);
      border-top: 1px solid var(--line);
      padding: 12px 22px 22px;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
    }
    .tab-item {
      display: flex; flex-direction: column; align-items: center; gap: 4px;
      padding: 4px 0;
      font-size: 9.5px;
      font-weight: 500;
      color: var(--ink-mute);
      letter-spacing: 0.06em;
    }
    .tab-item.active { color: var(--ink); }
    .tab-item svg { width: 18px; height: 18px; }

    .mobile-caption { text-align: center; max-width: 320px; }
    .mobile-caption .eyebrow { margin-bottom: 10px; }
    .mobile-caption h4 {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 40;
      font-weight: 500;
      font-size: 22px;
      letter-spacing: -0.015em;
      line-height: 1.1;
      margin-bottom: 8px;
    }
    .mobile-caption h4 em {
      font-style: italic;
      font-variation-settings: "opsz" 144, "SOFT" 100;
      color: var(--cuivre);
    }
    .mobile-caption p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

    /* ============================================================
       FOOTER
       ============================================================ */
    .footer {
      margin-top: 120px;
      padding: 80px 40px 40px;
      border-top: 1px solid var(--line);
      background: linear-gradient(180deg, transparent 0%, var(--paper-dark) 100%);
    }
    .footer-inner {
      max-width: 1480px; margin: 0 auto;
      display: grid;
      grid-template-columns: 1.5fr 1fr 1fr;
      gap: 60px;
      align-items: end;
    }
    .footer-brand { display: flex; flex-direction: column; gap: 16px; }
    .footer-tagline {
      font-family: 'Fraunces', serif;
      font-style: italic;
      font-variation-settings: "opsz" 144, "SOFT" 100;
      font-weight: 300;
      font-size: clamp(36px, 4vw, 56px);
      line-height: 1;
      color: var(--ink);
      letter-spacing: -0.015em;
    }
    .footer-tagline span { color: var(--cuivre-deep); }
    .footer-meta {
      display: flex; flex-direction: column; gap: 8px;
      font-size: 13px;
      color: var(--ink-soft);
    }
    .footer-meta .label {
      font-size: 10.5px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--ink-mute);
      font-weight: 500;
      margin-bottom: 2px;
    }
    .footer-credits {
      grid-column: 1 / -1;
      padding-top: 32px;
      margin-top: 32px;
      border-top: 1px solid var(--line-soft);
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: var(--ink-mute);
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    /* ============================================================
       MODAL  /  DETAIL PANEL
       ============================================================ */
    .modal-overlay {
      position: fixed; inset: 0;
      background: rgba(31,26,20,0.5);
      backdrop-filter: blur(8px);
      z-index: 100;
      display: flex; justify-content: flex-end;
    }
    .modal-overlay.center { justify-content: center; align-items: center; padding: 40px; }
    .modal {
      background: var(--paper);
      box-shadow: var(--shadow-modal);
      display: flex; flex-direction: column;
      animation: slideIn 280ms cubic-bezier(0.32,0.72,0,1) both;
    }
    .modal.side {
      width: min(720px, 100%);
      height: 100%;
      border-left: 1px solid var(--line);
    }
    .modal.dialog {
      width: min(560px, 100%);
      max-height: 90vh;
      border-radius: var(--radius-lg);
      border: 1px solid var(--line);
      animation: dialogIn 220ms cubic-bezier(0.23,1,0.32,1) both;
    }
    @keyframes slideIn {
      from { transform: translateX(24px); opacity: 0; }
      to   { transform: translateX(0); opacity: 1; }
    }
    @keyframes dialogIn {
      from { transform: translateY(20px) scale(0.96); opacity: 0; }
      to   { transform: none; opacity: 1; }
    }

    .modal-header {
      padding: 24px 32px;
      border-bottom: 1px solid var(--line-soft);
      display: flex; justify-content: space-between; align-items: flex-start;
      gap: 24px;
    }
    .modal-header-left { display: flex; flex-direction: column; gap: 8px; }
    .modal-header h3 {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 144, "SOFT" 40;
      font-weight: 500;
      font-size: 34px;
      line-height: 1;
      letter-spacing: -0.02em;
    }
    .modal-header h3 em {
      font-style: italic;
      font-variation-settings: "opsz" 144, "SOFT" 100;
      color: var(--cuivre-deep);
    }
    .modal-header .sub { font-size: 13px; color: var(--ink-soft); }
    .modal-close {
      width: 36px; height: 36px;
      border-radius: 50%;
      border: 1px solid var(--line);
      display: grid; place-items: center;
      color: var(--ink-soft);
      flex-shrink: 0;
      transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
    }
    .modal-close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
    .modal-close svg { width: 14px; height: 14px; }

    .modal-body {
      padding: 28px 32px;
      overflow-y: auto;
      flex: 1;
      display: flex; flex-direction: column; gap: 28px;
    }

    .modal-footer {
      padding: 18px 32px;
      border-top: 1px solid var(--line-soft);
      background: var(--paper-dark);
      display: flex; justify-content: space-between; align-items: center;
      gap: 16px;
    }
    .modal-footer-meta {
      font-size: 12px; color: var(--ink-soft);
    }
    .modal-footer-meta strong { color: var(--ink); font-weight: 600; }
    .modal-actions { display: flex; gap: 10px; align-items: center; }

    /* Detail panel sections */
    .detail-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }
    .detail-cell {
      padding: 14px 16px;
      background: var(--bg-alt);
      border-radius: 10px;
      display: flex; flex-direction: column; gap: 4px;
    }
    .detail-cell .label {
      font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
      font-weight: 600; color: var(--ink-mute);
    }
    .detail-cell .value {
      font-family: 'Fraunces', serif;
      font-variation-settings: "opsz" 36;
      font-weight: 500;
      font-size: 16px;
      color: var(--ink);
    }
    .detail-cell.large { grid-column: span 2; }

    .pieces-group {
      display: flex; flex-direction: column; gap: 8px;
    }
    .pieces-group-title {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 4px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--line-soft);
    }
    .pieces-group-title .name {
      font-size: 11px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      font-weight: 600;
      color: var(--ink-soft);
    }
    .pieces-group-title .count {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--ink-mute);
    }

    .piece-row {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 12px;
      align-items: center;
      padding: 10px 14px;
      border-radius: 8px;
      background: var(--paper-dark);
      transition: background 0.2s ease;
    }
    .piece-row:hover { background: var(--bg-alt); }
    .piece-check {
      width: 22px; height: 22px;
      border: 1.5px solid var(--line);
      border-radius: 6px;
      background: var(--paper);
      display: grid; place-items: center;
      flex-shrink: 0;
      color: transparent;
      transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms cubic-bezier(0.23,1,0.32,1);
    }
    .piece-check:active { transform: scale(0.94); }
    .piece-check:hover { border-color: var(--cuivre); }
    .piece-check.done {
      background: var(--mousse);
      border-color: var(--mousse);
      color: var(--paper);
    }
    .piece-check svg { width: 12px; height: 12px; }
    .piece-row .label {
      font-size: 13.5px;
      color: var(--ink);
      font-weight: 500;
    }
    .piece-row.done .label { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--ink-mute); }
    .piece-row .who {
      font-size: 10.5px;
      color: var(--ink-mute);
      letter-spacing: 0.06em;
    }
    .piece-row.locked { opacity: 0.55; pointer-events: none; }

    .pieces-stage-warn {
      padding: 10px 14px;
      border-radius: 8px;
      background: rgba(176,90,44,0.08);
      border: 1px solid rgba(176,90,44,0.25);
      font-size: 12px;
      color: var(--cuivre-deep);
      display: flex; align-items: center; gap: 8px;
    }
    .pieces-stage-warn svg { width: 14px; height: 14px; }

    /* Form */
    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .form-field { display: flex; flex-direction: column; gap: 6px; }
    .form-field.large { grid-column: span 2; }
    .form-field label {
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      font-weight: 600;
      color: var(--ink-soft);
    }
    .form-field input,
    .form-field select,
    .form-field textarea {
      padding: 11px 14px;
      background: var(--bg-alt);
      border: 1px solid var(--line);
      border-radius: 8px;
      font-size: 14px;
      color: var(--ink);
      outline: none;
      transition: border-color 150ms ease, box-shadow 150ms ease;
      font-family: inherit;
    }
    .form-field input:focus,
    .form-field select:focus,
    .form-field textarea:focus {
      border-color: var(--cuivre);
      background: var(--paper);
    }
    .form-field textarea { resize: vertical; min-height: 80px; }
    .form-field input::placeholder { color: var(--ink-mute); }

    /* Toasts */
    .toast-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 200;
      display: flex; flex-direction: column;
      gap: 8px;
      max-width: 360px;
    }
    .toast {
      padding: 12px 18px;
      background: var(--ink);
      color: var(--paper);
      border-radius: 100px;
      font-size: 13px;
      font-weight: 500;
      box-shadow: 0 12px 30px -8px rgba(31,26,20,0.4);
      display: flex; align-items: center; gap: 10px;
      border: 1px solid rgba(255,255,255,0.05);
      animation: toastIn 220ms cubic-bezier(0.23,1,0.32,1) both;
    }
    .toast.success { background: linear-gradient(135deg, var(--mousse), var(--mousse-deep)); }
    .toast.warn    { background: linear-gradient(135deg, var(--cuivre), var(--cuivre-deep)); }
    .toast.info    { background: var(--ink); }
    .toast .icon {
      width: 18px; height: 18px;
      border-radius: 50%;
      background: rgba(255,255,255,0.15);
      display: grid; place-items: center;
      flex-shrink: 0;
    }
    .toast svg { width: 10px; height: 10px; }
    @keyframes toastIn {
      from { transform: translateY(12px) scale(0.97); opacity: 0; }
      to   { transform: none; opacity: 1; }
    }

    /* Action helpers */
    .row { display: flex; align-items: center; gap: 8px; }
    .between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .stack { display: flex; flex-direction: column; gap: 4px; }
    .grow { flex: 1; }

    /* Stage selector pill */
    .stage-selector {
      display: flex; gap: 4px;
      padding: 4px;
      background: var(--bg-alt);
      border-radius: 100px;
      border: 1px solid var(--line);
      flex-wrap: wrap;
    }
    .stage-opt {
      padding: 6px 12px;
      border-radius: 100px;
      font-size: 11px;
      font-weight: 500;
      color: var(--ink-soft);
      transition: color 150ms ease, background-color 150ms ease;
    }
    .stage-opt:hover { color: var(--ink); }
    .stage-opt.active { background: var(--ink); color: var(--paper); }

    /* Animations */
    @keyframes rise {
      from { opacity: 0; transform: translateY(10px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes pulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(107,126,85,0.4); }
      50%      { box-shadow: 0 0 0 6px rgba(107,126,85,0); }
    }

    /* ============================================================
       RESPONSIVE
       ============================================================ */
    @media (max-width: 1280px) {
      .nav { display: none; }
    }
    @media (max-width: 1100px) {
      .hero { grid-template-columns: 1fr; gap: 40px; }
      .dossier-grid { grid-template-columns: repeat(2, 1fr); }
      .split-two { grid-template-columns: 1fr; }
      .commission-row { grid-template-columns: 1.5fr 2fr 1fr auto; }
      .commission-row .comm-missing { display: none; }
    }
    @media (max-width: 768px) {
      .header-inner { grid-template-columns: 1fr auto; padding: 14px 20px; }
      main { padding: 32px 20px 60px; }
      .hero-title { font-size: 48px; }
      .section-head { grid-template-columns: 1fr; }
      .section-num { font-size: 56px; }
      .section-titles h2 { font-size: 28px; }
      .dossier-grid { grid-template-columns: 1fr; }
      .commission-row { grid-template-columns: 1fr; padding: 20px; }
      .commission-banner { grid-template-columns: 1fr; }
      .commission-banner-amount { text-align: left; }
      .planning-head, .gantt-row { grid-template-columns: 100px 1fr; }
      .equipe-cell { padding: 12px; }
      .equipe-cell .stat { display: none; }
      .footer-inner { grid-template-columns: 1fr; }
      .role-switcher .role-pill .label-full { display: none; }
      .form-grid { grid-template-columns: 1fr; }
      .form-field.large { grid-column: span 1; }
      .modal.side { width: 100%; }
    }

/* --- style block --- */

[v-cloak] { display: none; }
  .fade-enter-active, .fade-leave-active { transition: opacity 0.25s ease; }
  .fade-enter-from, .fade-leave-to { opacity: 0; }
  .toast-enter-active { transition: transform 220ms cubic-bezier(0.23,1,0.32,1), opacity 220ms ease; }
  .toast-leave-active { transition: transform 150ms ease, opacity 150ms ease; }
  .toast-enter-from, .toast-leave-to { opacity: 0; transform: translateY(20px); }