/* app.css — L'espace chantiers. Mobile d'abord (Thibaut est sur le chantier),
   onglets en bas au téléphone, en haut dès 720 px. Basalte, béton clair et
   orange sécurité, comme le site NOVA CORDE ; polices système (CSP font-src
   'self', rien à télécharger en 4G). */

*, *::before, *::after { box-sizing: border-box; }
:root {
  --basalte: #14181c;
  --basalte-2: #1f252b;
  --orange: #ff6a1a;
  --orange-texte: #b8440a;
  --orange-pale: #fff1e8;
  --fond: #f2f3f5;
  --surface: #ffffff;
  --texte: #14181c;
  --texte-doux: #5a6470;
  --filet: #dde1e6;
  --vert: #1d7a50;
  --vert-pale: #e6f4ec;
  --rouge: #c4232a;
  --rouge-pale: #fdecec;
  --bleu: #2f6fd6;
  --bleu-pale: #e8f0fd;
  --radius: 10px;
  --ombre: 0 2px 10px rgb(20 24 28 / .08);
  --nav-bas: 64px;
  --sur: env(safe-area-inset-bottom, 0px);
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.5;
  background: var(--fond); color: var(--texte); min-height: 100vh;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8rem; }
a { color: var(--orange-texte); }
button { font: inherit; }
input, select, textarea { font: inherit; }
.noscript { padding: 1.5rem; }
.aide { color: var(--texte-doux); font-size: .95rem; }
.vide { color: var(--texte-doux); text-align: center; padding: 2rem 1rem; }
.ellipse { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Boutons, champs, messages ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem;
  border-radius: 8px; border: 1px solid transparent; background: var(--basalte-2); color: #fff; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primaire { background: var(--orange); color: var(--basalte); }
.btn--primaire:hover:not(:disabled) { background: #ff8340; }
.btn--contour { background: var(--surface); color: var(--texte); border-color: var(--filet); }
.btn--contour:hover:not(:disabled) { background: var(--fond); }
.btn--sombre { background: var(--basalte); color: #fff; }
.btn--danger { background: var(--rouge-pale); color: var(--rouge); border-color: #f3c3c3; }
.btn--petit { min-height: 36px; padding: 0 .8rem; font-size: .9rem; }
.btn--large { width: 100%; min-height: 50px; font-size: 1.05rem; }
.btn--bloc { width: 100%; }
.lien { background: none; border: 0; color: var(--orange-texte); text-decoration: underline; cursor: pointer; padding: .6rem 0; min-height: 44px; }
.champ { display: block; margin-bottom: .9rem; }
.champ > span { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .3rem; color: var(--texte-doux); }
.champ > span small { font-weight: 400; }
.champ input, .champ select, .champ textarea {
  width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1px solid var(--filet); border-radius: 8px;
  background: var(--surface); color: var(--texte);
}
.champ textarea { min-height: 96px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus, .btn:focus-visible, .lien:focus-visible {
  outline: 3px solid rgb(255 106 26 / .5); outline-offset: 1px;
}
.champ--ligne { display: flex; align-items: center; gap: .6rem; }
.champ--ligne input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; }
.msg { padding: .65rem .85rem; border-radius: 8px; font-size: .95rem; margin: 0 0 .8rem; }
.msg--erreur { background: var(--rouge-pale); color: var(--rouge); }
.msg--ok { background: var(--vert-pale); color: var(--vert); }
.msg--info { background: var(--bleu-pale); color: #1f4fa0; }
.indicateur {
  position: fixed; left: 50%; bottom: calc(var(--nav-bas) + var(--sur) + 12px); transform: translateX(-50%);
  background: var(--basalte); color: #fff; padding: .6rem 1rem; border-radius: 999px; font-size: .92rem; z-index: 50;
  box-shadow: var(--ombre); max-width: calc(100% - 2rem);
}
.indicateur--erreur { background: var(--rouge); }
.indicateur--ok { background: var(--vert); }

/* ---------- Connexion ---------- */
.ecran-connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.25rem; background: var(--basalte); }
.carte-connexion { background: var(--surface); border-radius: 14px; padding: 1.6rem 1.4rem; width: 100%; max-width: 420px; box-shadow: var(--ombre); }
.marque { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.marque svg { width: 44px; height: 44px; flex: none; }
.marque__titre { font-weight: 800; font-size: 1.25rem; letter-spacing: .02em; }
.marque__sous { color: var(--texte-doux); font-size: .9rem; }
.mentions-lien { margin: 1.2rem 0 0; font-size: .85rem; text-align: center; }

/* ---------- Coquille ---------- */
.bandeau { background: var(--orange); color: var(--basalte); padding: .5rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; font-weight: 600; font-size: .92rem; flex-wrap: wrap; }
.entete { background: var(--basalte); color: #f4f2ee; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; min-height: 56px; }
.entete__marque { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .02em; min-width: 0; }
.entete__marque span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.entete__marque svg { width: 28px; height: 28px; }
.entete__compte { margin-left: auto; display: flex; align-items: center; gap: .7rem; }
.entete__email { font-size: .85rem; opacity: .75; display: none; }
.entete .btn--contour { background: transparent; color: #fff; border-color: rgb(255 255 255 / .35); }
.contenu { padding: 1rem 1rem calc(var(--nav-bas) + var(--sur) + 1rem); max-width: 1100px; margin: 0 auto; }
.nav { display: flex; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; text-decoration: none; color: var(--texte-doux); font-size: .72rem; font-weight: 600; min-height: 44px; }
.nav a svg { width: 24px; height: 24px; }
.nav a[aria-current="page"] { color: var(--orange-texte); }
.nav--haut { display: none; }
.nav--bas { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-bas) + var(--sur)); padding-bottom: var(--sur); background: var(--surface); border-top: 1px solid var(--filet); z-index: 40; }
.nav--bas a { flex: 1; }
.nav__badge { position: absolute; top: 6px; right: calc(50% - 22px); background: var(--orange); color: var(--basalte); font-size: .68rem; min-width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.nav a { position: relative; }
@media (min-width: 720px) {
  .entete__email { display: inline; }
  .nav--haut { display: flex; gap: .2rem; }
  .nav--haut a { flex-direction: row; gap: .45rem; padding: 0 .9rem; border-radius: 8px; color: rgb(255 255 255 / .8); font-size: .95rem; }
  .nav--haut a[aria-current="page"] { background: rgb(255 255 255 / .12); color: #fff; }
  .nav--haut a svg { width: 20px; height: 20px; }
  .nav--bas { display: none; }
  .contenu { padding: 1.5rem 1.5rem 3rem; }
  .indicateur { bottom: 24px; }
}

/* ---------- Blocs ---------- */
.tete { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tete > * { min-width: 0; }
.tete h1 { font-size: 1.4rem; }
.carte { background: var(--surface); border-radius: var(--radius); box-shadow: var(--ombre); padding: 1rem; margin-bottom: .8rem; min-width: 0; }
.carte--lien { display: block; color: inherit; text-decoration: none; }
.carte--lien:hover { outline: 2px solid var(--filet); }
.carte__ligne { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.carte__ligne > * { min-width: 0; }
.carte__titre { font-weight: 700; font-size: 1.05rem; }
.carte__sous { color: var(--texte-doux); font-size: .9rem; }
.pastille { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pastille::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.pastille--s0, .pastille--s1 { background: var(--bleu-pale); color: #1f4fa0; }
.pastille--s2, .pastille--s3 { background: var(--orange-pale); color: var(--orange-texte); }
.pastille--s4, .pastille--s5 { background: #f3efe3; color: #6b5718; }
.pastille--s6 { background: var(--vert-pale); color: var(--vert); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: var(--basalte); font-size: .72rem; font-weight: 700; }
.filtres { display: flex; gap: .45rem; overflow-x: auto; padding: 0 0 .6rem; margin: 0 -1rem .4rem; padding-left: 1rem; padding-right: 1rem; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
.filtres button { flex: none; border: 1px solid var(--filet); background: var(--surface); border-radius: 999px; padding: .4rem .8rem; min-height: 38px; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--texte-doux); }
.filtres button[aria-pressed="true"] { background: var(--basalte); color: #fff; border-color: var(--basalte); }
.filtres button .n { opacity: .7; margin-left: .3rem; }
.recherche { display: flex; gap: .5rem; margin-bottom: .8rem; }
.recherche input { flex: 1; min-height: 44px; padding: .5rem .8rem; border: 1px solid var(--filet); border-radius: 8px; }
.flottant { position: fixed; right: 1rem; bottom: calc(var(--nav-bas) + var(--sur) + 1rem); z-index: 30; box-shadow: 0 6px 18px rgb(20 24 28 / .25); border-radius: 999px; min-height: 52px; padding: 0 1.3rem; }
@media (min-width: 720px) { .flottant { position: static; box-shadow: none; } }
.grille-2 { display: grid; gap: .8rem; }
@media (min-width: 900px) { .grille-2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 0; border-top: 1px solid var(--filet); flex-wrap: wrap; }
.liste li > .actions { flex-basis: 100%; }
.liste li > .actions .btn { flex: 1; }
@media (min-width: 560px) { .liste li > .actions { flex-basis: auto; } .liste li > .actions .btn { flex: none; } }
.liste li:first-child { border-top: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.retour { display: inline-flex; align-items: center; gap: .3rem; color: var(--texte-doux); text-decoration: none; margin-bottom: .6rem; min-height: 44px; }
dl.infos { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; font-size: .95rem; }
dl.infos dt { color: var(--texte-doux); }
dl.infos dd { margin: 0; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; background: var(--fond); padding: .5rem .7rem; border-radius: 8px; word-break: break-all; }

/* ---------- Stepper des statuts ---------- */
.stepper { display: flex; gap: 0; overflow-x: auto; padding: .4rem 0 .6rem; margin: 0 -1rem .6rem; padding-left: 1rem; padding-right: 1rem; scrollbar-width: none; counter-reset: etape; }
.stepper::-webkit-scrollbar { display: none; }
.stepper__etape { flex: none; display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 92px; font-size: .72rem; text-align: center; color: var(--texte-doux); position: relative; }
.stepper__etape::before { counter-increment: etape; content: counter(etape); width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--filet); background: var(--surface); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--texte-doux); }
.stepper__etape::after { content: ""; position: absolute; top: 14px; left: calc(50% + 16px); width: calc(100% - 32px); height: 2px; background: var(--filet); }
.stepper__etape:last-child::after { display: none; }
.stepper__etape--fait::before { background: var(--basalte); border-color: var(--basalte); color: #fff; }
.stepper__etape--fait::after { background: var(--basalte); }
.stepper__etape--courant { color: var(--orange-texte); font-weight: 700; }
.stepper__etape--courant::before { background: var(--orange); border-color: var(--orange); color: var(--basalte); }
.statut-action { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }

/* ---------- Onglets internes ---------- */
.onglets { display: flex; border-bottom: 2px solid var(--filet); margin: .5rem 0 1rem; overflow-x: auto; scrollbar-width: none; }
.onglets button { flex: 1 0 auto; border: 0; background: none; padding: .7rem .8rem; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--texte-doux); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.onglets button[aria-selected="true"] { color: var(--texte); border-bottom-color: var(--orange); }
.onglets button .badge { margin-left: .4rem; }

/* ---------- Photos ---------- */
.phase { margin-bottom: 1.2rem; }
.phase__tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.grille-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
@media (min-width: 720px) { .grille-photos { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } }
.vignette { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--filet); border-radius: 6px; overflow: hidden; cursor: pointer; }
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette--masquee img { opacity: .45; }
.vignette__marque { position: absolute; left: 4px; top: 4px; background: rgb(13 16 19 / .8); color: #fff; font-size: .65rem; padding: .15rem .35rem; border-radius: 4px; }
.vignette--envoi { display: flex; align-items: center; justify-content: center; }
.vignette__progres { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgb(255 255 255 / .5); }
.vignette__progres > span { display: block; height: 100%; background: var(--orange); width: 0; }
.vignette--erreur { outline: 2px solid var(--rouge); }
.visionneuse { position: fixed; inset: 0; background: rgb(0 0 0 / .94); z-index: 100; display: flex; align-items: center; justify-content: center; }
.visionneuse img { max-width: 100%; max-height: calc(100% - 120px); object-fit: contain; }
.visionneuse__fermer, .visionneuse__nav { position: absolute; background: rgb(255 255 255 / .12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.visionneuse__fermer { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.visionneuse__nav { top: 50%; transform: translateY(-50%); }
.visionneuse__nav--prec { left: 8px; } .visionneuse__nav--suiv { right: 8px; }
.visionneuse__pied { position: absolute; left: 0; right: 0; bottom: 0; padding: .8rem 1rem calc(.8rem + var(--sur)); background: rgb(0 0 0 / .6); color: #fff; font-size: .9rem; }
.visionneuse__pied .actions { margin-top: .5rem; }
.visionneuse__pied .btn { min-height: 38px; }

/* ---------- Messages, historique ---------- */
.historique { list-style: none; margin: 0; padding: 0; }
.historique li { padding: .6rem 0; border-top: 1px solid var(--filet); font-size: .95rem; }
.historique li:first-child { border-top: 0; }
.historique time { color: var(--texte-doux); font-size: .85rem; }
.historique .commentaire { margin: .2rem 0 0; color: var(--texte); }

/* ---------- Modale ---------- */
.voile { position: fixed; inset: 0; background: rgb(20 24 28 / .55); z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.modale { background: var(--surface); width: 100%; max-width: 520px; border-radius: 16px 16px 0 0; padding: 1.2rem 1.2rem calc(1.2rem + var(--sur)); max-height: 92vh; overflow: auto; }
.modale h2 { margin-bottom: .9rem; }
.modale__actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: .4rem; }
.modale__actions .btn { flex: 1; }
@media (min-width: 720px) {
  .voile { align-items: center; padding: 1rem; }
  .modale { border-radius: 14px; }
  .modale__actions .btn { flex: none; }
}
.choix-statut { display: grid; gap: .4rem; margin-bottom: .8rem; }
.choix-statut label { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border: 1px solid var(--filet); border-radius: 8px; cursor: pointer; }
.choix-statut input { width: 20px; height: 20px; }

/* ---------- Console ---------- */
.jauge { height: 8px; background: var(--filet); border-radius: 999px; overflow: hidden; margin: .3rem 0; }
.jauge > span { display: block; height: 100%; background: var(--orange); }
.tableau { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tableau th, .tableau td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--filet); vertical-align: top; }
.tableau th { color: var(--texte-doux); font-weight: 600; }

/* ---------- Mentions ---------- */
.prose { max-width: 46rem; }
.prose h2 { margin: 1.2rem 0 .4rem; font-size: 1.1rem; }
.prose ul { padding-left: 1.2rem; }

/* ---------- Carte (Leaflet) ---------- */
.carte-leaflet { width: 100%; height: min(62vh, 520px); border-radius: var(--radius); overflow: hidden; background: #dfe6ec; margin-bottom: 1rem; z-index: 0; }
.carte-leaflet--mini { height: 260px; margin: 0 0 .5rem; }
.marqueur { background: none; border: 0; }
.marqueur span { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--basalte); color: #fff; font-size: .72rem; font-weight: 700; box-shadow: 0 2px 6px rgb(0 0 0 / .35); border: 2px solid #fff; }
.marqueur span { text-indent: 0; }
.marqueur--s0 span, .marqueur--s1 span { background: var(--bleu); }
.marqueur--s2 span, .marqueur--s3 span { background: var(--orange); color: var(--basalte); }
.marqueur--s4 span, .marqueur--s5 span { background: #8a6413; }
.marqueur--s6 span { background: var(--vert); }
.marqueur--sx span { background: var(--texte-doux); }
.leaflet-popup-content { font: inherit; font-size: .92rem; line-height: 1.4; margin: .8rem; }
.popup__chantiers { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .35rem; }
.popup__chantiers a { color: var(--orange-texte); font-weight: 600; }
.leaflet-container a.leaflet-popup-close-button { width: 32px; height: 32px; font-size: 22px; }

/* ---------- Fil de messages ---------- */
.fil { background: var(--surface); border-radius: var(--radius); padding: .8rem; max-height: 52vh; overflow: auto; display: flex; flex-direction: column; gap: .6rem; box-shadow: var(--ombre); }
.bulle { max-width: 86%; background: var(--fond); border-radius: 12px 12px 12px 4px; padding: .55rem .8rem; align-self: flex-start; }
.bulle--moi { align-self: flex-end; background: var(--orange-pale); border-radius: 12px 12px 4px 12px; }
.bulle__meta { font-size: .75rem; color: var(--texte-doux); margin-bottom: .15rem; }
.bulle__corps { white-space: pre-wrap; word-break: break-word; }
.fil__envoi { display: flex; gap: .5rem; margin-top: .7rem; align-items: flex-end; }
.fil__saisie { flex: 1; min-height: 48px; padding: .6rem .8rem; border: 1px solid var(--filet); border-radius: 10px; resize: vertical; font: inherit; }

/* ---------- Propositions d'adresses ---------- */
.champ--propositions { position: relative; }
.propositions { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--filet); border-radius: 0 0 8px 8px; box-shadow: var(--ombre); max-height: 240px; overflow: auto; }
.propositions__item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .65rem .8rem; min-height: 44px; cursor: pointer; font: inherit; color: var(--texte); }
.propositions__item:hover, .propositions__item:focus-visible { background: var(--orange-pale); outline: none; }

/* ---------- Nouveautés (en orange) ---------- */
.carte--nouveau { box-shadow: 0 0 0 2px var(--orange), var(--ombre); }
.nouveau { margin-top: .4rem; color: var(--orange-texte); font-weight: 700; font-size: .88rem; }
.ligne--nouveau td { background: var(--orange-pale); }
.ligne--nouveau td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.bandeau-nouveau { background: var(--orange-pale); border-left: 4px solid var(--orange); border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1rem; }
.bandeau-nouveau strong { color: var(--orange-texte); }
.bandeau-nouveau ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .95rem; }
.carte--accent { border-top: 4px solid var(--orange); }
.nouveautes { list-style: none; margin: 0; padding: 0; }
.nouveautes li { padding: .55rem 0; border-top: 1px solid var(--filet); }
.nouveautes li:first-child { border-top: 0; }
.nouveautes a { color: inherit; text-decoration: none; }
.nouveautes a:hover strong { text-decoration: underline; }

/* ---------- Tableau de bord ---------- */
.compteurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .5rem; margin-top: .6rem; }
.compteur { display: flex; flex-direction: column; align-items: center; padding: .7rem .4rem; border-radius: 8px; background: var(--fond); text-decoration: none; color: var(--texte); border-top: 3px solid var(--filet); }
.compteur strong { font-size: 1.6rem; line-height: 1.1; }
.compteur span { font-size: .78rem; color: var(--texte-doux); text-align: center; }
.compteur--s0, .compteur--s1 { border-top-color: var(--bleu); }
.compteur--s2, .compteur--s3 { border-top-color: var(--orange); }
.compteur--s4, .compteur--s5 { border-top-color: #8a6413; }
.compteur--s6 { border-top-color: var(--vert); }
.carte--large { overflow: hidden; }
.defilable { overflow: auto; -webkit-overflow-scrolling: touch; margin: .4rem -1rem 0; padding: 0 1rem; }
.tableau th .tri { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--texte-doux); cursor: pointer; white-space: nowrap; }
.tableau th .tri--actif { color: var(--texte); }
.tableau td { white-space: nowrap; }
.tableau td a { color: var(--orange-texte); font-weight: 600; }

/* ---------- Carte et panneau côte à côte ---------- */
.carte-vue { position: relative; height: calc(100dvh - 56px - var(--nav-bas) - var(--sur) - 5.2rem); min-height: 420px; border-radius: var(--radius); overflow: hidden; background: #dfe6ec; }
.carte-vue__carte { position: absolute; inset: 0; height: auto; margin: 0; border-radius: 0; transition: opacity .2s; }
.carte-vue__panneau { position: absolute; left: 0; right: 0; bottom: 0; max-height: 52%; display: flex; flex-direction: column; background: var(--surface); border-radius: 14px 14px 0 0; box-shadow: 0 -4px 18px rgb(20 24 28 / .18); transition: opacity .2s, max-height .25s; z-index: 1; }
.carte-vue__panneau--replie { max-height: 44px; }
.carte-vue__panneau--replie .carte-vue__filtres, .carte-vue__panneau--replie .batiments { visibility: hidden; }
.carte-vue__poignee { flex: none; height: 44px; border: 0; background: none; font: inherit; color: var(--texte-doux); cursor: pointer; position: relative; }
.carte-vue__poignee::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--filet); margin: 0 auto; }
.carte-vue[data-focus="carte"] .carte-vue__panneau { opacity: .55; }
.carte-vue[data-focus="panneau"] .carte-vue__carte { opacity: .55; }
.carte-vue__filtres { flex: none; padding: 0 .8rem .5rem; display: flex; flex-direction: column; gap: .4rem; }
.carte-vue__client { font: inherit; font-size: .95rem; padding: .45rem .6rem; border: 1px solid var(--contour); border-radius: 8px; background: var(--surface); color: var(--texte); max-width: 100%; }
.pastilles { display: flex; gap: .4rem; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .2rem; scrollbar-width: none; }
.pastilles::-webkit-scrollbar { display: none; }
.filtre { flex: none; border: 1px solid var(--contour); background: var(--surface); color: var(--texte); border-radius: 999px; padding: .35rem .75rem; font: inherit; font-size: .88rem; cursor: pointer; min-height: 36px; }
.filtre b { color: var(--texte-doux); font-weight: 600; }
.filtre--actif { background: var(--basalte); color: #fff; border-color: var(--basalte); }
.filtre--actif b { color: rgb(255 255 255 / .75); }
.batiments { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 0 .8rem .8rem; }
.batiment { padding: .7rem .6rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; }
.batiment + .batiment { margin-top: .3rem; }
.batiment:hover, .batiment:focus-visible { background: var(--fond); outline: none; }
.batiment--actif { border-color: var(--orange); background: var(--orange-pale); }
.batiment__chantiers { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; }
.batiment__chantiers a { color: var(--lien); }
.marqueur-mini { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--texte-doux); box-shadow: 0 0 0 2px #fff; }
.marqueur-mini--s0, .marqueur-mini--s1 { background: var(--bleu); }
.marqueur-mini--s2, .marqueur-mini--s3 { background: var(--orange); }
.marqueur-mini--s4, .marqueur-mini--s5 { background: #8a6413; }
.marqueur-mini--s6 { background: var(--vert); }
@media (min-width: 900px) {
  .carte-vue { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); height: calc(100vh - 56px - 8.5rem); min-height: 520px; background: var(--surface); box-shadow: var(--ombre); }
  .carte-vue__carte { position: relative; inset: auto; height: 100%; }
  .carte-vue__panneau { position: relative; max-height: none; border-radius: 0; box-shadow: none; border-left: 1px solid var(--filet); }
  .carte-vue__panneau--replie { max-height: none; }
  .carte-vue__panneau--replie .carte-vue__filtres, .carte-vue__panneau--replie .batiments { visibility: visible; }
  .carte-vue__poignee { display: none; }
  .carte-vue__filtres { padding-top: .8rem; }
  .carte-vue[data-focus="carte"] .carte-vue__panneau, .carte-vue[data-focus="panneau"] .carte-vue__carte { opacity: 1; }
  .pastilles { flex-wrap: wrap; overflow: visible; }
}

/* ---------- Assistant du site ---------- */
.faq { list-style: none; margin: .6rem 0 0; padding: 0; }
.faq__item { display: flex; gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--filet); flex-wrap: wrap; }
.faq__item--brouillon { background: linear-gradient(90deg, var(--orange-pale), transparent 40%); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
.faq__corps { flex: 1 1 320px; min-width: 0; }
.faq__question { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.faq__reponse { margin-top: .3rem; color: var(--texte-doux); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.faq__actions { display: flex; gap: .35rem; flex-wrap: wrap; align-items: flex-start; }
.test-resultat { margin-top: .6rem; padding: .7rem .9rem; border-radius: 10px; background: var(--fond); }
.test-reponse { margin-top: .3rem; white-space: pre-wrap; }
#asst-test { flex: 1; min-width: 0; font: inherit; padding: .55rem .7rem; border: 1px solid var(--contour); border-radius: 8px; }
