/* ==========================================================================
   OUTIL « FIN DU CUIVRE ET DE L'ADSL » (17/11/2026) — sa feuille, chargée sur sa
   page de base et ses pages de département SEULEMENT (inc/outils.php, champ
   « css » du module). Après outils.css ; variables de site.css seulement.

   Ici : la liste des départements, la liste repliée de la prochaine date, les
   listes de communes d'une page de département, l'encadré « À savoir », les
   choix d'une recherche ambiguë (libellés longs : une colonne).
   ========================================================================== */

/* --- Les choix d'une recherche ambiguë : « Sainte-Colombe (89440, Yonne) – 31 janvier 2029 ».
   Libellés longs : une colonne, alignés à gauche, plutôt que des pastilles qui se chevauchent. */
.outil-resultat--ambigu .outil-suggestions,
.outil-resultat--introuvable .outil-suggestions {
  flex-direction: column;
  align-items: stretch;
}

.outil-resultat--ambigu .outil-suggestions a,
.outil-resultat--introuvable .outil-suggestions a {
  display: flex;
  padding: var(--gap-xs) var(--gap-s);
  border-radius: var(--rayon-s);
  line-height: 1.4;
}

/* --- Le bilan d'un département tapé seul -------------------------------------- */
.cuivre-bilan {
  margin: 0;
  padding-left: calc(var(--gap-s) + var(--gap-xs));
}

.cuivre-bilan li::marker {
  color: var(--corail-texte);
}

/* --- L'encadré « À savoir pour cette commune » (66 communes, Rennes) ---------- */
.cuivre-note {
  padding: var(--gap-s);
  background: var(--blanc);
  border: 1px solid var(--voile-nuit-18);
  border-radius: var(--rayon-s);
}

.outil-resultat__corps .cuivre-note p {
  margin-top: var(--gap-xs);
}

.outil-resultat__corps .cuivre-note .cuivre-note__titre {
  margin-top: 0;
  font-weight: 600;
  color: var(--nuit);
}

/* Les liens de suite d'une réponse : côte à côte s'il y a la place, l'un sous l'autre sinon. */
.cuivre-suite {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--gap-m);
}

.cuivre-suite a {
  display: inline-flex;
  align-items: center;
  min-height: var(--outil-cible);
}

/* --- Le calendrier : la ligne d'aujourd'hui ressort, le reste reste sobre. --- */
.cuivre-calendrier tfoot th,
.cuivre-calendrier tfoot td {
  padding-top: var(--gap-s);
  font-size: var(--taille-corps);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--nuit);
}

/* Sur téléphone (fiches), une cellule vide de la ligne « Toutes les communes » ne montre pas son intitulé. */
@media (max-width: 639px) {
  .cuivre-calendrier td:empty {
    display: none;
  }
}

.cuivre-calendrier__jour th,
.cuivre-calendrier__jour td {
  color: var(--corail-texte);
}

.cuivre-calendrier tbody th a {
  display: inline-flex;
  align-items: center;
  min-height: var(--outil-cible);
  color: var(--corail-texte);
  text-underline-offset: 4px;
}

/* --- Les départements : une grille de liens, deux colonnes sur téléphone. ---- */
.cuivre-departements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--gap-s);
  margin: var(--gap-s) 0 0;
  padding: 0;
  list-style: none;
}

/* Le lien remplit sa case : les filets des deux (ou trois) colonnes restent alignés. */
.cuivre-departements li {
  display: flex;
}

.cuivre-departements a {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.3em;
  min-height: var(--outil-cible);
  padding: var(--gap-xs) 0;
  border-bottom: 1px solid var(--voile-nuit-09);
  font-size: var(--taille-corps-m);
  line-height: 1.3;
  color: var(--corail-texte);
  text-decoration: none;
}

.cuivre-departements a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 640px) {
  .cuivre-departements {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* La variante « nombre par département » (prochaine date trop longue pour être listée). */
.cuivre-departements span {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-height: var(--outil-cible);
  padding: var(--gap-xs) 0;
  border-bottom: 1px solid var(--voile-nuit-09);
  font-size: var(--taille-corps-m);
  line-height: 1.3;
  color: var(--texte-doux);
}

.cuivre-departements + .contenu {
  margin-top: var(--gap-s);
}

/* --- La liste repliée de la prochaine date ------------------------------------ */
.cuivre-prochaine {
  margin-top: var(--gap-s);
  border-top: 1px solid var(--voile-nuit-18);
  border-bottom: 1px solid var(--voile-nuit-18);
}

.cuivre-prochaine summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-s);
  min-height: var(--outil-cible);
  padding: var(--gap-xs) 0;
  font-weight: 500;
  color: var(--corail-texte);
  cursor: pointer;
  list-style: none;
}

.cuivre-prochaine summary::-webkit-details-marker {
  display: none;
}

/* Le signe dit l'état (ouvert : « − »), en plus du texte : la liste se replie. */
.cuivre-prochaine summary::after {
  content: "+";
  content: "+" / ""; /* décoratif : le lecteur d'écran dit déjà l'état du <details> */
  font-size: var(--taille-h4);
  line-height: 1;
  color: var(--texte-doux);
}

.cuivre-prochaine[open] summary::after {
  content: "−";
  content: "−" / "";
}

.cuivre-prochaine summary:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cuivre-prochaine[open] summary {
  margin-bottom: var(--gap-s);
}

.cuivre-prochaine p {
  max-width: none;
}

/* --- Les communes d'un département ------------------------------------------- */
.cuivre-communes__vente {
  margin-bottom: var(--gap-xs);
  font-weight: 500;
  color: var(--nuit);
}

.cuivre-communes .cuivre-communes__liste {
  max-width: none;
}

.cuivre-erreur {
  max-width: var(--largeur-lecture);
  margin-top: var(--gap-s);
  font-size: var(--taille-corps);
  color: var(--texte-doux);
}

.cuivre-erreur a {
  color: var(--corail-texte);
  text-underline-offset: 4px;
}

@media print {
  .cuivre-prochaine summary {
    display: none;
  }
}
