
    :root {
      --orange: #F0A000; --orange-dark: #D08800; --dark: #1A1A1A;
      --white: #FFFFFF; --gray-100: #F8F8F8; --gray-200: #F0F0F0; --gray-300: #E0E0E0;
      --text-dark: #222; --text-muted: #666;
      --radius-sm: 6px; --radius-md: 12px;
      --shadow-sm: 0 2px 8px rgba(0,0,0,0.08); --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
      --font: 'Inter', -apple-system, sans-serif;
      --sidebar-w: 220px;
      --green: #22c55e; --red: #ef4444; --blue: #3b82f6; --purple: #a855f7;
      --yellow: #eab308;
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: var(--font); color: var(--text-dark); background: #f5f5f5; line-height: 1.5; overflow-x: hidden; }
    a { text-decoration: none; color: inherit; }
    button { cursor: pointer; border: none; background: none; font-family: inherit; }

    /* ── HEADER ── */
    .header {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      background: var(--dark); color: #fff; padding: 0 20px;
      height: 54px; display: flex; align-items: center; justify-content: space-between;
    }
    .header__left { display: flex; align-items: center; gap: 16px; }
    .header__logo { font-size: 1.1rem; font-weight: 900; }
    .header__logo .dot { color: var(--orange); }
    .header__badge { background: rgba(240,160,0,0.15); color: var(--orange); font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; }
    .header__right { display: flex; align-items: center; gap: 12px; }
    .header__user { font-size: 0.82rem; color: #aaa; }
    .notif-wrap { position: relative; }
    .notif-button { position: relative; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: #ddd; border: 1px solid #333; border-radius: 8px; }
    .notif-button:hover, .notif-button[aria-expanded="true"] { color: #fff; border-color: #555; background: #262626; }
    /* Pastille discrete : elle se pose dans le coin du bouton sans recouvrir la
       cloche. Au-dela de 9, on passe a « 9+ » plutot que d'etirer la pastille. */
    .notif-badge { position: absolute; top: -6px; right: -6px; min-width: 15px; height: 15px; padding: 0 3px; display: none; align-items: center; justify-content: center; border-radius: 8px; background: var(--orange); color: #fff; border: 2px solid var(--dark); font-size: 0.55rem; font-weight: 800; line-height: 1; letter-spacing: -0.2px; }
    .notif-badge.show { display: flex; }
    /* Une notification non lue se VOIT : la cloche passe au rouge et reste rouge
       tant qu'il reste du non-lu. L'animation, elle, ne joue qu'a l'ARRIVEE —
       une cloche qui bouge en permanence devient un meuble qu'on ne regarde plus. */
    .notif-button.has-unread { color: #fff; border-color: var(--red); background: rgba(239,68,68,0.18); }
    .notif-button.has-unread:hover, .notif-button.has-unread[aria-expanded="true"] { background: rgba(239,68,68,0.3); border-color: #ff6b6b; }
    .notif-badge.urgent { background: var(--red); }
    .notif-button.ringing svg { animation: notif-ring 0.9s cubic-bezier(.36,.07,.19,.97) 2; transform-origin: top center; }
    .notif-button.ringing { animation: notif-halo 0.9s ease-out 2; }
    @keyframes notif-ring {
      0%, 60%, 100% { transform: rotate(0); }
      5% { transform: rotate(16deg); } 15% { transform: rotate(-14deg); }
      25% { transform: rotate(11deg); } 35% { transform: rotate(-8deg); }
      45% { transform: rotate(5deg); } 52% { transform: rotate(-3deg); }
    }
    @keyframes notif-halo {
      0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.55); }
      100% { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
    }
    /* Qui a demande moins d'animation garde le rouge, et perd le mouvement. */
    @media (prefers-reduced-motion: reduce) {
      .notif-button.ringing svg, .notif-button.ringing { animation: none; }
    }
    .notif-panel { position: absolute; top: 42px; right: 0; width: min(380px, calc(100vw - 24px)); max-height: 460px; overflow: hidden; display: none; background: #fff; color: var(--text-dark); border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: var(--shadow-md); }
    .notif-panel.open { display: block; }
    .notif-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--gray-200); }
    .notif-panel__head strong { font-size: 0.92rem; }
    .notif-panel__head button { color: var(--orange-dark); font-size: 0.75rem; font-weight: 700; }
    .notif-list { max-height: 390px; overflow-y: auto; }
    .notif-item { width: 100%; display: block; padding: 13px 16px; text-align: left; background: #fff; border-bottom: 1px solid var(--gray-100); }
    .notif-item:hover { background: var(--gray-100); }
    .notif-item.unread { background: #fff9ed; }
    .notif-item__title { font-size: 0.84rem; font-weight: 750; }
    .notif-item__message { margin-top: 3px; color: var(--text-muted); font-size: 0.75rem; line-height: 1.35; overflow-wrap: anywhere; }
    .notif-item__date { margin-top: 5px; color: #aaa; font-size: 0.68rem; }
    .notif-empty { padding: 28px 18px; color: var(--text-muted); text-align: center; font-size: 0.82rem; }
    .header__back { font: inherit; font-size: 0.8rem; color: #666; padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid #333; background: transparent; cursor: pointer; transition: all 0.15s; }
    .header__back:hover { color: #fff; border-color: #555; }
    .mobile-nav-button { display: none; width: 34px; height: 34px; align-items: center; justify-content: center; color: #fff; border: 1px solid #333; border-radius: 6px; }
    .mobile-nav-overlay { display: none; }

    /* ── LAYOUT ── */
    .layout { display: flex; width: 100%; min-width: 0; padding-top: 54px; min-height: 100vh; }

    /* ── SIDEBAR ── */
    .sidebar {
      width: var(--sidebar-w); flex-shrink: 0;
      background: var(--white); border-right: 1px solid var(--gray-200);
      position: fixed; top: 54px; bottom: 0; left: 0; overflow: hidden;
      display: flex; flex-direction: column;
    }
    .sidebar-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 0; }
    .nav-group { margin-bottom: 4px; }
    .nav-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #bbb; padding: 8px 20px 4px; }
    .nav-item {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 20px; font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
      cursor: pointer; transition: all 0.12s; border-left: 3px solid transparent;
    }
    .nav-item:hover { background: var(--gray-100); color: var(--text-dark); }
    .nav-item.active { background: rgba(240,160,0,0.08); color: var(--orange); border-left-color: var(--orange); font-weight: 600; }
    .nav-item svg { flex-shrink: 0; }

    /* ── MAIN ── */
    .main {
      width: calc(100% - var(--sidebar-w)); min-width: 0; max-width: calc(100vw - var(--sidebar-w));
      margin-left: var(--sidebar-w); flex: 1; padding: 28px 32px;
    }

    /* ── SECTIONS ── */
    .section { display: none; }
    .section.active { display: block; }

    /* ── SECTION HEADER ── */
    .section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
    .section-title { font-size: 1.4rem; font-weight: 800; }
    .section-title span { color: var(--orange); }
    .section-sub { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }

    /* ── STAT CARDS ── */
    .stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
    .stat-card { background: var(--white); border-radius: var(--radius-md); padding: 16px 20px; box-shadow: var(--shadow-sm); }
    .stat-card__label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
    .stat-card__value { font-size: 1.6rem; font-weight: 800; }
    .stat-card__value.green { color: var(--green); }
    .stat-card__value.orange { color: var(--orange); }
    .stat-card__value.red { color: var(--red); }
    .stat-card__value.blue { color: var(--blue); }
    .hero-card__value.orange { color: var(--orange); }

    /* ── AUDIENCE DU SITE (GA4) ── */
    .site-analytics {
      margin-bottom: 28px; padding: 20px; border: 1px solid #fed7aa;
      border-radius: var(--radius-md); background: linear-gradient(135deg, #fffaf2 0%, #fff 52%, #f8fafc 100%);
      box-shadow: var(--shadow-sm);
    }
    .site-analytics__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
    .site-analytics__eyebrow { color: var(--orange-dark); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
    .site-analytics__title { margin-top: 3px; color: var(--text-dark); font-size: 1.05rem; font-weight: 800; }
    .site-analytics__sub { margin-top: 3px; color: var(--text-muted); font-size: 0.78rem; line-height: 1.45; }
    .site-analytics__badge {
      flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px;
      border: 1px solid var(--gray-300); border-radius: 999px; background: var(--white); color: var(--text-muted);
      font-size: 0.7rem; font-weight: 800;
    }
    .site-analytics__badge--ok { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
    .site-analytics__badge--error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
    .site-analytics .stats-row { margin-bottom: 16px; }
    .site-analytics .stat-card { border: 1px solid rgba(226,232,240,0.9); box-shadow: none; }
    .site-analytics__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .site-analytics__panel { min-width: 0; padding: 16px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--white); }
    .site-analytics__panel h4 { margin-bottom: 12px; font-size: 0.82rem; font-weight: 800; }
    .site-analytics__item { margin-top: 11px; }
    .site-analytics__item:first-child { margin-top: 0; }
    .site-analytics__item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 5px; font-size: 0.75rem; }
    .site-analytics__item-label { min-width: 0; overflow: hidden; color: var(--text-dark); text-overflow: ellipsis; white-space: nowrap; }
    .site-analytics__item-value { flex: 0 0 auto; color: var(--text-muted); font-weight: 800; }
    .site-analytics__track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--gray-200); }
    .site-analytics__fill { height: 100%; border-radius: inherit; background: var(--orange); }
    .site-analytics__fill--teal { background: #14b8a6; }
    .site-analytics__state { padding: 24px 16px; border: 1px dashed var(--gray-300); border-radius: 10px; background: rgba(255,255,255,0.72); color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; text-align: center; }
    .site-analytics__state--error { border-color: #fecaca; background: #fff7f7; color: #991b1b; }
    .site-analytics__state-action { display: flex; justify-content: center; margin-top: 13px; }
    .site-analytics__note { margin-top: 13px; color: var(--text-muted); font-size: 0.7rem; line-height: 1.45; }
    .crm-stats-divider { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 2px 0 16px; }
    .crm-stats-divider__title { font-size: 0.95rem; font-weight: 800; }
    .crm-stats-divider__sub { margin-top: 2px; color: var(--text-muted); font-size: 0.76rem; }

    /* ── TOOLBAR ── */
    .toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
    .toolbar input, .toolbar select {
      padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
      font-family: var(--font); font-size: 0.875rem; background: var(--white); outline: none;
    }
    .toolbar input { min-width: 200px; }
    .toolbar input:focus, .toolbar select:focus { border-color: var(--orange); }

    /* ── BUTTONS ── */
    .btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.875rem; font-weight: 600; transition: all 0.15s; }
    .btn-primary { background: var(--orange); color: var(--white); }
    .btn-primary:hover { background: var(--orange-dark); }
    .btn-secondary { background: var(--gray-200); color: var(--text-dark); }
    .btn-secondary:hover { background: var(--gray-300); }
    .btn-danger { background: #fee2e2; color: var(--red); }
    .btn-danger:hover { background: var(--red); color: #fff; }
    .btn-sm { padding: 5px 10px; font-size: 0.8rem; }
    .btn-ghost { color: var(--text-muted); padding: 5px 8px; }
    .btn-ghost:hover { color: var(--text-dark); }

    /* ── KANBAN ── */
    .kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px; }
    .kanban-col { flex-shrink: 0; width: 240px; }
    .kanban-col--add { width: 170px; cursor: pointer; opacity: 0.72; transition: opacity 0.12s; }
    .kanban-col--add:hover { opacity: 1; }
    .kanban-col__header--drag { cursor: grab; user-select: none; }
    .kanban-col__header--drag:active { cursor: grabbing; }
    .col-grip { opacity: 0.45; margin-right: 5px; letter-spacing: -1px; }
    .kanban-col__header--drag:hover .col-grip { opacity: 0.9; }
    .kanban-col.col-dragging { opacity: 0.45; }
    .kanban-col.col-drop-target { outline: 2px dashed var(--orange); outline-offset: 3px; border-radius: 10px; }
    .kanban-col__header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 14px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
      font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    }
    .kanban-col__header .count { background: rgba(0,0,0,0.12); padding: 1px 7px; border-radius: 20px; font-size: 0.72rem; }
    .kanban-col__body { background: rgba(0,0,0,0.04); border-radius: 0 0 var(--radius-sm) var(--radius-sm); min-height: 200px; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
    .col-new .kanban-col__header { background: #e0f2fe; color: #0369a1; }
    .col-contacted .kanban-col__header { background: #fef9c3; color: #92400e; }
    .col-booked .kanban-col__header { background: #dcfce7; color: #15803d; }
    .col-won .kanban-col__header { background: #d1fae5; color: #065f46; }
    .col-lost .kanban-col__header { background: #fee2e2; color: #991b1b; }

    .lead-card {
      position: relative;
      background: var(--white); border-radius: var(--radius-sm); padding: 12px 14px;
      box-shadow: var(--shadow-sm); cursor: grab; transition: transform 0.12s, box-shadow 0.12s;
      border: 1px solid var(--gray-200);
    }
    /* Déplacement tactile : le drag HTML5 est inerte au doigt — ce bouton ouvre
       un sélecteur d'étape. Masqué en desktop où le drag fonctionne. */
    .lead-card__move {
      display: none; position: absolute; top: 6px; right: 6px; z-index: 2;
      width: 38px; height: 38px; align-items: center; justify-content: center;
      border: 1px solid var(--gray-300); border-radius: 8px; background: var(--gray-100);
      color: var(--text-muted); font-size: 1rem;
    }
    #leadMovePicker { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,0.4); display: flex; align-items: flex-end; }
    .lead-move-sheet {
      background: var(--white); width: 100%; border-radius: 16px 16px 0 0;
      padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); max-height: 70vh; overflow-y: auto;
    }
    .lead-move-sheet__title { font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; }
    .lead-move-sheet__item {
      display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
      padding: 12px; border: none; border-radius: 10px; background: var(--gray-100);
      margin-bottom: 8px; font-size: 0.95rem; font-weight: 600; text-align: left; font-family: inherit;
    }
    .lead-move-sheet__item .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
    .lead-move-sheet__cancel { width: 100%; min-height: 44px; padding: 12px; border: none; background: transparent; color: var(--text-muted); font-size: 0.9rem; font-family: inherit; }
    .lead-card--hors-pub { border-left: 4px solid #7c3aed; background: linear-gradient(90deg, #f5f3ff 0, #fff 42px); }
    .lead-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
    .lead-card.dragging { opacity: 0.4; cursor: grabbing; }
    .kanban-col__body.drag-over { background: rgba(249,115,22,0.12); outline: 2px dashed var(--orange); outline-offset: -2px; }
    .lead-card__name { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
    .lead-card__email { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lead-card__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .lead-lane-divider { margin: 16px 2px 10px; padding: 6px 8px 0; border-top: 1px dashed var(--gray-300);
      color: var(--text-muted); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
    .badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }
    .badge-source { background: #f0f0f0; color: #555; }
    .badge-source--hors-pub { background: #ede9fe; color: #6d28d9; border: 1px solid #c4b5fd; }
    .lead-row--hors-pub td:first-child { box-shadow: inset 4px 0 0 #7c3aed; }
    .badge-date { background: #fef3c7; color: #92400e; }
    .badge-neutral { background: #f0f0f0; color: #555; }
    .badge-warning { background: #fef3c7; color: #92400e; }
    .badge-success { background: #dcfce7; color: #166534; }
    .badge-danger { background: #fee2e2; color: #991b1b; }
    .btn-success { background: #16a34a; color: #fff; }
    .btn-success:hover { background: #15803d; }
    .empty-state { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 32px; text-align: center; color: var(--text-muted); }
    .list-card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 16px 18px; margin-bottom: 12px; }
    .list-card__header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

    /* ── TABLE ── */
    .table-wrap { max-width: 100%; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
    table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
    th { background: var(--gray-100); padding: 10px 14px; text-align: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); white-space: nowrap; }
    td { padding: 12px 14px; border-top: 1px solid var(--gray-200); vertical-align: middle; }
    tr:hover td { background: var(--gray-100); }
    .td-actions { display: flex; gap: 4px; align-items: center; }

    .status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
    .s-new,.s-pending { background: #e0f2fe; color: #0369a1; }
    .s-approved,.s-invoiced { background: #fef3c7; color: #92400e; }
    .s-disputed { background: #fee2e2; color: #991b1b; }
    .s-contacted { background: #fef9c3; color: #92400e; }
    .s-booked { background: #dcfce7; color: #15803d; }
    .s-relance_1,.s-relance_2,.s-relance_3 { background: #f3e8ff; color: #7c3aed; }
    .s-won,.s-paid { background: #d1fae5; color: #065f46; }
    .s-lost,.s-failed,.s-cancelled { background: #fee2e2; color: #991b1b; }
    .s-already_paid { background: #dcfce7; color: #166534; }
    .s-follow_up,.s-no_show,.s-r2 { background: #f3e8ff; color: #7c3aed; }
    .s-overdue { background: #fef3c7; color: #d97706; }
    .s-refunded { background: #f0f0f0; color: #666; }
    .s-done { background: #dcfce7; color: #15803d; }

    /* ── FORM GRID ── */
    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .form-full { grid-column: 1 / -1; }
    .form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
    .form-group input, .form-group select, .form-group textarea {
      width: 100%; padding: 9px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
      font-family: var(--font); font-size: 0.875rem; outline: none; transition: border 0.15s;
    }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--orange); }
    .form-group textarea { resize: vertical; min-height: 70px; }

    /* ── MODAL ── */
    .modal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200;
      display: none; align-items: center; justify-content: center; padding: 20px;
    }
    /* Le détail d'un message ("Voir le contenu et l'activité") s'ouvre PAR-DESSUS
       la conversation e-mail déjà affichée — sans ça, même z-index + ordre DOM le
       fait apparaître derrière (un fragment du haut de la modale de détail passait
       sous l'en-tête de la conversation). */
    #emailPreviewModal { z-index: 260; }
    .modal-overlay.open { display: flex; }
    /* Sur un écran de portable (1366×768 → ~500 px de hauteur utile), le contenu
       d'une modale dépasse les 90vh. Tant que `overflow-y:auto` portait sur toute
       la boîte, c'est le PIED de modale qui sortait de l'écran — donc le bouton
       « Enregistrer ». Vécu le 2026-08-26 : une cliente est restée bloquée 4 min
       devant « Modifier le lead », puis devant un paiement, sans jamais voir le
       bouton de validation (665 px de contenu pour 381 px affichables).
       En colonne flex, l'en-tête et le pied restent fixes, seul le corps défile :
       le bouton d'action est visible quelle que soit la taille de l'écran. */
    .modal {
      background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
      width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
    }
    /* `.modal--email` empile un résumé et un en-tête de contenu entre l'en-tête et
       le corps : les épingler écraserait le corps à zéro sur un petit écran. Elle
       garde donc le défilement d'ensemble, elle seule. */
    .modal:not(.modal--email) {
      display: flex; flex-direction: column; overflow: hidden;
    }
    .modal:not(.modal--email) > * { flex: 0 0 auto; }
    .modal:not(.modal--email) > .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
    .modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 20px 24px; border-bottom: 1px solid var(--gray-200);
    }
    .modal-title { font-size: 1.05rem; font-weight: 800; }
    .modal-close { color: #aaa; font-size: 1.2rem; padding: 4px 8px; border-radius: var(--radius-sm); }
    .modal-close:hover { background: var(--gray-200); color: var(--text-dark); }
    .modal-body { padding: 20px 24px; }
    .modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 10px; justify-content: flex-end; }
    .modal--wide { max-width: 720px; }

    /* ── EMAIL MESSAGE DETAIL ── */
    .modal--email { width: min(100%, 960px); max-width: 100vw; max-height: 92vh; overflow-x: hidden; }
    .modal--email .modal-header { align-items: flex-start; }
    .modal--email .modal-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; color: #64748b; }
    .email-preview-heading { flex: 1 1 auto; min-width: 0; max-width: 100%; }
    .email-preview-back {
      display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0 0 7px; padding: 8px 2px;
      color: #64748b; font-size: 0.75rem; font-weight: 700; background: transparent;
    }
    .email-preview-back:hover { color: var(--text-dark); }
    .email-preview-eyebrow { color: #64748b; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
    .email-preview-subject { max-width: 100%; margin-top: 4px; font-size: 1.1rem; line-height: 1.35; overflow-wrap: anywhere; }
    .email-preview-summary { padding: 18px 24px 20px; background: #f8fafc; border-bottom: 1px solid var(--gray-200); }
    .email-preview-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
    .email-preview-badge {
      display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 4px 9px;
      border: 1px solid #dbe3ec; border-radius: 999px; background: #fff; color: #475569;
      max-width: 100%; font-size: 0.72rem; font-weight: 750; white-space: normal; overflow-wrap: anywhere;
    }
    .email-preview-badge--accepted { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
    .email-preview-badge--opened { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
    .email-preview-badge--clicked { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
    .email-preview-badge--failed { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
    .email-preview-badge--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
    .email-preview-badge--unsub { background: #fffbeb; border-color: #fde68a; color: #92400e; }
    .email-preview-meta-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); gap: 18px; align-items: start; }
    .email-preview-meta { min-width: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
    .email-preview-meta-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 10px 13px; border-top: 1px solid #eef2f7; }
    .email-preview-meta-row:first-child { border-top: 0; }
    .email-preview-meta-label { color: #64748b; font-size: 0.76rem; font-weight: 700; }
    .email-preview-meta-value { min-width: 0; color: #1e293b; font-size: 0.8rem; line-height: 1.45; overflow-wrap: anywhere; }
    .email-preview-meta-value strong { font-weight: 750; }
    .email-preview-muted { display: block; margin-top: 2px; color: #64748b; font-size: 0.72rem; line-height: 1.45; overflow-wrap: anywhere; }
    .email-preview-engagement { padding: 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
    .email-preview-section-title { color: #64748b; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
    .email-preview-event { display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 9px; padding-top: 11px; color: #334155; font-size: 0.77rem; line-height: 1.4; }
    .email-preview-event-dot { width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; background: #cbd5e1; }
    .email-preview-event-dot--accepted { background: #3b82f6; }
    .email-preview-event-dot--opened { background: #10b981; }
    .email-preview-event-dot--clicked { background: #8b5cf6; }
    .email-preview-event-dot--failed { background: #ef4444; }
    .email-preview-event-dot--warning { background: #f59e0b; }
    .email-preview-links { margin-top: 14px; padding-top: 13px; border-top: 1px solid #eef2f7; }
    .email-preview-link { display: block; margin-top: 8px; color: #2563eb; font-size: 0.74rem; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
    .email-preview-link:hover { text-decoration: underline; }
    .email-preview-truth { margin-top: 15px; color: #64748b; font-size: 0.69rem; line-height: 1.45; }
    .email-preview-content-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--gray-200); background: #fff; }
    .email-preview-content-note { color: #64748b; font-size: 0.72rem; text-align: right; }
    .email-preview-frame { width: 100%; height: 50vh; min-height: 360px; border: 0; display: block; background: #fff; }

    @media (max-width: 620px) {
      #emailPreviewModal { padding: 0; align-items: stretch; }
      .modal--email { width: 100%; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; overflow-x: hidden; }
      .modal--email .modal-header { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; padding: 10px 10px 12px 16px; }
      .modal--email .modal-close { width: 44px; height: 44px; margin: 0; }
      .email-preview-heading, .email-preview-subject { width: 100%; min-width: 0; max-width: 100%; }
      .email-preview-subject { font-size: 1.05rem; }
      .email-preview-summary { padding: 14px 16px 18px; }
      .email-preview-meta-grid { grid-template-columns: 1fr; }
      .email-preview-meta, .email-preview-engagement, .email-preview-meta-row, .email-preview-meta-value { min-width: 0; max-width: 100%; }
      .email-preview-meta-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 13px; }
      .email-preview-meta-label { font-size: 0.875rem; }
      .email-preview-meta-value { font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
      .email-preview-muted { margin-top: 4px; color: #64748b; font-size: 0.82rem; }
      .email-preview-event { font-size: 0.88rem; }
      .email-preview-truth { color: #475569; font-size: 0.78rem; }
      .email-preview-badge { font-size: 0.8rem; }
      .email-preview-content-head { align-items: flex-start; padding: 11px 16px; }
      .email-preview-content-note { max-width: 180px; color: #475569; font-size: 0.75rem; }
      .email-preview-frame { height: 54vh; min-height: 330px; }
      .modal--email .modal-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
    }

    /* ── NATIVE EMAIL CONVERSATION ── */
    .email-unread-badge {
      display: inline-flex; align-items: center; min-height: 24px; max-width: 100%; padding: 3px 9px;
      border: 1px solid #fed7aa; border-radius: 999px; background: #fff7ed; color: #9a3412;
      font-size: 0.7rem; font-weight: 800; line-height: 1.25; white-space: normal;
    }
    .email-unread-badge[hidden] { display: none; }
    .email-conversation-summary {
      padding: 14px; border: 1px solid #dbe3ec; border-radius: 10px; background: #f8fafc;
    }
    .email-conversation-summary__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .email-conversation-summary__title { min-width: 0; font-size: 0.9rem; font-weight: 800; overflow-wrap: anywhere; }
    .email-conversation-summary__meta { margin-top: 5px; color: #64748b; font-size: 0.76rem; line-height: 1.45; overflow-wrap: anywhere; }
    .email-conversation-summary__actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
    .email-conversation-summary__actions .btn { min-height: 44px; }
    .email-legacy-details { margin-top: 10px; border-top: 1px solid #e2e8f0; }
    .email-legacy-details > summary { min-height: 44px; display: flex; align-items: center; color: #475569; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
    .email-legacy-details__body { padding: 2px 0 4px; }

    #emailThreadModal { padding: 18px; align-items: stretch; }
    .email-thread-shell {
      width: min(100%, 980px); height: min(920px, calc(100dvh - 36px)); margin: auto;
      display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
      background: #f1f5f9; border-radius: 14px; box-shadow: 0 24px 70px rgba(15,23,42,0.28);
    }
    .email-thread-header {
      position: sticky; top: 0; z-index: 3; min-width: 0; display: grid;
      grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
      padding: 12px 18px; border-bottom: 1px solid #dbe3ec; background: #fff;
    }
    .email-thread-icon-btn {
      width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
      border: 1px solid #dbe3ec; border-radius: 9px; background: #fff; color: #475569; font-size: 1.05rem;
    }
    .email-thread-icon-btn:hover, .email-thread-icon-btn:focus-visible { border-color: var(--orange); color: var(--text-dark); outline: 2px solid rgba(240,160,0,0.2); outline-offset: 1px; }
    .email-thread-heading { min-width: 0; }
    .email-thread-eyebrow { color: #64748b; font-size: 0.67rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
    .email-thread-title { font-size: 1rem; font-weight: 850; line-height: 1.35; overflow-wrap: anywhere; }
    .email-thread-context { margin-top: 2px; color: #64748b; font-size: 0.73rem; line-height: 1.35; overflow-wrap: anywhere; }
    .email-thread-timeline {
      min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth;
      padding: 20px clamp(12px, 3vw, 30px) 28px;
    }
    .email-thread-timeline:focus-visible { outline: 3px solid rgba(240,160,0,0.35); outline-offset: -3px; }
    .email-thread-loading, .email-thread-empty, .email-thread-error {
      max-width: 620px; margin: 36px auto; padding: 22px; border: 1px solid #dbe3ec;
      border-radius: 10px; background: #fff; color: #475569; text-align: center; font-size: 0.86rem; line-height: 1.5;
    }
    .email-thread-error { border-color: #fecaca; background: #fff7f7; color: #991b1b; }
    .email-thread-date-separator { padding: 13px 0 8px; color: #64748b; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.07em; text-align: center; text-transform: uppercase; }
    .email-thread-unread-separator {
      display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center;
      margin: 15px 0; color: #9a3412; font-size: 0.72rem; font-weight: 850;
    }
    .email-thread-unread-separator::before, .email-thread-unread-separator::after { content: ''; height: 1px; background: #fdba74; }
    .email-thread-load-older { display: flex; justify-content: center; padding: 2px 0 12px; }
    .email-thread-load-older .btn { min-height: 44px; }
    .email-message-card {
      width: 100%; margin: 10px 0; padding: 16px 18px; border: 1px solid #dbe3ec;
      border-left: 4px solid #94a3b8; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,0.05);
    }
    .email-message-card--incoming { border-left-color: var(--orange); }
    .email-message-card--outgoing { border-left-color: #3b82f6; }
    /* WhatsApp/SMS : bulles alignées comme un vrai fil de chat — la position
       porte le sens (entrant à gauche, sortant à droite), plus besoin de lire
       le badge pour s'y retrouver. */
    .email-message-card--chat {
      width: fit-content; max-width: 86%; min-width: 230px;
      border-left-width: 1px; border-radius: 14px;
    }
    .email-message-card--chat.email-message-card--incoming {
      margin-right: auto; border-color: #e2e8f0; border-left-color: #e2e8f0;
      border-bottom-left-radius: 4px;
    }
    .email-message-card--chat.email-message-card--outgoing {
      margin-left: auto; background: #e9f9ef; border-color: #c3e9d2; border-left-color: #c3e9d2;
      border-bottom-right-radius: 4px;
    }
    .email-message-card--target { outline: 3px solid rgba(240,160,0,0.28); outline-offset: 2px; }
    .email-message-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
    .email-message-card__identity { min-width: 0; }
    .email-message-card__author { color: #1e293b; font-size: 0.84rem; font-weight: 800; overflow-wrap: anywhere; }
    .email-message-card__recipient { margin-top: 2px; color: #64748b; font-size: 0.71rem; overflow-wrap: anywhere; }
    .email-message-card__date { flex: 0 0 auto; color: #64748b; font-size: 0.7rem; text-align: right; }
    .email-message-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
    .email-message-label {
      display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid #dbe3ec;
      border-radius: 999px; background: #f8fafc; color: #475569; font-size: 0.66rem; font-weight: 800;
    }
    .email-message-label--incoming { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
    .email-message-label--outgoing { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
    .email-message-label--new { border-color: #fdba74; background: #ffedd5; color: #9a3412; }
    .email-message-label--failed { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
    .email-message-label--warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }
    .email-message-card__subject { margin-top: 12px; color: #1e293b; font-size: 0.86rem; font-weight: 750; overflow-wrap: anywhere; }
    .email-message-card__body { margin-top: 10px; color: #334155; font-size: 0.84rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
    .email-message-card__body--empty { color: #94a3b8; font-style: italic; }
    .email-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
    .email-attachment-chip {
      min-height: 44px; max-width: 100%; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px;
      border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; color: #334155;
      font-size: 0.72rem; font-weight: 700; text-align: left;
    }
    .email-attachment-chip:hover:not(:disabled), .email-attachment-chip:focus-visible:not(:disabled) { border-color: var(--orange); background: #fff; outline: 2px solid rgba(240,160,0,0.2); }
    .email-attachment-chip:disabled { cursor: not-allowed; opacity: 0.62; }
    .email-attachment-chip__name { min-width: 0; overflow-wrap: anywhere; }
    .email-attachment-chip__meta { color: #64748b; font-size: 0.66rem; font-weight: 600; }
    .email-thread-composer {
      position: sticky; bottom: 0; z-index: 3; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
      border-top: 1px solid #dbe3ec; background: #fff;
    }
    .email-template-tools { margin: 10px 0; padding: 10px 12px; border: 1px solid #dbe4ef; border-radius: 10px; background: #f8fafc; }
    .email-template-tools[hidden] { display: none; }
    .email-template-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
    .email-template-row select { flex: 1 1 220px; min-width: 0; min-height: 44px; max-width: 100%; padding: 9px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; font: inherit; font-size: 0.8rem; }
    .email-template-row button { min-height: 44px; }
    .email-template-help { margin-top: 6px; font-size: 0.75rem; line-height: 1.4; color: #64748b; }
    .email-thread-composer[aria-disabled="true"] { background: #f8fafc; }
    .email-thread-composer__blocked { margin-bottom: 10px; padding: 9px 11px; border: 1px solid #fde68a; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 0.75rem; line-height: 1.4; }
    .email-thread-composer__blocked[hidden] { display: none; }
    .email-thread-reply-hold {
      display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px;
      padding: 10px 11px; border: 1px solid #fdba74; border-radius: 8px; background: #fff7ed;
      color: #7c2d12; font-size: 0.72rem; line-height: 1.4;
    }
    .email-thread-reply-hold[hidden] { display: none; }
    .email-thread-reply-hold strong { display: block; margin-bottom: 2px; }
    .email-thread-reply-hold .btn { flex: 0 0 auto; min-height: 44px; }
    .email-thread-compose-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 8px; color: #64748b; font-size: 0.7rem; }
    .email-thread-compose-meta span { min-width: 0; overflow-wrap: anywhere; }
    .email-thread-subject, .email-thread-body {
      width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #1e293b; font-family: var(--font); outline: none;
    }
    .email-thread-subject { min-height: 44px; padding: 9px 11px; font-size: 0.79rem; font-weight: 650; }
    .email-thread-body { min-height: 78px; max-height: 220px; margin-top: 8px; padding: 10px 11px; resize: vertical; font-size: 0.84rem; line-height: 1.5; }
    .email-thread-subject:focus, .email-thread-body:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240,160,0,0.13); }
    .email-thread-subject:disabled, .email-thread-body:disabled { background: #f1f5f9; color: #94a3b8; }
    .email-thread-files { display: flex; gap: 7px; margin-top: 8px; overflow-x: auto; padding-bottom: 2px; }
    .email-thread-file {
      flex: 0 0 auto; min-height: 44px; max-width: 280px; display: inline-flex; align-items: center; gap: 6px;
      padding: 5px 8px; border: 1px solid #dbe3ec; border-radius: 7px; background: #f8fafc; font-size: 0.69rem;
    }
    .email-thread-file__name { min-width: 0; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .email-thread-file__remove { width: 44px; height: 44px; flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: #991b1b; }
    .email-thread-composer__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
    .email-thread-composer__actions { display: flex; align-items: center; gap: 8px; }
    .email-thread-attach-label, .email-thread-send { min-height: 44px; }
    .email-thread-attach-label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; color: #475569; font-size: 0.76rem; font-weight: 750; cursor: pointer; }
    .email-thread-attach-label[aria-disabled="true"] { cursor: not-allowed; opacity: 0.55; }
    .email-thread-send { padding-inline: 16px; }
    .email-thread-status { min-height: 18px; color: #64748b; font-size: 0.69rem; line-height: 1.35; }
    .email-thread-status.error { color: #b91c1c; }
    .email-thread-status.success { color: #166534; }

    @media (max-width: 768px) {
      #emailThreadModal { padding: 0; }
      .email-thread-shell { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
      .email-thread-header { padding: 8px 10px; }
      .email-thread-timeline { padding: 14px 12px 22px; }
      .email-thread-composer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
      .email-message-card { padding: 14px; }
    }
    @media (max-width: 520px) {
      .email-thread-compose-meta { grid-template-columns: 1fr; gap: 3px; }
      .email-thread-reply-hold { align-items: stretch; flex-direction: column; }
      .email-thread-reply-hold .btn { width: 100%; }
    }
    @media (max-width: 375px) {
      .email-thread-header { grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
      .email-thread-header > .email-unread-badge { grid-column: 2; justify-self: start; }
      .email-message-card__head { display: block; }
      .email-message-card__date { margin-top: 5px; text-align: left; }
      .email-thread-composer__footer { align-items: flex-start; flex-direction: column; }
      .email-thread-composer__actions, .email-thread-send { width: 100%; }
      .email-thread-attach-label, .email-thread-send { justify-content: center; flex: 1 1 0; }
    }
    @media (prefers-reduced-motion: reduce) {
      .email-thread-timeline { scroll-behavior: auto; }
    }

    /* ── ONGLET CONVERSATIONS (liste globale + fil) ── */
    /* Réutilise volontairement les classes .email-message-card / .email-thread-*
       du fil par lead : un seul jeu de styles pour un seul rail e-mail. */
    .conv-layout {
      display: grid; grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); gap: 14px;
      height: min(740px, calc(100dvh - 210px)); min-height: 430px;
    }
    @media (min-width: 900px) {
      #sec-conversations .conv-layout--expanded { height: var(--conv-expanded-height, max(430px, calc(100dvh - 210px))); min-height: 430px; }
      #sec-conversations .conv-pane--thread { grid-template-rows: auto minmax(0, 1fr) auto fit-content(50%); }
      #sec-conversations .conv-layout--expanded .conv-pane--thread { grid-template-rows: auto minmax(0, 1fr) auto fit-content(40%); }
      #sec-conversations .conv-composer {
        display: flex; flex-direction: column; min-height: 0; overflow: hidden;
      }
      #sec-conversations .conv-composer-fields { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #94a3b8 transparent; }
      #sec-conversations .conv-composer-fields::-webkit-scrollbar { width: 8px; }
      #sec-conversations .conv-composer-fields::-webkit-scrollbar-thumb { border-radius: 8px; background: #94a3b8; }
      #sec-conversations .conv-composer__footer { flex: 0 0 auto; }
    }
    .conv-pane {
      min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
      border: 1px solid #dbe3ec; border-radius: 12px; background: #fff; overflow: hidden;
    }
    .conv-pane--thread { background: #f1f5f9; grid-template-rows: auto minmax(0, 1fr) auto auto; position: relative; }
    .conv-filters { display: grid; gap: 8px; padding: 10px; border-bottom: 1px solid #e2e8f0; background: #fff; }
    .conv-view-tabs { display: flex; gap: 4px; }
    #convComposer[hidden], #convSmsNotice[hidden], .conv-filter-row[hidden] { display: none !important; }
    .conv-sms-notice { padding: 14px 16px; border-top: 1px solid #dbe4ef; color: #64748b; font-size: .82rem; line-height: 1.5; }
    .conv-sms-notice strong { display: block; color: #334155; }
    .conv-view-tabs .section-tab { flex: 1; min-width: 0; padding: 8px 6px; min-height: 44px; font-size: .78rem; }
    .conv-filter-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .conv-filter-row--statuses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .conv-unread-toggle { flex: 0 0 auto; min-height: 44px; padding: 7px 9px; border: 1px solid #dbe3ec; border-radius: 8px; font-size: .75rem; font-weight: 700; color: #475569; }
    .conv-filter-row--statuses .conv-unread-toggle { min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
    .conv-unread-toggle[aria-pressed="true"] { background: #fff4d9; border-color: #f0a000; color: #9a5700; }
    .conv-unread-toggle[aria-pressed="true"] .tab-badge { background: #ffe4a3; color: #7c4a00; }
    .conv-filter-row select { min-width: 0; width: 100%; min-height: 44px; border: 1px solid #dbe3ec; border-radius: 8px; padding: 7px; background: #fff; color: #334155; font-size: .76rem; }
    .conv-search { display: flex; align-items: center; border: 1px solid #dbe3ec; border-radius: 8px; overflow: hidden; }
    .conv-search input { flex: 1; min-width: 0; width: 100%; min-height: 44px; padding: 9px 10px; border: 0; background: transparent; font-size: 16px; }
    .conv-search button { flex: 0 0 44px; min-height: 44px; color: #64748b; font-size: 1.2rem; }
    .conv-search button[hidden] { display: none; }
    .conv-reply-label { margin-bottom: 5px; font-size: .72rem; font-weight: 750; color: #475569; }
    .conv-filters button:disabled { opacity: .55; cursor: wait; }
    .conv-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
    .conv-list-foot { padding: 8px 10px; border-top: 1px solid #e2e8f0; background: #fff; }
    .conv-list-foot[hidden] { display: none; }
    .conv-list-foot .btn { width: 100%; min-height: 44px; }
    .conv-item {
      width: 100%; display: block; padding: 11px 13px; border-bottom: 1px solid #eef2f7;
      background: #fff; color: inherit; text-align: left;
    }
    .conv-item:hover, .conv-item:focus-visible { background: #f8fafc; }
    .conv-item:focus-visible { outline: 2px solid rgba(240,160,0,0.35); outline-offset: -2px; }
    .conv-item--active { background: #fff7ed; box-shadow: inset 3px 0 0 var(--orange); }
    .conv-item--unread .conv-item__name, .conv-item--unread .conv-item__subject { font-weight: 850; }
    .conv-item__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
    .conv-item__row--meta { margin-top: 7px; justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
    .conv-item__name { min-width: 0; font-size: 0.82rem; font-weight: 750; overflow-wrap: anywhere; }
    .conv-item__date { flex: 0 0 auto; color: #64748b; font-size: 0.65rem; white-space: nowrap; }
    .conv-item__subject { margin-top: 3px; color: #1e293b; font-size: 0.78rem; overflow-wrap: anywhere; }
    .conv-item__snippet {
      margin-top: 3px; color: #64748b; font-size: 0.73rem; line-height: 1.4; overflow: hidden;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
    }
    .conv-item__direction { color: #64748b; font-size: 0.65rem; font-weight: 700; }
    .conv-channel-chip {
      display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border: 1px solid #dbe3ec;
      border-radius: 999px; background: #f8fafc; color: #475569; font-size: 0.62rem; font-weight: 800;
    }
    .email-message-card__delivery { margin: 8px 0; color: #475569; font-size: .7rem; line-height: 1.5; overflow-wrap: anywhere; }
    .conv-empty { padding: 26px 18px; color: #64748b; font-size: 0.8rem; line-height: 1.5; text-align: center; }
    .conv-empty--error { color: #991b1b; }
    .conv-thread-head {
      display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
      padding: 11px 15px; border-bottom: 1px solid #dbe3ec; background: #fff;
    }
    .conv-thread-head[hidden] { display: none; }
    .conv-thread-tools { display: flex; align-items: center; gap: 4px; }
    .conv-expand { min-height: 40px; padding: 7px 10px; border: 1px solid #dbe3ec; border-radius: 8px; background: #fff; color: #475569; font-size: .74rem; font-weight: 700; white-space: nowrap; }
    .conv-expand:hover { background: #f1f5f9; }
    .conv-expand:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
    @media (min-width: 900px) and (max-width: 1199px) { .conv-expand__label { display: none; } }
    .conv-lead-action { margin-top: 7px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
    .conv-lead-action[hidden] { display: none; }
    .conv-lead-action button { min-height: 36px; white-space: normal; }
    .conv-lead-lost { display: inline-block; padding: 5px 10px; border-radius: 8px; background: #fef2f2; color: #991b1b; font-size: .75rem; font-weight: 700; }
    .conv-lead-won { display: inline-block; padding: 5px 10px; border-radius: 8px; background: #ecfdf5; color: #065f46; font-size: .75rem; font-weight: 700; }
    .conv-thread-title { font-size: 0.95rem; font-weight: 850; line-height: 1.35; overflow-wrap: anywhere; }
    .conv-thread-context { margin-top: 2px; color: #64748b; font-size: 0.72rem; line-height: 1.35; overflow-wrap: anywhere; }
    .conv-thread-context-link { color: var(--primary, #f97316); font-weight: 600; text-decoration: none; }
    .conv-thread-context-link:hover { text-decoration: underline; }
    .conv-timeline { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px clamp(10px, 2.4vw, 22px) 22px; }
    .conv-composer { padding: 11px 15px calc(11px + env(safe-area-inset-bottom)); border-top: 1px solid #dbe3ec; background: #fff; }
    .conv-composer[data-disabled="true"] { background: #f8fafc; }
    .conv-composer__meta { margin-bottom: 6px; color: #64748b; font-size: 0.7rem; line-height: 1.4; overflow-wrap: anywhere; }
    .conv-composer__blocked {
      margin-bottom: 9px; padding: 9px 11px; border: 1px solid #fde68a; border-radius: 8px;
      background: #fffbeb; color: #92400e; font-size: 0.74rem; line-height: 1.4;
    }
    .conv-composer__blocked[hidden] { display: none; }
    .conv-hold-notice {
      margin-bottom: 9px; padding: 9px 11px; border: 1px solid #fdba74; border-radius: 8px;
      background: #fff7ed; color: #7c2d12; font-size: 0.72rem; line-height: 1.4;
    }
    .conv-hold-notice[hidden] { display: none; }
    .conv-composer__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; padding-right: 76px; }
    .conv-composer__footer .btn { min-height: 44px; padding-inline: 16px; }
    /* Le bloc pièces jointes se colle au bouton d'envoi : le statut garde la
       gauche, les deux actions restent groupées à droite. Les chips réutilisent
       telles quelles les classes .email-thread-file* du composer par lead. */
    .conv-composer__attach { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
    .conv-voice { margin-top: 10px; padding: 12px; border: 1px solid #bbdfcf; border-radius: 12px; background: #f2fbf6; }
    .conv-voice[hidden], .conv-voice [hidden], .conv-audio [hidden], #convReplySend[hidden], #convAttachLabel[hidden], #convReplyBodyLabel[hidden], #convReplyBody[hidden], #convReplyHelp[hidden] { display: none; }
    .conv-voice__row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
    .conv-voice__label { flex: 1; min-width: 100px; color: #17634b; font-size: .8rem; font-weight: 750; }
    .conv-voice__time { font-variant-numeric: tabular-nums; white-space: nowrap; color: #17634b; font-size: .85rem; font-weight: 750; }
    .conv-voice .btn { min-height: 44px; }
    .conv-voice__pause { border: 1px solid #167754; background: #167754; color: white; }
    .conv-voice__help { color: #475569; font-size: .72rem; line-height: 1.45; margin: 8px 0 0; }
    .conv-voice audio, .conv-audio audio { display: block; width: min(100%, 390px); height: 44px; margin: 10px 0; }
    .conv-audio { margin-top: 10px; }
    .conv-audio__error { color: #991b1b; font-size: .75rem; margin-top: 6px; }
    .conv-back { display: none; }
    .conv-refresh { width: 44px; height: 44px; font-size: 1.35rem; border-radius: 8px; color: #475569; }
    .conv-refresh:hover { background: #f1f5f9; }
    .conv-channels { display: flex; gap: 6px; margin-bottom: 8px; }
    .conv-channels[hidden], .conv-thread-notices [hidden], .conv-switch-confirm[hidden] { display: none; }
    .conv-channels .section-tab { min-height: 40px; }
    .conv-thread-notices { background: #f1f5f9; text-align: center; }
    .conv-new-messages { margin: 6px; padding: 9px 15px; min-height: 44px; background: #fff; border: 1px solid #cbd5e1; border-radius: 24px; font-size: .8rem; font-weight: 700; box-shadow: var(--shadow-sm); }
    .conv-refresh-error { padding: 8px; color: #92400e; background: #fffbeb; font-size: .75rem; }
    .conv-refresh-error button { text-decoration: underline; min-height: 44px; font-weight: 700; color: inherit; }
    .conv-switch-confirm { position: fixed; z-index: 450; left: 50%; top: 20%; transform: translateX(-50%); width: min(440px, calc(100vw - 28px)); padding: 20px; border: 1px solid #f0a000; border-radius: 14px; background: #fff; box-shadow: 0 12px 60px #0005; }
    .conv-switch-confirm p { margin: 10px 0 16px; font-size: .88rem; }
    .conv-switch-confirm > div { display: flex; gap: 10px; flex-wrap: wrap; }
    .conv-switch-confirm .btn { min-height: 44px; }
    @media (max-width: 899px) {
      #sec-conversations .conv-layout { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 190px); min-height: 320px; }
      #sec-conversations .conv-expand { display: none; }
      #sec-conversations .conv-pane--thread { display: none; }
      #sec-conversations .section-sub { font-size: .8rem; }
      body.conv-mobile-thread { overflow: hidden; }
      body.conv-mobile-thread > .header, body.conv-mobile-thread #setupBanner, body.conv-mobile-thread #encBanner, body.conv-mobile-thread #mcps, body.conv-mobile-thread .sidebar, body.conv-mobile-thread .mobile-nav-overlay { display: none !important; }
      body.conv-mobile-thread .main { padding: 0 !important; margin: 0 !important; }
      body.conv-mobile-thread #sec-conversations { position: fixed; z-index: 180; left: 0; right: 0; top: var(--conv-viewport-top, 0px); height: var(--conv-viewport-height, 100dvh); background: #f1f5f9; }
      body.conv-mobile-thread #sec-conversations > .section-header { display: none; }
      body.conv-mobile-thread #sec-conversations .conv-layout { display: block; height: 100%; min-height: 0; }
      body.conv-mobile-thread #sec-conversations .conv-pane:not(.conv-pane--thread) { display: none; }
      body.conv-mobile-thread #sec-conversations .conv-pane--thread { display: grid; height: 100%; border: 0; border-radius: 0; grid-template-rows: auto minmax(40px, 1fr) auto auto; }
      body.conv-mobile-thread .conv-thread-head { grid-template-columns: auto minmax(0, 1fr) auto; padding: calc(6px + env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left)); gap: 7px; }
      body.conv-mobile-thread .conv-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 5px; color: #a76000; font-weight: 700; font-size: .85rem; }
      body.conv-mobile-thread .conv-thread-head .email-thread-eyebrow, body.conv-mobile-thread #convThreadUnread { display: none; }
      body.conv-mobile-thread .conv-thread-title { font-size: .93rem; }
      body.conv-mobile-thread .conv-thread-context { max-height: 2.7em; overflow: hidden; font-size: .68rem; }
      body.conv-mobile-thread .conv-timeline { padding: 12px max(10px, env(safe-area-inset-left)); -webkit-overflow-scrolling: touch; }
      body.conv-mobile-thread .conv-composer { display: flex; flex-direction: column; min-height: 0; max-height: min(360px, calc(var(--conv-viewport-height, 100dvh) - 140px)); overflow: hidden; padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
      body.conv-mobile-thread .conv-composer-fields { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
      body.conv-mobile-thread .conv-composer__footer { flex: 0 0 auto; padding-right: 0; gap: 8px; }
      body.conv-mobile-thread .conv-composer__footer > div:first-child { flex: 1 1 100%; }
      body.conv-mobile-thread #convReplyHelp { display: none; }
      body.conv-mobile-thread .conv-composer__attach { margin-left: 0; }
      body.conv-mobile-thread #convReplySend { margin-left: auto; }
      body.conv-mobile-thread #convReplyBody { min-height: 64px; max-height: 130px; resize: none; font-size: 16px; margin-top: 4px; }
      body.conv-mobile-thread .conv-composer input, body.conv-mobile-thread .conv-composer select { max-width: 100%; font-size: 16px; }
      body.conv-mobile-thread .conv-hold-notice, body.conv-mobile-thread .conv-composer__meta { font-size: .68rem; margin-bottom: 6px; }
    }

    /* ── LEAD DETAIL ── */
    .lead-quick-call { margin:12px 0 16px;padding:14px;border:1px solid #dbe4ee;border-radius:12px;background:#f8fafc; }
    .lead-quick-call__heading { display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:5px; }
    .lead-quick-call__heading strong { font-size:.88rem;color:#0f172a; }
    .lead-quick-call__meta, .lead-quick-call__hint { font-size:.76rem;color:#64748b;line-height:1.5; }
    .lead-quick-call__results { display:flex;gap:8px;flex-wrap:wrap;margin-top:10px; }
    .lead-quick-call__results .btn { flex:1 1 130px;min-height:42px;white-space:normal;background:#fff;border:1px solid #cbd5e1;color:#334155; }
    .lead-quick-call__results .btn[data-call-result="joint"] { color:#166534;border-color:#86b69a; }
    .lead-quick-call__results .btn[data-call-result="numero_invalide"] { color:#991b1b; }
    .lead-quick-call__results .btn[aria-pressed="true"] { border-color:#d97706;background:#fff7ed;box-shadow:0 0 0 1px #d97706; }
    .lead-quick-call .btn:focus-visible { outline:3px solid #2563eb;outline-offset:3px; }
    .lead-quick-call__confirmation { margin-top:12px;padding:12px;border:1px solid #fdba74;border-radius:8px;background:#fff7ed;color:#9a3412;font-size:.82rem;line-height:1.5; }
    .lead-quick-call__confirmation[hidden] { display:none; }
    .lead-quick-call__confirm-actions { display:flex;gap:8px;flex-wrap:wrap;margin-top:9px; }
    @media(max-width:480px) { .lead-quick-call { padding:12px; } .lead-quick-call__results .btn { flex-basis:calc(50% - 4px);font-size:.78rem; } }
    .lead-quick-call--card { margin:10px 0;padding:0;border:0;border-radius:0;background:transparent;cursor:default; }
    .lead-quick-call--card .lead-quick-call__results { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:0; }
    .lead-quick-call--card .lead-quick-call__results .btn { min-width:0;min-height:38px;padding:6px 4px;font-size:.7rem;line-height:1.25;justify-content:center; }
    .lead-quick-call--card .lead-quick-call__hint { margin-top:6px;font-size:.66rem;line-height:1.35; }
    .lead-quick-call--card .lead-quick-call__confirmation { padding:9px;font-size:.75rem; }
    .lead-quick-call--card .lead-quick-call__confirm-actions .btn { width:100%;white-space:normal;min-height:38px;font-size:.72rem; }
    .lead-callback-badge { display:inline-flex;flex-direction:column;align-items:flex-start;gap:4px;max-width:100%;margin:4px 0 7px;padding:8px 10px;border-radius:9px;border:1px solid #f5bf62;background:#fff0d4;color:#92400e;font:inherit;font-size:.75rem;text-align:left;line-height:1.4;white-space:normal;cursor:pointer; }
    .lead-callback-badge small { font-size:.68rem;font-weight:500; }
    .lead-callback-badge:focus-visible { outline:3px solid #2563eb;outline-offset:3px; }
    .lead-callback-badge:disabled { opacity:.7;cursor:wait; }
    .lead-callback-badge--done { border-color:#86b69a;background:#ecfdf3;color:#166534;cursor:default; }
    .detail-section { margin-bottom: 18px; }
    /* ── Où en est ce contact : position dans la séquence + parcours ── */
    .pc-seq { border:1px solid #e8e5e0; border-radius:10px; padding:12px 14px; margin-bottom:10px; }
    .pc-tete { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; margin-bottom:9px; }
    .pc-nom { font-weight:700; font-size:.88rem; }
    .pc-etat { font-size:.64rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:3px 9px; border-radius:20px; }
    .pc-etat.est-encours { background:#e8f5ee; color:#1d7a4c; }
    .pc-etat.est-pause { background:#fdf4e3; color:#8a5a00; }
    .pc-etat.est-bloque { background:#fbeeed; color:#b3261e; }
    .pc-etat.est-fini { background:#f1efec; color:#7a7268; }
    .pc-quand-seq { margin-left:auto; font-size:.74rem; color:#8a8378; }
    .pc-pas { display:flex; gap:10px; align-items:baseline; padding:7px 0; border-top:1px solid #f1efec; font-size:.84rem; }
    .pc-pas:first-of-type { border-top:0; }
    .pc-puce { width:16px; flex-shrink:0; text-align:center; color:#bdb6aa; }
    .pc-pas.est-passe .pc-puce { color:#1d7a4c; }
    .pc-pas.est-courante { background:#fbf2de; margin:0 -9px; padding:7px 9px; border-radius:8px; border-top:0; }
    .pc-pas.est-courante .pc-puce { color:#a87209; }
    .pc-pas.est-avenir { color:#8a8378; }
    .pc-quoi { flex:1; min-width:0; overflow-wrap:anywhere; }
    .pc-preuve { font-size:.74rem; color:#8a8378; margin-top:2px; }
    .pc-preuve.est-rouge { color:#b3261e; }
    .pc-quand { font-size:.73rem; color:#8a8378; white-space:nowrap; }
    .pc-attente { font-size:.73rem; color:#b5aea0; padding:2px 0 2px 26px; }
    .detail-section h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
    .detail-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 5px 0; border-bottom: 1px solid var(--gray-100); }
    .detail-row span:first-child { color: var(--text-muted); }
    .detail-row span:last-child { font-weight: 500; text-align: right; }
    .note-item { background: var(--gray-100); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 0.83rem; margin-bottom: 8px; white-space: pre-wrap; }
    .note-item__meta { font-size: 0.73rem; color: var(--text-muted); margin-top: 4px; }
    .note-form { display: flex; gap: 8px; margin-top: 10px; }
    .note-form textarea { flex: 1; min-height: 60px; padding: 8px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.83rem; resize: none; outline: none; }
    .note-form textarea:focus { border-color: var(--orange); }

    /* ── COLOR DOTS for tags ── */
    .color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
    .dot-red { background: #ef4444; } .dot-orange { background: #f97316; } .dot-yellow { background: #eab308; }
    .dot-green { background: #22c55e; } .dot-blue { background: #3b82f6; } .dot-purple { background: #a855f7; }
    .dot-pink { background: #ec4899; } .dot-gray { background: #9ca3af; }

    /* ── CHART ── */
    .chart-wrap { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 20px; }
    .chart-wrap h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 14px; }
    canvas { display: block; }

    /* ── VIDEO CARDS ── */
    .video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
    .video-card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
    .video-thumb { width: 100%; height: 140px; object-fit: cover; background: var(--gray-200); display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 2rem; }
    .video-card__body { padding: 14px 16px; }
    .video-card__title { font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
    .video-card__meta { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 10px; }
    .video-card__actions { display: flex; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--gray-200); }

    /* ── P&L ── */
    .pnl-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
    .pnl-card { background: var(--white); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); text-align: center; }
    .pnl-card__amount { font-size: 1.8rem; font-weight: 900; }
    .pnl-card__label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

    /* ── COMPTABILITÉ CABINET ── */
    .acc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
    .acc-kpi { min-width: 0; background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; padding: 16px; }
    .acc-kpi__label { color: var(--text-muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
    .acc-kpi__value { color: var(--text-dark); font-size: 1.55rem; font-weight: 800; line-height: 1.2; margin-top: 5px; overflow-wrap: anywhere; }
    .acc-kpi__meta { color: var(--text-muted); font-size: 0.75rem; margin-top: 5px; }
    .acc-kpi--available { border-top: 3px solid #15803d; }
    .acc-kpi--attention { border-top: 3px solid #b45309; }
    .acc-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr); gap: 16px; margin-bottom: 16px; }
    .acc-grid--equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .acc-panel { min-width: 0; background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; padding: 18px; }
    .acc-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    .acc-panel__title { font-size: 0.92rem; font-weight: 800; }
    .acc-panel__sub { color: var(--text-muted); font-size: 0.76rem; margin-top: 2px; }
    .acc-score { min-width: 46px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gray-300); border-radius: 6px; font-size: 0.82rem; font-weight: 800; }
    .acc-action { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--gray-200); }
    .acc-action:first-child { border-top: 0; padding-top: 0; }
    .acc-action__dot { width: 8px; height: 8px; border-radius: 50%; background: #b45309; }
    .acc-action--high .acc-action__dot { background: #dc2626; }
    .acc-action__label { font-size: 0.84rem; font-weight: 700; }
    .acc-action__sub { color: var(--text-muted); font-size: 0.73rem; margin-top: 2px; }
    .acc-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--gray-200); border-radius: 8px; overflow: hidden; margin-bottom: 16px; background: var(--white); }
    .acc-flow__step { min-width: 0; padding: 15px 16px; border-left: 1px solid var(--gray-200); }
    .acc-flow__step:first-child { border-left: 0; }
    .acc-flow__number { font-size: 1.25rem; font-weight: 800; }
    .acc-flow__label { color: var(--text-muted); font-size: 0.73rem; margin-top: 2px; }
    .acc-progress { height: 8px; overflow: hidden; background: var(--gray-200); border-radius: 4px; }
    .acc-progress__bar { height: 100%; background: #15803d; border-radius: 4px; transition: width 0.25s; }
    .acc-progress__bar--orange { background: var(--orange-dark); }
    .acc-goal__value { font-size: 1.35rem; font-weight: 800; margin: 8px 0 10px; }
    .acc-monthly { display: grid; grid-template-columns: repeat(12, minmax(18px, 1fr)); gap: 7px; height: 170px; align-items: end; padding-top: 12px; }
    .acc-month { min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
    .acc-month__bars { width: 100%; height: 130px; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
    .acc-month__bar { width: min(12px, 45%); min-height: 2px; background: #15803d; border-radius: 3px 3px 0 0; }
    .acc-month__bar--expense { background: #f0a000; }
    .acc-month__label { color: var(--text-muted); font-size: 0.62rem; }
    .acc-watch { padding: 12px 0; border-top: 1px solid var(--gray-200); }
    .acc-watch:first-child { padding-top: 0; border-top: 0; }
    .acc-watch__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
    .acc-watch__label { font-size: 0.82rem; font-weight: 700; }
    .acc-watch__value { color: var(--text-muted); font-size: 0.74rem; text-align: right; }
    .acc-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .acc-settings .form-group label { font-size: 0.74rem; }
    .acc-settings-note { color: var(--text-muted); font-size: 0.72rem; line-height: 1.45; margin-top: 10px; }
    .acc-table-empty { color: var(--text-muted); font-size: 0.82rem; padding: 18px 0; text-align: center; }
    .acc-privacy { display: flex; align-items: flex-start; gap: 9px; color: var(--text-muted); font-size: 0.74rem; padding: 12px 0 4px; }
    .acc-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .acc-toolbar select { min-height: 34px; padding: 6px 10px; border: 1px solid var(--gray-300); border-radius: 6px; background: var(--white); font: inherit; font-size: 0.82rem; }
    .acc-icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gray-300); border-radius: 6px; background: var(--white); color: var(--text-muted); }
    .acc-icon-btn:hover { color: var(--text-dark); border-color: #bbb; }
    @media (max-width: 1100px) {
      .acc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .acc-grid, .acc-grid--equal { grid-template-columns: 1fr; }
    }
    @media (max-width: 620px) {
      .site-analytics { padding: 16px; }
      .site-analytics__head { flex-direction: column; }
      .site-analytics__grid { grid-template-columns: 1fr; }
      .acc-kpis { grid-template-columns: 1fr; }
      .acc-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .acc-flow__step:nth-child(3) { border-left: 0; border-top: 1px solid var(--gray-200); }
      .acc-flow__step:nth-child(4) { border-top: 1px solid var(--gray-200); }
      .acc-settings { grid-template-columns: 1fr; }
      .acc-monthly { gap: 3px; }
      .acc-action { grid-template-columns: 10px minmax(0, 1fr); }
      .acc-action .btn { grid-column: 2; justify-self: start; }
    }

    /* ── MONTH BAR ── */
    .bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-bottom: 20px; position: relative; }
    .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; justify-content: flex-end; }
    .bar-stack { width: 100%; display: flex; flex-direction: column; gap: 1px; }
    .bar-rev { background: var(--orange); border-radius: 3px 3px 0 0; min-height: 2px; transition: height 0.3s; }
    .bar-exp { background: #fee2e2; border-radius: 3px 3px 0 0; min-height: 2px; }
    .bar-label { font-size: 0.6rem; color: var(--text-muted); white-space: nowrap; margin-top: 4px; }

    /* ── EMPTY STATE ── */
    .empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
    .empty__icon { font-size: 2.5rem; margin-bottom: 12px; }
    .empty__text { font-size: 0.9rem; }

    /* ── TOAST ── */
    .toast { position: fixed; bottom: 24px; right: 24px; background: var(--dark); color: #fff; padding: 12px 20px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; z-index: 999; transform: translateY(20px); opacity: 0; transition: all 0.25s; pointer-events: none; }
    .toast.show { transform: translateY(0); opacity: 1; }
    .toast.success { background: #166534; }
    .toast.error { background: #991b1b; }

    /* ── SIDEBAR FOOTER ── */
    .sidebar-footer {
      flex-shrink: 0;
      padding: 10px 14px; border-top: 1px solid var(--gray-200);
      background: var(--white); display: flex; align-items: center; gap: 10px;
    }
    .sidebar-footer__avatar {
      width: 32px; height: 32px; border-radius: 50%;
      background: var(--orange); color: #fff;
      font-size: 0.76rem; font-weight: 800;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .sidebar-footer__avatar.is-morgane-logo { background: #f7f4ef; border: 1px solid #cbd9cc; }
    .sidebar-footer__avatar.is-morgane-logo img { display: block; width: 28px; height: 28px; object-fit: contain; }
    .sidebar-footer__name { font-size: 0.82rem; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
    .sidebar-footer__role { font-size: 0.68rem; color: var(--text-muted); }

    /* ── STAT CARD ICON ── */
    .stat-card--icon { display: flex; align-items: center; gap: 14px; }
    .stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .stat-icon.green { background: rgba(34,197,94,0.12); color: var(--green); }
    .stat-icon.orange { background: rgba(240,160,0,0.12); color: var(--orange); }
    .stat-icon.red { background: rgba(239,68,68,0.12); color: var(--red); }
    .stat-icon.blue { background: rgba(59,130,246,0.12); color: var(--blue); }
    .stat-icon.purple { background: rgba(168,85,247,0.12); color: var(--purple); }
    .stat-card--icon .stat-card__label { margin-bottom: 2px; }
    .stat-card--icon .stat-card__value { font-size: 1.4rem; }

    /* ── MONTH NAV ── */
    .month-nav { display: flex; align-items: center; gap: 8px; }
    .month-nav__btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--gray-300); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); background: var(--white); transition: all 0.12s; font-size: 0.8rem; }
    .month-nav__btn:hover { border-color: var(--orange); color: var(--orange); }
    .month-nav__label { font-size: 0.88rem; font-weight: 600; color: var(--text-dark); min-width: 110px; text-align: center; }

    .month-nav { flex-wrap: wrap; }
    .month-nav__btn:disabled { opacity: 0.4; cursor: default; }
    .month-nav__input { max-width: 165px; min-width: 0; padding: 5px 8px; border: 1px solid var(--gray-300); border-radius: 6px; font: inherit; font-size: 0.8rem; background: #fff; }
    .monthly-revenue { padding: 20px 24px; margin: 0 0 24px; border: 1px solid var(--gray-200); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-sm); }
    .monthly-revenue__head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
    .monthly-revenue__title { font-size: 1rem; font-weight: 800; }
    .monthly-revenue__note { margin-top: 4px; color: var(--text-muted); font-size: 0.78rem; }
    .monthly-revenue__total { text-align: right; font-size: 0.75rem; color: var(--text-muted); }
    .monthly-revenue__total strong { display: block; color: var(--text-dark); font-size: 1.3rem; }
    .monthly-revenue table { width: 100%; min-width: 0; }
    .monthly-revenue th, .monthly-revenue td { padding: 10px 12px; }
    .monthly-revenue tr.is-selected { background: #fff8e8; }
    .monthly-revenue tr.is-future { color: var(--text-muted); }
    .monthly-revenue__amount { font-weight: 750; white-space: nowrap; }
    .monthly-revenue__badge { display: inline-block; margin-left: 7px; padding: 2px 6px; border-radius: 5px; color: #936100; background: #fff0cc; font-size: 0.66rem; }
    .monthly-revenue__state { padding: 22px 0; color: var(--text-muted); font-size: 0.85rem; }
    .monthly-revenue__state--error { color: #991b1b; }
    #heroRevenueLabel { font-size: 0.85rem; text-transform: none; letter-spacing: 0; }
    #heroRevenueStatus { font-size: 0.78rem; color: var(--text-muted); }
    #heroRevenueStatus[data-error="true"] { color: #991b1b; }
    @media (max-width: 600px) {
      .monthly-revenue { padding: 16px 12px; }
      .monthly-revenue__total { text-align: left; }
      .monthly-revenue thead { display: none; }
      .monthly-revenue tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 5px; border-bottom: 1px solid var(--gray-200); }
      .monthly-revenue td { display: block; padding: 0; border: 0; white-space: normal; }
      .monthly-revenue td:first-child { font-weight: 600; }
      .monthly-revenue td:nth-child(2), .monthly-revenue td:last-child { text-align: right; }
      .monthly-revenue td:nth-child(3) { font-size: 0.75rem; color: var(--text-muted); align-self: center; }
      .monthly-revenue__badge { display: block; width: fit-content; margin: 3px 0 0; }
      .monthly-revenue .btn { font-size: 0.72rem; padding: 6px 8px; }
    }

    /* ── GRAPHIQUES BUTTON ── */
    .btn-graphiques { background: var(--orange); color: var(--white); border-radius: 8px; padding: 7px 14px; font-size: 0.82rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
    .btn-graphiques:hover { background: var(--orange-dark); }

    /* ── HERO CARDS (dashboard) ── */
    .hero-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }
    .hero-card { background: var(--white); border-radius: var(--radius-md); padding: 22px 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; }
    .hero-card__label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
    .hero-card__value { font-size: 2.4rem; font-weight: 900; color: var(--text-dark); line-height: 1.1; }
    .hero-card__icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(34,197,94,0.12); color: var(--green); margin-bottom: 4px; }
    .hero-card__icon--orange { background: rgba(240,160,0,0.12); color: var(--orange); }
    .hero-card__sub { display: flex; gap: 20px; margin-top: 4px; flex-wrap: wrap; }
    .hero-card__sub-item { font-size: 0.8rem; color: var(--text-muted); }
    .hero-card__sub-item strong { color: var(--text-dark); font-weight: 700; }
    .hero-card__sub-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
    @media (max-width: 900px) { .hero-row { grid-template-columns: 1fr; } }

    /* ── SECTION TABS ── */
    .section-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; overflow-x: auto; }
    .section-tab { padding: 8px 14px; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: all 0.15s; display: flex; align-items: center; gap: 6px; }
    .section-tab:hover { color: var(--text-dark); }
    .section-tab.active { color: var(--orange); border-bottom-color: var(--orange); }
    .tab-badge { background: var(--gray-200); color: var(--text-muted); font-size: 0.68rem; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
    .section-tab.active .tab-badge { background: rgba(240,160,0,0.15); color: var(--orange); }

    /* ── RESPONSIVE ── */
    @media (max-width: 768px) {
      :root { --sidebar-w: 0px; }
      .header { padding: 0 10px; }
      .header__left, .header__right { gap: 8px; }
      .header__badge, .header__user, .header__tutorial { display: none; }
      .header__back { padding: 6px 9px; color: #bbb; }
      .notif-panel { position: fixed; top: 54px; left: 12px; right: 12px; width: auto; max-height: min(460px, calc(100vh - 70px)); }
      .mobile-nav-button { display: inline-flex; flex: 0 0 auto; }
      .sidebar {
        display: flex; width: min(300px, 86vw); z-index: 150;
        transform: translateX(-102%); transition: transform 0.2s ease;
        box-shadow: 8px 0 24px rgba(0,0,0,0.16);
      }
      .sidebar.mobile-open { transform: translateX(0); }
      .mobile-nav-overlay { position: fixed; inset: 54px 0 0; z-index: 140; background: rgba(0,0,0,0.34); }
      .mobile-nav-overlay.open { display: block; }
      .main { width: 100%; max-width: 100vw; margin-left: 0; padding: 16px; }
      #sec-contacts .section-header > div:last-child { width: 100%; flex-wrap: wrap; }
      #sec-contacts .section-header .btn { flex: 1 1 auto; justify-content: center; }
      #sec-contacts .toolbar { display: grid; grid-template-columns: minmax(0, 1fr); }
      #sec-contacts .toolbar input { width: 100%; min-width: 0; }
      .form-grid { grid-template-columns: 1fr; }
      .pnl-summary { grid-template-columns: 1fr; }
      .kanban { flex-direction: column; }
      .kanban-col { width: 100%; }
      /* Les grilles 2 colonnes posées en style inline (dashboard, stats, réglages,
         marketing) ne peuvent pas être ciblées par classe : on rabat par attribut. */
      .main [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
      /* Même rabat pour les grilles KPI inline en repeat(3/4,1fr) : 2 colonnes sous 768px */
      .main [style*="grid-template-columns:repeat(3,1fr)"],
      .main [style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
      /* Tableau setters injecté hors .table-wrap */
      #statsSetters { overflow-x: auto; -webkit-overflow-scrolling: touch; }
      #statsSetters table { min-width: 520px; }
      /* Sans largeur minimale, width:100% écrase les colonnes dans l'écran :
         cellules en retour à la ligne extrême → lignes énormes. Avec, le
         tableau défile horizontalement dans son .table-wrap. */
      .table-wrap table { min-width: 720px; }
      .table-wrap th, .table-wrap td { white-space: nowrap; }
      /* Boutons d'en-tête de section : retour à la ligne quand le conteneur est déjà en flex */
      .section-header > div:last-child { flex-wrap: wrap; max-width: 100%; }
      /* iOS zoome sur tout champ < 16px au focus : on garantit le plancher.
         !important : beaucoup de champs portent un font-size inline (0.78-0.85rem)
         qui gagnerait sinon sur cette règle. */
      input, select, textarea { font-size: max(16px, 1em) !important; }
      .lead-card__move { display: inline-flex; }
      /* Plancher de lisibilité : les labels en 0.6-0.65rem sont illisibles sur
         téléphone. Les versions inline (barres de graphe) sont rabattues par
         attribut, comme les grilles. */
      .conv-item__date, .conv-item__direction, .conv-channel-chip,
      .acc-month__label, .bar-label { font-size: 0.72rem !important; }
      .main [style*="font-size:0.6rem"] { font-size: 0.7rem !important; }
      /* Cibles tactiles : plancher 40-44px sur les contrôles critiques */
      .btn-sm { min-height: 40px; }
      .modal-close { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
      .mobile-nav-button { width: 44px; height: 44px; }
    }
    @media (max-width: 375px) {
      .stats-row { grid-template-columns: minmax(0, 1fr); }
      .main [style*="grid-template-columns:repeat(3,1fr)"],
      .main [style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: minmax(0, 1fr) !important; }
      .section-header, .section-header > div { min-width: 0; max-width: 100%; }
      .section-header > div:last-child { width: 100%; flex-wrap: wrap; }
    }

    /* misc */
    .pill { display: inline-flex; align-items: center; gap: 4px; background: var(--gray-200); padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; }
    .divider { border: none; border-top: 1px solid var(--gray-200); margin: 16px 0; }
    .text-right { text-align: right; }
    .text-green { color: var(--green); font-weight: 700; }
    .text-red { color: var(--red); font-weight: 700; }
    .skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 4px; height: 14px; margin: 4px 0; }
    @keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
    .loading { text-align: center; padding: 40px; color: var(--text-muted); font-size: 0.85rem; }

    /* ── SÉANCES À ENCAISSER (tap 1-clic) ── */
    .enc-block { background: #fffaf0; border: 1px solid #f5d99b; border-radius: var(--radius-md); padding: 18px 20px; }
    .pres-block { background: #f5f9ff; border: 1px solid #c7ddf5; border-radius: var(--radius-md); padding: 18px 20px; }
    .pres-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
    .pres-block__title { font-weight: 800; font-size: 0.95rem; }
    .pres-block__sub { color: var(--text-muted); font-size: 0.78rem; line-height: 1.5; margin-bottom: 14px; }
    .pres-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid #dce9f8; font-size: 0.86rem; }
    .pres-row__name { font-weight: 600; min-width: 0; flex: 1; overflow-wrap: anywhere; }
    .pres-row__when { color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .pres-row__state { font-size: 0.76rem; color: #166534; white-space: nowrap; }
    .pres-row__err { font-size: 0.76rem; color: #b91c1c; }
    .pres-block__note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #c7ddf5; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }
    .pres-block__skipped { margin-top: 10px; color: var(--text-muted); font-size: 0.76rem; line-height: 1.6; }
    /* Rendez-vous a venir : ce qui n'a pas encore ete prepare. Volontairement plus vif
       que le bloc des presences : celui-ci se lit AVANT, et il a un delai. */
    .prep-block { background: #fff8f1; border: 1px solid #f3c9a0; border-radius: var(--radius-md); padding: 18px 20px; }
    .prep-block--rouge { background: #fff4f3; border-color: #f0b4ae; }
    .prep-block__title { font-weight: 800; font-size: 0.95rem; }
    .prep-block__sub { color: var(--text-muted); font-size: 0.78rem; line-height: 1.5; margin-bottom: 14px; }
    .prep-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 11px 0; border-top: 1px solid rgba(0,0,0,.07); }
    .prep-row:first-child { border-top: 0; }
    .prep-row__main { flex: 1 1 180px; min-width: 0; }
    .prep-row__tel { font-weight: 600; white-space: nowrap; }
    .prep-row__name { font-weight: 700; font-size: 0.9rem; }
    .prep-row__when { color: var(--text-muted); font-size: 0.8rem; }
    .prep-row__facts { color: var(--text-muted); font-size: 0.76rem; line-height: 1.5; margin-top: 2px; }
    .prep-row__acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
    .prep-row__acts .btn { white-space: nowrap; }
    .prep-dot { font-size: 0.9rem; line-height: 1.4; }
    .prep-block__note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #f3c9a0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }
    .enc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
    .enc-head__icon { font-size: 1.6rem; }
    .enc-head__title { font-size: 1rem; font-weight: 800; color: var(--orange-dark); }
    .enc-head__sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
    .enc-cards { display: flex; flex-direction: column; gap: 12px; }
    .enc-card { background: var(--white); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-sm); overflow: hidden; transition: opacity 0.3s, transform 0.3s; }
    .enc-card--busy { opacity: 0.6; pointer-events: none; }
    .enc-card--leaving { opacity: 0; transform: translateX(12px); }
    .enc-card__name { font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; }
    .enc-card__when { font-weight: 500; color: var(--text-muted); }
    .enc-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .enc-card__others { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
    .enc-card__autre { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
    .enc-card__autre input, .enc-card__autre select { padding: 8px 10px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.85rem; }
    .enc-btn { min-height: 40px; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 700; }
    .enc-btn--cash { background: var(--green); color: #fff; }
    .enc-btn--card { background: var(--blue); color: #fff; }
    .enc-btn--ghost { background: var(--gray-100); color: var(--text-dark); border: 1px solid var(--gray-300); }
    .enc-btn--absent { background: var(--gray-100); color: var(--red); border: 1px solid var(--gray-300); }
    .enc-chip { padding: 6px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; background: var(--gray-100); color: var(--text-muted); border: 1px solid var(--gray-300); }
    .enc-quickproduct { background: var(--gray-100); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
    .enc-quickproduct__title { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
    .enc-quickproduct__row { display: flex; gap: 8px; flex-wrap: wrap; }
    .enc-quickproduct__row input { padding: 9px 11px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.85rem; }
      .enc-horsagenda { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gray-200); }
    .enc-horsagenda input, .enc-horsagenda select { font-family: var(--font); font-size: 0.85rem; }
    .enc-aide { font-size: .78rem; color: var(--text-muted); margin-top: 8px; }

/* ─────────── Calendrier CRM (vue agenda intégrée) ─────────── */
.crmcal{background:#fff;border-radius:var(--radius-md);box-shadow:var(--shadow-sm);overflow:hidden}
.crmcal__bar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:16px 20px;border-bottom:1px solid var(--gray-200)}
.crmcal__nav{display:inline-flex;align-items:center;gap:6px}
.crmcal__arrow{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--gray-300);border-radius:8px;background:#fff;color:var(--text-muted);font-size:17px;cursor:pointer;line-height:1}
.crmcal__arrow:hover{color:#111;background:var(--gray-100)}
.crmcal__today{padding:8px 14px;border:1px solid var(--gray-300);border-radius:8px;background:#fff;font-size:0.82rem;font-weight:700;cursor:pointer}
.crmcal__today:hover{background:var(--gray-100)}
.crmcal__title{text-align:center;flex:1 1 200px}
.crmcal__title h3{margin:0;font-size:1.05rem;font-weight:800;letter-spacing:-.2px}
.crmcal__title p{margin:2px 0 0;font-size:0.76rem;color:var(--text-muted)}
.crmcal__seg{display:inline-flex;background:var(--gray-100);border-radius:9px;padding:3px;gap:2px}
.crmcal__seg button{border:0;background:none;border-radius:7px;padding:7px 14px;font-size:0.78rem;font-weight:700;color:var(--text-muted);cursor:pointer}
.crmcal__seg button[aria-pressed="true"]{background:#fff;color:#111;box-shadow:0 1px 3px rgba(0,0,0,.09)}
.crmcal__scope{flex-basis:100%;order:3;display:flex;align-items:center;justify-content:center;gap:9px}
.crmcal__scope label{font-size:0.74rem;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.6px}
.crmcal__scope select{min-width:230px;max-width:100%;padding:8px 12px;border:1px solid var(--gray-300);border-radius:8px;background:#fff;font-size:0.82rem;font-weight:700;color:#111;cursor:pointer}
.crmcal__scope select:hover{border-color:var(--orange)}
.crmcal__scope select:focus{outline:2px solid var(--orange);outline-offset:1px}
.crmcal__zone-control{display:flex;align-items:center;gap:7px;font-size:0.76rem;font-weight:700;color:var(--text-muted)}
.crmcal__zone-control select{min-width:165px;max-width:100%;padding:8px 10px;border:1px solid var(--gray-300);border-radius:8px;background:#fff;color:#111;font:inherit;cursor:pointer}
.crmcal__zone-control select:hover,.crmcal__tz:hover{border-color:var(--orange)}
.crmcal__zone-control select:focus,.crmcal__tz:focus{outline:2px solid var(--orange);outline-offset:1px}
.crmcal__source{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;padding:11px 20px;background:#f8fafc;border-bottom:1px solid var(--gray-200);color:#514c45;font-size:0.78rem;line-height:1.45}
.crmcal__source strong{color:#111}
.crmcal__source a,.crmcal__foot a{color:var(--orange-dark);font-weight:800;text-decoration:underline;text-underline-offset:2px}
/* Légende des types */
.crmcal__legend{flex-basis:100%;order:4;display:flex;flex-wrap:wrap;gap:6px;justify-content:center;padding-top:2px}
.crmcal__lg{display:inline-flex;align-items:center;gap:6px;padding:5px 11px 5px 8px;border:1px solid var(--gray-200);border-radius:999px;background:#fff;font-size:0.76rem;font-weight:700;color:#111;cursor:pointer;transition:border-color .12s,opacity .12s}
.crmcal__lg:hover{border-color:var(--gray-300)}
.crmcal__lg i{width:9px;height:9px;border-radius:999px;flex:0 0 auto}
.crmcal__lg b{font-size:0.7rem;font-weight:800;color:var(--text-muted);background:var(--gray-100);border-radius:999px;padding:1px 6px}
.crmcal__lg[aria-pressed="false"]{opacity:.42;text-decoration:line-through}
/* Statut : un rendez-vous terminé sans suite s'efface, il ne doit pas capter l'oeil */
.crmcal__ev[data-done="1"]{background:#e9e7e3!important;border-left-color:#c7c2ba!important;color:#78736c;text-decoration:line-through;box-shadow:none}
.crmcal__chip[data-done="1"]{background:var(--gray-100)!important;border-left-color:#ccc7c0!important;color:#857f78;text-decoration:line-through}
.crmcal__foot{padding:10px 20px;border-top:1px solid var(--gray-200);background:var(--gray-100);font-size:0.72rem;color:var(--text-muted)}

.crmcal__time{--h:58px;--gut:64px;--dmin:124px;--gl:#eceae6;--gh:#f6f5f2;--off:#fbfaf8;--wk:#fdfcfa;
  overflow:auto;max-height:min(68vh,660px);overscroll-behavior:contain}
.crmcal__inner{min-width:calc(var(--gut) + var(--days) * var(--dmin))}
.crmcal__head{display:grid;grid-template-columns:var(--gut) minmax(0,1fr);position:sticky;top:0;z-index:6;background:#fff;box-shadow:0 1px 0 var(--gray-200),0 4px 10px -8px rgba(0,0,0,.18)}
.crmcal__tz{align-self:stretch;width:100%;padding:0 6px;border:1px solid transparent;border-radius:0;background:#fff;color:#655e53;font-size:10px;font-weight:800;cursor:pointer;position:sticky;left:0;z-index:7;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.crmcal__hcols{display:grid;grid-template-columns:repeat(var(--days),minmax(0,1fr))}
.crmcal__dh{display:flex;flex-direction:column;align-items:center;gap:3px;border:0;border-left:1px solid var(--gray-200);background:none;padding:10px 4px;color:#8f8a82;cursor:pointer}
.crmcal__dh:first-child{border-left:0}
.crmcal__dh span{font-size:9.5px;font-weight:700;letter-spacing:1.1px;text-transform:uppercase}
.crmcal__dnum{display:flex;align-items:center;gap:6px}
.crmcal__dh strong{display:grid;place-items:center;min-width:28px;height:28px;padding:0 7px;border-radius:999px;font-size:15.5px;font-weight:800;color:#111;font-variant-numeric:tabular-nums}
.crmcal__dh:hover strong{background:var(--gray-200)}
.crmcal__dh[data-today="1"]{color:var(--orange-dark)}
.crmcal__dh[data-today="1"] strong,.crmcal__dh[data-today="1"]:hover strong{background:var(--orange);color:#fff}
.crmcal__cnt{font-size:9.5px;font-weight:800;color:#8f8a82;background:var(--gray-200);border-radius:999px;padding:1px 7px;font-variant-numeric:tabular-nums}
.crmcal__dh[data-today="1"] .crmcal__cnt{background:#fdf1d6;color:var(--orange-dark)}
.crmcal__body{display:grid;grid-template-columns:var(--gut) minmax(0,1fr)}
.crmcal__hours{display:flex;flex-direction:column;position:sticky;left:0;z-index:4;background:#fff;border-right:1px solid var(--gray-200)}
.crmcal__hr{height:var(--h);position:relative}
.crmcal__hr i{position:absolute;top:-6px;right:10px;font-size:10px;font-style:normal;font-weight:700;color:#a8a49d;background:#fff;padding:0 2px;line-height:1;font-variant-numeric:tabular-nums}
.crmcal__hr:first-child i{top:0}
.crmcal__cols{display:grid;grid-template-columns:repeat(var(--days),minmax(0,1fr));position:relative}
.crmcal__col{position:relative;min-height:calc(var(--h) * 24);border-left:1px solid var(--gray-200);
  background-image:
    linear-gradient(to bottom,var(--off) 0 calc(var(--h) * 7),transparent calc(var(--h) * 7) calc(var(--h) * 21),var(--off) calc(var(--h) * 21) 100%),
    repeating-linear-gradient(to bottom,transparent 0 calc(var(--h)/2),var(--gh) calc(var(--h)/2) calc(var(--h)/2 + 1px),transparent calc(var(--h)/2 + 1px) var(--h)),
    repeating-linear-gradient(to bottom,var(--gl) 0 1px,transparent 1px var(--h))}
.crmcal__col:first-child{border-left:0}
.crmcal__col[data-wk="1"]{background-color:var(--wk)}
.crmcal__col[data-today="1"]{background-color:#fffaf0}
.crmcal__work{position:absolute;left:0;right:0;z-index:0;pointer-events:none;background:#d9ecdf99;border-top:1px solid #9cc7ab;border-bottom:1px solid #9cc7ab}
.crmcal__col[data-wk="1"] .crmcal__work{background:#d9ecdf80}
.crmcal__now{position:absolute;left:0;right:0;height:0;border-top:2px solid var(--red);z-index:5;pointer-events:none}
.crmcal__now::before{content:"";position:absolute;left:-5px;top:-6px;width:10px;height:10px;border-radius:999px;background:var(--red);box-shadow:0 0 0 3px rgba(239,68,68,.22)}
.crmcal__ev{position:absolute;display:flex;flex-direction:column;overflow:hidden;text-align:left;padding:3px 7px;border:0;border-left:3px solid rgba(0,0,0,.22);border-radius:6px;line-height:1.2;color:#fff;cursor:pointer;z-index:2;box-shadow:0 1px 2px rgba(0,0,0,.16);transition:box-shadow .12s,transform .12s;margin-right:2px;background:var(--blue);min-height:16px}
.crmcal__ev:hover{transform:translateY(-1px);box-shadow:0 4px 10px -2px rgba(0,0,0,.26);z-index:4}
.crmcal__ev[data-o="pending"]{background:var(--orange)}
.crmcal__ev[data-o="won"]{background:#16a34a}
.crmcal__ev[data-o="attended"]{background:var(--blue)}
.crmcal__ev[data-o="lost"],.crmcal__ev[data-o="no_show"]{background:#e7e5e1;color:#78736c;box-shadow:none}
.crmcal__ev[data-s="xs"]{flex-direction:row;align-items:center;gap:4px;padding:1px 4px;line-height:1}
.crmcal__ev[data-s="xs"] b{font-size:9px}
.crmcal__ev[data-s="xs"] u{font-size:10px}
.crmcal__ev[data-unknown="1"]{border-right:2px dashed currentColor}
.crmcal__ev[data-s="xs"] em,.crmcal__ev[data-s="sm"] em{display:none}
.crmcal__ev b{flex:0 0 auto;font-size:10px;font-weight:800;font-variant-numeric:tabular-nums;opacity:.93}
.crmcal__ev u{flex:1 1 auto;min-width:0;font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crmcal__ev em{font-size:10.5px;font-style:normal;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crmcal__more{position:absolute;right:4px;width:30px;height:18px;display:grid;place-items:center;border:1px solid var(--gray-300);border-radius:999px;background:#fff;color:#111;font-size:10px;font-weight:800;z-index:5;cursor:pointer;box-shadow:0 2px 5px -1px rgba(0,0,0,.2)}
.crmcal__more:hover{border-color:var(--orange);color:var(--orange-dark)}

/* Poser un rendez-vous depuis la grille : la plage dessinee et son panneau. */
.crmcal__col{cursor:cell;user-select:none}
.crmcal__sel{position:absolute;left:2px;right:2px;border-radius:7px;background:rgba(234,88,12,.2);border:1.5px dashed var(--orange);z-index:6;pointer-events:none;min-height:14px}
.crmcal__sel b{position:absolute;top:2px;left:7px;font-size:10px;font-weight:800;color:var(--orange-dark);font-variant-numeric:tabular-nums;white-space:nowrap}
.crmcal__newbtn{border-color:var(--orange)!important;color:var(--orange-dark)!important;font-weight:800}
.crmcal__pop.crmcal__pop--new{width:366px;max-height:calc(100vh - 24px);overflow-y:auto}
.crmcal__nwhen{font-size:.84rem;font-weight:700;color:#111;margin-bottom:12px;line-height:1.35}
.crmcal__nscope{margin-bottom:11px;padding:8px 10px;border:1px solid #fdba74;border-radius:8px;background:#fffbeb;font-size:.74rem;line-height:1.4;color:#92400e}
.crmcal__nfields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.crmcal__nfields label,.crmcal__nlab{display:block;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--text-muted);margin-bottom:11px}
.crmcal__nfields input,.crmcal__nlab input,.crmcal__nlab select,.crmcal__ncreate input{display:block;width:100%;margin-top:5px;padding:8px 9px;border:1px solid var(--gray-300);border-radius:8px;background:#fff;font-family:var(--font);font-size:.84rem;font-weight:600;color:#111;text-transform:none;letter-spacing:0}
.crmcal__nlist{max-height:178px;overflow-y:auto;margin-bottom:10px}
.crmcal__nrow{display:block;width:100%;text-align:left;padding:7px 9px;margin-bottom:5px;border:1px solid var(--gray-200);border-radius:8px;background:#fff;cursor:pointer}
.crmcal__nrow:hover{border-color:var(--orange);background:#fffaf4}
.crmcal__nrow strong{display:block;font-size:.82rem;font-weight:700;color:#111}
.crmcal__nrow span,.crmcal__npick span{display:block;font-size:.72rem;color:var(--text-muted);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crmcal__npick{display:flex;align-items:center;gap:10px;padding:9px 11px;margin-bottom:11px;border:1px solid var(--orange);border-radius:9px;background:#fffaf4}
.crmcal__npick>div{min-width:0;flex:1}
.crmcal__npick strong{font-size:.86rem;font-weight:800;color:#111}
.crmcal__ncreate{display:grid;gap:8px;margin-bottom:11px}
.crmcal__nactions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.crmcal__nbtn{display:block;margin-top:8px;padding:8px 12px;border:1px solid var(--gray-300);border-radius:8px;background:#fff;font-family:var(--font);font-size:.8rem;font-weight:700;color:#111;cursor:pointer}
.crmcal__nbtn:hover{border-color:var(--orange);color:var(--orange-dark)}
.crmcal__nlink{border:0;background:none;padding:0;font-family:var(--font);font-size:.76rem;font-weight:700;color:var(--orange-dark);cursor:pointer;text-decoration:underline}
.crmcal__nmsg{font-size:.78rem;line-height:1.45;color:#454039}
.crmcal__nmsg:empty{display:none}
.crmcal__nmsg[data-bad="1"]{color:#b91c1c}
.crmcal__nmsg ul{margin:6px 0 0;padding-left:19px}
.crmcal__nhint{font-size:.73rem;color:var(--text-muted);line-height:1.4;padding:4px 0}

.crmcal__month{padding:16px 20px 20px}
.crmcal__wd{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-bottom:8px}
.crmcal__wd span{font-size:9.5px;font-weight:700;letter-spacing:1.1px;text-transform:uppercase;color:#a8a49d;text-align:center}
.crmcal__grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}
.crmcal__cell{background:#fff;border:1px solid var(--gray-200);border-radius:11px;padding:8px;min-height:112px;display:flex;flex-direction:column;gap:6px}
.crmcal__cell:hover{border-color:var(--gray-300)}
.crmcal__cell[data-out="1"]{background:var(--gray-100)}
.crmcal__cell[data-today="1"]{border-color:var(--orange);box-shadow:0 0 0 1px var(--orange)}
.crmcal__ch{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;border:0;background:none;padding:0;cursor:pointer}
.crmcal__dn{display:grid;place-items:center;min-width:24px;height:24px;border-radius:999px;font-size:12.5px;font-weight:800;color:#111;font-variant-numeric:tabular-nums}
.crmcal__ch:hover .crmcal__dn{background:var(--gray-200)}
.crmcal__cell[data-out="1"] .crmcal__dn{color:#b3ada4}
.crmcal__cell[data-today="1"] .crmcal__dn{background:var(--orange);color:#fff}
.crmcal__chips{display:flex;flex-direction:column;gap:4px;overflow-y:auto;max-height:186px}
.crmcal__chip{display:flex;flex:none;flex-direction:column;gap:1px;width:100%;text-align:left;border:0;border-left:3px solid var(--blue);border-radius:7px;background:#eff5fe;padding:4px 8px;color:#111;cursor:pointer}
.crmcal__chip[data-o="pending"]{border-left-color:var(--orange);background:#fdf5e6}
.crmcal__chip[data-o="won"]{border-left-color:#16a34a;background:#eef8f1}
.crmcal__chip[data-o="lost"],.crmcal__chip[data-o="no_show"]{border-left-color:#ccc7c0;background:var(--gray-100);color:#857f78}
.crmcal__chip b{font-size:10px;font-weight:800;color:#7c766e;font-variant-numeric:tabular-nums}
.crmcal__chip u{font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crmcal__empty{padding:40px 20px;text-align:center;color:var(--text-muted);font-size:0.85rem}
/* Fiche rendez-vous */
.crmcal__pop{position:fixed;z-index:100050;width:320px;max-width:calc(100vw - 24px);background:#fff;border:1px solid var(--gray-200);border-radius:14px;box-shadow:0 18px 50px -12px rgba(0,0,0,.35);padding:18px 18px 16px}
.crmcal__popx{position:absolute;top:9px;right:9px;width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:8px;background:none;color:#9b958d;font-size:21px;line-height:1;cursor:pointer}
.crmcal__popx:hover{background:var(--gray-100);color:#111}
.crmcal__pophead{display:flex;align-items:flex-start;gap:10px;padding-right:28px;margin-bottom:14px}
.crmcal__dot{width:10px;height:10px;border-radius:999px;margin-top:6px;flex:0 0 auto;background:var(--blue)}
.crmcal__dot[data-o="pending"]{background:var(--orange)}
.crmcal__dot[data-o="won"]{background:#16a34a}
.crmcal__dot[data-o="lost"],.crmcal__dot[data-o="no_show"]{background:#b9b3ab}
.crmcal__pophead h4{margin:0 0 5px;font-size:1.02rem;font-weight:800;letter-spacing:-.2px;line-height:1.25}
.crmcal__pill{display:inline-block;font-size:0.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.5px;padding:3px 9px;border-radius:999px;background:#e8f1fe;color:#1d4ed8}
.crmcal__pill[data-o="pending"]{background:#fdf1d8;color:#9a6a00}
.crmcal__pill[data-o="won"]{background:#e6f5ec;color:#15803d}
.crmcal__pill[data-o="lost"],.crmcal__pill[data-o="no_show"]{background:var(--gray-200);color:#6f6a63}
.crmcal__rows{display:grid;gap:9px}
.crmcal__row{display:grid;grid-template-columns:86px minmax(0,1fr);gap:10px;align-items:baseline;font-size:0.82rem}
.crmcal__row>span{color:var(--text-muted);font-size:0.74rem;font-weight:700;text-transform:uppercase;letter-spacing:.4px}
.crmcal__row strong{font-weight:700;color:#111;word-break:break-word}
.crmcal__row a{color:var(--orange-dark);font-weight:700;text-decoration:none;word-break:break-all}
.crmcal__row a:hover{text-decoration:underline}
.crmcal__notes{margin-top:12px;padding:10px 12px;background:var(--gray-100);border-radius:9px;font-size:0.8rem;color:#454039;white-space:pre-wrap;max-height:120px;overflow:auto}
.crmcal__acts{margin-top:15px;display:flex;gap:8px}
.crmcal__act{flex:1;display:grid;place-items:center;padding:10px 14px;border:0;border-radius:9px;font-size:0.84rem;font-weight:800;cursor:pointer}
.crmcal__act--main{background:var(--orange);color:#fff}
.crmcal__act--main:hover{background:var(--orange-dark)}
.crmcal__act--off{background:var(--gray-100);color:#9b958d;cursor:default}
@media(max-width:700px){
  .crmcal__pop{left:12px!important;right:12px;width:auto}
}
@media(max-width:860px){
  .crmcal__bar{padding:13px 14px}
  .crmcal__title{order:-1;flex-basis:100%}
  .crmcal__month{padding:12px 12px 16px}
  .crmcal__time{--h:52px;--gut:52px;--dmin:106px}
}
@media(max-width:700px){
  .crmcal__cell{min-height:58px;padding:5px 4px;gap:4px}
  .crmcal__cell .crmcal__cnt{display:none}
  .crmcal__ch{justify-content:center}
  .crmcal__chips{flex-direction:row;flex-wrap:wrap;gap:3px;max-height:none;justify-content:center}
  .crmcal__chip{width:7px;height:7px;padding:0;border:0;border-radius:999px;background:var(--chipdot,var(--blue));overflow:hidden}
  .crmcal__chip[data-done="1"]{background:#ccc7c0!important}
  .crmcal__chip b,.crmcal__chip u{display:none}
  .crmcal__wd span{font-size:8.5px;letter-spacing:.2px}
  .crmcal__grid,.crmcal__wd{gap:4px}
}
/* Mandat SEPA : les coordonnées bancaires restent dans l’Element Stripe. */
.billing-sepa{margin-top:16px;padding:18px;border:1px solid #ddd7cb;border-radius:12px;background:#fcfbf8;max-width:740px}
.billing-sepa[hidden]{display:none}
.billing-sepa [hidden]{display:none}
.billing-sepa h3{font-size:1rem;margin-bottom:5px}
.billing-sepa p{font-size:.84rem;line-height:1.6;margin-bottom:12px}
.billing-sepa__fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:16px 0}
.billing-sepa__field{min-width:0}
.billing-sepa__field label,.billing-sepa__iban-label{display:block;font-size:.82rem;font-weight:600;margin-bottom:6px}
.billing-sepa__field input{width:100%;min-height:44px;padding:11px 12px;border:1px solid #ccc6bb;border-radius:8px;background:#fff;font:inherit;font-size:16px}
.billing-sepa__field input:focus{outline:2px solid #bd7c00;outline-offset:2px}
.billing-sepa__iban{min-height:46px;padding:13px 12px;background:#fff;border:1px solid #ccc6bb;border-radius:8px}
.billing-sepa__iban:focus-within{outline:2px solid #bd7c00;outline-offset:2px}
.billing-sepa__iban--locked{pointer-events:none;opacity:.7}
.billing-sepa .billing-sepa__privacy{font-size:.75rem;color:#59554d;margin:7px 0 14px}
.billing-sepa__consent{display:flex;gap:10px;align-items:flex-start;font-size:.8rem;line-height:1.65;cursor:pointer}
.billing-sepa__consent input{flex:0 0 auto;width:18px;height:18px;margin-top:4px;accent-color:#a66c00}
.billing-sepa__consent span{min-width:0}
.billing-sepa__mandate{margin-top:8px;font-size:.8rem;line-height:1.65}
.billing-sepa__mandate summary{min-height:44px;padding:10px 0;color:#4a4338;font-weight:600;cursor:pointer}
.billing-sepa__mandate summary:focus-visible{outline:2px solid #bd7c00;outline-offset:2px}
.billing-sepa__mandate p{margin:0 0 8px;color:#59554d}
.billing-sepa__actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.billing-sepa__actions .btn{min-height:44px;white-space:normal;text-align:center}
.billing-sepa .btn-primary{color:#1a1a1a}
.billing-sepa__status{font-size:.84rem;line-height:1.6;overflow-wrap:anywhere;margin-top:10px}
.billing-sepa__status[data-error="true"]{color:#a32323}
.billing-sepa__success{padding:12px 14px;margin-top:14px;border:1px solid #b6d9c0;border-radius:9px;background:#f0f9f2;color:#185e30;font-size:.85rem}
@media(max-width:560px){.billing-sepa{padding:14px}.billing-sepa__fields{grid-template-columns:1fr}.billing-sepa__actions{flex-direction:column}.billing-sepa__actions .btn{width:100%}}
/* Rose-May: only the agenda section adopts her booking-page identity. */
#sec-agenda[data-brand="rose-may"]{--orange:#b65a32;--orange-dark:#9c4f30;--gray-100:#f4efea;--gray-200:#e5ddd3;--gray-300:#d8cabc;--text-dark:#3e2d24;--text-muted:#6d594d;--radius-md:28px;--shadow-sm:0 12px 35px -28px rgba(62,45,36,.28);font-family:"Jost",Arial,sans-serif;color:#3e2d24}
#sec-agenda[data-brand="rose-may"] .crmcal{background:#fffcf8;border:1px solid #e5ddd3;border-radius:28px}
#sec-agenda[data-brand="rose-may"] .crmcal__bar{background:#fffcf8;border-color:#e5ddd3}
#sec-agenda[data-brand="rose-may"] .crmcal__title h3{font-family:"Cormorant Garamond",Georgia,serif;font-size:1.7rem;font-weight:600}
#sec-agenda[data-brand="rose-may"] .crmcal__arrow,#sec-agenda[data-brand="rose-may"] .crmcal__today,#sec-agenda[data-brand="rose-may"] .crmcal__seg,#sec-agenda[data-brand="rose-may"] .crmcal__seg button{border-radius:999px}
#sec-agenda[data-brand="rose-may"] .crmcal__foot{background:#f4efea;border-color:#e5ddd3}
#sec-agenda[data-brand="rose-may"] .crmcal__identity{display:flex;align-items:center;gap:14px;padding:14px 18px;border:1px solid #e5ddd3;border-radius:22px;background:#fffcf8}
#sec-agenda[data-brand="rose-may"] .crmcal__identity img{display:block;width:54px;height:54px;object-fit:contain;flex:none}
#sec-agenda[data-brand="rose-may"] .crmcal__identity strong{display:block;font-family:"Cormorant Garamond",Georgia,serif;font-size:1.7rem;font-weight:600;line-height:1.05}
#sec-agenda[data-brand="rose-may"] .crmcal__identity span{display:block;color:#6d594d;font-size:.82rem;margin-top:3px}
/* Élodie's native calendar stays visually aligned with her green/ivory site. */
#sec-agenda[data-brand="elodie-menadier"]{--orange:#3d6558;--orange-dark:#2b4e42;--gray-100:#f8f6ef;--gray-200:#d6e0d5;--gray-300:#c8d8c9;--text-dark:#254337;--text-muted:#566357;--radius-md:26px;--shadow-sm:0 12px 35px -28px rgba(37,67,55,.28);font-family:Inter,Arial,sans-serif;color:#254337}
#sec-agenda[data-brand="elodie-menadier"] .crmcal{background:#fffefa;border:1px solid #d6e0d5;border-radius:26px}
#sec-agenda[data-brand="elodie-menadier"] .crmcal__bar{background:#fffefa;border-color:#d6e0d5}
#sec-agenda[data-brand="elodie-menadier"] .crmcal__title h3{font-family:"Cormorant Garamond",Georgia,serif;font-size:1.7rem;font-weight:600}
#sec-agenda[data-brand="elodie-menadier"] .crmcal__arrow,#sec-agenda[data-brand="elodie-menadier"] .crmcal__today,#sec-agenda[data-brand="elodie-menadier"] .crmcal__seg,#sec-agenda[data-brand="elodie-menadier"] .crmcal__seg button{border-radius:999px}
#sec-agenda[data-brand="elodie-menadier"] .crmcal__foot{background:#f8f6ef;border-color:#d6e0d5}
#sec-agenda[data-brand="elodie-menadier"] .crmcal__identity{display:flex;align-items:center;gap:14px;padding:14px 18px;border:1px solid #d6e0d5;border-radius:22px;background:#fffefa}
#sec-agenda[data-brand="elodie-menadier"] .crmcal__identity img{display:block;width:54px;height:54px;object-fit:contain;flex:none}
#sec-agenda[data-brand="elodie-menadier"] .crmcal__identity strong{display:block;font-family:"Cormorant Garamond",Georgia,serif;font-size:1.7rem;font-weight:600;line-height:1.05}
#sec-agenda[data-brand="elodie-menadier"] .crmcal__identity span{display:block;color:#566357;font-size:.82rem;margin-top:3px}
/* Jean-Marc Broner: the CRM calendar retains his site's sand and jmB identity. */
#sec-agenda[data-brand="jean-marc-broner"]{--orange:#8b6538;--orange-dark:#6d4d2c;--gray-100:#eae4da;--gray-200:#d8cdbf;--gray-300:#c7b8a6;--text-dark:#262321;--text-muted:#675c50;--radius-md:22px;--shadow-sm:0 12px 35px -28px rgba(38,35,33,.28);font-family:Montserrat,Arial,sans-serif;color:#262321}
#sec-agenda[data-brand="jean-marc-broner"] .crmcal{background:#f7f5f1;border:1px solid #d8cdbf;border-radius:22px}
#sec-agenda[data-brand="jean-marc-broner"] .crmcal__bar{background:#f7f5f1;border-color:#d8cdbf}
#sec-agenda[data-brand="jean-marc-broner"] .crmcal__title h3{font-family:"Playfair Display",Georgia,serif;font-size:1.5rem;font-weight:600}
#sec-agenda[data-brand="jean-marc-broner"] .crmcal__arrow,#sec-agenda[data-brand="jean-marc-broner"] .crmcal__today,#sec-agenda[data-brand="jean-marc-broner"] .crmcal__seg,#sec-agenda[data-brand="jean-marc-broner"] .crmcal__seg button{border-radius:12px}
#sec-agenda[data-brand="jean-marc-broner"] .crmcal__foot{background:#eae4da;border-color:#d8cdbf}
#sec-agenda[data-brand="jean-marc-broner"] .crmcal__identity{display:flex;align-items:center;gap:14px;padding:14px 18px;border:1px solid #d8cdbf;border-radius:20px;background:#f7f5f1}
#sec-agenda[data-brand="jean-marc-broner"] .crmcal__identity img{display:block;width:60px;height:48px;object-fit:contain;flex:none}
#sec-agenda[data-brand="jean-marc-broner"] .crmcal__identity strong{display:block;font-family:"Playfair Display",Georgia,serif;font-size:1.35rem;font-weight:600;line-height:1.15}
#sec-agenda[data-brand="jean-marc-broner"] .crmcal__identity span{display:block;color:#675c50;font-size:.82rem;margin-top:3px}
#sec-agenda[data-brand="morgane-hypolite"]{--orange:#a85038;--orange-dark:#883e2b;--gray-100:#f7f4ef;--gray-200:#d7dfd7;--gray-300:#cbd9cc;--text-dark:#24352f;--text-muted:#52665a;--radius-md:24px;--shadow-sm:0 12px 35px -28px rgba(31,48,40,.2);font-family:Inter,Arial,sans-serif;color:#24352f}
#sec-agenda[data-brand="morgane-hypolite"] .crmcal{background:#fffdf8;border:1px solid #d7dfd7;border-radius:24px}
#sec-agenda[data-brand="morgane-hypolite"] .crmcal__bar{background:#fffdf8;border-color:#d7dfd7}
#sec-agenda[data-brand="morgane-hypolite"] .crmcal__title h3{font-family:Georgia,"Times New Roman",serif;font-size:1.6rem;font-weight:600}
#sec-agenda[data-brand="morgane-hypolite"] .crmcal__arrow,#sec-agenda[data-brand="morgane-hypolite"] .crmcal__today,#sec-agenda[data-brand="morgane-hypolite"] .crmcal__seg,#sec-agenda[data-brand="morgane-hypolite"] .crmcal__seg button{border-radius:999px}
#sec-agenda[data-brand="morgane-hypolite"] .crmcal__foot{background:#f7f4ef;border-color:#d7dfd7}
#sec-agenda[data-brand="morgane-hypolite"] .crmcal__identity{display:flex;align-items:center;gap:14px;padding:14px 18px;border:1px solid #d7dfd7;border-radius:22px;background:#fffdf8}
#sec-agenda[data-brand="morgane-hypolite"] .crmcal__identity strong{display:block;font-family:Georgia,"Times New Roman",serif;font-size:1.55rem;font-weight:600;line-height:1.1}
#sec-agenda[data-brand="morgane-hypolite"] .crmcal__identity span{display:block;color:#52665a;font-size:.82rem;margin-top:3px}
#sec-agenda[data-brand="morgane-hypolite"] .crmcal__identity img{display:block;flex:none;width:50px;height:50px;padding:8px;border-radius:50% 50% 50% 20%;background:#eaf0e9;border:1px solid #cbd9cc;object-fit:contain}
.crmcal__draft{padding:15px 20px;border:1px solid #e8d3be;border-radius:20px;background:#fbf3e9;color:#6d4b32;font-size:.87rem;line-height:1.55}

    .mci-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; }
    .mci-card { background:white; border:1px solid var(--gray-200); border-radius:12px; padding:22px; min-width:0; }
    .mci-card h3 { font-size:1rem; margin:0 0 14px; overflow-wrap:anywhere; }
    .mci-card p { margin:8px 0; color:var(--text-muted); font-size:.88rem; overflow-wrap:anywhere; }
    .mci-amount { display:block; font-size:1.6rem; font-weight:750; margin:18px 0; }
    .mci-paid { display:inline-block; padding:4px 9px; border-radius:20px; color:#166534; background:#dcfce7; font-size:.78rem; font-weight:700; }
    .mci-card a { display:flex; justify-content:center; margin-top:18px; text-decoration:none; min-height:44px; }
    .mci-state { padding:18px; border:1px solid var(--gray-200); border-radius:10px; margin-bottom:16px; color:var(--text-muted); }
    .mci-state[data-error="true"] { color:#9f1239; background:#fff1f2; }

  