/* PROSPECTION — feuille de style */
:root {
  --accent: #8a5a48;
  --accent-fonce: #6b4435;
  --accent-clair: #f5ebe6;
  --fond: #f6f3f1;
  --surface: #ffffff;
  --texte: #1f1d1e;
  --texte-2: #5b5659;
  --texte-3: #8a8487;
  --bord: #e3dfe1;
  --ok: #1d7a4a;
  --ok-fond: #e5f4ec;
  --alerte: #b3261e;
  --alerte-fond: #fbe9e8;
  --info-fond: #eaf1fb;
  --info: #1f4f8f;
  --rayon: 10px;
  --ombre: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; line-height: 1.25; }
h2 { font-size: 1.08rem; margin: 0 0 .75rem; }
h2 small, h1 small { font-weight: 400; color: var(--texte-3); font-size: .85em; }
h3 { font-size: 1rem; margin: 0; }
code { background: #f1eef0; padding: 1px 5px; border-radius: 4px; font-size: .92em; }
code.gros { font-size: 1.15em; letter-spacing: .05em; }
small { color: var(--texte-3); }

/* En-tête */
.entete { background: var(--accent); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.entete-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: 0 16px; min-height: 56px; }
.marque { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.logo { width: 34px; height: 34px; border-radius: 8px; background: #fff; object-fit: cover; }
.logo-grand { width: 56px; height: 56px; font-size: 22px; border-radius: 14px; background: var(--accent); color: #fff; }
.nav { display: flex; align-items: center; gap: 1px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; padding: 4px 0; }
.nav a { color: #fff; text-decoration: none; padding: .45rem .55rem; border-radius: 7px; font-size: .88rem; opacity: .9; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.12); opacity: 1; }
.nav a.actif { background: rgba(255,255,255,.2); opacity: 1; font-weight: 600; }
.nav-sep { width: 1px; height: 26px; background: rgba(255,255,255,.3); margin: 0 .4rem; }
.nav-user { display: flex; flex-direction: column; line-height: 1.15; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.nav-user small { color: rgba(255,255,255,.75); font-size: .75rem; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; border-radius: 2px; }

@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 56px; background: var(--accent-fonce); flex-direction: column; align-items: stretch; padding: 8px 12px 14px; gap: 0; }
  body.menu-ouvert .nav { display: flex; }
  .nav a { padding: .75rem .8rem; font-size: 1rem; }
  .nav-sep { width: auto; height: 1px; margin: .4rem 0; }
}

/* Page */
.page { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 20px 16px 40px; }
.page-etroite { max-width: 620px; margin-left: auto; margin-right: auto; }
.titre-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1rem; }
.sous-titre { color: var(--texte-2); margin: 0; }
.pied { text-align: center; color: var(--texte-3); font-size: .8rem; padding: 16px; }

.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px; margin-bottom: 16px; box-shadow: var(--ombre); }
.carte > :last-child { margin-bottom: 0; }
.titre-carte { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.titre-carte h2 { margin: 0; }
.aide { color: var(--texte-2); font-size: .88rem; margin: .25rem 0 .75rem; }
.centre { text-align: center; }
.vide { color: var(--texte-3); font-style: italic; }
.vide.ok { color: var(--ok); font-style: normal; }
.nowrap { white-space: nowrap; }

/* Alertes */
.alerte { border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid transparent; }
.alerte ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.alerte p { margin: .2rem 0; }
.alerte-succes { background: var(--ok-fond); color: #11502f; border-color: #bfe3cf; }
.alerte-erreur { background: var(--alerte-fond); color: #7d1a14; border-color: #f2c5c2; }
.alerte-info { background: var(--info-fond); color: var(--info); border-color: #c9daf2; }

/* Formulaires */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; color: var(--texte); }
label small { font-weight: 400; }
input[type=text], input[type=password], input[type=number], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 400; color: var(--texte);
  padding: 10px 12px; border: 1px solid #cfc9cc; border-radius: 8px; background: #fff; min-height: 44px;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type=file] { display: block; margin-top: 6px; font-weight: 400; max-width: 100%; }
.champ-erreur input, .champ-erreur textarea { border-color: var(--alerte); background: #fff8f7; }
.req { color: var(--alerte); }
label.case { display: flex; align-items: center; gap: .45rem; font-weight: 400; margin-bottom: 8px; cursor: pointer; }
label.case input { width: 18px; height: 18px; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.lien { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-weight: 400; padding: 0; text-decoration: underline; }
.compteur { display: block; text-align: right; font-weight: 400; margin-top: 3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 40px;
  padding: 8px 16px; border-radius: 8px; border: 1px solid #cfc9cc; background: #fff; color: var(--texte);
  font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #f7f4f5; }
.btn-primaire { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primaire:hover { background: var(--accent-fonce); }
.btn-danger { background: var(--alerte); border-color: var(--alerte); color: #fff; }
.btn-export { border-color: var(--accent); color: var(--accent); }
.btn-petit { min-height: 32px; padding: 4px 10px; font-size: .85rem; }
.btn-large { min-height: 48px; padding: 10px 22px; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icone { width: 40px; height: 44px; border: 1px solid #cfc9cc; background: #fff; border-radius: 8px; font-size: 1.3rem; color: var(--texte-2); cursor: pointer; flex: none; }
.btn-icone:hover { color: var(--alerte); border-color: var(--alerte); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.inline { display: inline; }

/* Connexion */
.connexion { max-width: 400px; margin: 6vh auto 0; }
.connexion-marque { text-align: center; margin-bottom: 20px; }
.connexion-marque h1 { margin-top: 10px; letter-spacing: .05em; }
.connexion-marque p { color: var(--texte-2); margin: 0; }
.connexion .btn { width: 100%; }

/* Fiche : saisie */
.grille-2 { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 12px; align-items: end; }
.raccourcis-date { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.grille-montants { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 16px; }
.montant-wrap { position: relative; display: flex; align-items: center; margin-top: 5px; }
.montant-wrap input { margin-top: 0; padding-right: 72px; text-align: right; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.montant-wrap .devise { position: absolute; right: 12px; color: var(--texte-3); font-weight: 400; font-size: .85rem; pointer-events: none; }
.montant-wrap .signe { position: absolute; right: 40px; width: 26px; height: 26px; border: 1px solid var(--bord); background: #faf8f9; border-radius: 6px; color: var(--texte-2); font-size: .8rem; cursor: pointer; padding: 0; }
.montant.negatif { color: var(--alerte); }
.depenses { display: flex; flex-direction: column; gap: 8px; }
.dep-ligne { display: grid; grid-template-columns: 1fr 190px auto; gap: 8px; align-items: center; }
.dep-ligne input { margin-top: 0; }
.dep-ligne .montant-wrap { margin-top: 0; }
.dep-pied { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.pj-liste { list-style: none; padding: 0; margin: 0 0 12px; }
.pj-liste li { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--bord); }
.pj-liste label.case { margin: 0 0 0 auto; color: var(--alerte); }
.barre-actions {
  position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: flex-end; gap: 10px;
  background: rgba(245,244,242,.95); backdrop-filter: blur(4px); padding: 12px 0; border-top: 1px solid var(--bord);
}
@media (max-width: 640px) {
  .grille-2 { grid-template-columns: 1fr; }
  .dep-ligne { grid-template-columns: 1fr auto; }
  .dep-ligne > input[type=text]:first-child { grid-column: 1 / -1; }
  .barre-actions .btn { flex: 1; }
  h1 { font-size: 1.3rem; }
  .carte { padding: 14px; }
}

/* Fiche : consultation */
.grille-fiche { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
@media (max-width: 860px) { .grille-fiche { grid-template-columns: 1fr; } }
.texte-divers { white-space: pre-line; margin: 0; }
.pj-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pj-vignette { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--texte-2); font-size: .8rem; word-break: break-all; }
.pj-vignette img, .pj-pdf { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--bord); background: #faf8f9; }
.pj-pdf { display: grid; place-items: center; font-weight: 700; color: var(--alerte); font-size: 1.2rem; }
.zone-danger { border-color: #f2c5c2; }

/* Étiquettes */
.etiquette { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #eee; color: var(--texte-2); white-space: nowrap; }
.etiquette-ok { background: var(--ok-fond); color: var(--ok); }
.etiquette-gris { background: #efedee; color: var(--texte-2); }
.etiquette-alerte { background: var(--alerte-fond); color: var(--alerte); }
.etiquette-admin { background: var(--accent-clair); color: var(--accent); }
p.etiquette { margin: 0 0 12px; }

/* Tableaux */
.defil { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; }
.tableau { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tableau th, .tableau td { padding: 8px 10px; border-bottom: 1px solid var(--bord); text-align: left; vertical-align: top; }
.tableau thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--texte-2); background: #faf8f9; border-bottom: 2px solid var(--bord); vertical-align: bottom; }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau tfoot th { background: var(--accent-clair); border-top: 2px solid var(--accent); font-weight: 700; }
.tableau tr.inactif td, .tableau tr.inactif th { color: var(--texte-3); }
.tableau tr.ligne-vide td { color: var(--texte-3); }
.tableau tr.sous-total th, .tableau tr.sous-total td { background: #f4f2f3; font-weight: 700; }
.tableau-fiche th { font-weight: 500; color: var(--texte-2); }
.tableau-fiche td { font-weight: 600; font-size: 1rem; }
.tableau-compact { font-size: .82rem; margin-top: 6px; }
.tableau-compact td, .tableau-compact th { padding: 4px 8px; }
.tableau-compact .avant { color: var(--alerte); text-decoration: line-through; text-decoration-color: rgba(179,38,30,.4); }
.tableau-compact .apres { color: var(--ok); }
.tableau-etat .col-fixe { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 130px; }
.tableau-etat thead .col-fixe { background: #faf8f9; }
.tableau-etat tfoot .col-fixe { background: var(--accent-clair); }
.tableau-etat tr.sous-total .col-fixe { background: #f4f2f3; }
.tableau-etat thead th.num { min-width: 96px; }
.divers-cell { min-width: 200px; font-size: .82rem; color: var(--texte-2); white-space: pre-line; }
.manque { color: var(--alerte); font-weight: 700; }
.pj-ico { font-size: .85em; }

/* Filtres */
.filtres-ligne { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; }
.filtres-ligne label { flex: 1 1 150px; max-width: 240px; }
.filtres-ligne > .btn { margin-bottom: 12px; }
.bascule { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.bascule legend { width: 100%; }
.bascule label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; max-width: none; flex: none; }
.raccourcis { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.choix-pv { display: flex; flex-wrap: wrap; gap: 0 18px; }
.choix-pv legend { width: 100%; }
.filtre-inline { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 10px; }
.filtre-inline label { margin: 0; min-width: 220px; }
.filtre-inline select { margin-top: 0; }

/* Tableau de bord */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tuile { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px 16px; box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 4px; }
.tuile-lib { font-size: .82rem; color: var(--texte-2); }
.tuile-val { font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tuile-val small { font-size: .55em; font-weight: 500; }
.tuile-alerte { border-color: #f2c5c2; }
.tuile-alerte .tuile-val { color: var(--alerte); }
.grille-tdb { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
@media (max-width: 960px) { .grille-tdb { grid-template-columns: 1fr; } }
.manquantes { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.manquantes li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--bord); }
.manquantes li > span:nth-child(2) { flex: 1; }
.graphique { position: relative; }
.graphique svg { width: 100%; height: auto; display: block; }
.graphique .axe { stroke: #bdb6ba; stroke-width: 1; }
.graphique .grille { stroke: #ece8ea; stroke-width: 1; stroke-dasharray: 3 3; }
.graphique .lib-axe { font-size: 11px; fill: var(--texte-3); }
.graphique .barre-val { fill: var(--accent); }
.graphique .cible { fill: transparent; }
.graphique .barre:hover .barre-val { fill: var(--accent-fonce); }
.graphique .barre:hover .cible { fill: rgba(138,90,72,.08); }
.infobulle { position: absolute; pointer-events: none; background: #1f1d1e; color: #fff; font-size: .8rem; padding: 5px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -110%); }

/* Opératrice : fiches récentes */
.carte-appel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.carte-appel p { margin: 0; flex: 1 1 100%; }
.cartes-fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.fiche-resume header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.mini-montants { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; margin: 0 0 12px; font-size: .88rem; }
.mini-montants dt { color: var(--texte-2); }
.mini-montants dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.infos { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.infos dt { color: var(--texte-2); }
.infos dd { margin: 0; font-weight: 600; }

/* Historique */
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { padding: 10px 0 10px 14px; border-left: 3px solid var(--bord); margin-bottom: 8px; }
.hist-creation { border-left-color: var(--ok) !important; }
.hist-modification { border-left-color: #c98a1a !important; }
.hist-suppression { border-left-color: var(--alerte) !important; }
.hist-qui { color: var(--texte-3); font-size: .85rem; margin-left: .3rem; }
.pagination { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.pagination a { padding: 4px 10px; border: 1px solid var(--bord); border-radius: 6px; text-decoration: none; }
.pagination a.actif { background: var(--accent); color: #fff; border-color: var(--accent); }

.mdp-provisoire p { margin: .3rem 0; }
.liste-verif { list-style: none; padding: 0; margin: 0; }
.liste-verif .ok { color: var(--ok); }
.liste-verif .ko { color: var(--alerte); font-weight: 600; }

@media print {
  .entete, .pied, .barre-actions, .filtres, .actions, .btn { display: none !important; }
  body { background: #fff; }
  .carte { box-shadow: none; border: 0; padding: 0; }
}

/* ---- v1.1 : Divers, WhatsApp ---- */
.col-divers { min-width: 180px; }
.divers-cell { min-width: 180px; max-width: 320px; font-size: .84rem; white-space: pre-line; }
.divers-plein { background: #fff6e0; color: #5a3d00; font-weight: 500; }
.tableau tr.sous-total td.divers-plein, .tableau tfoot .divers-plein { background: #fff6e0; }
.divers-ico { color: #b7791f; font-weight: 700; }
.divers-vide { color: var(--texte-3); }
.alerte-divers { background: #fff6e0; border-color: #f0d9a0; color: #5a3d00; font-size: 1rem; }
.alerte-divers .texte-divers { white-space: pre-line; }
.divers-bloc { background: #fff6e0; border-radius: 8px; padding: 8px 10px; font-size: .88rem; color: #5a3d00; white-space: pre-line; margin: 0 0 10px; }
.carte-remarques { border-color: #f0d9a0; }
.remarques { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow: auto; }
.remarques li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.remarques p { margin: 2px 0 0; white-space: pre-line; font-size: .9rem; }
.remarques a { text-decoration: none; }
.tuile-lien { text-decoration: none; color: inherit; }
.tuile-lien:hover { border-color: var(--accent); }

.case-forte { font-weight: 700; font-size: 1rem; background: var(--accent-clair); padding: 10px 12px; border-radius: 8px; }
.journal-wa { list-style: none; padding: 0; margin: 0; max-height: 520px; overflow: auto; font-size: .88rem; }
.journal-wa li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--bord); }
.journal-wa li.ok > span:first-child { color: var(--ok); }
.journal-wa li.ko > span:first-child { color: var(--alerte); font-weight: 700; }

/* ---- PROSPECTION ---- */
.etiquette-info { background: #e8f0fb; color: #1f4f8f; }
.cases { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.cases label.case { margin-bottom: 6px; }
.onglets { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--bord); margin-bottom: 16px; }
.onglets a { padding: 8px 14px; text-decoration: none; color: var(--texte-2); border-radius: 8px 8px 0 0; font-weight: 600; font-size: .92rem; }
.onglets a.actif { background: var(--accent); color: #fff; }
.fab { position: fixed; right: 16px; bottom: 18px; z-index: 30; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700;
  padding: 14px 20px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.connexion-marque img { width: 110px; height: auto; border-radius: 14px; }
.grille-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.grille-2c { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grille-2c { grid-template-columns: 1fr; } }
.lignes-dyn { display: flex; flex-direction: column; gap: 10px; }
.ligne-dyn { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) auto; align-items: end; padding: 10px; background: #faf8f7; border: 1px solid var(--bord); border-radius: 8px; }
.ligne-dyn input, .ligne-dyn select { margin-top: 3px; }
.ligne-dyn label { margin: 0; font-size: .8rem; }
.fiche-entete { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.contact-carte { padding: 10px 0; border-bottom: 1px solid var(--bord); }
.contact-carte:last-child { border-bottom: 0; }
.liens-contact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Planning */
.planning-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.planning-nav .semaine { font-weight: 700; font-size: 1.05rem; margin: 0 6px; }
.semaine-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .semaine-grille { grid-template-columns: 1fr; } }
.jour { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 10px; min-height: 120px; box-shadow: var(--ombre); }
.jour.aujourdhui { border-color: var(--accent); border-width: 2px; }
.jour.repos { background: repeating-linear-gradient(135deg, #f6f3f1, #f6f3f1 8px, #efeae7 8px, #efeae7 16px); }
.jour h3 { font-size: .92rem; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.jour h3 small { font-weight: 400; }
.pl-item { border: 1px solid var(--bord); border-left: 4px solid #bdb3ae; border-radius: 8px; padding: 7px 8px; margin-bottom: 7px; background: #fff; font-size: .86rem; }
.pl-item.st-valide { border-left-color: #8a7f7b; }
.pl-item.st-propose { border-left-color: #1f4f8f; background: #f4f8fe; }
.pl-item.st-realise { border-left-color: var(--ok); background: #f3fbf6; }
.pl-item.st-non_realise { border-left-color: var(--alerte); background: #fdf5f4; }
.pl-item.st-refuse { opacity: .6; }
.pl-item strong { display: block; }
.pl-item .pl-meta { color: var(--texte-2); font-size: .8rem; }
.pl-item .pl-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pl-item .btn-petit { min-height: 28px; padding: 2px 8px; font-size: .78rem; }
.jour-ajout summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .85rem; list-style: none; }
.jour-ajout summary::-webkit-details-marker { display: none; }
.jour-ajout form { margin-top: 8px; }
.jour-ajout label { font-size: .8rem; margin-bottom: 6px; }
.jour-ajout .cases label.case { font-size: .8rem; }

/* Visite */
.visite-client { background: var(--accent-clair); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.visite-client strong { font-size: 1.1rem; }
.gps-etat { font-size: .85rem; color: var(--texte-2); }
.gps-etat.ok { color: var(--ok); }
.tableau-produits { table-layout: fixed; }
.tableau-produits td, .tableau-produits th { padding: 5px 4px; }
.tableau-produits th.num { font-size: .68rem; white-space: normal; text-align: center; }
.tableau-produits .col-fixe { width: 40%; font-size: .85rem; }
.tableau-produits input { min-height: 38px; padding: 6px 2px; text-align: center; margin: 0; width: 100%; min-width: 0; }
.tableau-produits .famille-ligne th { background: var(--accent-clair); color: var(--accent-fonce); text-transform: none; font-size: .85rem; }
.choix-3 { display: inline-flex; border: 1px solid #cfc9cc; border-radius: 8px; overflow: hidden; }
.choix-3 label { margin: 0; padding: 8px 14px; font-weight: 600; cursor: pointer; border-right: 1px solid #cfc9cc; display: flex; align-items: center; gap: 4px; }
.choix-3 label:last-child { border-right: 0; }
.choix-3 input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choix-3 label:has(input:checked) { background: var(--accent); color: #fff; }
.connaissance { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.connaissance > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--bord); border-radius: 8px; }
.etoiles { color: #d4a017; letter-spacing: 1px; white-space: nowrap; }
.etoiles-vides { color: #ddd; }
.note-choix { display: inline-flex; flex-direction: row-reverse; }
.note-choix input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.note-choix label { font-size: 1.6rem; color: #ddd; cursor: pointer; margin: 0; padding: 0 2px; }
.note-choix label:hover, .note-choix label:hover ~ label, .note-choix input:checked ~ label { color: #d4a017; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photos a { display: block; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--bord); }
.apercu-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.apercu-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.infos-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; margin: 0; }
.infos-grille dt { color: var(--texte-2); font-size: .82rem; }
.infos-grille dd { margin: 0; font-weight: 600; }
.chronologie { list-style: none; margin: 0; padding: 0; }
.chronologie li { padding: 10px 0 10px 14px; border-left: 3px solid var(--accent-clair); margin-left: 4px; }
.jour-carte { border-left: 4px solid var(--accent); }
.barre-prog { height: 8px; background: #eee; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.barre-prog span { display: block; height: 100%; background: var(--accent); }

/* Devis */
.tableau-devis td { padding: 5px 4px; vertical-align: middle; }
.tableau-devis select { min-width: 190px; margin: 0; }
.tableau-devis input { margin: 0; min-height: 40px; padding: 6px; text-align: right; }
.tableau-devis .lg-qte, .tableau-devis .lg-ug { width: 72px; }
.tableau-devis .lg-prix, .tableau-devis .lg-remise { width: 92px; }
.tableau-devis input[readonly] { background: #f6f3f1; color: var(--texte-2); }
.totaux-devis { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 16px; }
.totaux-devis > label { max-width: 220px; }
.totaux-devis dl { display: grid; grid-template-columns: auto auto; gap: 4px 24px; margin: 0 0 0 auto; min-width: 280px; font-variant-numeric: tabular-nums; }
.totaux-devis dd { margin: 0; text-align: right; }
.totaux-devis .fort { font-weight: 800; font-size: 1.1rem; color: var(--accent-fonce); border-top: 2px solid var(--accent); padding-top: 4px; }
@media (max-width: 640px) {
  .tableau-devis thead { display: none; }
  .tableau-devis, .tableau-devis tbody { display: block; }
  .tableau-devis tr.lg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--bord); position: relative; }
  .tableau-devis tr.lg td { display: block; border: 0; padding: 0; }
  .tableau-devis tr.lg td:first-child { grid-column: 1 / -1; padding-right: 48px; }
  .tableau-devis tr.lg td:last-child { position: absolute; right: 0; top: 10px; }
  .tableau-devis tr.lg td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 600; color: var(--texte-2); margin-bottom: 2px; }
  .tableau-devis select { min-width: 0; width: 100%; }
  .tableau-devis .lg-qte, .tableau-devis .lg-ug, .tableau-devis .lg-prix, .tableau-devis .lg-remise { width: 100%; }
  .tableau-devis .lg-montant { align-self: end; font-weight: 700; padding-bottom: 10px !important; }
  .totaux-devis dl { min-width: 0; width: 100%; }
}
