/* =====================================================================
   MENELAS · Heaume — composants étendus
   Chargé après kit.css. Utilise exclusivement les tokens de la direction.
   Palette de séries (graphiques) validée : pervenche, sarcelle, bronze.
   ===================================================================== */
[data-d="heaume"] {
  --s1: #6369D0; --s2: #2E9C8A; --s3: #D08A2E; /* séries catégorielles, dans cet ordre */
  --s1-wash: rgba(99, 105, 208, .10);
  --grid: #E6E8EF;
  --r-sm: 4px;
}

/* ---------- Mise en page ---------- */
.m-split { display: grid; gap: 20px 48px; padding: 32px 0; border-top: 1px solid var(--border); }
.m-split:first-child { border-top: 0; padding-top: 0; }
@container (min-width: 820px) { .m-split { grid-template-columns: 260px minmax(0, 1fr); } }
.m-split__aside { display: grid; gap: 6px; align-content: start; }
.m-split__aside h3 { font-size: 16px; font-weight: 600; color: var(--ink); }
.m-split__aside p { font-size: 14px; color: var(--muted); }
.m-cols-2 { display: grid; gap: 18px; }
@container (min-width: 560px) { .m-cols-2 { grid-template-columns: 1fr 1fr; } }
.m-cols-3 { display: grid; gap: 18px; }
@container (min-width: 700px) { .m-cols-3 { grid-template-columns: repeat(3, 1fr); } }
.m-divider { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* ---------- Formulaires avancés ---------- */
.m-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 18px; min-width: 0; }
.m-legend { padding: 0; margin-bottom: 4px; font-size: 16px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.m-legend .m-slot { margin-right: 2px; }
.m-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.m-label-row .m-label { display: inline-flex; align-items: center; gap: 6px; }
.m-hint { font-size: 13px; color: var(--subtle); white-space: nowrap; }
.m-tip-btn { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--subtle); cursor: help; }
.m-tip-btn:hover, .m-tip-btn:focus-visible { color: var(--mark); background: var(--accent-soft); outline: none; }
.m-tip-btn svg.i { width: 17px; height: 17px; }
.m-control__prefix-text { position: absolute; left: 0; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 12px; border-right: 1px solid var(--border); color: var(--muted); font-family: var(--f-num); font-size: 15px; pointer-events: none; }
.m-control--prefix-text .m-input { padding-left: 64px; }
.is-valid .m-input { border-color: var(--success); }
.m-control__state { position: absolute; right: 14px; display: flex; color: var(--success); pointer-events: none; }
.m-control__state svg.i { width: 18px; height: 18px; }
.m-valid { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--success); }
.m-valid svg.i { width: 16px; height: 16px; }

/* Compteur numérique */
.m-stepnum { display: inline-grid; grid-template-columns: var(--field-h) 72px var(--field-h); border: 1px solid var(--border-strong); border-radius: var(--r-field); overflow: hidden; background: var(--surface); }
.m-stepnum button { border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.m-stepnum button:hover { background: var(--accent-soft); }
.m-stepnum button svg.i { width: 18px; height: 18px; }
.m-stepnum input { border: 0; border-inline: 1px solid var(--border); text-align: center; font-family: var(--f-num); font-size: 17px; color: var(--ink); width: 100%; min-width: 0; }
.m-stepnum input:focus { outline: 2px solid var(--focus); outline-offset: -2px; }

/* Interrupteur */
.m-switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.m-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 999px; background: #C9CEDC; position: relative; cursor: pointer; transition: background-color .15s; }
.m-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(12, 28, 66, .25); transition: transform .15s ease; }
.m-switch input:checked { background: var(--ink); }
.m-switch input:checked::after { transform: translateX(16px); }
.m-switch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.m-switch small { display: block; color: var(--muted); font-size: 13px; }

/* Curseur */
.m-range { display: grid; gap: 10px; }
.m-range__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.m-range__val { font-family: var(--f-num); font-size: 20px; font-weight: 500; color: var(--ink); }
.m-range input[type="range"] { width: 100%; margin: 0; accent-color: var(--ink); height: 24px; cursor: pointer; }
.m-range__scale { display: flex; justify-content: space-between; font-family: var(--f-num); font-size: 12px; color: var(--subtle); }

/* Recherche à suggestions */
.m-combo { position: relative; }
.m-listbox { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-overlay); max-height: 260px; overflow: auto; }
.m-listbox[hidden] { display: none; }
.m-listbox li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 6px; font-size: 15px; cursor: pointer; }
.m-listbox li small { color: var(--subtle); font-family: var(--f-num); font-size: 12px; white-space: nowrap; }
.m-listbox li[aria-selected="true"], .m-listbox li:hover { background: var(--accent-soft); }
.m-listbox mark { background: none; color: var(--mark); font-weight: 600; }
.m-listbox .m-listbox__empty { color: var(--muted); cursor: default; }
.m-listbox .m-listbox__empty:hover { background: none; }

/* Puces sélectionnées */
.m-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.m-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 11px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.m-chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.m-chip button:hover { background: rgba(12, 28, 66, .08); color: var(--ink); }
.m-chip button svg.i { width: 14px; height: 14px; }

/* Dépôt de fichiers */
.m-drop { display: grid; justify-items: center; gap: 8px; padding: 28px 20px; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface-2); color: var(--muted); font-size: 14px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.m-drop:hover, .m-drop.is-over { border-color: var(--mark); background: var(--accent-soft); }
.m-drop svg.i { width: 26px; height: 26px; color: var(--ink); }
.m-drop strong { color: var(--ink); font-size: 15px; }
.m-drop u { color: var(--mark); text-underline-offset: 3px; }
.m-files { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.m-file { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: 14px; }
.m-file > svg.i { color: var(--muted); }
.m-file__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }
.m-file__name small { display: block; font-weight: 400; color: var(--subtle); font-family: var(--f-num); font-size: 12px; }
.m-file__bar { grid-column: 2 / -1; height: 3px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.m-file__bar span { display: block; height: 100%; background: var(--mark); }

/* Compteur de caractères */
.m-counter { font-family: var(--f-num); font-size: 12px; color: var(--subtle); text-align: right; }
.m-counter.is-near { color: var(--warning); }

/* Synthèse d'erreurs */
.m-errsum ul { margin: 6px 0 0; padding-left: 18px; }
.m-errsum a { color: var(--danger); font-weight: 500; }

/* Récapitulatif */
.m-recap { display: grid; border-top: 1px solid var(--border); margin: 0; }
.m-recap > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.m-recap dt { color: var(--muted); }
.m-recap dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; }
.m-recap a { font-size: 13px; }

/* ---------- Tarificateur ---------- */
.m-sim { display: grid; gap: 28px; align-items: start; }
@container (min-width: 900px) { .m-sim { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; } }
.m-sim__main { display: grid; gap: 28px; }
.m-summary { position: sticky; top: 16px; display: grid; gap: 18px; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.m-summary__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.m-summary__price { display: flex; align-items: baseline; gap: 6px; font-family: var(--f-num); font-size: 44px; font-weight: 500; letter-spacing: -.04em; color: var(--ink); line-height: 1; }
.m-summary__price small { font-family: var(--f-body); font-size: 14px; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.m-summary__sub { font-size: 13px; color: var(--muted); margin-top: -10px; }
.m-summary .m-recap > div { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 0; }
.m-summary .m-recap dd { font-family: var(--f-num); font-weight: 400; }
.m-summary .m-recap .is-total dt { color: var(--ink); font-weight: 600; }
.m-summary .m-recap .is-total dd { font-weight: 500; }
.m-summary.is-updating .m-summary__price { opacity: .35; transition: opacity .1s; }
.m-inverse.m-summary { border: 0; }

.m-addon { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.m-addon:has(input:checked) { border-color: var(--sel); box-shadow: inset 0 0 0 1px var(--sel); background: var(--accent-soft); }
.m-addon strong { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }
.m-addon > span > span { font-size: 14px; color: var(--muted); }
.m-addon__price { font-family: var(--f-num); font-size: 14px; color: var(--ink); white-space: nowrap; }
.m-addon .m-switch { pointer-events: none; }

/* Barre de répartition (infographie compacte) */
.m-split-bar { display: flex; gap: 2px; height: 10px; border-radius: 4px; overflow: hidden; }
.m-split-bar span { display: block; height: 100%; transition: flex-grow .3s ease; }
.m-legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.m-legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.m-legend-row i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* États */
.m-state { display: grid; justify-items: start; gap: 14px; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.m-state--center { justify-items: center; text-align: center; }
.m-state__mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--mark); }
.m-state__mark--success { background: var(--success-soft); color: var(--success); }
.m-state__mark--warning { background: var(--warning-soft); color: var(--warning); }
.m-state__mark svg.i { width: 22px; height: 22px; }
.m-state p { color: var(--muted); max-width: 52ch; }
.m-ref { font-family: var(--f-num); font-size: 14px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); }

/* Squelettes de chargement */
.m-skel { display: block; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2) 0%, #E9EBF3 40%, var(--surface-2) 80%) 0 0 / 200% 100%; animation: m-skel 1.4s linear infinite; }
@keyframes m-skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .m-skel { animation: none; } }

/* ---------- Aides contextuelles ---------- */
.m-term { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help; text-decoration: underline dotted var(--mark); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.m-term:hover, .m-term:focus-visible { color: var(--mark); outline: none; }
#m-tooltip { position: fixed; z-index: 1000; max-width: 280px; padding: 9px 12px; border-radius: 6px; background: #0C1C42; color: #fff; font: 13px/1.45 "IBM Plex Sans", system-ui, sans-serif; box-shadow: 0 10px 24px -8px rgba(12, 28, 66, .4); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
#m-tooltip.is-on { opacity: 1; transform: none; }
#m-tooltip strong { display: block; font-weight: 600; margin-bottom: 2px; }
#m-tooltip .t-val { font-family: "IBM Plex Mono", monospace; font-size: 15px; font-weight: 500; }
#m-tooltip .t-key { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: 6px; }
#m-tooltip::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: #0C1C42; transform: rotate(45deg); }
#m-tooltip.is-below::after { bottom: auto; top: -5px; }

.m-pop { position: absolute; z-index: 40; width: 320px; max-width: calc(100vw - 32px); display: grid; gap: 10px; padding: 18px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-overlay); font-size: 14px; color: var(--text); }
.m-pop[hidden] { display: none; }
.m-pop h4 { margin: 0; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.m-pop p { color: var(--muted); }
.m-anchor { position: relative; display: inline-block; }

.m-menu { position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); min-width: 220px; padding: 6px; margin: 0; list-style: none; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-overlay); }
.m-menu[hidden] { display: none; }
.m-menu button, .m-menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 14px; color: var(--text); text-decoration: none; cursor: pointer; text-align: left; }
.m-menu button:hover, .m-menu a:hover, .m-menu button:focus-visible { background: var(--surface-2); outline: none; }
.m-menu svg.i { width: 17px; height: 17px; color: var(--muted); }
.m-menu .is-danger { color: var(--danger); }
.m-menu .is-danger svg.i { color: var(--danger); }
.m-menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* Fenêtres et panneau latéral (élément dialog natif) */
.m-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(12, 28, 66, .45); font-family: var(--f-body); }
.m-dialog::backdrop { background: rgba(12, 28, 66, .45); }
.m-dialog__head { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 24px 26px 0; }
.m-dialog__body { display: grid; gap: 18px; padding: 18px 26px 24px; }
.m-dialog__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 6px 6px; }
.m-drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(460px, 100vw); border-radius: 0; }
.m-drawer .m-dialog__body { max-height: calc(100vh - 150px); overflow: auto; }

.m-toasts { position: fixed; z-index: 1100; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.m-toast { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 14px 14px 16px; border-radius: var(--r-md); background: #0C1C42; color: #fff; font: 14px/1.45 "IBM Plex Sans", sans-serif; box-shadow: 0 16px 40px -12px rgba(12, 28, 66, .5); animation: m-toast-in .18s ease; }
.m-toast svg.i { width: 20px; height: 20px; }
.m-toast--success > svg.i { color: #7FD6A8; }
.m-toast--error > svg.i { color: #FF9C8F; }
.m-toast button { background: none; border: 0; color: #A7B0C4; cursor: pointer; padding: 0; display: grid; }
.m-toast strong { display: block; }
.m-toast span { color: #C9D0E0; }
@keyframes m-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Navigation secondaire ---------- */
.m-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.m-crumbs a { color: var(--muted); text-decoration: none; }
.m-crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.m-crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.m-crumbs li + li::before { content: ""; width: 5px; height: 5px; border-top: 1.5px solid var(--subtle); border-right: 1.5px solid var(--subtle); transform: rotate(45deg); margin-right: 4px; }
.m-crumbs [aria-current] { color: var(--ink); }

.m-tabs [role="tablist"] { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.m-tabs [role="tab"] { position: relative; padding: 12px 14px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.m-tabs [role="tab"]:hover { color: var(--ink); }
.m-tabs [role="tab"][aria-selected="true"] { color: var(--ink); }
.m-tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--mark); }
.m-tabs [role="tab"]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 6px; }
.m-tabs [role="tabpanel"] { padding-top: 24px; }
.m-tabs--pill [role="tablist"] { border: 0; gap: 6px; }
.m-tabs--pill [role="tab"] { border-radius: 999px; padding: 8px 14px; font-size: 14px; background: var(--surface-2); }
.m-tabs--pill [role="tab"][aria-selected="true"] { background: var(--ink); color: #fff; }
.m-tabs--pill [role="tab"][aria-selected="true"]::after { display: none; }

.m-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.m-pager__pages { display: flex; gap: 4px; align-items: center; }
.m-pager__pages a, .m-pager__pages span { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 8px; border-radius: 6px; text-decoration: none; color: var(--ink); font-family: var(--f-num); font-size: 14px; }
.m-pager__pages a:hover { background: var(--surface-2); }
.m-pager__pages [aria-current] { background: var(--ink); color: #fff; }
.m-pager__pages svg.i { width: 18px; height: 18px; }

.m-progress { display: grid; gap: 8px; }
.m-progress__top { display: flex; justify-content: space-between; font-size: 14px; }
.m-progress__top b { font-family: var(--f-num); font-weight: 500; color: var(--ink); }
.m-progress__track { height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; }
.m-progress__track span { display: block; height: 100%; background: var(--mark); border-radius: 3px; }

/* Méga-menu des spécialités */
.m-mega { display: grid; gap: 28px; padding: 28px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-overlay); }
@container (min-width: 900px) { .m-mega { grid-template-columns: 1fr 1fr 1fr 280px; } }
.m-mega h5 { margin: 0 0 10px; font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); }
.m-mega ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.m-mega a { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 8px; margin: 0 -8px; border-radius: 6px; text-decoration: none; }
.m-mega a:hover { background: var(--surface-2); }
.m-mega a svg.i { color: var(--ink); margin-top: 1px; }
.m-mega a strong { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.m-mega a span { font-size: 13px; color: var(--muted); }
.m-mega__promo { display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--r-lg); background: var(--surface-2); }

/* Bannière d'information */
.m-banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; background: var(--ink); color: #E4E8F1; font-size: 14px; text-align: center; }
.m-banner a { color: #fff; font-weight: 500; }
.m-banner svg.i { width: 18px; height: 18px; color: #A9ADF2; }

/* ---------- Blocs de contenu ---------- */
.m-article { display: grid; gap: 40px; }
@container (min-width: 980px) { .m-article { grid-template-columns: 220px minmax(0, 720px); justify-content: center; gap: 56px; } }
.m-article__head { display: grid; gap: 18px; max-width: 760px; }
.m-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 14px; color: var(--muted); }
.m-meta__author { display: flex; align-items: center; gap: 10px; }
.m-meta__author strong { display: block; color: var(--ink); font-weight: 600; }
.m-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.m-meta__item svg.i { width: 16px; height: 16px; }
.m-meta__actions { margin-left: auto; display: flex; gap: 4px; }

.m-toc { position: sticky; top: 16px; align-self: start; display: grid; gap: 12px; font-size: 14px; }
.m-toc h4 { margin: 0; font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); }
.m-toc ol { list-style: none; margin: 0; padding: 0; display: grid; border-left: 1px solid var(--border); }
.m-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.m-toc a:hover { color: var(--ink); }
.m-toc a.is-active { color: var(--ink); border-left-color: var(--mark); font-weight: 500; }
@container (max-width: 979px) { .m-toc { position: static; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-md); } }

.m-rich { font-size: 17px; line-height: 1.7; color: var(--text); display: grid; gap: 20px; }
.m-rich > * { margin: 0; }
.m-rich h2 { font-size: 27px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin-top: 22px; scroll-margin-top: 80px; display: flex; gap: 12px; align-items: baseline; }
.m-rich h2::before { content: ""; flex: none; width: 11px; height: 16px; background: var(--mark); clip-path: polygon(0 0, 100% 0, 68% 40%, 68% 100%, 32% 100%, 32% 40%); transform: translateY(-2px); }
.m-rich h3 { font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--ink); margin-top: 8px; }
.m-rich a:not(.m-btn) { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.m-rich ul, .m-rich ol { padding-left: 22px; display: grid; gap: 8px; }
.m-rich ul li::marker { color: var(--mark); }
.m-rich ol li::marker { font-family: var(--f-num); color: var(--mark); font-size: .9em; }
.m-rich strong { color: var(--ink); font-weight: 600; }
.m-rich blockquote { padding-left: 20px; border-left: 3px solid var(--mark); color: var(--ink); font-size: 19px; line-height: 1.55; }
.m-rich sup a { font-family: var(--f-num); font-size: 11px; text-decoration: none; padding: 0 2px; }
.m-rich figure { display: grid; gap: 10px; }
.m-rich figure img { border-radius: var(--r-media); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.m-rich figcaption { font-size: 13px; color: var(--muted); }

/* Encadrés */
.m-callout { display: grid; gap: 10px; padding: 20px 22px; border-radius: var(--r-md); background: var(--surface-2); font-size: 15px; line-height: 1.6; }
.m-callout__title { display: flex; align-items: center; gap: 10px; font: 500 12px var(--f-label); text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.m-callout__title svg.i { width: 18px; height: 18px; }
.m-callout ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.m-callout--key { background: var(--accent-soft); }
.m-callout--key .m-callout__title { color: var(--mark); }
.m-callout--warn { background: var(--warning-soft); }
.m-callout--warn .m-callout__title { color: var(--warning); }
.m-callout--example { background: var(--surface); border: 1px solid var(--border); }
.m-callout--def { background: transparent; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--border); border-radius: 0; padding: 16px 0; }
.m-callout--def dfn { font-style: normal; font-weight: 600; color: var(--ink); font-size: 17px; }
.m-calc { display: grid; border-top: 1px solid var(--border); font-size: 14px; margin: 0; }
.m-calc > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.m-calc dd { margin: 0; font-family: var(--f-num); color: var(--ink); }
.m-calc .is-total { font-weight: 600; color: var(--ink); border-bottom: 0; }

/* Chiffres clés */
.m-kpis { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
@container (min-width: 640px) { .m-kpis { grid-template-columns: repeat(var(--n, 3), 1fr); } }
.m-kpi { display: grid; gap: 6px; align-content: start; padding: 22px; background: var(--surface); }
.m-kpi__label { font-size: 14px; color: var(--muted); }
.m-kpi__value { font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; color: var(--ink); }
.m-kpi__value small { font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 2px; }
.m-kpi__foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--subtle); }
.m-delta { display: inline-flex; align-items: center; gap: 2px; font-family: var(--f-num); font-size: 12px; font-weight: 500; padding: 2px 6px; border-radius: 4px; }
.m-delta--good { background: var(--success-soft); color: var(--success); }
.m-delta--bad { background: var(--danger-soft); color: var(--danger); }
.m-spark { width: 100%; height: 34px; margin-top: 6px; }

/* Étapes numérotées (procédure) */
.m-steps { list-style: none; margin: 0; padding: 0; display: grid; counter-reset: st; }
.m-steps > li { counter-increment: st; position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; padding-bottom: 28px; }
.m-steps > li::before { content: counter(st); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); font-family: var(--f-num); font-size: 15px; color: var(--ink); position: relative; z-index: 1; }
.m-steps > li::after { content: ""; position: absolute; left: 19.5px; top: 40px; bottom: 0; width: 1px; background: var(--border); }
.m-steps > li:last-child { padding-bottom: 0; }
.m-steps > li:last-child::after { display: none; }
.m-steps > li.is-key::before { background: var(--ink); border-color: var(--ink); color: #fff; }
.m-steps h4 { margin: 8px 0 6px; font-size: 17px; color: var(--ink); font-weight: 600; }
.m-steps p { color: var(--muted); font-size: 15px; }
.m-steps .m-badge { margin-top: 10px; }

/* Liste de pièces */
.m-checklist { display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.m-checklist__head { display: grid; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.m-checklist label { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 13px 18px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 15px; }
.m-checklist label:last-child { border-bottom: 0; }
.m-checklist label small { display: block; color: var(--muted); font-size: 13px; }
.m-checklist label:has(input:checked) > span:first-of-type { color: var(--subtle); text-decoration: line-through; text-decoration-color: var(--border-strong); }

/* Comparaison */
.m-compare { display: grid; gap: 16px; }
@container (min-width: 700px) { .m-compare { grid-template-columns: 1fr 1fr; } }
.m-compare__col { display: grid; gap: 14px; align-content: start; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.m-compare__col h4 { margin: 0; font-size: 19px; color: var(--ink); }
.m-compare__col dl { margin: 0; display: grid; gap: 12px; }
.m-compare__col dt { font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); }
.m-compare__col dd { margin: 2px 0 0; font-size: 15px; }
.m-proscons { display: grid; gap: 16px; }
@container (min-width: 640px) { .m-proscons { grid-template-columns: 1fr 1fr; } }
.m-proscons > div { display: grid; gap: 12px; align-content: start; padding: 20px 22px; border-radius: var(--r-md); border: 1px solid var(--border); }
.m-proscons h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); }
.m-proscons ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 15px; }
.m-proscons li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.m-proscons li svg.i { width: 18px; height: 18px; margin-top: 2px; }
.m-proscons .is-pro svg.i { color: var(--success); }
.m-proscons .is-con svg.i { color: var(--danger); }

/* Chronologie */
.m-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
@container (min-width: 760px) { .m-timeline { grid-template-columns: repeat(var(--n, 4), 1fr); gap: 0; } }
.m-timeline li { position: relative; display: grid; gap: 6px; align-content: start; padding-left: 22px; }
.m-timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--mark); }
.m-timeline li::after { content: ""; position: absolute; left: 5px; top: 20px; bottom: -18px; width: 1px; background: var(--border); }
.m-timeline li:last-child::after { display: none; }
@container (min-width: 760px) {
  .m-timeline li { padding: 26px 20px 0 0; }
  .m-timeline li::before { top: 0; }
  .m-timeline li::after { left: 16px; right: 0; top: 5.5px; bottom: auto; width: auto; height: 1px; }
  .m-timeline li:last-child::after { display: block; right: 40%; }
}
.m-timeline__when { font-family: var(--f-num); font-size: 13px; color: var(--mark); font-weight: 500; }
.m-timeline h4 { margin: 0; font-size: 16px; color: var(--ink); }
.m-timeline p { font-size: 14px; color: var(--muted); }

/* Étude de cas */
.m-case { display: grid; gap: 28px; align-items: center; }
@container (min-width: 860px) { .m-case { grid-template-columns: 5fr 7fr; gap: 48px; } }
.m-case img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-media); }
.m-case__body { display: grid; gap: 20px; }
.m-case__grid { display: grid; gap: 16px; }
@container (min-width: 560px) { .m-case__grid { grid-template-columns: repeat(3, 1fr); } }
.m-case__grid h5 { margin: 0 0 6px; font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); }
.m-case__grid p { font-size: 14px; color: var(--text); }

/* Appel à l'action dans un article */
.m-inline-cta { display: grid; gap: 14px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--ink); color: #E4E8F1; }
@container (min-width: 600px) { .m-inline-cta { grid-template-columns: 1fr auto; align-items: center; } }
.m-inline-cta strong { color: #fff; font-size: 17px; display: block; margin-bottom: 2px; }
.m-inline-cta span { font-size: 14px; color: #A7B0C4; }

/* Auteur, sources, articles liés, téléchargement */
.m-author { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 22px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.m-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.m-author h4 { margin: 0; font-size: 16px; color: var(--ink); }
.m-author p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.m-sources { font-size: 13px; color: var(--muted); padding-left: 20px; display: grid; gap: 6px; margin: 0; }
.m-sources li::marker { font-family: var(--f-num); }
.m-related { list-style: none; margin: 0; padding: 0; display: grid; }
.m-related a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.m-related a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.m-related img { width: 96px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.m-related strong { display: block; color: var(--ink); font-size: 15px; line-height: 1.35; }
.m-related span { font-size: 13px; color: var(--muted); }
.m-download { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); text-decoration: none; }
.m-download:hover { border-color: var(--border-strong); }
.m-download__ico { width: 44px; height: 52px; display: grid; place-items: end center; padding-bottom: 6px; border-radius: 4px; background: var(--surface-2); font: 600 10px var(--f-num); color: var(--danger); }
.m-download strong { display: block; color: var(--ink); font-size: 15px; }
.m-download span { font-size: 13px; color: var(--muted); }

/* Glossaire */
.m-glossary__letters { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.m-glossary__letters a, .m-glossary__letters span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; font-family: var(--f-num); font-size: 14px; text-decoration: none; color: var(--ink); }
.m-glossary__letters a:hover { background: var(--surface-2); }
.m-glossary__letters span { color: var(--border-strong); }
.m-glossary__letters a[aria-current] { background: var(--ink); color: #fff; }
.m-glossary dl { margin: 0; display: grid; }
.m-glossary dl > div { display: grid; gap: 4px 32px; padding: 16px 0; border-bottom: 1px solid var(--border); }
@container (min-width: 700px) { .m-glossary dl > div { grid-template-columns: 220px 1fr; } }
.m-glossary dt { font-weight: 600; color: var(--ink); }
.m-glossary dd { margin: 0; color: var(--muted); font-size: 15px; }

/* Grille de garanties (sans carrés colorés) */
.m-features { display: grid; gap: 28px 32px; }
@container (min-width: 700px) { .m-features { grid-template-columns: repeat(3, 1fr); } }
.m-feature { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 1px solid var(--ink); }
.m-feature svg.i { width: 22px; height: 22px; color: var(--ink); stroke-width: 1.4; }
.m-feature h4 { margin: 4px 0 0; font-size: 17px; color: var(--ink); }
.m-feature p { font-size: 14px; color: var(--muted); }

/* Contact */
.m-contact { display: grid; gap: 16px; }
@container (min-width: 760px) { .m-contact { grid-template-columns: repeat(3, 1fr); } }
.m-contact > div { display: grid; gap: 8px; align-content: start; padding: 22px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.m-contact svg.i { color: var(--ink); }
.m-contact strong { font-size: 17px; color: var(--ink); }
.m-hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.m-hours td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.m-hours td:last-child { text-align: right; font-family: var(--f-num); color: var(--ink); }
.m-hours tr.is-today td { font-weight: 600; color: var(--ink); }

/* Couverture incluse / exclue */
.m-cover { display: grid; gap: 16px; }
@container (min-width: 640px) { .m-cover { grid-template-columns: 1fr 1fr; } }
.m-cover > div { display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: var(--r-lg); }
.m-cover .is-in { background: var(--surface); border: 1px solid var(--border); }
.m-cover .is-out { background: var(--surface-2); }
.m-cover h4 { margin: 0 0 6px; font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.m-cover ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.m-cover li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.m-cover li svg.i { width: 18px; height: 18px; margin-top: 2px; }
.m-cover .is-in svg.i { color: var(--success); }
.m-cover .is-out svg.i { color: var(--subtle); }

/* Schéma : le rôle du courtier */
.m-flowchart { display: grid; gap: 12px; align-items: center; }
@container (min-width: 760px) { .m-flowchart { grid-template-columns: 1fr 48px 1.15fr 48px 1fr; } }
.m-flownode { display: grid; gap: 8px; padding: 20px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.m-flownode--hub { background: var(--ink); border-color: var(--ink); color: #C9D0E0; }
.m-flownode--hub h4 { color: #fff; }
.m-flownode h4 { margin: 0; font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.m-flownode ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.m-flownode p { font-size: 14px; }
.m-flowarrow { display: grid; place-items: center; color: var(--subtle); }
.m-flowarrow svg.i { width: 24px; height: 24px; }
@container (max-width: 759px) { .m-flowarrow svg.i { transform: rotate(90deg); } }

/* ---------- Tableaux ---------- */
.m-table-tools { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.m-table-tools .m-control { width: min(320px, 100%); }
.m-table--dense th, .m-table--dense td { padding: 10px 14px; }
.m-table thead th button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.m-table thead th button svg.i { width: 14px; height: 14px; opacity: .5; }
.m-table thead th[aria-sort] button { color: var(--ink); }
.m-table thead th[aria-sort] button svg.i { opacity: 1; color: var(--mark); }
.m-table thead th .m-tip-btn { vertical-align: middle; margin-left: 2px; width: 16px; height: 16px; }
.m-table thead th .m-tip-btn svg.i { width: 14px; height: 14px; }
.m-table tbody tr:hover > * { background: #FAFBFD; }
.m-table .m-row-group th { background: var(--surface-2); font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 10px; padding-bottom: 10px; }
.m-table tr.is-current > * { background: var(--accent-soft) !important; }
.m-table tr.is-current th { box-shadow: inset 3px 0 0 var(--mark); }
.m-table .m-cell-sub { display: block; font-size: 12px; color: var(--subtle); font-weight: 400; }
.m-table td .m-btn--icon { width: 32px; height: 32px; }
.m-table-wrap--sticky { max-height: 380px; overflow: auto; }
.m-table-wrap--sticky thead th { position: sticky; top: 0; z-index: 2; }
.m-table-wrap--sticky tbody th:first-child, .m-table-wrap--sticky thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.m-table-wrap--sticky thead th:first-child { z-index: 3; background: var(--surface-2); }
.m-table td.m-empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.m-expand summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-weight: 500; font-size: 13px; }
.m-expand summary::-webkit-details-marker { display: none; }
.m-expand summary svg.i { width: 16px; height: 16px; transition: transform .15s; }
.m-expand[open] summary svg.i { transform: rotate(90deg); }
.m-expand > div { margin-top: 10px; padding: 12px 14px; border-radius: 6px; background: var(--surface-2); font-size: 13px; color: var(--text); display: grid; gap: 4px; }
/* Tableau en cartes sur petit écran */
@container (max-width: 640px) {
  .m-table--cards { min-width: 0; }
  .m-table--cards thead { display: none; }
  .m-table--cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .m-table--cards td, .m-table--cards th { display: block; padding: 0; border: 0; text-align: left !important; }
  .m-table--cards [data-label]::before { content: attr(data-label); display: block; font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); margin-bottom: 2px; }
  .m-table--cards tbody th { grid-column: 1 / -1; }
}

/* ---------- Infographies ---------- */
.m-chart { display: grid; gap: 14px; }
.m-chart__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 12px; }
.m-chart__title { font-size: 16px; font-weight: 600; color: var(--ink); }
.m-chart__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.m-chart__src { font-size: 12px; color: var(--subtle); }
.m-chart svg.m-plot { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--f-body); }
.m-plot .grid line { stroke: var(--grid); stroke-width: 1; }
.m-plot .axis text, .m-plot .lbl { fill: var(--muted); font-size: 12px; }
.m-plot .axis .num, .m-plot .num { font-family: var(--f-num); }
.m-plot .val { fill: var(--ink); font-size: 12px; font-family: var(--f-num); font-weight: 500; }
.m-plot .cat { fill: var(--text); font-size: 13px; }
.m-plot [data-v] { cursor: default; transition: opacity .12s; }
.m-plot:has([data-v]:hover) [data-v]:not(:hover), .m-plot:has([data-v]:focus) [data-v]:not(:focus) { opacity: .45; }
.m-plot [data-v]:focus { outline: none; }
.m-plot .hit { fill: transparent; }
.m-chart__toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--surface-2); }
.m-chart__toggle button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 5px 10px; border-radius: 6px; font: 500 13px var(--f-body); color: var(--muted); cursor: pointer; }
.m-chart__toggle button svg.i { width: 15px; height: 15px; }
.m-chart__toggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(12, 28, 66, .1); }
.m-chart [data-view="table"] { display: none; }
.m-chart.is-table [data-view="table"] { display: block; }
.m-chart.is-table [data-view="plot"] { display: none; }

/* Jauge */
.m-meter { display: grid; gap: 8px; }
.m-meter__track { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 3px; }
.m-meter__track span { height: 8px; border-radius: 2px; background: var(--accent-soft); }
.m-meter__track span.is-on { background: var(--mark); }

/* Correctifs : l'attribut hidden l'emporte toujours sur l'affichage d'un composant */
.m-root [hidden] { display: none !important; }
.m-flownode.m-flownode--hub h4 { color: #fff; }
.m-rich .m-related a { text-decoration: none; }

/* =====================================================================
   EXTENSIONS : saisies avancées, statistiques, interactions, application
   ===================================================================== */

/* ---------- Jauges et échelles de formulaire ---------- */
.m-gauge { display: grid; justify-items: center; gap: 4px; text-align: center; }
.m-plot .gauge-val { font-family: var(--f-num); font-size: 30px; font-weight: 500; fill: var(--ink); letter-spacing: -.03em; }
.m-plot .ring-val { font-family: var(--f-num); font-size: 17px; font-weight: 500; fill: var(--ink); }
.m-gauge-svg path { transition: d .3s ease; }
.m-strength { display: grid; gap: 10px; }
.m-strength__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.m-strength__bar span { height: 5px; border-radius: 3px; background: var(--surface-2); transition: background-color .2s; }
.m-strength[data-level="1"] .m-strength__bar span:nth-child(-n+1) { background: var(--danger); }
.m-strength[data-level="2"] .m-strength__bar span:nth-child(-n+2) { background: var(--warning); }
.m-strength[data-level="3"] .m-strength__bar span:nth-child(-n+3) { background: var(--mark); }
.m-strength[data-level="4"] .m-strength__bar span { background: var(--success); }
.m-strength ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.m-strength li { display: flex; gap: 8px; align-items: center; }
.m-strength li svg.i { width: 15px; height: 15px; color: var(--subtle); }
.m-strength li.is-ok { color: var(--ink); }
.m-strength li.is-ok svg.i { color: var(--success); }
.m-scale { display: grid; gap: 8px; }
.m-scale__opts { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 4px; }
.m-scale__opts label { position: relative; }
.m-scale__opts input { position: absolute; opacity: 0; }
.m-scale__opts span { display: grid; place-items: center; height: 44px; border: 1px solid var(--border-strong); border-radius: var(--r-field); font-family: var(--f-num); font-size: 15px; color: var(--ink); cursor: pointer; transition: background-color .12s; }
.m-scale__opts span:hover { background: var(--surface-2); }
.m-scale__opts input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.m-scale__opts input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.m-scale__ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--subtle); }
.m-range2 { position: relative; height: 24px; }
.m-range2 input { position: absolute; inset: 0; width: 100%; margin: 0; pointer-events: none; appearance: none; -webkit-appearance: none; background: none; }
.m-range2 input::-webkit-slider-thumb { pointer-events: auto; appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); cursor: grab; box-shadow: 0 1px 3px rgba(12, 28, 66, .25); }
.m-range2 input::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); cursor: grab; }
.m-range2__track { position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--surface-2); }
.m-range2__fill { position: absolute; top: 10px; height: 4px; border-radius: 2px; background: var(--ink); }
.m-bubble-range { position: relative; padding-top: 36px; }
.m-bubble-range output { position: absolute; top: 0; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-family: var(--f-num); font-size: 13px; white-space: nowrap; pointer-events: none; }
.m-bubble-range output::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: var(--ink); transform: rotate(45deg); }
.m-bubble-range input { width: 100%; accent-color: var(--ink); margin: 0; }
.m-ticks { display: flex; justify-content: space-between; padding: 0 8px; margin-top: 2px; }
.m-ticks span { width: 1px; height: 6px; background: var(--border-strong); }
.m-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.m-tiles label { position: relative; }
.m-tiles input { position: absolute; opacity: 0; }
.m-tiles span { display: grid; justify-items: center; gap: 10px; padding: 18px 10px; text-align: center; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color .12s, background-color .12s; }
.m-tiles span svg.i { width: 26px; height: 26px; stroke-width: 1.4; }
.m-tiles span:hover { border-color: var(--border-strong); }
.m-tiles input:checked + span { border-color: var(--sel); box-shadow: inset 0 0 0 1px var(--sel); background: var(--accent-soft); }
.m-tiles input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.m-otp { display: flex; gap: 8px; }
.m-otp input { width: 48px; height: 56px; text-align: center; font-family: var(--f-num); font-size: 22px; color: var(--ink); border: 1px solid var(--border-strong); border-radius: var(--r-field); background: var(--surface); }
.m-otp input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px var(--focus-ring); }
.m-otp .m-otp__sep { align-self: center; color: var(--subtle); }
.m-sign { position: relative; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.m-sign canvas { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.m-sign__line { position: absolute; left: 24px; right: 24px; bottom: 44px; border-bottom: 1px dashed var(--border-strong); pointer-events: none; }
.m-sign__hint { position: absolute; left: 24px; bottom: 18px; font-size: 12px; color: var(--subtle); pointer-events: none; }
.m-sign.has-ink .m-sign__hint { opacity: 0; }
.m-stars-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.m-stars-input input { position: absolute; opacity: 0; }
.m-stars-input label { cursor: pointer; color: #D5D8E3; display: flex; }
.m-stars-input label svg { width: 30px; height: 30px; }
.m-stars-input label:hover, .m-stars-input label:hover ~ label, .m-stars-input input:checked ~ label { color: var(--s3, #D08A2E); }
.m-stars-input input:focus-visible + label { outline: 2px solid var(--focus); border-radius: 4px; }

/* Sélecteur de date et créneaux */
.m-cal { display: grid; gap: 10px; width: 100%; max-width: 340px; }
.m-cal__head { display: flex; align-items: center; justify-content: space-between; }
.m-cal__head strong { color: var(--ink); font-size: 15px; text-transform: capitalize; }
.m-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.m-cal__dow { font: 500 11px var(--f-label); color: var(--subtle); text-align: center; padding: 4px 0; text-transform: uppercase; }
.m-cal__grid button { aspect-ratio: 1; border: 0; border-radius: 6px; background: none; font-family: var(--f-num); font-size: 14px; color: var(--ink); cursor: pointer; }
.m-cal__grid button:hover:not(:disabled) { background: var(--surface-2); }
.m-cal__grid button:disabled { color: #C9CEDC; cursor: not-allowed; }
.m-cal__grid button.is-today { box-shadow: inset 0 0 0 1px var(--border-strong); }
.m-cal__grid button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.m-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.m-slots button { height: 40px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); font-family: var(--f-num); font-size: 14px; color: var(--ink); cursor: pointer; }
.m-slots button:hover { border-color: var(--ink); }
.m-slots button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.m-slots button:disabled { color: var(--subtle); background: var(--surface-2); border-color: transparent; text-decoration: line-through; cursor: not-allowed; }

/* ---------- Statistiques ---------- */
.m-stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 230px)), 1fr)); }
.m-stat { display: grid; gap: 8px; align-content: start; padding: 20px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.m-stat__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.m-stat__top svg.i { width: 18px; height: 18px; color: var(--subtle); }
.m-stat__value { font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; color: var(--ink); }
.m-stat__value small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.m-stat__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; color: var(--subtle); }
.m-stat--ink { background: var(--ink); border-color: var(--ink); }
.m-stat--ink .m-stat__value { color: #fff; }
.m-stat--ink .m-stat__top, .m-stat--ink .m-stat__foot { color: #A7B0C4; }
.m-stat--ring { grid-template-columns: auto 1fr; align-items: center; gap: 16px; }
.m-delta--flat { background: var(--surface-2); color: var(--muted); }
.m-hero-num { display: grid; gap: 6px; }
.m-hero-num__v { font-size: clamp(48px, 7cqi, 76px); font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.m-hero-num__v small { font-size: .38em; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.m-period { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.m-databar { display: grid; grid-template-columns: 1fr 56px; gap: 10px; align-items: center; }
.m-databar i { display: block; height: 8px; border-radius: 0 4px 4px 0; background: var(--s1, #6369D0); }
.m-databar span { font-family: var(--f-num); text-align: right; }
.m-chart__body { min-height: 40px; }

/* ---------- Accordéons ---------- */
.m-acc-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.m-acc--cards { border: 0; display: grid; gap: 8px; }
.m-acc--cards details { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: 0 20px; transition: border-color .15s; }
.m-acc--cards details[open] { border-color: var(--border-strong); }
.m-acc summary .m-acc__lead { display: flex; align-items: center; gap: 14px; min-width: 0; }
.m-acc summary .m-acc__lead > svg.i { width: 22px; height: 22px; color: var(--ink); transform: none !important; flex: none; }
.m-acc summary .m-acc__lead small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.m-acc__meta { margin-left: auto; margin-right: 12px; font-family: var(--f-num); font-size: 14px; color: var(--ink); white-space: nowrap; font-weight: 400; }
.m-acc--steps { counter-reset: acc; }
.m-acc--steps > details > summary::before { counter-increment: acc; content: counter(acc, decimal-leading-zero); font-family: var(--f-num); font-size: 13px; color: var(--mark); margin-right: 14px; }
.m-acc--steps > details > summary { justify-content: flex-start; }
.m-acc--steps > details > summary svg.i { margin-left: auto; }
.m-acc .m-acc { margin-top: 4px; }
.m-acc .m-acc summary { font-size: 15px; padding: 12px 0; }

/* ---------- Carrousels ---------- */
.m-carousel { display: grid; gap: 16px; }
.m-carousel__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.m-carousel__nav { display: flex; gap: 6px; }
.m-carousel__nav .m-btn { width: 40px; height: 40px; padding: 0; }
.m-carousel__nav .m-btn:disabled { opacity: .35; }
.m-carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: var(--item, calc((100% - 32px) / 3)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; margin: -2px; overscroll-behavior-x: contain; }
.m-carousel__track::-webkit-scrollbar { display: none; }
.m-carousel__track > * { scroll-snap-align: start; min-width: 0; }
@container (max-width: 820px) { .m-carousel__track { --item: calc((100% - 16px) / 2); } }
@container (max-width: 520px) { .m-carousel__track { --item: 86%; } }
.m-carousel--single .m-carousel__track { --item: 100% !important; }
.m-dots { display: flex; justify-content: center; gap: 6px; }
.m-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: #D5D8E3; cursor: pointer; transition: width .2s, background-color .2s; }
.m-dots button[aria-current="true"] { width: 22px; background: var(--ink); }
.m-slide { display: grid; gap: 24px; padding: 32px; border-radius: var(--r-lg); background: var(--surface-2); }
@container (min-width: 760px) { .m-slide { grid-template-columns: 1fr 1fr; align-items: center; padding: 40px; } }
.m-slide > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-media); }

/* ---------- Cartes empilées (glisser) ---------- */
.m-deck { display: grid; justify-items: center; gap: 20px; }
.m-deck__stack { position: relative; width: min(100%, 360px); height: 400px; }
.m-deck__card { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(12, 28, 66, .05), 0 18px 40px -22px rgba(12, 28, 66, .35); touch-action: pan-y; user-select: none; cursor: grab; transform-origin: 50% 110%; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s; will-change: transform; }
.m-deck__card.is-dragging { transition: none; cursor: grabbing; }
/* Cartes du dessous décalées et penchées : on voit qu'il y a une pile */
.m-deck__card:nth-last-child(2) { transform: translate(-10px, 6px) rotate(-5deg) scale(.97); }
.m-deck__card:nth-last-child(3) { transform: translate(12px, 12px) rotate(4deg) scale(.94); }
.m-deck__card:nth-last-child(n+4) { transform: translate(0, 16px) rotate(-1deg) scale(.92); opacity: 0; }
.m-deck__card:not(:last-child) { box-shadow: 0 1px 2px rgba(12, 28, 66, .06), 0 10px 24px -18px rgba(12, 28, 66, .4); }
.m-deck__card img { width: 100%; height: 150px; object-fit: cover; border-radius: 12px 12px 4px 4px; pointer-events: none; }
.m-deck__card h4 { margin: 0; font-size: 19px; color: var(--ink); line-height: 1.3; }
.m-deck__card p { font-size: 14px; color: var(--muted); }
.m-deck__stamp { position: absolute; top: 22px; padding: 4px 10px; border: 2px solid; border-radius: 6px; font: 600 13px var(--f-label); text-transform: uppercase; letter-spacing: .06em; opacity: 0; pointer-events: none; background: #fff; }
.m-deck__stamp--yes { right: 22px; color: var(--success); transform: rotate(8deg); }
.m-deck__stamp--no { left: 22px; color: var(--muted); transform: rotate(-8deg); }
.m-deck__actions { display: flex; align-items: center; gap: 14px; }
.m-deck__actions .m-btn--round { width: 56px; height: 56px; border-radius: 50%; padding: 0; }
.m-deck__actions .m-btn--round svg.i { width: 22px; height: 22px; }
.m-deck__count { font-family: var(--f-num); font-size: 13px; color: var(--muted); min-width: 56px; text-align: center; }
.m-deck__result { width: min(100%, 420px); }

/* ---------- Galerie et visionneuse ---------- */
.m-gallery { display: grid; gap: 8px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; }
@container (max-width: 700px) { .m-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; } }
.m-gallery button { position: relative; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.m-gallery button:first-child { grid-column: span 2; grid-row: span 2; border-radius: 20px 20px 6px 6px; }
.m-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.m-gallery button:hover img { transform: scale(1.03); }
.m-gallery button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.m-gallery__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(12, 28, 66, .6); color: #fff; font-weight: 600; font-size: 15px; }
.m-lightbox { width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; background: transparent; overflow: visible; }
.m-lightbox::backdrop { background: rgba(8, 14, 32, .88); }
.m-lightbox figure { margin: 0; display: grid; gap: 12px; }
.m-lightbox img { width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 6px; }
.m-lightbox figcaption { display: flex; justify-content: space-between; gap: 12px; color: #C9D0E0; font: 14px var(--f-body, "IBM Plex Sans"); }
.m-lightbox figcaption span:last-child { font-family: "IBM Plex Mono", monospace; }
.m-lightbox__btn { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #0C1C42; display: grid; place-items: center; cursor: pointer; }
.m-lightbox__btn svg.i { width: 22px; height: 22px; }
.m-lightbox__prev { left: -64px; }
.m-lightbox__next { right: -64px; }
.m-lightbox__close { position: absolute; top: -52px; right: 0; background: none; border: 0; color: #fff; cursor: pointer; display: flex; gap: 6px; align-items: center; font: 14px "IBM Plex Sans", sans-serif; }
@media (max-width: 1100px) { .m-lightbox__prev { left: 8px; } .m-lightbox__next { right: 8px; } }

/* ---------- Avis clients ---------- */
.m-stars { display: inline-flex; gap: 1px; color: var(--s3, #D08A2E); }
.m-stars svg { width: 16px; height: 16px; }
.m-stars .is-off { color: #D5D8E3; }
.m-rating { display: grid; gap: 24px; align-items: center; }
@container (min-width: 700px) { .m-rating { grid-template-columns: 220px 1fr; gap: 40px; } }
.m-rating__score { display: grid; gap: 6px; }
.m-rating__score b { font-size: 56px; font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.m-rating__score b small { font-size: 20px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.m-rating__dist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.m-rating__dist li { display: grid; grid-template-columns: 58px 1fr 44px; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.m-rating__dist i { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.m-rating__dist i span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.m-rating__dist b { font-family: var(--f-num); font-weight: 400; text-align: right; }
.m-review { display: grid; gap: 12px; align-content: start; padding: 22px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.m-review__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.m-review h4 { margin: 0; font-size: 16px; color: var(--ink); }
.m-review p { font-size: 15px; color: var(--text); line-height: 1.6; }
.m-review__who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.m-review__who strong { display: block; color: var(--ink); font-size: 14px; }
.m-review__reply { padding: 12px 14px; border-left: 3px solid var(--mark); background: var(--surface-2); border-radius: 0 6px 6px 0; font-size: 14px; color: var(--muted); }
.m-review__reply strong { color: var(--ink); display: block; font-size: 13px; margin-bottom: 2px; }
.m-verified { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--success); }
.m-verified svg.i { width: 14px; height: 14px; }

/* ---------- Auteur ---------- */
.m-author-hero { display: grid; gap: 24px; align-items: center; }
@container (min-width: 760px) { .m-author-hero { grid-template-columns: 200px 1fr; gap: 40px; } }
.m-author-hero img { width: 200px; aspect-ratio: 1; object-fit: cover; clip-path: url(#helmet); }
.m-author-hero__links { display: flex; flex-wrap: wrap; gap: 8px; }
.m-byline { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.m-byline img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.m-byline strong { color: var(--ink); font-weight: 600; }
.m-authors { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.m-authors a { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); text-decoration: none; background: var(--surface); }
.m-authors a:hover { border-color: var(--border-strong); }
.m-authors img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.m-authors strong { display: block; color: var(--ink); }
.m-authors span { font-size: 13px; color: var(--muted); }

/* ---------- Application : coquille ---------- */
.m-app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 760px; background: var(--surface-2); }
@container (max-width: 860px) { .m-app { grid-template-columns: 1fr; } .m-app__side { display: none; } }
.m-app__side { display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--border); }
.m-app__side img { height: 34px; margin: 0 8px 18px; align-self: flex-start; }
.m-app__side h6 { margin: 14px 10px 4px; font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); }
.m-app__side a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.m-app__side a:hover { background: var(--surface-2); color: var(--ink); }
.m-app__side a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--mark); }
.m-app__side a svg.i { width: 18px; height: 18px; }
.m-app__side a .m-count-pill { margin-left: auto; }
.m-app__side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.m-app__main { min-width: 0; display: flex; flex-direction: column; }
.m-app__top { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.m-app__search { flex: 1; max-width: 420px; }
.m-app__search .m-input { height: 40px; background: var(--surface-2); border-color: transparent; }
.m-app__search kbd { position: absolute; right: 10px; font: 12px var(--f-num); color: var(--subtle); padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
.m-app__tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.m-app__body { padding: 28px 24px 40px; display: grid; gap: 24px; align-content: start; }
.m-count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: #fff; font: 500 11px var(--f-num); }
.m-bell { position: relative; }
.m-bell .m-count-pill { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; font-size: 10px; background: var(--danger); border: 2px solid var(--surface); }
.m-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border: 0; border-radius: 999px; background: none; cursor: pointer; font: inherit; }
.m-user:hover { background: var(--surface-2); }
.m-user strong { display: block; font-size: 13px; color: var(--ink); text-align: left; }
.m-user span { display: block; font-size: 12px; color: var(--muted); text-align: left; }
@container (max-width: 700px) { .m-user > span { display: none; } }
.m-avatar--i { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font: 600 13px var(--f-body); flex: none; }
.m-avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.m-avatars { display: flex; }
.m-avatars > * { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); border-radius: 50%; }
.m-avatars > *:first-child { margin-left: 0; }
.m-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; }
.m-page-head h2 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin: 6px 0 0; }
.m-page-head p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.m-box-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.m-box-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.m-box-card__head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.m-box-card__body { padding: 20px; }
.m-grid-app { display: grid; gap: 20px; }
@container (min-width: 1000px) { .m-grid-app { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.m-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px 24px; margin: 0; }
.m-kv dt { font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); }
.m-kv dd { margin: 4px 0 0; font-size: 15px; color: var(--ink); }

/* Notifications */
.m-notifs { width: 380px; max-width: calc(100vw - 24px); padding: 0; gap: 0; }
.m-notifs__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.m-notifs__head strong { color: var(--ink); }
.m-notifs__foot { padding: 10px 16px; border-top: 1px solid var(--border); text-align: center; font-size: 14px; }
.m-notif-list { list-style: none; margin: 0; padding: 0; }
.m-notif { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--border); font-size: 14px; }
.m-notif:last-child { border-bottom: 0; }
.m-notif.is-unread { background: #F8F8FE; }
.m-notif.is-unread::before { content: ""; position: absolute; left: 9px; top: 26px; width: 7px; height: 7px; border-radius: 50%; background: var(--mark); }
.m-notif__ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.m-notif__ico svg.i { width: 18px; height: 18px; }
.m-notif__ico--success { background: var(--success-soft); color: var(--success); }
.m-notif__ico--warning { background: var(--warning-soft); color: var(--warning); }
.m-notif__ico--danger { background: var(--danger-soft); color: var(--danger); }
.m-notif p { color: var(--text); line-height: 1.45; }
.m-notif p strong { color: var(--ink); }
.m-notif time { display: block; margin-top: 3px; font-size: 12px; color: var(--subtle); }
.m-notif__actions { display: flex; gap: 8px; margin-top: 8px; }

/* Fil d'activité */
.m-feed { list-style: none; margin: 0; padding: 0; display: grid; }
.m-feed li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; padding-bottom: 22px; }
.m-feed li::after { content: ""; position: absolute; left: 15.5px; top: 34px; bottom: 2px; width: 1px; background: var(--border); }
.m-feed li:last-child { padding-bottom: 0; }
.m-feed li:last-child::after { display: none; }
.m-feed__ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.m-feed__ico svg.i { width: 16px; height: 16px; }
.m-feed__ico--mark { background: var(--ink); border-color: var(--ink); color: #fff; }
.m-feed p { font-size: 14px; color: var(--text); padding-top: 5px; }
.m-feed p strong { color: var(--ink); }
.m-feed time { font-size: 12px; color: var(--subtle); white-space: nowrap; padding-top: 7px; font-family: var(--f-num); }
.m-feed__quote { margin-top: 8px; padding: 10px 12px; border-radius: 6px; background: var(--surface-2); font-size: 13px; color: var(--muted); }

/* Suivi de dossier */
.m-track { list-style: none; margin: 0; padding: 0; display: grid; }
.m-track li { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 14px; padding-bottom: 20px; font-size: 14px; }
.m-track li::before { content: ""; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); box-sizing: border-box; position: relative; z-index: 1; }
.m-track li::after { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--border); }
.m-track li:last-child::after { display: none; }
.m-track li.is-done::before { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--ink); }
.m-track li.is-done::after { background: var(--ink); }
.m-track li.is-current::before { border-color: var(--mark); box-shadow: 0 0 0 4px var(--focus-ring); }
.m-track strong { display: block; color: var(--ink); }
.m-track span { color: var(--muted); font-size: 13px; }
.m-track li:not(.is-done):not(.is-current) strong { color: var(--muted); font-weight: 500; }

/* Calendrier mensuel */
.m-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.m-month__dow { padding: 8px 10px; font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.m-month__day { min-height: 96px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: grid; gap: 3px; align-content: start; background: var(--surface); min-width: 0; }
.m-month__day.is-out { background: #FAFAFC; }
.m-month__day.is-out .m-month__n { color: #C9CEDC; }
.m-month__n { font: 13px var(--f-num); color: var(--ink); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.m-month__day.is-today .m-month__n { background: var(--ink); color: #fff; }
.m-evt { display: block; width: 100%; padding: 3px 6px; border: 0; border-radius: 4px; font-size: 12px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; border-left: 3px solid; font-family: var(--f-body); }
.m-evt--rdv { background: var(--accent-soft); border-color: var(--s1, #6369D0); color: var(--ink); }
.m-evt--ech { background: #FBF3E7; border-color: var(--s3, #D08A2E); color: #6B4510; }
.m-evt--sin { background: #E6F4F1; border-color: var(--s2, #2E9C8A); color: #1D5E53; }
@container (max-width: 700px) { .m-month__day { min-height: 56px; } .m-evt { font-size: 0; height: 6px; padding: 0; border-left: 0; } }
.m-agenda { list-style: none; margin: 0; padding: 0; display: grid; }
.m-agenda li { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.m-agenda__date { display: grid; justify-items: center; line-height: 1.1; }
.m-agenda__date b { font: 500 22px var(--f-num); color: var(--ink); }
.m-agenda__date span { font: 500 11px var(--f-label); text-transform: uppercase; color: var(--subtle); }
.m-agenda strong { color: var(--ink); display: block; }
.m-agenda small { color: var(--muted); }

/* Documents */
.m-doclist { list-style: none; margin: 0; padding: 0; }
.m-doclist li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.m-doclist li:last-child { border-bottom: 0; }
.m-doclist .m-download__ico { width: 34px; height: 40px; font-size: 9px; }
.m-doclist strong { display: block; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-doclist small { color: var(--subtle); font-family: var(--f-num); font-size: 12px; }
@container (max-width: 600px) { .m-doclist li { grid-template-columns: 34px minmax(0, 1fr) auto; } .m-doclist li > .m-badge { display: none; } }
.m-uploadq { display: grid; gap: 10px; }
.m-uploadq__item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.m-uploadq__item .m-progress__track { height: 4px; margin-top: 6px; }

/* Paramètres */
.m-settings { display: grid; gap: 24px; }
@container (min-width: 860px) { .m-settings { grid-template-columns: 220px minmax(0, 1fr); } }
.m-settings [role="tablist"] { display: flex; flex-direction: column; gap: 2px; }
@container (max-width: 859px) { .m-settings [role="tablist"] { flex-direction: row; overflow-x: auto; } }
.m-settings [role="tab"] { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 6px; background: none; font: 500 14px var(--f-body); color: var(--muted); text-align: left; cursor: pointer; white-space: nowrap; }
.m-settings [role="tab"] svg.i { width: 18px; height: 18px; }
.m-settings [role="tab"]:hover { background: var(--surface); color: var(--ink); }
.m-settings [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 3px 0 0 var(--mark); }
.m-setting { display: grid; gap: 12px 32px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.m-setting:first-child { padding-top: 0; }
.m-setting:last-child { border-bottom: 0; padding-bottom: 0; }
@container (min-width: 700px) { .m-setting { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; } }
.m-setting h4 { margin: 0; font-size: 15px; color: var(--ink); }
.m-setting p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.m-setting--row { grid-template-columns: minmax(0, 1fr) auto !important; align-items: center !important; }
.m-danger { border: 1px solid #F1C8C3; border-radius: var(--r-md); padding: 18px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.m-danger h4 { margin: 0; color: var(--danger); font-size: 15px; }
.m-btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.m-btn--danger:hover { background: var(--danger-soft); }
.m-session { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; font-size: 14px; }
.m-session svg.i { color: var(--muted); }
.m-session small { display: block; color: var(--subtle); font-size: 12px; }

/* Messagerie */
.m-chat { display: grid; grid-template-rows: auto 1fr auto; height: 520px; }
.m-chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.m-chat__head strong { display: block; color: var(--ink); font-size: 15px; }
.m-chat__head span { font-size: 12px; color: var(--success); display: inline-flex; align-items: center; gap: 6px; }
.m-chat__head span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.m-chat__log { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.m-msg { max-width: 76%; display: grid; gap: 4px; }
.m-msg p { padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; line-height: 1.5; color: var(--text); }
.m-msg time { font-size: 11px; color: var(--subtle); font-family: var(--f-num); }
.m-msg--me { align-self: flex-end; justify-items: end; }
.m-msg--me p { background: var(--ink); border-color: var(--ink); color: #fff; border-radius: 14px 14px 4px 14px; }
.m-msg__file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--ink); }
.m-chat__day { align-self: center; font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); }
.m-chat__form { display: flex; gap: 8px; align-items: end; padding: 12px; border-top: 1px solid var(--border); }
.m-chat__form textarea { flex: 1; min-height: 44px; max-height: 120px; height: 44px; resize: none; padding: 10px 14px; }

/* Administration */
.m-bulkbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: var(--ink); color: #fff; font-size: 14px; }
.m-bulkbar[hidden] { display: none; }
.m-bulkbar .m-btn { height: 32px; font-size: 13px; padding: 0 12px; }
.m-bulkbar .m-btn--secondary { color: #fff; border-color: rgba(255, 255, 255, .35); }
.m-bulkbar .m-btn--secondary:hover { background: rgba(255, 255, 255, .1); }
.m-bulkbar b { font-family: var(--f-num); font-weight: 500; }
.m-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.m-filter-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px dashed var(--border-strong); border-radius: 6px; background: var(--surface); font: 14px var(--f-body); color: var(--muted); cursor: pointer; }
.m-filter-btn.is-set { border-style: solid; color: var(--ink); background: var(--accent-soft); border-color: #C9CCF1; }
.m-filter-btn svg.i { width: 15px; height: 15px; }
.m-table td.m-sel, .m-table th.m-sel { width: 44px; padding-right: 0; }
.m-table tr.is-selected > * { background: #F6F6FD !important; }
.m-cell-user { display: flex; align-items: center; gap: 10px; }
.m-cell-user strong { display: block; color: var(--ink); font-weight: 500; }
.m-cell-user span { font-size: 12px; color: var(--subtle); }
.m-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); white-space: nowrap; }
.m-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); }
.m-status--ok::before { background: var(--success); }
.m-status--wait::before { background: var(--warning); }
.m-status--ko::before { background: var(--danger); }
.m-status--new::before { background: var(--mark); }
.m-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.m-kanban__col { display: grid; gap: 10px; align-content: start; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.m-kanban__col > header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink); padding: 2px 4px; }
.m-kanban__col > header span { font: 12px var(--f-num); color: var(--muted); font-weight: 400; }
.m-kcard { display: grid; gap: 8px; padding: 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; cursor: grab; }
.m-kcard:hover { border-color: var(--border-strong); }
.m-kcard strong { color: var(--ink); }
.m-kcard__foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.m-kcard__foot b { font-family: var(--f-num); color: var(--ink); font-weight: 500; font-size: 13px; }
.m-log { font-family: var(--f-num); font-size: 12.5px; }
.m-log td, .m-log th { padding: 8px 14px !important; }

/* Palette de commandes */
.m-cmdk { width: min(620px, calc(100vw - 32px)); margin-top: 12vh; }
.m-cmdk__input { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.m-cmdk__input svg.i { color: var(--muted); }
.m-cmdk__input input { flex: 1; height: 58px; border: 0; outline: none; font: 17px var(--f-body); color: var(--ink); background: none; }
.m-cmdk__input kbd { font: 12px var(--f-num); color: var(--subtle); padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; }
.m-cmdk__list { list-style: none; margin: 0; padding: 8px; max-height: 360px; overflow: auto; }
.m-cmdk__list h6 { margin: 8px 10px 4px; font: 500 11px var(--f-label); text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); }
.m-cmdk__list li[role="option"] { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.m-cmdk__list li[role="option"] svg.i { width: 18px; height: 18px; color: var(--muted); }
.m-cmdk__list li[role="option"] small { margin-left: auto; font: 12px var(--f-num); color: var(--subtle); }
.m-cmdk__list li[aria-selected="true"] { background: var(--accent-soft); color: var(--ink); }
.m-cmdk__foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--subtle); background: var(--surface-2); border-radius: 0 0 6px 6px; }
.m-cmdk__foot kbd { font: 11px var(--f-num); padding: 1px 5px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); margin-right: 4px; }
/* Correctifs de mise en page : une colonne de grille ne déborde jamais de sa piste */
.m-stack { grid-template-columns: minmax(0, 1fr); }
.m-grid-app > *, .m-sim > *, .m-cols-2 > *, .m-cols-3 > * { min-width: 0; }
.m-user .m-avatar--i { display: inline-grid; }
.m-stars-input { justify-content: flex-end; justify-self: start; }

/* Titres de catégorie d'une FAQ */
.m-acc-cat { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; color: var(--ink); }
.m-acc-cat::before { content: ""; width: 11px; height: 16px; flex: none; background: var(--mark); clip-path: polygon(0 0, 100% 0, 68% 40%, 68% 100%, 32% 100%, 32% 40%); }
.m-acc-cat span { font: 500 12px var(--f-num); color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: 10px; letter-spacing: 0; }

/* Carrousel 2 : diaporama à vignettes */
.m-show-slide { position: relative; display: grid; min-height: 380px; border-radius: var(--r-media); overflow: hidden; background: var(--ink); }
.m-show-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.m-show-slide__txt { position: relative; align-self: end; display: grid; gap: 12px; justify-items: start; padding: clamp(22px, 4cqi, 40px); max-width: 580px; color: #E4E8F1; }
.m-show-slide__txt h3 { margin: 0; font-size: clamp(24px, 3.2cqi, 36px); line-height: 1.1; letter-spacing: -.025em; color: #fff; }
.m-show-slide__txt .m-eyebrow { color: #fff; }
.m-show-slide__txt .m-btn--primary { background: #fff; color: var(--ink); }
.m-thumbs { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; }
.m-thumbs button { display: grid; gap: 4px; padding: 12px 0 0; border: 0; border-top: 3px solid var(--border); background: none; text-align: left; cursor: pointer; font: 600 14px var(--f-body); color: var(--muted); transition: color .15s, border-color .15s; }
.m-thumbs button small { font: 12px var(--f-num); color: var(--subtle); font-weight: 400; }
.m-thumbs button:hover { color: var(--ink); }
.m-thumbs button[aria-current="true"] { border-top-color: var(--mark); color: var(--ink); }
@container (max-width: 620px) { .m-thumbs button span { display: none; } }
.m-carousel__count { font: 500 13px var(--f-num); color: var(--muted); min-width: 64px; text-align: center; }

/* Carrousel 3 : élément centré, voisins en retrait */
.m-carousel--center .m-carousel__track { --item: 58% !important; padding-inline: 21%; scroll-padding-inline: 21%; }
.m-carousel--center .m-carousel__track > * { scroll-snap-align: center; transform: scale(.9); opacity: .4; transition: transform .35s ease, opacity .35s ease; }
.m-carousel--center .m-carousel__track > .is-active { transform: none; opacity: 1; }
@container (max-width: 620px) { .m-carousel--center .m-carousel__track { --item: 84% !important; padding-inline: 8%; scroll-padding-inline: 8%; } }
