/* core.css : socle du cockpit mobile. Ne pas modifier depuis un écran : chaque écran a son screens/<id>.css.
   Idée de mise en page : une app de téléphone en trois bandes (bandeau encre, écran qui défile, barre d'onglets),
   une couleur par famille d'écrans, des chiffres étroits et gras qui se lisent d'un coup d'œil. */
:root {
  /* fonds et encres */
  --fond-page: #E2E5F6; --fond: #EEF0FA; --surface: #FFFFFF; --surface-2: #F4F5FD; --creux: #E4E7F6;
  --encre: #15133D; --encre-2: #54527A; --encre-3: #7C7B9E; --trait: #DCDEEF; --trait-fort: #C3C6E0;
  --bandeau: #15133D; --sur-bandeau: #FFFFFF; --sur-bandeau-2: #B9B8DA; --bandeau-creux: #25235A;
  --chassis: #0B0A24; --voile: rgba(12, 11, 36, .46);
  /* accent et familles */
  --accent: #2B4BFF; --accent-doux: #E1E7FF; --sur-accent: #FFFFFF; --hero: #2B4BFF; --hero-2: #1B30C4; --sur-hero: #FFFFFF; --sur-hero-2: #CFD7FF;
  --c1: #2B4BFF; --c2: #EC2C86; --c3: #009DA6; --c4: #F56A00; --c5: #8437F5; --c6: #C79A00;
  --c1-doux: #E1E7FF; --c2-doux: #FFE0EF; --c3-doux: #D5F3F3; --c4-doux: #FFE7D1; --c5-doux: #ECE0FF; --c6-doux: #FBEFC2;
  /* états : jamais utilisés comme décor */
  --bon: #0B9A58; --bon-doux: #D8F5E6; --attention: #B86E00; --attention-doux: #FFEDC7; --critique: #DC1F3C; --critique-doux: #FFE1E5; --neutre: #54527A; --neutre-doux: #E4E7F6;
  --ombre: 0 1px 2px rgba(21, 19, 61, .05), 0 10px 28px -12px rgba(21, 19, 61, .22);
  --ombre-haute: 0 24px 60px -18px rgba(21, 19, 61, .45);
  /* typo */
  --f-titre: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-texte: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --t-11: .6875rem; --t-13: .8125rem; --t-15: .9375rem; --t-17: 1.0625rem; --t-22: 1.375rem; --t-30: 1.875rem; --t-44: 2.75rem;
  /* formes */
  --r-1: 6px; --r-2: 12px; --r-3: 20px; --r-4: 28px; --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  --famille: var(--c1); --famille-doux: var(--c1-doux);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond-page: #05041A; --fond: #0D0C24; --surface: #191838; --surface-2: #201F47; --creux: #131231;
    --encre: #F2F2FF; --encre-2: #B8B7DC; --encre-3: #8C8BB4; --trait: #2B2A57; --trait-fort: #3D3C72;
    --bandeau: #07061C; --sur-bandeau: #FFFFFF; --sur-bandeau-2: #A3A2CC; --bandeau-creux: #1B1A44;
    --chassis: #000000; --voile: rgba(0, 0, 0, .62);
    --accent: #7187FF; --accent-doux: #222965; --sur-accent: #0A0920; --hero: #2F47E6; --hero-2: #1D2B9C; --sur-hero: #FFFFFF; --sur-hero-2: #C9D1FF;
    --c1: #7187FF; --c2: #FF5CA8; --c3: #2BCDD0; --c4: #FF9447; --c5: #AB7BFF; --c6: #F0CB3C;
    --c1-doux: #222965; --c2-doux: #4A1836; --c3-doux: #0C3B40; --c4-doux: #4A2A10; --c5-doux: #33205F; --c6-doux: #43380E;
    --bon: #37D48B; --bon-doux: #0E3A29; --attention: #FFB83A; --attention-doux: #43310A; --critique: #FF6176; --critique-doux: #4A1622; --neutre: #B8B7DC; --neutre-doux: #26254F;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
    --ombre-haute: 0 24px 60px -18px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond-page: #05041A; --fond: #0D0C24; --surface: #191838; --surface-2: #201F47; --creux: #131231;
  --encre: #F2F2FF; --encre-2: #B8B7DC; --encre-3: #8C8BB4; --trait: #2B2A57; --trait-fort: #3D3C72;
  --bandeau: #07061C; --sur-bandeau: #FFFFFF; --sur-bandeau-2: #A3A2CC; --bandeau-creux: #1B1A44;
  --chassis: #000000; --voile: rgba(0, 0, 0, .62);
  --accent: #7187FF; --accent-doux: #222965; --sur-accent: #0A0920; --hero: #2F47E6; --hero-2: #1D2B9C; --sur-hero: #FFFFFF; --sur-hero-2: #C9D1FF;
  --c1: #7187FF; --c2: #FF5CA8; --c3: #2BCDD0; --c4: #FF9447; --c5: #AB7BFF; --c6: #F0CB3C;
  --c1-doux: #222965; --c2-doux: #4A1836; --c3-doux: #0C3B40; --c4-doux: #4A2A10; --c5-doux: #33205F; --c6-doux: #43380E;
  --bon: #37D48B; --bon-doux: #0E3A29; --attention: #FFB83A; --attention-doux: #43310A; --critique: #FF6176; --critique-doux: #4A1622; --neutre: #B8B7DC; --neutre-doux: #26254F;
  --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
  --ombre-haute: 0 24px 60px -18px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

/* ---------- base ---------- */
html, body { height: 100%; }
body { margin: 0; background: var(--fond-page); color: var(--encre); font-family: var(--f-texte); font-size: var(--t-15); line-height: 1.4; overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
.app *, .app *::before, .app *::after { box-sizing: border-box; }
.app button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
.app :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-1); }
.app h1, .app h2, .app h3, .app p, .app dl, .app dd, .app ul, .app ol { margin: 0; padding: 0; }
.app ul, .app ol { list-style: none; }
.app a { color: var(--accent); }
.chiffre { font-family: var(--f-titre); font-stretch: 78%; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.etiquette { font-family: var(--f-titre); font-stretch: 112%; font-weight: 700; font-size: var(--t-11); letter-spacing: .07em; text-transform: uppercase; color: var(--encre-2); }
.discret { color: var(--encre-2); font-size: var(--t-13); }
.nums { font-variant-numeric: tabular-nums; }
.ico { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -.22em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- coque ---------- */
.app { position: fixed; inset: 0; display: flex; justify-content: center; }
.tel { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--fond); contain: layout paint; container-type: inline-size; container-name: app; overflow: hidden; }
.rail, .cote { display: none; }

.bandeau { flex: none; background: var(--bandeau); color: var(--sur-bandeau); padding-top: env(safe-area-inset-top, 0px); padding-left: var(--gl); padding-right: var(--gr); z-index: 5; }
.bandeau-fil { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 26px; font-family: var(--f-titre); font-stretch: 112%; font-weight: 700; font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sur-bandeau-2); }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 var(--sur-bandeau); } 100% { box-shadow: 0 0 0 9px transparent; } }
.bandeau-barre { display: flex; align-items: center; gap: 8px; padding: 4px 0 10px; }
.boutique-btn { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; height: 40px; }
.boutique-btn .monogramme { width: 34px; height: 34px; border-radius: 11px 11px 11px 3px; background: var(--c2); color: var(--sur-bandeau); display: grid; place-items: center; font-family: var(--f-titre); font-stretch: 112%; font-weight: 800; font-size: var(--t-13); flex: none; }
.boutique-btn .nom { font-family: var(--f-titre); font-weight: 800; font-stretch: 105%; font-size: var(--t-17); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.boutique-btn .ico { color: var(--sur-bandeau-2); width: 16px; height: 16px; }
.periode { display: flex; background: var(--bandeau-creux); border-radius: 99px; padding: 3px; flex: none; }
.periode button { height: 30px; padding: 0 10px; border-radius: 99px; font-weight: 700; font-size: var(--t-13); color: var(--sur-bandeau-2); white-space: nowrap; }
.periode button[aria-pressed="true"] { background: var(--sur-bandeau); color: var(--bandeau); }
.periode[data-off="1"] { opacity: .35; pointer-events: none; }
.rond-btn { width: 36px; height: 36px; border-radius: 50%; display: grid !important; place-items: center; background: var(--bandeau-creux) !important; color: var(--sur-bandeau) !important; flex: none; }

.ecran { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-behavior: smooth; outline: none; -webkit-overflow-scrolling: touch; position: relative; }
.ecran-tete { padding: 18px var(--gr) 4px var(--gl); display: flex; flex-direction: column; gap: 2px; }
.ecran-tete .etiquette { color: var(--famille); display: flex; align-items: center; gap: 6px; }
.ecran-tete .etiquette::before { content: ""; width: 14px; height: 4px; border-radius: 2px; background: var(--famille); }
.ecran-tete h1 { font-family: var(--f-titre); font-stretch: 100%; font-weight: 800; font-size: var(--t-22); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.ecran-tete p { color: var(--encre-2); font-size: var(--t-13); }
.sous-onglets { position: sticky; top: 0; z-index: 3; background: var(--fond); padding: 10px var(--gr) 8px var(--gl); border-bottom: 1px solid var(--trait); }
.ecran-corps { padding: 14px var(--gr) 28px var(--gl); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ecran-corps.sans-marge { padding: 0; gap: 0; }
.ecran-corps > * { min-width: 0; }
.ecran-corps.entre { animation: entre .26s cubic-bezier(.2, .7, .2, 1); }
.ecran-corps.entre-g { animation: entre-g .26s cubic-bezier(.2, .7, .2, 1); }
@keyframes entre { from { opacity: 0; transform: translateX(18px); } }
@keyframes entre-g { from { opacity: 0; transform: translateX(-18px); } }
.pleine { margin-left: calc(-1 * var(--gl)); margin-right: calc(-1 * var(--gr)); }
.barre-collante { position: sticky; bottom: 0; z-index: 2; background: var(--surface); border-top: 1px solid var(--trait); padding: 10px var(--gr) 10px var(--gl); display: flex; gap: 10px; align-items: center; }

.onglets-bas { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--trait); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); z-index: 5; }
.onglets-bas button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px 3px; border-radius: var(--r-2); color: var(--encre-3); font-size: var(--t-11); font-weight: 700; min-width: 0; position: relative; }
.onglets-bas button .ico { width: 23px; height: 23px; }
.onglets-bas button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.onglets-bas button[aria-current="page"] { color: var(--accent); }
.onglets-bas button[aria-current="page"]::before { content: ""; position: absolute; top: -6px; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.onglets-bas button.cote-boutique .rondelle { width: 44px; height: 30px; border-radius: 15px 15px 15px 4px; background: var(--c2); color: var(--sur-bandeau); display: grid; place-items: center; }
.onglets-bas button.cote-boutique .rondelle .ico { width: 20px; height: 20px; }
.onglets-bas button.cote-boutique[aria-current="page"] { color: var(--c2); }
.onglets-bas button.cote-boutique[aria-current="page"]::before { background: var(--c2); }

/* ---------- calques : feuille du bas, toasts ---------- */
.calques { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.voile { position: absolute; inset: 0; background: var(--voile); opacity: 0; transition: opacity .22s; pointer-events: auto; }
.voile.vu { opacity: 1; }
.feuille { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86%; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-4) var(--r-4) 0 0; box-shadow: var(--ombre-haute); transform: translateY(102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); pointer-events: auto; }
.feuille.vu { transform: none; }
.feuille.grande { height: 86%; }
.feuille-tete { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px var(--gr) 10px var(--gl); position: relative; padding-top: 22px; }
.feuille-tete::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--trait-fort); }
.feuille-tete h2 { flex: 1; font-family: var(--f-titre); font-weight: 800; font-size: var(--t-17); min-width: 0; }
.feuille-fermer { width: 34px; height: 34px; border-radius: 50%; background: var(--creux) !important; display: grid !important; place-items: center; flex: none; }
.feuille-corps { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px var(--gr) 20px var(--gl); display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.feuille-pied { flex: none; display: flex; gap: 10px; padding: 10px var(--gr) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gl); border-top: 1px solid var(--trait); }
.feuille-pied > * { flex: 1; }
.toasts { position: absolute; left: var(--gl); right: var(--gr); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 10px 14px; border-radius: var(--r-2) var(--r-2) var(--r-2) 4px; background: var(--encre); color: var(--fond); font-weight: 600; font-size: var(--t-13); box-shadow: var(--ombre-haute); animation: toast-in .24s cubic-bezier(.2, .8, .2, 1); }
.toast.sort { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast .ico { width: 18px; height: 18px; }
.toast.est-bon .ico { color: var(--bon-doux); } .toast.est-critique .ico { color: var(--critique-doux); } .toast.est-attention .ico { color: var(--attention-doux); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- boutons ---------- */
.btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px !important; border-radius: var(--r-2); font-weight: 700 !important; font-size: var(--t-15); white-space: nowrap; transition: transform .12s, filter .12s; max-width: 100%; }
.btn:active { transform: scale(.97); }
.btn.plein { background: var(--accent) !important; color: var(--sur-accent) !important; }
.btn.doux { background: var(--accent-doux) !important; color: var(--accent) !important; }
.btn.trait { box-shadow: inset 0 0 0 1.5px var(--trait-fort); color: var(--encre) !important; }
.btn.texte { color: var(--accent) !important; padding: 0 4px !important; min-height: 36px; }
.btn.encre { background: var(--encre) !important; color: var(--fond) !important; }
.btn.petit { min-height: 34px; padding: 0 12px !important; font-size: var(--t-13); border-radius: 10px; }
.btn.large { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- section, carte ---------- */
.section { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }
.section h2 { font-family: var(--f-titre); font-stretch: 100%; font-weight: 800; font-size: var(--t-17); letter-spacing: -.005em; }
.section .discret { text-align: right; }
.carte { background: var(--surface); border-radius: var(--r-3); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--ombre); min-width: 0; }
.carte.doux { background: var(--surface-2); box-shadow: none; }
.carte.trait { background: transparent; box-shadow: inset 0 0 0 1.5px var(--trait); }
.carte.famille { background: var(--famille-doux); box-shadow: none; }
.carte-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.carte-tete > div { min-width: 0; }
.carte-tete h3 { font-family: var(--f-titre); font-weight: 800; font-size: var(--t-15); line-height: 1.2; }
.carte-tete p { color: var(--encre-2); font-size: var(--t-13); margin-top: 2px; }
.carte-pied { color: var(--encre-2); font-size: var(--t-13); border-top: 1px solid var(--trait); padding-top: 10px; }

/* ---------- tuiles chiffre ---------- */
.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tuiles.col-1 { grid-template-columns: minmax(0, 1fr); } .tuiles.col-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tuile { position: relative; background: var(--surface); border-radius: var(--r-3) var(--r-3) var(--r-3) var(--r-1); padding: 12px 12px 10px; display: flex !important; flex-direction: column; gap: 4px; min-width: 0; box-shadow: var(--ombre); overflow: hidden; text-align: left; }
.tuile-label { font-size: var(--t-13); font-weight: 600; color: var(--encre-2); line-height: 1.2; display: flex; align-items: center; gap: 6px; }
.tuile-label i { width: 8px; height: 8px; border-radius: 2px; background: var(--teinte, var(--c1)); flex: none; }
.tuile-valeur { font-size: var(--t-30); line-height: 1.02; white-space: nowrap; }
.tuiles.col-3 .tuile-valeur { font-size: var(--t-22); }
.tuile-bas { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 20px; font-size: var(--t-11); color: var(--encre-2); position: relative; z-index: 1; }
.tuile .mini { position: absolute; right: 0; bottom: 0; width: 62%; height: 34px; opacity: .9; pointer-events: none; }
.tuile.pleine-teinte { background: var(--teinte); color: var(--sur-accent); box-shadow: none; }
.tuile.pleine-teinte .tuile-label, .tuile.pleine-teinte .tuile-bas { color: inherit; opacity: .9; }
.tuile.est-bon .tuile-valeur { color: var(--bon); } .tuile.est-critique .tuile-valeur { color: var(--critique); } .tuile.est-attention .tuile-valeur { color: var(--attention); }
.ecart { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 4px; border-radius: 6px; font-weight: 800; font-size: var(--t-11); font-variant-numeric: tabular-nums; background: var(--neutre-doux); color: var(--neutre); white-space: nowrap; }
.ecart .ico { width: 12px; height: 12px; stroke-width: 3; }
.ecart.est-bon { background: var(--bon-doux); color: var(--bon); } .ecart.est-critique { background: var(--critique-doux); color: var(--critique); }

/* ---------- pastille d'état ---------- */
.pastille { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 99px; font-size: var(--t-11); font-weight: 800; letter-spacing: .01em; white-space: nowrap; background: var(--neutre-doux); color: var(--neutre); }
.pastille svg { width: 10px; height: 10px; flex: none; fill: currentColor; }
.pastille.est-bon { background: var(--bon-doux); color: var(--bon); } .pastille.est-attention { background: var(--attention-doux); color: var(--attention); } .pastille.est-critique { background: var(--critique-doux); color: var(--critique); } .pastille.est-info { background: var(--accent-doux); color: var(--accent); }

/* ---------- lignes libellé / valeur ---------- */
.lignes { display: flex; flex-direction: column; }
.ligne { display: flex !important; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--trait); min-width: 0; width: 100%; }
.lignes > .ligne:last-child { border-bottom: 0; padding-bottom: 0; } .lignes > .ligne:first-child { padding-top: 0; }
.ligne-g { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ligne-g b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-g small { color: var(--encre-2); font-size: var(--t-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-d { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ligne-d small { font-weight: 500; color: var(--encre-2); font-size: var(--t-11); }
.ligne .ico-rond { width: 36px; height: 36px; border-radius: 12px 12px 12px 4px; background: var(--teinte-doux, var(--creux)); color: var(--teinte, var(--encre-2)); display: grid; place-items: center; flex: none; }
.ligne .chevron { color: var(--encre-3); width: 16px; height: 16px; flex: none; }
.est-bon-texte { color: var(--bon); } .est-critique-texte { color: var(--critique); } .est-attention-texte { color: var(--attention); }

/* ---------- sous-onglets et puces ---------- */
.onglets { display: flex; gap: 4px; background: var(--creux); border-radius: var(--r-2); padding: 3px; overflow-x: auto; scrollbar-width: none; }
.onglets::-webkit-scrollbar, .puces::-webkit-scrollbar { display: none; }
.onglets button { flex: 1 0 auto; height: 34px; padding: 0 12px; border-radius: 9px; font-weight: 700; font-size: var(--t-13); color: var(--encre-2); white-space: nowrap; text-align: center; }
.onglets button[aria-selected="true"] { background: var(--surface); color: var(--encre); box-shadow: var(--ombre); }
.onglets button em { font-style: normal; margin-left: 5px; padding: 0 5px; border-radius: 6px; background: var(--famille); color: var(--sur-accent); font-size: var(--t-11); }
.puces { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 1px; margin: -1px; }
.puces button { flex: none; height: 32px; padding: 0 12px; border-radius: 99px; font-weight: 600; font-size: var(--t-13); color: var(--encre-2); box-shadow: inset 0 0 0 1.5px var(--trait-fort); white-space: nowrap; }
.puces button[aria-pressed="true"] { background: var(--encre); color: var(--fond); box-shadow: none; }

/* ---------- tableau ---------- */
.tableau-defile { overflow-x: auto; border-radius: var(--r-2); box-shadow: inset 0 0 0 1px var(--trait); -webkit-overflow-scrolling: touch; }
.tableau-defile table { border-collapse: collapse; width: 100%; font-size: var(--t-13); font-variant-numeric: tabular-nums; }
.tableau-defile th { font-family: var(--f-titre); font-stretch: 108%; font-size: var(--t-11); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--encre-2); background: var(--surface-2); white-space: nowrap; }
.tableau-defile th, .tableau-defile td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.tableau-defile th:first-child, .tableau-defile td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); box-shadow: 1px 0 0 var(--trait); max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tableau-defile th:first-child { background: var(--surface-2); }
.tableau-defile tr:last-child td { border-bottom: 0; }
.tableau-defile tr[data-clic] { cursor: pointer; }
.tableau-cartes { display: flex; flex-direction: column; gap: 10px; }
.tableau-carte { background: var(--surface); border-radius: var(--r-2); padding: 12px; box-shadow: var(--ombre); display: flex !important; flex-direction: column; gap: 8px; width: 100%; }
.tableau-carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; }
.tableau-carte-tete > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tableau-carte dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.tableau-carte dt { font-size: var(--t-11); color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tableau-carte dd { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- progression, jauge ---------- */
.progres { display: flex; flex-direction: column; gap: 6px; }
.progres-tete { display: flex; justify-content: space-between; gap: 8px; font-size: var(--t-13); font-weight: 600; }
.progres-tete span:last-child { font-variant-numeric: tabular-nums; font-weight: 800; }
.progres-piste { position: relative; height: 10px; border-radius: 5px; background: var(--creux); }
.progres-piste i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--teinte, var(--accent)); min-width: 4px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.progres-piste b { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--encre); }
.progres-note { font-size: var(--t-11); color: var(--encre-2); }
.jauge { display: flex; flex-direction: column; align-items: center; gap: 0; }
.jauge svg { width: 100%; max-width: 240px; height: auto; display: block; }
.jauge-val { font-size: var(--t-30); margin-top: -34px; } .jauge-lab { font-size: var(--t-13); color: var(--encre-2); text-align: center; }

/* ---------- graphiques ---------- */
.graph { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.graph svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.graph text { font-family: var(--f-texte); font-size: 10.5px; fill: var(--encre-2); font-variant-numeric: tabular-nums; }
.graph .grille { stroke: var(--trait); stroke-width: 1; }
.graph .seuil { stroke: var(--encre); stroke-width: 1.5; stroke-dasharray: 2 4; stroke-linecap: round; }
.graph .seuil-txt { fill: var(--encre); font-weight: 700; }
.graph .curseur { stroke: var(--encre-3); stroke-width: 1; }
.repere { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: var(--t-13); min-height: 22px; }
.repere > b { font-family: var(--f-titre); font-stretch: 108%; font-size: var(--t-11); letter-spacing: .05em; text-transform: uppercase; color: var(--encre-2); }
.repere span { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.repere span i, .legende i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--t-13); color: var(--encre-2); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende b { color: var(--encre); font-variant-numeric: tabular-nums; }
.barres-h { display: flex; flex-direction: column; gap: 10px; }
.barre-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; font-size: var(--t-13); }
.barre-h > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.barre-h > b { font-variant-numeric: tabular-nums; }
.barre-h > b small { font-weight: 500; color: var(--encre-2); margin-left: 4px; }
.barre-h > div { grid-column: 1 / -1; height: 10px; border-radius: 3px 5px 5px 3px; background: var(--creux); position: relative; }
.barre-h > div i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px 5px 5px 3px; min-width: 3px; }
.barre-h > div u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--encre); }
.repartition { display: flex; height: 16px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--surface); }
.repartition i { min-width: 3px; }
.anneau { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; align-items: center; }
.anneau svg { width: 124px; height: 124px; }
.anneau .legende { flex-direction: column; gap: 6px; }
.anneau .legende span { justify-content: space-between; } .anneau .legende span > em { font-style: normal; display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entonnoir { display: flex; flex-direction: column; gap: 4px; }
.entonnoir-etape { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; }
.entonnoir-etape > span { font-size: var(--t-13); font-weight: 600; } .entonnoir-etape > b { font-size: var(--t-17); }
.entonnoir-etape > div { grid-column: 1 / -1; height: 22px; background: var(--creux); border-radius: 4px 8px 8px 4px; position: relative; overflow: hidden; }
.entonnoir-etape > div i { position: absolute; left: 0; top: 0; bottom: 0; min-width: 6px; border-radius: 4px 8px 8px 4px; background: var(--teinte, var(--c1)); }
.entonnoir-passage { font-size: var(--t-11); color: var(--encre-2); padding: 1px 0 3px 10px; border-left: 2px dotted var(--trait-fort); margin-left: 8px; }
.entonnoir-passage b { color: var(--encre); font-variant-numeric: tabular-nums; }

/* ---------- messages, événements, bannière ---------- */
.bulle { max-width: 84%; padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: var(--creux); align-self: flex-start; font-size: var(--t-15); line-height: 1.35; }
.bulle.de-cliente { align-self: flex-end; background: var(--c2); color: var(--sur-bandeau); border-radius: 16px 16px 4px 16px; }
.fil { display: flex; flex-direction: column; gap: 6px; }
.banniere { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r-2) var(--r-2) var(--r-2) var(--r-1); background: var(--accent-doux); color: var(--encre); font-size: var(--t-13); }
.banniere .ico { color: var(--accent); margin-top: 1px; }
.banniere b { display: block; font-size: var(--t-15); }
.banniere.est-bon { background: var(--bon-doux); } .banniere.est-bon .ico { color: var(--bon); }
.banniere.est-attention { background: var(--attention-doux); } .banniere.est-attention .ico { color: var(--attention); }
.banniere.est-critique { background: var(--critique-doux); } .banniere.est-critique .ico { color: var(--critique); }

/* ---------- champs ---------- */
.champ { display: flex; flex-direction: column; gap: 5px; font-size: var(--t-13); font-weight: 600; color: var(--encre-2); }
.champ input, .champ select, .champ textarea { font: inherit; font-size: 1rem; font-weight: 500; color: var(--encre); background: var(--surface-2); border: 1.5px solid var(--trait-fort); border-radius: var(--r-2); padding: 10px 12px; width: 100%; min-width: 0; }
.champ textarea { min-height: 84px; resize: vertical; }
.bascule { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; font-weight: 600; }
.bascule i { width: 46px; height: 28px; border-radius: 14px; background: var(--trait-fort); position: relative; flex: none; transition: background .18s; }
.bascule i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); transition: transform .18s; }
.bascule[aria-checked="true"] i { background: var(--bon); } .bascule[aria-checked="true"] i::after { transform: translateX(18px); }

/* ---------- squelette, vide, bientôt, erreur ---------- */
.squelette { display: flex; flex-direction: column; gap: 10px; }
.squelette i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--creux) 25%, var(--surface-2) 50%, var(--creux) 75%); background-size: 200% 100%; animation: brille 1.3s linear infinite; }
.squelette i.bloc { height: 84px; border-radius: var(--r-3); } .squelette i.court { width: 45%; } .squelette i.moyen { width: 72%; }
.squelette .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@keyframes brille { to { background-position: -200% 0; } }
.vide { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px 18px; border-radius: var(--r-3) var(--r-3) var(--r-3) var(--r-1); background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--trait); }
.vide .ico-rond { width: 46px; height: 46px; border-radius: 15px 15px 15px 5px; background: var(--famille-doux); color: var(--famille); display: grid; place-items: center; }
.vide .ico-rond .ico { width: 24px; height: 24px; }
.vide h3 { font-family: var(--f-titre); font-weight: 800; font-size: var(--t-17); } .vide p { color: var(--encre-2); font-size: var(--t-13); max-width: 34ch; }
.vide.erreur .ico-rond { background: var(--critique-doux); color: var(--critique); }
.vide code { font-size: var(--t-11); background: var(--creux); padding: 6px 8px; border-radius: 6px; max-width: 100%; overflow-wrap: anywhere; display: block; }
.bientot-liste { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-13); color: var(--encre-2); }
.bientot-liste li { display: flex; gap: 8px; align-items: baseline; } .bientot-liste li::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--famille); flex: none; transform: translateY(-1px); }

/* ---------- panneau « Tout l'outil » ---------- */
.tout-groupe { display: flex; flex-direction: column; gap: 8px; }
.tout-groupe > .etiquette { color: var(--famille); display: flex; align-items: center; gap: 6px; }
.tout-groupe > .etiquette::before { content: ""; width: 14px; height: 4px; border-radius: 2px; background: var(--famille); }
.tout-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tout-grille button { display: flex; align-items: center; gap: 9px; padding: 10px; min-height: 52px; border-radius: 14px 14px 14px 4px; background: var(--famille-doux); font-weight: 700; font-size: var(--t-13); line-height: 1.15; min-width: 0; }
.tout-grille button .ico { color: var(--famille); width: 22px; height: 22px; }
.tout-grille button span { min-width: 0; overflow-wrap: anywhere; }
.tout-grille button[aria-current="page"] { background: var(--famille); color: var(--sur-accent); } .tout-grille button[aria-current="page"] .ico { color: inherit; }
.tout-grille button.pas-pret { background: transparent; box-shadow: inset 0 0 0 1.5px var(--trait); color: var(--encre-2); }
.fam-pilotage { --famille: var(--c1); --famille-doux: var(--c1-doux); } .fam-offre { --famille: var(--c4); --famille-doux: var(--c4-doux); } .fam-pixel { --famille: var(--c5); --famille-doux: var(--c5-doux); }
.fam-clientes { --famille: var(--c3); --famille-doux: var(--c3-doux); } .fam-boutique { --famille: var(--c2); --famille-doux: var(--c2-doux); } .fam-plus { --famille: var(--encre-2); --famille-doux: var(--creux); }
.t-c1 { --teinte: var(--c1); --teinte-doux: var(--c1-doux); } .t-c2 { --teinte: var(--c2); --teinte-doux: var(--c2-doux); } .t-c3 { --teinte: var(--c3); --teinte-doux: var(--c3-doux); }
.t-c4 { --teinte: var(--c4); --teinte-doux: var(--c4-doux); } .t-c5 { --teinte: var(--c5); --teinte-doux: var(--c5-doux); } .t-c6 { --teinte: var(--c6); --teinte-doux: var(--c6-doux); }
.t-bon { --teinte: var(--bon); --teinte-doux: var(--bon-doux); } .t-critique { --teinte: var(--critique); --teinte-doux: var(--critique-doux); } .t-attention { --teinte: var(--attention); --teinte-doux: var(--attention-doux); } .t-encre { --teinte: var(--encre); --teinte-doux: var(--creux); }

@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .app *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
}

.attente { padding: 24px var(--gr) 24px var(--gl); color: var(--encre-2); }

/* ---------- retouches après relecture des captures ---------- */
.boutique-btn .nom { font-stretch: 82%; }
.periode button { padding: 0 9px; }
.graph text { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }

/* ================= tour 2 : annonce « Nouvelle vente » (dans les calques, jamais en position fixe) ================= */
.annonce-vente { position: absolute; left: var(--gl); right: var(--gr); top: calc(env(safe-area-inset-top, 0px) + 8px); pointer-events: auto; animation: annonce-in .34s cubic-bezier(.2, .9, .2, 1); }
.annonce-vente.sort { opacity: 0; transform: translateY(-14px); transition: opacity .22s, transform .22s; }
.annonce-vente button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 9px 14px 9px 10px !important; border-radius: var(--r-3); background: var(--surface) !important; color: var(--encre) !important; box-shadow: var(--ombre-haute), inset 0 0 0 1.5px var(--bon); }
.annonce-ico { width: 38px; height: 38px; border-radius: 50%; background: var(--bon-doux); color: var(--bon); display: grid; place-items: center; flex: none; }
.annonce-ico .ico { width: 20px; height: 20px; }
.annonce-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.annonce-txt b { font-family: var(--f-titre); font-weight: 800; font-size: var(--t-15); }
.annonce-txt small { font-size: var(--t-13); color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.annonce-montant { font-family: var(--f-titre); font-weight: 800; font-size: var(--t-17); color: var(--bon); flex: none; }
@keyframes annonce-in { from { opacity: 0; transform: translateY(-18px); } }

/* ================= tour 2 : coque ================= */
/* le sélecteur de période disparaît sur les écrans qui ne changent pas avec la période (sa place reste, rien ne saute) */
.periode[data-off="1"] { visibility: hidden; opacity: 0; pointer-events: none; }

/* ================= v2 : coque réelle (remplace la démo) ================= */
[hidden] { display: none !important; }
.bandeau-fil > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actu-btn { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px 0 8px !important; border-radius: 99px; background: var(--bandeau-creux) !important; color: var(--sur-bandeau-2) !important; white-space: nowrap; flex: none; font-size: .625rem !important; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; transition: color .2s; }
.actu-btn .ico { width: 13px; height: 13px; }
.actu-btn:hover { color: var(--sur-bandeau) !important; }
.lien-ancien { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--encre-2); font-size: var(--t-13); font-weight: 600; text-decoration: none; }
.lien-ancien .ico { width: 14px; height: 14px; }
.lien-ancien:hover { color: var(--accent); text-decoration: underline; }
.ancienne { padding: 0 var(--gr) 28px var(--gl); display: flex; }
.tout-grille button small.ancien { font-size: var(--t-11); color: var(--encre-3); font-weight: 600; white-space: nowrap; margin-left: auto; }
.tuile-valeur.sans-donnee { font-family: var(--f-texte); font-stretch: 100%; font-weight: 600; font-size: var(--t-15); letter-spacing: 0; color: var(--encre-2); }

/* rail des écrans (visible dès 1024 px) : mêmes boutons que la feuille « Tout », en une colonne */
.rail-marque { font-family: var(--f-titre); font-stretch: 122%; font-weight: 900; font-size: 1.7rem; letter-spacing: -.02em; line-height: 1; }
.rail-marque small { display: block; font-family: var(--f-texte); font-stretch: 100%; font-weight: 600; font-size: var(--t-13); letter-spacing: 0; color: var(--encre-2); margin-top: 6px; }
.rail .tout-groupe { gap: 4px; }
.rail .tout-grille { grid-template-columns: 1fr; gap: 2px; }
.rail .tout-grille button { min-height: 34px; padding: 5px 9px; background: transparent; border-radius: 9px; box-shadow: none; }
.rail .tout-grille button .ico { width: 18px; height: 18px; }
.rail .tout-grille button:hover { background: var(--famille-doux); }
.rail .tout-grille button[aria-current="page"] { background: var(--famille); color: var(--sur-accent); }
.rail .tout-grille button.pas-pret { box-shadow: none; }

/* tablette : le contenu garde une largeur de lecture et se centre */
@media (min-width: 700px) {
  .tel { --gl: 28px; --gr: 28px; }
  .bandeau, .ecran-tete, .sous-onglets, .ecran-corps, .ancienne { padding-left: max(var(--gl), calc((100cqw - 760px) / 2)); padding-right: max(var(--gr), calc((100cqw - 760px) / 2)); }
  .ecran-corps.sans-marge { padding-left: 0; padding-right: 0; }
}
/* ordinateur : liste des écrans à gauche, contenu en grille de 1 à 3 colonnes (déclarée par l'écran : bureau.colonnes) */
@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: 264px minmax(0, 1fr); }
  .rail { display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 24px 14px 24px 22px; border-right: 1px solid var(--trait); background: var(--fond); }
  .onglets-bas { display: none; }
  .bandeau, .ecran-tete, .sous-onglets, .ecran-corps, .ancienne { padding-left: max(var(--gl), calc((100cqw - 1280px) / 2)); padding-right: max(var(--gr), calc((100cqw - 1280px) / 2)); }
  .ecran-corps.sans-marge { padding-left: 0; padding-right: 0; }
  .ecran-tete { padding-top: 26px; padding-bottom: 6px; }
  .ecran-corps { padding-top: 18px; padding-bottom: 40px; }
  .ecran-corps:not(.sans-marge) { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 20px; align-items: start; }
  .ecran-corps:not(.sans-marge) > * { grid-column: 1 / -1; }
  .ecran-corps:not(.sans-marge) > .carte:not(.large), .ecran-corps:not(.sans-marge) > .demi { grid-column: auto; }
  .ecran-corps .pleine { margin-left: 0; margin-right: 0; }
  .tuiles { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
  .tuiles .tuile-valeur { font-size: var(--t-30); }
}
@container app (max-width: 999px) {
  .ecran-corps.cols-3:not(.sans-marge) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 01/12/2026 : feuille « Choisir des dates » (bandeau, tous les écrans à chiffres) */
.dates-feuille { display: flex; flex-direction: column; gap: 14px; }
.dates-raccourcis { display: flex; flex-wrap: wrap; gap: 8px; }
.dates-feuille .dates-raccourcis button.dates-raccourci { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid rgba(127,127,140,.55); font-weight: 700; font-size: var(--t-13); background: transparent; color: inherit; cursor: pointer; }
.dates-feuille .dates-raccourcis button.dates-raccourci:hover { background: var(--creux, rgba(127,127,127,.12)); }
.dates-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .dates-champs { grid-template-columns: 1fr; } }

/* 01/12/2026 : finition téléphone (cibles tactiles 40 px, barre de période sur sa propre ligne) */
@media (max-width: 699px) {
  .bandeau-barre { flex-wrap: wrap; row-gap: 6px; padding-bottom: 10px; }
  .bandeau-barre .boutique-btn { order: 1; flex: 1 1 0; }
  .bandeau-barre .rond-btn { order: 2; }
  .bandeau-barre .periode { order: 3; flex: 1 0 100%; justify-content: space-between; }
  .bandeau-barre .periode[data-off="1"] { display: none; }
  .periode button { flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 6px; }
  .rond-btn { width: 40px; height: 40px; }
  .actu-btn { position: relative; }
  .actu-btn::after { content: ''; position: absolute; left: -6px; right: -6px; top: -9px; bottom: -9px; }
  .onglets button { height: 40px; }
  .btn.petit { min-height: 40px; }
  .btn.texte { min-height: 40px; }
}
@media (max-width: 699px) {
  .periode button { text-align: center; }
  .puces button { height: 40px; }
  .dates-feuille .dates-raccourcis button.dates-raccourci { height: 40px; }
  button.ligne { min-height: 40px; }
  .feuille-fermer { width: 40px; height: 40px; }
}
@media (max-width: 699px) {
  html .e-creas .vue button, html .e-bibliotheque .vue button { height: 40px; }
  html .e-kpi .hm-ligne { min-height: 40px; }
  .e-bibliotheque .lien-ext, .e-nouvelle-boutique .nb-tech summary, .e-sara .sa-det summary, .e-nouvelle-boutique .nb-hero-retour { min-height: 40px; }
}
