/* ==========================================================================
   MENEZIA CRM â€” feuille de style unique
   Philosophie : beaucoup de blanc, bordures trÃ¨s fines, tags doux, aucun poids visuel inutile.
   ========================================================================== */

:root {
    --bg: #ffffff;
    --bg-soft: #f8f8f7;
    --bg-hover: #f4f4f3;
    --text: #0d0d0d;
    --text-2: #4b4b52;
    --text-3: #85858d;
    --line: #ececea;
    --line-strong: #dededa;
    --blue: #2563eb;
    --blue-ring: rgba(37, 99, 235, .16);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(15, 15, 15, .04);
    --shadow-pop: 0 10px 30px -8px rgba(15, 15, 15, .16), 0 2px 6px rgba(15, 15, 15, .05);
    --sidebar-w: 244px;

    /* Tags : fond doux / texte / point */
    --t-blue-bg: #e9f0fe;    --t-blue: #1d4fd7;
    --t-amber-bg: #fff3dc;   --t-amber: #a35a06;
    --t-green-bg: #e5f6eb;   --t-green: #157a3c;
    --t-violet-bg: #f0eafd;  --t-violet: #6638c9;
    --t-red-bg: #fdeaea;     --t-red: #b42323;
    --t-gray-bg: #efefed;    --t-gray: #55555c;
    --t-slate-bg: #eaeef3;   --t-slate: #475569;
    --t-teal-bg: #def4f4;    --t-teal: #0b6f78;
    --t-olive-bg: #eef2de;   --t-olive: #596b17;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    padding: 22px 16px 18px; border-right: 1px solid var(--line); background: var(--bg);
    display: flex; flex-direction: column; gap: 22px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand-mark {
    width: 28px; height: 28px; border-radius: 8px; background: var(--text); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: -.02em;
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand-name span { font-weight: 500; color: var(--text-3); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
    display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm);
    color: var(--text-2); font-weight: 500; transition: background .12s, color .12s;
}
.nav-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover { background: var(--bg-hover); color: var(--text); }
.nav-link.is-active { background: var(--bg-hover); color: var(--text); font-weight: 650; }
.sidebar-cta { width: 100%; justify-content: center; }
.sidebar-foot { margin-top: auto; padding: 0 8px; font-size: 12px; color: var(--text-3); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; outline: none; }
.page { max-width: 1140px; margin: 0 auto; padding: 52px 44px 120px; }

/* ----------------------------------------------------------- En-tÃªtes page */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.page-title { font-size: 30px; line-height: 1.15; font-weight: 750; letter-spacing: -.03em; }
.page-sub { margin-top: 8px; color: var(--text-2); }
.page-sub a { color: inherit; font-weight: 600; border-bottom: 1px solid var(--line-strong); }
.page-sub a:hover { border-color: currentColor; }
.page-sub .late { color: var(--t-red); }
.page-sub .today { color: var(--t-amber); }

.section-title { font-size: 12.5px; font-weight: 650; color: var(--text-3); letter-spacing: .02em; text-transform: uppercase; margin: 44px 0 14px; }
.section-title:first-of-type { margin-top: 0; }

/* ------------------------------------------------------------------ Boutons */
.btn {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg);
    font-weight: 560; font-size: 14px; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: var(--bg-hover); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--text); border-color: var(--text); color: #fff; }
.btn-primary:hover { background: #262626; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-danger { color: var(--t-red); }
.btn-danger:hover { background: var(--t-red-bg); border-color: #f3c6c6; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn-icon { width: 36px; padding: 0; justify-content: center; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ------------------------------------------------------------------- Champs */
.input, .select, .textarea {
    width: 100%; height: 38px; padding: 0 12px; background: var(--bg);
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    transition: border-color .12s, box-shadow .12s; outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select {
    appearance: none; padding-right: 32px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2385858d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
}
.input::placeholder, .textarea::placeholder { color: #a8a8ae; }
.input:hover, .select:hover, .textarea:hover { border-color: #cfcfca; }
.input:focus, .select:focus, .textarea:focus, .input-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }
.input.is-invalid { border-color: #e26d6d; box-shadow: 0 0 0 3px rgba(226, 109, 109, .15); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--text-3); }
.row { display: grid; gap: 14px; }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: 1fr 1fr 1fr; }
.row-money { grid-template-columns: 1fr 150px; }
.row-date { grid-template-columns: 1fr 120px; }

.input-wrap { position: relative; display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); transition: border-color .12s, box-shadow .12s; }
.input-wrap:hover { border-color: #cfcfca; }
.input-wrap .input { border: 0; box-shadow: none !important; background: transparent; flex: 1; min-width: 0; height: 36px; }
.input-wrap .adorn { color: var(--text-3); padding-right: 12px; font-size: 13.5px; }
.input-wrap .adorn-btn { border: 0; background: transparent; width: 36px; height: 36px; display: grid; place-items: center; color: var(--text-3); border-radius: 6px; }
.input-wrap .adorn-btn:hover { color: var(--text); }
.input-wrap svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.input-wrap.is-invalid { border-color: #e26d6d; box-shadow: 0 0 0 3px rgba(226, 109, 109, .15); }

/* Champs Â« inline Â» de la fiche : discrets jusqu'au survol */
.ifield { display: grid; grid-template-columns: 124px minmax(0, 1fr); align-items: start; gap: 12px; padding: 3px 0; }
.ifield > .label { padding-top: 9px; font-weight: 520; color: var(--text-3); }
.ifield .input, .ifield .select, .ifield .textarea { border-color: transparent; background: transparent; padding-left: 10px; }
.ifield .input-wrap { border-color: transparent; background: transparent; }
.ifield .input:hover, .ifield .select:hover, .ifield .textarea:hover, .ifield .input-wrap:hover { background: var(--bg-soft); border-color: transparent; }
.ifield .input:focus, .ifield .select:focus, .ifield .textarea:focus, .ifield .input-wrap:focus-within { background: var(--bg); border-color: var(--blue); }
.ifield .input-wrap .input:hover, .ifield .input-wrap .input:focus { background: transparent; }
.ifield .select { background-position: right 9px center; }
.ifield.is-stack { grid-template-columns: 1fr; gap: 0; padding: 6px 0; }
.ifield.is-stack > .label { padding-top: 0; padding-bottom: 3px; padding-left: 10px; }
.ifield .tools { display: flex; align-items: center; gap: 2px; padding-right: 4px; }
.ifield .tool { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--text-3); border: 0; background: transparent; }
.ifield .tool:hover { background: var(--line); color: var(--text); }
.ifield .tool svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Interrupteur */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 34px; height: 20px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--t-violet); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ContrÃ´le segmentÃ© */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-hover); border-radius: 10px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 7px; color: var(--text-2); font-weight: 560; font-size: 13px; }
.seg button:hover { color: var(--text); }
.seg button.is-active { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); }

/* --------------------------------------------------------------------- Tags */
.tag {
    display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px;
    font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1; border: 0;
    background: var(--t-gray-bg); color: var(--t-gray);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.tag.no-dot::before { display: none; }
.tag-blue { background: var(--t-blue-bg); color: var(--t-blue); }
.tag-amber { background: var(--t-amber-bg); color: var(--t-amber); }
.tag-green { background: var(--t-green-bg); color: var(--t-green); }
.tag-violet { background: var(--t-violet-bg); color: var(--t-violet); }
.tag-red { background: var(--t-red-bg); color: var(--t-red); }
.tag-gray { background: var(--t-gray-bg); color: var(--t-gray); }
.tag-slate { background: var(--t-slate-bg); color: var(--t-slate); }
.tag-teal { background: var(--t-teal-bg); color: var(--t-teal); }
.tag-olive { background: var(--t-olive-bg); color: var(--t-olive); }
.tag-plain { background: var(--bg-hover); color: var(--text-2); }
.tag-plain::before { display: none; }
button.tag { cursor: pointer; padding-right: 7px; transition: filter .12s; }
button.tag:hover { filter: brightness(.96); }
button.tag .chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .6; }
.tag svg { width: 12px; height: 12px; }
.chip-id {
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace; font-size: 12px; font-weight: 600;
    color: var(--text-2); background: var(--bg-hover); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; letter-spacing: .02em; cursor: copy;
}
.chip-id:hover { background: var(--line); }

/* ------------------------------------------------------------------- Cartes */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px 24px; }
.card-title { font-size: 15px; font-weight: 680; letter-spacing: -.01em; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { padding: 20px 22px 22px; }
.kpi-label { color: var(--text-2); font-weight: 520; font-size: 13.5px; }
.kpi-value { margin-top: 10px; font-size: 30px; font-weight: 740; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-note { margin-top: 8px; font-size: 12.5px; color: var(--text-3); min-height: 18px; }
.kpis.is-potential .kpi { background: var(--bg-soft); border-style: dashed; box-shadow: none; }
.kpis.is-potential .kpi-value { color: var(--text-2); }
.kpis.is-potential .kpi { padding: 16px 20px 18px; }
.kpis.is-potential .kpi-value { font-size: 22px; margin-top: 6px; }
.section-note { margin: -4px 0 14px; color: var(--text-3); font-size: 13px; }

/* Compteurs */
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.counter { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.counter b { font-size: 20px; font-weight: 720; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.counter span { color: var(--text-2); }
a.counter:hover { background: var(--bg-soft); }

/* Courbe */
.chart-wrap { position: relative; }
.chart-legend { display: flex; align-items: center; gap: 16px; color: var(--text-2); font-size: 13px; }
.chart-legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 7px; vertical-align: middle; background: var(--text); }
.chart-legend i.net { background: #9db8f8; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .line-gross { fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-net { fill: none; stroke: #9db8f8; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--bg); stroke: var(--text); stroke-width: 2; }
.chart .dot.is-current { fill: var(--text); }
.chart .hover-line { stroke: var(--line-strong); stroke-dasharray: 3 3; }
.chart-tip {
    position: absolute; pointer-events: none; z-index: 5; min-width: 150px; padding: 10px 12px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); font-size: 13px; transform: translate(-50%, -100%);
}
.chart-tip b { display: block; margin-bottom: 4px; font-weight: 680; }
.chart-tip div { display: flex; justify-content: space-between; gap: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.chart-tip div strong { color: var(--text); font-weight: 650; }
.chart-empty { position: absolute; inset: 0 0 28px 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.chart-empty div { padding: 8px 16px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--text-2); box-shadow: var(--shadow); }
.chart-foot { margin-top: 10px; color: var(--text-3); font-size: 12.5px; }

/* Blocs de rappels */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.remind-block { overflow: hidden; }
.remind-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.remind-head h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.count-pill { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--bg-hover); color: var(--text-2); }
.remind-block.is-today { border-top: 3px solid #f2b24c; }
.remind-block.is-late { border-top: 3px solid #e57575; }
.remind-block.is-today .count-pill { background: var(--t-amber-bg); color: var(--t-amber); }
.remind-block.is-late .count-pill { background: var(--t-red-bg); color: var(--t-red); }
.remind-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.remind-item:last-child { border-bottom: 0; }
.remind-main { min-width: 0; }
.remind-name { font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.remind-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.remind-company { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remind-meta { margin-top: 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-2); font-size: 13.5px; }
.remind-meta a.tel { display: inline-flex; align-items: center; gap: 6px; font-weight: 560; color: var(--text); }
.remind-meta a.tel:hover { color: var(--blue); }
.remind-meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.remind-when { font-variant-numeric: tabular-nums; }
.remind-when.late { color: var(--t-red); font-weight: 600; }
.remind-actions { display: flex; align-items: flex-start; gap: 6px; }
.remind-note { margin-top: 4px; color: var(--text-3); font-size: 13px; }
.remind-more { padding: 10px 14px; border-top: 1px solid var(--line); text-align: center; }
.block-empty { padding: 30px 20px; color: var(--text-3); text-align: center; }

/* ----------------------------------------------------------------- Barre d'outils */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.search { position: relative; flex: 1; max-width: 520px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.search .input { height: 40px; padding-left: 38px; padding-right: 40px; border-radius: 10px; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11.5px ui-monospace, monospace; color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; pointer-events: none; }
.search .clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 6px; border: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; }
.search .clear:hover { background: var(--bg-hover); color: var(--text); }
.search .clear svg { position: static; transform: none; width: 14px; height: 14px; stroke: currentColor; }
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pills-label { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-right: 6px; min-width: 52px; }
.pill {
    display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px;
    border: 1px solid var(--line-strong); background: var(--bg); color: var(--text-2); font-size: 13.5px; font-weight: 540;
    transition: background .12s, border-color .12s;
}
.pill:hover { background: var(--bg-hover); color: var(--text); }
.pill.is-active { background: var(--text); border-color: var(--text); color: #fff; }
.pill small { color: var(--text-3); font-size: 12px; font-weight: 600; }
.pill.is-active small { color: rgba(255,255,255,.65); }
.select-btn {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 230px; max-width: 320px; height: 32px; padding: 0 10px 0 13px;
    border: 1px solid var(--line-strong); border-radius: 99px; background: var(--bg); color: var(--text-2); font-size: 13.5px; font-weight: 540;
    transition: background .12s, border-color .12s;
}
.select-btn:hover { background: var(--bg-hover); color: var(--text); }
.select-btn.has-value { background: var(--text); border-color: var(--text); color: #fff; }
.select-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-btn svg { width: 14px; height: 14px; opacity: .7; }
.dd-panel { width: 300px; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); }
.dd-search { position: relative; }
.dd-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.dd-search .input { height: 36px; padding-left: 33px; }
.dd-list { margin-top: 6px; max-height: 280px; overflow-y: auto; }
.dd-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; text-align: left; font-size: 14px; }
.dd-item.is-hover { background: var(--bg-hover); }
.dd-item .dd-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-item small { color: var(--text-3); font-weight: 600; }
.dd-item .check { width: 14px; height: 14px; }
.dd-empty { padding: 14px 10px; color: var(--text-3); text-align: center; }
.list-meta { display: flex; align-items: center; justify-content: space-between; margin: -4px 2px 10px; color: var(--text-3); font-size: 13px; }

/* ----------------------------------------------------------------- Tableau */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
.list th {
    text-align: left; padding: 12px 16px; font-size: 12.5px; font-weight: 600; color: var(--text-3); white-space: nowrap;
    border-bottom: 1px solid var(--line); background: var(--bg);
}
.list th button { border: 0; background: transparent; padding: 0; color: inherit; font-weight: inherit; font-size: inherit; display: inline-flex; align-items: center; gap: 5px; border-radius: 4px; }
.list th button:hover { color: var(--text); }
.list th button.is-sorted { color: var(--text); }
.list th .arrow { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.list th button:hover .arrow { opacity: .35; }
.list th button.is-sorted .arrow { opacity: 1; }
.list th .sep { color: var(--line-strong); margin: 0 6px; }
.list th, .list td { padding-left: 14px; padding-right: 14px; }
.list th:first-child, .list td:first-child { padding-left: 20px; }
.list th:last-child, .list td:last-child { padding-right: 20px; }
.list td { padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; transition: background .1s; }
.list tbody tr:hover { background: var(--bg-soft); }
.list tr.is-dim { opacity: .62; }
.cell-name { min-width: 180px; }
.cell-name .n { font-weight: 640; letter-spacing: -.005em; }
.cell-name .sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; color: var(--text-3); font-size: 12.5px; }
.cell-name .sub .mono { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }
.cell-muted { color: var(--text-2); }
.cell-empty { color: #bdbdc2; }
.cell-company { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-phone { white-space: nowrap; min-width: 150px; }
.cell-phone a.tel { font-weight: 540; font-variant-numeric: tabular-nums; }
.cell-phone a.tel:hover { color: var(--blue); }
.cell-date { white-space: nowrap; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cell-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.amount { font-weight: 640; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount-sub { color: var(--text-3); font-size: 12.5px; }
button.amount-btn { border: 0; background: transparent; padding: 4px 8px; margin: -4px -8px; border-radius: 7px; text-align: left; }
button.amount-btn:hover { background: var(--bg-hover); }

/* Pastilles NRP */
.nrp { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.nrp-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--text-3); margin-right: 3px; }
.nrp-dot {
    width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--bg);
    font-size: 11px; font-weight: 700; color: var(--text-3); display: grid; place-items: center; padding: 0;
    transition: transform .1s, background .12s, border-color .12s, color .12s;
}
.nrp-dot:hover { border-color: var(--t-slate); color: var(--t-slate); transform: scale(1.08); }
.nrp-dot.is-set { background: var(--t-slate-bg); border-color: transparent; color: var(--t-slate); }
.nrp-dot.is-set:hover { background: #dce3ec; }
.nrp-dot.is-locked { opacity: .55; cursor: not-allowed; }
.nrp-dot.is-locked:hover { transform: none; }
.nrp-big { display: flex; gap: 8px; flex-wrap: wrap; }
.nrp-big .nrp-dot { width: auto; height: 34px; border-radius: 9px; padding: 0 14px; font-size: 13px; }

/* Pagination */
.pager { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px 0; color: var(--text-3); font-size: 13px; }
.pager .btns { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- Ã‰tats vides */
.empty { text-align: center; padding: 84px 24px 96px; }
.empty-art { width: 76px; height: 76px; margin: 0 auto 26px; border-radius: 22px; background: var(--bg-soft); border: 1px solid var(--line); display: grid; place-items: center; }
.empty-art svg { width: 32px; height: 32px; fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty h2 { font-size: 20px; font-weight: 720; letter-spacing: -.02em; }
.empty p { margin: 8px auto 26px; max-width: 380px; color: var(--text-2); }
.empty.compact { padding: 56px 24px 64px; }

/* ----------------------------------------------------------------- Fiche */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 520; margin-bottom: 22px; padding: 4px 8px 4px 2px; border-radius: 6px; }
.back:hover { color: var(--text); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fiche-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 34px; }
.fiche-title { font-size: 30px; line-height: 1.15; font-weight: 750; letter-spacing: -.03em; }
.fiche-title.is-empty { color: var(--text-3); }
.fiche-company { margin-top: 6px; color: var(--text-2); font-size: 16px; }
.fiche-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fiche-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.fiche-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.fiche-card { padding: 22px 24px 20px; }
.fiche-card .card-title { margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 12px; padding: 7px 0; align-items: center; }
.kv > span:first-child { color: var(--text-3); font-weight: 520; }
.kv .v { color: var(--text); }
.subtle { color: var(--text-3); font-size: 13px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

.nrp-log { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.nrp-log li { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; margin: 0 -10px; border-radius: 8px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.nrp-log li:hover { background: var(--bg-soft); }
.nrp-log li b { color: var(--text); font-weight: 640; }
.nrp-log .del { border: 0; background: transparent; width: 24px; height: 24px; border-radius: 6px; color: var(--text-3); opacity: 0; display: grid; place-items: center; }
.nrp-log li:hover .del { opacity: 1; }
.nrp-log .del:hover { background: var(--t-red-bg); color: var(--t-red); }
.nrp-log .del svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.last-call { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); color: var(--text-2); display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.last-call b { color: var(--text); font-weight: 640; font-variant-numeric: tabular-nums; }

.reminder-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.reminder-box .when { font-weight: 650; font-variant-numeric: tabular-nums; }
.reminder-box .when small { display: block; font-weight: 500; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; display: flex; justify-content: space-between; gap: 18px; padding: 0 0 18px 22px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 3px var(--bg); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.t-converted::before, .timeline li.t-reactivated::before { background: #57b97a; }
.timeline li.t-quote::before { background: #a98bea; }
.timeline li.t-nrp::before { background: #8fa1b8; }
.timeline li.t-reminder::before { background: #f0b04c; }
.timeline li.t-former_client::before { background: #a3a3a8; }
.timeline .t-label { color: var(--text); }
.timeline .t-date { color: var(--text-3); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.state-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.state-btn { height: 38px; border: 1px solid var(--line-strong); background: var(--bg); border-radius: 9px; font-weight: 560; font-size: 13.5px; color: var(--text-2); }
.state-btn:hover { background: var(--bg-hover); color: var(--text); }
.state-btn.is-active { border-color: transparent; }
.state-btn.is-active.s-client { background: var(--t-green-bg); color: var(--t-green); }
.state-btn.is-active.s-en_production { background: var(--t-teal-bg); color: var(--t-teal); }
.state-btn.is-active.s-termine { background: var(--t-olive-bg); color: var(--t-olive); }
.state-btn.is-active.s-ancien_client { background: var(--t-gray-bg); color: var(--t-gray); }
.money-calc { margin-top: 12px; padding: 12px 14px; background: var(--bg-soft); border-radius: 10px; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.money-calc div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.money-calc b { color: var(--text); font-weight: 640; }

/* --------------------------------------------------------- Popovers / menus */
.floating { position: fixed; z-index: 100; }
.menu { min-width: 190px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; text-align: left; color: var(--text); font-size: 14px; }
.menu-item:hover, .menu-item.is-hover { background: var(--bg-hover); }
.menu-item .tag { pointer-events: none; }
.menu-item .check { margin-left: auto; width: 14px; height: 14px; fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-item.is-danger { color: var(--t-red); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-label { padding: 6px 10px 4px; font-size: 11.5px; font-weight: 650; color: var(--text-3); letter-spacing: .03em; text-transform: uppercase; }
.menu-nrp { display: flex; gap: 6px; padding: 4px 10px 8px; }
.menu-nrp .nrp-dot { width: 32px; height: 32px; font-size: 12.5px; }
.pop { width: 340px; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); }
.pop-title { font-weight: 680; margin-bottom: 12px; }
.pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-chips button { height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text-2); font-size: 12.5px; font-weight: 560; }
.quick-chips button:hover { background: var(--bg-hover); color: var(--text); }

.combo-list { max-height: 260px; overflow-y: auto; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); }
.combo-opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; text-align: left; font-size: 14px; }
.combo-opt.is-hover { background: var(--bg-hover); }
.combo-opt .create { color: var(--text-3); }
.combo-opt .create b { color: var(--text); font-weight: 600; }
.combo-opt .plus { width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; }

.cal { width: 100%; user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-weight: 660; text-transform: capitalize; }
.cal-head button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); display: grid; place-items: center; }
.cal-head button:hover { background: var(--bg-hover); }
.cal-head svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--text-3); padding: 4px 0; }
.cal-day { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); padding: 0; }
.cal-day:hover { background: var(--bg-hover); }
.cal-day.is-out { color: #c4c4c8; }
.cal-day.is-today { font-weight: 750; box-shadow: inset 0 0 0 1px var(--line-strong); }
.cal-day.is-selected { background: var(--text); color: #fff; }
.cal-pop { width: 288px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); }
.cal-inline { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }

/* -------------------------------------------------------------------- Modales */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15, 15, 15, .32); display: grid; place-items: start center; overflow-y: auto; padding: 6vh 20px; animation: fade .14s ease-out; }
.modal { width: 100%; max-width: 640px; background: var(--bg); border-radius: 16px; box-shadow: 0 24px 60px -12px rgba(15,15,15,.3); animation: rise .16s ease-out; }
.modal.is-narrow { max-width: 460px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px 0; }
.modal-head h2 { font-size: 20px; font-weight: 740; letter-spacing: -.025em; }
.modal-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); display: grid; place-items: center; margin-right: -8px; }
.modal-x:hover { background: var(--bg-hover); color: var(--text); }
.modal-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.modal-body { padding: 18px 28px 6px; display: flex; flex-direction: column; gap: 26px; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 18px 28px 24px; }
.modal-foot .grow { margin-right: auto; color: var(--text-3); font-size: 13px; }
.form-section { display: flex; flex-direction: column; gap: 14px; }
.form-section-title { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.form-error { padding: 10px 12px; border-radius: 9px; background: var(--t-red-bg); color: var(--t-red); font-size: 13.5px; }
.dup-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.dup-list li { padding: 12px 14px; border-radius: 10px; background: var(--t-amber-bg); color: #6e4306; }
.dup-list li a { display: inline-block; margin-top: 6px; font-weight: 640; color: #6e4306; text-decoration: underline; text-underline-offset: 3px; }
.modal-text { color: var(--text-2); }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99) } to { opacity: 1; transform: none } }

/* -------------------------------------------------------------------- Toasts */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 14px; border-radius: 11px; background: #161616; color: #fff;
    font-size: 14px; font-weight: 520; box-shadow: 0 10px 28px -6px rgba(0,0,0,.35); animation: toast-in .18s ease-out;
}
.toast svg { width: 16px; height: 16px; fill: none; stroke: #6ee7a0; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.toast.is-error svg { stroke: #ff9b9b; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

.loading { padding: 80px 0; text-align: center; color: var(--text-3); }
.skeleton { background: linear-gradient(90deg, var(--bg-hover), var(--bg-soft), var(--bg-hover)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0 } }

/* -------------------------------------------------------------- Responsive */
@media (max-width: 1100px) {
    .kpis, .counters { grid-template-columns: repeat(2, 1fr); }
    .fiche-grid { grid-template-columns: 1fr; }
    .hide-lg { display: none; }
}
@media (max-width: 900px) {
    .sidebar { position: sticky; top: 0; inset: auto; width: 100%; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }
    .shell { flex-direction: column; }
    .main { margin-left: 0; }
    .brand-name, .sidebar-foot, .nav-link span { display: none; }
    .nav { flex-direction: row; margin-left: auto; }
    .sidebar-cta { width: auto; margin-left: 4px; }
    .page { padding: 30px 18px 90px; }
    .cols-2 { grid-template-columns: 1fr; }
    .hide-md { display: none; }
    .page-head > .btn-primary { display: none; }
    .page-head, .fiche-head { flex-direction: column; }
    .row-2, .row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .kpis, .counters { grid-template-columns: 1fr; }
    .ifield, .kv { grid-template-columns: 1fr; gap: 0; }
    .ifield > .label { padding-top: 0; }
    .toolbar { flex-wrap: wrap; }
    .search { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ======================================================================
   Comptes, rÃ´les, rendez-vous et calendrier (ajouts : mÃªmes variables et composants que le reste)
   ====================================================================== */

/* Ã‰cran sans session : pas de barre latÃ©rale */
.shell.is-auth .sidebar { display: none; }
.shell.is-auth .main { margin-left: 0; }
.counters-5 { grid-template-columns: repeat(5, 1fr); }
.counters-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2.is-spaced { margin-top: 20px; }
.sidebar-user { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); text-align: left; margin-top: auto; }
.sidebar-user:hover { background: var(--bg-hover); }
.sidebar-user-name { font-weight: 640; font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: 12px; color: var(--text-3); }
.sidebar-user + .sidebar-foot { margin-top: 0; }

/* Connexion / inscription / attente */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 40px 20px; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-card { width: 100%; max-width: 440px; padding: 30px 32px 28px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-title { font-size: 24px; font-weight: 750; letter-spacing: -.03em; }
.auth-lead { color: var(--text-2); }
.auth-submit { width: 100%; justify-content: center; height: 40px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link-btn { border: 0; background: transparent; padding: 0; color: var(--text-2); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }
.auth-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--t-green-bg); color: var(--t-green); display: grid; place-items: center; }
.auth-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Divers */
.modal.is-wide { max-width: 1120px; }
.note-text { white-space: pre-wrap; margin: 0; }
.notice-amber { padding: 12px 14px; border-radius: 10px; background: var(--t-amber-bg); color: #6e4306; margin-bottom: 16px; }
.plain-list { margin: 8px 0 0; padding-left: 18px; }
.team-tabs { margin: -10px 0 24px; overflow-x: auto; }
.tag-btn { border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.tag-btn .chev { width: 12px; height: 12px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inline-select { width: auto; min-width: 200px; height: 32px; }
.period-label { min-width: 0; margin: 0 2px 0 8px; }
.period-field { width: 150px; }
.period-field .input { height: 32px; }
.hours-grid { display: flex; flex-direction: column; gap: 8px; }
.hours-row { display: grid; grid-template-columns: 110px 140px 110px 20px 110px; align-items: center; gap: 10px; }
.hours-day { font-weight: 600; }
.hours-time .input { height: 34px; }
.mini-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.mini-table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; padding: 6px 0; }
.mini-table td { padding: 8px 0; border-top: 1px solid var(--line); }
.mini-table th:not(:first-child), .mini-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; width: 90px; }
.activity-box { padding: 16px 20px 18px; }
.notif.is-read { opacity: .65; }
.remind-head .btn { margin-left: auto; }
.timeline li.t-appointment::before { background: #a98bea; }
.timeline li.t-sale::before, .timeline li.t-paid::before { background: #57b97a; }
.timeline li.t-assigned::before { background: #8fa1b8; }

/* Rendez-vous : formulaire, fiche de suivi */
.appt-layout { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
.appt-form { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.appt-calendar { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.appt-chosen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); }
.appt-chosen span { color: var(--text-2); }
.pick { position: relative; }
.pick-list { margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-pop); padding: 6px; max-height: 260px; overflow-y: auto; }
.pick-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; text-align: left; }
.pick-item:hover { background: var(--bg-hover); }
.pick-item span { color: var(--text-3); font-size: 12.5px; }
.slot-msg { padding: 9px 12px; border-radius: 9px; background: var(--t-red-bg); color: var(--t-red); font-size: 13.5px; }
.appt-detail { display: flex; flex-direction: column; gap: 22px; }
.appt-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.appt-when { font-size: 18px; font-weight: 720; letter-spacing: -.02em; }
.appt-who { margin-top: 4px; font-weight: 600; }
.appt-who a:hover { text-decoration: underline; text-underline-offset: 3px; }
.appt-time { font-variant-numeric: tabular-nums; }
.appt-states { grid-template-columns: repeat(3, 1fr); }

/* Calendrier de disponibilitÃ©s */
.avail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); overflow: hidden; }
.avail-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.avail-bar .grow { flex: 1; }
.avail-label { font-weight: 680; margin-left: 6px; }
.avail-tz { color: var(--text-3); font-size: 12.5px; }
.avail-notice { padding: 10px 14px; background: var(--t-red-bg); color: var(--t-red); }
.avail-scroll { overflow: auto; max-height: 560px; }
.avail.is-compact .avail-scroll { max-height: 420px; }
.avail-grid { display: grid; grid-template-columns: 52px repeat(var(--cols, 7), minmax(0, 1fr)); min-width: 520px; }
.avail.is-compact .avail-grid { min-width: 0; }
.avail-day { border-left: 1px solid var(--line); min-width: 0; }
.avail-axiscol { border-left: 0; }
/* En-têtes (jours ET axe) : hauteur fixe commune = même origine verticale pour l'axe des heures et les colonnes */
.avail { --avail-head-h: 48px; }
.avail-dayhead { position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; height: var(--avail-head-h); padding: 0; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.25; color: var(--text-3); }
.avail-dayhead b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.avail-dayhead.is-today b { background: var(--text); color: #fff; border-radius: 99px; padding: 0 8px; }
.avail-axis { position: relative; }
/* Chaque graduation commence exactement sur la ligne de son heure (pas de décalage de centrage) */
.avail-hour { position: absolute; left: 0; right: 6px; height: 14px; line-height: 14px; text-align: right; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.avail-col { position: relative; }
.avail-slot { position: absolute; left: 0; right: 0; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 0; }
.avail-slot:nth-child(even) { border-top-color: transparent; }   /* lignes pleines sur les heures, effacées sur les demi-heures */
.avail-slot.is-free { cursor: pointer; background: transparent; }
.avail-slot.is-free:hover { background: var(--t-green-bg); }
.avail-slot.is-off { cursor: not-allowed; background: repeating-linear-gradient(135deg, var(--bg-soft), var(--bg-soft) 5px, #f1f1ef 5px, #f1f1ef 10px); }
.avail-slot.is-busy-cell { cursor: not-allowed; background: transparent; }
.avail-closed { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 12.5px; pointer-events: none; }
.avail-block { position: absolute; left: 3px; right: 3px; z-index: 2; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 3px 6px; border: 0; border-radius: 7px; background: var(--t-gray-bg); color: var(--t-gray); font-size: 12px; line-height: 1.25; text-align: left; }
.avail-block b { font-variant-numeric: tabular-nums; font-weight: 650; }
.avail-block span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.avail-block.is-mine { background: var(--t-violet-bg); color: var(--t-violet); cursor: pointer; }
.avail-block.is-mine:hover { box-shadow: 0 0 0 2px var(--t-violet); }
.avail-sel { position: absolute; left: 1px; right: 1px; z-index: 1; border: 2px solid var(--blue); background: var(--blue-ring); border-radius: 7px; pointer-events: none; font-size: 11.5px; color: var(--t-blue); padding: 1px 5px; }
.avail-sel.is-bad { border-color: #e26d6d; background: rgba(226, 109, 109, .16); color: var(--t-red); }
.avail-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #e57575; z-index: 2; pointer-events: none; }
.avail-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; }
.avail-legend span { display: inline-flex; align-items: center; gap: 6px; }
.avail-legend i { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--bg); }
.avail-legend .lg-busy { background: var(--t-gray-bg); }
.avail-legend .lg-mine { background: var(--t-violet-bg); }
.avail-legend .lg-off { background: repeating-linear-gradient(135deg, var(--bg-soft), var(--bg-soft) 3px, #e6e6e3 3px, #e6e6e3 6px); }

@media (max-width: 1100px) {
    .counters-5, .counters-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .appt-layout { grid-template-columns: 1fr; }
    .appt-states { grid-template-columns: repeat(2, 1fr); }
    .hours-row { grid-template-columns: 90px 120px 1fr 16px 1fr; }
    .sidebar-user { width: auto; margin-top: 0; padding: 6px 9px; min-width: 0; }
    .sidebar-user-name { max-width: 64px; }
    .sidebar-user-role { display: none; }
    .sidebar-cta { font-size: 0; gap: 0; width: 36px; padding: 0; justify-content: center; flex: none; }
    .sidebar .nav { margin-left: auto; }
}
/* Récupération, changement obligatoire, bouton afficher/masquer */
.pw-toggle { border: 0; background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 600; padding: 0 12px; height: 36px; border-radius: 6px; }
.pw-toggle:hover { color: var(--text); }
.notice-ok { padding: 10px 12px; border-radius: 9px; background: var(--t-green-bg); color: var(--t-green); font-size: 13.5px; }
/* Rendez-vous : prospect choisi (coordonnées) et bouton « Créer un prospect » */
.pick-row { display: flex; gap: 8px; align-items: flex-start; }
.pick-row .pick { flex: 1; min-width: 0; }
.pick-row .btn { flex: none; height: 38px; }
.appt-chosen { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.appt-chosen-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.appt-chosen-contact { grid-column: 1; display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }