/* Habillage commun, version 1 « מרכז בקרה » choisie par Simcha (08/11) :
   menu en haut, toute la largeur pour le contenu, rubis sur gris clair, memes cartes / tables / boutons / champs partout. */
:root {
  --bg: #f2f3f5; --card: #fff; --ink: #1d1a1c; --ink2: #4b4448; --muted: #72676d;
  --line: #e4e1e3; --brand: #a3243b; --brand2: #873247; --brandbg: #fbecef; --navy: #30232b; --navy2: #30232b;
  --ok: #1f8a5b; --okbg: #e9f6ef; --bad: #c0392b; --badbg: #fcecea;
  --radius: 14px; --shadow: none; --bar-h: 58px;
}
html { font-size: 15px; scroll-padding-top: calc(var(--bar-h) + 12px); }
body { font-family: 'Rubik', system-ui, sans-serif; background: var(--bg); color: var(--ink); }
h1, h2, h3, .page-head h1, .logo { font-family: 'Fredoka', 'Rubik', sans-serif; font-weight: 500; letter-spacing: normal; }
h1, .page-head h1 { font-size: 1.9rem; }
h2 { font-size: 1.15rem; }
::selection { background: #f1c4ce; color: #54202c; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
input, textarea { caret-color: var(--brand); }
input, select, textarea { border-color: #dcd6d9; border-radius: 10px; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px #a3243b1f; }
button { background: var(--brand); border-radius: 10px; font-weight: 500; }
button:hover { background: #86192d; }
button.ghost { background: #fff; color: var(--ink2); border: 1px solid #dcd6d9; }
button.ghost:hover { background: #f7f2f4; border-color: #cbbfc5; }
a { color: var(--brand); }

/* ---------- Barre du haut ---------- */
.shell.top { display: block; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .9rem; min-height: var(--bar-h); padding: .45rem clamp(.8rem, 2vw, 1.6rem);
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar .logo { display: flex; align-items: center; gap: .55rem; padding: 0; color: var(--ink); font-size: 1.12rem; white-space: nowrap; flex: none; }
.topbar .logo .mark svg { width: 30px; height: 30px; }
.topbar nav { display: flex; align-items: center; gap: .15rem; flex: 1; min-width: 0; }
.topbar .nav-groups { display: flex; align-items: center; gap: .15rem; }
.top-link, .nav-group > summary { display: flex; align-items: center; gap: .3rem; padding: .48rem .7rem; border-radius: 9px; color: var(--ink2); font-weight: 400; white-space: nowrap; cursor: pointer; list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ""; width: .42rem; height: .42rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); opacity: .55; margin-inline-start: .15rem; }
.top-link:hover, .nav-group > summary:hover { background: #f4f0f2; color: var(--ink); text-decoration: none; }
.top-link.on, .nav-group.here > summary { background: var(--brandbg); color: var(--brand); font-weight: 500; }
.nav-group[open] > summary { background: #f1ebee; color: var(--ink); }
.nav-group { position: relative; border: 0; padding: 0; }
.nav-panel { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 50; min-width: 270px; max-height: min(70vh, 560px); overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .35rem; box-shadow: 0 12px 32px -12px rgba(40, 20, 30, .28), 0 2px 6px rgba(40, 20, 30, .06);
  animation: drop-in .14s ease-out; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nav-row { display: flex; align-items: center; min-width: 0; border-radius: 8px; }
.nav-row:hover { background: #f6f0f3; }
.nav-row a { display: flex; align-items: center; gap: .65rem; flex: 1; min-width: 0; padding: .55rem .6rem; color: var(--ink); white-space: nowrap; }
.nav-row a:hover { text-decoration: none; }
.nav-row a svg { color: var(--brand); opacity: .85; }
.nav-row a.on { color: var(--brand); font-weight: 500; }
.nav-row a span { overflow-wrap: anywhere; }
.nav-row .navbadge { margin-inline-start: auto; font-style: normal; font-size: .72rem; font-weight: 600; background: var(--brand); color: #fff; border-radius: 99px; min-width: 1.35rem; text-align: center; padding: 0 .4rem; }
.nav-pin { flex: none; background: transparent; color: #b7a8af; padding: .45rem; border: 1px solid transparent; opacity: 0; transition: opacity .12s; }
.nav-row:hover .nav-pin, .nav-pin:focus-visible, .nav-pin[aria-pressed=true] { opacity: 1; }
.nav-pin:hover, .nav-pin[aria-pressed=true] { background: var(--brandbg); color: var(--brand); }
.nav-pin svg { width: 15px; height: 15px; }
.nav-personal h2, .nav-recent > summary { font-family: inherit; font-size: .8rem; color: var(--muted); font-weight: 500; margin: .45rem .6rem .2rem; cursor: default; list-style: none; }
.nav-recent > summary::-webkit-details-marker { display: none; }
.nav-search { flex: 0 1 230px; display: block; margin: 0; }
.nav-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nav-search input { width: 100%; padding: .45rem .9rem; border-radius: 99px; background: #f6f4f5; border-color: var(--line); font-size: .92rem; }
.nav-search input:focus { background: #fff; }
#nav-empty { color: var(--muted); padding: .7rem; margin: 0; }
/* Recherche : tous les groupes en une seule liste sous la barre */
nav.searching .nav-groups { position: absolute; top: 100%; inset-inline-end: clamp(.8rem, 2vw, 1.6rem); z-index: 60; display: block; width: min(440px, 94vw); max-height: 70vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .4rem; box-shadow: 0 12px 32px -12px rgba(40, 20, 30, .28); }
nav.searching .nav-groups .nav-group > summary { font-size: .8rem; color: var(--muted); padding: .45rem .6rem .1rem; background: none; pointer-events: none; }
nav.searching .nav-groups .nav-group > summary::after { display: none; }
nav.searching .nav-groups .nav-panel { position: static; box-shadow: none; border: 0; padding: 0; min-width: 0; max-height: none; animation: none; }
.me-menu { position: relative; flex: none; }
.me-menu > summary { list-style: none; cursor: pointer; }
.me-menu > summary::-webkit-details-marker { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #3d2a33; color: #fff; font-weight: 600; }
.me-menu .nav-panel { inset-inline-start: auto; inset-inline-end: 0; min-width: 210px; display: flex; flex-direction: column; }
.me-menu .nav-panel b { padding: .5rem .65rem .4rem; border-bottom: 1px solid var(--line); margin-bottom: .2rem; }
.me-menu .nav-panel a { padding: .5rem .65rem; border-radius: 8px; color: var(--ink); }
.me-menu .nav-panel a:hover { background: #f6f0f3; text-decoration: none; }
.nav-mobile { display: none; }
[hidden], .nav-row[hidden] { display: none !important; }

/* ---------- Contenu ---------- */
.content { overflow-wrap: anywhere; }
.content main { width: 100%; max-width: 1360px; margin-inline: auto; padding: 1.6rem clamp(1rem, 2.6vw, 2.4rem) 3rem; animation: page-in .22s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@view-transition { navigation: auto; }
.page-head { align-items: flex-end; margin-bottom: 1.3rem; }
.page-head p { color: var(--muted); }
.card { border: 1px solid var(--line); box-shadow: none; padding: 1.2rem 1.3rem; border-radius: var(--radius); }
.card h2 { margin-bottom: .8rem; }
.kpi { box-shadow: none; border-radius: var(--radius); }
.kpi .num { font-size: 2.1rem; font-weight: 600; letter-spacing: normal; font-variant-numeric: tabular-nums; }
.kpi .ico:not(.g):not(.r):not(.y) { background: var(--brandbg); color: var(--brand); }
.bar .fill { background: var(--brand); }
.filters { box-shadow: none; }
.seg { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg a { border-radius: 8px; padding: .4rem .95rem; }
.seg a.on { background: var(--ink); color: #fff; box-shadow: none; }
.seg a:hover:not(.on) { background: #f4f0f2; }
.table-wrap { width: 100%; margin-inline: auto; box-shadow: none; border-radius: 12px; }
/* En-tete de tableau toujours visible au defilement (tous les .table-wrap) : la boite defile, l'en-tete reste colle en haut */
.table-wrap { max-height: calc(100vh - var(--bar-h) - 1rem); overflow: auto; }
.table-wrap > table { border-collapse: separate; border-spacing: 0; }
.table-wrap > table > thead > tr:first-child > th { position: sticky; top: 0; z-index: 2; background: #f8f9fc; box-shadow: 0 1px 0 var(--line); }
.table-wrap.tall { max-height: 75vh; overflow: auto; overscroll-behavior: contain; }
.table-wrap.tall > table { border-collapse: separate; border-spacing: 0; }
.table-wrap.tall > table > thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
table { margin-inline: auto; font-variant-numeric: tabular-nums; }
.list th, .list td { text-align: center; vertical-align: middle; padding: .75rem .9rem; }
.list th { font-size: .85rem; font-weight: 500; background: #f7f4f5; color: var(--muted); }
.list tbody tr:hover td { background: #fcf6f8; }
.pill { font-weight: 500; }
.ok { background: var(--okbg); color: #146b45; }
.err { background: var(--badbg); color: #9b2c22; }
.notice { border-radius: 12px; }
.workday { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.1rem; padding: 0; border: 0; }
.workday b { font-weight: 500; color: var(--muted); margin-inline-end: .3rem; }
.workday h2 { margin: 0 0 .7rem; }
.workday > div { display: flex; flex-wrap: wrap; gap: .6rem; }
.workday a { border: 1px solid var(--line); border-radius: 99px; padding: .35rem .85rem; background: #fff; color: var(--ink2); font-size: .92rem; }
.workday a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.screens-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.screen-group { padding-block: .6rem; border-top: 1px solid var(--line); }
.screen-group h2 { margin-bottom: .7rem; }
.screen-group .nav-row:hover { background: #f6edf0; }
.screen-group .nav-pin { opacity: 1; }

/* ---------- Tableau de bord (לוחות) ---------- */
.board-period { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; }
.period-custom { position: relative; }
.period-custom > summary { list-style: none; cursor: pointer; padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink2); }
.period-custom > summary::-webkit-details-marker { display: none; }
.period-custom[open] > div { position: absolute; z-index: 20; top: calc(100% + 6px); inset-inline-end: 0; display: flex; gap: .4rem; align-items: center; padding: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(40, 20, 30, .28); }
.bkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: .9rem; }
.bkpi { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .15rem .5rem; transition: border-color .15s, transform .15s; }
.bkpi:has(a.stretch):hover { border-color: #d7b9c2; transform: translateY(-1px); }
.bkpi .l { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; }
.bkpi .n { font-size: 2rem; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bkpi .s { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); }
.bkpi.bad .n { color: var(--bad); } .bkpi.good .n { color: var(--ok); }
.bkpi a.stretch::after { content: ""; position: absolute; inset: 0; }
.spark { width: 78px; height: 26px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: .9rem; margin-bottom: 1.2rem; }
.bcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; min-width: 0; }
.bcard > header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.bcard h2 { font-size: 1.1rem; margin: 0; }
.bcard h3 { font-size: .95rem; color: var(--muted); font-family: inherit; font-weight: 500; margin: 0 0 .6rem; }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c6 { grid-column: span 6; } .c4 { grid-column: span 4; }
.vseg { display: inline-flex; background: #f3eff1; border-radius: 99px; padding: 3px; flex: none; }
.vseg button { border: 0; background: none; padding: .22rem .8rem; border-radius: 99px; font-size: .84rem; color: var(--ink2); font-weight: 400; }
.vseg button:hover { background: none; color: var(--ink); }
.vseg button[aria-pressed=true] { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.tw { overflow-x: auto; }
.btable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0; }
.btable th, .btable td { padding: .55rem .6rem; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.btable th { font-size: .82rem; color: var(--muted); font-weight: 500; }
.btable td:first-child, .btable th:first-child { text-align: right; white-space: normal; }
.btable tr.sum td { font-weight: 600; border-bottom: 0; color: var(--brand); }
.btable tbody tr:hover td { background: #fcf7f9; }
.bad { color: var(--bad); }
.note { color: var(--muted); font-size: .85rem; margin: .7rem 0 0; }
.donut { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.donut svg { width: 140px; height: 140px; flex: none; }
.donut circle { transition: opacity .15s; }
.donut svg:hover circle[stroke-dasharray] { opacity: .55; }
.donut svg circle[stroke-dasharray]:hover { opacity: 1; }
.dc-n { font: 600 17px Rubik, sans-serif; fill: var(--ink); }
.dc-l { font: 400 10px Rubik, sans-serif; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 170px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto 2.8rem; gap: .5rem; align-items: center; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.legend li:last-child { border-bottom: 0; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend a { color: var(--ink); }
.legend b { font-variant-numeric: tabular-nums; font-weight: 600; }
.legend em { font-style: normal; color: var(--muted); text-align: left; font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: .5rem; }
.hb { display: grid; grid-template-columns: minmax(80px, 34%) 1fr 4.5rem; gap: .6rem; align-items: center; color: var(--ink); }
.hb:hover { text-decoration: none; }
.hb .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink2); }
.hb .tr { display: flex; justify-content: flex-start; height: 12px; background: #f1edef; border-radius: 99px; overflow: hidden; }
.hb .f { display: block; height: 100%; border-radius: 99px; transition: filter .15s; }
.hb:hover .f { filter: brightness(1.12); }
.hb b { text-align: left; font-variant-numeric: tabular-nums; font-weight: 600; }
.fun { display: flex; flex-direction: column; gap: .45rem; }
.fu { display: flex; align-items: center; gap: .6rem; color: var(--ink2); }
.fu:hover { text-decoration: none; }
.fu:hover .fb { filter: brightness(1.1); }
.fb { display: flex; padding: .33rem .6rem; border-radius: 6px; color: #fff; min-width: 3.4rem; font-variant-numeric: tabular-nums; }
.fu .t { white-space: nowrap; }
.cols { width: 100%; height: 200px; display: block; }
.cols rect { transition: opacity .12s; }
.cols:hover rect { opacity: .6; }
.cols rect:hover { opacity: 1; }
.ax { font: 11px Rubik, sans-serif; fill: var(--muted); }
.sbs { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.sbs-chart { border-inline-start: 1px solid var(--line); padding-inline-start: 1.3rem; }
.online { display: flex; flex-wrap: wrap; gap: .5rem; }
.online span { background: var(--okbg); color: #17603f; padding: .3rem .75rem; border-radius: 99px; font-size: .9rem; }
.online b { font-weight: 500; }
.board-pick { margin-top: .2rem; }
.board-pick > summary { cursor: pointer; }

@media (max-width: 1280px) {
  .topbar .logo span:not(.mark) { display: none; }

}
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; gap: .5rem .7rem; }
  .topbar .logo span:not(.mark) { display: inline; }
  .nav-mobile { display: inline-flex; align-items: center; gap: .4rem; order: 2; background: #fff; color: var(--ink2); border: 1px solid var(--line); padding: .4rem .8rem; }
  .nav-mobile:hover { background: #f6f0f3; }
  .nav-mobile svg { width: 18px; height: 18px; }
  .nav-search { order: 3; flex: 1 1 140px; }
  .me-menu { order: 4; }
  .topbar nav { order: 5; flex-basis: 100%; display: none; flex-direction: column; align-items: stretch; max-height: 72vh; overflow-y: auto; padding: .4rem 0 .6rem; border-top: 1px solid var(--line); }
  .topbar nav.mobile-open { display: flex; }
  .topbar .nav-groups { flex-direction: column; align-items: stretch; }
  .nav-panel { position: static; box-shadow: none; border: 0; min-width: 0; max-height: none; padding: 0 .4rem .3rem; animation: none; }
  .nav-pin { opacity: 1; }
  nav.searching .nav-groups { position: static; width: auto; max-height: none; box-shadow: none; border: 0; padding: 0; }
  .c8, .c4, .c6 { grid-column: span 12; }
  .sbs { grid-template-columns: minmax(0, 1fr); }
  .sbs-chart { border: 0; padding: 0; }
}
@media (max-width: 700px) {
  .content main { padding: 1.1rem .8rem 2.4rem; }
  .screens-grid, .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-wrap: wrap; gap: .75rem; }
  h1, .page-head h1 { font-size: 1.55rem; }
  .list th, .list td { padding: .6rem .65rem; }
  .bkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bkpi .n { font-size: 1.6rem; }
  .spark { display: none; }
  .donut svg { width: 120px; height: 120px; }
  .period-custom[open] > div { inset-inline-end: auto; inset-inline-start: 0; flex-wrap: wrap; }
}
@media print { .topbar, .board-pick, .vseg { display: none !important; } .content main { animation: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } @view-transition { navigation: none; } }
/* Les icones du site ont un contour par defaut (app.css « svg { stroke } ») : les graphiques n'en veulent pas */
svg.cols, .donut svg, svg.spark { stroke: none; fill: none; }
svg.cols text, .donut svg text { stroke: none; }
/* app.css donne une marge a tout « details summary » : pas dans la barre ni dans les menus */
.topbar summary, .period-custom > summary, .nav-recent > summary { margin: 0; font-weight: inherit; }
.nav-group > summary, .top-link { font-weight: 400; }
.btable th, .btable td { overflow-wrap: normal; }
.btable td:first-child { min-width: 7.5rem; }
@media (max-width: 1100px) {
  .me-menu { order: 3; margin-inline-start: auto; }
  .nav-search { order: 4; flex: 1 1 100%; }
  .nav-group > summary, .top-link { padding: .6rem .7rem; }
}

/* ---------- Fiche en panneau lateral (08/11) : la liste reste a cote sur ordinateur, plein ecran sur telephone ---------- */
.side-panel { --sp-w: min(760px, 46vw); position: fixed; inset: var(--bar-h) 0 0; z-index: 35; pointer-events: none; }
.side-panel .sp-backdrop { position: absolute; inset: 0; background: rgba(29, 20, 26, .32); opacity: 0; transition: opacity .2s ease; }
.side-panel .sp-sheet { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: var(--sp-w); display: flex; flex-direction: column;
  background: var(--bg); border-inline-start: 1px solid var(--line); box-shadow: 0 0 48px -12px rgba(40, 20, 30, .38);
  transform: translateX(-104%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); pointer-events: auto; }
.side-panel.open .sp-sheet { transform: none; }
.sp-head { display: flex; align-items: center; gap: .8rem; min-height: var(--bar-h); padding: .4rem 1rem; background: #fff; border-bottom: 1px solid var(--line); }
.sp-head h2 { flex: 1; margin: 0; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-head .sp-full { white-space: nowrap; font-size: .92rem; }
.sp-head .sp-close { width: 38px; height: 38px; padding: 0; font-size: 1rem; line-height: 1; flex: none; }
.sp-body { position: relative; flex: 1; min-height: 0; }
.sp-body iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.sp-loading { position: absolute; inset: 0 0 auto; margin: 0; padding: 2rem; text-align: center; color: var(--muted); display: none; }
.side-panel.loading .sp-loading { display: block; }
.side-panel.loading iframe { opacity: .35; }
.sp-current, tr.sp-current > td { background: var(--brandbg) !important; }
.sp-current:not(tr) { box-shadow: inset -3px 0 0 var(--brand); }
/* Ordinateur : la liste se pousse a droite et reste entierement visible et cliquable a cote de la fiche */
@media (min-width: 900px) {
  body:not(.in-panel) .content main { transition: margin .24s cubic-bezier(.2, .8, .2, 1); }
  html.sp-on body:not(.in-panel) .content main { margin-inline: 0 min(760px, 46vw); }
}
@media (max-width: 899px) {
  .side-panel { inset: 0; z-index: 70; pointer-events: auto; }
  .side-panel.open .sp-backdrop { opacity: 1; }
  .side-panel .sp-sheet { width: 100vw; border: 0; }
  html.sp-on, html.sp-on body { overflow: hidden; }
}
/* Ecran ouvert dans le panneau : sans barre du haut ni lien de retour, marges plus serrees */
body.in-panel .content main { padding: 1rem clamp(.8rem, 2.4vw, 1.4rem) 2rem; max-width: none; }
body.in-panel .back-link { display: none; }
body.in-panel .detail { grid-template-columns: 1fr; }
html:has(body.in-panel) { scroll-padding-top: 12px; }
.task:target { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 10px; background: var(--brandbg); }

/* ---------- Vente en etapes (08/11, demande de Simcha : « עיצוב של מכירה ») : tout est limite aux ecrans de vente (.wizard ~ ...) ---------- */
.wizard { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .25rem; padding: .3rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 1.2rem; }
.wizard a { justify-content: center; border: 0; background: transparent; border-radius: 10px; padding: .62rem .7rem; font-weight: 400; transition: background .15s, color .15s; }
.wizard a:hover { background: #f7f2f4; border: 0; }
.wizard a i { background: #ece7ea; color: #6d6168; }
.wizard a.on { background: var(--brandbg); color: var(--brand); font-weight: 500; box-shadow: none; }
.wizard a.on i { background: var(--brand); color: #fff; }
.wizard a.ok i { background: var(--ok); color: #fff; }
.wizard a.on.ok i { background: var(--brand); }
.wizard a.ok:not(.on) { color: var(--ink); }

.wizard ~ form.card h2 { display: flex; align-items: center; gap: .55rem; font-size: 1.08rem; margin: 1.7rem 0 .8rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.wizard ~ form.card h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.wizard ~ form.card h2::before { content: ""; width: 5px; height: 1.1em; border-radius: 3px; background: var(--brand); }
.wizard ~ form.card .wiz-nav { position: sticky; bottom: 0; z-index: 5; margin: 1.6rem -1.3rem -1.2rem; padding: .8rem 1.3rem; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.wizard ~ form.card .wiz-nav button:not(.ghost) { min-width: 9.5rem; }

.wizard ~ form .card.notice-sm { margin: 1.2rem 0 0; padding: .8rem 1rem; background: #fdf6e8; border: 1px solid #f0dfb8; border-radius: 12px; color: #5b4a22; }
.wizard ~ form .card.notice-sm ul { margin: .35rem 0 0; }

.wizard ~ form .prog-pick { gap: .55rem; }
.wizard ~ form .check.big, .wizard ~ form .card label.check.big { cursor: pointer; display: inline-flex; align-items: center; gap: .55rem; min-height: 46px; margin: 0; padding: .5rem 1rem; border: 1.5px solid #ddd6da; border-radius: 12px; background: #fff; font-weight: 500; color: var(--ink2); transition: border-color .12s, background .12s, color .12s; }
.wizard ~ form .check.big:hover { border-color: #c4b6bd; background: #fcfafb; }
.wizard ~ form .check.big input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--brand); }
.wizard ~ form .check.big:has(input:checked) { border-color: var(--brand); background: var(--brandbg); color: var(--brand); }
.wizard ~ form .check.big.best { border-style: dashed; border-color: #cda9b2; }
.wizard ~ form .check.big.best small { color: var(--brand); font-weight: 600; margin-inline-start: 0; }
.wizard ~ form .check.big.best:has(input:checked) { border-style: solid; }

.wizard ~ form .form-grid.pcrow { padding: .75rem .9rem .1rem; margin-bottom: .6rem; background: #faf7f8; border: 1px solid #efe9ec; border-radius: 12px; }
.wizard ~ form .form-grid.pcrow label { margin-bottom: .7rem; }

.wizard ~ form .hq { padding: .8rem .9rem; margin-bottom: .5rem; background: #faf7f8; border: 1px solid #efe9ec; border-radius: 12px; }
.hq .seg { display: inline-flex; padding: 3px; }
.hq .seg label { position: relative; padding: .35rem 1.1rem; border-radius: 8px; cursor: pointer; font-weight: 500; color: var(--ink2); }
.hq .seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hq .seg label:has(input:checked) { background: var(--ink); color: #fff; }
.hq .seg label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.hq > input { margin: 0; }

dl.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .65rem; margin: 0; }
dl.kv-grid .kv { background: #faf7f8; border: 1px solid #efe9ec; border-radius: 12px; padding: .65rem .9rem; min-width: 0; }
dl.kv-grid dt { font-size: .8rem; color: var(--muted); margin: 0 0 .15rem; font-weight: 400; }
dl.kv-grid dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
dl.kv-grid .kv.wide { grid-column: 1 / -1; }
.wizard ~ .card button.primary, .wizard ~ form button.primary { box-shadow: 0 10px 20px -12px rgba(15, 157, 107, .8); min-height: 50px; padding: .7rem 2rem; font-size: 1.05rem; border-radius: 12px; }

#startform { padding: 1.1rem 1.3rem; }
#startform input[data-find] { min-height: 50px; font-size: 1.05rem; padding-inline: 1rem; }

@media (max-width: 860px) {
  .wizard { gap: .1rem; padding: .25rem; }
  .wizard a { flex-direction: column; padding: .5rem .15rem; font-size: .76rem; gap: .25rem; text-align: center; }
  .wizard ~ form.card .wiz-nav { margin-inline: -1.3rem; }
  .wizard ~ form .hq { grid-template-columns: 1fr; }
  .wizard ~ form .form-grid.pcrow { grid-template-columns: 1fr; }
}

/* Tableau de taches : rappel dans le site + « qui appeler » (08/11/2026) */
.tb-site-rem { border-color: #f0b44c; background: #fff7e6; align-items: flex-start; }
.tb-site-rem > div { flex: 1; min-width: 0; }
.tb-site-rem small { display: block; margin-top: .25rem; }
.tb-who { display: block; margin-top: .25rem; color: var(--ink); }
.tb-call { display: inline-block; padding: .05rem .5rem; border-radius: 6px; background: #eef1fe; font-size: .82rem; }
.tb-rem-acts { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .6rem; }
.tb-rem-acts form { margin: 0; }
