/* Atelia — app du restaurateur : « Comparer deux périodes » (carte 0a904eba ; version 2, carte 84ae8e98 ; js/franchise-comparer.js).
   Couleurs et polices : jetons de css/tokens.css, comme css/franchise.css ; la carte reprend .fr-card et les dates la puce .puce-date.
   Trait plein (période analysée) : navy ; pointillé (période comparée) : gris des libellés. Aucune légende sous la courbe. */

.fcmp { font-family: var(--font); color: var(--navy); min-width: 0; }

/* Les deux périodes (carte 84ae8e98) : « Période analysée » (du … au …) et « Comparée à » ; champs au doigt (44 px de haut), en 16 px (aucun
   agrandissement automatique sur téléphone) ; les deux dates côte à côte quand la place le permet, l'une sous l'autre sinon (320 px). */
.fcmp-periodes { display: grid; gap: 12px; margin: 4px 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.fcmp-pbloc, .fcmp-champ { display: block; min-width: 0; }
.fcmp-plib { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 800; color: var(--navy); }
.fcmp-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.fcmp-date { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fcmp-dlib { font-size: 12px; font-weight: 700; color: var(--muted); }
.fcmp-date input, .fcmp-mode { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--navy); font-family: var(--font); font-size: 16px; font-weight: 600; }
.fcmp-date input:focus-visible, .fcmp-mode:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.fcmp-debut { margin-top: 8px; max-width: 320px; }
.fcmp-debut[hidden] { display: none; }
.fcmp-cmp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-width: 0; }
.fcmp-cmp .puce-date { font-size: 12px; }
.fcmp-refus { font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--rouge); }
.fcmp-refus[hidden] { display: none; }

/* Contrôle segmenté (Segmented control) : un indicateur à la fois ; les boutons passent à la ligne, à toutes les largeurs : chaque indicateur
   se voit, aucun n'est caché dans une rangée qui défile. */
.fcmp-seg { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 12px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.fcmp-seg button { flex: 0 0 auto; min-height: 40px; padding: 8px 12px; border: none; border-radius: 9px; background: none; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.fcmp-seg button.on { background: var(--navy); color: #fff; }
.fcmp-seg button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.fcmp-carte { min-width: 0; }
.fcmp-titre { margin: 0 0 10px; font-size: 15px; font-weight: 800; line-height: 1.3; color: var(--navy); }
.fcmp-pf { font-weight: 700; color: var(--muted); }

/* Les deux périodes : l'échantillon du trait, les dates en puce, le total ; côte à côte quand la place le permet, l'une sous l'autre sinon. */
.fcmp-sems { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; margin-bottom: 6px; }
.fcmp-sem { min-width: 0; }
.fcmp-sem-h { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fcmp-sem-h .puce-date { font-size: 12px; }
.fcmp-trait { flex: 0 0 auto; display: block; }
.fcmp-sem-v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 4px; }
.fcmp-v { font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fcmp-s0 .fcmp-v { font-size: 18px; color: var(--muted); }
.fcmp-note { font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.fcmp-s0 .fcmp-note { color: var(--muted); }
.fcmp-evo { align-self: center; padding: 2px 8px; border-radius: var(--r-pill); background: var(--chip-2); color: var(--ink-2); font-size: 12px; font-weight: 800; white-space: nowrap; }
.fcmp-evo.hausse { background: var(--vert-bg); color: var(--vert); }
.fcmp-evo.baisse { background: var(--rouge-bg); color: var(--rouge); }
.fcmp-nj { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
/* Part des commandes avec offres : le décompte sous le total, qui passe à la ligne dans une colonne étroite. */
.fcmp-base { margin-top: 2px; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }

/* Le jour touché sur la courbe : ses deux valeurs, au-dessus de la courbe. */
.fcmp-jour { margin: 4px 0 2px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.fcmp-jour[hidden] { display: none; }
.fcmp-jour b { color: var(--navy); font-weight: 800; }

.fcmp-graphe { width: 100%; min-width: 0; margin-top: 6px; }
.fcmp-svg { display: block; width: 100%; height: auto; }
.fcmp-grille { stroke: var(--line); stroke-width: 1; }
.fcmp-zero { stroke: var(--muted); stroke-opacity: .45; }
.fcmp-gy, .fcmp-gx { fill: var(--muted); font-family: var(--font); font-size: 11px; font-weight: 600; }
.fcmp-gx2 { font-size: 10px; font-weight: 500; }
.fcmp-l1 { fill: none; stroke: var(--navy); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.fcmp-l0 { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.fcmp-p1 { fill: var(--navy); }
.fcmp-p0 { fill: var(--surface); stroke: var(--muted); stroke-width: 1.6; }
.fcmp-sel { stroke: var(--blue-bd); stroke-width: 2; }
.fcmp-col { fill: transparent; cursor: pointer; }

.fcmp-vide { font-size: 14px; color: var(--ink-2); }
