/* Démo « Zéro devis oublié » — charte Gearline (Sora / Manrope, encre, bleu électrique, menthe, nuage, ardoise) */
:root {
  --encre: #111318;
  --encre-2: #1B1E26;
  --encre-3: #262A35;
  --bleu: #3B5BFF;
  --bleu-fonce: #2A45E0;
  --bleu-pale: #E8ECFF;
  --menthe: #2EE6A6;
  --menthe-pale: #D9FBEE;
  --menthe-texte: #0B6B4A;
  --nuage: #F1F3F8;
  --gris: #9AA1B2;
  --ardoise: #5C6374;
  --ligne: #E2E5EE;
  --blanc: #FFFFFF;
  --rouge: #B42318;
  --rouge-pale: #FDECEA;
  --titres: 'Sora', Arial, sans-serif;
  --texte: 'Manrope', Arial, sans-serif;
  --tableur: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --rayon: 0.85rem;
  --ombre: 0 1px 2px rgba(17, 19, 24, .06), 0 6px 20px rgba(17, 19, 24, .06);
  --ombre-forte: 0 18px 50px rgba(17, 19, 24, .22);
  --duree: 1;
}

* { box-sizing: border-box; }
html { font-size: clamp(12.5px, calc(0.42vw + 0.62vh + 2px), 17.5px); }
body.presentation { }
html.presentation { font-size: clamp(14px, calc(0.5vw + 0.78vh + 2px), 20.5px); }
html, body { height: 100%; margin: 0; }
body { font-family: var(--texte); color: var(--encre); background: var(--nuage); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
h2, h3 { font-family: var(--titres); font-weight: 600; margin: 0; letter-spacing: -0.015em; }
[hidden] { display: none !important; }
svg { display: block; }

.app { height: 100vh; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 0.6rem; padding: 0.6rem 0.75rem 0.75rem; }

/* ---------- En-tête ---------- */
.entete { display: flex; align-items: center; gap: 1rem; min-height: 2.9rem; padding: 0 0.25rem; }
.logo { height: 1.75rem; width: auto; flex: none; }
.titre-pack { display: flex; flex-direction: column; line-height: 1.15; padding-left: 1rem; border-left: 1px solid var(--ligne); }
.sur-titre { font-size: 0.72rem; color: var(--ardoise); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.pack { font-family: var(--titres); font-weight: 600; font-size: 1.08rem; white-space: nowrap; }
.badge-fictif { font-size: 0.74rem; font-weight: 600; color: var(--ardoise); background: var(--blanc); border: 1px dashed #C5CAD6; padding: 0.22rem 0.6rem; border-radius: 99px; white-space: nowrap; }
.onglets { margin-left: auto; display: flex; background: #E3E6EF; padding: 0.2rem; border-radius: 99px; }
.onglets button { border: 0; background: transparent; padding: 0.42rem 1rem; border-radius: 99px; font-weight: 600; font-size: 0.9rem; color: var(--ardoise); white-space: nowrap; }
.onglets button.actif { background: var(--blanc); color: var(--encre); box-shadow: 0 1px 3px rgba(17,19,24,.12); }
.actions-entete { display: flex; gap: 0.35rem; align-items: center; }
.btn-discret { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid transparent; background: transparent; padding: 0.42rem 0.65rem; border-radius: 0.6rem; font-weight: 600; font-size: 0.86rem; color: var(--ardoise); white-space: nowrap; }
.btn-discret:hover { background: var(--blanc); border-color: var(--ligne); color: var(--encre); }
.btn-discret svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icone-seule { padding: 0.42rem; }

/* ---------- Machine à remonter le temps ---------- */
.machine { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: stretch; gap: 1rem; background: var(--encre); color: var(--blanc); border-radius: 1rem; padding: 0.65rem 0.8rem; box-shadow: var(--ombre); }
.horloge { display: flex; align-items: center; gap: 0.8rem; padding-right: 1rem; border-right: 1px solid var(--encre-3); min-width: 17.5rem; }
.horloge-icone { width: 3.2rem; height: 3.35rem; border-radius: 0.6rem; background: var(--blanc); color: var(--encre); display: flex; flex-direction: column; overflow: hidden; flex: none; box-shadow: 0 2px 0 var(--menthe); }
.horloge-mois { background: var(--bleu); color: var(--blanc); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; text-align: center; padding: 0.12rem 0; letter-spacing: .05em; }
.horloge-num { flex: 1; display: grid; place-items: center; font-family: var(--titres); font-weight: 700; font-size: 1.55rem; line-height: 1; }
.horloge-date { font-family: var(--titres); font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.horloge-date #h-jour { text-transform: capitalize; }
.horloge-heure { display: flex; align-items: center; gap: 0.4rem; color: var(--gris); font-size: 0.86rem; margin-top: 0.15rem; white-space: nowrap; }
.horloge-heure #h-heure { color: var(--blanc); font-variant-numeric: tabular-nums; font-weight: 600; }
.point-direct { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--menthe); box-shadow: 0 0 0 0 rgba(46,230,166,.6); animation: pouls 2s infinite; }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(46,230,166,.55); } 70% { box-shadow: 0 0 0 0.5rem rgba(46,230,166,0); } 100% { box-shadow: 0 0 0 0 rgba(46,230,166,0); } }
.horloge.tourne .horloge-num, .horloge.tourne .horloge-date { animation: tourne calc(.45s * var(--duree)) ease; }
@keyframes tourne { 0% { transform: translateY(-35%); opacity: 0; } 100% { transform: none; opacity: 1; } }

.boutons-temps { display: flex; align-items: center; gap: 0.45rem; padding-right: 1rem; border-right: 1px solid var(--encre-3); }
.libelle-temps { font-size: 0.72rem; color: var(--gris); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; width: 4.6rem; line-height: 1.2; }
.btn-temps { border: 0; border-radius: 0.65rem; padding: 0.7rem 1rem; font-weight: 700; font-size: 0.95rem; background: var(--bleu); color: var(--blanc); white-space: nowrap; transition: transform .12s, background .15s; }
.btn-temps:hover:not(:disabled) { background: var(--bleu-fonce); transform: translateY(-1px); }
.btn-temps:active:not(:disabled) { transform: translateY(1px); }
.btn-temps-fort { background: var(--menthe); color: var(--encre); }
.btn-temps-fort:hover:not(:disabled) { background: #22D394; }
.btn-temps:disabled { opacity: .45; }

.frise-boite { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.3rem; }
.frise-legende { display: flex; gap: 0.9rem; font-size: 0.72rem; color: var(--gris); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.frise-legende .leg { display: inline-flex; align-items: center; gap: 0.3rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
.leg i { width: 0.55rem; height: 0.55rem; border-radius: 50%; display: inline-block; }
.leg-prevu { border: 1.5px solid var(--bleu); background: transparent; }
.leg-envoye { background: var(--menthe); }
.frise { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)); gap: 0.18rem; }
.jour { position: relative; border-radius: 0.45rem; background: var(--encre-2); padding: 0.22rem 0 0.28rem; text-align: center; min-width: 0; transition: background .2s; }
.jour .js { display: block; font-size: 0.62rem; color: var(--gris); text-transform: uppercase; font-weight: 600; letter-spacing: .02em; }
.jour .jn { display: block; font-family: var(--titres); font-weight: 600; font-size: 0.86rem; line-height: 1.25; }
.jour .jp { display: flex; justify-content: center; gap: 2px; height: 0.45rem; margin-top: 0.12rem; }
.jour .jp i { width: 0.36rem; height: 0.36rem; border-radius: 50%; border: 1.3px solid var(--bleu); }
.jour .jp i.ok { background: var(--menthe); border-color: var(--menthe); }
.jour .jp b { font-size: 0.58rem; line-height: 0.45rem; color: var(--gris); font-weight: 700; }
.jour.weekend { background: transparent; }
.jour.weekend .jn { color: var(--gris); }
.jour.ferie::after { content: 'férié'; position: absolute; top: -0.42rem; left: 50%; transform: translateX(-50%); font-size: 0.5rem; background: var(--encre-3); color: var(--gris); padding: 0 0.2rem; border-radius: 0.2rem; }
.jour.passe { opacity: .72; }
.jour.aujourdhui { background: var(--blanc); color: var(--encre); opacity: 1; box-shadow: 0 0 0 2px var(--menthe); }
.jour.aujourdhui .js { color: var(--ardoise); }
.jour.aujourdhui .jn { color: var(--encre); }
.jour.cible { box-shadow: 0 0 0 1.5px var(--menthe) inset; }

/* ---------- Indicateurs ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem; }
.kpi { background: var(--blanc); border-radius: var(--rayon); padding: 0.55rem 0.85rem; box-shadow: var(--ombre); display: flex; flex-direction: column; justify-content: center; min-width: 0; position: relative; overflow: hidden; }
.kpi-lib { font-size: 0.78rem; color: var(--ardoise); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val { font-family: var(--titres); font-weight: 700; font-size: 1.55rem; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-sous { font-size: 0.74rem; color: var(--ardoise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sous b { color: var(--encre); background: var(--menthe-pale); border-radius: 0.3rem; padding: 0 0.25rem; font-weight: 700; }
.kpi.fort { background: var(--encre); color: var(--blanc); }
.kpi.fort .kpi-lib, .kpi.fort .kpi-sous { color: var(--gris); }
.kpi.fort .kpi-sous b { background: var(--menthe); color: var(--encre); }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.kpi.k-bleu::before { background: var(--bleu); }
.kpi.k-menthe::before { background: var(--menthe); }
.kpi.bouge .kpi-val { animation: bouge calc(.6s * var(--duree)) ease; }
@keyframes bouge { 0% { transform: scale(1); } 35% { transform: scale(1.12); color: var(--bleu); } 100% { transform: scale(1); } }
.kpi.fort.bouge .kpi-val { animation-name: bouge-fort; }
@keyframes bouge-fort { 0% { transform: scale(1); } 35% { transform: scale(1.12); color: var(--menthe); } 100% { transform: scale(1); } }

/* ---------- Panneaux ---------- */
.vue { min-height: 0; display: grid; gap: 0.6rem; }
.vue-demo { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); }
.panneau { background: var(--blanc); border-radius: 1rem; box-shadow: var(--ombre); padding: 0.75rem 0.85rem; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.panneau-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.55rem; }
.panneau-tete h2 { font-size: 1.12rem; }
.etiquette { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ardoise); margin-bottom: 0.15rem; }
.etiquette-auto { color: var(--bleu); }
.pastille-on { width: 1.5rem; height: 0.8rem; border-radius: 99px; background: var(--encre); position: relative; display: inline-block; }
.pastille-on::after { content: ''; position: absolute; right: 0.12rem; top: 0.12rem; width: 0.56rem; height: 0.56rem; border-radius: 50%; background: var(--menthe); }
.aide-tete { margin: 0; font-size: 0.8rem; color: var(--ardoise); text-align: right; }

/* ---------- Tableur ---------- */
.tableur { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid #DADCE0; border-radius: 0.55rem; overflow: hidden; font-family: var(--tableur); background: #fff; }
.tableur-barre { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.6rem; background: #F9FBFD; border-bottom: 1px solid #E1E3E6; }
.tableur-icone svg { width: 1.45rem; height: 1.45rem; }
.tableur-titre { min-width: 0; }
.tableur-nom { font-size: 0.92rem; color: #1F1F1F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tableur-menus { display: flex; gap: 0.75rem; font-size: 0.74rem; color: #444746; }
.tableur-sync { margin-left: auto; font-size: 0.72rem; color: #5F6368; white-space: nowrap; transition: color .2s; }
.tableur-sync.actif { color: #1E8E3E; }
.tableur-fx { display: flex; align-items: center; border-bottom: 1px solid #E1E3E6; font-size: 0.8rem; color: #3C4043; height: 1.7rem; }
.fx-ref { width: 4.4rem; padding: 0 0.5rem; border-right: 1px solid #E1E3E6; height: 100%; display: flex; align-items: center; color: #5F6368; }
.fx { padding: 0 0.6rem; color: #9AA0A6; font-style: italic; font-family: Georgia, serif; }
.fx-valeur { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tableur-grille { flex: 1; min-height: 0; overflow: auto; position: relative; }
.grille { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; font-size: 0.82rem; color: #202124; }
.grille th, .grille td { border-right: 1px solid #E2E3E3; border-bottom: 1px solid #E2E3E3; height: 1.78rem; padding: 0 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grille thead th { position: sticky; z-index: 2; background: #F8F9FA; color: #5F6368; font-weight: 400; text-align: center; font-size: 0.74rem; }
.grille thead tr.lettres th { top: 0; height: 1.3rem; }
.grille thead tr.entetes th { top: 1.3rem; background: #EEF1F6; color: #202124; font-weight: 700; text-align: left; font-size: 0.78rem; }
.grille .num { width: 1.9rem; background: #F8F9FA; color: #5F6368; text-align: center; font-size: 0.72rem; padding: 0; }
.grille thead tr.entetes th.num { background: #F8F9FA; color: #5F6368; font-weight: 400; text-align: center; }
.grille tbody tr { cursor: pointer; transition: background .25s; }
.grille tbody tr:hover td:not(.num) { background: #F3F6FC; }
.grille tbody tr.choisi td:not(.num) { background: #E8F0FE; }
.grille tbody tr.choisi td.num { background: #D3E3FD; color: #0B57D0; font-weight: 700; }
.grille td.droite { text-align: right; font-variant-numeric: tabular-nums; }
.grille td.date { font-variant-numeric: tabular-nums; color: #3C4043; }
.c-id { width: 4.9rem; } .c-client { width: 9.4rem; } .c-mt { width: 5.3rem; } .c-date { width: 5.6rem; } .c-statut { width: 7.5rem; } .c-rel { width: 4.6rem; } .c-proch { width: 9rem; }
.puce { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.08rem 0.5rem; border-radius: 99px; font-size: 0.76rem; font-weight: 500; line-height: 1.35; }
.puce::after { content: ''; width: 0; height: 0; border-left: 0.22rem solid transparent; border-right: 0.22rem solid transparent; border-top: 0.26rem solid currentColor; opacity: .55; margin-left: 0.1rem; }
.puce-titre { margin-left: 0.35rem; vertical-align: middle; }
.st-envoye { background: #E8EAED; color: #3C4043; }
.st-discussion { background: #FFE5A0; color: #6B4E00; }
.st-signe { background: #D4EDBC; color: #11734B; }
.st-perdu { background: #FFCFC9; color: #B10202; }
.st-termine { background: #BFE1F6; color: #0A53A8; }
.points { display: inline-flex; gap: 0.18rem; vertical-align: middle; margin-right: 0.3rem; }
.points i { width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 1.5px solid #9AA0A6; }
.points i.ok { background: var(--bleu); border-color: var(--bleu); }
.points i.ko { border-color: #D93025; background: repeating-linear-gradient(45deg, transparent 0 2px, rgba(217,48,37,.35) 2px 3px); }
.rel-num { color: #5F6368; font-size: 0.76rem; }
.proch { color: #3C4043; }
.proch.arret { color: #B10202; }
.proch.fini { color: #5F6368; font-style: italic; }
.proch.avis { color: #0A53A8; }
.proch strong { font-weight: 700; color: #202124; }
.grille tr.flash td:not(.num) { animation: flash calc(1.4s * var(--duree)) ease; }
@keyframes flash { 0%, 30% { background: #D2DCFF; } 100% { background: transparent; } }
.grille tr.flash-ok td:not(.num) { animation: flash-ok calc(1.6s * var(--duree)) ease; }
@keyframes flash-ok { 0%, 35% { background: #C8F5E0; } 100% { background: transparent; } }
.grille tr.flash-ko td:not(.num) { animation: flash-ko calc(1.6s * var(--duree)) ease; }
@keyframes flash-ko { 0%, 35% { background: #FFE1DD; } 100% { background: transparent; } }
.grille tr.nouvelle td:not(.num) { animation: nouvelle calc(1.8s * var(--duree)) ease; }
@keyframes nouvelle { 0% { background: var(--menthe-pale); transform: translateY(-4px); opacity: 0; } 25% { opacity: 1; transform: none; background: var(--menthe-pale); } 100% { background: transparent; } }
.grille tr.vedette td.c-client-td::before { content: '★'; color: #F9AB00; margin-right: 0.2rem; font-size: 0.72rem; }
.grille td .tampon { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #B10202; border: 1.5px solid #B10202; border-radius: 0.25rem; padding: 0 0.25rem; transform: rotate(-4deg); animation: tampon calc(.5s * var(--duree)) cubic-bezier(.3,1.6,.5,1); }
@keyframes tampon { 0% { transform: scale(2.2) rotate(-12deg); opacity: 0; } 100% { transform: scale(1) rotate(-4deg); opacity: 1; } }
.tableur-onglets { display: flex; gap: 0.15rem; padding: 0.25rem 0.5rem; background: #F9FBFD; border-top: 1px solid #E1E3E6; font-size: 0.76rem; }
.onglet-feuille { padding: 0.18rem 0.75rem; border-radius: 0.35rem; color: #444746; }
.onglet-feuille.actif { background: #E1E9F7; color: #0B57D0; font-weight: 700; }

/* ---------- Fiche devis ---------- */
.fiche { position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.85rem; background: var(--blanc); border-radius: 0.9rem; box-shadow: var(--ombre-forte), 0 0 0 1px var(--ligne); padding: 0.8rem 0.95rem 0.85rem; z-index: 5; animation: monte calc(.28s * var(--duree)) ease; }
@keyframes monte { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.fiche-tete { display: flex; align-items: flex-start; gap: 0.75rem; }
.fiche-titre { font-family: var(--titres); font-weight: 600; font-size: 1.05rem; }
.fiche-sous { font-size: 0.82rem; color: var(--ardoise); margin-top: 0.1rem; }
.fiche-montant { margin-left: auto; text-align: right; font-family: var(--titres); font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.fiche-montant small { display: block; font-family: var(--texte); font-weight: 500; font-size: 0.72rem; color: var(--ardoise); }
.fermer { border: 0; background: var(--nuage); width: 1.9rem; height: 1.9rem; border-radius: 50%; font-size: 1.2rem; line-height: 1; color: var(--ardoise); flex: none; display: grid; place-items: center; }
.fermer:hover { background: #E3E6EF; color: var(--encre); }
.fermer.petit { width: 1.6rem; height: 1.6rem; font-size: 1rem; }
.etapes { display: flex; align-items: stretch; gap: 0; margin: 0.75rem 0 0.7rem; }
.etape { flex: 1; min-width: 0; position: relative; padding-top: 1.35rem; text-align: center; }
.etape::before { content: ''; position: absolute; top: 0.52rem; left: -50%; right: 50%; height: 2px; background: var(--ligne); }
.etape:first-child::before { display: none; }
.etape .rond { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--blanc); border: 2px solid #C9CEDA; z-index: 1; display: grid; place-items: center; font-size: 0.62rem; font-weight: 800; color: var(--blanc); }
.etape .e-lib { font-weight: 700; font-size: 0.8rem; white-space: nowrap; }
.etape .e-date { font-size: 0.72rem; color: var(--ardoise); white-space: nowrap; }
.etape .e-etat { font-size: 0.68rem; font-weight: 700; margin-top: 0.1rem; white-space: nowrap; }
.etape.fait .rond { background: var(--bleu); border-color: var(--bleu); }
.etape.fait::before { background: var(--bleu); }
.etape.fait .e-etat { color: var(--bleu-fonce); }
.etape.prevu .rond { border-color: var(--bleu); border-style: dashed; }
.etape.prevu .e-etat { color: var(--ardoise); }
.etape.annule .rond { background: var(--rouge); border-color: var(--rouge); }
.etape.annule .e-lib, .etape.annule .e-date { text-decoration: line-through; color: #A3A9B6; }
.etape.annule .e-etat { color: var(--rouge); }
.etape.ok .rond { background: var(--menthe); border-color: var(--menthe); color: var(--encre); }
.etape.ok .e-etat { color: var(--menthe-texte); }
.etape.ko .rond { background: var(--encre); border-color: var(--encre); }
.etape.ko .e-etat { color: var(--rouge); }
.etape.anim .rond { animation: rond calc(.6s * var(--duree)) cubic-bezier(.3,1.6,.5,1); }
@keyframes rond { 0% { transform: translateX(-50%) scale(.2); } 100% { transform: translateX(-50%) scale(1); } }
.fiche-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.fiche-actions .pousse-droite { margin-left: auto; }
.fiche-actions .info { font-size: 0.82rem; color: var(--ardoise); }
.motifs { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.motifs .puce-motif { border: 1px solid var(--ligne); background: var(--blanc); border-radius: 99px; padding: 0.35rem 0.75rem; font-size: 0.82rem; font-weight: 600; }
.motifs .puce-motif:hover { border-color: var(--rouge); color: var(--rouge); }

/* ---------- Boutons ---------- */
.btn { border: 1px solid transparent; border-radius: 0.65rem; padding: 0.55rem 0.95rem; font-weight: 700; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; transition: background .15s, transform .12s; }
.btn:active { transform: translateY(1px); }
.btn-primaire { background: var(--bleu); color: var(--blanc); }
.btn-primaire:hover { background: var(--bleu-fonce); }
.btn-secondaire { background: var(--blanc); border-color: #CBD0DC; color: var(--encre); }
.btn-secondaire:hover { border-color: var(--bleu); color: var(--bleu-fonce); }
.btn-oui { background: var(--menthe); color: var(--encre); }
.btn-oui:hover { background: #22D394; }
.btn-non { background: var(--blanc); border-color: #E7B4AE; color: var(--rouge); }
.btn-non:hover { background: var(--rouge-pale); }
.btn-encre { background: var(--encre); color: var(--blanc); }
.btn-encre:hover { background: var(--encre-3); }
.btn-lien { background: transparent; color: var(--ardoise); padding-left: 0.4rem; padding-right: 0.4rem; }
.btn-lien:hover { color: var(--encre); }
.btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Fil des emails ---------- */
.compteur { display: flex; align-items: center; gap: 0.45rem; background: var(--encre); color: var(--blanc); border-radius: 0.75rem; padding: 0.35rem 0.7rem 0.35rem 0.6rem; }
.compteur-num { font-family: var(--titres); font-weight: 700; font-size: 1.45rem; min-width: 1.4rem; text-align: center; color: var(--menthe); font-variant-numeric: tabular-nums; }
.compteur-txt { font-size: 0.68rem; line-height: 1.2; color: var(--gris); }
.compteur.bouge .compteur-num { animation: bouge-fort calc(.6s * var(--duree)) ease; }
.expediteur { font-size: 0.78rem; color: var(--ardoise); margin: -0.15rem 0 0.55rem; }
.expediteur strong { color: var(--encre); font-weight: 600; }
.fil { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -0.35rem; padding: 0 0.35rem 0.4rem; scroll-behavior: smooth; }
.fil-jour { position: sticky; top: 0; z-index: 2; background: linear-gradient(var(--blanc) 75%, rgba(255,255,255,0)); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ardoise); padding: 0.3rem 0 0.35rem; }
.fil-jour.hist { color: #8D93A3; }
.carte { border: 1px solid var(--ligne); border-radius: 0.75rem; padding: 0.55rem 0.7rem; margin-bottom: 0.45rem; background: var(--blanc); cursor: pointer; transition: border-color .15s, box-shadow .15s; position: relative; }
.carte:hover { border-color: #C3C9D8; box-shadow: var(--ombre); }
.carte-l1 { display: flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; color: var(--ardoise); }
.carte-l1 .heure { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.carte-a { font-weight: 700; font-size: 0.86rem; margin-top: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-objet { font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-apercu { font-size: 0.78rem; color: var(--ardoise); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 0.1rem; line-height: 1.4; }
.carte.hist { background: #FBFBFD; }
.carte.hist .carte-a, .carte.hist .carte-objet { color: #3A3F4C; }
.carte.compacte { padding: 0.4rem 0.7rem; }
.carte.compacte .carte-a { margin-top: 0.15rem; font-size: 0.8rem; font-weight: 600; }
.carte.nouveau { animation: arrivee calc(.75s * var(--duree)) cubic-bezier(.2,.9,.3,1.2); }
@keyframes arrivee { 0% { transform: translateY(-18px) scale(.96); opacity: 0; box-shadow: 0 0 0 4px rgba(59,91,255,.35); } 60% { opacity: 1; } 100% { transform: none; box-shadow: 0 0 0 0 rgba(59,91,255,0); } }
.carte.nouveau::after { content: 'Nouveau'; position: absolute; top: -0.45rem; right: 0.7rem; background: var(--bleu); color: var(--blanc); font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 0.08rem 0.4rem; border-radius: 99px; animation: disparait 6s forwards; }
@keyframes disparait { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
.badge { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; font-weight: 800; padding: 0.12rem 0.45rem; border-radius: 0.35rem; letter-spacing: .02em; white-space: nowrap; }
.b-j3 { background: var(--bleu-pale); color: var(--bleu-fonce); }
.b-j7 { background: var(--bleu); color: var(--blanc); }
.b-j14 { background: var(--encre); color: var(--blanc); }
.b-avis { background: var(--menthe); color: var(--encre); }
.b-rappel { background: var(--menthe-pale); color: var(--menthe-texte); }
.b-reponse { background: #FFF1CC; color: #6B4E00; }
.b-stop { background: var(--rouge-pale); color: var(--rouge); }
.b-ok { background: #D4EDBC; color: #11734B; }
.b-info { background: var(--nuage); color: var(--ardoise); }
.carte.reponse { border-left: 3px solid #F2B705; background: #FFFCF2; }
.carte.systeme { border-style: dashed; background: #FAFBFD; }
.carte.systeme.stop { border: 1px solid #F3C3BD; border-left: 3px solid var(--rouge); background: #FFF8F7; }
.carte.systeme.go { border: 1px solid #BDEFD9; border-left: 3px solid var(--menthe); background: #F5FEFA; }
.carte .sys-txt { font-size: 0.82rem; margin-top: 0.25rem; line-height: 1.4; }
.carte .sys-txt s { color: #A3A9B6; }
.annul { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.3rem; }
.annul span { font-size: 0.72rem; font-weight: 700; color: var(--rouge); background: var(--blanc); border: 1px solid #F3C3BD; padding: 0.05rem 0.4rem; border-radius: 0.3rem; text-decoration: line-through; }
.fil-vide { text-align: center; color: var(--ardoise); font-size: 0.85rem; padding: 1rem; }
.prochaine { border-radius: 0.75rem; background: var(--nuage); padding: 0.5rem 0.7rem; margin-bottom: 0.55rem; font-size: 0.8rem; color: var(--ardoise); display: flex; gap: 0.5rem; align-items: center; }
.prochaine strong { color: var(--encre); }
.prochaine .pastille-on { flex: none; }

/* ---------- Envols ---------- */
.envols { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.envol { position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.4rem; border-radius: 0.3rem; background: var(--bleu); box-shadow: 0 6px 16px rgba(59,91,255,.45); display: grid; place-items: center; }
.envol svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.envol.avis { background: var(--menthe); box-shadow: 0 6px 16px rgba(46,230,166,.5); }
.envol.avis svg { stroke: var(--encre); }

/* ---------- Résultats & ROI ---------- */
.vue-resultats { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.res-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.res-tuile { border-radius: 0.85rem; background: var(--nuage); padding: 0.75rem 0.9rem; min-width: 0; }
.res-tuile .rt-lib { font-size: 0.8rem; color: var(--ardoise); font-weight: 600; }
.res-tuile .rt-val { font-family: var(--titres); font-weight: 700; font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; }
.res-tuile .rt-sous { font-size: 0.76rem; color: var(--ardoise); }
.res-tuile.fort { background: var(--encre); color: var(--blanc); }
.res-tuile.fort .rt-lib, .res-tuile.fort .rt-sous { color: var(--gris); }
.res-tuile.fort .rt-val { color: var(--menthe); }
.res-sauves { margin-top: 0.85rem; min-height: 0; overflow: auto; }
.res-sauves h3 { font-size: 0.98rem; }
.note { font-size: 0.8rem; color: var(--ardoise); margin: 0.2rem 0 0.5rem; line-height: 1.45; }
.table-simple { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.table-simple th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ardoise); font-weight: 700; padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--ligne); }
.table-simple td { padding: 0.42rem 0.4rem; border-bottom: 1px solid var(--ligne); }
.table-simple td.droite, .table-simple th.droite { text-align: right; font-variant-numeric: tabular-nums; }
.table-simple tr.total td { font-weight: 800; border-bottom: 0; }
.roi { overflow: auto; }
.etiquette-roi { color: var(--bleu); }
.roi-corps { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0.9rem; }
.roi-entrees { display: flex; flex-direction: column; gap: 0.55rem; }
.champ { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; font-weight: 600; color: var(--ardoise); }
.champ input[type=number], .champ input:not([type]), .champ input[type=password] { font: inherit; font-size: 1rem; font-weight: 700; color: var(--encre); border: 1px solid #CBD0DC; border-radius: 0.55rem; padding: 0.45rem 0.6rem; width: 100%; background: var(--blanc); }
.champ input:focus { outline: 2px solid var(--bleu); outline-offset: 0; border-color: var(--bleu); }
.avec-unite { position: relative; display: block; }
.avec-unite i { position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ardoise); font-weight: 700; }
.avec-unite input { padding-right: 2rem !important; }
.champ-curseur { background: var(--nuage); border-radius: 0.7rem; padding: 0.6rem 0.7rem; }
.curseur-tete { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.curseur-tete strong { color: var(--encre); font-family: var(--titres); font-size: 1rem; white-space: nowrap; }
.hypothese { font-style: normal; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: #FFE5A0; color: #6B4E00; padding: 0.05rem 0.35rem; border-radius: 0.3rem; margin-left: 0.25rem; }
input[type=range] { width: 100%; accent-color: var(--bleu); margin: 0.45rem 0 0.1rem; }
.curseur-graduations { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--ardoise); font-weight: 500; }
.roi-sorties { display: flex; flex-direction: column; gap: 0.5rem; }
.roi-grand { background: var(--encre); color: var(--blanc); border-radius: 0.9rem; padding: 0.85rem 1rem; }
.roi-grand .rg-lib { font-size: 0.8rem; color: var(--gris); font-weight: 600; }
.roi-grand .rg-val { font-family: var(--titres); font-weight: 700; font-size: 2.1rem; color: var(--menthe); letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; }
.roi-grand .rg-sous { font-size: 0.78rem; color: var(--gris); }
.roi-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; padding: 0.42rem 0.1rem; border-bottom: 1px solid var(--ligne); font-size: 0.86rem; }
.roi-ligne span { color: var(--ardoise); }
.roi-ligne strong { font-family: var(--titres); font-weight: 600; white-space: nowrap; }
.roi-ligne.fort strong { color: var(--bleu-fonce); font-size: 1.05rem; }
.roi-mention { font-size: 0.76rem; color: var(--ardoise); margin: 0.75rem 0 0; padding: 0.55rem 0.7rem; border-radius: 0.6rem; background: #FFF8E6; border: 1px solid #F5DFA3; line-height: 1.45; }
.roi-mention strong { color: var(--encre); }
.roi-explication { font-size: 0.74rem; color: var(--ardoise); line-height: 1.45; }

/* ---------- Modales ---------- */
.modale { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; }
.modale-fond { position: absolute; inset: 0; background: rgba(17,19,24,.45); backdrop-filter: blur(2px); animation: fondu .2s; }
@keyframes fondu { from { opacity: 0; } }
.modale-boite { position: relative; background: var(--blanc); border-radius: 1rem; box-shadow: var(--ombre-forte); width: min(44rem, 94vw); max-height: 92vh; overflow: auto; padding: 1.2rem 1.4rem; animation: monte .25s ease; }
.modale-boite > .fermer { position: absolute; top: 0.8rem; right: 0.8rem; }
.boite-petite { width: min(28rem, 94vw); }
.boite-petite h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.boite-petite p { color: var(--ardoise); font-size: 0.9rem; }
.ligne-boutons { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.ligne-boutons.fin { justify-content: flex-end; margin-top: 1rem; }
.boite-reglages h2 { font-size: 1.2rem; margin-bottom: 0.6rem; }
fieldset { border: 1px solid var(--ligne); border-radius: 0.8rem; padding: 0.7rem 0.9rem 0.85rem; margin: 0 0 0.7rem; }
legend { font-family: var(--titres); font-weight: 600; font-size: 0.92rem; padding: 0 0.35rem; }
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.6rem; }
.choix-segment { display: inline-flex; background: var(--nuage); padding: 0.2rem; border-radius: 0.6rem; }
.choix-segment button { border: 0; background: transparent; padding: 0.4rem 0.9rem; border-radius: 0.45rem; font-weight: 600; font-size: 0.86rem; color: var(--ardoise); }
.choix-segment button.actif { background: var(--blanc); color: var(--encre); box-shadow: 0 1px 3px rgba(17,19,24,.12); }
.raccourcis { margin: 0; }
code { font-size: 0.85em; background: var(--nuage); padding: 0.05rem 0.3rem; border-radius: 0.25rem; }

/* Lecteur d'email */
.boite-email { width: min(46rem, 94vw); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.em-barre { display: flex; align-items: center; gap: 0.5rem; padding: 0.85rem 3.3rem 0.85rem 1.3rem; background: var(--nuage); border-bottom: 1px solid var(--ligne); font-size: 0.8rem; color: var(--ardoise); }
.em-barre strong { color: var(--encre); }
.em-entete { padding: 1rem 1.4rem 0.6rem; border-bottom: 1px solid var(--ligne); }
.em-objet { font-family: var(--titres); font-weight: 600; font-size: 1.25rem; margin: 0 0 0.7rem; letter-spacing: -0.01em; }
.em-ligne { display: flex; gap: 0.6rem; align-items: center; font-size: 0.86rem; margin-bottom: 0.25rem; }
.em-avatar { width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--encre); color: var(--blanc); display: grid; place-items: center; font-family: var(--titres); font-weight: 700; font-size: 0.9rem; flex: none; }
.em-avatar.client { background: #F2B705; color: var(--encre); }
.em-de strong { font-weight: 700; }
.em-de span, .em-a { color: var(--ardoise); }
.em-date { margin-left: auto; color: var(--ardoise); font-size: 0.8rem; white-space: nowrap; }
.em-corps { padding: 1.1rem 1.4rem 1.3rem; font-family: Arial, Helvetica, sans-serif; font-size: 0.98rem; line-height: 1.6; white-space: pre-wrap; color: #202124; overflow: auto; max-height: 52vh; }
.em-corps .lien-avis { display: inline-block; background: var(--menthe); color: var(--encre); font-weight: 700; text-decoration: none; padding: 0.15rem 0.6rem; border-radius: 0.4rem; font-family: var(--texte); }
.em-pied { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.4rem; border-top: 1px solid var(--ligne); background: #FAFBFD; font-size: 0.8rem; color: var(--ardoise); flex-wrap: wrap; }
.em-pied .espace { flex: 1; }

/* ---------- Déroulé guidé ---------- */
.guide { position: fixed; z-index: 85; left: 50%; bottom: 1.2rem; transform: translateX(-50%); width: min(34rem, 92vw); background: var(--encre); color: var(--blanc); border-radius: 1rem; padding: 0.9rem 1.1rem 0.85rem; box-shadow: 0 20px 60px rgba(17,19,24,.45), 0 0 0 1px rgba(255,255,255,.06); animation: monte .3s ease; }
.guide.haut { bottom: auto; top: 4.2rem; }
.guide.gauche { left: 1.2rem; transform: none; }
.guide.droite { left: auto; right: 1.2rem; transform: none; }
.guide-tete { display: flex; align-items: center; gap: 0.6rem; }
.guide-num { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--menthe); color: var(--encre); display: grid; place-items: center; font-family: var(--titres); font-weight: 700; font-size: 1rem; }
.guide-progression { font-size: 0.74rem; color: var(--gris); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.guide .fermer { margin-left: auto; background: var(--encre-3); color: var(--gris); }
.guide h3 { font-size: 1.15rem; margin: 0.55rem 0 0.3rem; }
.guide p { margin: 0 0 0.75rem; color: #D6DAE3; font-size: 0.92rem; line-height: 1.5; }
.guide-pied { display: flex; align-items: center; gap: 0.45rem; }
.guide-pied .espace { flex: 1; }
.guide .btn-lien { color: var(--gris); }
.guide .btn-lien:hover { color: var(--blanc); }
.guide .btn-secondaire { background: transparent; color: var(--blanc); border-color: #3A3F4C; }
.guide .btn-secondaire:hover { border-color: var(--menthe); color: var(--menthe); }
.projecteur { position: relative; z-index: 4; box-shadow: 0 0 0 3px var(--menthe), 0 0 0 9px rgba(46,230,166,.25) !important; border-radius: 0.8rem; animation: projecteur 1.6s ease-in-out infinite; }
@keyframes projecteur { 50% { box-shadow: 0 0 0 3px var(--menthe), 0 0 0 14px rgba(46,230,166,.08) !important; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 90; bottom: 1.1rem; right: 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-end; pointer-events: none; }
body.guide-ouvert .toasts { bottom: auto; top: 4.4rem; }
.toast { background: var(--encre); color: var(--blanc); border-radius: 0.75rem; padding: 0.6rem 0.9rem; font-size: 0.88rem; font-weight: 600; box-shadow: var(--ombre-forte); display: flex; align-items: center; gap: 0.55rem; max-width: 26rem; animation: toast-in .3s ease; }
.toast.sort { animation: toast-out .35s ease forwards; }
.toast .pt { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--menthe); flex: none; }
.toast.stop .pt { background: #FF6B5E; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-8px); opacity: 0; } }

.filigrane { position: fixed; right: 0.9rem; bottom: 0.25rem; font-size: 0.64rem; color: #A3A9B6; pointer-events: none; z-index: 1; letter-spacing: .02em; }

/* ---------- Mode présentation ---------- */
html.presentation .masquer-presentation { display: none !important; }
html.presentation .aide-tete { display: none; }
html.presentation .badge-fictif { font-size: 0.68rem; }
html.presentation .sur-titre { display: none; }
html.presentation .tableur-menus { display: none; }
html.presentation .tableur-fx { display: none; }
html.presentation .grille .c-date-col { display: none; }

/* ---------- Adaptations ---------- */
@media (max-width: 1180px) {
  .badge-fictif { display: none; }
  .actions-entete .btn-discret span { display: none; }
  .horloge { min-width: 0; }
  .libelle-temps { display: none; }
}
@media (max-width: 1000px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .machine { grid-template-columns: 1fr; }
  .horloge, .boutons-temps { border-right: 0; padding-right: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vue-demo, .vue-resultats, .roi-corps { grid-template-columns: 1fr; }
  .panneau { min-height: 26rem; }
  .titre-pack { display: none; }
}
@media (max-height: 640px) and (min-width: 1001px) {
  .frise-legende { display: none; }
  .kpi { padding-top: 0.4rem; padding-bottom: 0.4rem; }
  .kpi-val { font-size: 1.35rem; }
}

/* ---------- Impression du calcul de ROI ---------- */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { overflow: visible; background: #fff; }
  .app { height: auto; display: block; padding: 0; }
  .machine, .kpis, .vue-demo, .onglets, .actions-entete, .filigrane, .toasts, .guide, .res-gauche, #btn-imprimer-roi { display: none !important; }
  .vue-resultats { display: block !important; }
  .panneau { box-shadow: none; border: 1px solid var(--ligne); }
  .roi-grand { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
