/* Components and views. Values come from tokens.css; width adaptations live in responsive.css.
   One surface style for every card, panel and row: --card background, --r-card radius, 20px/24px padding, no border. */

/* ── Menu ─────────────────────────────────────────────────────────────── */
nav.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--s1); padding: var(--s4) var(--s3); overflow-y: auto; border-right: 1px solid var(--line); }
.brand-row { display: flex; align-items: center; gap: 2px; margin-bottom: var(--s2); }
.brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s1) var(--s2) var(--s2); border-radius: var(--r-ctl); text-decoration: none; transition: background .15s; }
.brand:hover { background: var(--soft); }
.brand img { width: 32px; height: 32px; border-radius: var(--r-ctl); flex: none; }
.brand-text { min-width: 0; line-height: 1.25; }
.brand-text b, .brand-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text b { display: block; font-size: 15px; }
.brand-text small { display: block; color: var(--muted); }
.side-toggle { flex: none; display: grid; place-items: center; width: 28px; min-height: 28px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.side-toggle:hover { color: var(--text); }
.side-toggle svg { width: 18px; height: 18px; transition: transform .2s; }
.is-folded .side-toggle svg { transform: scaleX(-1); }
.side-group { display: flex; flex-direction: column; gap: 1px; margin-top: var(--s2); }
.side-title { padding: 0 var(--s3) var(--s1); color: var(--muted); font-size: 12px; font-weight: 500; }
nav.side a.nav { display: flex; align-items: center; gap: var(--s3); min-height: 34px; padding: 0 var(--s3); border-radius: var(--r-ctl); color: var(--muted); font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
nav.side a.nav:hover { background: var(--soft); color: var(--text); }
nav.side a.nav[aria-current] { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; }
.nav-ico svg { width: 18px; height: 18px; }
nav.side a.nav[aria-current] .nav-ico { color: var(--text); }
.nav-stack { display: inline-flex; align-items: center; }
.nav-stack img { width: 14px; height: 14px; border: 1.5px solid var(--page); border-radius: 50%; background: var(--logo-bg); }
.nav-stack img + img { margin-left: -6px; }
.nav-ico.nav-stack { width: 30px; justify-content: flex-start; margin-right: -10px; }
.nav-stack.big img { width: 26px; height: 26px; } .nav-stack.big img + img { margin-left: -10px; }
h1 .nav-stack { margin-right: var(--s2); vertical-align: -3px; }
nav.side a.nav b { min-width: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 500; text-align: center; }
nav.side a.nav b:empty { display: none; }
nav.side a.nav b.is-alert { background: var(--bad); color: var(--on-bad); }
/* The freshness of the data, always in sight: the last morning run and whether every connection answers. */
.side-foot { position: sticky; bottom: calc(var(--s4) * -1); display: flex; flex-direction: column; gap: var(--s2); margin: auto calc(var(--s3) * -1) calc(var(--s4) * -1); padding: var(--s3) var(--s3) var(--s4); background: var(--page); }
.theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 var(--s1) var(--s2); }
.theme-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 0 var(--s2); font-size: 12px; }
.theme-seg svg { width: 15px; height: 15px; }
.side-live { display: flex; align-items: center; gap: var(--s2); padding: var(--s3); border-radius: var(--r-ctl); color: var(--muted); font-size: 12px; text-decoration: none; }
.side-live:hover { background: var(--soft); }
.pulse { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: var(--tone); opacity: .25; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: .35; } to { transform: scale(1.6); opacity: 0; } }
.snapshot { margin: 0 var(--s2) var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--soft); color: var(--muted); font-size: 12px; }
body, .card, .panel, .kpi, .tool, .task, .theme, .finding, .country, .row-card, nav.side { transition: background-color .25s, color .25s, border-color .25s; }
/* Folded: a rail of icons. */
.app.is-folded { grid-template-columns: 68px minmax(0, 1fr); }
.is-folded nav.side { padding: var(--s4) var(--s2); }
.is-folded .brand-text, .is-folded .side-title, .is-folded .nav-label, .is-folded nav.side a.nav b, .is-folded .snapshot, .is-folded .side-live span { display: none; }
.is-folded .brand-row { flex-direction: column; }
.is-folded .theme-seg { grid-template-columns: 1fr; margin: 0; } .is-folded .theme-seg span { display: none; }
.is-folded .brand, .is-folded nav.side a.nav, .is-folded .side-live { justify-content: center; padding: var(--s2) 0; }

/* ── Page head ────────────────────────────────────────────────────────── */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; }
.home-date { margin-bottom: var(--s1); color: var(--muted); text-transform: capitalize; }

/* ── Tabs: a page's sub-views, each with its own address ─────────────── */
.tabs { display: flex; gap: var(--s1); margin-top: calc(var(--s2) * -1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: var(--s2) var(--s3) var(--s3); margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; text-decoration: none; transition: color .15s, border-color .15s; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { border-bottom-color: var(--text); color: var(--text); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; }
.section-head .lead { margin-top: 0; }
.section-title { margin-top: var(--s3); }
.map-phone.is-forced { display: flex; }

/* ── Surfaces ─────────────────────────────────────────────────────────── */
.card, .panel, .kpi, .tool, .task, .theme, .finding, .country, .empty-state,
.card, .panel, .kpi, .tool { padding: var(--s5); }
.card, .tool, .task, .theme, .finding, .country { transition: box-shadow .15s; }
.card:hover, .tool:hover, .task:hover, .theme:hover, .finding:hover, .country:hover { box-shadow: var(--shadow-hover); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--s4); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s4); }
.panel > summary { display: flex; align-items: center; gap: var(--s2); }
.fold-body { margin-top: var(--s4); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s3); }
.panel-head a { color: var(--muted); font-size: 12px; text-decoration: none; }
.panel-head a:hover { color: var(--text); }
.tgroup { display: flex; flex-direction: column; gap: var(--s3); }
.tgroup h2 { display: flex; align-items: center; gap: var(--s2); text-transform: capitalize; }
.tgroup h2.tone-bad { color: var(--bad); } .tgroup h2.tone-warn { color: var(--warn); }
.empty-state { display: flex; align-items: center; gap: var(--s4); padding: var(--s5); }
.empty-state .ico { width: 28px; height: 28px; color: var(--ok); }
.empty-state .ico.is-wait { color: var(--muted); }

/* ── Small pieces ─────────────────────────────────────────────────────── */
.ico { width: 18px; height: 18px; flex: none; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 500; }
.avatar { display: inline-grid; place-items: center; flex: none; min-width: 24px; height: 24px; padding: 0 5px; border-radius: var(--r-pill); background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 700; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--s2); border-radius: 6px; background: var(--soft); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s4); border-radius: var(--r-pill); background: var(--card); font-weight: 500; text-decoration: none; white-space: nowrap; }
.pill .ico { width: 16px; height: 16px; }
.pill-ok { color: var(--ok-text); } .pill-warn { color: var(--warn); } .pill-bad { color: var(--bad); } .pill-neutral { color: var(--text); }
.state-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; white-space: nowrap; }
.state-chip:has(.st-ico) { padding-left: 4px; }
.state-chip.st-ok { background: var(--ok-soft); color: var(--ok-text); } .state-chip.st-alert { background: var(--bad-soft); color: var(--bad); }
.state-chip.st-late { background: var(--warn-soft); color: var(--warn); } .state-chip.st-paused { background: var(--soft); color: var(--muted); }
.st-ico { display: inline-flex; } .st-ico .ico { width: 16px; height: 16px; }
.st-ok { color: var(--ok); } .st-late { color: var(--pending); } .st-alert { color: var(--bad); } .st-paused { color: var(--muted); }
.dot-st { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot-st.st-En { background: var(--text); } .dot-st.st-Bloqué { background: var(--pending); } .dot-st.st-Fait { background: var(--ok); } .dot-st.is-late { background: var(--bad); }
.legend i[class*="tone-"] { background: var(--tone); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 var(--s4); border-radius: var(--r-ctl); background: var(--text); color: var(--card); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-soft { background: var(--soft); color: var(--text); }
.btn-soft:hover { background: var(--line); opacity: 1; }
.btn:disabled { opacity: .55; cursor: progress; }
.head-actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; justify-content: flex-end; }
.plain { text-decoration: none; } .plain:hover { text-decoration: underline; }
.tool-logo { flex: none; padding: 4px; border-radius: 10px; background: var(--logo-bg); box-shadow: 0 0 0 1px var(--line); }
.tool-logo.initial { display: grid; place-items: center; width: 40px; height: 40px; background: var(--soft); box-shadow: none; font-weight: 700; color: var(--muted); }
.tool-when { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.tool-when .ico { width: 14px; height: 14px; }
.tool-when.tool-fix, .tool-fix { color: var(--bad); font-size: 12px; }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 6px var(--s3); margin: var(--s3) 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.todo { margin: 0; padding: 0; list-style: none; }
.todo li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.todo li:last-child { border-bottom: 0; }
.todo-label { flex: 1; min-width: 0; }
.todo-label small { display: block; color: var(--muted); }
.todo-gh { color: var(--muted); font-size: 12px; text-decoration: none; }
.todo li .btn + .btn { margin-left: calc(var(--s2) * -1 + 4px); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s4); color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.legend .lg { border-radius: 50%; background: var(--muted); }
.legend .lg.st-En { background: var(--text); } .legend .lg.st-Fait { background: var(--ok); } .legend .lg.st-Bloqué { background: var(--pending); } .legend .lg.late { background: var(--bad); }
.legend i.is-pending { border: 2px dashed var(--changed); background: transparent; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-ctl); background: var(--soft); }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; border: 0; background: transparent; color: var(--muted); }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.seg .avatar { min-width: 20px; height: 20px; }

/* ── Measures ─────────────────────────────────────────────────────────── */
.meter-bar { display: block; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.meter-bar b { display: block; width: var(--w); height: 100%; background: var(--ok); transition: width .4s ease-out; }
.meter { display: grid; grid-template-columns: 72px 1fr 44px; align-items: center; gap: var(--s2); font-size: 12px; }
.meter em { color: var(--muted); font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
/* A figure you can press filters the view behind it (« Le site » → Pages). It is a real button: it lifts
   under the pointer and keeps a ring while it is the one filtering, so the screen always says what it shows. */
.stat.is-filter { display: block; width: 100%; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.stat.is-filter:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.stat.is-filter.is-on { box-shadow: 0 0 0 2px var(--text); }
.stat.is-filter.is-on small { color: var(--text); font-weight: 500; }
.stat.is-filter { transition: box-shadow .15s, transform .15s; }
/* A theme opens on its pages instead of snapping to them. */
.theme[open] > .todo { animation: fold-in .18s ease-out; }
@keyframes fold-in { from { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) { .theme[open] > .todo { animation: none } .stat.is-filter:hover { transform: none } }
.stat span { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.stat strong { display: block; margin: var(--s1) 0; font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .is-unknown { color: var(--muted); font-style: normal; }
.stat small { display: block; color: var(--muted); }

/* ── Accueil ──────────────────────────────────────────────────────────── */
.kpi { display: flex; flex-direction: column; gap: var(--s2); }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi-value { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value.is-unknown { color: var(--muted); }
.links-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); }
.links-title { display: inline-flex; align-items: center; gap: var(--s2); margin-right: var(--s2); font-weight: 500; text-decoration: none; }
.links-title b { color: var(--muted); font-size: 12px; font-weight: 500; }
.link-chip { display: inline-flex; align-items: center; gap: var(--s2); height: 34px; padding: 0 var(--s3) 0 var(--s2); border-radius: var(--r-ctl); background: var(--soft); font-size: 12px; font-weight: 500; text-decoration: none; transition: background .15s; }
.link-chip:hover { background: var(--line); }
.link-chip img { padding: 1px; border-radius: 4px; background: var(--logo-bg); }
.home-pilot { display: grid; gap: 8px; }
.home-pilot .panel-head { margin-bottom: 4px; }
.home-pilot .measures { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.home-pilot .chart svg { height: 112px; }
.home-cols.is-3 .panel { padding: var(--s4) var(--s5); }
.fact { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); text-decoration: none; }
.home-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: var(--s4); }
.home-cols.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── Tâches ───────────────────────────────────────────────────────────── */
/* A task is one line: the row's own padding is the only one it needs (it carried a second, outer one,
   which made every row 96 px tall and pushed nine tasks off the screen). */
.task { padding: 0; }
.tasks { display: flex; flex-direction: column; gap: 6px; }
.task summary { display: grid; grid-template-columns: 8px minmax(0, 1fr) 24px 80px 60px; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4); }
.task-title { font-weight: 500; }
.task-due { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.task-gh { display: inline-flex; align-items: center; gap: var(--s1); color: var(--muted); font-size: 12px; text-decoration: none; }
.task-gh img { width: 14px; height: 14px; }
.task-body { padding: 0 var(--s4) var(--s4) calc(var(--s4) + 24px); font-size: 13px; }

/* ── Rows: a wide line per item, identity left, facts middle, action right ── */
.rows { display: flex; flex-direction: column; gap: var(--s3); }
.row-card { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) auto; align-items: center; gap: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--r-card); background: var(--card); transition: box-shadow .15s; }
.row-card:hover { box-shadow: var(--shadow-hover); }
.row-id { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.row-id h3 { margin-bottom: 2px; }
.row-id small { display: block; color: var(--muted); }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s2); text-align: right; }

/* ── Décisions ────────────────────────────────────────────────────────── */
.decision { grid-template-columns: minmax(0, 1fr) auto; }
.decision .decide-zone { display: flex; align-items: center; gap: var(--s2); }
.decision textarea { min-width: 320px; min-height: 36px; }

/* ── Concurrents ──────────────────────────────────────────────────────── */
.firm { align-items: start; }
.wins { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(130px, 1fr) minmax(150px, 1.2fr); margin: 0; font-size: 13px; }
.wins > * { padding: 6px 0; border-bottom: 1px solid var(--line); }
.wins > *:nth-last-child(-n+3) { border-bottom: 0; }
.wins .lbl, .wins .head { color: var(--muted); }
.wins .head { padding-top: 0; font-size: 12px; font-weight: 500; }
.wins b { color: var(--ok-text); font-weight: 500; }
.wins s { color: var(--muted); }

.firm-body { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3) var(--s4); }
.spec { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spec span { color: var(--muted); font-size: 12px; }
.spec b { overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.spec em { color: var(--muted); font-size: 13px; font-style: italic; }
.firm-wins > summary { color: var(--ok-text); font-size: 13px; font-weight: 500; }
.firm-wins .wins { margin-top: var(--s2); }
.row-id > div { min-width: 0; } .row-id small + small { margin-top: 2px; }
.sources > summary { color: var(--muted); font-size: 12px; }
.sources[open] { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sources a { max-width: 220px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

/* ── Pages par thème, carte (téléphone) ───────────────────────────────── */
.themes { display: flex; flex-direction: column; gap: var(--s2); }
.theme summary { display: grid; grid-template-columns: 10px minmax(180px, 1fr) 240px 160px; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); }
.theme-name small { display: block; color: var(--muted); }
.theme-meter { display: flex; flex-direction: column; gap: var(--s1); }
.theme-meter small, .theme-imp { color: var(--muted); font-size: 12px; }
.theme-imp { text-align: right; }
.theme .todo { padding: 0 var(--s5) var(--s2) calc(var(--s5) + 26px); }

/* ── Nos atouts, langues, tests ───────────────────────────────────────── */
.atout-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.card > p { margin-top: var(--s3); }
.atout-stats { display: flex; gap: var(--s5); margin-top: var(--s4); color: var(--muted); font-size: 12px; }
.atout-stats b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
.card details { margin-top: var(--s4); }
.card details > summary { color: var(--muted); font-size: 13px; }
.card > .btn, .card > select { margin-top: var(--s4); }
.stepper { display: flex; gap: var(--s1); margin: var(--s4) 0 0; padding: 0; list-style: none; }
.stepper li { flex: 1; height: 6px; border-radius: 3px; background: var(--soft); }
.stepper li.is-done { background: var(--ok); }
.stepper span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lang h3 .flag { display: inline; margin-right: var(--s1); }

/* ── Études ───────────────────────────────────────────────────────────── */
.findings { display: flex; flex-direction: column; gap: var(--s2); }
.finding summary { display: grid; grid-template-columns: 150px minmax(0, 1fr) 80px; align-items: center; gap: var(--s4); padding: var(--s3) var(--s5); }
.finding summary .badge { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.finding summary > .muted { text-align: right; font-size: 12px; }
.finding .facts { margin: 0; padding: 0 var(--s5) var(--s4) calc(var(--s5) + 150px + var(--s4)); font-size: 13px; }

/* ── Pays ─────────────────────────────────────────────────────────────── */
.verdicts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.verdict { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; padding: var(--s4) var(--s5); border: 0; border-radius: var(--r-card); text-align: left; }
.verdict strong { font-size: 28px; line-height: 1.1; }
.verdict span { color: var(--muted); font-size: 12px; }
.verdict.v-ok { background: var(--ok-soft); } .verdict.v-late { background: var(--warn-soft); } .verdict.v-alert { background: var(--bad-soft); }
.verdict:hover { filter: saturate(1.3); }
.verdict[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.filters input[type=text] { width: min(420px, 100%); }
.countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s2); }
.country summary { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); }
.country p { margin: 0 var(--s4) var(--s3); font-size: 13px; }

/* ── Visibilité IA ────────────────────────────────────────────────────── */
table.geo th.eng, table.geo td.eng { width: 96px; text-align: center; }
table.geo th.eng img { margin: 0 auto var(--s1); border-radius: 4px; }
.geo-cell { min-width: 48px; min-height: 30px; padding: 0 var(--s2); border: 0; background: var(--soft); color: var(--muted); }
.geo-cell.is-cited { background: var(--ok-soft); color: var(--ok-text); } .geo-cell.is-absent { background: var(--bad-soft); color: var(--bad); }
.geo-cell .ico { width: 16px; height: 16px; vertical-align: -3px; }

/* ── Connexions ───────────────────────────────────────────────────────── */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--s4); }
.tool { display: flex; flex-direction: column; gap: var(--s3); }
.tool.is-alert { background: linear-gradient(var(--bad-soft), var(--bad-soft)), var(--card); }
.tool.is-late { background: linear-gradient(var(--warn-soft), var(--warn-soft)), var(--card); }
.tool.is-paused { opacity: .7; }
.tool-top { display: flex; align-items: center; gap: var(--s3); }
.tool-id { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); }
.tool-plain { line-height: 1.5; }
.tool-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: auto; padding-top: var(--s2); }
.tool-more summary { color: var(--muted); font-size: 12px; }
.tool-more[open] { flex-basis: 100%; }
.tool-actions:has(.tool-more[open]) { flex-wrap: wrap; }
.tool-more .facts { margin-bottom: 0; font-size: 12px; }
.daily summary { display: flex; align-items: center; gap: var(--s2); }
.daily summary .muted { margin-left: auto; font-size: 12px; }
.daily .todo { margin-top: var(--s3); }

/* ── Historique ───────────────────────────────────────────────────────── */
.timeline { margin: 0; padding: var(--s1) var(--s5); list-style: none; border-radius: var(--r-card); background: var(--card); }
.timeline li { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline small { display: block; color: var(--muted); }

/* ── Roadmap ──────────────────────────────────────────────────────────── */
.rm-sum { display: flex; flex-wrap: wrap; gap: var(--s2); }
.rm-sum span { padding: var(--s2) var(--s4); border-radius: var(--r-pill); background: var(--card); color: var(--muted); font-size: 13px; }
.rm-sum b { color: var(--text); }
.rm2 { overflow-x: auto; }
.rm2-grid { display: grid; grid-template-columns: 150px repeat(var(--weeks), minmax(138px, 1fr)); }
.rm2-month { grid-column: span var(--span); padding: var(--s3) var(--s3) 2px; border-left: 1px solid var(--line); font-weight: 700; text-transform: capitalize; }
.rm2-week { padding: 2px var(--s3) var(--s2); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.rm2-corner { border-bottom: 1px solid var(--line); }
.rm2-corner:first-child { border-bottom: 0; }
.rm2-week.is-now { color: var(--text); font-weight: 700; }
.rm2-lane { display: flex; align-items: flex-start; gap: var(--s2); padding: var(--s3); border-bottom: 1px solid var(--line); }
.rm2-lane b { display: block; font-size: 13px; } .rm2-lane small { color: var(--muted); }
.rm2-cell { display: flex; flex-direction: column; gap: var(--s1); padding: 6px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rm2-cell.is-now, .rm2-week.is-now { background: var(--ok-soft); }
.rchip { display: flex; align-items: flex-start; gap: 6px; min-width: 0; padding: 6px; border-radius: 7px; background: var(--soft); font-size: 12px; text-decoration: none; transition: background .15s; }
.rchip:hover { background: var(--line); }
.rchip i { flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--muted); }
.rchip span { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.rchip .who { flex: none; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 3px; border-radius: var(--r-pill); background: var(--card); color: var(--muted); font-size: 12px; font-weight: 500; }
.rchip.st-Fait { opacity: .6; } .rchip.st-Fait i { background: var(--ok); } .rchip.st-Fait span { text-decoration: line-through; }
.rchip.st-En i { background: var(--text); } .rchip.st-Bloqué i { background: var(--pending); }
.rchip.late i { background: var(--bad); } .rchip.late span { color: var(--bad); }
.vol { display: grid; grid-template-columns: minmax(0, 1fr) 72px; align-items: center; gap: var(--s1) var(--s3); margin-top: var(--s3); font-size: 12px; }
.vol .b { width: var(--w); min-width: 2px; height: 6px; border-radius: 3px; background: var(--mint); }
.vol .q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol .v { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ── Carte du site (ordinateur) ───────────────────────────────────────── */
/* The map: the site drawn from its root (Charles, 23/11). The root, its themes as blocks, and the block you
   press unfolds its pages underneath — one at a time, so the whole site stays on one screen. The dashes draw
   the descent; nothing else is coloured, because the only thing colour said here was « indexée », and the
   bar says it better. */
/* Everything of this page must hold on one screen (Charles, 23/11): the figures stay readable but stop
   eating a third of it, and the descent is drawn in less room. */
.grid.is-tight .card { padding: var(--s3) var(--s4); }
.grid.is-tight .stat strong { margin: 2px 0 0; font-size: 22px; }
.grid.is-tight .stat small { font-size: 11px; }
.tree { padding: var(--s4) 0 0; }
.tree-root { position: relative; width: max-content; max-width: 100%; margin: 0 auto var(--s5); padding: var(--s3) var(--s5); border: 2px solid var(--text); border-radius: var(--r-card); text-align: center; }
.tree-root small { display: block; color: var(--muted); }
.tree-root::after { content: ''; position: absolute; left: 50%; bottom: calc(var(--s5) * -1); height: var(--s5); border-left: 2px dashed var(--line); }
.tree-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s4) var(--s3); padding-top: var(--s4); border-top: 2px dashed var(--line); }
.tree-block { position: relative; display: block; width: 100%; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); font: inherit; color: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
.tree-block::before { content: ''; position: absolute; left: 50%; top: calc(var(--s4) * -1); height: var(--s4); border-left: 2px dashed var(--line); }
.tree-block b { display: block; overflow-wrap: anywhere; }
.tree-block small { display: block; color: var(--muted); font-size: 12px; }
.tree-block .meter-bar { margin: var(--s3) 0 6px; }
.tree-block:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.tree-block.is-on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.tree-panel { margin-top: var(--s4); padding: var(--s4) var(--s5); border: 1px solid var(--text); border-radius: var(--r-card); background: var(--card); animation: fold-in .18s ease-out; }
.tree-panel header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); }
.tree-close { padding: 2px var(--s3); border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.tree-close:hover { border-color: var(--text); color: var(--text); }
.tree-panel header small { grid-column: 1 / -1; display: block; }
.tree-hint { padding: var(--s6); text-align: center; }
@media (prefers-reduced-motion: reduce) { .tree-panel { animation: none } .tree-block:hover { transform: none } }

/* ── Toast, read-only team page ───────────────────────────────────────── */
.toast { position: fixed; right: var(--s5); bottom: var(--s5); padding: var(--s3) var(--s4); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-float); }
.toast[hidden] { display: none; }
body.readonly select, body.readonly [data-action="decide"], body.readonly form[data-action] { pointer-events: none; opacity: .65; }
@media (prefers-reduced-motion: reduce) { *, *::after { animation: none !important; transition: none !important; } }

/* Pilotage: a row of quiet measure tiles (they are the chart's legend), the chart with its two scales, two panels */
.pilot-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); margin: 0 0 12px; color: var(--muted); }
.measures { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.measure { display: grid; gap: 4px; align-content: start; padding: 12px 16px; border: 0; border-radius: 10px; background: var(--card); color: var(--text); font: inherit; text-align: left; }
.measure span { font-size: 12px; font-weight: 500; color: var(--muted); }
.measure b { font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.measure small { font-size: 12px; font-weight: 400; color: var(--muted); }
button.measure { cursor: pointer; background: transparent; box-shadow: inset 0 0 0 1px var(--line); transition: background .12s ease, box-shadow .12s ease, color .12s ease; }
button.measure b { color: var(--muted); transition: color .12s ease; }
button.measure:hover { background: var(--soft); }
button.measure:active { transform: scale(.985); }
button.measure.is-on { background: var(--card); box-shadow: none; }
button.measure.is-on span { color: var(--tone); } button.measure.is-on b { color: var(--text); }
.tone-shown { --tone: var(--m-shown); } .tone-clicks { --tone: var(--m-clicks); } .tone-position { --tone: var(--m-position); } .tone-visits { --tone: var(--m-visits); }
.chart { margin: 0 0 8px; padding: 16px 16px 12px; background: var(--card); border-radius: 10px; }
.chart-plot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; min-width: 24px; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--tone, var(--muted)); }
.chart-scale.end { text-align: left; } .chart-scale.start { text-align: right; }
.chart-area { position: relative; }
.chart svg { width: 100%; height: 168px; display: block; cursor: crosshair; overflow: visible; }
.chart-line { fill: none; stroke: var(--tone); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; animation: appear .25s ease; }
.chart-line.is-main { stroke-width: 3; }
@keyframes appear { from { opacity: 0; } }
.chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.chart-line, .chart-scale { transition: opacity .15s ease; }
.chart .is-off { opacity: 0; }
.chart-tip span.is-off, .chart-mark.is-off, .chart-mark.is-void { display: none; }
.chart-cursor { position: absolute; top: 0; bottom: 0; left: var(--x); width: 1px; background: var(--line); pointer-events: none; }
.chart-mark { position: absolute; left: var(--x); top: var(--y); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 2px var(--card); pointer-events: none; }
.chart-tip { position: absolute; top: 8px; left: calc(var(--x) + 12px); display: grid; gap: 4px; min-width: 132px; padding: 10px 12px; border-radius: 8px; background: var(--soft); box-shadow: 0 0 0 1px var(--line); font-size: 12px; pointer-events: none; }
.chart-area.is-late .chart-tip { left: auto; right: calc(100% - var(--x) + 12px); }
.chart-tip span { display: flex; justify-content: space-between; gap: 16px; color: var(--tone); }
.chart-tip b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-area:not(.is-reading) .chart-tip, .chart-area:not(.is-reading) .chart-cursor, .chart-area:not(.is-reading) .chart-mark { display: none; }
.chart svg { touch-action: pan-y; }
.chart figcaption { display: flex; justify-content: space-between; margin-top: 8px; padding: 0 36px; font-size: 12px; color: var(--muted); }

/* Folded menu, a clean rail: logo on top, then the button that opens it, at the same place as the one that
   closes it. The theme switch is a setting, not navigation: it lives in the open menu only. */
.app.is-folded .theme-seg { display: none; }
.app.is-folded .nav-stack img:not(:first-child) { display: none; }


/* ── L'écran d'entrée (js/connexion.js) ───────────────────────────────────
   Une carte au milieu de la page, avec les jetons de l'outil : qui arrive ici doit déjà voir le
   pilote, pas un formulaire d'inscription générique. */
.cx { display: grid; place-items: center; min-height: 100dvh; padding: var(--s5); background: var(--page); }
/* width: min(...) et box-sizing : sinon la carte deborde a droite sur un telephone, la largeur
   s'ajoutant au padding (vu a 375 px le 25/11). */
.cx-carte { width: min(380px, 100%); box-sizing: border-box; padding: var(--s6); border: 1px solid var(--line);
  border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-float); }
.cx-marque { display: block; border-radius: var(--r-ctl); }
.cx-carte h1 { margin: var(--s4) 0 0; font-size: 20px; }
.cx-sous { margin: var(--s2) 0 var(--s5); color: var(--muted); font-size: 13px; line-height: 1.5; }
.cx-carte form { display: grid; gap: var(--s2); }
.cx-carte label { color: var(--muted); font-size: 12px; font-weight: 500; }
.cx-carte input[type=email] { width: 100%; min-height: 38px; padding: 0 var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--page); color: var(--text); font-size: 14px; }
.cx-carte input[type=email]:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.cx-btn { width: 100%; min-height: 38px; margin-top: var(--s2); font-size: 14px; }
.cx-btn:disabled { opacity: .55; }
.cx-etat { margin: var(--s4) 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cx-etat[data-ton=bien] { color: var(--ok-text); }
.cx-etat[data-ton=mal] { color: var(--bad); }
.cx-etat:empty { display: none; }
.cx-pied { margin: var(--s5) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px; }
