/* Appli des commerciaux Sweet & Soda : styles (reprise des maquettes validées). */
:root {
  --bleu: #3B3BFF;
  --indigo: #2A00BA;
  --indigo-presse: #1F0090;
  --marine: #081F3C;
  --gris: #33475F;
  --gris-clair: #5B6B80;
  --lavande: #F3F0FF;
  --champ: #F5F6FA;
  --trait: #A9B3C3;
  --trait-doux: #E1E5EC;
  /* statuts (couleurs choisies par le client le 2 novembre 2026) : à visiter violet, à prospecter noir, client actif vert, perdu rouge */
  --st-a_visiter: #6F37FF;
  --st-visite: #16181D;
  --st-interesse: #DD6B00;
  --st-client: #1F9D55;
  --st-perdu: #E3202B;
  --position: #0A84FF;
  --ombre-1: 0 1px 2px rgba(8, 31, 60, .12), 0 4px 12px rgba(8, 31, 60, .1);
  --ombre-2: 0 2px 6px rgba(8, 31, 60, .1), 0 14px 36px rgba(8, 31, 60, .18);
  --police: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
  --onglets: calc(64px + var(--bas));
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--police); color: var(--marine); background: #fff; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; font-synthesis: none; }
::selection { background: rgba(42, 0, 186, .2); }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
input { caret-color: var(--indigo); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }

.app { position: relative; width: 100%; height: 100%; overflow: hidden; overflow: clip; background: #fff; }
.ecran { position: absolute; inset: 0; visibility: hidden; }
.ecran.visible { visibility: visible; }

.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

/* statuts : couleur + forme (anneau vide, demi-disque, étoile, coche, croix) */
.pastille { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--c); }
.pastille svg { width: 11px; height: 11px; }
.st-nom { white-space: nowrap; }
.st-a_visiter { --c: var(--st-a_visiter); }
.st-visite { --c: var(--st-visite); }
.st-interesse { --c: var(--st-interesse); }
.st-client { --c: var(--st-client); }
.st-perdu { --c: var(--st-perdu); }
.pastille.st-a_visiter { background: #fff; box-shadow: inset 0 0 0 2.5px var(--c); }
.pastille.st-visite { background: linear-gradient(90deg, var(--c) 50%, #fff 50%); box-shadow: inset 0 0 0 2px var(--c); }

.carte { position: absolute; inset: 0; background: #E6E8EF; }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { display: none; }
.attribution { position: absolute; z-index: 5; left: 14px; font-size: 10px; font-weight: 500; color: var(--gris); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; pointer-events: none; }
.voile-haut { position: absolute; z-index: 1; inset: 0 0 auto; height: calc(var(--haut) + 120px); background: linear-gradient(rgba(255, 255, 255, .92), rgba(255, 255, 255, .6) 45%, rgba(255, 255, 255, 0)); pointer-events: none; }

.marqueur { cursor: pointer; }
.epingle { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid #fff; background: var(--c); box-shadow: 0 1px 2px rgba(8, 31, 60, .35), 0 3px 8px rgba(8, 31, 60, .22); }
.epingle svg { width: 14px; height: 14px; }
.epingle.st-a_visiter { background: #fff; box-shadow: inset 0 0 0 3px var(--c), 0 1px 2px rgba(8, 31, 60, .35), 0 3px 8px rgba(8, 31, 60, .22); }
.epingle.st-visite { background: linear-gradient(90deg, var(--c) 50%, #fff 50%); box-shadow: inset 0 0 0 2.5px var(--c), 0 1px 2px rgba(8, 31, 60, .35), 0 3px 8px rgba(8, 31, 60, .22); }
.epingle.st-perdu { width: 21px; height: 21px; border-width: 2px; }
.epingle.st-perdu svg { width: 11px; height: 11px; }
.epingle.change { animation: changement .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes changement { 35% { transform: scale(1.5); } }
.goutte { display: block; filter: drop-shadow(0 3px 4px rgba(8, 31, 60, .35)); }
.goutte-corps { fill: var(--c); stroke: #fff; stroke-width: 3; }
.position { width: 20px; height: 20px; border-radius: 50%; background: var(--position); border: 3px solid #fff; box-shadow: 0 0 0 9px rgba(10, 132, 255, .16), 0 2px 6px rgba(8, 31, 60, .35); }

/* ---------- Carte ---------- */
.haut-carte { position: absolute; z-index: 10; top: calc(var(--haut) + 6px); left: 12px; right: 12px; }
.recherche { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 4px 0 9px; background: #fff; border-radius: 16px; box-shadow: var(--ombre-1); }
.recherche > .ic { color: var(--gris); }
.recherche input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 16px; font-weight: 500; outline: none; }
.recherche input::placeholder { color: var(--gris-clair); opacity: 1; }
.bouton-filtres { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--marine); }
.bouton-filtres:active { background: var(--champ); }
.marque { display: block; flex: none; width: 34px; height: 34px; }
.puces-statut { display: flex; gap: 6px; margin: 10px -12px 0; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); }
.puces-statut::-webkit-scrollbar { display: none; }
/* « Préparer une tournée ici », sous les statuts, une fois la carte déplacée ou filtrée */
.preparer-ici { display: flex; align-items: center; gap: 8px; width: fit-content; height: 44px; margin: 2px auto 0; padding: 0 18px 0 14px; border-radius: 22px; background: #fff; color: var(--indigo); box-shadow: var(--ombre-2); font-size: 15px; font-weight: 600; white-space: nowrap; }
.preparer-ici .ic { width: 20px; height: 20px; }
.preparer-ici:active { background: var(--lavande); }
#ecran-carte .haut-carte:has(.preparer-ici:not([hidden])) ~ .envoi { top: calc(var(--haut) + 176px); }
.puce-st { position: relative; flex: none; display: flex; align-items: center; gap: 5px; height: 44px; padding: 0 10px 0 8px; background: #fff; border-radius: 22px; box-shadow: var(--ombre-1); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .18s ease-out, color .18s ease-out; }
/* zone de toucher de 48 px autour des puces, des segments et des liens plus petits */
.puce-st::after, .segment::after, .lien::after, .puce-motif::after { content: ""; position: absolute; inset: -4px 0; }
.puce-st b { font-weight: 600; color: var(--gris); font-variant-numeric: tabular-nums; }
.puce-st[aria-pressed="false"] { background: rgba(255, 255, 255, .72); color: var(--gris-clair); }
.puce-st[aria-pressed="false"] .pastille { opacity: .3; }

.fiche-ici { position: absolute; z-index: 10; left: 12px; right: 12px; bottom: calc(var(--onglets) + 12px); padding: 16px; background: #fff; border-radius: 24px; box-shadow: var(--ombre-2); }
.fiche-ici .attribution { left: 2px; top: -18px; }
.localiser { position: absolute; right: 0; top: -62px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; box-shadow: var(--ombre-1); color: var(--marine); }
.fiche-tete { display: flex; align-items: flex-start; gap: 12px; }
.fiche-tete > div { flex: 1; min-width: 0; }
.fiche-nom { margin: 0; font-size: 19px; line-height: 26px; font-weight: 700; letter-spacing: -.01em; }
.meta { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--gris); }
.meta .sep { color: var(--trait); }
#fiche-meta { flex-wrap: wrap; }
.a-la-ligne { flex-basis: 100%; }
.distance { flex: none; display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px 0 8px; border-radius: 15px; background: #EDEFF4; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.distance .ic { width: 16px; height: 16px; }
.fiche-rappel { display: flex; align-items: center; gap: 8px; margin: 10px 0 14px; font-size: 14px; line-height: 20px; font-weight: 500; }
.fiche-rappel .ic { width: 18px; height: 18px; color: var(--gris); }
.fiche-rappel b { font-weight: 600; }
.fiche-actions { display: flex; gap: 8px; }
.fiche-actions > :first-child { flex: 1; }
.fiche-actions .bouton:not(.carre) { gap: 8px; padding: 0 12px; }
/* ajouter à la tournée du jour : l'icône de la tournée, avec un + (ou une coche quand il y est) */
.bascule-tournee { position: relative; }
.bascule-tournee .signe { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--indigo); color: #fff; box-shadow: 0 0 0 2px #fff; }
.bascule-tournee .signe .ic { width: 12px; height: 12px; stroke-width: 3.2; }
.bascule-tournee[aria-pressed="true"] { background: var(--indigo); color: #fff; box-shadow: none; }
.bascule-tournee[aria-pressed="true"] .signe { background: #fff; color: var(--indigo); box-shadow: 0 0 0 2px var(--indigo); }

.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 18px; border-radius: 16px; font-size: 17px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .18s ease-out, box-shadow .18s ease-out, transform .1s ease-out; }
.bouton:active { transform: translateY(1px); }
.principal { background: var(--indigo); color: #fff; box-shadow: 0 4px 14px rgba(42, 0, 186, .28); }
.principal:active { background: var(--indigo-presse); }
.principal:disabled { background: #E3E6EE; color: var(--gris-clair); box-shadow: none; cursor: default; transform: none; }
.secondaire { background: #fff; color: var(--indigo); box-shadow: inset 0 0 0 2px var(--indigo); }
.carre { width: 52px; padding: 0; background: #fff; color: var(--marine); box-shadow: inset 0 0 0 1.5px var(--trait); }
.petit { height: 44px; padding: 0 14px; border-radius: 12px; font-size: 15px; }

.onglets { position: absolute; z-index: 20; inset: auto 0 0; display: flex; height: var(--onglets); padding: 0 6px var(--bas); background: #fff; box-shadow: 0 -1px 0 var(--trait-doux), 0 -6px 20px rgba(8, 31, 60, .06); }
.app:is([data-ecran="visite"], [data-ecran="connexion"], [data-ecran="fiche"], [data-ecran="prospect"], [data-ecran="preparer"]) .onglets { display: none; }
.onglet { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--gris); }
.onglet-icone { display: grid; place-items: center; width: 60px; height: 32px; border-radius: 16px; transition: background-color .18s ease-out; }
.onglet[aria-current="page"] { color: var(--indigo); }
.onglet[aria-current="page"] .onglet-icone { background: #ECE6FF; }
.onglet-ajouter .onglet-icone { width: 46px; background: var(--indigo); color: #fff; }

/* ---------- Saisie de visite ---------- */
#ecran-visite { display: flex; flex-direction: column; background: #fff; }
#ecran-visite.visible { animation: monter .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes monter { from { opacity: 0; transform: translateY(28px); } }
.tete-visite { display: flex; align-items: center; gap: 6px; padding: calc(var(--haut) + 4px) 16px 6px 6px; }
.fermer { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; }
.tete-visite h1 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -.01em; }
.tete-visite p { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin: 1px 0 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--gris); }
.gps-ok { display: inline-flex; align-items: center; gap: 4px; color: #0E6A37; font-weight: 600; }
.gps-ok .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.formulaire { flex: 1; overflow-y: auto; padding: 2px 16px 14px; }
.bloc { margin: 10px 0 0; padding: 0; border: 0; min-width: 0; }
.bloc:first-child { margin-top: 4px; }
.etiquette { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; padding: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--gris); }
.etiquette small { font-size: 14px; font-weight: 500; }
.grille-resultats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choix { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 12px; border-radius: 14px; background: var(--champ); box-shadow: inset 0 0 0 1.5px var(--trait); font-size: 16px; line-height: 20px; font-weight: 600; text-align: left; transition: background-color .18s ease-out, color .18s ease-out, box-shadow .18s ease-out; }
.choix .ic { width: 22px; height: 22px; color: var(--gris); transition: color .18s ease-out; }
.choix[aria-pressed="true"] { background: var(--indigo); color: #fff; box-shadow: 0 4px 12px rgba(42, 0, 186, .25); }
.choix[aria-pressed="true"] .ic { color: #fff; }
.choix.large { grid-column: 1 / -1; }
.repli { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .18s ease-out; }
.repli.ouvert { grid-template-rows: 1fr; }
.repli > div { overflow: hidden; }
.repli .bloc { margin-top: 12px; }
.ligne-montant { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--champ); box-shadow: inset 0 0 0 1.5px var(--trait); }
.ligne-montant label { font-size: 15px; font-weight: 600; color: var(--gris); }
.champ-montant { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 2px var(--indigo); }
.champ-montant input { width: 116px; border: 0; background: none; font-size: 22px; font-weight: 700; text-align: right; outline: none; font-variant-numeric: tabular-nums; }
.champ-montant span { font-size: 15px; font-weight: 600; color: var(--gris); white-space: nowrap; }
.puces-motif { display: flex; flex-wrap: wrap; gap: 8px; }
.puce-motif { position: relative; height: 48px; padding: 0 16px; border-radius: 24px; background: var(--champ); box-shadow: inset 0 0 0 1.5px var(--trait); font-size: 15px; font-weight: 600; transition: background-color .18s ease-out, color .18s ease-out; }
.puce-motif[aria-pressed="true"] { background: var(--indigo); color: #fff; box-shadow: none; }
.ligne-statut { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.statut-avant { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--gris); }
.ligne-statut > .ic { width: 18px; height: 18px; color: var(--gris); }
.statut-apres { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; }
.lien { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; height: 40px; padding: 0 2px 0 8px; font-size: 15px; font-weight: 600; color: var(--indigo); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.choix-statut { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.choix-statut .puce-motif { display: inline-flex; align-items: center; gap: 7px; }
.champ-note { display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 0 4px 0 14px; border-radius: 14px; background: var(--champ); box-shadow: inset 0 0 0 1.5px var(--trait); }
.champ-note:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--indigo); }
.champ-note textarea { flex: 1; min-width: 0; max-height: 128px; padding: 14px 0; border: 0; background: none; font-size: 16px; line-height: 22px; font-weight: 500; resize: none; outline: none; }
.champ-note textarea::placeholder { color: var(--gris-clair); opacity: 1; }
.micro { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--indigo); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 60px; overflow: hidden; border-radius: 14px; border: 1.5px dashed #8F9AAD; background: var(--champ); font-size: 13px; line-height: 16px; font-weight: 600; text-align: center; }
.photo .ic { width: 22px; height: 22px; color: var(--gris); }
.photo.prise { justify-content: flex-end; padding-bottom: 6px; border: 0; color: #fff; }
.photo.prise img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.photo.prise::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(8, 31, 60, .8)); }
.photo.prise span { position: relative; z-index: 1; }
.ligne-relance { display: flex; gap: 8px; }
.segments { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; border-radius: 14px; background: var(--champ); box-shadow: inset 0 0 0 1.5px var(--trait); }
.segment { position: relative; height: 46px; border-radius: 11px; font-size: 15px; font-weight: 600; transition: background-color .18s ease-out, color .18s ease-out; }
.segment[aria-pressed="true"] { background: var(--indigo); color: #fff; }
.ligne-relance .carre { width: 52px; height: 52px; border-radius: 14px; }
.pied-visite { padding: 10px 16px calc(var(--bas) + 8px); background: #fff; box-shadow: 0 -1px 0 var(--trait-doux); }
.pied-visite .principal { width: 100%; height: 56px; }

/* ---------- Tournée ---------- */
.envoi { position: absolute; z-index: 10; top: calc(var(--haut) + 8px); left: 12px; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 11px; border-radius: 19px; background: #fff; box-shadow: var(--ombre-1); font-size: 14px; font-weight: 600; }
.envoi .ic { width: 18px; height: 18px; color: var(--gris); }
.feuille { position: absolute; z-index: 10; inset: clamp(230px, 46%, 420px) 0 0; padding: 8px 16px calc(var(--onglets) + 12px); overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -2px 10px rgba(8, 31, 60, .08), 0 -12px 40px rgba(8, 31, 60, .12); }
.poignee { width: 40px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: #CDD3DD; }
.tete-tournee { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tete-tournee h1 { margin: 0; font-size: 21px; line-height: 28px; font-weight: 700; letter-spacing: -.01em; }
.tete-tournee p { margin: 1px 0 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--gris); }
.tete-tournee p b { color: var(--marine); font-weight: 700; }
.ligne-progression { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--gris); white-space: nowrap; }
.ligne-progression b { color: var(--marine); font-weight: 700; }
.progression { flex: 1; height: 6px; overflow: hidden; border-radius: 3px; background: #E4E7EE; }
.progression span { display: block; height: 100%; border-radius: 3px; background: var(--indigo); transition: width .3s ease-out; }
.prochain { padding: 14px; border-radius: 20px; background: var(--lavande); box-shadow: inset 0 0 0 1.5px #D8CCFF; }
.prochain-tete { display: flex; align-items: flex-start; gap: 12px; }
.prochain h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 700; }
.prochain .meta { font-size: 14px; line-height: 20px; flex-wrap: wrap; }
.prochain-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.prochain-actions .bouton { gap: 8px; padding: 0 10px; font-size: 16px; }
.faits { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; margin: 0 0 10px; padding: 0 2px; text-align: left; }
.faits .arret-info b { display: block; font-size: 16px; line-height: 22px; font-weight: 600; }
.faits .meta { margin: 0; font-size: 14px; line-height: 20px; }
.faits > .ic { color: var(--gris); }
.liste-arrets { margin: 6px 0 0; padding: 0; list-style: none; }
.arret { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 2px; border-bottom: 1px solid var(--trait-doux); }
.arret-info { flex: 1; min-width: 0; }
.arret-info b { display: block; font-size: 16px; line-height: 22px; font-weight: 600; }
.arret .meta { margin: 0; font-size: 14px; line-height: 20px; }
.arret-dist { font-size: 14px; font-weight: 600; color: var(--gris); font-variant-numeric: tabular-nums; }
.arret > .ic { color: var(--gris); }
.num-arret { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--marine); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.num-arret .ic { width: 17px; height: 17px; stroke-width: 3; }
.num-arret.suivant { background: var(--indigo); color: #fff; box-shadow: none; }
.num-arret.fait { color: var(--st-client); box-shadow: inset 0 0 0 2px var(--st-client); }
.marqueur .num-arret { width: 30px; height: 30px; font-size: 14px; border: 2.5px solid #fff; box-shadow: inset 0 0 0 2px var(--marine), 0 2px 6px rgba(8, 31, 60, .3); }
.marqueur .num-arret.fait { box-shadow: inset 0 0 0 2px var(--st-client), 0 2px 6px rgba(8, 31, 60, .3); }
.marqueur .num-arret.suivant { width: 36px; height: 36px; font-size: 16px; box-shadow: 0 0 0 6px rgba(42, 0, 186, .18), 0 2px 8px rgba(8, 31, 60, .35); }

/* ---------- Connexion ---------- */
#ecran-connexion { display: flex; flex-direction: column; overflow-y: auto; padding: calc(var(--haut) + clamp(16px, 5vh, 44px)) 24px calc(var(--bas) + 18px); background: #fff; }
.connexion { flex: 1; display: flex; flex-direction: column; }
.connexion-marque { margin-bottom: 26px; text-align: center; }
.connexion-marque img { width: 96px; height: 96px; }
.connexion-marque h1 { margin: 14px 0 2px; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.01em; }
.connexion-marque p { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--gris); }
.connexion .bloc { margin-top: 14px; }
.champ-icone { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 5px 0 14px; border-radius: 14px; background: var(--champ); box-shadow: inset 0 0 0 1.5px var(--trait); }
.champ-icone:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--indigo); }
.champ-icone.invalide { box-shadow: inset 0 0 0 2px #B3141F; }
.champ-icone > .ic { width: 20px; height: 20px; color: var(--gris); }
.champ-icone input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 16px; font-weight: 500; outline: none; }
.champ-icone input::placeholder { color: var(--gris-clair); opacity: 1; }
.voir { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--gris); }
.erreur { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; color: #B3141F; }
.erreur .ic { width: 16px; height: 16px; }
.interrupteur { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin-top: 10px; font-size: 16px; font-weight: 600; cursor: pointer; }
.interrupteur input { position: absolute; opacity: 0; pointer-events: none; }
.glissiere { position: relative; flex: none; width: 52px; height: 32px; border-radius: 16px; background: #B9C0CC; transition: background-color .18s ease-out; }
.glissiere::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(8, 31, 60, .3); transition: transform .18s ease-out; }
.interrupteur input:checked + .glissiere { background: var(--indigo); }
.interrupteur input:checked + .glissiere::after { transform: translateX(20px); }
.interrupteur input:focus-visible + .glissiere { outline: 3px solid var(--bleu); outline-offset: 2px; }
.connexion .principal { width: 100%; height: 56px; margin-top: 16px; }
.lien.centre { align-self: center; margin: 8px 0 0; }
.connexion-pied { margin: 0; text-align: center; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--gris); }

/* ---------- Fiche commerce ---------- */
#ecran-fiche, #ecran-prospect { display: flex; flex-direction: column; background: #fff; }
.barre-haut { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--haut) + 2px) 8px 0 4px; }
.retour { display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 12px 0 2px; border-radius: 12px; font-size: 17px; font-weight: 600; color: var(--indigo); }
.bouton-icone { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--marine); }
.bouton-icone:disabled { color: #B9C0CC; cursor: default; }
.defile { flex: 1; overflow-y: auto; padding: 0 16px 16px; }
.fiche-entete h1 { margin: 2px 0 2px; font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.015em; }
.fiche-entete > p { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--gris); }
.fiche-etats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.statut-choix { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--trait); font-size: 16px; font-weight: 600; }
.statut-choix .ic { width: 18px; height: 18px; color: var(--gris); }
.relance-puce { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 4px; font-size: 15px; font-weight: 600; }
.relance-puce .ic { width: 18px; height: 18px; color: var(--gris); }
.fiche-raccourcis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.fiche-raccourcis .bouton { gap: 8px; padding: 0 10px; white-space: normal; line-height: 20px; text-align: center; }
.fiche-raccourcis .large { grid-column: 1 / -1; }
.fiche-raccourcis [aria-pressed="true"] { background: var(--lavande); }
.fiche-section { margin-top: 20px; }
.fiche-section h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 2px; font-size: 17px; line-height: 24px; font-weight: 700; }
.fiche-section h2 small { font-size: 15px; font-weight: 600; color: var(--gris); }
.lignes { margin: 0; padding: 0; list-style: none; }
.lignes li { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--trait-doux); }
.lignes li > .ic { width: 20px; height: 20px; color: var(--gris); }
.lignes span { display: flex; flex-direction: column; align-items: flex-start; font-size: 16px; line-height: 22px; font-weight: 500; }
.lignes small { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--gris); }
.lignes .lien { margin: 0; height: 32px; padding: 0; }
.historique { margin: 0; padding: 0; list-style: none; }
.visite-ligne { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--trait-doux); }
.visite-date { font-size: 15px; line-height: 20px; font-weight: 700; }
.visite-date small { display: block; font-size: 13px; font-weight: 500; color: var(--gris); }
.visite-resultat { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; }
.visite-resultat .ic { width: 20px; height: 20px; color: var(--gris); }
.visite-resultat b { margin-left: auto; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.visite-note { margin: 2px 0 0; font-size: 15px; line-height: 22px; }
.visite-photos { display: flex; gap: 6px; margin-top: 8px; }
.visite-photos img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.visite-ligne.creation { grid-template-columns: 56px 1fr; color: var(--gris); font-size: 14px; border-bottom: 0; }
.vide { margin: 6px 0 0; font-size: 15px; line-height: 22px; color: var(--gris); }

/* ---------- Nouveau prospect ---------- */
.mini-carte { position: relative; height: 148px; margin-top: 2px; overflow: hidden; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--trait-doux); }
.viseur { position: absolute; z-index: 2; left: 50%; top: 50%; margin: -50px 0 0 -20px; pointer-events: none; }
.mini-carte-note { position: absolute; z-index: 2; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 9px; border-radius: 16px; background: #fff; box-shadow: var(--ombre-1); font-size: 13px; font-weight: 600; }
.mini-carte-note .ic { width: 16px; height: 16px; color: var(--gris); }
.segments.deux { grid-template-columns: 1fr 1fr; }
.segments.deux .segment { font-size: 14px; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.deux-colonnes .bloc { margin-top: 0; }
.champ-simple { display: flex; align-items: center; height: 52px; padding: 0 14px; border-radius: 14px; background: var(--champ); box-shadow: inset 0 0 0 1.5px var(--trait); }
.champ-simple:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--indigo); }
.champ-simple input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 16px; font-weight: 500; outline: none; }
.champ-simple input::placeholder { color: var(--gris-clair); opacity: 1; }
.champ-multi { height: auto; min-height: 52px; }
.champ-multi textarea { flex: 1; min-width: 0; max-height: 96px; padding: 14px 0; border: 0; background: none; font-size: 16px; line-height: 22px; font-weight: 500; resize: none; outline: none; }
.champ-multi textarea::placeholder { color: var(--gris-clair); opacity: 1; }

/* ---------- Mes stats ---------- */
#ecran-stats { display: flex; flex-direction: column; background: #fff; }
#ecran-stats .defile { padding: calc(var(--haut) + 8px) 16px calc(var(--onglets) + 12px); }
.tete-stats { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tete-stats h1 { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.015em; }
.tete-stats .segments { flex: none; width: 180px; }
.periode { display: flex; align-items: center; justify-content: space-between; margin: 8px -10px 4px; font-size: 15px; font-weight: 600; }
.indicateur { padding: 10px 0 12px; border-bottom: 1px solid var(--trait-doux); }
.ind-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ind-nom { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.ind-valeur { display: flex; align-items: baseline; gap: 5px; margin: 0; }
.ind-valeur b { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.01em; }
.ind-valeur span { font-size: 15px; font-weight: 600; color: var(--gris); }
.jauge { position: relative; height: 10px; margin: 6px 0 8px; border-radius: 5px; background: #E6E1FB; }
.jauge-rempli { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--indigo); }
.jauge-repere { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--marine); }
.ind-aide { margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--gris); }
.legende-repere { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--gris); }
.legende-repere i { width: 2px; height: 16px; border-radius: 1px; background: var(--marine); }
.graphe-bloc { margin-top: 20px; }
.graphe-bloc h2 { margin: 0 0 6px; font-size: 17px; line-height: 24px; font-weight: 700; }
.colonnes { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 132px; margin-left: 26px; border-bottom: 1px solid #C9CEDA; background: linear-gradient(#E6E8EE, #E6E8EE) 0 0 / 100% 1px no-repeat, linear-gradient(#E6E8EE, #E6E8EE) 0 50% / 100% 1px no-repeat; }
.axe-y { position: absolute; left: -26px; width: 20px; text-align: right; font-size: 12px; line-height: 12px; font-weight: 500; color: var(--gris); font-variant-numeric: tabular-nums; transform: translateY(-50%); }
.colonne { position: relative; display: flex; align-items: flex-end; justify-content: center; outline: none; }
.colonne .barre { width: 22px; border-radius: 4px 4px 0 0; background: #8F80DD; }
.colonne.courante .barre { background: var(--indigo); }
.colonne .valeur { position: absolute; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 700; }
.colonne .bulle { position: absolute; z-index: 3; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 6px 10px; border-radius: 10px; background: var(--marine); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease-out; }
.colonne:hover .bulle, .colonne:focus-visible .bulle { opacity: 1; }
.axe-y + .colonne .bulle { left: 0; transform: none; }
.colonne:last-child .bulle { left: auto; right: 0; transform: none; }
.etiquettes-x { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 6px 0 0 26px; font-size: 13px; font-weight: 600; color: var(--gris); text-align: center; }
.etiquettes-x .courante { color: var(--marine); }
.synchro { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 14px; font-weight: 600; color: #0E6A37; }
.synchro .ic { width: 18px; height: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Ajouter, messages ---------- */
.voile { position: absolute; z-index: 40; inset: 0; background: rgba(8, 31, 60, .38); opacity: 0; pointer-events: none; transition: opacity .2s ease-out; }
.voile.visible { opacity: 1; pointer-events: auto; }
.feuille-ajouter { position: absolute; z-index: 41; left: 8px; right: 8px; bottom: calc(var(--bas) + 8px); padding: 8px; background: #fff; border-radius: 24px; transform: translateY(115%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.feuille-ajouter.visible { transform: none; }
.option-ajout { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 70px; padding: 10px 12px; border-radius: 16px; text-align: left; }
.option-ajout:active { background: var(--champ); }
.icone-ronde { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--lavande); color: var(--indigo); }
.option-ajout b { display: block; font-size: 17px; line-height: 24px; font-weight: 600; }
.option-ajout span { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--gris); }
.annuler { width: 100%; height: 52px; margin-top: 4px; border-radius: 16px; background: var(--champ); font-size: 17px; font-weight: 600; }
.message { position: absolute; z-index: 60; left: 16px; right: 16px; bottom: calc(var(--onglets) + 16px); display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--marine); color: #fff; font-size: 15px; line-height: 20px; font-weight: 600; box-shadow: var(--ombre-2); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .2s ease-out, transform .22s cubic-bezier(.2, .8, .2, 1); }
.message.visible { opacity: 1; transform: none; }
.message .ic { color: #7BE0A6; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- appli réelle : grand écran, recherche, filtres, envois, tournée à préparer, compte ---------- */
body { overflow: hidden; }
.app { height: 100dvh; }
.bouton-filtres { position: relative; }
.badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--indigo); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.resultats { margin-top: 6px; max-height: 312px; overflow-y: auto; padding: 6px; border-radius: 16px; background: #fff; box-shadow: var(--ombre-2); }
.resultat-ligne { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 10px; border-radius: 12px; text-align: left; }
.resultat-ligne:hover, .resultat-ligne:focus-visible { background: var(--champ); }
.resultat-ligne b { display: block; font-size: 16px; line-height: 22px; font-weight: 600; }
.resultat-ligne small { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--gris); }
.aucun { margin: 0; padding: 12px; font-size: 15px; line-height: 22px; color: var(--gris); }
.fiche-vide { position: absolute; z-index: 10; left: 16px; right: 16px; bottom: calc(var(--onglets) + 16px); width: fit-content; margin: 0 auto; padding: 10px 16px; border-radius: 20px; background: #fff; box-shadow: var(--ombre-1); font-size: 14px; line-height: 20px; font-weight: 600; text-align: center; }
#ecran-carte .envoi { top: calc(var(--haut) + 124px); }
.envoi { cursor: pointer; }
.envoi.bloque { color: #B3141F; box-shadow: inset 0 0 0 2px #B3141F, var(--ombre-1); }
.envoi.bloque .ic { color: #B3141F; }

.feuille-bas { position: absolute; z-index: 41; left: 8px; right: 8px; bottom: calc(var(--bas) + 8px); max-height: calc(100% - var(--haut) - 24px); overflow-y: auto; padding: 14px 12px 10px; background: #fff; border-radius: 24px; transform: translateY(115%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.feuille-bas.visible { transform: none; }
.feuille-bas:not(.visible), .feuille-ajouter:not(.visible) { visibility: hidden; transition: transform .22s cubic-bezier(.2, .8, .2, 1), visibility 0s .22s; }
.feuille-bas h2 { margin: 2px 4px 12px; font-size: 19px; line-height: 26px; font-weight: 700; }
.feuille-bas .bloc { margin: 0 4px 14px; }
.liste-deroulante { width: 100%; height: 52px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--champ); box-shadow: inset 0 0 0 1.5px var(--trait); font: inherit; font-size: 16px; font-weight: 500; color: var(--marine); }
.segments.trois { grid-template-columns: .7fr 1fr 1fr; }
.segments.trois .segment { font-size: 14px; }
.actions-bas { display: grid; grid-template-columns: 1fr 1.7fr; gap: 8px; margin: 6px 4px 2px; }

#ecran-preparer { display: flex; flex-direction: column; background: #fff; }
.zone-choisie { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 12px 0; padding: 2px 2px 2px 14px; border-radius: 14px; background: var(--lavande); box-shadow: inset 0 0 0 1.5px #D8CCFF; font-size: 15px; line-height: 20px; font-weight: 600; }
.zone-choisie > .ic { color: var(--indigo); }
.zone-choisie > span { flex: 1; }
.note-zone { margin: 14px 0 0; }
.prep-titre { margin: 18px 0 2px; font-size: 15px; line-height: 22px; font-weight: 700; color: var(--gris); }
.prep-liste { margin: 0; padding: 0; list-style: none; }
.prep-ligne { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 2px; border-bottom: 1px solid var(--trait-doux); text-align: left; }
.prep-ligne .arret-info b { display: block; font-size: 16px; line-height: 22px; font-weight: 600; }
.coche { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; color: #fff; box-shadow: inset 0 0 0 2px var(--trait); transition: background-color .15s ease-out; }
.coche .ic { width: 18px; height: 18px; stroke-width: 3; opacity: 0; }
.prep-ligne[aria-pressed="true"] .coche { background: var(--indigo); box-shadow: none; }
.prep-ligne[aria-pressed="true"] .coche .ic { opacity: 1; }
.vide-bloc { margin: 28px 8px; text-align: center; }
.vide-bloc h2 { margin: 0 0 6px; font-size: 19px; line-height: 26px; font-weight: 700; }
.vide-bloc p { margin: 0 0 16px; font-size: 15px; line-height: 22px; color: var(--gris); }

.compte-pied { display: grid; gap: 10px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--trait-doux); }
.compte-pied p { margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--gris); }
.compte-pied .bouton { width: 100%; }
.note-demo { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--lavande); font-size: 14px; line-height: 20px; font-weight: 500; }
.note-demo b { font-weight: 700; }
.erreur-globale { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: #FDECEE; color: #8E0F19; font-size: 14px; line-height: 20px; font-weight: 600; }
.erreur-globale .ic { width: 18px; height: 18px; margin-top: 1px; }
.champ-date { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo .retirer { position: absolute; z-index: 2; top: 4px; right: 4px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(8, 31, 60, .7); color: #fff; }
.photo .retirer .ic { width: 16px; height: 16px; }
.bloc-edition[hidden] { display: none; }
.champ-texte { width: 100%; min-height: 88px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--champ); box-shadow: inset 0 0 0 1.5px var(--trait); font: inherit; font-size: 16px; line-height: 22px; resize: vertical; outline: none; }
.champ-texte:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--indigo); }
.lien-manager { margin-top: 16px; }

/* ---------- prochaine action, infos pour l'équipe ---------- */
.lien .ic { width: 18px; height: 18px; }
.fiche-info { display: flex; align-items: flex-start; gap: 8px; margin: -6px 0 12px; font-size: 14px; line-height: 20px; font-weight: 500; }
.fiche-info > .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--gris); }
.fiche-info span { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fiche-info small { font-size: 13px; font-weight: 600; color: var(--gris); }
.puces-action { gap: 6px; }
.puces-action .puce-motif { height: 44px; padding: 0 14px; }
.quand-action { margin-top: 10px; }
.champ-heure { gap: 10px; margin-top: 8px; }
.champ-heure .ic { width: 20px; height: 20px; color: var(--gris); }
.champ-heure span { flex: 1; font-size: 15px; font-weight: 600; color: var(--gris); }
.champ-simple.champ-heure input { flex: none; width: 112px; font-weight: 700; text-align: right; }
.action-carte { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; padding: 12px 14px; border-radius: 16px; background: var(--lavande); box-shadow: inset 0 0 0 1.5px #D8CCFF; }
.action-carte > .ic { margin-top: 1px; color: var(--indigo); }
.action-carte b { display: block; font-size: 16px; line-height: 22px; font-weight: 700; }
.action-carte p { margin: 2px 0 0; font-size: 15px; line-height: 22px; }
.action-carte small { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--gris); }
.action-carte.retard { background: #FDECEE; box-shadow: inset 0 0 0 1.5px #F2B8BE; }
.action-carte.retard > .ic { color: #B3141F; }
.action-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.action-boutons .bouton { gap: 6px; }
.action-boutons .ic { width: 20px; height: 20px; }
.aide { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--gris); }
.infos { margin: 0 0 10px; padding: 0; list-style: none; }
.infos li { padding: 10px 0; border-bottom: 1px solid var(--trait-doux); }
.infos p { margin: 0; font-size: 16px; line-height: 23px; }
.infos small { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--gris); }
.infos .lien { height: 32px; font-size: 14px; }
.ajout-info { display: flex; align-items: flex-end; gap: 8px; }
.ajout-info .champ-note { flex: 1; min-width: 0; }
.ajout-info .bouton { height: 52px; gap: 6px; padding: 0 14px; }
.ajout-info .ic { width: 20px; height: 20px; }

/* ---------- Agenda ---------- */
#ecran-agenda { display: flex; flex-direction: column; background: #fff; }
#ecran-agenda .defile { padding: calc(var(--haut) + 8px) 16px calc(var(--onglets) + 16px); }
#ecran-agenda .tete-stats .bouton { gap: 6px; }
#ecran-agenda .tete-stats .ic { width: 20px; height: 20px; }
#agenda-bloc-qui { margin-top: 10px; }
.jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 2px 0 4px; }
.jour { display: flex; flex-direction: column; align-items: center; gap: 1px; height: 64px; padding-top: 7px; border-radius: 14px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--gris); text-transform: capitalize; transition: background-color .18s ease-out, color .18s ease-out; }
.jour b { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--marine); }
.jour i { width: 6px; height: 6px; border-radius: 50%; background: var(--indigo); }
.jour.aujourdhui b { color: var(--indigo); }
.jour[aria-pressed="true"] { background: var(--indigo); color: #fff; }
.jour[aria-pressed="true"] b { color: #fff; }
.jour[aria-pressed="true"] i { background: #fff; }
.agenda-jour:not(.choisi) { display: none; }
.agenda-jour h2 { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 4px; font-size: 17px; line-height: 24px; font-weight: 700; }
.agenda-jour h2 small { font-size: 14px; font-weight: 600; color: var(--indigo); }
.ag-liste { margin: 0; padding: 0; list-style: none; }
.ag-item { border-bottom: 1px solid var(--trait-doux); }
.ag-item > button, .ag-item summary { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 2px; text-align: left; cursor: pointer; }
.ag-item summary { list-style: none; }
.ag-item summary::-webkit-details-marker, .ag-retard summary::-webkit-details-marker { display: none; }
.ag-item .ic { color: var(--gris); }
.ag-item summary > .ic:last-child { margin-left: auto; transition: transform .18s ease-out; }
.ag-item details[open] summary > .ic:last-child, .ag-retard[open] summary > .ic:last-child { transform: rotate(180deg); }
.ag-item > button > span, .ag-item summary > span { display: flex; flex-direction: column; min-width: 0; font-size: 15px; line-height: 21px; font-weight: 500; }
.ag-item b { font-size: 16px; line-height: 22px; font-weight: 600; }
.ag-item small { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--gris); }
.ag-item time { flex: none; min-width: 46px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ag-item button:disabled { cursor: default; }
.ag-arrets { margin: -4px 0 8px; padding: 0 0 0 36px; list-style: none; }
.ag-arrets button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 4px 0; text-align: left; }
.ag-arrets button > span:last-child { display: flex; flex-direction: column; font-size: 15px; line-height: 21px; font-weight: 600; }
.ag-arrets small { font-weight: 500; }
.ag-item details > .lien { margin: 0 0 10px 36px; }
.ag-retard { margin: 6px 0 4px; border-radius: 14px; background: #FDECEE; }
.ag-retard summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; font-size: 15px; font-weight: 700; color: #8E0F19; list-style: none; cursor: pointer; }
.ag-retard summary .ic { width: 20px; height: 20px; }
.ag-retard summary .ic:last-child { margin-left: auto; transition: transform .18s ease-out; }
.ag-retard .ag-liste { padding: 0 12px 4px; }
.ag-boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; }
.ag-boutons .bouton { gap: 6px; }
.ag-boutons .ic { width: 20px; height: 20px; }
.ag-boutons .lien { margin-left: 0; }

/* ---------- tablette et ordinateur : toute la largeur, contenus centrés ; à partir de 900 px, onglets à gauche ---------- */
@media (min-width: 600px) {
  .haut-carte { right: auto; width: min(440px, calc(100% - 24px)); }
  .fiche-ici { right: auto; width: min(420px, calc(100% - 24px)); }
  .feuille-bas, .feuille-ajouter { left: 50%; right: auto; width: min(500px, calc(100% - 16px)); transform: translate(-50%, 115%); }
  .feuille-bas.visible, .feuille-ajouter.visible { transform: translate(-50%, 0); }
  .message { left: 50%; right: auto; width: min(480px, calc(100% - 32px)); transform: translate(-50%, 16px); }
  .message.visible { transform: translate(-50%, 0); }
  .defile, .formulaire, .pied-visite, #ecran-stats .defile, #ecran-agenda .defile { padding-inline: max(16px, calc((100% - 680px) / 2)); }
  .tete-visite { padding-inline: max(6px, calc((100% - 700px) / 2)) max(16px, calc((100% - 680px) / 2)); }
  .barre-haut { padding-inline: max(4px, calc((100% - 700px) / 2)) max(8px, calc((100% - 700px) / 2)); }
  .connexion, .connexion-pied { width: 100%; max-width: 420px; margin-inline: auto; }
  .onglets { justify-content: center; }
  .onglet { flex: 0 1 132px; }
}
@media (min-width: 900px) {
  :root { --onglets: 0px; }
  .onglets { inset: 0 auto 0 0; width: 88px; height: auto; flex-direction: column; justify-content: flex-start; gap: 4px; padding: calc(var(--haut) + 16px) 0 16px; box-shadow: 1px 0 0 var(--trait-doux); }
  .onglet { flex: none; height: 70px; }
  .onglet-ajouter { order: -1; margin-bottom: 12px; }
  .app:not(:is([data-ecran="visite"], [data-ecran="connexion"], [data-ecran="fiche"], [data-ecran="prospect"], [data-ecran="preparer"])) .ecran { left: 88px; }
  /* tournée : la liste à gauche, la carte à droite */
  #ecran-tournee .feuille { inset: 0 auto 0 0; width: 420px; padding: calc(var(--haut) + 16px) 20px 20px; border-radius: 0; box-shadow: 1px 0 0 var(--trait-doux), 8px 0 24px rgba(8, 31, 60, .06); }
  #ecran-tournee .poignee, #ecran-tournee .voile-haut { display: none; }
  #carte-tournee { left: 420px; }
  #envoi-tournee { left: 432px; }
  /* agenda : toute la semaine d'un coup d'œil */
  .jours { display: none; }
  #ecran-agenda .defile { padding-inline: 24px; }
  .agenda-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
  .agenda-jour:not(.choisi) { display: block; }
  .agenda-jour h2 { flex-wrap: wrap; gap: 0 6px; font-size: 15px; line-height: 22px; }
  .agenda-jour.aujourdhui h2 { color: var(--indigo); }
  /* colonnes étroites : l'heure au-dessus du titre, sans icône ; boutons sur toute la largeur de la colonne */
  .ag-item > button, .ag-item summary { flex-wrap: wrap; align-items: flex-start; gap: 2px 8px; min-height: 0; padding: 10px 0; }
  .ag-item > button > .ic, .ag-item summary > .ic:first-child { display: none; }
  .ag-item summary > span { flex: 1; }
  .ag-item time { width: 100%; min-width: 0; font-size: 13px; line-height: 18px; color: var(--indigo); }
  .ag-item b { font-size: 15px; line-height: 21px; }
  .ag-item > button > span, .ag-item summary > span { font-size: 14px; line-height: 20px; }
  .ag-arrets { padding-left: 0; }
  .ag-item details > .lien { margin-left: 0; }
  .ag-retard summary { padding: 0 10px; font-size: 14px; }
  .ag-retard .ag-liste { padding: 0 10px 4px; }
  .ag-boutons { flex-direction: column; align-items: stretch; }
  .ag-boutons .bouton { height: auto; min-height: 44px; padding: 6px 10px; font-size: 14px; line-height: 18px; white-space: normal; }
  .ag-boutons .lien { justify-content: center; }
}
