/* Kit des démonstrations AI4MVP : une feuille commune, chaque démo choisit ses couleurs dans :root.
   Mobile d'abord ; au-delà de 900 px et avec data-layout="sidebar", la navigation passe à gauche. */
:root {
  --c1: #2F6FED; --c1-dark: #1F55C2; --c1-soft: #E8F0FF; --c2: #22C55E; --c2-soft: #E5F9EC;
  --ink: #16133A; --muted: #5B5880; --line: #E3E0F5; --bg: #F5F6FA; --card: #FFFFFF; --warn: #F59E0B; --warn-soft: #FFF4DE; --bad: #EF4444; --bad-soft: #FDE8E8;
  --r: 16px; --r-sm: 10px; --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --shadow: 0 10px 30px rgba(22, 19, 58, .10);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
a { color: var(--c1); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.25rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: .6rem; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: .75rem; }
.hidden { display: none !important; }

/* Bandeau de démonstration */
.dk-banner { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem .9rem; background: #16133A; color: #fff; font-size: .78rem; }
.dk-banner strong { color: #22E3A8; font-weight: 600; }
.dk-banner__back { color: #fff; font-weight: 600; text-decoration: none; }
.dk-banner__back:hover { color: #22E3A8; }
.dk-banner button { background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 999px; padding: .2rem .7rem; font-size: .75rem; }
.dk-banner button:hover { border-color: #22E3A8; color: #22E3A8; }
.dk-banner button { white-space: nowrap; flex: none; }
@media (max-width: 480px) { .dk-banner__more { display: none; } }

body.no-banner .topbar { top: 0; }
body.no-banner .app { min-height: 100vh; }
@media (min-width: 900px) { body[data-layout="sidebar"].no-banner .tabbar { top: 0; height: 100vh; } }

/* Coquille de l'application */
.app { min-height: calc(100% - 34px); display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 34px; z-index: 40; }
.topbar h1 { font-size: 1.05rem; margin: 0; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; letter-spacing: -.01em; }
.brand__logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--c1); font-weight: 800; font-size: .9rem; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--c1-soft); color: var(--c1-dark); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.main { flex: 1; padding: 1rem 1rem 5.5rem; }
.view { display: none; animation: fade .25s ease; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Navigation basse (téléphone) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: var(--card); border-top: 1px solid var(--line); padding: .35rem .3rem calc(.35rem + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem .2rem; border-radius: var(--r-sm); color: var(--muted); font-size: .68rem; font-weight: 600; }
.tabbar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.is-active { color: var(--c1); background: var(--c1-soft); }

/* Cartes, listes, badges */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .95rem 1rem; }
.card + .card { margin-top: .7rem; }
.card--tap { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.card--tap:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.card__title { font-weight: 700; margin: 0; }
.card__sub { color: var(--muted); font-size: .85rem; margin: .1rem 0 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--c1-soft); color: var(--c1-dark); white-space: nowrap; }
.badge--ok { background: var(--c2-soft); color: #15803D; }
.badge--warn { background: var(--warn-soft); color: #B45309; }
.badge--bad { background: var(--bad-soft); color: #B91C1C; }
.badge--grey { background: #EEF0F5; color: var(--muted); }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; margin-bottom: .8rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .35rem .8rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.progress { height: 8px; border-radius: 999px; background: #EEF0F5; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--c1); border-radius: 999px; transition: width .4s ease; }
.progress--ok > span { background: var(--c2); }
.progress--warn > span { background: var(--warn); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-bottom: 1rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .85rem .95rem; }
.kpi__num { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi__label { color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.kpi--accent { background: var(--c1); color: #fff; border-color: var(--c1); }
.kpi--accent .kpi__label { color: rgba(255, 255, 255, .8); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 1.2rem 0 .6rem; }
.section-title h2 { margin: 0; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; border: 1px dashed var(--line); border-radius: var(--r); }

/* Boutons et formulaires */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.1rem; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: .92rem; background: var(--c1); color: #fff; transition: background .15s, transform .15s; }
.btn:hover { background: var(--c1-dark); }
.btn:active { transform: scale(.98); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--card); border-color: var(--c1); color: var(--c1); }
.btn--ok { background: var(--c2); color: #06341A; }
.btn--ok:hover { background: #16A34A; }
.btn--danger { background: var(--bad-soft); color: #B91C1C; }
.btn--sm { padding: .45rem .8rem; font-size: .82rem; }
.btn--block { width: 100%; }
.btn--icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.fab { position: fixed; right: 1rem; bottom: 4.6rem; z-index: 41; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--c1); color: #fff; font-size: 1.8rem; line-height: 1; box-shadow: 0 10px 24px rgba(47, 111, 237, .4); display: grid; place-items: center; }
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; }
.input, .select, .textarea { width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); outline: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--c1); box-shadow: 0 0 0 3px var(--c1-soft); }
.textarea { min-height: 84px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.check { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--c2); flex: none; }
.check.is-done span { text-decoration: line-through; color: var(--muted); }
.seg { display: inline-flex; background: #EEF0F5; border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: .35rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.seg button.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; background: var(--card); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #FAFAFE; }
.table tr:last-child td { border-bottom: 0; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.photo { aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--c1-soft); display: grid; place-items: center; color: var(--c1-dark); font-size: .72rem; font-weight: 600; text-align: center; padding: .3rem; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--add { border: 2px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.2rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem .9rem; }
.timeline li::before { content: ""; position: absolute; left: -1.75rem; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 0 3px var(--card); }
.timeline time { display: block; font-size: .75rem; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.cal__day { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 84px; padding: .35rem; font-size: .7rem; }
.cal__day strong { display: block; font-size: .78rem; margin-bottom: .25rem; }
.cal__day.is-today { border-color: var(--c1); box-shadow: inset 0 0 0 1px var(--c1); }
.cal__item { background: var(--c1-soft); color: var(--c1-dark); border-radius: 6px; padding: .15rem .3rem; margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal__item--warn { background: var(--warn-soft); color: #B45309; }

/* Fenêtre modale et notification */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; background: rgba(22, 19, 58, .45); backdrop-filter: blur(2px); }
.modal.is-open { display: flex; }
.modal__panel { width: 100%; max-width: 520px; max-height: 92%; overflow: auto; background: var(--card); border-radius: var(--r) var(--r) 0 0; padding: 1.1rem 1.1rem 1.4rem; animation: up .25s ease; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.modal__head h2 { margin: 0; }
.modal__close { border: 0; background: #EEF0F5; width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; }
.modal__foot { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }
.toast { position: fixed; left: 50%; bottom: 5.4rem; transform: translate(-50%, 20px); z-index: 120; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 999px; font-size: .85rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90%; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Écran large : navigation à gauche */
@media (min-width: 900px) {
  body[data-layout="sidebar"] .app { flex-direction: row; min-height: calc(100vh - 34px); }
  body[data-layout="sidebar"] .topbar { position: static; border: 0; background: transparent; padding: 1.2rem 1.4rem .4rem; }
  body[data-layout="sidebar"] .tabbar { position: sticky; top: 34px; left: auto; bottom: auto; flex-direction: column; width: 220px; height: calc(100vh - 34px); border-top: 0; border-right: 1px solid var(--line); padding: 1rem .8rem; gap: .2rem; align-self: flex-start; }
  body[data-layout="sidebar"] .tabbar a { flex: none; flex-direction: row; justify-content: flex-start; gap: .7rem; padding: .65rem .8rem; font-size: .9rem; }
  body[data-layout="sidebar"] .tabbar a svg { width: 20px; height: 20px; }
  body[data-layout="sidebar"] .content { flex: 1; min-width: 0; }
  body[data-layout="sidebar"] .main { padding: .4rem 1.4rem 2rem; max-width: 1100px; }
  body[data-layout="sidebar"] .fab { bottom: 1.5rem; right: 1.5rem; }
  body[data-layout="sidebar"] .toast { bottom: 1.5rem; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .modal { align-items: center; }
  .modal__panel { border-radius: var(--r); }
  .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
}

/* Impression : seule la vue active, sans navigation */
@media print {
  .dk-banner, .tabbar, .fab, .topbar .btn, .no-print { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; }
  .card, .kpi, .table { break-inside: avoid; box-shadow: none; }
}

/* Bandeau : boutons visite guidée et remise à zéro */
.dk-banner__btns { display: flex; gap: .4rem; flex: none; }
.dk-banner__tour { background: #22E3A8 !important; border-color: #22E3A8 !important; color: #16133A !important; font-weight: 700; }
.dk-banner__tour:hover { background: #3FF0B8 !important; }
@media (max-width: 560px) { .dk-banner__tour { font-size: 0 !important; padding: .2rem .55rem !important; } .dk-banner__tour::before { content: "▶"; font-size: .75rem; } }

/* Visite guidée : masque, surlignage, bulle */
.tour-mask { position: fixed; inset: 0; z-index: 200; background: transparent; }
.tour-hl { position: fixed; z-index: 201; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(22, 19, 58, .55), 0 0 0 3px #22E3A8, 0 0 24px rgba(34, 227, 168, .55); pointer-events: none; transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease; }
.tour-bubble { position: fixed; z-index: 202; background: #16133A; color: #fff; border-radius: 16px; padding: 1rem 1.1rem .9rem; box-shadow: 0 24px 60px rgba(10, 8, 30, .5); font-size: .92rem; line-height: 1.45; animation: fade .25s ease; }
.tour-bubble::before { content: ""; position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; background: #16133A; transform: rotate(45deg); }
.tour-bubble[data-place="bottom"]::before { top: -7px; }
.tour-bubble[data-place="top"]::before { bottom: -7px; }
.tour-bubble[data-place="center"]::before, .tour-bubble[data-place="sheet"]::before { display: none; }
.tour-bubble__step { margin: 0 0 .3rem; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #22E3A8; font-weight: 700; }
.tour-bubble__title { margin: 0 0 .3rem; color: #fff; font-size: 1.05rem; }
.tour-bubble__text { margin: 0 0 .8rem; color: rgba(255, 255, 255, .85); }
.tour-bubble__btns { display: flex; align-items: center; gap: .5rem; }
.tour-bubble__skip { background: none; border: 0; color: rgba(255, 255, 255, .6); font-size: .8rem; padding: 0; text-decoration: underline; }
.tour-bubble__skip:hover { color: #fff; }
.tour-bubble .btn { background: #22E3A8; color: #16133A; }
.tour-bubble .btn:hover { background: #3FF0B8; }
.tour-bubble .tour-bubble__prev { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); padding-inline: .7rem; }
.tour-bubble .tour-bubble__prev:disabled { opacity: .35; cursor: default; }

/* Fin de visite : « Et chez vous ? » */
.tour-end { position: fixed; inset: 0; z-index: 210; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(22, 19, 58, .6); backdrop-filter: blur(3px); animation: fade .3s ease; }
.tour-end__card { width: 100%; max-width: 520px; background: #fff; color: var(--ink); border-radius: 20px; padding: 1.6rem 1.6rem 1.2rem; box-shadow: 0 30px 80px rgba(10, 8, 30, .5); text-align: center; animation: up .3s ease; }
.tour-end__kicker { margin: 0 0 .4rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #6D4AFF; font-weight: 700; }
.tour-end__card h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.tour-end__card p { color: var(--muted); }
.tour-end__facts { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.tour-end__facts li { background: #F6F5FF; color: #5436E0; border-radius: 999px; padding: .3rem .75rem; font-size: .8rem; font-weight: 600; }
.tour-end__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .4rem; }
.tour-end__btns .btn { background: #6D4AFF; color: #fff; }
.tour-end__btns .btn:hover { background: #5436E0; }
.tour-end__btns .btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.tour-end__btns .btn--ghost:hover { border-color: #6D4AFF; color: #6D4AFF; }
.tour-end__replay { margin-top: .9rem; background: none; border: 0; color: var(--muted); font-size: .82rem; text-decoration: underline; }

/* Mode vidéo : curseur et sous-titres */
body.is-video { cursor: none; }
body.is-video .tour-mask--video { pointer-events: none; }
.tour-cursor { position: fixed; left: 0; top: 0; z-index: 300; width: 30px; height: 30px; pointer-events: none; transition: transform .6s cubic-bezier(.22, 1, .36, 1); filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.tour-cursor svg { width: 100%; height: 100%; }
.tour-cursor::after { content: ""; position: absolute; left: 3px; top: 1px; width: 10px; height: 10px; border-radius: 50%; background: rgba(34, 227, 168, .7); opacity: 0; transform: scale(.5); }
.tour-cursor.is-click::after { animation: click-ring .3s ease-out; }
@keyframes click-ring { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(3.4); } }
.tour-caption { position: fixed; left: 50%; bottom: 18px; z-index: 290; transform: translate(-50%, 12px); max-width: min(92vw, 760px); background: rgba(22, 19, 58, .94); color: #fff; border-radius: 14px; padding: .8rem 1.1rem; font-size: 1.05rem; line-height: 1.4; box-shadow: 0 16px 40px rgba(10, 8, 30, .4); opacity: 0; transition: opacity .25s, transform .25s; display: flex; gap: .7rem; align-items: baseline; flex-wrap: wrap; }
.tour-caption.is-on { opacity: 1; transform: translate(-50%, 0); }
.tour-caption__step { color: #22E3A8; font-weight: 700; font-size: .8rem; }
.tour-caption strong { color: #fff; }
.tour-caption__text { color: rgba(255, 255, 255, .85); flex-basis: 100%; }

/* ---------- Tous écrans : la page ne défile jamais à l'horizontale ----------
   Un contenu trop large élargissait la page ; sur téléphone le navigateur dézoome alors et les éléments fixes (navigation,
   bulle de visite) sortent de l'écran. Garde-fou global, puis chaque composant large défile dans son propre cadre. */
html, body { overflow-x: hidden; overflow-x: clip; max-width: 100%; }
.app, .content, .main, .view { min-width: 0; max-width: 100%; }
.card, .kpi, .list li, .row, .grow { min-width: 0; }
.card { overflow-wrap: break-word; }
img, svg, canvas, video { max-width: 100%; }
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); }
.table-scroll > .table { min-width: 100%; }
.card + .table-scroll, .table-scroll + .card, .table-scroll + .table-scroll { margin-top: .7rem; }
.cal__day { min-width: 0; }
.cal__item { max-width: 100%; }
.chips, .seg { max-width: 100%; }
.seg { overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { white-space: nowrap; flex: none; }
.input, .select, .textarea { min-width: 0; max-width: 100%; }
.grid-2 > *, .cols-2 > *, .kpis > * { min-width: 0; }
.modal__panel { max-width: min(520px, 100%); overflow-x: hidden; }
.tour-end__card { max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; }
.tour-bubble { max-width: calc(100vw - 24px); }
@media (max-width: 720px) {
  /* Planning hebdomadaire : sept colonnes lisibles qui défilent dans leur cadre, au lieu de sept colonnes de 40 px */
  .cal { grid-template-columns: repeat(7, minmax(112px, 1fr)); overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .4rem; scroll-snap-type: x proximity; }
  .cal__day { scroll-snap-align: start; }
  .table { font-size: .82rem; }
  .table th, .table td { padding: .5rem .55rem; }
  .kpi__num { font-size: 1.35rem; }
  .topbar { padding: .7rem .8rem; gap: .5rem; }
  .brand { min-width: 0; }
  .brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand small { overflow: hidden; text-overflow: ellipsis; }
  /* Navigation basse : un libellé long passe sur deux lignes au lieu d'être coupé ; cinq entrées = caractères plus petits */
  .tabbar a { min-width: 0; white-space: normal; text-align: center; line-height: 1.15; }
  .tabbar:has(a:nth-child(5)) a { font-size: .6rem; padding-inline: .1rem; }
  .tabbar:has(a:nth-child(5)) a svg { width: 20px; height: 20px; }
  .modal__foot { flex-wrap: wrap; }
  /* Tableaux à quatre colonnes ou plus : largeur lisible, ils défilent dans leur cadre au lieu d'empiler un mot par ligne */
  .table:has(th:nth-child(4)) { min-width: 520px; }
  .table:has(th:nth-child(5)) { min-width: 620px; }
  .table:has(th:nth-child(6)) { min-width: 720px; }
  /* Listes : le texte garde au moins 58 % de la ligne, les boutons passent dessous quand la place manque */
  .list li { flex-wrap: wrap; row-gap: .4rem; }
  .list li > .grow { flex: 1 1 58%; }
  /* Bandeau : une seule ligne */
  .dk-banner > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tour-end__btns .btn { flex: 1 1 100%; }
}
@media (max-width: 380px) { .grid-2 { grid-template-columns: 1fr; } .kpi { padding: .7rem .75rem; } }
@media (max-width: 560px) {
  /* Titre + pastille sur une même ligne : la pastille passe dessous plutôt que d'écraser le titre */
  .row--between { flex-wrap: wrap; row-gap: .3rem; }
  .row--between > .card__title, .row--between > h1, .row--between > .grow { flex: 1 1 60%; min-width: 0; }
}
