/* Feuille de style de l'app (chargée par base.html). Rien n'est écrit dans les pages : la politique de
   contenu n'autorise que les fichiers de /static. */
  /* Police hébergée par l'app (licence OFL, static/fonts/OFL.txt) : aucun appel à Google à l'affichage (RGPD). */
  @font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400 700; font-display: swap;
               src: url(/static/fonts/inter-tight-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
  @font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400 700; font-display: swap;
               src: url(/static/fonts/inter-tight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  :root {
    /* Couleurs EasyMedStat */
    --brand-900: #102D24; --brand-800: #16392E; --brand-700: #1E4A3C; --brand-600: #2A5C4C;
    --mint: #00EA99; --mint-strong: #00C784; --mint-ink: #007A52; --mint-50: #EEFFF6; --mint-100: #D2FBE8;
    --sand: #F4F2F1;
    /* Interface */
    --bg: #F6F7F5; --surface: #FFFFFF; --surface-2: #FAFBFA;
    --border: #E2E6E3; --border-strong: #C9D1CC;
    --text: #13221C; --text-2: #46534E; --muted: #75817C;
    --danger: #C8372D; --danger-50: #FDEEEC; --warning: #A86500; --warning-50: #FFF5E0;
    --info: #2563C9; --info-50: #EDF3FF;
    --radius: 10px; --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(16, 45, 36, .06);
    --shadow: 0 1px 3px rgba(16, 45, 36, .08), 0 4px 12px rgba(16, 45, 36, .04);
    --sidebar: 248px;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; }
  body { font: 14px/1.5 "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg);
         color: var(--text); -webkit-font-smoothing: antialiased; }
  a { color: var(--mint-ink); text-decoration: none; font-weight: 500; }
  a:hover { text-decoration: underline; }
  code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--sand); padding: 1px 5px; border-radius: 4px; }
  pre { white-space: pre-wrap; margin: 0; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
  .icon { flex: none; vertical-align: -3px; }

  /* --- Barre latérale ------------------------------------------------------------------ */
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--brand-900); color: #CFE0D8;
             display: flex; flex-direction: column; padding: 20px 12px; z-index: 10; }
  .brand { padding: 4px 10px 22px; }
  .brand img { display: block; width: 168px; height: auto; }
  .brand span { display: block; margin-top: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8FB3A5; font-weight: 600; }
  .nav-section { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #7FA294; font-weight: 600;
                 padding: 18px 12px 6px; }
  .nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 8px; color: #D5E5DE;
           font-weight: 500; text-decoration: none; margin-bottom: 2px; position: relative; }
  .nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
  .nav a.on { background: rgba(0, 234, 153, .12); color: #fff; }
  .nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--mint); }
  .nav a.on .icon { color: var(--mint); }
  .nav .count { margin-left: auto; background: rgba(255, 255, 255, .1); color: #fff; font-size: 11.5px; font-weight: 600;
                padding: 1px 8px; border-radius: 99px; }
  .nav a.on .count { background: var(--mint); color: var(--brand-900); }
  .sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
  .mode { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #CFE0D8; }
  .mode .dot { width: 8px; height: 8px; border-radius: 50%; background: #F5B83D; box-shadow: 0 0 0 3px rgba(245, 184, 61, .2); }
  .mode.live .dot { background: var(--mint); box-shadow: 0 0 0 3px rgba(0, 234, 153, .2); }
  .mode small { display: block; color: #7FA294; font-size: 11.5px; }
  .me { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .me .avatar { background: rgba(0, 234, 153, .15); color: var(--mint); }
  .me div { min-width: 0; font-size: 13px; color: #fff; font-weight: 600; }
  .me small { display: block; color: #7FA294; font-size: 11.5px; font-weight: 500; }
  .me button { margin-left: auto; background: none; border: 0; color: #8FB3A5; cursor: pointer; padding: 4px; border-radius: 6px; }
  .me button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
  fieldset.bare { border: 0; margin: 0; padding: 0; min-width: 0; }
  .simulate { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .simulate span { display: flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #F5B83D; font-weight: 600; margin-bottom: 6px; }
  .simulate select { background-color: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .15); color: #fff; font-size: 12.5px; padding: 6px 30px 6px 10px; }
  .simulate option { color: var(--text); }
  .main.solo { margin-left: 0; display: grid; place-items: center; padding: 40px 16px; }
  .solo-card { width: 100%; max-width: 440px; text-align: center; }
  .solo-brand { background: var(--brand-900); border-radius: var(--radius) var(--radius) 0 0; padding: 26px 20px 20px; }
  .solo-brand img { width: 190px; margin: 0 auto; display: block; }
  .solo-brand span { display: block; margin-top: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8FB3A5; font-weight: 600; }
  .solo-card .card { border-radius: 0 0 var(--radius) var(--radius); margin-top: 0; }
  .solo-card .card-body { padding: 28px; }
  .solo-card h2 { margin: 0 0 8px; }
  .btn-google { width: 100%; justify-content: center; padding: 11px 16px; font-size: 14.5px; margin-top: 18px; }

  /* --- Contenu ------------------------------------------------------------------------- */
  .main { margin-left: var(--sidebar); min-height: 100vh; }
  .page { max-width: 1240px; margin: 0 auto; padding: 28px 36px 64px; }
  .page-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
  .page-header h1 { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 0; letter-spacing: -.01em; }
  .page-header p { margin: 4px 0 0; color: var(--text-2); max-width: 760px; }
  .page-header .actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
  .crumb { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

  /* --- Cartes -------------------------------------------------------------------------- */
  .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
  .card-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
  .card-header h2 { font-size: 15px; font-weight: 650; margin: 0; }
  .card-header p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
  .card-header .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
  .card-body { padding: 20px; }
  .card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex;
                 align-items: center; gap: 10px; border-radius: 0 0 var(--radius) var(--radius); }
  .section-title { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 0 12px; }
  .section-title:first-child { margin-top: 0; }

  /* --- Boutons ------------------------------------------------------------------------- */
  .btn { display: inline-flex; align-items: center; gap: 7px; font: 600 13.5px/1 inherit; font-family: inherit; padding: 9px 14px;
         border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
         cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
  .btn:hover { background: var(--surface-2); border-color: #AEB9B3; text-decoration: none; }
  .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 234, 153, .35); }
  .btn-primary { background: var(--mint); border-color: var(--mint); color: var(--brand-900); }
  .btn-primary:hover { background: var(--mint-strong); border-color: var(--mint-strong); }
  .btn-dark { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
  .btn-dark:hover { background: var(--brand-700); border-color: var(--brand-700); }
  .btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
  .btn-ghost:hover { background: var(--sand); border-color: transparent; }
  .btn-danger { color: var(--danger); }
  .btn-danger:hover { background: var(--danger-50); border-color: #F1B9B3; }
  .btn-sm { padding: 6px 10px; font-size: 12.5px; }
  .btn-icon { padding: 7px; }

  /* --- Formulaires --------------------------------------------------------------------- */
  .field { display: block; margin-bottom: 16px; }
  .field > span, .label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text); }
  .field .hint, .hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; font-weight: 400; }
  input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], input[type=date], select, textarea {
    width: 100%; font: 14px/1.4 inherit; font-family: inherit; color: var(--text); padding: 9px 12px; background: var(--surface);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); transition: border-color .12s, box-shadow .12s; }
  textarea { resize: vertical; line-height: 1.5; }
  select { appearance: none; padding-right: 34px; cursor: pointer;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2375817C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
  input:focus, select:focus, textarea:focus { outline: none; border-color: var(--mint-strong); box-shadow: 0 0 0 3px rgba(0, 234, 153, .2); }
  input[readonly] { background: var(--surface-2); }
  input:disabled, select:disabled { background: var(--sand); color: var(--muted); cursor: not-allowed; }
  input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand-700); vertical-align: -3px; margin: 0; cursor: pointer; }
  .check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
  .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 20px; }
  .form-grid.tight { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .grow { flex: 1; min-width: 200px; }

  /* --- Alertes ------------------------------------------------------------------------- */
  .alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px;
           border: 1px solid; font-size: 13.5px; }
  .alert .icon { margin-top: 2px; }
  .alert > div { flex: 1; }
  .alert-success { background: var(--mint-50); border-color: #A8F0CF; color: #0B5A3D; }
  .alert-error { background: var(--danger-50); border-color: #F4C5C0; color: #8E2019; }
  .alert-warning { background: var(--warning-50); border-color: #F3D9A4; color: #7A4A00; }
  .alert-info { background: var(--info-50); border-color: #CADBFA; color: #1D4A96; }

  /* --- Badges et pastilles ------------------------------------------------------------- */
  .badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px;
           border-radius: 99px; background: var(--sand); color: var(--text-2); white-space: nowrap; }
  .badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
  .badge.plain::before { display: none; }
  .badge-green { background: var(--mint-50); color: #0B7A50; }
  .badge-amber { background: var(--warning-50); color: var(--warning); }
  .badge-red { background: var(--danger-50); color: var(--danger); }
  .badge-blue { background: var(--info-50); color: var(--info); }
  .badge-gray { background: var(--sand); color: var(--text-2); }
  .score { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font-weight: 700;
           font-size: 15px; font-variant-numeric: tabular-nums; }
  .score-go { background: var(--mint-50); color: #0B7A50; box-shadow: inset 0 0 0 1px #A8F0CF; }
  .score-maybe { background: var(--warning-50); color: var(--warning); box-shadow: inset 0 0 0 1px #F3D9A4; }
  .score-no { background: var(--danger-50); color: var(--danger); box-shadow: inset 0 0 0 1px #F4C5C0; }
  .avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
            background: var(--brand-700); color: #fff; font-weight: 600; font-size: 12.5px; letter-spacing: .02em; }
  .avatar.sm { width: 26px; height: 26px; font-size: 11px; }
  .person { display: flex; gap: 12px; align-items: center; min-width: 0; }
  .person strong { display: block; font-weight: 600; }
  .person span { color: var(--muted); font-size: 13px; }
  .table td.person-col { min-width: 250px; }

  /* --- Tableaux ------------------------------------------------------------------------ */
  .table-wrap { overflow-x: auto; }
  table.table { width: 100%; border-collapse: collapse; }
  .table th { text-align: left; font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
              background: var(--surface-2); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  .table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
  .table tr:last-child td { border-bottom: 0; }
  .table tbody tr:hover td { background: #FBFCFB; }
  .table .nowrap { white-space: nowrap; }
  .table .num { text-align: right; font-variant-numeric: tabular-nums; }
  .table td.check-col, .table th.check-col { width: 44px; padding-right: 0; }
  .table th a.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
  .table th a.sort-link:hover, .table th a.sort-link.active { color: var(--text); }
  .search-form { display: flex; gap: 8px; align-items: center; }
  .search-form input[type=search] { width: 260px; padding-top: 7px; padding-bottom: 7px; }

  /* --- Barre d'outils, onglets, filtres ------------------------------------------------ */
  .toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
  .tabs a { padding: 10px 14px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
  .tabs a:hover { color: var(--text); }
  .tabs a.on { color: var(--brand-900); border-bottom-color: var(--mint-strong); }
  .tabs .count { font-weight: 600; color: var(--muted); margin-left: 4px; }
  .chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
  .chips .label { margin: 0 4px 0 0; color: var(--muted); font-weight: 500; }
  .chip { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
          font-weight: 500; font-size: 13px; text-decoration: none; }
  .chip:hover { border-color: var(--brand-600); text-decoration: none; color: var(--text); }
  .chip.on { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
  .filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border);
             border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
  .filters .filter { display: flex; flex-direction: column; gap: 4px; }
  .filters .filter > span { font-size: 12px; font-weight: 600; color: var(--muted); }
  .filters select, .filters input[type=date] { width: auto; min-width: 150px; padding-top: 7px; padding-bottom: 7px; }
  .filters .custom-dates { display: flex; align-items: flex-end; gap: 12px; }
  .filters .custom-dates[hidden] { display: none; }
  .filters .filters-end { margin-left: auto; display: flex; align-items: center; gap: 10px; align-self: center; }
  .period-range { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }

  /* --- Statistiques -------------------------------------------------------------------- */
  .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
  .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
  .stat .label { color: var(--muted); font-weight: 500; font-size: 13px; margin: 0; display: flex; align-items: center; gap: 7px; }
  .stat .value { font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .stat .sub { color: var(--muted); font-size: 12.5px; }
  a.stat { display: block; color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
  a.stat:hover { border-color: var(--brand-600); text-decoration: none; }
  a.stat.on { border-color: var(--mint-strong); box-shadow: 0 0 0 3px rgba(0, 234, 153, .2); }
  .stat .value-rate { font-size: 14px; font-weight: 600; color: var(--brand-700); margin-left: 8px; letter-spacing: 0; }
  .stats.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  @media (max-width: 1100px) { .stats.stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 560px) { .stats.stats-4 { grid-template-columns: minmax(0, 1fr); } }
  .stat .rate { font-size: 13px; color: var(--text-2); margin-top: 2px; }
  .stat .rate strong { color: var(--text); }
  .stat.highlight { border-color: var(--mint-strong); background: linear-gradient(180deg, var(--mint-50), var(--surface) 70%); }
  a.stat.alert { border-color: var(--danger); background: var(--danger-50); }
  a.stat.alert .value, a.stat.alert .label { color: var(--danger); }
  .delta { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: 0; margin-left: 8px; vertical-align: 4px; white-space: nowrap; }
  .delta.up { color: var(--mint-ink); } .delta.down { color: var(--danger); } .delta.neutral { color: var(--muted); }
  .rate-bar { display: flex; align-items: center; gap: 8px; }
  .rate-bar .meter { width: 72px; margin-top: 0; flex: none; }
  .table.compare td, .table.compare th { white-space: nowrap; }
  .table.compare tfoot th, .table.compare tfoot td { padding: 12px 16px; border-top: 2px solid var(--border); border-bottom: 0; background: var(--surface-2); }
  .table.issues td { overflow-wrap: anywhere; }  /* longues adresses sans espace : la colonne Correction reste visible */
  .blocked-reason { margin-top: 4px; min-width: 220px; max-width: 320px; }
  .table.compare tfoot th { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
  .period-range small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
  .meter { height: 6px; border-radius: 99px; background: var(--sand); overflow: hidden; margin-top: 8px; }
  .meter > div { height: 100%; background: var(--mint-strong); border-radius: 99px; }
  .meter.full > div { background: var(--warning); }

  /* --- Divers -------------------------------------------------------------------------- */
  .muted { color: var(--muted); }
  .small { font-size: 12.5px; }
  .text-2 { color: var(--text-2); }
  .ok { color: #0B7A50; } .warn { color: var(--warning); } .err { color: var(--danger); }
  ul.clean { margin: 6px 0 0; padding-left: 18px; }
  ul.clean li { margin: 2px 0; }
  .empty { text-align: center; padding: 48px 20px; color: var(--muted); }
  .empty .icon { color: var(--border-strong); margin-bottom: 10px; }
  .empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
  details > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
  details > summary::-webkit-details-marker { display: none; }
  details > summary .icon { transition: transform .15s; color: var(--muted); }
  details[open] > summary .icon { transform: rotate(90deg); }
  .divider { height: 1px; background: var(--border); margin: 18px 0; }
  .kbd-list { display: grid; gap: 10px; }
  .contact-cell { font-size: 13px; max-width: 230px; }
  .contact-cell a { overflow-wrap: anywhere; }
  .row-actions { display: inline-flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 118px; }
  .row-actions .btn { justify-content: center; }
  .row-actions .minor { display: flex; gap: 6px; } .row-actions .minor .btn { flex: 1; }
  .contact-cell > div + div { margin-top: 4px; }
  .contact-cell a { font-weight: 500; }
  .kbd-list .row { flex-wrap: nowrap; align-items: flex-start; }
  .kbd-list .row .icon { margin-top: 3px; }
  .channel { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
  .channel .icon { padding: 5px; width: 26px; height: 26px; border-radius: 7px; background: var(--sand); color: var(--brand-700); }
  .channel.linkedin_connect .icon, .channel.linkedin_message .icon { background: #E8F1FB; color: #0A66C2; }
  .channel.email .icon { background: #FFF1E8; color: #D9541E; }
  .channel.call .icon { background: var(--mint-50); color: #0B7A50; }
  .timeline { display: flex; gap: 0; flex-wrap: wrap; align-items: center; }
  .timeline .step-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border);
                         border-radius: 99px; padding: 4px 10px 4px 5px; font-size: 12.5px; font-weight: 600; }
  .timeline .step-pill b { background: var(--brand-900); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 11px; }
  .timeline .sep { width: 14px; height: 1px; background: var(--border-strong); }

  /* --- Cadences ----------------------------------------------------------------------- */
  .cadence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
  .cadence-card { display: flex; flex-direction: column; margin: 0; }
  .cadence-card h2 a { font-weight: inherit; }
  .cadence-card h2 a:hover { color: var(--mint-ink); text-decoration: none; }
  .steps-list { display: grid; gap: 8px; }
  .step-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .step-line .day { flex: none; width: 44px; font-size: 12px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
  .step-line .channel { font-weight: 500; font-size: 13.5px; }
  .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .cadence-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); }
  .cadence-stats > div { padding: 12px 16px; display: flex; flex-direction: column; }
  .cadence-stats > div + div { border-left: 1px solid var(--border); }
  .cadence-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
  .cadence-stats span { font-size: 12px; color: var(--muted); }

  /* --- Éditeur de cadence ------------------------------------------------------------ */
  [hidden] { display: none !important; }
  .editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
  .editor-side { position: sticky; top: 20px; }
  .timeline-start { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-900); color: #fff; font-weight: 600;
                    font-size: 13px; padding: 6px 12px; border-radius: 99px; margin-left: 8px; }
  .step-wrap { position: relative; }
  .step-wrap.dragging { opacity: .45; }
  .step-wrap.dragging .step-card { box-shadow: 0 0 0 2px var(--mint-strong); }
  .delay-row { display: flex; align-items: center; padding: 10px 0 10px 24px; position: relative; }
  .delay-row::before { content: ""; position: absolute; left: 24px; top: 0; bottom: 0; border-left: 2px dashed var(--border-strong); }
  .delay-pill { position: relative; margin-left: 18px; display: inline-flex; align-items: center; gap: 8px; background: var(--surface);
                border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px 4px 10px; font-size: 13px; color: var(--text-2);
                box-shadow: var(--shadow-sm); }
  .delay-pill .icon { color: var(--muted); }
  .delay-input { width: 58px !important; padding: 3px 6px !important; text-align: center; font-weight: 600; }
  .step-card { margin-bottom: 0; border-left: 3px solid var(--border); }
  .step-card.cond-linkedin_accepted, .step-card.cond-call_answered { border-left-color: var(--mint-strong); }
  .step-card.cond-linkedin_not_accepted, .step-card.cond-call_not_answered { border-left-color: #E3A03A; }
  .step-head { gap: 10px; padding: 12px 16px; }
  .drag-handle { color: var(--border-strong); cursor: grab; display: inline-flex; padding: 4px 0; }
  .drag-handle:hover { color: var(--muted); }
  .drag-handle:active { cursor: grabbing; }
  .step-num { background: var(--brand-900) !important; }
  .channel-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--sand); color: var(--brand-700); }
  .channel-icon.linkedin_connect, .channel-icon.linkedin_message { background: #E8F1FB; color: #0A66C2; }
  .channel-icon.email { background: #FFF1E8; color: #D9541E; }
  .channel-icon.call { background: var(--mint-50); color: #0B7A50; }
  .channel-select { width: auto !important; font-weight: 600; border-color: transparent !important; padding: 6px 30px 6px 8px !important; background-color: transparent !important; }
  .channel-select:hover { background-color: var(--sand) !important; }
  .branch-row { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--muted); }
  .condition-select { width: auto !important; font-size: 13px !important; padding: 4px 30px 4px 8px !important; }
  .cond-linkedin_accepted .branch-row, .cond-call_answered .branch-row { background: var(--mint-50); color: #0B7A50; }
  .cond-linkedin_not_accepted .branch-row, .cond-call_not_answered .branch-row { background: var(--warning-50); color: var(--warning); }
  .retry-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px;
               border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 13.5px; }
  .task-inner { margin-top: 14px; }
  .task-fields:not(:has(summary:not([hidden]))) .task-inner { margin-top: 0; }
  .preview { margin-top: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
  .add-step { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 12px; padding: 14px 16px;
              border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); }
  .stop-rules .check { display: flex; margin-bottom: 10px; }
  .option-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .option-chip { position: relative; cursor: pointer; }
  .option-chip input { position: absolute; opacity: 0; pointer-events: none; }
  .option-chip span { display: inline-block; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border-strong);
                      font-size: 12.5px; font-weight: 500; color: var(--text-2); background: var(--surface); transition: all .12s; }
  .option-chip:hover span { border-color: var(--brand-600); }
  .option-chip input:checked + span { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
  .option-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 234, 153, .35); }
  .li-preview { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border-radius: 10px;
                background: var(--mint-50); border: 1px solid #A8F0CF; }
  .li-preview img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
  .li-preview .avatar { width: 48px; height: 48px; font-size: 15px; }
  .li-preview strong { font-size: 15px; }
  .hs-match { margin: -8px 0 18px; padding: 12px 16px; border-radius: 10px; background: #FFF6F1; border: 1px solid #F7D3C2; }
  .hs-match .icon { color: #E8613C; }
  .hs-match ul { margin-top: 6px; }
  @media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } .editor-side { position: static; } }

  @media (max-width: 900px) {
    .sidebar { position: static; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
    .brand { padding: 0 12px 0 4px; } .brand span, .nav-section, .sidebar-footer { display: none; }
    .nav { display: flex; flex-wrap: wrap; gap: 2px; } .nav a.on::before { display: none; }
    .main { margin-left: 0; } .page { padding: 20px 16px 48px; }
    .page-header { flex-wrap: wrap; } .page-header .actions { margin-left: 0; }
  }
  /* Nom d'un commercial (page Équipe) : champ sans bordure tant qu'on ne le modifie pas */
  .name-input { border-color: transparent; }
  .name-input:focus { border-color: var(--border-strong); }
  /* Formulaire atteint par un lien de la page (« Nouvelle cadence ») : brièvement mis en évidence */
  form.card:target { animation: target-flash 1.6s ease-out; }
  @keyframes target-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--mint), var(--shadow); } 100% { box-shadow: var(--shadow); } }
