/* Design intégré des maquettes Claude Design « Porte-à-porte politique Québec ». */
:root {
  --fond: #FAF9F7; --surface: #FFF; --texte: #17191C; --secondaire: #55585E;
  --bordure: #D9D6CF; --piste: #ECEAE4;
  --action: #095797; --action-presse: #073F6E;
  --prio: #E08A00; --prio-texte: #7A4E00; --prio-fond: #FCF3E3; --prio-bord: #E5B96B;
  --appui: #4E86C0; --standard: #9AA0A6;
  --ok: #1F7A3D; --ok-fond: #E9F4EC;
  --refus: #C1352B; --refus-fond: #FBEBE9;
  --coche-fond: #EDF3F9;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--fond); color: var(--texte);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif; }
a { color: var(--action); text-decoration: none; }
button { font: inherit; cursor: pointer; }
.label { font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--secondaire); }
.sobre { color: var(--secondaire); font-size: 13px; }
.pastille-prio { padding: 4px 10px; border-radius: 999px; background: var(--prio-fond);
  border: 1px solid var(--prio-bord); color: var(--prio-texte);
  font-size: 12.5px; font-weight: 700; }

/* ========== Connexion ========== */
.connexion { min-height: 100dvh; display: flex; flex-direction: column; }
.connexion-centre { flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 0 32px; }
.connexion-logo { width: 56px; height: 56px; border-radius: 14px;
  background: var(--action); display: flex; align-items: center;
  justify-content: center; margin-bottom: 20px; }
.connexion-logo div { width: 22px; height: 22px; border-radius: 50%;
  border: 3.5px solid #fff; }
.connexion h1 { margin: 0; font-size: 24px; font-weight: 800;
  letter-spacing: -.01em; }
.connexion-sous { font-size: 14px; color: var(--secondaire); margin-top: 4px; }
.btn-google { width: 100%; max-width: 358px; height: 56px; margin-top: 44px;
  background: #fff; border: 1.5px solid var(--bordure); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); font-size: 16px; font-weight: 600;
  color: var(--texte); }
.btn-google:active { background: #F1EFE9; }
.connexion-verrou { display: flex; align-items: center; gap: 7px;
  margin-top: 18px; color: var(--secondaire); font-size: 13px; }
.connexion-pied { text-align: center; padding-bottom: 22px; font-size: 11.5px;
  color: var(--standard); }
.erreur { color: var(--refus); font-size: 14px; font-weight: 600; margin-top: 16px; }

/* ========== Mes circuits ========== */
.entete-circuits { padding: 14px 20px 0; display: flex; align-items: baseline;
  justify-content: space-between; }
.entete-circuits h1 { margin: 0; font-size: 26px; font-weight: 800;
  letter-spacing: -.01em; }
.entete-circuits .droite { font-size: 13px; font-weight: 600;
  color: var(--secondaire); }
.sous-entete { padding: 4px 20px 8px; font-size: 13px; color: var(--secondaire); }
.liste-circuits { display: flex; flex-direction: column; gap: 14px;
  padding: 10px 20px; max-width: 560px; }
.carte-circuit { display: block; background: var(--surface);
  border: 1px solid var(--bordure); border-radius: 14px; padding: 16px 18px;
  color: var(--texte); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.carte-circuit.active { border: 2px solid var(--action); }
.carte-circuit .titre { display: flex; align-items: center;
  justify-content: space-between; font-size: 20px; font-weight: 800; }
.carte-circuit.terminee .titre { color: var(--secondaire); }
.chip-etat { font-size: 11px; font-weight: 700; letter-spacing: .06em;
  border-radius: 999px; padding: 4px 10px; }
.chip-etat.actif { background: var(--action); color: #fff; }
.chip-etat.fini { background: var(--ok-fond); color: var(--ok); }
.carte-circuit .stats { font-size: 14px; color: var(--secondaire); margin-top: 4px; }
.carte-circuit .stats b { color: var(--prio-texte); font-weight: 700; }
.barre-progres { margin-top: 12px; height: 8px; border-radius: 999px;
  background: var(--piste); overflow: hidden; }
.barre-progres div { height: 100%; background: var(--action);
  border-radius: 999px; }
.barre-progres div.fini { background: var(--ok); }
.carte-circuit .dessous { display: flex; justify-content: space-between;
  margin-top: 7px; font-size: 13px; }
.carte-circuit .dessous b { font-weight: 700; }
.pied-circuits { margin-top: 24px; padding: 0 20px 26px; font-size: 12.5px;
  color: var(--standard); text-align: center; }

/* ========== Carte du circuit ========== */
.entete-carte { background: var(--surface); border-bottom: 1px solid var(--bordure);
  height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  position: relative; z-index: 1400; }
.btn-retour { width: 48px; height: 48px; display: flex; align-items: center;
  justify-content: center; border: 0; background: none; border-radius: 10px; }
.entete-carte .code { font-size: 18px; font-weight: 800; flex: 1; }
.segmente { display: flex; height: 48px; border: 1.5px solid var(--bordure);
  border-radius: 10px; overflow: hidden; }
.segmente button { border: 0; padding: 0 14px; background: #fff;
  color: var(--secondaire); font-size: 14px; font-weight: 600; }
.segmente button.actif { background: var(--action); color: #fff; font-weight: 700; }
#carte { position: fixed; inset: 0; top: 58px; bottom: 118px; z-index: 1; }
.bandeau-horsligne { background: #F1EFE9; border-bottom: 1px solid var(--bordure);
  display: flex; align-items: center; gap: 9px; padding: 9px 16px;
  font-size: 13px; font-weight: 600; color: var(--secondaire);
  position: relative; z-index: 1400; }
body.avec-bandeau #carte { top: 98px; }
.leaflet-control-zoom a { width: 44px !important; height: 44px !important;
  line-height: 44px !important; font-size: 22px !important; }
.btn-geoloc { position: absolute; bottom: 14px; right: 12px; width: 48px;
  height: 48px; background: #fff; border: 1px solid var(--bordure);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.12); z-index: 1000; }

/* marqueurs divIcon */
.marqueur { border-radius: 50%; border: 3px solid #fff; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.marqueur svg { display: block; }
.marqueur-halo { border-radius: 50%; border: 2px solid var(--prio); opacity: .5; }

/* barre inférieure */
.barre-basse { position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--bordure);
  box-shadow: 0 -2px 10px rgba(0,0,0,.07); padding: 10px 16px 20px; z-index: 1400; }
.poignee { width: 36px; height: 4px; border-radius: 999px;
  background: var(--bordure); margin: 0 auto 8px; }
.barre-basse .rangee { display: flex; gap: 12px; align-items: stretch; }
.barre-basse .gauche { flex: 1; min-width: 0; cursor: pointer; }
.barre-basse .surtitre { display: flex; justify-content: space-between;
  align-items: baseline; }
.barre-basse .compteur { font-size: 13px; font-weight: 700; color: var(--action); }
.barre-basse .adresse { font-size: 22px; font-weight: 800; margin-top: 3px;
  letter-spacing: -.01em; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.barre-basse .badges { display: flex; gap: 6px; margin-top: 7px; }
.btn-vue { flex: none; width: 60px; border: 1.5px solid var(--action);
  border-radius: 12px; background: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; font-size: 11px;
  font-weight: 700; color: var(--action); }

/* ========== Fiche de porte ========== */
.voile { position: fixed; inset: 0; background: rgba(23,25,28,.35); z-index: 1500; }
.fiche { position: fixed; left: 0; right: 0; bottom: 0; max-height: 88dvh;
  background: var(--fond); border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.2); z-index: 1600;
  display: flex; flex-direction: column; }
.fiche-tete { flex: none; padding: 10px 20px 0; }
.fiche-surtitre { display: flex; justify-content: space-between;
  align-items: baseline; }
.fiche-fermer { border: 0; background: none; font-size: 13px; font-weight: 600;
  color: var(--action); padding: 4px 0 4px 16px; }
.fiche-adresse { font-size: 28px; font-weight: 800; letter-spacing: -.01em;
  margin-top: 2px; }
.fiche-adresse.compacte { font-size: 22px; }
.fiche-badges { display: flex; gap: 6px; margin-top: 8px; }
.fiche-corps { flex: 1; overflow-y: auto; padding: 0 20px 16px; }
.chip-resultat { display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 14px; border-radius: 999px; background: var(--action);
  color: #fff; font-size: 14px; font-weight: 700; border: 0; }
.lien-modifier { border: 0; background: none; font-size: 14px; font-weight: 600;
  color: var(--action); }
.carte-occupants { margin-top: 14px; background: #fff;
  border: 1px solid var(--bordure); border-radius: 12px; overflow: hidden; }
.rangee-occupant { display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; }
.rangee-occupant + .rangee-occupant { border-top: 1px solid var(--piste); }
.pastille-cote { flex: none; width: 26px; height: 26px; border-radius: 50%;
  color: #fff; font-size: 13px; font-weight: 800; display: flex;
  align-items: center; justify-content: center; }
.rangee-occupant .infos { flex: 1; min-width: 0; }
.rangee-occupant .nom { font-size: 16px; font-weight: 700; }
.rangee-occupant .detail { font-size: 12.5px; color: var(--secondaire); }
.btn-appeler { flex: none; height: 44px; padding: 0 14px;
  border: 1.5px solid var(--action); border-radius: 10px; display: flex;
  align-items: center; color: var(--action); font-size: 14px; font-weight: 700;
  background: #fff; }
.groupe-resultats { display: flex; flex-direction: column; gap: 9px; }
.btn-resultat { height: 54px; background: #fff; border: 1.5px solid var(--bordure);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: var(--texte); }
.btn-resultat[data-r="refus"] { color: var(--refus); }
.btn-resultat[data-r="demenage"] { color: var(--secondaire); }
.btn-resultat.actif { background: var(--action); border-color: var(--action);
  color: #fff; }
.btn-resultat[data-r="refus"].actif { background: var(--refus);
  border-color: var(--refus); }
.btn-resultat[data-r="demenage"].actif { background: var(--secondaire);
  border-color: var(--secondaire); }
.carte-appui { background: #fff; border: 1px solid var(--bordure);
  border-radius: 12px; padding: 14px; margin-top: 12px; }
.carte-appui .tete { display: flex; align-items: center; gap: 9px; }
.carte-appui .nom { font-size: 16px; font-weight: 700; }
.carte-appui .indice { font-size: 12.5px; color: var(--secondaire); }
.echelle { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  margin-top: 12px; }
.niveau { height: 56px; border: 1.5px solid var(--bordure); border-radius: 9px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; background: #fff; color: var(--texte); }
.niveau b { font-size: 17px; font-weight: 800; }
.niveau span { font-size: 9.5px; font-weight: 700; letter-spacing: .03em;
  color: var(--secondaire); }
.niveau.actif { background: var(--action); border-color: var(--action);
  color: #fff; }
.niveau.actif span { color: #fff; }
.grille-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 12px; }
.case { min-height: 46px; display: flex; align-items: center; gap: 9px;
  padding: 0 10px; border: 1.5px solid var(--bordure); border-radius: 9px;
  background: #fff; font-size: 13px; font-weight: 600; line-height: 1.2;
  text-align: left; color: var(--texte); }
.case .boite { flex: none; width: 24px; height: 24px;
  border: 2px solid var(--standard); border-radius: 6px; display: flex;
  align-items: center; justify-content: center; background: #fff; }
.case.cochee { border-color: var(--action); background: var(--coche-fond); }
.case.cochee .boite { background: var(--action); border-color: var(--action); }
.fiche-pied { flex: none; background: #fff; border-top: 1px solid var(--bordure);
  padding: 12px 20px 22px; display: flex; flex-direction: column; gap: 10px; }
#fiche-note { height: 48px; border: 1.5px solid var(--bordure);
  border-radius: 10px; background: var(--fond); padding: 0 14px; font-size: 15px;
  color: var(--texte); }
#fiche-note::placeholder { color: var(--standard); }
.btn-principal { height: 56px; background: var(--action); border: 0;
  border-radius: 12px; color: #fff; font-size: 18px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(9,87,151,.35); width: 100%; }
.btn-principal:active { background: var(--action-presse); }

/* ========== Vue liste ========== */
.panneau-liste { position: fixed; inset: 0; background: var(--fond);
  z-index: 1700; display: flex; flex-direction: column; }
.panneau-liste .haut { background: var(--surface);
  border-bottom: 1px solid var(--bordure); flex: none; }
.panneau-liste .titre-rangee { height: 58px; display: flex; align-items: center;
  gap: 10px; padding: 0 12px; }
.panneau-liste .titre-rangee .t { font-size: 18px; font-weight: 800; flex: 1; }
.btn-carte { height: 48px; padding: 0 14px; border: 1.5px solid var(--action);
  border-radius: 10px; display: flex; align-items: center; gap: 7px;
  color: var(--action); font-size: 14px; font-weight: 700; background: #fff; }
.filtres { display: flex; gap: 8px; padding: 0 16px 12px; }
.filtre { height: 44px; padding: 0 16px; border-radius: 999px; background: #fff;
  border: 1.5px solid var(--bordure); color: var(--texte); font-size: 14px;
  font-weight: 600; display: flex; align-items: center; }
.filtre.actif { background: var(--action); border-color: var(--action);
  color: #fff; font-weight: 700; }
.defile-liste { flex: 1; overflow-y: auto; }
.rangee-porte { display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--piste);
  cursor: pointer; }
.rangee-porte.faite, .rangee-porte.refusee { opacity: .55; }
.rangee-porte.faite .adr { text-decoration: line-through;
  text-decoration-thickness: 1px; font-size: 16px; font-weight: 700; }
.rangee-porte.revisite { background: #FFFBF2; }
.rangee-porte.prochaine { border-left: 4px solid var(--action);
  padding-left: 12px; }
.num-ordre { flex: none; width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-size: 14px; font-weight: 800; display: flex;
  align-items: center; justify-content: center; }
.num-ordre.ok { background: var(--ok-fond); color: var(--ok); }
.num-ordre.non { background: var(--refus-fond); color: var(--refus);
  font-size: 16px; }
.rangee-porte .milieu { flex: 1; min-width: 0; }
.rangee-porte .adr { font-size: 17px; font-weight: 800; }
.rangee-porte .note-citee { font-size: 12.5px; color: var(--prio-texte);
  margin-top: 3px; }
.rangee-porte .badges { display: flex; gap: 5px; margin-top: 5px; }
.rangee-porte .badges .pastille-prio { padding: 2px 8px; font-size: 11.5px; }
.etat-droit { font-size: 12.5px; font-weight: 600; color: var(--secondaire);
  flex: none; }
.etat-droit.ok { color: var(--ok); font-weight: 700; }
.etat-droit.rev { color: var(--prio-texte); font-weight: 700; }
.etat-droit.non { color: var(--refus); font-weight: 700; }
.etat-droit.pro { font-size: 11px; font-weight: 700; letter-spacing: .05em;
  color: var(--action); }
.pied-liste { flex: none; background: var(--surface);
  border-top: 1px solid var(--bordure); padding: 12px 16px 20px; display: flex;
  justify-content: space-between; align-items: center; font-size: 13px; }
.pied-liste b { color: var(--action); font-weight: 700; }

/* ========== Tableau de bord ========== */
.tb-entete { display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; background: var(--surface);
  border-bottom: 1px solid var(--bordure); }
.tb-entete h1 { margin: 0; font-size: 21px; font-weight: 800;
  letter-spacing: -.01em; }
.tb-entete .sous { font-size: 13px; color: var(--secondaire); margin-top: 2px; }
.tb-actions { display: flex; gap: 10px; }
.btn-secondaire { height: 40px; padding: 0 16px; border: 1.5px solid var(--bordure);
  border-radius: 9px; display: flex; align-items: center; font-size: 14px;
  font-weight: 600; background: #fff; color: var(--texte); }
.btn-export { height: 40px; padding: 0 16px; border-radius: 9px; display: flex;
  align-items: center; font-size: 14px; font-weight: 700; color: #fff;
  background: var(--action); border: 0; }
.tuiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  padding: 20px 28px 6px; }
.tuile { background: #fff; border: 1px solid var(--bordure); border-radius: 10px;
  padding: 14px 16px; }
.tuile .valeur { font-size: 28px; font-weight: 800; }
.tuile .valeur small { font-size: 15px; font-weight: 600; color: var(--standard); }
.tuile .valeur.bleu { color: var(--action); }
.tuile .valeur.ambre { color: var(--prio-texte); }
.tuile .libelle { font-size: 12px; font-weight: 700; letter-spacing: .05em;
  color: var(--secondaire); margin-top: 2px; }
.tuile .delta { font-size: 12px; color: var(--ok); font-weight: 700;
  margin-top: 4px; }
.tb-grille { display: grid; grid-template-columns: 1fr 320px; gap: 18px;
  padding: 16px 28px 26px; align-items: start; }
.tb-table { background: #fff; border: 1px solid var(--bordure);
  border-radius: 10px; overflow: hidden; }
.tb-rangee { display: grid;
  grid-template-columns: 100px 1fr 180px 70px 76px 76px 76px 84px;
  align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--piste);
  font-size: 13px; }
.tb-rangee.tete { padding: 9px 14px; border-bottom: 1.5px solid var(--bordure);
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  color: var(--secondaire); }
.tb-rangee.active { background: #F3F7FB; }
.tb-rangee .code { font-weight: 800; }
.tb-rangee .num { text-align: right; }
.tb-rangee .num.bleu { color: var(--action); font-weight: 700; }
.tb-rangee .num.ambre { color: var(--prio-texte); font-weight: 700; }
.mini-progres { display: flex; align-items: center; gap: 8px;
  padding-right: 14px; }
.mini-progres .piste { flex: 1; height: 6px; border-radius: 999px;
  background: var(--piste); overflow: hidden; }
.mini-progres .piste div { height: 100%; background: var(--action); }
.mini-progres .piste div.fini { background: var(--ok); }
.mini-progres .compte { font-size: 12px; color: var(--secondaire); width: 52px; }
.sel-assigner { height: 32px; border: 1px solid var(--bordure); border-radius: 7px;
  background: #fff; font-size: 13px; font-weight: 600; padding: 0 6px;
  max-width: 170px; }
.sel-assigner.vide { border: 1.5px dashed #C7A24E; background: var(--prio-fond);
  color: var(--prio-texte); font-weight: 700; }
.tb-pied { display: flex; justify-content: space-between; padding: 10px 14px;
  font-size: 12.5px; color: var(--secondaire); background: var(--fond); }
.tb-pied b { color: var(--texte); font-weight: 700; }
.tb-activite { background: #fff; border: 1px solid var(--bordure);
  border-radius: 10px; padding: 14px 16px; }
.tb-activite .items { display: flex; flex-direction: column; gap: 11px;
  font-size: 13px; line-height: 1.45; margin-top: 10px; }
.tb-activite .h { color: var(--standard); font-size: 12px; }
.tb-activite .refus { color: var(--refus); font-weight: 700; }

.acces-liste { display: flex; flex-direction: column; margin-top: 8px; }
.acces-rangee { display: flex; align-items: center; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid var(--piste); font-size: 13px; }
.acces-courriel { flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; font-weight: 600; }
.acces-badge { border: 1px solid var(--bordure); background: #fff;
  border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700;
  color: var(--secondaire); }
.acces-badge.admin { background: var(--action); border-color: var(--action);
  color: #fff; }
.acces-badge.moi { background: var(--piste); border: 0; }
.acces-retirer { border: 0; background: none; color: var(--refus);
  font-size: 18px; font-weight: 700; padding: 0 4px; }
.acces-ajout { display: flex; gap: 8px; align-items: center; margin-top: 12px;
  flex-wrap: wrap; }
.acces-ajout input[type=email] { flex: 1; min-width: 160px; height: 36px;
  border: 1.5px solid var(--bordure); border-radius: 8px; padding: 0 10px;
  font-size: 13px; }
.acces-ajout label { font-size: 13px; font-weight: 600;
  color: var(--secondaire); display: flex; gap: 5px; align-items: center; }

@media print {
  .tb-actions, .tb-activite, .sel-assigner { display: none !important; }
  .tb-grille { grid-template-columns: 1fr; }
  body { background: #fff; }
}
@media (max-width: 900px) {
  .tuiles { grid-template-columns: repeat(2, 1fr); }
  .tb-grille { grid-template-columns: 1fr; }
}
