:root {
  --encre: #1c2b33;
  --encre-2: #51606a;
  --encre-3: #7b8790;
  --fond: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #fbf9f5;
  --bord: #e3ddd2;
  --bord-fort: #cfc7b8;
  --primaire: #14506b;
  --primaire-fonce: #0d3a4f;
  --primaire-clair: #e4eff3;
  --accent: #c8553d;
  --accent-fonce: #a7412c;
  --accent-clair: #fbeae5;
  --ok: #1a6b43;
  --ok-fond: #e3f3ea;
  --attention: #8a5a00;
  --attention-fond: #fdf1d7;
  --alerte: #a8261e;
  --alerte-fond: #fbe9e7;
  --neutre: #55626b;
  --neutre-fond: #eceff1;
  --rayon: 12px;
  --rayon-petit: 8px;
  --ombre: 0 1px 2px rgba(28, 43, 51, .06), 0 4px 14px rgba(28, 43, 51, .05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.5 var(--sans); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0; }
a { color: var(--primaire); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #f0a35e; outline-offset: 2px; border-radius: 4px; }

/* Bandeau de la maquette */
.bandeau { background: #1c2b33; color: #f3efe7; font-size: .86rem; }
.bandeau-int { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; }
.bandeau strong { color: #ffd9a8; font-weight: 600; }
.bandeau label { margin-left: auto; display: flex; gap: 8px; align-items: center; min-width: 0; }
.bandeau label > span { white-space: nowrap; }
.bandeau select { background: #2b3d47; color: #fff; border: 1px solid #4a5d68; border-radius: 6px; padding: 5px 8px; width: 330px; max-width: 100%; min-height: 0; min-width: 0; }

/* En-tête */
.entete { background: var(--surface); border-bottom: 1px solid var(--bord); position: sticky; top: 0; z-index: 20; }
.entete-int { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); font-weight: 700; letter-spacing: -.01em; }
.logo svg { flex: none; }
.logo small { display: block; font-weight: 500; font-size: .7rem; color: var(--encre-3); letter-spacing: .04em; text-transform: uppercase; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a { text-decoration: none; color: var(--encre-2); padding: 7px 11px; border-radius: 8px; font-size: .94rem; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--fond); color: var(--encre); }
.nav a.actif { background: var(--primaire-clair); color: var(--primaire-fonce); }
.outils { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.pastille-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; color: var(--encre-2); text-decoration: none; }
.pastille-btn:hover { background: var(--fond); color: var(--encre); }
.pastille-btn .compte { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.moi { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--encre); padding: 4px 8px 4px 4px; border-radius: 10px; }
.moi:hover { background: var(--fond); }
.moi .txt { font-size: .84rem; line-height: 1.2; max-width: 170px; }
.moi .txt span { display: block; color: var(--encre-3); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primaire); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; flex: none; }
.avatar.petit { width: 26px; height: 26px; font-size: .68rem; }

/* Mise en page */
main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; min-height: 60vh; }
.titre-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.titre-page p { color: var(--encre-2); margin-top: 6px; max-width: 70ch; }
.fil { font-size: .86rem; color: var(--encre-3); margin-bottom: 10px; }
.fil a { color: var(--encre-2); }
.grille { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.deux-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.section { margin-top: 28px; }
.section > h2 { margin-bottom: 12px; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rang { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.discret { color: var(--encre-2); font-size: .9rem; }
.mini { color: var(--encre-3); font-size: .8rem; }
.pile > * + * { margin-top: 10px; }

/* Cartes */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 18px; min-width: 0; }
.carte > h2, .carte > h3 { margin-bottom: 10px; }
.carte.plate { box-shadow: none; background: var(--surface-2); }
.carte.cliquable { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.carte.cliquable:hover { border-color: var(--primaire); transform: translateY(-1px); }
.vide { text-align: center; padding: 30px 18px; color: var(--encre-2); border: 1px dashed var(--bord-fort); border-radius: var(--rayon); background: var(--surface-2); }
.vide strong { display: block; color: var(--encre); margin-bottom: 4px; }
.vide .btn { margin-top: 12px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 9px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--encre); font-weight: 600; font-size: .93rem; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { border-color: var(--encre-3); }
.btn.primaire { background: var(--primaire); border-color: var(--primaire); color: #fff; }
.btn.primaire:hover { background: var(--primaire-fonce); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-fonce); }
.btn.danger { color: var(--alerte); border-color: #e2b7b3; }
.btn.lien { border: 0; background: none; padding: 4px 2px; color: var(--primaire); text-decoration: underline; font-weight: 500; }
.btn.petit { padding: 6px 10px; font-size: .84rem; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.large { width: 100%; }

/* Étiquettes */
.etq { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--neutre-fond); color: var(--neutre); white-space: nowrap; }
.etq svg { flex: none; }
.etq.ok { background: var(--ok-fond); color: var(--ok); }
.etq.attention { background: var(--attention-fond); color: var(--attention); }
.etq.alerte { background: var(--alerte-fond); color: var(--alerte); }
.etq.info { background: var(--primaire-clair); color: var(--primaire-fonce); }
.etq.contour { background: transparent; border: 1px solid var(--bord-fort); color: var(--encre-2); }

/* Formulaires */
.champ { display: grid; gap: 5px; }
.champ > span, .champ > legend { font-weight: 600; font-size: .9rem; }
.champ small { color: var(--encre-3); font-size: .8rem; }
fieldset.champ { border: 0; padding: 0; margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=tel], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--bord-fort); border-radius: 8px; background: #fff; min-height: 40px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid #b9d7e3; border-color: var(--primaire); }
.form { display: grid; gap: 16px; }
.form-grille { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.form h3 { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--bord); }
.form h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.coches { display: flex; flex-wrap: wrap; gap: 8px; }
.coche { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--bord-fort); border-radius: 999px; background: #fff; font-size: .9rem; cursor: pointer; }
.coche input { accent-color: var(--primaire); margin: 0; }
.radio-carte { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--bord-fort); border-radius: 10px; background: #fff; cursor: pointer; }
.radio-carte input { margin-top: 4px; accent-color: var(--primaire); }
.radio-carte strong { display: block; }
.radio-carte span { color: var(--encre-2); font-size: .88rem; }
.actions-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Messages d'information */
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--primaire-clair); color: var(--primaire-fonce); font-size: .92rem; align-items: flex-start; }
.note svg { flex: none; margin-top: 2px; }
.note.attention { background: var(--attention-fond); color: #6b4600; }
.note.ok { background: var(--ok-fond); color: var(--ok); }
.note.neutre { background: var(--neutre-fond); color: var(--encre-2); }
.note .btn { margin-top: 8px; }
.avenir { border: 1px dashed var(--bord-fort); background: repeating-linear-gradient(135deg, #fbf9f5, #fbf9f5 10px, #f4f0e8 10px, #f4f0e8 20px); color: var(--encre-2); border-radius: 10px; padding: 14px; font-size: .9rem; }
.avenir strong { color: var(--encre); }

/* Accueil */
.hero { background: linear-gradient(135deg, #14506b 0%, #0d3a4f 100%); color: #fff; border-radius: 18px; padding: clamp(24px, 5vw, 52px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 4.4vw, 2.9rem); }
.hero p { color: #d5e6ec; margin-top: 14px; font-size: 1.06rem; max-width: 52ch; }
.hero .rang { margin-top: 22px; }
.hero .btn { border-color: transparent; }
.hero .btn.clair { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.hero-ill { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: 16px; }
.hero-ill .ligne { display: flex; align-items: center; gap: 10px; background: #fff; color: var(--encre); border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.hero-ill .ligne + .ligne { margin-top: 8px; }
.hero-ill .ligne b { margin-left: auto; color: var(--ok); white-space: nowrap; }
.public { border-top: 4px solid var(--primaire); }
.public.b { border-top-color: var(--accent); }
.public.c { border-top-color: #7a6a2f; }
.public ul { margin: 10px 0 0; padding-left: 18px; color: var(--encre-2); font-size: .93rem; }
.public li + li { margin-top: 4px; }

/* Chiffres clés */
.chiffre { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; }
.chiffre .valeur { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chiffre .libelle { color: var(--encre-2); font-size: .9rem; margin-top: 2px; }
.chiffre .detail { color: var(--encre-3); font-size: .8rem; margin-top: 6px; }
a.chiffre { text-decoration: none; color: inherit; display: block; }
a.chiffre:hover { border-color: var(--primaire); }

/* Locaux */
.local { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.local .visuel { position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.local .visuel .etq { position: absolute; top: 10px; left: 10px; }
.local .visuel .score-coin { position: absolute; top: 10px; right: 10px; background: #fff; border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: .84rem; box-shadow: var(--ombre); }
.local .corps { padding: 14px 16px 16px; display: grid; gap: 8px; flex: 1; align-content: start; }
.local h3 { font-size: 1rem; }
.local .prix { font-weight: 700; }
.faits { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--encre-2); font-size: .88rem; }
.faits span { display: inline-flex; align-items: center; gap: 5px; }
.visuel-grand { border-radius: var(--rayon); aspect-ratio: 21 / 9; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.visuel-grand .mention { position: absolute; bottom: 10px; right: 12px; background: rgba(255, 255, 255, .85); border-radius: 6px; padding: 2px 8px; font-size: .76rem; color: var(--encre-2); }
.filtres { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); align-items: end; }
dl.fiche { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 0; margin: 0; font-size: .93rem; }
dl.fiche dt { color: var(--encre-2); padding: 8px 10px 8px 0; border-top: 1px solid var(--bord); }
dl.fiche dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--bord); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
dl.fiche dt:first-of-type, dl.fiche dd:first-of-type { border-top: 0; }
.caracs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.carac { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--bord); font-size: .9rem; }
.carac .etat { margin-left: auto; font-weight: 600; font-size: .8rem; }
.carac.oui .etat { color: var(--ok); }
.carac.non .etat { color: var(--alerte); }
.carac.inconnu .etat { color: var(--encre-3); }

/* Score de rapprochement */
.score { display: grid; gap: 8px; }
.score .tete { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.score .note-score { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.score .note-score small { font-size: .95rem; font-weight: 600; color: var(--encre-3); }
.barre { height: 10px; border-radius: 5px; background: #e8e3d8; display: flex; overflow: hidden; gap: 2px; }
.barre i { display: block; height: 100%; }
.barre .acquis { background: var(--primaire); border-radius: 5px 0 0 5px; }
.barre .inconnu { background: repeating-linear-gradient(135deg, #9fb7c2, #9fb7c2 4px, #d3e0e6 4px, #d3e0e6 8px); }
.legende { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .78rem; color: var(--encre-2); }
.legende span { display: inline-flex; align-items: center; gap: 5px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.raisons { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.raisons li { display: flex; gap: 8px; align-items: flex-start; }
.raisons .puce { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; margin-top: 1px; }
.raisons .c .puce { background: var(--ok-fond); color: var(--ok); }
.raisons .e .puce { background: var(--attention-fond); color: var(--attention); }
.raisons .m .puce { background: var(--neutre-fond); color: var(--neutre); }
.raisons .v .puce { background: var(--primaire-clair); color: var(--primaire-fonce); }
.raisons .b .puce { background: var(--alerte-fond); color: var(--alerte); }
.raisons .v, .raisons .m { color: var(--encre-2); }

/* Dossiers */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.etapes li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.etapes li:last-child { padding-bottom: 0; }
.etapes li::before { content: ""; position: absolute; left: 12px; top: 24px; bottom: 0; width: 2px; background: var(--bord); }
.etapes li:last-child::before { display: none; }
.etapes .pt { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bord-fort); background: #fff; display: flex; align-items: center; justify-content: center; font-size: .72rem; color: var(--encre-3); font-weight: 700; z-index: 1; }
.etapes .fait .pt { background: var(--ok); border-color: var(--ok); color: #fff; }
.etapes .fait::before { background: var(--ok); }
.etapes .courant .pt { border-color: var(--primaire); color: var(--primaire); box-shadow: 0 0 0 4px var(--primaire-clair); }
.etapes .courant strong { color: var(--primaire-fonce); }
.etapes .clos .pt { background: var(--alerte); border-color: var(--alerte); color: #fff; }
.etapes .a-venir { color: var(--encre-3); }
.etapes small { display: block; color: var(--encre-3); font-size: .8rem; }
.ligne-liste { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 14px 16px; text-decoration: none; color: inherit; border-top: 1px solid var(--bord); }
.ligne-liste:first-child { border-top: 0; }
a.ligne-liste:hover { background: var(--surface-2); }
.ligne-liste h3 { font-size: .98rem; }
.liste { padding: 0; overflow: hidden; }
.liste > h2, .liste > .entre { padding: 16px 16px 12px; margin: 0; }
.liste > .vide { margin: 0 16px 16px; }

/* Messagerie */
.fil-msg { display: grid; gap: 10px; max-height: 460px; overflow: auto; padding: 4px 2px; }
.msg { max-width: 82%; padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--neutre-fond); justify-self: start; }
.msg.moi-msg { background: var(--primaire); color: #fff; border-radius: 14px 14px 4px 14px; justify-self: end; }
.msg .qui { font-size: .74rem; font-weight: 600; opacity: .8; display: block; margin-bottom: 2px; }
.msg .quand { font-size: .7rem; opacity: .7; display: block; margin-top: 3px; }
.msg.systeme { background: none; justify-self: center; color: var(--encre-3); font-size: .8rem; padding: 2px; max-width: 100%; text-align: center; }
.ecrire { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.ecrire textarea { min-height: 44px; height: 44px; }

/* Notifications */
.notif { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--bord); align-items: start; }
.notif:first-of-type { border-top: 0; }
.notif .point { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: transparent; }
.notif.non-lue .point { background: var(--accent); }
.notif.non-lue h3 { font-weight: 700; }
.notif h3 { font-size: .96rem; font-weight: 500; }

/* Tableaux */
.table-defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; color: var(--encre-2); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 1px solid var(--bord-fort); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--bord); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* Fenêtre modale et messages éphémères */
.voile { position: fixed; inset: 0; background: rgba(28, 43, 51, .5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modale { background: #fff; border-radius: 14px; padding: 22px; width: min(520px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modale h2 { margin-bottom: 8px; }
.modale .form { margin-top: 14px; }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(520px, calc(100% - 24px)); }
.toast { background: #1c2b33; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; }
.toast.erreur { background: #8f1f18; }
.toast.ok { background: #175c3a; }

.pied { border-top: 1px solid var(--bord); background: var(--surface); color: var(--encre-2); font-size: .86rem; }
.pied-int { max-width: 1180px; margin: 0 auto; padding: 22px 16px; display: flex; gap: 10px 24px; flex-wrap: wrap; justify-content: space-between; }

.etapes-h { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; counter-reset: e; }
.etapes-h .carte { counter-increment: e; }
.etapes-h .carte::before { content: counter(e); display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-clair); color: var(--accent-fonce); font-weight: 700; align-items: center; justify-content: center; margin-bottom: 10px; }
.etapes-h p { color: var(--encre-2); font-size: .92rem; margin-top: 4px; }

@media (max-width: 880px) {
  .deux-col { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .entete-int { gap: 6px 10px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .moi .txt { display: none; }
  .bandeau label { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .bandeau select { flex: 1; width: auto; }
  .msg { max-width: 92%; }
  .ligne-liste { grid-template-columns: 1fr; }
  .ligne-liste > .etq, .ligne-liste > .btn, .ligne-liste > .rang { justify-self: start; }
  .chiffre { padding: 13px; }
  .chiffre .valeur { font-size: 1.6rem; }
  main { padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ───────────── Compléments propres à l'application réelle ───────────── */
[hidden] { display: none !important; }
.bandeau-lien { margin-left: auto; color: #ffd9a8; font-weight: 600; }
.liste-simple { margin: 0; padding-left: 20px; color: var(--encre-2); }
.liste-simple li + li { margin-top: 4px; }
.ligne-org { padding: 12px 0; border-top: 1px solid var(--bord); }
.ligne-org:first-of-type { border-top: 0; padding-top: 0; }
.coche input[type=radio] { accent-color: var(--primaire); }
.carte h3 svg, .carte h2 svg { vertical-align: -3px; }
.texte-libre { white-space: pre-line; overflow-wrap: anywhere; }
.pousse { flex: 1; }
.fil-etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fil-etapes button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--encre-2); border-radius: 999px; padding: 6px 12px 6px 6px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.fil-etapes button span { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: var(--neutre-fond); color: var(--encre-2); font-size: .8rem; }
.fil-etapes button.actif { background: var(--primaire-clair); border-color: var(--primaire); color: var(--primaire-fonce); }
.fil-etapes button.actif span { background: var(--primaire); color: #fff; }
.etape-fiche { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; min-width: 0; }
.etape-fiche > legend { font-weight: 700; font-size: 1.05rem; padding: 0; margin-bottom: 4px; }
.nav-etapes { justify-content: flex-start; align-items: center; }
.coches.defilant { max-height: 220px; overflow-y: auto; padding: 10px; border: 1px solid var(--bord-fort); border-radius: 10px; background: #fff; }
.filtre-liste { margin-bottom: 4px; }
.marques { justify-content: flex-end; flex-wrap: wrap; }
.ligne-liste > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.msg .texte-libre { display: block; }
.ecrire textarea { min-height: 72px; height: 72px; }
.outils .pastille-btn { flex: none; }
@media (min-width: 881px) { .nav a.petit-ecran { display: none; } }
.extrait { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.form h3 { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--bord); }
.form h3:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.note-interne { padding: 10px 12px; border: 1px solid var(--bord); border-radius: 10px; background: var(--neutre-fond); }
.note-interne .mini { margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.note-interne .btn.lien { padding: 0; min-height: 0; }
.carte textarea[name=texte] { min-height: 72px; }
.ligne-territoire { padding: 12px 0; border-top: 1px solid var(--bord); gap: 6px; }
.ligne-territoire:first-of-type { border-top: 0; padding-top: 4px; }
@media (min-width: 881px) { .entete-int { gap: 8px 14px; } .nav a { padding: 7px 9px; } .moi .txt { max-width: 150px; } }
/* Sur petit écran, les boutons d'une notification passent sous son texte au lieu de l'écraser. */
@media (max-width: 600px) { .notif { grid-template-columns: 10px minmax(0, 1fr); } .notif > .rang { grid-column: 2; } }
/* ───────────── Photos ───────────── */
.local .visuel.photo { background: var(--neutre-fond); }
.local .visuel.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.galerie { display: grid; gap: 8px; }
/* La photo choisie est montrée en entier (une photo en hauteur n'est pas rognée) ; les vignettes, elles, sont recadrées. */
.photo-grande { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: var(--rayon); background: var(--neutre-fond); display: block; }
.vignettes { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.vignettes button { flex: none; width: 84px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--neutre-fond); cursor: pointer; }
.vignettes button.actif { border-color: var(--primaire); }
.vignettes img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos-gestion { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.photos-gestion figure { margin: 0; }
.photos-gestion img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--neutre-fond); display: block; }
.photos-gestion figcaption { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; margin-top: 4px; font-size: .82rem; }
.photos-gestion .btn.lien, .ligne-doc .btn.lien { padding: 0; min-height: 0; }
.btn.depot { cursor: pointer; position: relative; }
.btn.depot.occupe { opacity: .6; cursor: progress; }
.btn.lien.doc { padding: 0; min-height: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.titre-page h1, .ligne-liste h3, .carte.local h3 { overflow-wrap: anywhere; }
.btn.depot:focus-within { outline: 2px solid var(--primaire); outline-offset: 2px; }
.ligne-doc { gap: 6px 12px; flex-wrap: wrap; }
.ligne-doc > span:first-child { min-width: 0; overflow-wrap: anywhere; }
/* ───────────── Carte ───────────── */
.carte-geo { position: relative; height: var(--h, 380px); overflow: hidden; border-radius: 10px; border: 1px solid var(--bord); background: #e9e6df; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
/* Sur un téléphone, la carte ne remplit pas l'écran : il reste de quoi faire défiler la page en la touchant autour. */
@media (max-width: 640px) { .carte-geo { height: min(var(--h, 380px), 320px); } }
.carte-geo[data-choix] { cursor: crosshair; }
.carte-fond { position: absolute; inset: 0; }
.carte-fond img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.repere { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; padding: 0; }
.repere.exacte { width: 22px; height: 22px; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
/* Position approchée : la zone où se trouve le local (jamais cliquable), et en son centre un point qui, lui, se choisit. */
.zone-approchee { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(20, 80, 107, .13); border: 2px dashed var(--primaire); pointer-events: none; }
.repere.approchee { width: 18px; height: 18px; background: #fff; border: 5px solid var(--primaire); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.repere.commune { width: 16px; height: 16px; border-radius: 4px; background: #fff; border: 3px solid var(--encre-2); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
button.repere { cursor: pointer; }
/* La surface qui réagit au doigt est plus large que le repère dessiné. */
button.repere::after { content: ''; position: absolute; inset: -12px; border-radius: 50%; }
button.repere:hover, button.repere:focus-visible { outline: 3px solid rgba(20, 80, 107, .45); outline-offset: 1px; }
.repere.choisi { background: var(--primaire); border-style: solid; border-color: #fff; box-shadow: 0 0 0 3px var(--primaire); }
.carte-zoom { position: absolute; top: 10px; right: 10px; display: grid; gap: 4px; }
.carte-zoom button { width: 34px; height: 34px; border: 1px solid var(--bord-fort); border-radius: 8px; background: #fff; font-size: 1.2rem; font-weight: 700; line-height: 1; cursor: pointer; color: var(--encre); }
.carte-zoom button:disabled { opacity: .45; cursor: default; }
.carte-source { position: absolute; right: 6px; bottom: 4px; background: rgba(255, 255, 255, .85); border-radius: 4px; padding: 1px 6px; font-size: .72rem; color: var(--encre-2); text-decoration: none; }
.legende-carte { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.legende-carte > span { display: inline-flex; align-items: flex-start; gap: 6px; }
.pastille-carte { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; }
.pastille-carte.exacte { background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--bord-fort); }
.pastille-carte.approchee { background: rgba(20, 80, 107, .13); border: 2px dashed var(--primaire); }
.pastille-carte.commune { border-radius: 3px; background: #fff; border: 2px solid var(--encre-2); }
.carte-locaux { display: grid; gap: 12px; }
.local-choisi .carte.local { max-width: 420px; }
.bascule { display: inline-flex; gap: 4px; }
.bascule .btn.actif { background: var(--primaire-clair); border-color: var(--primaire); color: var(--primaire-fonce); }
/* ───────────── Tableaux de bord ───────────── */
.histo { display: grid; gap: 8px; margin-top: 10px; }
.histo-ligne { display: grid; grid-template-columns: minmax(0, 11rem) minmax(40px, 1fr) 3.2rem; gap: 10px; align-items: center; font-size: .9rem; }
.histo-ligne .nom { color: var(--encre-2); overflow-wrap: anywhere; }
.histo-ligne .piste { height: 10px; border-radius: 999px; background: var(--neutre-fond); overflow: hidden; }
.histo-ligne .piste span { display: block; height: 100%; border-radius: 999px; background: var(--primaire); min-width: 2px; }
.histo-ligne .piste span.alerte { background: var(--accent); }
.histo-ligne .valeur { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.defile { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 10px; }
.tableau th, .tableau td { text-align: right; padding: 8px 10px; border-top: 1px solid var(--bord); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau th:first-child, .tableau td:first-child { text-align: left; white-space: normal; }
.tableau th { color: var(--encre-2); font-weight: 600; border-top: 0; }
@media (max-width: 600px) { .histo-ligne { grid-template-columns: minmax(0, 7.5rem) minmax(30px, 1fr) 2.6rem; } }
/* ───────────── Équipe ───────────── */
.ligne-membre { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--bord); }
.ligne-membre:first-child { border-top: 0; padding-top: 2px; }
.ligne-membre > div { min-width: 0; overflow-wrap: anywhere; }
.ligne-membre .commandes { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; }
.ligne-membre .btn.lien { padding: 0; min-height: 0; }
input.lien-invitation { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
/* ───────────── Pages légales ───────────── */
.page-legale { max-width: 820px; margin: 0 auto; display: grid; gap: 16px; }
.page-legale .carte p, .page-legale .carte li { color: var(--encre-2); }
mark.a-completer { background: #fff1c9; color: #6b4a00; border-radius: 4px; padding: 0 4px; }
.pied a { color: inherit; }

/* ───────────── Bandeau de la commune (espace des communes) ───────────── */
.espace-commune { background: var(--primaire-clair); border-bottom: 1px solid #c5dbe4; }
.espace-commune-int { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 12px 40px; }
.commune-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ecusson { width: 44px; height: 51px; flex: none; }
.ecusson path { fill: var(--primaire); }
.ecusson text { fill: #fff; font-family: var(--serif); font-size: 15px; font-weight: 700; }
.commune-nom { font-family: var(--serif); font-size: clamp(1.3rem, 3.2vw, 1.65rem); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--primaire-fonce); overflow-wrap: anywhere; }
.commune-service { color: var(--encre-2); font-size: .9rem; margin-top: 2px; overflow-wrap: anywhere; }
.blason { height: 51px; width: auto; flex: none; }
.blason.petit { height: 40px; }
.credits { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.credit-blason { display: flex; align-items: center; gap: 12px; }
.credit-blason span { min-width: 0; overflow-wrap: anywhere; }

/* ───────────── Recherche d'adresse (formulaire d'une fiche) ───────────── */
.propositions:empty { display: none; }
.propositions { display: grid; gap: 6px; margin-top: -8px; }
.propositions .pose { color: var(--ok); }
.propositions .pose svg { vertical-align: -2px; }
.propositions-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.proposition { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit); background: var(--surface); color: var(--encre); font: inherit; cursor: pointer; }
.proposition svg { flex: none; margin-top: 3px; color: var(--primaire); }
.proposition span { min-width: 0; overflow-wrap: anywhere; }
.proposition:hover, .proposition:focus-visible { border-color: var(--primaire); background: var(--primaire-clair); }

/* ───────────── Réseau des communes ───────────── */
.activites-recherchees { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 0; }
.activites-recherchees li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--bord); }
.activites-recherchees li:first-child { border-top: 0; }
.activites-recherchees li > div { min-width: 0; overflow-wrap: anywhere; }
.activites-recherchees + .form, .activites-recherchees + .mini, .vide + .form { margin-top: 14px; }
.communes-reseau { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.communes-reseau li { display: flex; align-items: center; gap: 12px; }
.communes-reseau li > div { display: grid; min-width: 0; overflow-wrap: anywhere; }
.communes-reseau .ecusson, .commune-id .ecusson { width: 35px; height: 40px; }
.espace-commune .commune-id .ecusson { width: 44px; height: 51px; }
.carte > .commune-id h2 { overflow-wrap: anywhere; }

/* ───────────── Réseau des communes : onglets, actualités, annuaire ───────────── */
.onglets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; border-bottom: 1px solid var(--bord); }
.onglets .onglet { padding: 8px 14px; border-radius: 10px 10px 0 0; text-decoration: none; color: var(--encre-2); font-weight: 600; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.onglets .onglet:hover { background: var(--surface-2); }
.onglets .onglet.actif { background: var(--surface); border-color: var(--bord); color: var(--primaire-fonce); }
@media (max-width: 520px) { .onglets { gap: 2px; } .onglets .onglet { padding: 8px 9px; font-size: 0.94rem; white-space: nowrap; } }
.actualite { display: grid; gap: 10px; }
.actualite h3 { overflow-wrap: anywhere; }
.actualite .commune-id > div { min-width: 0; }
.communes-reseau.annuaire li { align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--bord); }
.communes-reseau.annuaire li:first-child { border-top: 0; }
.communes-reseau.annuaire li > div > span { display: block; }
.groupe { padding: 10px 0; border-top: 1px solid var(--bord); }
.groupe:first-of-type { border-top: 0; }

/* ───────────── Administration : signalements, comptes ───────────── */
.signalement .motif { margin: 10px 0 6px; padding: 8px 12px; border-left: 3px solid var(--bord); background: var(--surface-2); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.compte h3 { overflow-wrap: anywhere; }
.compte .discret { overflow-wrap: anywhere; }
.recherche-comptes .rang { align-items: flex-end; flex-wrap: wrap; }
.sous-titre { font-size: 1.05rem; margin: 4px 0 0; }
.btn.danger.petit { padding: 6px 12px; }

/* Modification proposée sur une annonce en ligne : la valeur en ligne, barrée, puis la valeur proposée. */
dl.fiche.changements { margin-top: 10px; }
dl.fiche.changements .ancien { color: var(--encre-2); font-weight: 400; text-decoration: line-through; }
dl.fiche.changements .texte-libre { display: block; white-space: pre-wrap; font-weight: 500; }

/* Application mobile : étapes d'installation */
.etapes-installation { margin: 0 0 14px; padding-left: 22px; color: var(--encre-2); line-height: 1.55; }
.etapes-installation li + li { margin-top: 6px; }
details.carte > summary { cursor: pointer; font-weight: 600; }

/* ───────────── Barre du haut : menu de navigation (à gauche) et menu du compte (sous l'étiquette de la personne) ───────────── */
.entete-int { flex-wrap: nowrap; }
.logo { min-width: 0; }
.logo > span { min-width: 0; }
.logo small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-nav, .menu-compte { position: relative; flex: none; }
.menu-btn { display: inline-flex; align-items: center; gap: 6px; position: relative; min-height: 40px; padding: 6px 12px 6px 9px; border: 1px solid var(--bord-fort); border-radius: 10px; background: var(--surface); color: var(--encre); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--fond); }
.menu-btn .point { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
button.moi { border: 0; background: transparent; font: inherit; cursor: pointer; text-align: left; min-height: 40px; }
button.moi[aria-expanded="true"] { background: var(--fond); }
.moi .chevron { flex: none; color: var(--encre-3); }
.menu-panneau { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 250px; max-width: calc(100vw - 32px); max-height: calc(100vh - 90px); overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; box-shadow: 0 12px 32px rgba(28, 43, 51, .16); display: flex; flex-direction: column; }
.menu-panneau.a-droite { left: auto; right: 0; }
.menu-panneau a svg { flex: none; color: var(--encre-3); }
.menu-panneau a.actif svg { color: var(--primaire-fonce); }
.menu-panneau a, .menu-panneau button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--encre); text-decoration: none; font: inherit; font-size: .95rem; font-weight: 500; background: transparent; border: 0; text-align: left; cursor: pointer; white-space: nowrap; }
.menu-panneau a:hover, .menu-panneau button:hover, .menu-panneau a:focus-visible, .menu-panneau button:focus-visible { background: var(--fond); }
.menu-panneau a.actif { background: var(--primaire-clair); color: var(--primaire-fonce); font-weight: 600; }
.menu-qui { display: flex; align-items: center; gap: 10px; padding: 8px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--bord); font-size: .86rem; line-height: 1.3; }
.menu-qui > span { min-width: 0; }
.menu-qui span span { display: block; color: var(--encre-3); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.menu-panneau .menu-sortie { color: var(--alerte); border-top: 1px solid var(--bord); border-radius: 0 0 8px 8px; margin-top: 4px; }
@media (max-width: 880px) {
  .menu-libelle { display: none; }
  .menu-btn { padding: 6px 9px; }
  .logo small { max-width: 46vw; }
}
@media (max-width: 420px) {
  .logo svg { width: 30px; height: 30px; }
  .logo { gap: 8px; font-size: .95rem; }
  .entete-int { gap: 6px 8px; }
}
.logo > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .logo { font-size: .9rem; } .logo small { font-size: .64rem; } .outils { gap: 2px; } button.moi { padding: 4px; } }
.outils .btn { white-space: nowrap; }
/* Visiteur sur un petit téléphone : « Connexion » et « Créer un compte » prennent la place du nom, le logo reste. */
@media (max-width: 480px) { .entete.visiteur .logo > span { display: none; } }

/* ───────────── Barre du haut « Vitrine » : couleur de la marque, accroche, recherche, action principale ───────────── */
.entete.vitrine { background: var(--primaire); border-bottom: 0; color: #fff; }
.entete.vitrine .entete-int { padding-top: 12px; padding-bottom: 12px; gap: 14px; }
.entete.vitrine .logo { color: #fff; }
.entete.vitrine .logo > span { font-size: 1.08rem; line-height: 1.15; }
.entete.vitrine .logo small { color: #ffd9a8; text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 500; }
.entete.vitrine .menu-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); color: #fff; }
.entete.vitrine .menu-btn:hover, .entete.vitrine .menu-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .18); }
.entete.vitrine .menu-btn .point { box-shadow: 0 0 0 2px var(--primaire); }
.entete.vitrine .pastille-btn { color: #fff; }
.entete.vitrine .pastille-btn:hover { background: rgba(255, 255, 255, .12); }
.entete.vitrine .pastille-btn .compte { box-shadow: 0 0 0 2px var(--primaire); }
.entete.vitrine button.moi { color: #fff; background: rgba(255, 255, 255, .1); }
.entete.vitrine button.moi:hover, .entete.vitrine button.moi[aria-expanded="true"] { background: rgba(255, 255, 255, .2); }
.entete.vitrine button.moi > .avatar { background: #fff; color: var(--primaire); }
.entete.vitrine .moi .txt span { color: #cfe2ea; }
.entete.vitrine .moi .chevron { color: #fff; }
.entete.vitrine .outils .btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.entete.vitrine .outils .btn.primaire { background: #f0a35e; border-color: #f0a35e; color: var(--encre); }
.entete.vitrine .menu-panneau { color: var(--encre); }
.action-principale { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #f0a35e; border: 0; color: var(--encre); font-weight: 700; text-decoration: none; white-space: nowrap; }
.action-principale:hover { background: #ffb877; color: var(--encre); }
.entete .espace { flex: 1; }
.recherche-entete { flex: 1; min-width: 0; display: flex; justify-content: center; margin: 0; }
.champ-recherche { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 440px; min-height: 44px; padding: 0 16px; box-sizing: border-box; border-radius: 999px; background: #fff; color: var(--encre-2); border: 1px solid transparent; }
.champ-recherche:focus-within { box-shadow: 0 0 0 3px #ffd9a8; }
.champ-recherche input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: .92rem; color: var(--encre); padding: 0; min-height: 0; outline: none; box-shadow: none; }
.recherche-mobile { display: none; background: var(--primaire); padding: 0 16px 12px; }
.recherche-mobile .champ-recherche { max-width: none; }
@media (max-width: 1360px) { .entete.vitrine .moi .txt { display: none; } }
@media (max-width: 1100px) { .entete.vitrine .logo small { display: none; } }
@media (max-width: 980px) { .action-principale span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .action-principale { padding: 0 13px; } }
@media (max-width: 880px) {
  .recherche-entete.en-haut { display: none; }
  .entete .espace, .entete.vitrine .entete-int > .action-principale { display: none; }
  .recherche-mobile { display: block; }
  .entete.vitrine .logo small { display: block; max-width: 46vw; }
  .entete.vitrine .logo { flex: 1; }
}
@media (max-width: 420px) { .entete.vitrine .logo small { display: none; } }
/* L'action principale, cachée de la barre sur téléphone, ouvre le menu de navigation. */
.menu-panneau .menu-action { display: none; background: #fdf1e4; color: var(--encre); font-weight: 700; margin-bottom: 4px; }
@media (max-width: 880px) { .menu-panneau .menu-action { display: flex; } }

/* ───────────── Menu en colonne à gauche, sur ordinateur (personne connectée) ───────────── */
.menu-lateral { display: none; }
@media (min-width: 1100px) {
  #app:has(.menu-lateral) { padding-left: 236px; }
  #app:has(.menu-lateral) .menu-nav { display: none; }
  .menu-lateral { display: flex; flex-direction: column; gap: 2px; position: fixed; top: 0; left: 0; bottom: 0; z-index: 25; width: 236px; padding: 12px 12px 20px; overflow-y: auto; background: var(--primaire); border-right: 1px solid rgba(255, 255, 255, .12); color: #fff; }
  .entete.vitrine .entete-int { min-height: 68px; box-sizing: border-box; }
  .menu-lateral a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #e8f1f4; text-decoration: none; font-size: .95rem; font-weight: 500; }
  .menu-lateral a svg { flex: none; opacity: .85; }
  .menu-lateral a.actif svg { opacity: 1; }
  /* Logo et accroche en tête de colonne ; la barre du haut ne les répète pas. */
  .menu-lateral a.logo-lateral { gap: 10px; padding: 4px 6px 14px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .15); border-radius: 0; color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.2; min-height: 52px; }
  .menu-lateral a.logo-lateral:hover { background: transparent; }
  .menu-lateral a.logo-lateral svg { opacity: 1; width: 36px; height: 36px; }
  .menu-lateral .logo-lateral small { display: block; color: #ffd9a8; font-size: .74rem; font-weight: 500; }
  #app:has(.menu-lateral) .entete .entete-int > .logo { display: none; }
  .menu-lateral a:hover, .menu-lateral a:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
  .menu-lateral a:focus-visible { outline: 2px solid #ffd9a8; outline-offset: 1px; }
  .menu-lateral a.actif { background: #fff; color: var(--primaire-fonce); font-weight: 600; }
}


/* ───────────── Tâches de l'équipe d'une mairie ───────────── */
.taches { display: flex; flex-direction: column; margin-top: 6px; }
.ligne-tache { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--bord); }
.ligne-tache:first-child { border-top: 0; }
.ligne-tache .corps-tache { flex: 1; min-width: 0; }
.ligne-tache .corps-tache a { text-decoration: none; color: var(--encre); }
.ligne-tache .corps-tache a:hover strong { text-decoration: underline; }
.ligne-tache .corps-tache .mini a { color: inherit; text-decoration: underline; }
.ligne-tache.faite .corps-tache strong { text-decoration: line-through; color: var(--encre-2); }
.case-tache { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; border: 2px solid var(--primaire); background: var(--surface); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.case-tache:hover { background: var(--surface-2); }
.case-tache.cochee { background: var(--primaire); }
.case-tache.inerte { cursor: default; border-color: var(--bord); }
.case-tache.inerte.cochee { background: var(--encre-2); border-color: var(--encre-2); }
.onglets button.onglet { background: none; cursor: pointer; font: inherit; }
.pieces { list-style: none; margin: 8px 0 0; padding: 0; }
.pieces li { padding: 8px 0; border-top: 1px solid var(--bord); }
.pieces li:first-child { border-top: 0; }
.pieces li .btn.doc { padding: 0; text-align: left; word-break: break-word; }
.pieces li .mini .btn { padding: 0; min-height: 0; vertical-align: baseline; }

/* ───────────── Accueil : une rue commerçante en fond du cadre ─────────────
   Un voile bleu, plus dense sous le texte (à gauche) qu'à droite où l'on devine les vitrines : le texte blanc reste lisible
   (contraste vérifié sur les zones les plus claires de la photo). Sur téléphone, le voile est uniforme. */
.hero {
  background:
    linear-gradient(100deg, rgba(10, 46, 64, .94) 0%, rgba(13, 58, 79, .88) 42%, rgba(13, 58, 79, .62) 72%, rgba(13, 58, 79, .5) 100%),
    url('/images/accueil-rue.jpg') right center / cover no-repeat,
    #14506b;
}
.hero h1, .hero p { text-shadow: 0 1px 12px rgba(5, 25, 36, .55); }
.hero p { color: #e6f0f4; }
.hero-ill { background: rgba(10, 46, 64, .45); border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(3px); }
@media (max-width: 900px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(10, 46, 64, .9) 0%, rgba(13, 58, 79, .86) 100%),
      url('/images/accueil-rue-900.jpg') 70% center / cover no-repeat,
      #14506b;
  }
}

/* ───────────── Manager de centre-ville ───────────── */
/* Le titre d'une section du menu, sous un trait. */
.menu-section { margin: 10px 4px 4px; padding-top: 12px; border-top: 1px solid var(--bord); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-2); }
.menu-lateral .menu-section { border-top-color: rgba(255, 255, 255, .28); color: rgba(255, 255, 255, .78); margin: 12px 12px 4px; }
.chiffres-registre { margin-bottom: 14px; }
.chiffres-registre button.chiffre { text-align: left; font: inherit; cursor: pointer; border: 1px solid var(--bord); background: var(--surface); }
.filtres-registre { margin-bottom: 14px; }
.historique-commerce { list-style: none; margin: 8px 0 0; padding: 0; }
.historique-commerce li { padding: 8px 0; border-top: 1px solid var(--bord); display: flex; flex-direction: column; gap: 2px; }
.historique-commerce li:first-child { border-top: 0; }
/* Fiches de suivi : éléments (échanges, demandes) et étiquettes de visibilité, reconnaissables d'un coup d'œil. */
.element-relation { padding: 10px 0; border-top: 1px solid var(--bord); display: flex; flex-direction: column; gap: 4px; }
.element-relation:first-child { border-top: 0; }
.contact-relation { padding: 6px 0; }
.etq.visibilite-interne { background: #eef0f2; color: #3c4a55; border-color: #d3d9de; }
.etq.visibilite-partageable { background: #e6f4ea; color: #1d6b3a; }
.etq.visibilite-reseau { background: #e3eefb; color: #1f4f8a; }

/* Plan d'action (Manager de centre-ville) */
.action-plan { padding: 10px 0; border-top: 1px solid var(--bord); display: flex; flex-direction: column; gap: 4px; }
.action-plan:first-child { border-top: 0; }
.action-plan.en-retard { box-shadow: inset 3px 0 0 var(--alerte); padding-left: 10px; }
.action-plan.choisie { background: var(--attention-fond); border-radius: 8px; padding: 10px; }
.barre-avancement { height: 6px; border-radius: 3px; background: var(--neutre-fond); overflow: hidden; margin: 8px 0 4px; }
.barre-avancement span { display: block; height: 100%; background: var(--ok); }
.carte.carte-retard { border-color: var(--alerte); }
.tableau-plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.colonne-plan { background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; padding: 12px; min-width: 0; }
.colonne-plan h2 { font-size: 1rem; margin-bottom: 4px; }
.colonne-plan .action-plan .marques { flex-wrap: wrap; }
@media (max-width: 1000px) { .tableau-plan { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tableau-plan { grid-template-columns: 1fr; } }
/* ───────────── Charte « Cœur de Commerce » (celle de coeurdecommerce.com) ─────────────
   Vert sapin (encre), vert profond (actions), crème (fond), vert tilleul (accents clairs), olive (le cœur) ; titres en
   Georgia, sans graisse, serrés ; texte en Arial. Ce fichier vient après les autres feuilles : il en reprend les couleurs.
   La maquette de démonstration (/demo/) garde son ancienne apparence. */
:root {
  --encre: #173e35;
  --encre-2: #4d5f57;
  --encre-3: #64736c;
  --fond: #f6f4ed;
  --surface: #ffffff;
  --surface-2: #fafaf5;
  --bord: #dce1d5;
  --bord-fort: #bac7b7;
  --primaire: #245b49;
  --primaire-fonce: #173e35;
  --primaire-clair: #e6ecda;
  --accent: #5f7a35;
  --accent-fonce: #4b6229;
  --accent-clair: #edf3df;
  --tilleul: #d7e7ad;
  --olive: #779646;
  --ok: #2f6b3c;
  --ok-fond: #e5efda;
  --rayon: 12px;
  --rayon-petit: 6px;
  --ombre: 0 1px 2px rgba(23, 62, 53, .05), 0 7px 25px rgba(22, 62, 53, .05);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}
body { font: 16px/1.55 var(--sans); }
h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -.03em; line-height: 1.1; }
h1 em { font-style: italic; color: var(--olive); }
.commune-nom { font-weight: 400; letter-spacing: -.02em; }
:focus-visible { outline: 3px solid #8ba956; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--tilleul); border-color: var(--primaire); }

/* Boutons : coins de 6 px, gras ; l'action claire en tilleul */
.btn { border-radius: 6px; font-weight: 700; }
.btn.petit { border-radius: 6px; }
.btn.tilleul { background: var(--tilleul); border-color: var(--tilleul); color: var(--encre); }
.coche { border-color: var(--bord-fort); }
.onglets .onglet.actif { color: var(--primaire); }

/* Barre du haut et colonne du menu : vert sapin, accents tilleul */
.entete.vitrine, .recherche-mobile, .menu-lateral { background: var(--encre); }
.entete.vitrine .logo > span, .menu-lateral a.logo-lateral > span { font-weight: 800; letter-spacing: -.03em; }
.entete.vitrine .logo small, .menu-lateral .logo-lateral small { color: var(--tilleul); letter-spacing: 0; }
.entete.vitrine .menu-btn .point, .entete.vitrine .pastille-btn .compte { box-shadow: 0 0 0 2px var(--encre); }
.entete.vitrine .moi .txt span { color: #c6d5ca; }
.entete.vitrine button.moi > .avatar { color: var(--encre); }
.entete.vitrine .outils .btn.primaire, .action-principale { background: var(--tilleul); border-color: var(--tilleul); color: var(--encre); border-radius: 6px; }
.action-principale:hover { background: #e4efc4; color: var(--encre); }
.champ-recherche:focus-within { box-shadow: 0 0 0 3px var(--tilleul); }
.menu-panneau .menu-action { background: var(--accent-clair); }
.menu-lateral a { color: #e9eee1; }
.menu-lateral a:focus-visible { outline-color: var(--tilleul); }
.menu-lateral a.actif { color: var(--encre); }
.pastille-btn .compte { background: var(--accent); }

/* Accueil : la rue commerçante sous un voile vert sapin ; le mot en italique, en tilleul */
.hero {
  background:
    linear-gradient(100deg, rgba(16, 45, 38, .95) 0%, rgba(23, 62, 53, .89) 42%, rgba(23, 62, 53, .64) 72%, rgba(23, 62, 53, .52) 100%),
    url('/images/accueil-rue.jpg') right center / cover no-repeat,
    #173e35;
}
.hero h1 { font-weight: 400; letter-spacing: -.03em; }
.hero h1 em { color: var(--tilleul); }
.hero h1, .hero p { text-shadow: 0 1px 12px rgba(8, 28, 23, .55); }
.hero p { color: #e9eee1; }
.hero .btn.accent, .hero .btn.primaire { background: var(--tilleul); border-color: var(--tilleul); color: var(--encre); }
.hero .btn.accent:hover, .hero .btn.primaire:hover { background: #e4efc4; }
.hero .btn.clair { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.hero-ill { background: rgba(16, 45, 38, .45); }
@media (max-width: 900px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(16, 45, 38, .92) 0%, rgba(23, 62, 53, .87) 100%),
      url('/images/accueil-rue-900.jpg') 70% center / cover no-repeat,
      #173e35;
  }
}

/* Petites marques : le surtitre en olive, comme sur le site */
.surtitre { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #66824b; }
.hero .surtitre { color: var(--tilleul); }
.toast { background: var(--encre); }
.msg.moi-msg { background: var(--primaire); }
.barre-avancement span { background: var(--olive); }
.voile { background: rgba(23, 62, 53, .5); }
.zone-approchee, .pastille-carte.approchee { background: rgba(36, 91, 73, .13); }
button.repere:hover, button.repere:focus-visible { outline-color: rgba(36, 91, 73, .45); }
