/* =====================================================================
   EFFAGREEN v2 — Design system
   Palette « terroir » : vert forêt, surfaces chaudes, accents terre
   ===================================================================== */
:root {
    --brand: #15803d;
    --brand-600: #16a34a;
    --brand-700: #166534;
    --brand-50: #f0fdf4;
    --brand-100: #dcfce7;
    --earth: #a16207;
    --earth-50: #fefce8;

    --bg: #f5f6f2;
    --surface: #ffffff;
    --surface-2: #f8faf7;
    --text: #14201a;
    --text-2: #334155;
    --muted: #64748b;
    --border: #e3e7df;
    --border-strong: #cfd6cb;

    --side-bg: #0f1d16;
    --side-text: #c9d6cd;
    --side-muted: #7f9487;
    --side-hover: #1a2e23;
    --side-active: #224230;

    --success: #15803d; --success-bg: #dcfce7;
    --warning: #b45309; --warning-bg: #fef3c7;
    --danger: #b91c1c;  --danger-bg: #fee2e2;
    --info: #1d4ed8;    --info-bg: #dbeafe;
    --neutral: #475569; --neutral-bg: #eef2f0;
    --violet: #6d28d9;  --violet-bg: #ede9fe;

    --radius: 10px;
    --radius-sm: 7px;
    --shadow-1: 0 1px 2px rgba(16, 32, 24, .06), 0 1px 3px rgba(16, 32, 24, .05);
    --shadow-2: 0 8px 24px rgba(16, 32, 24, .10), 0 2px 6px rgba(16, 32, 24, .06);
    --shadow-3: 0 24px 60px rgba(16, 32, 24, .22);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --side-w: 250px;
    --head-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 14px; }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--success); } .neg { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- Boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); font: 500 13.5px/1 var(--font); cursor: pointer;
    white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; text-decoration: none !important;
}
.btn:hover { background: var(--surface-2); border-color: #b7c2b2; }
.btn:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-success { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-danger { background: var(--surface); border-color: #f1b4b4; color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-secondary { background: var(--surface-2); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(20, 40, 28, .06); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn .ico { font-size: 15px; line-height: 1; }

/* ---------------------------------------------------------------- Champs */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > span, .fld-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.fld-label .req { color: var(--danger); margin-left: 2px; }
.fld-help { font-size: 12px; color: var(--muted); }
.fld-err { font-size: 12px; color: var(--danger); font-weight: 500; }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=date],
input[type=datetime-local], input[type=time], input[type=month], input[type=search], input[type=file], select, textarea, .form-control {
    width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: #fff; color: var(--text); font: 400 14px/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 80px; resize: vertical; }
select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus, .form-control:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(22, 163, 74, .16); }
input[readonly], .is-readonly { background: var(--surface-2); color: var(--text-2); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
input[type=color] { width: 56px; height: 36px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; }
.input-unit { position: relative; display: flex; }
.input-unit input { padding-right: 46px; }
.input-unit .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12.5px; pointer-events: none; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; min-height: 36px; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track { width: 38px; height: 22px; border-radius: 99px; background: #cbd5d0; position: relative; transition: background .15s; flex: none; }
.toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.toggle input:checked + .track { background: var(--brand-600); }
.toggle input:checked + .track::after { transform: translateX(16px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

/* ---------------------------------------------------------------- Alertes & badges */
.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13.5px; border: 1px solid transparent; }
.alert-danger { background: var(--danger-bg); color: #7f1d1d; border-color: #fecaca; }
.alert-info { background: var(--info-bg); color: #1e3a8a; border-color: #bfdbfe; }
.alert-warning { background: var(--warning-bg); color: #78350f; border-color: #fde68a; }
.alert-success { background: var(--success-bg); color: #14532d; border-color: #bbf7d0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral); line-height: 1.6; }
.b-success { background: var(--success-bg); color: var(--success); }
.b-warning { background: var(--warning-bg); color: var(--warning); }
.b-danger { background: var(--danger-bg); color: var(--danger); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-violet { background: var(--violet-bg); color: var(--violet); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ---------------------------------------------------------------- Connexion */
.login-page { background: var(--side-bg); min-height: 100vh; }
.login-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-hero { padding: 56px 64px; color: #e6efe9; display: flex; flex-direction: column; justify-content: center; gap: 22px;
    background: radial-gradient(1200px 600px at -10% -20%, rgba(34,197,94,.22), transparent 60%), radial-gradient(800px 500px at 110% 120%, rgba(161,98,7,.25), transparent 60%), var(--side-bg); }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.login-hero h1 { font-size: 34px; line-height: 1.15; color: #fff; letter-spacing: -.025em; max-width: 520px; }
.login-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 15px; }
.login-points li { display: flex; gap: 12px; align-items: center; }
.login-points span { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.07); flex: none; }
.login-foot { color: var(--side-muted); font-size: 13px; }
.login-panel { background: var(--bg); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; gap: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 14px; padding: 32px; box-shadow: var(--shadow-2); border: 1px solid var(--border); }
.login-card h2 { font-size: 22px; margin-bottom: 4px; }
.login-card .muted { margin-bottom: 20px; }

/* ---------------------------------------------------------------- Coque de l'application */
.app { display: flex; min-height: 100vh; }
.side { width: var(--side-w); background: var(--side-bg); color: var(--side-text); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .2s; }
.side-head { height: var(--head-h); display: flex; align-items: center; gap: 10px; padding: 0 18px; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.02em; border-bottom: 1px solid rgba(255,255,255,.06); flex: none; }
.side-head small { font-weight: 500; color: var(--side-muted); font-size: 11px; margin-left: auto; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 10px 20px; scrollbar-width: thin; scrollbar-color: #2b4235 transparent; }
.nav-sec { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--side-muted); padding: 16px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--side-text); font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none !important; position: relative; }
.nav-link:hover { background: var(--side-hover); color: #fff; }
.nav-link.active { background: var(--side-active); color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: #4ade80; }
.nav-link .ni { width: 20px; text-align: center; font-size: 15px; flex: none; }
.nav-link .nb { margin-left: auto; background: #b91c1c; color: #fff; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 99px; line-height: 17px; }
.side-foot { border-top: 1px solid rgba(255,255,255,.06); padding: 10px; flex: none; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.me-card:hover { background: var(--side-hover); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, #22c55e, #15803d); flex: none; }
.me-card .n { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.25; }
.me-card .r { color: var(--side-muted); font-size: 11.5px; }

.main { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.top { height: var(--head-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 22px; position: sticky; top: 0; z-index: 30; }
.top .burger { display: none; }
.top-title { font-size: 17px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-spacer { flex: 1; }
.farm-switch { max-width: 240px; height: 36px; font-weight: 600; }
.gsearch { position: relative; width: 300px; }
.gsearch input { padding-left: 34px; height: 36px; background: var(--surface-2); }
.gsearch .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.gsearch-res { position: absolute; top: 42px; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-2); max-height: 420px; overflow-y: auto; z-index: 60; padding: 6px; }
.gs-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.gs-item:hover, .gs-item.on { background: var(--brand-50); }
.gs-item .t { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; min-width: 82px; }
.bell { position: relative; }
.bell .cnt { position: absolute; top: -3px; right: -3px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.content { padding: 22px; flex: 1; min-width: 0; }
.backdrop-side { display: none; }

/* ---------------------------------------------------------------- Onglets de page */
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: -4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { padding: 9px 14px; border: 0; background: none; font: 600 13.5px var(--font); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------------------------------------------------------------- Cartes & grilles */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-h h3 { margin: 0; font-size: 14.5px; }
.card-h .sp { flex: 1; }
.card-b { padding: 16px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mb { margin-bottom: 16px; }
.mt { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row .sp { flex: 1; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-1); display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.kpi .ki { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 18px; background: var(--brand-50); flex: none; }
.kpi .kl { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .kv { font-size: 20px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .ks { font-size: 12px; color: var(--muted); }
.kpi.k-earth .ki { background: var(--earth-50); } .kpi.k-blue .ki { background: var(--info-bg); } .kpi.k-red .ki { background: var(--danger-bg); } .kpi.k-violet .ki { background: var(--violet-bg); }

.list { list-style: none; margin: 0; padding: 0; }
.li { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; } .li.click:hover { background: var(--surface-2); }
.li .lm { flex: 1; min-width: 0; }
.li .lt { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .ls { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .lic { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.empty .ei { font-size: 30px; margin-bottom: 6px; opacity: .8; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 200px; }

/* ---------------------------------------------------------------- Listes de données */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .sp { flex: 1; }
.toolbar .search { width: 240px; }
.toolbar select, .toolbar input[type=date] { width: auto; min-width: 130px; height: 34px; min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
.toolbar .search input { height: 34px; min-height: 34px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:hover td { background: #fafcf9; }
.tbl td.actions { width: 1%; white-space: nowrap; text-align: right; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border); }
.tbl .strong { font-weight: 600; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; border: 1px solid rgba(0,0,0,.1); }

/* ---------------------------------------------------------------- Panneau latéral (formulaires) */
.overlay { position: fixed; inset: 0; background: rgba(10, 22, 15, .42); z-index: 80; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: var(--bg); z-index: 81; display: flex; flex-direction: column; box-shadow: var(--shadow-3); animation: slide .2s ease-out; }
.drawer.narrow { width: min(520px, 100%); }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 0 20px; height: 62px; background: var(--surface); border-bottom: 1px solid var(--border); flex: none; }
.drawer-h h2 { margin: 0; font-size: 17px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-b { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.drawer-f { display: flex; gap: 8px; align-items: center; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--border); flex: none; }
.drawer-f .sp { flex: 1; }
.fsec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 2px; margin-bottom: 14px; }
.fsec-t { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--brand-700); margin-bottom: 12px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.fgrid .full { grid-column: 1 / -1; }
.ro-val { min-height: 36px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text-2); font-variant-numeric: tabular-nums; }
.lines { overflow-x: auto; margin: 0 -2px 12px; }
.lines table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; }
.lines th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; text-align: left; padding: 4px 4px 6px; white-space: nowrap; }
.lines td { padding: 3px; vertical-align: top; }
.lines td input, .lines td select { min-height: 32px; height: 32px; padding: 4px 7px; font-size: 13px; }
.lines td select { padding-right: 24px; background-position: right 7px center; }
.lines .ro-val { min-height: 32px; padding: 5px 7px; font-size: 13px; }
.lines td.x { width: 34px; }

/* ---------------------------------------------------------------- Modales */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 22, 15, .45); animation: fade .15s; }
.modal-box { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-3); width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .18s ease-out; }
.modal-box.lg { width: min(980px, 100%); }
.modal-box.md { width: min(720px, 100%); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-h h2 { margin: 0; flex: 1; font-size: 17px; }
.modal-b { padding: 18px 20px; overflow-y: auto; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--border); }

/* Compatibilité avec les modules existants (Conseil culture) */
.modal.legacy { display: none; }
.modal.legacy.active { display: flex; }
.legacy .modal-content { background: var(--surface); border-radius: 14px; width: min(900px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 20px; position: relative; }

/* ---------------------------------------------------------------- Toasts */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: min(560px, calc(100vw - 32px)); padding: 11px 14px; border-radius: 10px; background: #14201a; color: #fff; box-shadow: var(--shadow-2); font-size: 13.5px; animation: up .2s ease-out; }
.toast .ti { font-size: 16px; }
.toast.t-success .ti { color: #4ade80; } .toast.t-danger .ti { color: #f87171; } .toast.t-warning .ti { color: #fbbf24; }
.toast button { margin-left: auto; background: none; border: 0; color: #9fb3a6; font-size: 18px; cursor: pointer; }

/* ---------------------------------------------------------------- Panneau d'alertes */
.alerts-panel { position: fixed; top: calc(var(--head-h) + 6px); right: 16px; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-2); z-index: 70; }
.al { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.al:hover { background: var(--surface-2); }
.al .lv { width: 8px; border-radius: 4px; flex: none; }
.lv-urgent { background: var(--danger); } .lv-attention { background: #f59e0b; } .lv-info { background: #3b82f6; }

/* ---------------------------------------------------------------- Calendrier */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-h { padding: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.cal-d { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; min-width: 0; }
.cal-d.out { background: var(--surface-2); color: #a0aca4; }
.cal-d.today .cn { background: var(--brand); color: #fff; }
.cn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.cev { display: block; font-size: 11.5px; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cev:hover { filter: brightness(1.08); }
.cal-more { font-size: 11px; color: var(--muted); cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- Carte */
.map-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; height: calc(100vh - var(--head-h) - 110px); min-height: 480px; }
.map-side { overflow-y: auto; }
#map { height: 100%; border-radius: var(--radius); border: 1px solid var(--border); z-index: 1; }
.map-hint { position: absolute; z-index: 500; top: 12px; left: 50%; transform: translateX(-50%); background: #14201a; color: #fff; padding: 8px 14px; border-radius: 9px; font-size: 13px; box-shadow: var(--shadow-2); display: flex; gap: 10px; align-items: center; }
.map-wrap { position: relative; height: 100%; }
.leaflet-popup-content { font-family: var(--font); font-size: 13px; }

/* ---------------------------------------------------------------- Kanban tâches */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kcol { background: #eef1ea; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.kcol.drag-over { outline: 2px dashed var(--brand-600); outline-offset: -4px; }
.kcol-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; padding: 2px 4px 10px; }
.kcard { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow-1); cursor: grab; }
.kcard.dragging { opacity: .5; }
.kcard .kt { font-weight: 600; margin-bottom: 4px; }
.kcard .km { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.kcard .late { color: var(--danger); font-weight: 600; }

/* ---------------------------------------------------------------- Matrice des droits */
.perm-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.perm-matrix th, .perm-matrix td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: center; }
.perm-matrix th:first-child, .perm-matrix td:first-child { text-align: left; }
.perm-matrix thead th { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.perm-matrix input { width: 16px; height: 16px; accent-color: var(--brand); }
.role-card { border-left: 4px solid var(--neutral); }

/* ---------------------------------------------------------------- Divers */
.dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 6px 14px; font-size: 13.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tpl { text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; background: #fff; cursor: pointer; font: 500 13.5px var(--font); display: flex; gap: 10px; align-items: center; }
.tpl:hover { border-color: var(--brand-600); background: var(--brand-50); }
.loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--muted); }
.loader::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--brand); animation: spin .7s linear infinite; }
.diff { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 8px; border-radius: 6px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.progress { height: 7px; background: #e5e9e2; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand-600); border-radius: 99px; }
.progress.over > i { background: var(--danger); }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); background: #fff; }
.dropzone.over { border-color: var(--brand-600); background: var(--brand-50); }
iframe.doc-frame { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

/* Compatibilité : classes du module Conseil culture */
.form-control { display: block; }
.warning { color: var(--warning); } .good { color: var(--success); }

@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Responsive */
.btn-search-m { display: none !important; }
@media (max-width: 1200px) {
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gsearch { width: 220px; }
}
@media (max-width: 1024px) {
    .g3, .g-2-1 { grid-template-columns: minmax(0, 1fr); }
    .map-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
    .map-side { max-height: 260px; }
    #map, .map-wrap { height: 60vh; }
}
@media (max-width: 860px) {
    .side { transform: translateX(-100%); }
    .app.side-open .side { transform: none; }
    .app.side-open .backdrop-side { display: block; position: fixed; inset: 0; background: rgba(10,22,15,.45); z-index: 35; }
    .main { margin-left: 0; }
    .top { padding: 0 12px; gap: 8px; }
    .top .burger { display: inline-flex; }
    .gsearch { display: none; }
    .gsearch.open { display: block; position: fixed; top: calc(var(--head-h) + 6px); left: 12px; right: 12px; width: auto; z-index: 65; }
    .btn-search-m { display: inline-flex !important; }
    .farm-switch { max-width: 150px; }
    .content { padding: 14px; }
    .g2, .g4, .kanban { grid-template-columns: minmax(0, 1fr); }
    .login-wrap { grid-template-columns: minmax(0, 1fr); }
    .login-hero { padding: 32px 24px; }
    .login-hero h1 { font-size: 26px; }
    .login-points { display: none; }
    .toolbar .search { width: 100%; }
    .toolbar select, .toolbar input[type=date] { flex: 1 1 130px; }
    .fgrid { grid-template-columns: minmax(0, 1fr); }
    .dl { grid-template-columns: minmax(0, 1fr); }
    .dl dt { margin-top: 6px; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpi { padding: 12px; gap: 8px; flex-direction: column; }
    .kpi .ki { width: 30px; height: 30px; font-size: 15px; }
    .kpi .kv { font-size: 17px; }
    /* Tableaux en cartes */
    table.tbl.stack thead { display: none; }
    table.tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
    .tbl.stack tr { border-bottom: 1px solid var(--border); padding: 8px 12px; }
    .tbl.stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
    .tbl.stack td::before { content: attr(data-l); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; max-width: 45%; }
    .tbl.stack td.actions { justify-content: flex-end; width: auto; padding-top: 6px; }
    .tbl.stack td.actions::before { content: none; }
    .tbl.stack td.num { text-align: right; }
    .tbl.stack tfoot { display: block; }
    .drawer-b, .drawer-h, .drawer-f { padding-left: 14px; padding-right: 14px; }
    .modal { padding: 0; align-items: flex-end; }
    .modal-box, .modal-box.lg, .modal-box.md { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
    .cal-d { min-height: 64px; padding: 3px; }
    .cev { font-size: 0; height: 6px; padding: 0; margin-bottom: 2px; }
    .ptabs { margin-left: -14px; margin-right: -14px; padding: 0 8px; }
}

/* ---------------------------------------------------------------- Impression */
@media print {
    .side, .top, .toolbar, .ptabs, .drawer-f, .no-print { display: none !important; }
    .main { margin: 0; }
    .content { padding: 0; }
    .card { box-shadow: none; border: 0; }
    body { background: #fff; }
}

/* Calendrier interactif */
.cal-d { cursor: pointer; transition: background .12s; }
.cal-d:hover { background: #f4faf5; }
.cal-d.out:hover { background: #eef3ee; }
.cal-d.drop { background: var(--brand-100); outline: 2px dashed var(--brand-600); outline-offset: -3px; }
.cev[draggable=true] { cursor: grab; }

/* ---- Météo ---- */
.wx-big{font-size:56px;line-height:1;margin-right:6px}
.wx-t{font-size:40px;font-weight:700;line-height:1}.wx-t small{font-size:18px;font-weight:500;color:var(--muted)}
.wx-dl{display:grid;grid-template-columns:auto auto;gap:4px 14px;margin:0;font-size:13px}.wx-dl dt{color:var(--muted)}.wx-dl dd{margin:0;font-weight:600}
.wx-days{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:6px;margin-top:16px}
.wx-days.compact{grid-template-columns:repeat(4,1fr);margin-top:10px}
.wx-day{text-align:center;padding:8px 4px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}
.wx-day.on{border-color:var(--brand-600);background:var(--brand-50,#f0fdf4)}
.wx-i{font-size:24px;margin:2px 0}
.wx-rain{font-size:12px;color:var(--muted);font-weight:600}.wx-rain.wet{color:#1d4ed8}
.wx-pop{margin:6px 0;font-size:12px;line-height:1.5}
.skel,.skel-page{background:linear-gradient(90deg,#eef2ef 25%,#f7f9f8 50%,#eef2ef 75%);background-size:200% 100%;animation:skel 1.2s infinite;border-radius:12px}
.skel-page{height:420px}
@keyframes skel{0%{background-position:200% 0}100%{background-position:-200% 0}}
@media (max-width:640px){.wx-big{font-size:42px}.wx-t{font-size:32px}.wx-days{grid-template-columns:repeat(4,1fr)}}

/* ---- Messagerie ---- */
.cav{position:relative;width:38px;height:38px;border-radius:50%;display:inline-grid;place-items:center;color:#fff;font-weight:700;font-size:13px;flex:none}
.cav-sm{width:28px;height:28px;font-size:11px}.cav-xl{width:96px;height:96px;font-size:34px}
.cav .on{position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;background:#22c55e;border:2px solid #fff}
.cav-sp{width:28px;flex:none}
.dot-on{display:inline-block;width:8px;height:8px;border-radius:50%;background:#22c55e;vertical-align:middle}
.ok{color:var(--success);font-weight:600}
.chat{display:grid;grid-template-columns:320px minmax(0,1fr);height:calc(100vh - var(--head-h) - 110px);min-height:460px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-1)}
.chat-side{border-right:1px solid var(--border);display:flex;flex-direction:column;min-height:0}
.chat-side-h{display:flex;gap:8px;padding:12px;border-bottom:1px solid var(--border)}
.chat-side-h input{flex:1;min-width:0}
.chat-notif{margin:8px 12px 0;padding:8px 10px;border:1px dashed var(--brand-600);border-radius:8px;background:var(--brand-50);color:var(--brand-700);font-size:12.5px;cursor:pointer;text-align:left}
.chat-list{list-style:none;margin:0;padding:6px;overflow-y:auto;flex:1}
.chat-it{display:flex;gap:10px;align-items:center;padding:10px;border-radius:10px;cursor:pointer}
.chat-it:hover{background:var(--surface-2)}.chat-it.on{background:var(--brand-50)}
.ci-m{flex:1;min-width:0}.ci-t{display:flex;gap:8px;align-items:baseline}
.ci-n{font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ci-d{font-size:11px;color:var(--muted);flex:none}
.ci-p{flex:1;min-width:0;font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-it.unread .ci-p{color:var(--text);font-weight:600}.chat-it.unread .ci-d{color:var(--brand);font-weight:700}
.ci-b{background:var(--brand);color:#fff;border-radius:99px;font-size:11px;font-weight:700;padding:1px 7px;flex:none}
.chat-main{display:flex;flex-direction:column;min-width:0;min-height:0;background:#f3f5f0;position:relative}
.chat-main.drag::after{content:'Déposez le fichier pour l\'envoyer';position:absolute;inset:8px;border:2px dashed var(--brand-600);border-radius:12px;background:rgba(240,253,244,.9);display:grid;place-items:center;font-weight:700;color:var(--brand-700)}
.chat-empty{margin:auto;text-align:center;max-width:360px;padding:30px}.chat-empty .ei{font-size:48px}
.chat-h{display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--surface);border-bottom:1px solid var(--border)}
.chat-h-m{min-width:0}.chat-back{display:none}
.chat-body{flex:1;overflow-y:auto;padding:14px 18px;display:flex;flex-direction:column;gap:2px}
.chat-day{text-align:center;margin:12px 0 8px}.chat-day span{background:#e4e9e1;color:var(--text-2);font-size:11.5px;font-weight:600;padding:3px 10px;border-radius:99px}
.chat-sys{align-self:center;font-size:12px;color:var(--muted);background:#eaeee7;padding:4px 12px;border-radius:99px;margin:6px 0;text-align:center}
.chat-call{color:var(--text-2)}.chat-call.miss{color:var(--danger);background:var(--danger-bg)}
.chat-m{display:flex;gap:8px;align-items:flex-end;max-width:78%;margin-top:8px;position:relative}
.chat-m.grp{margin-top:2px}
.chat-m.me{align-self:flex-end;flex-direction:row-reverse}
.bub{background:#fff;border-radius:14px 14px 14px 4px;padding:7px 11px 5px;box-shadow:0 1px 1px rgba(0,0,0,.06);min-width:60px;overflow-wrap:anywhere;font-size:14px;line-height:1.45}
.chat-m.me .bub{background:#d9f7dc;border-radius:14px 14px 4px 14px}
.bub a{color:var(--info)}
.bub-n{font-size:12px;font-weight:700;color:var(--brand-700);margin-bottom:2px}
.bub-t{font-size:10.5px;color:var(--muted);text-align:right;margin-top:2px}
.tick{margin-left:4px}.tick.read{color:#0ea5e9;font-weight:700}
.bub-x{opacity:0;border:0;background:none;cursor:pointer;font-size:13px;padding:4px;align-self:center}
.chat-m:hover .bub-x{opacity:.6}.bub-x:hover{opacity:1!important}
.chat-img img{display:block;max-width:260px;max-height:260px;border-radius:10px;margin:2px 0}
.chat-file{display:flex;gap:10px;align-items:center;text-decoration:none;color:inherit!important;padding:6px 4px}
.cf-i{font-size:28px}.chat-cap{margin-top:4px}
.chat-f{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;background:var(--surface);border-top:1px solid var(--border)}
.chat-f textarea{flex:1;resize:none;min-height:40px;max-height:160px;border-radius:20px;padding:9px 14px}
.chat-f .btn-icon{height:40px;width:40px;border-radius:50%}
.seg{display:inline-flex;background:var(--surface-2);border:1px solid var(--border);border-radius:9px;padding:3px}
.seg button{border:0;background:none;padding:6px 14px;border-radius:7px;cursor:pointer;font-weight:600;color:var(--muted)}
.seg button.on{background:#fff;color:var(--text);box-shadow:var(--shadow-1)}
.chat-contacts{max-height:55vh;overflow-y:auto}
.pick-mode .chat-contacts .li{cursor:pointer}.pick-mode .chat-contacts .btn{display:none}
.pick-mode [data-pick]{display:inline-block!important;width:18px;height:18px}
@media (max-width:900px){
  .chat{grid-template-columns:minmax(0,1fr);height:calc(100vh - var(--head-h) - 90px)}.chat-side,.chat-main{min-width:0}
  .chat .chat-main{display:none}.chat.show-thread .chat-side{display:none}.chat.show-thread .chat-main{display:flex}
  .chat-back{display:inline-flex}.chat-m{max-width:88%}.chat-body{padding:10px}
  .chat-img img{max-width:200px}
}
/* ---- Appels ---- */
.call-ui{position:fixed;inset:0;z-index:1200;background:radial-gradient(ellipse at top,#1f3a2b,#0b1510);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;animation:fadeIn .2s}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.call-remote{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000;display:none}
.call-ui.rvid .call-remote{display:block}
.call-ui:not(.rvid) .call-remote{position:absolute;width:1px;height:1px;opacity:0}
.call-local{position:absolute;right:18px;top:18px;width:200px;max-width:32vw;aspect-ratio:4/3;object-fit:cover;border-radius:12px;background:#111;box-shadow:0 8px 24px rgba(0,0,0,.4);transform:scaleX(-1);display:none;z-index:2}
.call-ui.vid .call-local{display:block}
.call-info{text-align:center;z-index:1}.call-ui.rvid.st-live .call-info{position:absolute;top:18px;left:18px;text-align:left}
.call-ui.rvid.st-live .call-av{display:none}
.call-av .cav{box-shadow:0 0 0 10px rgba(255,255,255,.08),0 0 0 22px rgba(255,255,255,.04)}
.st-out .call-av .cav,.st-in .call-av .cav{animation:pulse 1.6s infinite}
@keyframes pulse{50%{box-shadow:0 0 0 16px rgba(255,255,255,.12),0 0 0 34px rgba(255,255,255,.05)}}
.call-n{font-size:24px;font-weight:700;margin-top:26px;text-shadow:0 1px 4px rgba(0,0,0,.5)}
.call-s{opacity:.85;margin-top:6px;font-variant-numeric:tabular-nums;text-shadow:0 1px 4px rgba(0,0,0,.5)}
.call-ctl{position:absolute;bottom:34px;left:0;right:0;display:flex;gap:16px;justify-content:center;z-index:2}
.call-ctl.in{display:none}.st-in .call-ctl{display:none}.st-in .call-ctl.in{display:flex}.st-end .call-ctl{display:none}
.cbtn{width:60px;height:60px;border-radius:50%;border:0;background:rgba(255,255,255,.16);color:#fff;font-size:24px;cursor:pointer;backdrop-filter:blur(6px)}
.cbtn:hover{background:rgba(255,255,255,.26)}.cbtn.off{background:#fff;color:#111}
.cbtn.end{background:#dc2626}.cbtn.end:hover{background:#b91c1c}.cbtn.ok{background:#16a34a}.cbtn.ok:hover{background:#15803d}
.cbtn[hidden]{display:none}
@media (max-width:640px){.cbtn{width:54px;height:54px;font-size:21px}.call-ctl{gap:10px;bottom:26px}.call-local{width:110px;top:12px;right:12px}}

/* ---- Éditeur de documents ---- */
.ed{display:flex;flex-direction:column;min-height:0;position:relative;background:#e9ece6}
.ed-tb{display:flex;flex-wrap:wrap;gap:2px;align-items:center;padding:6px 10px;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:2}
.ed-b{min-width:32px;height:32px;border:0;background:none;border-radius:6px;cursor:pointer;font-size:14px;color:var(--text);padding:0 6px}
.ed-b:hover{background:var(--surface-2)}.ed-b:active{background:var(--brand-100)}
.ed-sep{width:1px;height:20px;background:var(--border);margin:0 4px}
.ed-block{height:32px!important;min-height:32px!important;width:auto!important;min-width:128px;padding:2px 28px 2px 8px!important;font-size:13px!important}
.ed-scroll{flex:1;overflow:auto;padding:24px 12px}
.ed-area{background:#fff;max-width:794px;min-height:1000px;margin:0 auto;padding:72px 76px;box-shadow:0 2px 12px rgba(0,0,0,.12);outline:none;font:11pt/1.55 Calibri,"Segoe UI",Arial,sans-serif;color:#1f2937}
.ed-foot{display:flex;gap:10px;padding:4px 14px;font-size:11.5px;color:var(--muted);background:var(--surface);border-top:1px solid var(--border)}
.ed-pop{position:absolute;z-index:5;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow-2);padding:8px;display:flex;gap:6px;flex-wrap:wrap;max-width:260px;align-items:center}
.ed-sw{width:24px;height:24px;border-radius:50%;border:1px solid rgba(0,0,0,.15);cursor:pointer;font-size:11px}
.ed-grid{display:grid;grid-template-columns:repeat(8,18px);gap:3px}.ed-grid i{width:18px;height:18px;border:1px solid var(--border-strong);border-radius:3px;cursor:pointer}.ed-grid i.on{background:var(--brand-100);border-color:var(--brand-600)}
.ed-vars{display:flex;flex-direction:column;max-height:280px;overflow:auto;width:240px}.ed-vars button{border:0;background:none;text-align:left;padding:6px 8px;border-radius:6px;cursor:pointer}.ed-vars button:hover{background:var(--surface-2)}
.doc-page h1{font-size:20pt;margin:0 0 10px}.doc-page h2{font-size:15pt;margin:14px 0 8px;color:#1f2937}.doc-page h3{font-size:12.5pt;margin:16px 0 6px;color:#374151}.doc-page h4{font-size:11.5pt;color:#15803d;margin:12px 0 6px}
.doc-page p{margin:0 0 8px}.doc-page ul,.doc-page ol{margin:6px 0 10px;padding-left:24px}.doc-page blockquote{margin:8px 0;padding:6px 12px;border-left:3px solid #16a34a;background:#f8faf7}
.doc-page table{width:100%;border-collapse:collapse;margin:10px 0}.doc-page th,.doc-page td{border:1px solid #cbd5e1;padding:6px 8px;vertical-align:top}.doc-page th{background:#f1f5f9}
.doc-page .contract-header,.doc-page .letter-header,.doc-page .declaration-header,.doc-page .certificate-header{text-align:center;margin-bottom:22px;padding-bottom:14px;border-bottom:3px solid #16a34a}.doc-page .subtitle{color:#6b7280;font-style:italic}
.doc-page .party{background:#f8fafc;padding:10px 14px;border-left:4px solid #16a34a;margin:8px 0}.doc-page .separator{text-align:center;font-weight:bold;color:#6b7280;margin:10px 0}
.doc-page .article h4{border-bottom:1px solid #e5e7eb;padding-bottom:4px}
.doc-page .field{display:inline;background:#fef3c7;padding:0 4px;border-bottom:1px dotted #f59e0b;margin:0;cursor:text}
.doc-page .field-box{background:#fef3c7;padding:10px;border:1px dashed #f59e0b;margin:8px 0;min-height:40px}
.doc-page .info-table td{border:none;padding:3px 8px}.doc-page .closing{margin-top:28px;padding-top:12px;border-top:1px solid #e5e7eb}
.doc-page .signatures{display:flex;justify-content:space-between;gap:20px;margin-top:36px}.doc-page .signature-box{flex:1;text-align:center;padding:14px;border:1px solid #e5e7eb}.doc-page .signature-line{border-top:1px solid #333;margin-top:70px;padding-top:6px}
.doc-page .letter-object{background:#f8fafc;padding:10px 14px;margin:14px 0}.doc-page .reminder-box{background:#fef2f2;border:1px solid #fecaca;padding:10px 14px;margin:10px 0}.doc-page .result-box{background:#f0fdf4;border:2px solid #16a34a;padding:10px;text-align:center}
.doc-page hr{border:0;border-top:1px solid #cbd5e1;margin:14px 0}
.ded{position:fixed;inset:0;z-index:85;background:var(--bg);display:flex;flex-direction:column;animation:fadeIn .15s}
.ded-h{display:flex;align-items:center;gap:10px;padding:8px 14px;background:var(--surface);border-bottom:1px solid var(--border)}
.ded-title{border:1px solid transparent!important;font-weight:700;font-size:16px!important;max-width:460px;background:transparent!important}
.ded-title:hover,.ded-title:focus{border-color:var(--border-strong)!important;background:#fff!important}
.ded-b{flex:1;display:grid;grid-template-columns:minmax(0,1fr) 280px;min-height:0}
.ded-b:not(:has(.ded-side)){grid-template-columns:minmax(0,1fr)}
.ded-ed{display:flex;flex-direction:column;min-height:0}
.ded-side{border-left:1px solid var(--border);background:var(--surface);padding:16px;overflow:auto}.ded-side h3{margin:0 0 10px}
.ded-side .fgrid{grid-template-columns:1fr}
body.noscroll{overflow:hidden}
@media (max-width:900px){.ded-b{grid-template-columns:minmax(0,1fr)}.ded-side{display:none}.ed-area{padding:28px 20px;min-height:600px}.ed-scroll{padding:10px 4px}.ded-h .btn-sm{padding:0 8px}.ded-title{max-width:40vw}}

/* ---- Fluidité : progression, transitions, listes, menu réduit ---- */
#topbar-progress{position:fixed;top:0;left:0;height:3px;width:0;background:linear-gradient(90deg,#22c55e,#16a34a);z-index:2000;opacity:0;transition:width 8s cubic-bezier(.1,.7,.2,1),opacity .2s;pointer-events:none;box-shadow:0 0 8px rgba(34,197,94,.6)}
#topbar-progress.on{width:85%;opacity:1}
#topbar-progress.done{width:100%;transition:width .2s ease-out,opacity .3s .15s;opacity:0}
.page-in{animation:pageIn .22s ease-out}
@keyframes pageIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.tbl-wrap{transition:opacity .15s}.tbl-wrap.stale{opacity:.6}
.skel-tbl{display:flex;flex-direction:column;gap:8px;padding:14px}
.loader{min-height:120px}
.side-toggle{margin-left:6px;width:24px;height:24px;border-radius:6px;border:0;background:rgba(255,255,255,.06);color:var(--side-muted);cursor:pointer;font-size:14px;line-height:1;flex:none}
.side-toggle:hover{background:rgba(255,255,255,.14);color:#fff}
.side,.main{transition:width .18s ease,margin-left .18s ease,transform .2s}
@media (min-width:981px){
  .app.side-mini .side{width:68px}
  .app.side-mini .main{margin-left:68px}
  .app.side-mini .side-head{padding:0 10px;justify-content:center}
  .app.side-mini .side-head img,.app.side-mini .side-head .sh-n,.app.side-mini .side-head small{display:none}
  .app.side-mini .side-toggle{transform:rotate(180deg);margin:0}
  .app.side-mini .nav-sec{font-size:0;padding:10px 0 4px;border-top:1px solid rgba(255,255,255,.06);margin:6px 8px 0}
  .app.side-mini .nav-link{justify-content:center;padding:9px 0}
  .app.side-mini .nav-link .nl{display:none}
  .app.side-mini .nav-link .nb{position:absolute;top:2px;right:6px;margin:0}
  .app.side-mini .nav-link .ni{font-size:18px}
  .app.side-mini .me-card>div{display:none}.app.side-mini .me-card{justify-content:center}
}
@media (max-width:980px){.side-toggle{display:none}}

/* ---- Ma journée ---- */
.home{max-width:1320px}
.home-hero{display:flex;gap:18px;align-items:stretch;flex-wrap:wrap;background:linear-gradient(135deg,#14532d 0%,#166534 55%,#3f6212 100%);color:#fff;border-radius:16px;padding:22px 24px;margin-bottom:14px;box-shadow:var(--shadow-2)}
.hh-m{flex:1;min-width:260px}.home-hero .muted{color:rgba(255,255,255,.75)!important}
.home-hero h1{margin:4px 0 14px;font-size:28px;letter-spacing:-.02em}
.home-chips{display:flex;flex-wrap:wrap;gap:8px}
.hchip{display:inline-flex;gap:6px;align-items:center;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);color:#fff!important;padding:6px 12px;border-radius:99px;font-size:13px;text-decoration:none!important;cursor:pointer;font-family:inherit}
.hchip:hover{background:rgba(255,255,255,.2)}
.home-wx{display:flex;flex-direction:column;gap:10px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);border-radius:14px;padding:14px 16px;color:#fff!important;text-decoration:none!important;min-width:280px}
.home-wx:hover{background:rgba(255,255,255,.16)}
.hw-i{font-size:40px;line-height:1}.hw-t{font-size:26px;font-weight:700}.hw-d{line-height:1.7;opacity:.95}
.home-sc{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.hsc{display:inline-flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:9px 14px;font-weight:600;font-size:13px;cursor:pointer;color:var(--text);box-shadow:var(--shadow-1);transition:transform .12s,border-color .12s}
.hsc:hover{transform:translateY(-1px);border-color:var(--brand-600)}.hsc span{font-size:18px}
.stack-col{display:flex;flex-direction:column;gap:16px;min-width:0}
.hcheck{width:22px;height:22px;border-radius:50%;border:2px solid var(--border-strong);background:#fff;cursor:pointer;flex:none;transition:all .15s;position:relative}
.hcheck:hover{border-color:var(--brand-600);background:var(--brand-50)}
.home-task.done .hcheck{background:var(--brand-600);border-color:var(--brand-600)}
.home-task.done .hcheck::after{content:'✓';color:#fff;font-size:13px;font-weight:800;position:absolute;inset:0;display:grid;place-items:center}
.home-task.done .lt{text-decoration:line-through;color:var(--muted)}
.home-task{transition:height .25s,opacity .25s,padding .25s}.home-task.gone{height:0!important;opacity:0;padding-top:0;padding-bottom:0;overflow:hidden}
.li.click{cursor:pointer}.li.click:hover{background:var(--surface-2)}
@media (max-width:640px){.home-hero{padding:18px 16px}.home-hero h1{font-size:23px}.home-wx{min-width:0;width:100%}.hsc{padding:8px 11px}}
@media (max-width:640px){.home-chips{gap:6px}.hchip{padding:4px 10px;font-size:12px}.home-hero h1{margin-bottom:10px}}
.drawing .leaflet-interactive{pointer-events:none!important}.drawing .leaflet-tooltip{display:none}

/* ---- Conseil & décision ---- */
.cs-head{margin-bottom:14px}
.cs-wx{display:flex;gap:14px;flex-wrap:wrap;font-size:13px}
.cs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px;margin-bottom:14px}
.cs-card .card-h{gap:10px}.cs-ico{font-size:30px;line-height:1}
.cs-prog{display:flex;gap:3px;margin:10px 0}.cs-prog span{flex:1;height:6px;border-radius:3px;background:var(--border)}
.cs-prog span.done{background:var(--brand-600)}.cs-prog span.on{background:#f59e0b;box-shadow:0 0 0 2px rgba(245,158,11,.25)}
.cs-stade{background:var(--surface-2);border-radius:10px;padding:10px 12px;margin-top:6px}.cs-stade p{margin:4px 0 0;font-size:13.5px}
.cs-next{margin-top:10px;line-height:1.5}
.cs-tips{margin:10px 0 0;padding-left:18px;font-size:12.5px;color:var(--text-2)}
.card-f{padding:10px 14px;border-top:1px solid var(--border)}
.cs-chips{display:flex;gap:6px;flex-wrap:wrap}.cs-chip{display:inline-flex;gap:4px;align-items:center;background:var(--surface-2);border:1px solid var(--border);border-radius:99px;padding:4px 10px;font-size:12.5px;margin:2px 0}
.cs-choix{grid-template-columns:320px minmax(0,1fr);gap:16px;align-items:start}
.cs-form{position:sticky;top:calc(var(--head-h) + 12px)}
.cs-form .check{display:flex;gap:8px;align-items:center;font-size:13.5px}
.cs-clim{display:flex;gap:8px 12px;flex-wrap:wrap;margin-bottom:8px}
.cs-hist{margin:4px 0 0;padding-left:20px;font-size:13px}
.cs-res{margin-bottom:12px}.cs-res.elim{opacity:.7}
.cs-score{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;align-content:center;flex:none;border:4px solid}
.cs-score strong{font-size:20px;line-height:1}.cs-score small{font-size:9px;color:var(--muted)}
.cs-score.good{border-color:#16a34a;background:#f0fdf4}.cs-score.mid{border-color:#d97706;background:#fffbeb}.cs-score.low{border-color:#dc2626;background:#fef2f2}
.cs-crit{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:12px 0}
.cs-crit>div{display:flex;flex-direction:column;gap:3px}
.cs-bar{display:inline-block;width:100%;min-width:60px;height:6px;background:var(--border);border-radius:3px;overflow:hidden;vertical-align:middle}
.cs-bar i{display:block;height:100%;border-radius:3px}
.cs-eco{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:10px 12px;background:var(--surface-2);border-radius:10px}
.cs-eco>div{display:flex;flex-direction:column;gap:2px}
.cs-pm{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.cs-pm ul,ul.plus,ul.moins{margin:0;padding-left:0;list-style:none;font-size:12.5px}
ul.plus li::before{content:'✓ ';color:var(--success);font-weight:700}ul.moins li::before{content:'! ';color:#d97706;font-weight:800}
.cs-pm li,ul.plus li,ul.moins li{margin:3px 0}
.cs-more summary{cursor:pointer;font-weight:600;margin:10px 0}
.cs-cov{display:grid;grid-template-columns:130px 1fr 50px;gap:8px;align-items:center;margin:6px 0;font-size:13px}
.input-unit{display:flex;align-items:center;gap:6px}.input-unit input{flex:1}.input-unit span{color:var(--muted);font-size:12.5px;white-space:nowrap}
tr.tot td{border-top:2px solid var(--border-strong)}
@media (max-width:1000px){.cs-choix{grid-template-columns:minmax(0,1fr)}.cs-form{position:static}.cs-crit{grid-template-columns:repeat(3,1fr)}.cs-eco{grid-template-columns:1fr 1fr}.cs-pm{grid-template-columns:minmax(0,1fr)}}
.login-espace{display:flex;gap:12px;align-items:center;padding:10px 12px;margin:-4px 0 16px;background:var(--brand-50);border:1px solid var(--brand-100);border-radius:12px}
.le-ic{width:40px;height:40px;border-radius:10px;background:var(--brand-600);color:#fff;display:grid;place-items:center;font-weight:800;font-size:18px}
.espace-banner{display:flex;gap:10px;align-items:center;padding:8px 16px;font-size:13px;background:#fffbeb;border-bottom:1px solid #fde68a;color:#92400e}
.espace-banner.exp{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.espace-banner a{font-weight:700}
.es-gauge{margin:0 0 14px}.es-gauge .row{gap:6px;margin-bottom:6px;font-size:13.5px}
.es-mods{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:4px 12px;margin-top:8px}
.check{display:flex;gap:8px;align-items:center}
.warn{color:#b45309;font-weight:600}

/* ===== v3 : traitement de texte ===== */
.ed-tb select.ed-font{width:118px}.ed-tb select.ed-size{width:84px}
.ed-area .page-break{position:relative;border-top:2px dashed #cbd5e1;margin:26px -20px;height:0;break-after:page}
.ed-area .page-break::after{content:'Saut de page';position:absolute;left:50%;top:-10px;transform:translateX(-50%);background:#fff;padding:0 8px;font:600 10px/18px system-ui,sans-serif;color:#94a3b8;letter-spacing:.06em;text-transform:uppercase}
.ed-area img{max-width:100%;height:auto;cursor:pointer;border-radius:2px}.ed-area img:hover{outline:2px solid #93c5fd}
.ed-imgtb{display:flex;flex-wrap:wrap;gap:4px}.ed-pop:has(.ed-imgtb),.ed-pop:has(.ed-find){max-width:320px}
.ed-find{display:grid;gap:6px;width:290px}.ed-find input{width:100%}.ed-find .row{display:flex;gap:6px;flex-wrap:wrap}
.rd-wrap{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}
.rd-side{position:sticky;top:12px}.rd-side .rd-f{display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:8px 10px;border-radius:8px;border:0;background:none;color:var(--text);cursor:pointer;font:inherit}
.rd-side .rd-f:hover{background:var(--surface-2,#f1f5f9)}.rd-side .rd-f.on{background:var(--primary-50,#ecfdf3);color:var(--primary);font-weight:600}.rd-side .rd-f .n{margin-left:auto;font-size:12px;color:var(--muted)}
.rd-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.rd-card{position:relative;background:var(--surface,#fff);border:1px solid var(--border);border-radius:12px;padding:0;cursor:pointer;display:flex;flex-direction:column;overflow:hidden;transition:box-shadow .15s,transform .15s;text-align:left;font:inherit;color:inherit}
.rd-card:hover{box-shadow:var(--shadow-2);transform:translateY(-2px)}
.rd-card .pv{height:118px;padding:12px 14px;background:linear-gradient(#fff,#f8fafc);border-bottom:1px solid var(--border);font:10.5px/1.45 Georgia,serif;color:#475569;overflow:hidden;position:relative}
.rd-card .pv::after{content:'';position:absolute;left:0;right:0;bottom:0;height:34px;background:linear-gradient(transparent,#f8fafc)}
.rd-card .bd{padding:10px 14px 12px}.rd-card h4{margin:0 0 4px;font-size:14px;line-height:1.3}.rd-card .mt{font-size:12px;color:var(--muted)}
.rd-card .pin{position:absolute;top:8px;right:8px;font-size:13px}.rd-card .mn{position:absolute;bottom:8px;right:6px}
.rd-new{border-style:dashed;align-items:center;justify-content:center;min-height:190px;color:var(--primary);font-weight:600;gap:6px}
@media (max-width:800px){.rd-wrap{grid-template-columns:minmax(0,1fr)}.rd-side{position:static}.rd-side .card-b{display:flex;overflow-x:auto;gap:4px}.rd-side .rd-f{white-space:nowrap;width:auto}.rd-side h4,.rd-side hr{display:none}}
@media (max-width:900px){.ded-b:has(.ded-side){display:flex;flex-direction:column;overflow:auto}.ded-b:has(.ded-side) .ded-side{display:block;border-left:0;border-top:1px solid var(--border)}}

/* ===== v3 : carte professionnelle ===== */
.map-layout.v3 .map-side{display:flex;flex-direction:column;overflow:hidden}
.map-layout.v3 #map-list{flex:1;overflow:auto;margin:0}
.ms-tools{display:flex;gap:6px;padding:0 12px 8px}.ms-tools .search{flex:1;min-width:0}
.ms-sum{padding:0 14px 8px}.warn-t{color:#b45309;font-style:normal;font-weight:600}
.ms-foot{display:flex;gap:6px;padding:10px 12px;border-top:1px solid var(--border);flex-wrap:wrap}.ms-foot .btn{flex:1}
.map-search{position:absolute;z-index:600;top:10px;left:58px;width:min(420px,calc(100% - 120px))}
.geo-s{position:relative}.geo-s input{width:100%;height:38px;border-radius:10px;border:1px solid rgba(0,0,0,.15);padding:0 12px;box-shadow:0 2px 10px rgba(0,0,0,.18);background:#fff;font:inherit}
.geo-res{position:absolute;top:42px;left:0;right:0;background:#fff;border-radius:10px;box-shadow:var(--shadow-2);max-height:300px;overflow:auto;border:1px solid var(--border)}
.geo-res button{display:block;width:100%;text-align:left;border:0;background:none;padding:9px 12px;font:inherit;font-size:13px;cursor:pointer;border-bottom:1px solid #f1f5f9;color:#1f2937}.geo-res button:hover{background:#f0fdf4}
.map-tb{position:absolute;z-index:600;left:10px;top:84px;display:flex;flex-direction:column;background:#fff;border-radius:10px;box-shadow:0 2px 10px rgba(0,0,0,.2);overflow:hidden}
.map-tb button{width:36px;height:34px;border:0;background:#fff;cursor:pointer;font-size:16px;line-height:1}.map-tb button:hover{background:#f1f5f9}.map-tb button.on{background:#dcfce7}
.map-tb span{height:1px;background:#e5e7eb;margin:2px 6px}
.map-coord{position:absolute;z-index:600;left:10px;bottom:10px;background:rgba(255,255,255,.88);padding:2px 8px;border-radius:6px;font-family:ui-monospace,monospace;font-size:11px;pointer-events:none}
.map-coord:empty{display:none}
.map-legend{position:absolute;z-index:600;right:10px;bottom:52px;background:rgba(255,255,255,.95);padding:8px 10px;border-radius:9px;box-shadow:var(--shadow-2);font-size:12px;max-height:40%;overflow:auto}
.map-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-2px}
.map-hint.v3{top:auto;bottom:16px;flex-wrap:wrap;max-width:calc(100% - 24px);justify-content:center}.map-hint.v3 .muted-l{color:#a7b5ad;flex-basis:100%;text-align:center;order:9}
.map-hint.v3 .btn{background:#fff}.map-hint.v3 .btn-primary{background:var(--primary);color:#fff}.map-hint.v3 .btn.on{background:#fde68a}
.map-wrap.editing .map-tb{opacity:.45;pointer-events:none}
.leaflet-tooltip.pl-lbl{background:transparent;border:0;box-shadow:none;color:#fff;font-size:11.5px;line-height:1.25;text-align:center;text-shadow:0 0 3px #000,0 0 6px #000;font-weight:500}.leaflet-tooltip.pl-lbl::before{display:none}
.map-wrap.lbl-hide .leaflet-tooltip.pl-lbl{display:none}
.leaflet-tooltip.mz-lbl{background:#f97316;color:#fff;border:0;font-weight:700;border-radius:6px}.leaflet-tooltip.mz-lbl::before{display:none}
.pp{font-size:13px;line-height:1.45}.pp-r{margin-top:2px}.pp-a{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}.pp-a .btn{text-decoration:none}
.col-pick{display:flex;flex-wrap:wrap;gap:10px}.col-pick button{width:38px;height:38px;border-radius:10px;border:3px solid #fff;box-shadow:0 0 0 1px var(--border);cursor:pointer}
.map-wrap:fullscreen{background:#000}.map-wrap:fullscreen #map{border-radius:0}
.map-wrap.pseudo-fs{position:fixed;inset:0;z-index:2000;height:100%!important}
.globe-ov{position:fixed;inset:0;z-index:3000;background:#000}.globe-ov #globe{position:absolute;inset:0}
.globe-top{position:absolute;z-index:2;top:12px;left:12px;right:12px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.globe-top .map-search{position:static;width:min(420px,60vw)}
.globe-top .btn{background:rgba(255,255,255,.95)}
.globe-msg{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#cbd5e1;font-size:15px}
@media (max-width:900px){.map-layout.v3 .map-wrap{order:-1}.map-search{left:52px;right:58px;width:auto}.map-tb{top:84px}.map-tb button{height:31px}.map-layout.v3 .map-side{max-height:none}.map-layout.v3 #map-list{max-height:220px}.map-legend{display:none}}
.rd-q{height:36px}
@media (max-width:600px){.ded-h{flex-wrap:wrap;row-gap:6px;height:auto;padding-top:8px;padding-bottom:8px}.ded-title{flex:1 1 60%;max-width:none!important}.ded-h .sp{display:none}.ded-state{order:9;flex-basis:100%}}

/* ===== v3.1 : messagerie enrichie ===== */
.bub .m-code{background:rgba(15,23,42,.08);border-radius:4px;padding:0 4px;font:12.5px ui-monospace,Menlo,monospace}
.bub .m-pre{background:#0f172a;color:#e2e8f0;border-radius:8px;padding:8px 10px;margin:4px 0;font:12.5px/1.45 ui-monospace,Menlo,monospace;white-space:pre-wrap;overflow-x:auto;max-width:100%}
.bub .m-q{border-left:3px solid #94a3b8;margin:3px 0;padding:1px 8px;color:#475569}
.bub .m-l{margin:3px 0;padding-left:20px}.bub .m-l li{margin:1px 0}
.bub .m-at{color:var(--brand);font-weight:600}
.m-rep{display:flex;flex-direction:column;align-items:flex-start;width:100%;border:0;border-left:3px solid var(--brand);background:rgba(15,23,42,.05);border-radius:6px;padding:4px 8px;margin:0 0 5px;cursor:pointer;text-align:left;font:inherit;font-size:12.5px;color:inherit;min-width:0}
.m-rep strong{color:var(--brand);font-size:12px}.m-rep span{color:#475569;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.m-fwd{font-size:11.5px;color:#64748b;font-style:italic;margin-bottom:2px}
.m-ed{font-style:italic;margin-right:4px}
.bub-t{display:flex;gap:3px;justify-content:flex-end;align-items:center}
.m-reacs{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 -2px}
.m-reac{border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:0 7px;font-size:13px;line-height:22px;cursor:pointer}.m-reac.moi{border-color:var(--brand);background:#ecfdf3}
.bub-a{display:flex;gap:2px;align-self:center;opacity:0;transition:opacity .12s;background:#fff;border:1px solid var(--border);border-radius:999px;padding:1px 3px;box-shadow:0 1px 4px rgba(0,0,0,.08);flex:0 0 auto}
.bub-a button{border:0;background:none;cursor:pointer;width:28px;height:26px;border-radius:999px;font-size:14px;line-height:1}.bub-a button:hover{background:#f1f5f9}
.chat-m:hover .bub-a,.chat-m.sel .bub-a,.bub-a:focus-within{opacity:1}
@media (hover:none){.bub-a{display:none}.chat-m.sel .bub-a{display:flex;opacity:1;position:absolute;top:-32px;z-index:5}.chat-m.me.sel .bub-a{right:0}.chat-m:not(.me).sel .bub-a{left:36px}.chat-m.sel{margin-top:36px}}
.chat-m.flash .bub{animation:mflash 1.6s}@keyframes mflash{0%,40%{box-shadow:0 0 0 3px #facc15}100%{box-shadow:0 1px 1px rgba(0,0,0,.06)}}
.chat-pins button{width:100%;border:0;border-bottom:1px solid var(--border);background:#fffbeb;padding:7px 14px;text-align:left;cursor:pointer;font:inherit;font-size:13px}
.chat-ctx{display:flex;align-items:center;gap:10px;padding:6px 12px;background:var(--surface);border-top:1px solid var(--border)}
.chat-ctx .cx-m{flex:1;min-width:0;display:flex;flex-direction:column;border-left:3px solid var(--brand);padding-left:8px;font-size:12.5px}.chat-ctx .cx-m span{color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-fmt{display:flex;align-items:center;gap:2px;padding:4px 10px;background:var(--surface);border-top:1px solid var(--border);overflow-x:auto}
.chat-fmt button{border:0;background:none;min-width:32px;height:28px;border-radius:6px;cursor:pointer;font-size:13px;flex:0 0 auto}.chat-fmt button:hover{background:#f1f5f9}
.chat-fmt span:not(.sp):not(.small){width:1px;height:18px;background:var(--border);margin:0 4px;flex:0 0 auto}.chat-fmt .small{white-space:nowrap}
#chat-aa{font-weight:700;font-size:14px}#chat-aa.on{background:#dcfce7;color:var(--brand)}
.chat-in-w{flex:1;min-width:0;position:relative;display:flex}.chat-in-w textarea{flex:1;min-width:0;padding-right:36px}
.chat-emo-b{position:absolute;right:4px;bottom:4px;border:0;background:none;cursor:pointer;font-size:18px;width:30px;height:30px;border-radius:999px}
.emo-pop{position:fixed;z-index:4000;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-2);padding:6px;display:flex;flex-wrap:wrap;gap:2px}
.emo-pop button{border:0;background:none;width:34px;height:34px;font-size:20px;border-radius:8px;cursor:pointer}.emo-pop button:hover{background:#f1f5f9}
.m-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px}.m-acts-e{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}
.m-acts-e button{border:0;background:#f8fafc;border-radius:999px;width:38px;height:38px;font-size:19px;cursor:pointer}
.m-pin-t{font-size:13px;max-height:4.5em;overflow:hidden}
@media (max-width:600px){.chat-fmt .small{display:none}.m-acts{grid-template-columns:1fr}}

/* ===== v3.1 : place de marché ===== */
.mk-search{padding:14px;margin-bottom:14px}
.mk-sbar{display:flex;gap:8px}.mk-sbar input{flex:1;min-width:0;height:44px;border-radius:10px;border:1px solid var(--border);padding:0 14px;font:inherit;font-size:15px}
.mk-types{margin:12px 0 8px}
.mk-cats{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}
.mk-cats button{flex:0 0 auto;border:1px solid var(--border);background:var(--surface);border-radius:999px;padding:5px 12px;font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}
.mk-cats button.on{background:var(--brand);border-color:var(--brand);color:#fff}
.mk-filt{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin-top:8px;font-size:13px}
.mk-filt label{display:flex;align-items:center;gap:6px}.mk-filt input[type=number]{width:86px}.mk-filt select,.mk-filt input[type=number]{height:32px}
.mk-head{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.mk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}
.mk-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden;cursor:pointer;transition:box-shadow .15s,transform .15s;display:flex;flex-direction:column;min-width:0}
.mk-card:hover{box-shadow:var(--shadow-2);transform:translateY(-2px)}.mk-card.off{opacity:.75}
.mk-ph{position:relative;aspect-ratio:4/3;background:linear-gradient(135deg,#f0fdf4,#ecfeff);display:grid;place-items:center;overflow:hidden}
.mk-ph img{width:100%;height:100%;object-fit:cover}.mk-ic{font-size:46px;opacity:.8}
.mk-type{position:absolute;left:8px;top:8px;color:#fff;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;letter-spacing:.02em}
.mk-type.static{position:static;display:inline-block}
.mk-nph{position:absolute;left:8px;bottom:8px;background:rgba(0,0,0,.55);color:#fff;font-size:11px;padding:1px 7px;border-radius:999px}
.mk-st{position:absolute;right:8px;bottom:8px;background:#ca8a04;color:#fff;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px}
.mk-fav{position:absolute;right:8px;top:8px;width:34px;height:34px;border-radius:999px;border:0;background:rgba(255,255,255,.92);font-size:18px;cursor:pointer;color:#64748b;line-height:1}.mk-fav.on{color:#e11d48}
.mk-b{padding:10px 12px 12px;display:flex;flex-direction:column;gap:3px;min-width:0}
.mk-pr{font-weight:750;font-size:16px;color:var(--brand)}.mk-neg{font-size:11px;font-weight:500;color:var(--muted)}
.mk-b h4{margin:0;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mk-meta,.mk-loc,.mk-when{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mk-map{height:560px;border-radius:12px;overflow:hidden;border:1px solid var(--border)}
.mk-pin span{display:inline-block;transform:translate(-50%,-100%);color:#fff;font:700 12px/1 system-ui,sans-serif;padding:5px 8px;border-radius:8px;white-space:nowrap;box-shadow:0 2px 6px rgba(0,0,0,.3)}
.mk-ext{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}
.mk-x{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:10px;padding:9px 12px;text-decoration:none;color:inherit}.mk-x:hover{border-color:var(--brand);background:#f0fdf4}.mk-x span{font-size:12px;color:var(--muted)}
.modal-box.xl{width:min(1100px,100%)}
.mk-det{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:20px}
.mk-main{aspect-ratio:4/3;background:#f1f5f9;border-radius:12px;overflow:hidden;display:grid;place-items:center}.mk-main img{width:100%;height:100%;object-fit:contain;cursor:zoom-in}
.mk-noph{font-size:80px}
.mk-th{display:flex;gap:6px;margin-top:8px;overflow-x:auto}.mk-th button{flex:0 0 72px;height:54px;border:2px solid transparent;border-radius:8px;padding:0;overflow:hidden;cursor:pointer;background:none}.mk-th button.on{border-color:var(--brand)}.mk-th img{width:100%;height:100%;object-fit:cover}
.mk-dprice{font-size:26px;font-weight:800;color:var(--brand);margin:8px 0}
.mk-attr{width:100%;font-size:13px;border-collapse:collapse}.mk-attr th{text-align:left;color:var(--muted);font-weight:500;padding:4px 10px 4px 0;white-space:nowrap;vertical-align:top}.mk-attr td{padding:4px 0}
.mk-seller{display:flex;gap:10px;align-items:center;margin:14px 0;padding:10px;border:1px solid var(--border);border-radius:10px}
.mk-acts{display:flex;flex-wrap:wrap;gap:8px}.mk-acts .btn.on{color:#e11d48}.mk-stats{flex-basis:100%}
.mk-desc{white-space:normal;line-height:1.55;font-size:14px}
.mk-minimap{height:200px;border-radius:10px;overflow:hidden;margin-top:14px}
.mk-tot{background:#f0fdf4;border-radius:8px;padding:8px 10px;font-size:13px}.mk-tot:empty{display:none}
.mk-form .mk-tsel{margin-bottom:12px;flex-wrap:wrap}
.mk-pr-in{display:flex;gap:6px}.mk-pr-in input{flex:1;min-width:0}.mk-pr-in select{width:84px;flex:0 0 auto}
.mk-form .field[hidden]{display:none}.mk-form .ferr{color:var(--danger);font-size:12px}.mk-form .field.err input,.mk-form .field.err select{border-color:var(--danger)}
.mk-phs{display:flex;flex-wrap:wrap;gap:8px}
.mk-phc{position:relative;width:110px;height:82px;border-radius:8px;overflow:hidden;background:#f1f5f9}.mk-phc img{width:100%;height:100%;object-fit:cover}
.mk-phc button{position:absolute;top:4px;width:24px;height:24px;border-radius:999px;border:0;background:rgba(0,0,0,.6);color:#fff;cursor:pointer;font-size:12px}.mk-phc [data-rm],.mk-phc [data-rmn]{right:4px}.mk-phc [data-first]{left:4px}
.mk-first{position:absolute;left:4px;bottom:4px;background:var(--brand);color:#fff;font-size:10px;padding:1px 6px;border-radius:999px}
.mk-mine{display:flex;flex-direction:column;gap:8px}
.mk-row{display:flex;gap:12px;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:8px;cursor:pointer;min-width:0}.mk-row:hover{box-shadow:var(--shadow-1)}
.mk-rph{width:84px;height:64px;flex:0 0 auto;border-radius:8px;overflow:hidden;background:#f1f5f9;display:grid;place-items:center;font-size:28px}.mk-rph img{width:100%;height:100%;object-fit:cover}
.mk-rm{flex:1;min-width:0}.mk-rm strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mk-rs{display:flex;gap:10px;font-size:13px;color:var(--muted);flex:0 0 auto}
.mk-deb .lm{min-width:0}.mk-2b{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.mk-canaux{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.mk-canal{display:flex;gap:10px}.mk-canal p{margin:2px 0 4px}.mk-ci{font-size:26px;flex:0 0 auto}
.mk-fph{width:42px;height:42px;border-radius:10px;object-fit:cover;flex:0 0 auto}
.mk-prop{border:1px solid var(--border);border-radius:10px;padding:8px 10px;background:#fff;margin-bottom:4px;min-width:200px}.mk-prop.ok{border-color:#16a34a;background:#f0fdf4}.mk-prop.ko{opacity:.7}
.mk-prop-h{font-size:12px;font-weight:700;color:var(--muted)}.mk-prop-v{font-size:17px;font-weight:750;margin:2px 0}.mk-prop .btn{margin-top:6px}
@media (max-width:900px){.mk-det{grid-template-columns:minmax(0,1fr)}.mk-map{height:420px}}
@media (max-width:600px){.mk-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mk-b{padding:8px}.mk-pr{font-size:14px}.mk-b h4{font-size:13px}.mk-sbar .btn{padding:0 12px}
  .mk-rs{display:none}.mk-filt label.check{flex-basis:auto}.mk-ext{grid-template-columns:1fr 1fr}.mk-dprice{font-size:22px}}

/* ===== v3.1 : affichage téléphone — aucun bouton ne doit sortir de son cadre ===== */
.card-h{flex-wrap:wrap;row-gap:8px;min-width:0}.card-h h3{min-width:0;overflow-wrap:anywhere}
.modal-f,.drawer-f{flex-wrap:wrap;row-gap:8px}
.seg{max-width:100%;flex-wrap:wrap;row-gap:2px}
.card-b:has(> table.tbl),.card-b:has(> table.table){overflow-x:auto}
.toolbar,.page-actions{flex-wrap:wrap;row-gap:8px}
.btn{max-width:100%}
/* Barres d'onglets défilantes : un dégradé signale qu'il reste des onglets à droite */
.ptabs.more-r{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent)}
.ptabs.more-l.more-r{-webkit-mask-image:linear-gradient(90deg,transparent,#000 28px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(90deg,transparent,#000 28px,#000 calc(100% - 36px),transparent)}
.ptabs.more-l:not(.more-r){-webkit-mask-image:linear-gradient(90deg,transparent,#000 28px);mask-image:linear-gradient(90deg,transparent,#000 28px)}
@media (max-width:600px){
  .modal-f .btn,.drawer-f .btn{flex:1 1 auto}
  .drawer-f .sp{display:none}
  .card-h .btn{flex:0 1 auto}
  .chat-side-h .btn{flex:0 0 auto}
  .chat-notif{white-space:normal;text-align:left}
  .mk-types{display:flex;width:100%}.mk-types button{flex:1 1 auto;padding:6px 8px}
  .kpi .kv{font-size:18px}
}

/* ===== v3.1 : alertes lues / masquées ===== */
.alerts-panel{display:flex;flex-direction:column;overflow:hidden}.alerts-panel .ab{overflow-y:auto;flex:1;min-height:0}
.al-tabs{display:flex;gap:4px;padding:6px 12px;border-bottom:1px solid var(--border)}
.al-tabs button{border:0;background:none;padding:5px 10px;border-radius:7px;cursor:pointer;font:inherit;font-size:13px;color:var(--muted);font-weight:600}.al-tabs button.on{background:var(--surface-2,#f1f5f9);color:var(--text)}
.al{position:relative;align-items:center}.al .al-m{min-width:0;flex:1}.al .strong{font-weight:500}.al.new{background:#f0fdf4}.al.new .strong{font-weight:700}
.al-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--brand);margin-right:6px;vertical-align:1px}
.al-a{display:flex;gap:2px;flex:0 0 auto;opacity:.35;transition:opacity .12s}.al:hover .al-a,.al:focus-within .al-a{opacity:1}
@media (hover:none){.al-a{opacity:1}}
.al-a button{border:0;background:none;width:32px;height:32px;border-radius:8px;cursor:pointer;font-size:15px}.al-a button:hover{background:#e2e8f0}
.al-pop{position:absolute;right:8px;top:calc(100% - 6px);z-index:5;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow-2);display:flex;flex-direction:column;padding:4px;min-width:170px}
.al-pop button{border:0;background:none;text-align:left;padding:8px 10px;border-radius:7px;cursor:pointer;font:inherit;font-size:13px}.al-pop button:hover{background:#f1f5f9}
.al-foot{padding:8px 14px;border-top:1px solid var(--border);background:#fafafa}

/* ===== v3.2 : Vigne & cave ===== */
.tbl-scroll{overflow-x:auto}.num.neg{color:#b91c1c}.num.pos{color:#15803d}
.cv-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin:0 4px 0 2px;vertical-align:0}
.cv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:14px}
.cv{border:1px solid var(--border);background:var(--surface);border-radius:12px;padding:10px 8px;cursor:pointer;text-align:center;font:inherit;color:inherit;display:flex;flex-direction:column;align-items:center;gap:2px;transition:box-shadow .15s,transform .15s;min-width:0}
.cv:hover{box-shadow:var(--shadow-2);transform:translateY(-2px)}.cv.off{opacity:.65}
.cv-tank{position:relative;width:58px;height:84px;border:2px solid #94a3b8;border-radius:10px 10px 6px 6px;overflow:hidden;background:linear-gradient(90deg,#f8fafc,#e2e8f0 45%,#f8fafc);margin-bottom:4px}
.cv.bois .cv-tank{width:74px;height:56px;border-radius:40%/30%;border-color:#a16207;background:linear-gradient(#fde68a33,#a1620722)}
.cv-fill{position:absolute;left:0;right:0;bottom:0;opacity:.85;transition:height .4s}
.cv-pct{position:absolute;inset:0;display:grid;place-items:center;font-size:11px;font-weight:700;color:#0f172a;text-shadow:0 0 3px #fff,0 0 3px #fff}
.cv-al{position:absolute;top:2px;right:2px;font-size:12px}
.cv-code{font-weight:800;font-size:14px}.cv-sub{font-size:11px;color:var(--muted)}
.cv-lot{font-size:12px;font-weight:600;border-left:3px solid;padding-left:5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cv-et{font-size:11px;color:var(--muted)}
.cv-pan{display:grid;grid-template-columns:140px minmax(0,1fr);gap:18px;align-items:start}.cv-pan .cv{cursor:default;transform:none!important}
.cv-ops{display:flex;flex-wrap:wrap;gap:6px}
.lv-head{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.lv-vol{margin-left:auto;font-size:22px;font-weight:800;color:var(--brand)}
.lv-g{margin:6px 0}.lv-gl{font-size:13px}.lv-gb{height:8px;border-radius:999px;background:#e2e8f0;overflow:hidden;margin-top:3px}.lv-gb i{display:block;height:100%;border-radius:999px}
.lv-comp{display:flex;height:12px;border-radius:999px;overflow:hidden}.lv-comp i{display:block;height:100%}
.vg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.vg .card-h h3{font-size:15px}
.vg-mat{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:10px 0 4px;text-align:center}.vg-mat div{background:#f8fafc;border-radius:8px;padding:6px 2px;display:flex;flex-direction:column}
.vg-mat span{font-size:11px;color:var(--muted)}.vg-mat strong{font-size:17px}.vg-mat em{font-size:10px;color:var(--muted);font-style:normal}
.vg-prev{margin-top:8px;padding:8px 10px;background:#fffbeb;border-radius:8px;font-size:13px}
.vg-vd{margin-top:8px;padding:8px 10px;background:#f0fdf4;border-radius:8px;font-size:13px}
@media (max-width:600px){.cv-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.cv-pan{grid-template-columns:minmax(0,1fr)}.cv-pan-l{display:none}.vg-grid{grid-template-columns:minmax(0,1fr)}.lv-vol{font-size:18px}}

/* ---------- v3.3 Effervescents & Douane ---------- */
.eff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.eff.off { opacity: .72; }
.eff-bases { display: flex; flex-wrap: wrap; gap: 8px; }
.eff-steps { display: flex; gap: 4px; margin: 10px 0; flex-wrap: wrap; }
.eff-steps span { font-size: 11px; padding: 3px 8px; border-radius: 99px; background: var(--surface-2, #f1f5f1); color: var(--muted); border: 1px solid var(--border); }
.eff-steps span.done { background: var(--brand-50); color: var(--brand-700, #15803d); border-color: transparent; }
.eff-steps span.cur { background: #15803d; color: #fff; border-color: #15803d; font-weight: 600; }
.eff-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 10px; text-align: center; }
.eff-nums strong { display: block; font-size: 18px; line-height: 1.2; }
.eff-nums span { font-size: 11px; color: var(--muted); }
.eff-mention { margin-top: 4px; }
.drm td, .drm th { white-space: nowrap; }
.drm td:first-child { white-space: normal; min-width: 220px; }
.drm-det td { background: var(--surface-2, #f7f9f6); }
.drm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; font-size: 12.5px; white-space: normal; }
.drm-grid h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; color: var(--muted); }
@media (max-width: 600px) { .eff-nums strong { font-size: 15px; } }

/* ---------- v3.4 Plantations & Transformation ---------- */
.tr-out { margin: 6px 0; padding-left: 18px; }
.tr-modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; }
.tr-mod { text-align: left; border: 1px solid var(--border); background: var(--surface, #fff); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font: inherit; color: inherit; }
.tr-mod:hover { border-color: #16a34a; background: var(--brand-50, #f0fdf4); }
.tr-mod span { font-size: 12px; color: var(--muted); }
.tr-chain { display: flex; flex-direction: column; gap: 0; }
.tr-step { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 10px 0; border-left: 2px solid var(--border); margin-left: 17px; padding-left: 0; position: relative; }
.tr-step > div:last-child { min-width: 0; }
.tr-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-50, #f0fdf4); display: grid; place-items: center; margin-left: -18px; font-size: 16px; }
.lang-sw { position: fixed; top: 12px; right: 14px; z-index: 50; display: flex; gap: 2px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 3px; font-size: 12px; }
.lang-sw a, .lang-sw strong { padding: 3px 9px; border-radius: 999px; color: #cfe3d6; text-decoration: none; }
.lang-sw strong { background: #fff; color: #0f1d16; }

/* ---------- v3.5 Capteurs & irrigation connectée ---------- */
.cap-groupe { font-size: 15px; margin: 18px 0 8px; }
.cap-main { display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; }
.cap-val { min-width: 120px; }
.cap-val strong { display: block; font-size: 26px; line-height: 1.15; }
.cap-val span { font-size: 12px; color: var(--muted); }
.cap-val .cap-bas { color: #dc2626; } .cap-val .cap-haut { color: #2563eb; } .cap-val .cap-ok { color: #15803d; }
.cap-sp { flex: 1; min-width: 0; height: 54px; position: relative; }
.cap-sp canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.cap-autres { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0; }
.cap-pied { margin-top: 6px; }
.card.cap.off { opacity: .6; }
.cap-url { display: inline-block; max-width: 100%; overflow-wrap: anywhere; background: var(--bg-soft, #f1f5f2); padding: 4px 8px; border-radius: 6px; font-size: 12.5px; }
.cap-pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-soft, #f1f5f2); padding: 8px 10px; border-radius: 6px; font-size: 12px; }
.cap-gr { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 4px 14px; margin: 8px 0; }
.cap-etapes { text-align: left; max-width: 560px; margin: 10px auto; }
.mt { margin-top: 14px; }
