/* Cockpit La Meuf en Rouge : couleurs de base.
   Trois déclarations, toujours dans cet ordre :
     1. :root            le thème clair, qui sert de défaut
     2. le média sombre  appliqué SAUF si elle a demandé le clair à la main
     3. [data-theme]     son choix manuel, qui gagne sur le réglage du système
   Sans la garde :not([data-theme="light"]), un Mac en mode nuit écraserait
   son choix de rester en clair, et le bouton n'aurait l'air de rien faire. */
:root {
  color-scheme: light;
  --font-anthropic-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-anthropic-serif: Georgia, "Times New Roman", serif;
  /* Encre plus douce que le noir de la marque : à lire toute la journée, #1B0A0E tape. */
  --color-fg: #241A1D; --color-fg-muted: #7A6A6D; --color-bg: #FAF7F6; --color-panel: #FFFFFF; --color-border-line: #ECE3E3;
  --color-ok: #2F7D4F; --color-warn: #A6690A; --color-bad: #C0392B;
  /* Surfaces de la barre latérale : claires le jour, elle n'est plus un bloc noir posé là. */
  --side-bg: #F3EDEC; --side-ink: #241A1D; --side-mute: #857376; --side-actif: #FFFFFF; --side-line: #E4D9D9;
  --hero-bg: #F4E7E8; --hero-ink: #241A1D; --hero-mute: #7A6A6D;
  --ombre-douce: 0 1px 2px rgba(36, 26, 29, .05), 0 6px 20px rgba(36, 26, 29, .05);
  --cds-radius: 14px; --cds-pad-xs: 4px; --cds-pad-sm: 8px; --cds-dur-slow: .3s;
  --cds-chart-grid: #F0E8E8; --cds-chart-muted: #CDBFC1; --cds-surface-popover: #FFFFFF; --cds-border: #ECE3E3; --cds-shadow-popover: 0 2px 10px rgba(36, 26, 29, .14);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    /* Fond adouci : #1A1215 au lieu du #130709 d'avant, moins de trou noir, plus chaud. */
    --color-fg: #F7EFEF; --color-fg-muted: #AE989C; --color-bg: #1A1215; --color-panel: #241A1D; --color-border-line: #382A2E;
    --color-ok: #5CC98A; --color-warn: #E0A13A; --color-bad: #FF6B5E;
    --side-bg: #150E11; --side-ink: #F7EFEF; --side-mute: #9E888C; --side-actif: #2C2024; --side-line: #2E2225;
  --hero-bg: #221619; --hero-ink: #F7EFEF; --hero-mute: #AE989C;
    --ombre-douce: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --cds-chart-grid: #2E2226; --cds-chart-muted: #5A4348; --cds-surface-popover: #241A1D; --cds-border: #382A2E; --cds-shadow-popover: 0 2px 10px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-fg: #F7EFEF; --color-fg-muted: #AE989C; --color-bg: #1A1215; --color-panel: #241A1D; --color-border-line: #382A2E;
  --color-ok: #5CC98A; --color-warn: #E0A13A; --color-bad: #FF6B5E;
  --side-bg: #150E11; --side-ink: #F7EFEF; --side-mute: #9E888C; --side-actif: #2C2024; --side-line: #2E2225;
  --hero-bg: #221619; --hero-ink: #F7EFEF; --hero-mute: #AE989C;
  --ombre-douce: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --cds-chart-grid: #2E2226; --cds-chart-muted: #5A4348; --cds-surface-popover: #241A1D; --cds-border: #382A2E; --cds-shadow-popover: 0 2px 10px rgba(0, 0, 0, .5);
}
html, body { margin: 0; background: var(--color-bg); }
.dash-skeleton { color: transparent !important; background: color-mix(in srgb, var(--color-fg-muted) 22%, transparent); border-radius: 8px; }
.lmr-alerte { margin: 0 0 18px !important; padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--color-bad) 12%, var(--color-panel)); border: 1.5px solid var(--color-bad); font-weight: 600; font-size: .9rem; }

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* --side-ink et --side-mute ne sont plus fixés ici : ils viennent du thème, sinon la
   barre latérale resterait en texte clair sur fond clair une fois passée en mode jour. */
.lmr { --rouge: #E3162B; --rouge-deep: #B90F21; --nuit: #1B0A0E; --rose: #FFC9CF; --stabilo: #FFE35C; --lmr-accent: var(--rouge);
  --sans: "Bricolage Grotesque", var(--font-anthropic-sans); --serif: "Instrument Serif", var(--font-anthropic-serif);
  --blush: color-mix(in srgb, var(--rouge) 9%, var(--color-panel)); --line: var(--color-border-line);
  font-family: var(--sans); color: var(--color-fg); font-size: 15.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.lmr [hidden] { display: none !important; }
.lmr p, .lmr h1, .lmr h2, .lmr h3, .lmr ul { margin: 0; }
.lmr button { font-family: inherit; }
.lmr a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 3px; }
.lmr a:hover { text-decoration-color: var(--rouge); }
.lmr :focus-visible { outline: 2px solid var(--rouge); outline-offset: 2px; }
.lmr-app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }

/* Barre latérale */
.lmr-side { background: var(--side-bg); color: var(--side-ink); padding: 26px 14px 20px; border-right: 1px solid var(--side-line); }
.lmr-side-in { position: sticky; top: 22px; display: flex; flex-direction: column; gap: 26px; }
.lmr-logo { padding: 0 8px; line-height: 1; }
.lmr-wm { font-weight: 800; font-size: 2.05rem; letter-spacing: -.055em; line-height: 1; display: inline-block; }
.lmr-wm i { font-style: normal; color: var(--rouge); }
.lmr-ticks { display: block; width: 118px; height: 16px; margin-top: 6px; }
.lmr-logo small { display: block; color: var(--side-mute); font-size: .78rem; font-weight: 600; margin-top: 6px; }
.lmr-nav { display: flex; flex-direction: column; gap: 2px; }
/* Les intertitres de la barre : « Pilotage » puis « Pôles ». Discrets, ils ne sont pas
   cliquables et ne doivent pas se confondre avec une entrée du menu. */
.lmr-nav-titre { font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--side-mute); padding: 0 12px; margin: 18px 0 7px !important; }
.lmr-nav-titre:first-child { margin-top: 0 !important; }
.lmr-pastille { margin-left: auto; background: var(--rouge); color: #fff; font-size: .72rem; font-weight: 700; min-width: 19px; height: 19px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.lmr-pastille[hidden] { display: none; }
.lmr-navbtn { display: flex; align-items: center; gap: 12px; background: none; border: 0; color: var(--side-mute); padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left; font-size: inherit; font-weight: 600; }
.lmr-navbtn svg { width: 19px; height: 19px; flex: none; }
.lmr-navbtn:hover { color: var(--side-ink); background: color-mix(in srgb, var(--side-ink) 7%, transparent); }
/* Avant, l'onglet actif était une dalle rouge pleine. Lu toute la journée, ça cogne :
   une surface calme et un trait rouge à gauche disent la même chose, plus doucement. */
.lmr-navbtn[aria-current="page"] { background: var(--side-actif); color: var(--side-ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--rouge), var(--ombre-douce); }
.lmr-navbtn[aria-current="page"] svg { color: var(--rouge); }
/* Bascule jour / nuit : on n'affiche que l'icône de ce vers quoi le clic emmène. */
.lmr-theme { display: flex; align-items: center; gap: 7px; background: none; border: 1px solid var(--line); color: var(--color-fg-muted); padding: 8px 13px; border-radius: 999px; cursor: pointer; font: inherit; font-size: var(--t-sm); font-weight: 600; white-space: nowrap; }
.lmr-theme:hover { color: var(--color-fg); background: color-mix(in srgb, var(--color-fg) 6%, transparent); }
.lmr-theme svg { width: 17px; height: 17px; flex: none; }
.lmr-theme-nuit { display: none; }
:root[data-theme="dark"] .lmr-theme-jour { display: none; }
:root[data-theme="dark"] .lmr-theme-nuit { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lmr-theme-jour { display: none; }
  :root:not([data-theme="light"]) .lmr-theme-nuit { display: block; }
}
.lmr-side-foot { padding: 0 12px; font-size: .78rem; color: var(--side-mute); line-height: 1.45; }
.lmr-side-foot b { display: block; color: var(--side-ink); font-weight: 700; }

/* Contenu */
.lmr-main { min-width: 0; padding: 30px clamp(16px, 3vw, 40px) 40px; }
.lmr-panel { display: flex; flex-direction: column; gap: 30px; }
/* Le bandeau du haut avait un fond toujours noir. En mode jour il devient une surface
   rosée : même présence, sans le bloc sombre au milieu d'une page claire. */
.lmr-hero { background: var(--hero-bg); color: var(--hero-ink); border-radius: 26px; padding: 32px clamp(20px, 4vw, 44px) 40px; position: relative; overflow: hidden; }
.lmr-kicker { color: var(--hero-mute); font-weight: 600; font-size: .9rem; margin-bottom: 10px !important; position: relative; z-index: 1; }
.lmr-title { font-weight: 800; font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem); letter-spacing: -.045em; line-height: 1; position: relative; z-index: 1; max-width: 15ch; text-wrap: balance; }
.lmr-title i { font-style: normal; color: var(--rouge); }
.lmr-sub { font-family: var(--serif); font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); line-height: 1.22; margin-top: 18px !important; max-width: 46ch; position: relative; z-index: 1; text-wrap: pretty; }
.lmr-dial { position: absolute; right: -40px; bottom: -70px; width: min(52%, 460px); opacity: .5; pointer-events: none; }
.lmr-sec { display: flex; flex-direction: column; gap: 14px; }
.lmr-h2 { font-weight: 800; font-size: 1.45rem; letter-spacing: -.025em; line-height: 1.15; }
.lmr-note { color: var(--color-fg-muted); font-size: .9rem; max-width: 72ch; margin-top: 4px !important; }
.lmr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: 12px; }
.lmr-grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 14px; }
.lmr-card { background: var(--color-panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; min-width: 0; box-shadow: var(--ombre-douce); }

/* Chiffres */
.lmr-tile-label { color: var(--color-fg-muted); font-size: .86rem; font-weight: 600; }
.lmr-tile-value { font-weight: 800; font-size: clamp(1.5rem, 1.05rem + 1.1vw, 1.9rem); letter-spacing: -.045em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lmr-tile-unit { color: var(--color-fg-muted); font-size: .8rem; }
.lmr-red { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.lmr-red .lmr-tile-label, .lmr-red .lmr-tile-unit { color: rgba(255, 255, 255, .88); }

/* Sous-onglets et période */
.lmr-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.lmr-module { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.lmr-subtabs { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--color-panel); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lmr-subtabs::-webkit-scrollbar { display: none; }
.lmr-subbtn { font-size: .9rem; font-weight: 600; color: var(--color-fg-muted); background: transparent; border: 0; border-radius: 999px; padding: 8px 17px; cursor: pointer; white-space: nowrap; }
.lmr-subbtn:hover { color: var(--color-fg); }
/* Le sous-onglet actif portait une pastille rouge pleine, comme la barre latérale avant
   elle. Deux rouges pleins à l'écran se disputent l'œil : celui-ci devient une surface
   calme, et le rouge reste pour ce qui demande une action. */
.lmr-subbtn[aria-selected="true"] { background: color-mix(in srgb, var(--color-fg) 8%, var(--color-panel)); color: var(--color-fg); font-weight: 700; box-shadow: var(--ombre-douce); }
.lmr-period { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.lmr-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .86rem; font-weight: 700; }
.lmr-dates input { font: inherit; font-weight: 600; color: var(--color-fg); background: var(--color-panel); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.lmr-dates input:focus { border-color: var(--color-fg); outline: none; }
.lmr-daily { position: relative; min-height: 13rem; }

/* Filtres */
.lmr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lmr-chip { font-size: .86rem; font-weight: 700; color: var(--color-fg); background: var(--color-panel); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.lmr-chip:hover { border-color: var(--color-fg); }
.lmr-chip[aria-pressed="true"] { background: var(--color-fg); color: var(--color-bg); border-color: var(--color-fg); }

/* Podium */
.lmr-win { display: flex; flex-direction: column; gap: 12px; border-radius: 22px; }
.lmr-win-rank { width: 34px; height: 34px; border-radius: 50%; background: var(--rouge); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1rem; }
.lmr-win-who { font-size: .82rem; font-weight: 700; color: var(--color-fg-muted); }
.lmr-win-hook { font-weight: 700; font-size: 1.22rem; line-height: 1.22; letter-spacing: -.015em; text-wrap: balance; }
.lmr-win-hook a, .lmr-adv-row a { text-decoration: none; }
.lmr-win-hook a:hover, .lmr-adv-row a:hover { text-decoration: underline; text-decoration-color: var(--rouge); }
.lmr-win-hook a::before, .lmr-win-hook span::before { content: "« "; color: var(--rouge); }
.lmr-win-hook a::after, .lmr-win-hook span::after { content: " »"; color: var(--rouge); }
.lmr-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: auto !important; padding-top: 4px; font-size: .8rem; color: var(--color-fg-muted); }
.lmr-stats > span { display: flex; flex-direction: column; }
.lmr-stats .lmr-big { font-weight: 800; font-size: 1.5rem; letter-spacing: -.04em; line-height: 1.1; color: var(--color-fg); font-variant-numeric: tabular-nums; }
.lmr-tag { display: inline-block; font-size: .72rem; font-weight: 800; background: var(--rouge); color: #fff; border-radius: 999px; padding: 2px 9px; margin-left: 8px; white-space: nowrap; vertical-align: middle; }

/* Ta liste */
.lmr-adv { display: flex; flex-direction: column; gap: 14px; border-radius: 22px; }
.lmr-adv-head { display: flex; gap: 12px; align-items: center; }
.lmr-av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--rose), var(--rouge)); display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.lmr-adv-name { font-size: 1.05rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.lmr-adv-meta { font-size: .8rem; color: var(--color-fg-muted); }
.lmr-adv-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lmr-adv-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; font-size: .9rem; align-items: baseline; }
.lmr-adv-row > span:first-child { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.lmr-adv-row .lmr-rail { grid-column: 1 / -1; }
.lmr-adv-num { color: var(--color-fg-muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .8rem; font-weight: 600; }
.lmr-rail { display: block; height: 8px; border-radius: 9px; background: var(--line); overflow: hidden; }
.lmr-rail-fill { display: block; height: 100%; border-radius: 9px; background: var(--rouge); }

/* Pistes */
.lmr-idee { display: flex; flex-direction: column; gap: 10px; border-radius: 20px; }
.lmr-idee-num { align-self: flex-start; font-size: .74rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--rouge); color: #fff; }
.lmr-idee-acc { font-weight: 800; font-size: 1.2rem; line-height: 1.22; letter-spacing: -.015em; text-wrap: balance; }
.lmr-idee-lab { display: block; color: var(--color-fg-muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.lmr-idee-txt { font-size: .88rem; }
.lmr-idee-sig { border-left: 3px solid var(--rouge); padding-left: 10px; }
.lmr-idee-use { background: var(--blush); border-radius: 12px; padding: 10px 12px; margin-top: auto !important; }

/* Tableaux */
.lmr-tbl { border: 1.5px solid var(--line); border-radius: 16px; background: var(--color-panel); overflow: hidden; }
.lmr-scroll { overflow: auto; max-height: 34rem; }
.lmr-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.lmr-table th { position: sticky; top: 0; z-index: 1; background: var(--rouge); color: #fff; text-align: left; font-weight: 800; padding: 10px; white-space: nowrap; }
.lmr-table td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.lmr-table tbody tr:first-child td { border-top: 0; }
.lmr-table td:first-child { font-weight: 700; }
.lmr-table .lmr-num { text-align: right; white-space: nowrap; }
.lmr-table td.lmr-long { min-width: 14rem; }
.lmr-table td.lmr-nowrap { white-space: nowrap; }
.lmr-table td.lmr-clip { max-width: 20rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmr-sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.lmr-sort[data-dir]::after { content: " ↓"; }
.lmr-sort[data-dir="asc"]::after { content: " ↑"; }
.lmr-track { display: inline-block; vertical-align: middle; width: 3.5rem; height: 8px; margin-right: 8px; border-radius: 9px; background: var(--line); overflow: hidden; }
.lmr-fill { display: block; height: 100%; border-radius: 9px; background: var(--rouge); }
.lmr-val { display: inline-block; min-width: 2.5ch; font-weight: 700; }
.lmr-st-ok { color: var(--color-ok); font-weight: 700; } .lmr-st-bad { color: var(--color-bad); font-weight: 700; } .lmr-st-warn { color: var(--color-warn); font-weight: 700; }

/* Budget */
.lmr-bars { display: flex; flex-direction: column; gap: 12px; }
.lmr-bar-row { display: grid; grid-template-columns: minmax(0, 15rem) 1fr auto; gap: 12px; align-items: center; font-size: .88rem; }
.lmr-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lmr-bar-sub { display: block; color: var(--color-fg-muted); font-weight: 400; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; }
.lmr-bar-rail { height: 14px; border-radius: 9px; background: var(--line); overflow: hidden; }
.lmr-bar-fill { display: block; height: 100%; border-radius: 9px; background: var(--rouge); }
.lmr-bar-fill.lmr-off { background: var(--cds-chart-muted); }
.lmr-bar-fill.lmr-refus { background: repeating-linear-gradient(135deg, var(--nuit) 0 6px, var(--rouge-deep) 6px 12px); }
.lmr-bar-val { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 800; }
.lmr-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .82rem; color: var(--color-fg-muted); margin-top: 16px !important; }
.lmr-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.lmr-trend { position: relative; min-height: 12rem; }
.lmr-tip { position: absolute; pointer-events: none; background: var(--cds-surface-popover); border: 1px solid var(--cds-border); border-radius: var(--cds-radius); box-shadow: var(--cds-shadow-popover); padding: var(--cds-pad-xs) var(--cds-pad-sm); font-size: .8rem; white-space: nowrap; }
/* Descriptions à copier */
.lmr-grid-desc { grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr)); gap: 14px; align-items: start; }
.lmr-desc { display: flex; flex-direction: column; gap: 14px; border-radius: 22px; }
.lmr-desc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.lmr-desc-angle { font-weight: 800; font-size: 1.08rem; letter-spacing: -.015em; line-height: 1.2; }
.lmr-desc-part { display: flex; flex-direction: column; gap: 8px; }
.lmr-desc-titre { font-weight: 800; font-size: 1.15rem; line-height: 1.25; letter-spacing: -.015em; text-wrap: balance; }
.lmr-desc-text { white-space: pre-wrap; font-size: .95rem; line-height: 1.55; background: var(--color-bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.lmr-desc-titre, .lmr-desc-text { -webkit-user-select: text; user-select: text; }
.lmr-copy { align-self: flex-start; font-size: .86rem; font-weight: 800; color: #fff; background: var(--rouge); border: 1.5px solid var(--rouge); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.lmr-copy:hover { background: var(--rouge-deep); border-color: var(--rouge-deep); }
.lmr-copy.lmr-ghost { background: transparent; color: var(--color-fg); border-color: var(--line); }
.lmr-copy.lmr-ghost:hover { border-color: var(--color-fg); background: transparent; }
.lmr-copy[data-done] { background: var(--color-fg); border-color: var(--color-fg); color: var(--color-bg); }
.lmr-old { border-radius: 20px; }
.lmr-old > summary { cursor: pointer; font-weight: 800; }
.lmr-old-list { display: flex; flex-direction: column; gap: 18px; margin-top: 16px; }
.lmr-old-item { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.lmr-old-meta { font-size: .8rem; font-weight: 700; color: var(--color-fg-muted); }

/* Monteur IA */
.lmr a.lmr-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; position: relative; z-index: 1; background: var(--rouge); color: #fff; font-weight: 800; font-size: 1.02rem; padding: 13px 24px; border-radius: 999px; text-decoration: none; }
.lmr a.lmr-cta:hover { background: var(--rouge-deep); }
.lmr a.lmr-go { display: flex; flex-direction: column; gap: 6px; text-decoration: none; border-radius: 20px; }
.lmr a.lmr-go:hover { border-color: var(--rouge); }
.lmr-go-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.015em; }
.lmr-go-name::after { content: " →"; color: var(--rouge); }
.lmr-go-txt { font-size: .9rem; color: var(--color-fg-muted); }
.lmr [data-dash-source-state=refreshing] { opacity: .5; transition: opacity var(--cds-dur-slow); }

@media (max-width: 860px) {
  .lmr-app { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .lmr-side { min-width: 0; padding: 10px 14px; position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
  .lmr-side-in { position: static; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
  .lmr-logo { padding: 0; }
  .lmr-wm { font-size: 1.5rem; }
  .lmr-ticks, .lmr-logo small { display: none; }
  .lmr-burger { display: inline-flex; }
  .lmr-drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(84vw, 320px); background: var(--nuit); padding: 22px 16px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; transform: translateX(-102%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); box-shadow: 8px 0 30px rgba(0, 0, 0, .35); visibility: hidden; }
  .lmr-menu-open .lmr-drawer { transform: none; visibility: visible; }
  .lmr-drawer-head { display: flex; }
  .lmr-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(27, 10, 14, .55); border: 0; padding: 0; opacity: 0; pointer-events: none; transition: opacity .26s; }
  .lmr-menu-open .lmr-scrim { opacity: 1; pointer-events: auto; }
  .lmr-navbtn { padding: 13px 14px; font-size: 1.02rem; width: 100%; }
  .lmr-subnav { display: flex; }
  .lmr-side-foot { padding: 0 14px; }
  .lmr-bar { flex-wrap: wrap; min-width: 0; margin-bottom: 18px; }
  .lmr-module { display: none; }
  .lmr-subtabs { display: flex; width: 100%; max-width: 100%; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .lmr-subtabs::-webkit-scrollbar { display: none; }
  .lmr-subtabs[hidden] { display: none; }
  .lmr-subbtn { white-space: nowrap; flex: 1 0 auto; padding: 10px 16px; scroll-snap-align: start; }
  .lmr-dates input { font-size: 16px; }
  .lmr-main { padding: 16px 14px 28px; }
  .lmr-hero { border-radius: 20px; padding: 24px 20px 30px; }
}
@media (max-width: 640px) {
  .lmr-wide, .lmr-track { display: none; }
  .lmr-table td.lmr-long { min-width: 9rem; }
  .lmr-bar-row { grid-template-columns: 1fr auto; }
  .lmr-bar-row .lmr-bar-rail { grid-column: 1 / -1; grid-row: 2; height: 8px; }
  .lmr-dial { opacity: .3; }
}

/* Modules Briefing, Contrôle qualité, Contenu */
.lmr-list { display: flex; flex-direction: column; gap: 10px; }
.lmr-item { background: var(--color-panel); border: 1.5px solid var(--line); border-left-width: 5px; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lmr-item.lmr-lvl-urgent { border-left-color: var(--rouge); }
.lmr-item.lmr-lvl-a-voir { border-left-color: var(--color-warn); }
.lmr-item.lmr-lvl-info { border-left-color: var(--line); }
.lmr-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lmr-item-title { font-weight: 800; }
.lmr-item-txt { font-size: .93rem; overflow-wrap: anywhere; }
.lmr-item-block { color: var(--rouge-deep); }
.lmr-item-meta { font-size: .8rem; font-weight: 600; color: var(--color-fg-muted); }
.lmr a.lmr-item-link { align-self: flex-start; font-size: .85rem; font-weight: 800; }
.lmr-badge { display: inline-block; font-size: .72rem; font-weight: 800; background: var(--rouge); color: #fff; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.lmr-badge-soft { background: var(--blush); color: var(--color-fg); }
.lmr-tone-ok { background: var(--color-ok); }
.lmr-tone-warn { background: var(--color-warn); }
.lmr-tone-bad { background: var(--color-fg-muted); }
.lmr-empty { padding: 14px 16px; border: 1.5px dashed var(--line); border-radius: 16px; }
.lmr-call > summary { cursor: pointer; list-style: none; }
.lmr-call > summary::-webkit-details-marker { display: none; }
.lmr-call:not([open]) > :not(summary) { display: none; }
.lmr-rich { display: flex; flex-direction: column; gap: 8px; font-size: .92rem; border-top: 1px solid var(--line); padding-top: 12px; }
.lmr-rich ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.lmr-coach { display: flex; flex-direction: column; gap: 10px; }
.lmr-coach-name { font-weight: 800; font-size: 1.1rem; }
.lmr-coach-txt { font-size: .9rem; display: flex; flex-direction: column; gap: 2px; }
.lmr-coach-phrase { font-family: var(--serif); font-size: 1.15rem; color: var(--rouge); line-height: 1.3; }
.lmr-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; align-items: start; }
.lmr-day { display: flex; flex-direction: column; gap: 12px; }
.lmr-day.lmr-today { border-color: var(--rouge); }
.lmr-day-name { font-weight: 800; text-transform: capitalize; }
.lmr-day-item { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.lmr-day-acc { font-weight: 700; font-size: .95rem; }
.lmr-foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: .72rem; color: color-mix(in srgb, var(--color-fg-muted) 75%, transparent); }
.lmr-foot a { color: inherit; }

.lmr-wm { display: inline-flex; align-items: center; gap: 10px; }
.lmr-mark { width: 34px; height: 34px; border-radius: 9px; flex: none; box-shadow: 0 0 0 1px rgba(251, 239, 240, .14); }
@media (max-width: 860px) { .lmr-mark { width: 28px; height: 28px; border-radius: 7px; } }

/* Menu à 3 traits (mobile) */
.lmr-burger { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .08); color: var(--side-ink); cursor: pointer; }
.lmr-burger:active { background: rgba(255, 255, 255, .16); }
.lmr-burger svg { width: 24px; height: 24px; }
.lmr-drawer { display: flex; flex-direction: column; gap: 26px; }
.lmr-drawer-head { display: none; align-items: center; justify-content: space-between; gap: 10px; }
.lmr-drawer-title { font-weight: 800; font-size: 1.5rem; letter-spacing: -.05em; color: var(--side-ink); }
.lmr-drawer-title i { font-style: normal; color: var(--rouge); }
.lmr-scrim { display: none; }
@media (max-width: 860px) { .lmr-scrim { display: block; } }
.lmr-subnav { display: none; flex-direction: column; gap: 2px; margin: 2px 0 8px 26px; padding-left: 12px; border-left: 1.5px solid rgba(255, 255, 255, .12); }
.lmr-subnav[hidden] { display: none; }
.lmr-sublink { background: none; border: 0; text-align: left; color: var(--side-mute); font: inherit; font-size: .95rem; font-weight: 600; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.lmr-sublink[aria-current="page"] { color: #fff; background: rgba(227, 22, 43, .28); }
body.lmr-locked { overflow: hidden; }
@media (max-width: 860px) {
  .lmr-burger { display: inline-flex; }
  .lmr-drawer-head { display: flex; }
  .lmr-subnav { display: flex; }
  .lmr-subnav[hidden] { display: none; }
}
@media (max-width: 860px) { .lmr-menu-open .lmr-side { z-index: 70; } }

/* Topos des en-têtes : un titre + quelques puces */
.lmr-topo-titre { font-family: var(--serif); font-size: clamp(1.3rem, 1rem + 1.2vw, 1.75rem); line-height: 1.2; margin: 0 0 14px !important; text-wrap: balance; }
.lmr-topo { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-family: var(--sans); font-size: .98rem; line-height: 1.4; color: var(--side-ink); max-width: 52ch; }
.lmr-topo li { position: relative; padding-left: 20px; }
.lmr-topo li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--rouge); }

/* Menu à 3 traits à gauche sur téléphone */
@media (max-width: 860px) {
  .lmr-side-in { justify-content: flex-start; gap: 12px; }
  .lmr-side-in > .lmr-burger { order: -1; }
}

/* Apps intégrées (Cash Printing, Le Poste CSM) */
.lmr-app-panel { gap: 12px; }
.lmr-app-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.lmr-app-txt { color: var(--color-fg-muted); font-size: .9rem; }
.lmr a.lmr-app-open { font-size: .88rem; font-weight: 800; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--color-panel); }
.lmr a.lmr-app-open:hover { border-color: var(--rouge); }
.lmr-app-frame { border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 520px; }
.lmr-app-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 860px) {
  .lmr-app-mode .lmr-main { padding: 10px 8px 12px; }
  .lmr-app-mode .lmr-bar { margin-bottom: 8px; }
  .lmr-app-panel .lmr-app-txt { display: none; }
  .lmr-app-frame { border-radius: 14px; height: calc(100dvh - 140px); min-height: 420px; }
}

/* =====================================================================
   LE RYTHME (1er novembre 2026)
   Jusqu'ici deux systèmes se marchaient dessus : celui du tableau de bord
   et celui du bureau en îles, chacun avec ses marges, ses arrondis et ses
   tailles de texte. D'où l'impression de brouillon, même quand chaque
   écran pris séparément se tenait.
   Un seul jeu d'espacements, un seul d'arrondis, une seule échelle de
   texte. Tout le reste s'y réfère.
   ===================================================================== */
:root {
  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --e5: 24px; --e6: 32px; --e7: 48px;
  --r1: 8px; --r2: 12px; --r3: 16px; --r4: 22px;
  --t-xs: .76rem; --t-sm: .86rem; --t-md: .94rem; --t-lg: 1.1rem; --t-xl: 1.55rem;
  --entete-h: 68px;
}

/* ---------- La coque : elle ne bouge pas ---------- */
.lmr-app { height: 100dvh; overflow: hidden; }
.lmr-side { overflow-y: auto; overscroll-behavior: contain; }
.lmr-main { display: flex; flex-direction: column; min-height: 0; padding: 0; }

.lmr-entete {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--e4);
  padding: 0 clamp(var(--e4), 3vw, var(--e6)); min-height: var(--entete-h);
  border-bottom: 1px solid var(--line);
}
.lmr-entete-titre { min-width: 0; }
.lmr-module { font-size: var(--t-lg); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.lmr-module-quoi { font-size: var(--t-sm); color: var(--color-fg-muted); line-height: 1.3; margin-top: 1px !important; }
.lmr-module-quoi:empty { display: none; }
.lmr-action {
  flex: none; border: 0; border-radius: 999px; background: var(--rouge); color: #fff;
  font: inherit; font-size: var(--t-sm); font-weight: 700; padding: 10px var(--e4); cursor: pointer;
}
.lmr-action:hover { background: var(--rouge-deep); }
.lmr-action[hidden] { display: none; }

/* La rangée d'onglets, seule et unique, sous l'en-tête. */
.lmr-bar {
  flex: none; margin: 0; padding: 0 clamp(var(--e4), 3vw, var(--e6));
  border-bottom: 1px solid var(--line); gap: 0;
}
.lmr-bar[hidden] { display: none; }
.lmr-subtabs {
  border: 0; border-radius: 0; background: none; padding: 0; gap: var(--e5);
  box-shadow: none;
}
/* Onglets soulignés plutôt que pastilles : une seule rangée, posée sur un trait,
   se lit comme une barre de navigation et non comme un groupe de boutons. */
.lmr-subbtn {
  padding: var(--e3) 0; border-radius: 0; font-size: var(--t-sm); font-weight: 600;
  color: var(--color-fg-muted); box-shadow: none; background: none;
}
.lmr-subbtn[aria-selected="true"] {
  background: none; color: var(--color-fg); font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--rouge);
}
.lmr-subbtn:hover { background: none; color: var(--color-fg); }

/* Seule cette zone défile. */
.lmr-defile {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--e5) clamp(var(--e4), 3vw, var(--e6)) var(--e6);
}
.lmr-panel { gap: var(--e5); }

/* Le contenu à plat : plus de carte dans la carte. */
.lmr-poste > .bu-panel, .lmr-poste > .bu-taches {
  height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
}

@media (max-width: 860px) {
  .lmr-entete { min-height: 58px; }
  .lmr-defile { padding: var(--e4) var(--e4) var(--e6); }
  .lmr-subtabs { gap: var(--e4); overflow-x: auto; }
}
