/* ==========================================================================
   Back-office
   Meme charte que le site public, mais densite d'outil de travail : plus de
   donnees a l'ecran, moins de respiration.
   ========================================================================== */

.gestion { background: var(--gris-clair); }

.gestion__entete {
  background: var(--blanc); border-bottom: 1px solid var(--bord);
  position: sticky; top: 0; z-index: 50;
}
/* La barre compte onze rubriques : au-dela d'un certain gabarit d'ecran elle
   ne tient plus sur une ligne. Sans `wrap`, les libelles se cassaient au
   milieu des mots — « Tableau / de / bord » sur trois lignes — et le lien de
   deconnexion sortait de l'ecran. On prefere une seconde ligne propre. */
.gestion__interieur {
  display: flex; align-items: center; gap: var(--p5); flex-wrap: wrap;
  max-width: 1320px; margin-inline: auto; padding: var(--p3) var(--p5);
}
.gestion__marque { display: flex; align-items: center; gap: .6rem;
                   text-decoration: none; color: var(--noir); flex: none; }
.gestion__marque img { width: 76px; height: auto; }
.gestion__marque span { font-weight: 600; font-size: .92rem; color: var(--gris-texte);
                        border-left: 1px solid var(--bord); padding-left: .6rem; }
.gestion__nav { display: flex; gap: var(--p4); margin-left: var(--p4);
                flex-wrap: wrap; row-gap: .35rem; }
.gestion__nav a { font-size: .94rem; font-weight: 500; color: var(--corps);
                  text-decoration: none; padding: .4rem 0; white-space: nowrap; }
.gestion__nav a:hover, .gestion__nav a[aria-current] { color: var(--rouge); }
/* Familles du référentiel : un intitulé discret suffit à découper la liste,
   sans la transformer en accordéon qu'il faudrait déplier case par case. */
.cases-equipements__famille {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gris-texte); margin: var(--p4) 0 var(--p2);
}
.cases-equipements__famille:first-of-type { margin-top: var(--p2); }

/* --- répertoire des partenaires ----------------------------------------
   Une fiche par partenaire, enregistrée seule. La jauge n'est pas un
   ornement : c'est elle qui fait terminer une corvée de quatre-vingts
   lignes. */
.avancement__chiffres { font-size: 1.05rem; color: var(--noir); }
.avancement__chiffres strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.avancement__chiffres span { color: var(--gris-texte); font-size: .92rem; }
.avancement__jauge {
  height: 8px; border-radius: 99px; background: var(--bord-tenu);
  margin: var(--p3) 0 var(--p3); overflow: hidden;
}
.avancement__jauge span {
  display: block; height: 100%; background: var(--vert);
  border-radius: 99px; transition: width .3s;
}

.fiche-partenaire { padding-block: var(--p4); }
.fiche-partenaire--ecarte { opacity: .55; }
.fiche-partenaire__reperes {
  display: flex; gap: var(--p3); align-items: baseline;
  margin-bottom: var(--p3);
}
.fiche-partenaire__lieu {
  font-size: .82rem; color: var(--gris-texte); margin-top: .15rem;
}
/* Les champs s'alignent sur une grille qui se replie : à trois cents pixels
   de large, chacun prend toute la ligne plutôt que de se réduire à un
   timbre-poste. */
.fiche-partenaire__forme {
  display: grid; gap: var(--p3);
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  align-items: end;
}
.fiche-partenaire__forme label { display: grid; gap: .2rem; }
.fiche-partenaire__forme label > span {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--gris-texte);
}
.fiche-partenaire__forme input[type="text"],
.fiche-partenaire__forme input[type="email"] { width: 100%; }
.fiche-partenaire__note { grid-column: span 2; }
.fiche-partenaire__actions {
  display: flex; align-items: center; gap: var(--p3); justify-content: flex-end;
}
@media (max-width: 700px) {
  .fiche-partenaire__note { grid-column: auto; }
  .fiche-partenaire__actions { justify-content: space-between; }
}

/* Le tiroir « Plus ». Bâti sur <details> : il s'ouvre et se ferme sans une
   ligne de JavaScript, se referme à la touche Échap comme tout élément natif,
   et reste utilisable au clavier sans qu'on ait à s'en occuper. */
.tiroir { position: relative; }
.tiroir > summary {
  cursor: pointer; font-size: .94rem; font-weight: 500; color: var(--corps);
  padding: .4rem 0; list-style: none; white-space: nowrap; user-select: none;
}
.tiroir > summary::-webkit-details-marker { display: none; }
.tiroir > summary::after { content: ' ▾'; font-size: .8em; opacity: .6; }
.tiroir[open] > summary, .tiroir > summary:hover { color: var(--rouge); }

.tiroir__contenu {
  position: absolute; z-index: 40; top: 100%; left: 0; min-width: 15rem;
  background: var(--blanc, #fff); border: 1px solid var(--bord);
  border-radius: var(--r-carte); box-shadow: 0 8px 28px rgba(42, 38, 34, .14);
  padding: var(--p3); display: grid; gap: var(--p3);
}
.tiroir__groupe { display: grid; gap: .1rem; }
.tiroir__groupe + .tiroir__groupe {
  border-top: 1px solid var(--bord-tenu); padding-top: var(--p3);
}
.tiroir__titre {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--gris-texte); padding: .2rem 0 .3rem;
}
.tiroir__contenu a { padding: .3rem 0; }

/* Sur un écran étroit, un menu flottant sort de la fenêtre : il se déplie
   dans le flux, ce qui pousse le contenu vers le bas plutôt que de le cacher. */
@media (max-width: 860px) {
  .tiroir__contenu { position: static; box-shadow: none; border: 0;
                     padding-inline: 0; min-width: 0; }
}

.gestion__compte { margin-left: auto; display: flex; align-items: center; gap: var(--p4);
                   font-size: .86rem; color: var(--gris-texte); }
.gestion__compte a { color: var(--rouge); text-decoration: none; }

.gestion__corps { max-width: 1320px; margin-inline: auto; padding: var(--p6) var(--p5) var(--p9); }

/* --- entête de page ---------------------------------------------------- */
.page__entete { display: flex; flex-wrap: wrap; gap: var(--p4);
                align-items: end; justify-content: space-between; margin-bottom: var(--p5); }
.page__entete h1 { font-size: 1.6rem; }
.page__entete .chapo { margin-top: .3rem; }

/* --- cartes ------------------------------------------------------------ */
.panneau { background: var(--blanc); border: 1px solid var(--bord);
           border-radius: var(--r-carte); padding: var(--p5); margin-bottom: var(--p4); }
.panneau > h2 { font-size: 1.1rem; margin-bottom: var(--p4); }

/* --- indicateurs ------------------------------------------------------- */
.indicateurs { display: grid; gap: var(--p4); margin-bottom: var(--p5);
               grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.indicateur { background: var(--blanc); border: 1px solid var(--bord);
              border-radius: var(--r-carte); padding: var(--p4); }
.indicateur__valeur { font-size: 1.9rem; font-weight: 600; color: var(--noir);
                      line-height: 1.1; font-variant-numeric: tabular-nums; }
.indicateur__valeur--accent { color: var(--rouge); }
.indicateur__libelle { font-size: .82rem; color: var(--gris-texte); margin-top: .15rem; }
.indicateur__note { font-size: .74rem; color: var(--gris-texte); margin-top: .3rem; }

/* --- tableau ----------------------------------------------------------- */
.tableau { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tableau th { text-align: left; font-size: .72rem; text-transform: uppercase;
              letter-spacing: .07em; color: var(--gris-texte); font-weight: 600;
              padding: 0 .6rem .6rem; border-bottom: 1px solid var(--bord); }
.tableau td { padding: .8rem .6rem; border-bottom: 1px solid var(--bord-tenu);
              vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau td.n, .tableau th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tableau a { color: var(--noir); text-decoration: none; font-weight: 500; }
.tableau a:hover { color: var(--rouge); }
.tableau__vide { text-align: center; color: var(--gris-texte); padding: var(--p7) 0; }
.tableau-defilant { overflow-x: auto; margin-inline: calc(var(--p5) * -1);
                    padding-inline: var(--p5); }

/* --- pastilles de statut ---------------------------------------------- */
.pastille { display: inline-flex; align-items: center; gap: .35rem;
            padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.pastille--active { background: #eaf3ec; color: var(--vert); }
.pastille--brouillon { background: var(--gris-clair); color: var(--gris-texte); }
.pastille--terminee { background: #eef2f7; color: #5b6474; }
.pastille--archivee { background: var(--gris-clair); color: var(--gris-texte); }

/* --- code de lien ------------------------------------------------------ */
.code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .84rem; background: var(--gris-clair); border: 1px solid var(--bord);
  border-radius: 5px; padding: 3px 8px; color: var(--corps);
}
.lien-trace { display: flex; flex-wrap: wrap; gap: var(--p3); align-items: center;
              padding: var(--p3) 0; border-bottom: 1px solid var(--bord-tenu); }
.lien-trace:last-child { border-bottom: 0; }
.lien-trace__url { flex: 1; min-width: 220px; }
.lien-trace__clics { font-weight: 600; font-variant-numeric: tabular-nums; }
.lien-trace--inactif { opacity: .5; }

/* --- formulaire -------------------------------------------------------- */
/* `align-items: start` est indispensable : sans lui la grille etire chaque
   cellule a la hauteur de la plus haute, et comme `.champ` est lui-meme une
   grille, c'est son `input` qui absorbe la difference. Un champ sans texte
   d'aide se retrouvait avec une zone de saisie de 69 px face aux 47 px de ses
   voisins — trois hauteurs sur une meme ligne. */
.grille-champs { display: grid; gap: var(--p4); align-items: start;
                 grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grille-champs > .champ { margin-bottom: 0; }

/* Hauteur figee pour les controles d'une seule ligne : un <select> et un
   <input> ne se dimensionnent pas pareil par defaut, et 3 px d'ecart se
   voient des qu'ils sont cote a cote. La cible depasse 44 px, minimum
   confortable pour une cible tactile. */
.champ input:not([type="checkbox"]):not([type="radio"]),
.champ select {
  height: 46px; padding-block: 0;
}
.champ textarea { min-height: 90px; padding-block: .6rem; }
.grille-champs--large { grid-column: 1 / -1; }
.champ__aide { font-size: .76rem; color: var(--gris-texte); margin-top: .2rem; }
.actions { display: flex; flex-wrap: wrap; gap: var(--p3); margin-top: var(--p5);
           padding-top: var(--p5); border-top: 1px solid var(--bord-tenu); }

/* --- connexion --------------------------------------------------------- */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: var(--p5); }
.connexion__carte { background: var(--blanc); border: 1px solid var(--bord);
                    border-radius: var(--r-carte); padding: var(--p6);
                    width: 100%; max-width: 380px; box-shadow: var(--ombre-carte); }
.connexion__logo { width: 120px; margin: 0 auto var(--p5); display: block; }
.connexion__titre { font-size: 1.15rem; margin: 0 0 var(--p3); text-align: center; }
.connexion__aide { font-size: .86rem; color: var(--gris-texte);
                   margin: 0 0 var(--p4); line-height: 1.5; }
.connexion__retour { margin: var(--p4) 0 0; text-align: center; font-size: .86rem; }
/* Le lien vers l'oubli se place sous le champ, aligne a droite : c'est la
   qu'on le cherche quand la saisie vient d'echouer. */
.connexion__oubli { display: block; text-align: right; font-size: .8rem;
                    margin-top: .3rem; color: var(--gris-texte); }

/* --- avertissement ----------------------------------------------------- */
.note-attention {
  background: #fff8ec; border: 1px solid #e8c98a; border-radius: var(--r-carte);
  padding: var(--p4); font-size: .9rem; color: #6b4d16; margin-bottom: var(--p4);
}
.note-attention strong { color: #4d3610; }

@media (max-width: 860px) {
  .gestion__interieur { flex-wrap: wrap; gap: var(--p3); }
  .gestion__compte { width: 100%; margin-left: 0; justify-content: space-between; }
  .gestion__corps { padding: var(--p5) var(--p4) var(--p8); }
  .panneau { padding: var(--p4); }
  .tableau-defilant { margin-inline: calc(var(--p4) * -1); padding-inline: var(--p4); }
}

/* --- tableau de bord ---------------------------------------------------- */
.periodes { display: flex; gap: .4rem; }
.periodes a { text-decoration: none; }

.deux-panneaux { display: grid; gap: var(--p4);
                 grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 940px) { .deux-panneaux { grid-template-columns: 1fr; } }

.indicateur__valeur--alerte { color: var(--rouge); }
.indicateur__note a { color: var(--rouge); text-decoration: none; }

.evolution { font-size: .74rem; font-weight: 600; padding: 1px 6px;
             border-radius: 999px; margin-left: .3rem; }
.evolution--hausse { background: #eaf3ec; color: var(--vert); }
.evolution--baisse { background: var(--rouge-voile); color: var(--rouge); }

/* --- barres ------------------------------------------------------------- */
.barres { display: grid; gap: .7rem; }
.barre { display: grid; grid-template-columns: 130px 1fr auto; gap: var(--p3);
         align-items: center; font-size: .88rem; }
.barre__libelle { color: var(--corps); text-transform: capitalize;
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre__piste { background: var(--gris-clair); border-radius: 999px; height: 8px; }
.barre__valeur { background: var(--rouge); border-radius: 999px; height: 100%;
                 min-width: 3px; }
.barre__nombre { font-weight: 600; font-variant-numeric: tabular-nums;
                 min-width: 58px; text-align: right; }
@media (max-width: 560px) { .barre { grid-template-columns: 96px 1fr auto; } }

/* --- filtres ------------------------------------------------------------ */
.filtres { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: var(--p4); }
.filtres a { text-decoration: none; text-transform: capitalize; }

/* --- pastilles de statut de demande ------------------------------------- */
.pastille--nouveau { background: var(--rouge-voile); color: var(--rouge); }
.pastille--contacte { background: #eef4fb; color: #2a5f96; }
.pastille--en_discussion { background: #fff5e6; color: #8a5b13; }
.pastille--converti { background: #eaf3ec; color: var(--vert); }
.pastille--perdu { background: var(--gris-clair); color: var(--gris-texte); }

/* --- fiche de donnees --------------------------------------------------- */
.fiche-donnees { display: grid; grid-template-columns: 128px 1fr; gap: .55rem var(--p4);
                 font-size: .92rem; margin: 0; }
.fiche-donnees dt { color: var(--gris-texte); font-size: .84rem; }
.fiche-donnees dd { margin: 0; color: var(--corps); }
@media (max-width: 560px) { .fiche-donnees { grid-template-columns: 1fr; gap: .2rem; }
                            .fiche-donnees dd { margin-bottom: .6rem; } }

/* --- chronologie -------------------------------------------------------- */
.chronologie { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--p3); }
.chronologie li { display: grid; grid-template-columns: 88px 1fr; gap: var(--p3);
                  font-size: .88rem; padding-bottom: var(--p3);
                  border-bottom: 1px solid var(--bord-tenu); }
.chronologie li:last-child { border-bottom: 0; padding-bottom: 0; }
.chronologie__date { color: var(--gris-texte); font-size: .8rem; }
.chronologie__note { color: var(--gris-texte); font-size: .84rem; margin-top: .15rem; }

/* --- taux de conversion ------------------------------------------------- */
.taux--bon { color: var(--vert); font-weight: 600; }
.taux--faible { color: var(--rouge); font-weight: 600; }

/* --- moderation des avis ------------------------------------------------ */
.liste-moderation { display: grid; gap: var(--p4); }
.moderation { display: grid; grid-template-columns: 1fr 300px; gap: var(--p4);
              padding-bottom: var(--p4); border-bottom: 1px solid var(--bord-tenu);
              align-items: start; }
.moderation:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 860px) { .moderation { grid-template-columns: 1fr; } }
.moderation__entete { display: flex; flex-wrap: wrap; gap: .5rem;
                      align-items: center; font-size: .9rem; }
.pastille--invite { background: var(--gris-clair); color: var(--gris-texte); }
.pastille--en_attente { background: #fff5e6; color: #8a5b13; }
.pastille--publie { background: #eaf3ec; color: var(--vert); }
.pastille--rejete { background: var(--rouge-voile); color: var(--rouge); }

/* --- diagnostic de fiche ------------------------------------------------ */
.score-pastille { display: inline-grid; place-items: center; width: 40px; height: 40px;
                  border-radius: 50%; font-weight: 600; font-size: .9rem; }
.score-pastille--bon    { background: #eaf3ec; color: var(--vert); }
.score-pastille--moyen  { background: #fff5e6; color: #8a5b13; }
.score-pastille--faible { background: var(--rouge-voile); color: var(--rouge); }

.rapport { max-width: 820px; margin-inline: auto; padding: var(--p6) var(--p5) var(--p9); }
.rapport__entete { text-align: center; padding-bottom: var(--p6); }
.rapport__logo { width: 120px; margin: 0 auto var(--p5); }
.rapport__entete h1 { font-size: 1.6rem; margin-top: .3rem; }
.rapport__entete .chapo { margin: .4rem auto 0; }

.rapport__score { background: var(--blanc); border: 1px solid var(--bord);
                  border-radius: var(--r-carte); padding: var(--p6);
                  margin-bottom: var(--p4); display: grid; gap: var(--p6);
                  grid-template-columns: 240px 1fr; align-items: center; }
@media (max-width: 720px) { .rapport__score { grid-template-columns: 1fr; } }
.rapport__score--bon    { border-top: 4px solid var(--vert); }
.rapport__score--moyen  { border-top: 4px solid #E8A33D; }
.rapport__score--faible { border-top: 4px solid var(--rouge); }

.jauge-score { text-align: center; }
.jauge-score__valeur { font-size: 3.2rem; font-weight: 600; color: var(--noir);
                       line-height: 1; }
.jauge-score__valeur span { font-size: 1.1rem; color: var(--gris-texte); }
.jauge-score__piste { background: var(--gris-clair); border-radius: 999px;
                      height: 8px; margin: var(--p3) 0 .4rem; overflow: hidden; }
.jauge-score__barre { background: var(--rouge); height: 100%; border-radius: 999px; }
.rapport__score--bon .jauge-score__barre { background: var(--vert); }
.rapport__score--moyen .jauge-score__barre { background: #E8A33D; }
.jauge-score__mention { font-size: .9rem; font-weight: 600; color: var(--corps); }

.rapport__perf { display: grid; grid-template-columns: repeat(3, 1fr);
                 gap: var(--p4); text-align: center; }
.rapport__perf-valeur { display: block; font-size: 1.7rem; font-weight: 600;
                        color: var(--noir); line-height: 1.1; }
.rapport__perf-libelle { font-size: .78rem; color: var(--gris-texte); }

.ameliorations { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--p4); }
.amelioration { display: grid; grid-template-columns: 34px 1fr auto; gap: var(--p4);
                align-items: start; padding-bottom: var(--p4);
                border-bottom: 1px solid var(--bord-tenu); }
.amelioration:last-child { border-bottom: 0; padding-bottom: 0; }
.amelioration__rang { width: 30px; height: 30px; border-radius: 50%;
                      background: var(--rouge); color: var(--blanc);
                      display: grid; place-items: center; font-weight: 600;
                      font-size: .85rem; }
.amelioration__titre { font-weight: 600; color: var(--noir); font-size: .98rem; }
.amelioration__constat { font-weight: 400; color: var(--gris-texte); font-size: .88rem; }
.amelioration__consequence { color: var(--gris-texte); font-size: .88rem; margin-top: .2rem; }
.amelioration__action { color: var(--vert); font-size: .88rem; font-weight: 500;
                        margin-top: .3rem; }
.amelioration__gain { font-weight: 600; color: var(--gris-texte); font-size: .84rem;
                      white-space: nowrap; }

.acquis { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem;
          font-size: .92rem; }
.acquis__marque { color: var(--vert); font-weight: 700; margin-right: .3rem; }

.rapport__pied { margin-top: var(--p6); text-align: center; color: var(--gris-texte);
                 font-size: .9rem; }
.rapport__pied .panneau { text-align: left; }

/* --- espace partenaire -------------------------------------------------- */
.fiche-ligne__tete {
  display: flex; justify-content: space-between; gap: var(--p4);
  flex-wrap: wrap; align-items: flex-start;
}
.fiche-ligne__tete h2 a { color: var(--noir); text-decoration: none; }
.fiche-ligne__tete h2 a:hover { color: var(--rouge); }
.fiche-ligne__etat { display: grid; gap: .3rem; justify-items: end; text-align: right; }

/* Appairage WhatsApp : le code et le mode d'emploi côte à côte, parce qu'on
   les lit en même temps, un téléphone dans l'autre main. */
.appairage {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--p5); margin-top: var(--p4);
}
.appairage__qr {
  flex: 0 0 auto; width: 280px; height: 280px;
  border: 1px solid var(--bord); border-radius: var(--r-carte);
  background: #fff; padding: .5rem;
}
.appairage__pas {
  flex: 1 1 16rem; margin: 0; padding-left: 1.2rem;
  color: var(--gris-texte); font-size: .92rem; line-height: 1.9;
}

/* Demande de diagnostic : une proposition, pas une alerte. Le ton du bloc
   doit rester celui d'un service offert, sans la couleur d'un reproche. */
.diagnostic-demande { border-left: 3px solid var(--vert, var(--rouge)); }
.diagnostic-demande__forme {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--p4);
}
.diagnostic-demande__forme input { flex: 1 1 18rem; min-width: 0; }

/* Vignette de reconnaissance. Elle occupe la largeur qu'elle occupe, sans
   grandir ni retrecir : une rangee d'images de tailles differentes se lit
   moins vite qu'une colonne reguliere. L'identite prend le reste. */
.fiche-ligne__identite { flex: 1 1 14rem; min-width: 0; }
.fiche-ligne__visuel {
  flex: 0 0 auto; display: block; width: 112px; height: 84px;
  border-radius: var(--r-carte); overflow: hidden; background: var(--bord-tenu);
}
.fiche-ligne__visuel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fiche-ligne__visuel:hover img { opacity: .88; }
/* L'absence de photo se signale, elle ne se comble pas par un faux visuel. */
.fiche-ligne__visuel--vide {
  display: grid; place-items: center; background: transparent;
  border: 1px dashed var(--bord); color: var(--gris-texte);
  font-size: .7rem; line-height: 1.25; text-align: center; text-decoration: none;
}
.fiche-ligne__visuel--vide:hover { border-color: var(--rouge); color: var(--rouge); }

.fiche-ligne__chiffres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: var(--p3); margin: var(--p4) 0 0;
  padding: var(--p3) 0; border-block: 1px solid var(--bord-tenu);
}
.fiche-ligne__chiffres div { display: grid; gap: .1rem; }
.fiche-ligne__chiffres strong {
  font-size: 1.15rem; color: var(--noir); font-variant-numeric: tabular-nums;
}
.fiche-ligne__chiffres span { font-size: .76rem; color: var(--gris-texte); }

/* Les manques sont replies : la liste ouverte a chaque annonce transformerait
   l'ecran en mur de reproches. */
.manques { margin-top: var(--p3); }
.manques > summary {
  cursor: pointer; font-size: .84rem; color: var(--rouge); font-weight: 500;
  min-height: 34px; display: flex; align-items: center;
}
.manques ul {
  margin: .4rem 0 0 1.1rem; display: grid; gap: .3rem;
  font-size: .86rem; color: var(--gris-texte);
}

.cases-equipements {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .35rem var(--p4);
}
.cases-equipements .consentement { font-size: .88rem; color: var(--corps); }

.vignettes { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: var(--p3); }
.vignettes img {
  width: 90px; height: 90px; object-fit: cover; border-radius: var(--r-bouton);
}

/* --- galerie editable --------------------------------------------------- */
.envoi-photos { margin-bottom: var(--p5); }
.envoi-photos input[type="file"] {
  padding: 10px; border: 1px dashed var(--bord); border-radius: var(--r-bouton);
  background: var(--gris-clair); width: 100%; font-size: .9rem;
}

.galerie-edition {
  display: grid; gap: var(--p3);
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.photo-carte {
  margin: 0; border: 1px solid var(--bord); border-radius: var(--r-bouton);
  overflow: hidden; background: var(--blanc); position: relative;
  display: grid; grid-template-rows: auto auto auto;
}
/* La couverture se distingue par un cadre, pas seulement par un mot : c'est
   la photo qui part sur les réseaux et dans les listes. */
.photo-carte--couverture { border-color: var(--rouge); box-shadow: 0 0 0 1px var(--rouge); }
.photo-carte img { width: 100%; height: 112px; object-fit: cover; display: block; }
.photo-carte__badge {
  position: absolute; top: 6px; left: 6px; background: var(--rouge);
  color: var(--blanc); font-size: .68rem; font-weight: 600;
  padding: 2px 8px; border-radius: 100px;
}
.photo-carte__actions {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 5px;
  border-top: 1px solid var(--bord-tenu);
}
.photo-carte__actions button {
  border: 1px solid var(--bord); background: var(--blanc); cursor: pointer;
  font-size: .7rem; padding: 4px 7px; border-radius: 5px; color: var(--corps);
  min-height: 28px;
}
.photo-carte__actions button:hover { border-color: var(--rouge); color: var(--rouge); }
.photo-carte__retirer:hover { border-color: var(--rouge); color: var(--rouge); }
.photo-carte__alt { display: flex; gap: 3px; padding: 0 5px 5px; }
.photo-carte__alt input {
  flex: 1; min-width: 0; font-size: .72rem; padding: 4px 6px;
  border: 1px solid var(--bord); border-radius: 5px;
}
.photo-carte__alt button {
  border: 1px solid var(--bord); background: var(--gris-clair); cursor: pointer;
  font-size: .7rem; padding: 4px 8px; border-radius: 5px;
}

/* --- regroupement de champs -------------------------------------------- */
/* <fieldset> plutot qu'un <div> : la legende est rattachee au groupe pour les
   lecteurs d'ecran, et le regroupement visuel devient un regroupement reel. */
.bloc-champs {
  border: 0; margin: 0 0 var(--p5); padding: 0;
}
.bloc-champs + .bloc-champs {
  padding-top: var(--p5); border-top: 1px solid var(--bord-tenu);
}
.bloc-champs > legend {
  padding: 0 0 var(--p3); font-size: .74rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gris-texte);
}
.champ--double { grid-column: span 2; }
@media (max-width: 620px) { .champ--double { grid-column: span 1; } }

.formulaire .actions { margin-top: 0; }

/* --- import depuis une fiche existante ---------------------------------- */
.panneau--import { border-style: dashed; }
.import-fiche { display: flex; gap: var(--p3); align-items: end; flex-wrap: wrap; }
.import-fiche .champ { flex: 1 1 320px; margin-bottom: 0; }
.import-fiche .bouton { flex: none; }

.panneau--propose { border-left: 3px solid var(--vert); }
.bilan-import {
  list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: var(--p3);
}
.bilan-import li {
  font-size: .8rem; padding: 3px 10px; border-radius: 100px;
}
/* Trouvé et manquant se distinguent par la couleur ET par le signe : la
   couleur seule ne suffit pas pour un daltonien. */
.bilan-import--oui::before { content: "✓ "; }
.bilan-import--non::before { content: "— "; }
.bilan-import--oui { background: #eaf3ec; color: var(--vert); }
.bilan-import--non { background: var(--gris-clair); color: var(--gris-texte); }

.import-colle { margin-top: var(--p4); }
.import-colle > summary {
  cursor: pointer; font-size: .88rem; font-weight: 500; color: var(--rouge);
  min-height: 38px; display: flex; align-items: center;
}
.import-colle form { margin-top: var(--p3); }

/* --- marque-page de collecte -------------------------------------------- */
.marque-page {
  background: var(--gris-clair); border-radius: var(--r-bouton);
  padding: var(--p4); margin-top: var(--p3);
}
.marque-page > p { font-size: .9rem; color: var(--corps); }
.marque-page__bouton { margin: var(--p4) 0; }
/* Le curseur dit ce qu'il faut faire : ce lien se glisse, il ne se clique pas. */
.marque-page__bouton .bouton { cursor: grab; text-decoration: none; }
.marque-page__bouton .bouton:active { cursor: grabbing; }
.marque-page kbd {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .74rem;
  background: var(--blanc); border: 1px solid var(--bord);
  border-radius: 4px; padding: 1px 5px;
}
.marque-page__ou {
  margin: var(--p5) 0 var(--p3); font-size: .82rem; color: var(--gris-texte);
  text-transform: uppercase; letter-spacing: .06em;
}

/* --- ligne de tarif éditable -------------------------------------------- */
/* Une ligne = un formulaire. Le <form> ne peut pas être un enfant direct de
   <tr>, on le loge donc dans une cellule qui couvre la largeur utile. */
.ligne-tarif {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  padding: .55rem .6rem;
}
.cellule-periode { display: flex; gap: .3rem; align-items: center; }
.cellule-periode select { max-width: 8.5rem; }
.cellule-periode > span { font-size: .82rem; color: var(--gris-texte); }
.ligne-tarif__libelle { flex: 1 1 9rem; min-width: 0; }
.ligne-tarif__montant { max-width: 5.5rem; }
.ligne-tarif__min { max-width: 5rem; }
.ligne-tarif input, .ligne-tarif select {
  height: 38px; padding: 0 .5rem; font-size: .88rem;
  border: 1px solid var(--bord); border-radius: var(--r-bouton);
  background: var(--blanc);
}
.ligne-tarif__action { padding: 5px 11px; font-size: .78rem; min-height: 34px; }

/* --- conseils de prix --------------------------------------------------- */
.panneau--conseils { border-left: 3px solid var(--rouge); }
.conseils {
  display: grid; gap: var(--p3); margin-top: var(--p4);
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.conseil {
  border: 1px solid var(--bord); border-radius: var(--r-carte);
  padding: var(--p4); display: grid; gap: .5rem; align-content: start;
}
/* Le sens du conseil se lit avant le texte : hausse, baisse ou alerte. */
.conseil--hausse { border-left: 3px solid var(--vert); }
.conseil--baisse { border-left: 3px solid #2a5f96; }
.conseil--alerte { border-left: 3px solid #c9922f; }
.conseil__tete { display: flex; gap: .5rem; align-items: baseline;
                 justify-content: space-between; flex-wrap: wrap; }
.conseil__titre { font-weight: 600; font-size: .95rem; color: var(--noir); }
.conseil__action {
  font-size: .82rem; font-weight: 700; padding: 2px 9px; border-radius: 100px;
  font-variant-numeric: tabular-nums;
}
.conseil__action--hausse { background: #eaf3ec; color: var(--vert); }
.conseil__action--baisse { background: #eef4fb; color: #2a5f96; }
.conseil__constat { font-size: .88rem; color: var(--corps); line-height: 1.5; }
.conseil__motifs { display: flex; flex-wrap: wrap; gap: .3rem; }
.conseil__motifs span {
  font-size: .72rem; background: var(--gris-clair); color: var(--gris-texte);
  padding: 2px 8px; border-radius: 100px;
}
.conseil__form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
                 margin-top: .2rem; }
.conseil__note { font-size: .78rem; color: var(--gris-texte); }

/* --- placement sur la carte -------------------------------------------- */
/* La carte occupe volontairement toute la largeur du panneau : la reduire
   ferait du pointage une option, alors que c'est la seule source fiable de
   coordonnees. */
.carte { position: relative; margin-top: var(--p3); }

.carte__toile {
  height: 340px; border-radius: var(--r-carte);
  border: 1px solid var(--bord); background: var(--gris-clair);
  z-index: 0;
}
@media (max-width: 700px) { .carte__toile { height: 260px; } }

.carte__etat {
  margin: .5rem 0 0; font-size: .84rem; color: var(--gris-texte);
  display: flex; align-items: center; gap: .4rem;
}
.carte__etat::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gris-texte); flex: 0 0 auto;
}
.carte__etat--ok { color: var(--vert); font-weight: 500; }
.carte__etat--ok::before { background: var(--vert); }

.carte__consigne {
  margin: .35rem 0 0; font-size: .82rem; color: var(--gris-texte);
  max-width: 62ch;
}

/* La liste se superpose a la carte : Leaflet monte ses propres couches a
   400, il faut passer au-dessus sous peine de suggestions inatteignables. */
.carte__suggestions {
  position: absolute; top: -.4rem; left: 0; right: 0; z-index: 500;
  margin: 0; padding: .25rem; list-style: none;
  background: var(--blanc); border: 1px solid var(--bord);
  border-radius: var(--r-carte); box-shadow: var(--ombre-carte);
  /* Trois propositions visibles, pas davantage : la liste se superpose a la
     carte, et masquer la carte pendant qu'on choisit revient a demander de
     choisir a l'aveugle. Le reste se deroule. */
  max-height: 216px; overflow-y: auto;
}
.carte__suggestion {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: .55rem .7rem; border: 0; background: none; border-radius: 5px;
  font: inherit; color: var(--corps); line-height: 1.35;
}
.carte__suggestion:hover, .carte__suggestion:focus-visible {
  background: var(--rouge-voile); color: var(--noir);
}
.carte__suggestion strong { display: block; font-weight: 500; }
.carte__suggestion span { font-size: .8rem; color: var(--gris-texte); }
.carte__vide { padding: .6rem .7rem; font-size: .84rem; color: var(--gris-texte); }

/* Bouton d'action dans une ligne de liste : il ne doit pas peser autant que
   les actions principales de la page. */
.bouton--petit {
  padding: .3rem .75rem; font-size: .8rem; border-radius: 5px;
}

/* Tableau d'import : une ligne bloquee reste lisible mais ne se coche pas —
   la barrer la rendrait illisible alors que c'est justement son motif qu'il
   faut lire. */
.tableau--import .ligne--bloquee { color: var(--gris-texte); }
.tableau--import .obstacle {
  font-size: .78rem; color: var(--rouge); margin-top: .15rem;
}
.tableau--import label { cursor: pointer; }

/* Champ avec unite accolee : « 15 % » se lit d'un bloc, alors qu'un libelle
   « en pour cent » a cote du champ oblige a relier deux choses des yeux. */
.avec-suffixe { display: flex; align-items: center; gap: .4rem; }
.avec-suffixe input { max-width: 6rem; }
.avec-suffixe span { color: var(--gris-texte); }
.champ--court { max-width: 22rem; }
.choix-ville { font-size: .84rem; padding: .2rem .3rem; max-width: 9rem; }

/* --- assistant --------------------------------------------------------- */
/* Une bulle en bas a droite, discrete tant qu'on n'y touche pas. Le vert du
   pied de page plutot que le rouge d'accent : l'assistant n'est pas une
   action de la page, il est a cote d'elle, et le rouge est deja pris par tout
   ce qui engage — publier, supprimer, contacter. */
.assistant__bulle {
  position: fixed; right: var(--p5); bottom: var(--p5); z-index: 60;
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--vert); color: var(--blanc); font-size: 1.35rem;
  box-shadow: var(--ombre-carte); line-height: 1;
  transition: transform .15s ease, background .15s ease;
}
.assistant__bulle:hover { background: var(--vert-fonce); transform: scale(1.06); }

.assistant {
  position: fixed; right: var(--p5); bottom: calc(var(--p5) + 66px); z-index: 60;
  width: min(380px, calc(100vw - 2 * var(--p4)));
  height: min(520px, calc(100vh - 160px));
  display: flex; flex-direction: column;
  background: var(--blanc); border: 1px solid var(--bord);
  border-radius: var(--r-carte); box-shadow: var(--ombre-carte);
  overflow: hidden;
}
.assistant[hidden] { display: none; }

.assistant__tete {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem var(--p4); border-bottom: 1px solid var(--bord);
  background: var(--gris-clair); font-size: .95rem;
}
.assistant__fermer {
  border: 0; background: none; cursor: pointer; font-size: 1.3rem;
  line-height: 1; color: var(--gris-texte); padding: 0 .2rem;
}
.assistant__fermer:hover { color: var(--noir); }

.assistant__journal {
  flex: 1; overflow-y: auto; padding: var(--p4);
  display: flex; flex-direction: column; gap: .6rem;
  font-size: .9rem; line-height: 1.5;
}
/* Les deux voix se distinguent par le fond et le cote, pas par une etiquette :
   dans un fil court, « Vous : » a chaque ligne prend plus de place qu'il
   n'en clarifie. */
.assistant__message { padding: .55rem .75rem; border-radius: var(--r-carte); max-width: 88%; }
.assistant__message--moi {
  align-self: flex-end; background: var(--rouge-voile); color: var(--corps);
}
.assistant__message--lui {
  align-self: flex-start; background: var(--gris-clair); color: var(--corps);
}

.assistant__saisie {
  display: flex; gap: .5rem; padding: .7rem var(--p4);
  border-top: 1px solid var(--bord);
}
.assistant__saisie input {
  flex: 1; min-width: 0; padding: .5rem .65rem; font: inherit; font-size: .9rem;
  border: 1px solid var(--bord); border-radius: var(--r-bouton);
  background: var(--blanc); color: var(--corps);
}
.assistant__saisie input:focus-visible { outline: 2px solid var(--vert); outline-offset: 1px; }
.assistant__saisie button {
  border: 0; border-radius: var(--r-bouton); cursor: pointer;
  background: var(--vert); color: var(--blanc);
  padding: .5rem .9rem; font: inherit; font-size: .88rem;
}
.assistant__saisie button:hover:not(:disabled) { background: var(--vert-fonce); }
.assistant__saisie button:disabled, .assistant__saisie input:disabled { opacity: .55; }

/* Carte de connexion du compte Claude : elle vit dans le fil, comme un
   message de l'assistant, parce que c'est bien lui qui demande. */
.assistant__connexion strong { display: block; margin-bottom: .2rem; }
.assistant__note { font-size: .82rem; color: var(--gris-texte); }
.assistant__etapes { margin-top: .6rem; font-size: .85rem; }
.assistant__etapes p { margin: .35rem 0; }
.assistant__etapes a { color: var(--vert); font-weight: 500; }
.assistant__actions { display: flex; gap: .4rem; margin-top: .5rem; }
.assistant__actions input {
  flex: 1; min-width: 0; padding: .4rem .55rem; font: inherit; font-size: .85rem;
  border: 1px solid var(--bord); border-radius: var(--r-bouton);
  background: var(--blanc); color: var(--corps);
}
.assistant__actions button {
  border: 0; border-radius: var(--r-bouton); cursor: pointer;
  background: var(--vert); color: var(--blanc);
  padding: .4rem .8rem; font: inherit; font-size: .85rem; font-weight: 500;
}
.assistant__actions button:hover:not(:disabled) { background: var(--vert-fonce); }
.assistant__actions button:disabled { opacity: .55; cursor: default; }
.assistant__erreur { margin-top: .5rem; font-size: .82rem; color: var(--rouge); }

/* Écran d'apprentissage : la phrase d'exemple sert à juger sur pièce, mais
   elle ne doit pas pousser les colonnes d'action hors de l'écran. */
.cellule--tenue {
  max-width: 26rem; color: var(--gris-texte); font-size: .86rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ligne-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }

/* Écran du courrier : les causes d'échec, regroupées. Dix invitations
   bloquées par un même mot de passe refusé sont un seul problème — la liste
   doit le montrer d'un coup d'œil, pas le noyer dans le tableau. */
.liste-causes {
  margin: var(--p2) 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: .3rem;
}
.liste-causes li {
  padding: .45rem .7rem; border-radius: var(--r-carte);
  background: var(--gris-fond, #f4f4f4);
  font-size: .88rem; line-height: 1.45;
}
.liste-causes strong { font-variant-numeric: tabular-nums; }

/* Tri des photos Google : on doit voir l'image assez grande pour juger, et la
   case doit être atteignable sans viser. */
.photos-google {
  display: grid; gap: var(--p4); margin-bottom: var(--p4);
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.photo-google {
  position: relative; display: block; cursor: pointer;
  border: 1px solid var(--bord); border-radius: var(--r-carte); overflow: hidden;
}
.photo-google img { display: block; width: 100%; height: 150px; object-fit: cover; }
.photo-google:has(input:checked) { border-color: var(--vert); box-shadow: 0 0 0 2px var(--vert); }
.photo-google__choix {
  display: flex; align-items: center; gap: .4rem;
  padding: .45rem .6rem; font-size: .85rem; background: var(--blanc);
}
.photo-google__credit {
  position: absolute; top: 0; left: 0; right: 0;
  padding: .25rem .5rem; font-size: .7rem; color: var(--blanc);
  background: linear-gradient(rgba(0,0,0,.55), transparent);
}

/* --- mon compte ---------------------------------------------------------- */
.gestion__moi {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--corps) !important; text-decoration: none;
}
.gestion__moi:hover { color: var(--rouge) !important; }
.gestion__moi img { border-radius: 50%; object-fit: cover; }

.compte { display: grid; gap: var(--p4); grid-template-columns: 1fr 1fr; }
.compte__avatar { display: flex; align-items: center; gap: var(--p4); }
.compte__avatar img { border-radius: 50%; object-fit: cover; }
.compte__initiales {
  display: grid; place-items: center; width: 120px; height: 120px;
  border-radius: 50%; background: var(--gris-clair); color: var(--gris-texte);
  font-size: 2.6rem; font-weight: 600; flex: none;
}
.compte__envoi label { cursor: pointer; display: inline-block; }
.compte__etat { display: grid; gap: .7rem; }
.compte__etat dt { font-size: .8rem; color: var(--gris-texte); }
.compte__etat dd { font-weight: 500; }
.lien-discret {
  border: 0; background: none; padding: .3rem 0; cursor: pointer;
  color: var(--gris-texte); font: inherit; font-size: .84rem;
  text-decoration: underline;
}
.lien-discret:hover { color: var(--rouge); }

@media (max-width: 860px) {
  .compte { grid-template-columns: 1fr; }
}

/* --- abonnements --------------------------------------------------------- */
.pastille--essai    { background: #eef4ff; color: #2b4c8c; }
.pastille--actif    { background: #eaf7ee; color: #1e6b33; }
.pastille--impaye   { background: #fff4e5; color: #8a5200; }
.pastille--suspendu { background: var(--rouge-voile); color: var(--rouge); }
.pastille--resilie  { background: var(--gris-clair); color: var(--gris-texte); }

/* Un liseré à gauche : on repère l'état d'un coup d'œil en faisant défiler,
   sans lire chaque pastille. */
.abonnement { border-left: 4px solid var(--bord); }
.abonnement--impaye   { border-left-color: #d98500; }
.abonnement--suspendu { border-left-color: var(--rouge); }
.abonnement--actif    { border-left-color: var(--vert); }
.abonnement--resilie  { opacity: .62; }

.abonnement__tete {
  display: flex; flex-wrap: wrap; gap: var(--p4);
  justify-content: space-between; align-items: start;
}
.abonnement__tete h2 { font-size: 1.08rem; display: flex; align-items: center; gap: .5rem; }
.abonnement__quand { font-size: .86rem; color: var(--gris-texte); }
.abonnement__quand--tard { color: var(--rouge); font-weight: 600; }

.abonnement__corps {
  display: flex; flex-wrap: wrap; gap: var(--p4);
  justify-content: space-between; align-items: center;
  margin-top: var(--p4); padding-top: var(--p4);
  border-top: 1px solid var(--bord-tenu);
}
.abonnement__paiement { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.abonnement__paiement input, .abonnement__paiement select {
  padding: .35rem .5rem; font: inherit; font-size: .85rem;
  border: 1px solid var(--bord); border-radius: var(--r-bouton);
}
.abonnement__paiement .avec-suffixe input { max-width: 6rem; }
.abonnement__historique { margin-top: var(--p4); }
.abonnement__historique summary {
  cursor: pointer; font-size: .86rem; color: var(--gris-texte);
}
.choix-simple { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; }

/* --- horaires : sept lignes, saisies à la main --------------------------- */
.horaires-saisie { display: grid; gap: .5rem var(--p4);
                   grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.horaires-saisie__jour { display: grid; grid-template-columns: 6.5rem 1fr;
                         align-items: center; gap: var(--p3); }
.horaires-saisie__jour label { font-size: .88rem; color: var(--gris-texte); }
@media (max-width: 520px) {
  .horaires-saisie__jour { grid-template-columns: 5.5rem 1fr; gap: .5rem; }
}

/* --- prestations : une famille à la fois --------------------------------
   Soixante-douze cases sous les yeux de quelqu'un qui en cochera trois : on
   lit tout pour trouver les siennes, et on renonce. */
.prestations__mode-emploi { margin-bottom: var(--p3); }
.prestations__recherche {
  width: 100%; padding: .6rem .8rem; margin-bottom: var(--p3);
  border: 1px solid var(--bord); border-radius: var(--r-bouton);
  font-size: 1rem; background: var(--blanc);
}
.prestations__famille { border-top: 1px solid var(--bord-tenu); }
.prestations__famille:last-of-type { border-bottom: 1px solid var(--bord-tenu); }
.prestations__titre {
  display: flex; align-items: center; gap: var(--p3); cursor: pointer;
  padding: .85rem .2rem; font-size: .95rem; font-weight: 500;
  list-style: none; min-height: 44px;
}
.prestations__titre::-webkit-details-marker { display: none; }
.prestations__titre::after {
  content: ""; margin-left: auto; width: .5rem; height: .5rem; flex: none;
  border-right: 2px solid var(--gris-texte); border-bottom: 2px solid var(--gris-texte);
  rotate: 45deg; translate: 0 -2px; transition: rotate .15s;
}
.prestations__famille[open] > .prestations__titre::after { rotate: -135deg; translate: 0 2px; }
.prestations__compte {
  min-width: 1.5rem; padding: .05rem .45rem; border-radius: 99px;
  background: var(--vert-fonce); color: #fff; font-size: .75rem;
  font-weight: 600; text-align: center; font-variant-numeric: tabular-nums;
}
.prestations__famille .cases-equipements { padding: 0 0 var(--p4) .2rem; }
.prestations__vide { color: var(--gris-texte); font-size: .9rem; padding: var(--p4) 0; }

/* --- la barre de gestion sur téléphone -----------------------------------
   Onze rubriques déroulées occupaient 380 px avant le premier mot de la page,
   sur chaque écran. Elles passent derrière un bouton, comme sur le site
   public — et sur grand écran <details> s'efface : la barre redevient une
   barre. */
.menu-gestion { display: contents; }
.menu-gestion__panneau { display: contents; }
.menu-gestion__bouton { display: none; }

/* Chrome 131+ et Safari 18.4+ masquent le contenu d'un <details> fermé via
   ::details-content : sans cette règle, la barre disparaîtrait aussi sur
   grand écran. Les navigateurs plus anciens ignorent la ligne. */
@media (min-width: 861px) {
  .menu-gestion::details-content { content-visibility: visible; display: contents; }
}

@media (max-width: 860px) {
  .menu-gestion { display: block; margin-left: auto; }
  .menu-gestion__bouton {
    display: flex; align-items: center; gap: .5rem;
    padding: 10px 14px; border-radius: var(--r-bouton);
    border: 1px solid var(--bord); background: var(--blanc);
    font-size: .9rem; font-weight: 500; color: var(--noir);
    cursor: pointer; list-style: none; user-select: none; min-height: 44px;
  }
  .menu-gestion__bouton::-webkit-details-marker { display: none; }
  .menu-gestion[open] .menu-gestion__bouton { border-color: var(--rouge); color: var(--rouge); }

  .menu-gestion__barres,
  .menu-gestion__barres::before,
  .menu-gestion__barres::after {
    display: block; width: 18px; height: 2px; border-radius: 2px;
    background: currentColor; transition: transform .25s ease;
  }
  .menu-gestion__barres { position: relative; }
  .menu-gestion__barres::before,
  .menu-gestion__barres::after { content: ''; position: absolute; }
  .menu-gestion__barres::before { top: -6px; }
  .menu-gestion__barres::after { top: 6px; }
  .menu-gestion[open] .menu-gestion__barres { background: transparent; }
  .menu-gestion[open] .menu-gestion__barres::before { transform: translateY(6px) rotate(45deg); }
  .menu-gestion[open] .menu-gestion__barres::after { transform: translateY(-6px) rotate(-45deg); }

  .menu-gestion__panneau {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--blanc); border-bottom: 1px solid var(--bord);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .1);
    padding: var(--p2) var(--p4) var(--p4);
    max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .gestion__interieur { position: relative; padding: var(--p3) var(--p4); }
  .gestion__nav { display: block; margin-left: 0; }
  .gestion__nav > a, .tiroir > summary {
    display: flex; align-items: center; min-height: 48px;
    padding: 12px 4px; border-bottom: 1px solid var(--bord-tenu);
    font-size: 1.02rem; white-space: normal;
  }
  .tiroir__contenu a { min-height: 44px; display: flex; align-items: center; }
  .gestion__compte {
    display: flex; margin-left: 0; padding-top: var(--p3);
    justify-content: space-between; font-size: .95rem;
  }
  .gestion__compte a { min-height: 44px; display: flex; align-items: center; }
}

/* --- filtres de la liste d'annonces --------------------------------------
   Cent quarante-sept fiches à la file : sans filtre, retrouver les trois qui
   attendent une relecture demande de tout parcourir. Les compteurs sont dans
   l'étiquette : c'est le nombre qui décide où l'on clique, pas le libellé. */
.filtres-annonces {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: var(--p4);
}
.filtres-annonces .etiquette {
  text-decoration: none; min-height: 40px; padding-inline: 14px;
  border: 1px solid transparent; transition: border-color .15s, background .15s;
}
.filtres-annonces .etiquette:hover { border-color: var(--bord); }
.filtres-annonces .etiquette--active {
  background: var(--rouge); color: var(--blanc);
}
.etiquette__n {
  font-variant-numeric: tabular-nums; font-weight: 600; opacity: .72;
}
.filtres-annonces .etiquette--active .etiquette__n { opacity: .85; }

@media (max-width: 560px) {
  /* Une ligne qui défile plutôt que six étiquettes empilées sur trois rangées. */
  .filtres-annonces {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem;
    scrollbar-width: none; margin-inline: calc(var(--p4) * -1);
    padding-inline: var(--p4);
  }
  .filtres-annonces::-webkit-scrollbar { display: none; }
  .filtres-annonces .etiquette { flex: none; min-height: 44px; }
}

/* --- veille : une dépêche par ligne --------------------------------------
   La note est à gauche, en gros : c'est elle qui décide si on lit la suite.
   Le reste ne sert qu'à trancher — écarter, ou faire écrire. */
.depeche__tete { display: flex; gap: var(--p4); align-items: flex-start; }
.depeche__note {
  flex: none; width: 3rem; height: 3rem; border-radius: var(--r-carte);
  display: grid; place-items: center; background: var(--gris-clair);
  font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--noir);
}
.depeche__corps { min-width: 0; }
.depeche__titre { font-size: 1.02rem; line-height: 1.35; margin: 0; }
.depeche__titre a { color: var(--noir); text-decoration: none; }
.depeche__titre a:hover { color: var(--rouge); text-decoration: underline; }
.depeche__reperes {
  display: flex; flex-wrap: wrap; gap: .45rem; align-items: center;
  margin: .45rem 0 0; font-size: .84rem; color: var(--gris-texte);
}
.depeche__resume { margin: .55rem 0 0; font-size: .94rem; color: var(--corps); }
.depeche__motif { margin: .25rem 0 0; font-size: .84rem; color: var(--gris-texte); }
.depeche .actions { padding-top: var(--p3); }
.depeche .actions form { margin: 0; }

@media (max-width: 560px) {
  .depeche__tete { gap: var(--p3); }
  .depeche__note { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
}

/* --- choix de la rubrique avant création --------------------------------- */
.choix-rubriques {
  display: grid; gap: var(--p3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.choix-rubrique {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--p3); min-height: 72px; padding: var(--p4) var(--p5);
  background: var(--blanc); border: 1px solid var(--bord);
  border-radius: var(--r-carte); text-decoration: none; color: var(--noir);
  font-weight: 500; transition: border-color .15s, transform .15s;
}
.choix-rubrique:hover { border-color: var(--rouge); transform: translateY(-2px); }
.choix-rubrique__fleche { color: var(--rouge); font-size: 1.1rem; }

/* Les rubriques accordées : elles occupent toute la largeur de la fiche
   partenaire, sinon six cases se serrent dans une colonne de onze rem. */
.fiche-partenaire__rubriques { grid-column: 1 / -1; }
.cases-rubriques {
  display: flex; flex-wrap: wrap; gap: .25rem var(--p4); margin-top: .2rem;
}
.cases-rubriques .consentement { font-size: .88rem; }

/* --- fiches externes : un lien, un bouton, par plateforme ----------------- */
.source-externe {
  display: flex; flex-wrap: wrap; gap: var(--p3); align-items: flex-end;
  padding-top: var(--p3);
}
.source-externe + .source-externe { border-top: 1px solid var(--bord-tenu); }
.source-externe .champ { flex: 1 1 26rem; margin: 0; }
.sources-connues {
  list-style: none; padding: var(--p3) 0 0; margin: var(--p3) 0 0;
  border-top: 1px solid var(--bord-tenu); display: grid; gap: .35rem;
  font-size: .88rem;
}
.sources-connues li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }

/* --- recherche dans la liste d'annonces ---------------------------------- */
.recherche-annonces {
  display: flex; flex-wrap: wrap; gap: var(--p3); align-items: center;
  margin-bottom: var(--p3);
}
.recherche-annonces input[type="search"] {
  flex: 1 1 22rem; min-width: 0; padding: .6rem .8rem;
  border: 1px solid var(--bord); border-radius: var(--r-bouton);
  font-size: 1rem; background: var(--blanc);
}
.recherche-annonces input[type="search"]:focus {
  outline: 2px solid var(--rouge); outline-offset: -1px;
}
@media (max-width: 560px) {
  .recherche-annonces input[type="search"] { flex: 1 1 100%; min-height: 44px; }
}

/* Le corps d'un article s'écrit en HTML : une chasse fixe rend les balises
   lisibles et une fermeture oubliée visible. */
.champ--code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88rem; line-height: 1.55;
}
