/* ==========================================================================
   Actualités du territoire — fil, pages département / intercommunalité,
   article, bloc d'accueil. Même fichier dans demat_desktop et demat_mobile :
   il ne dépend que des jetons de template.css.
   Signature : le numéro du département en filigrane (comme les destinations
   de l'accueil) et les trois barres teintées par le thème de l'article.
   ========================================================================== */

/* --- Thèmes (étiquettes de l'import) : une teinte bretonne chacun, AA sur blanc */

[data-theme] { --actu: var(--granit); }
[data-theme="economie-et-entreprises"]  { --actu: #0a5f6b; }
[data-theme="emploi-et-formation"]      { --actu: #7a5a00; }
[data-theme="travaux-et-voirie"]        { --actu: #a0441c; }
[data-theme="mobilite-et-transports"]   { --actu: #1f4e8c; }
[data-theme="environnement-et-dechets"] { --actu: #2f6b3a; }
[data-theme="habitat-et-urbanisme"]     { --actu: #a03e4c; }
[data-theme="services-publics"]         { --actu: #33505a; }
[data-theme="tourisme-et-patrimoine"]   { --actu: #5b4a8a; }
[data-theme="culture-et-loisirs"]       { --actu: #8a2f6b; }
[data-theme="sante-et-solidarites"]     { --actu: #b0302f; }
[data-theme="agriculture-et-mer"]       { --actu: #556b1f; }
[data-theme="vie-locale"]               { --actu: #5f6e73; }

.actu-theme {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem 0.28rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--actu) 9%, #fff);
  color: var(--actu);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.actu-theme-picto {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Entête du fil / du territoire ----------------------------------------- */

.actus { min-width: 0; margin-bottom: 2rem; }

.actus-entete {
  position: relative;
  isolation: isolate;
  padding-block: clamp(1rem, 3vw, 2rem) 0.5rem;
}

.actus-entete-dept {
  position: absolute;
  z-index: -1;
  top: -0.05em;
  right: 0;
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: clamp(6rem, 15vw, 12rem);
  letter-spacing: -0.05em;
  line-height: 0.8;
  color: var(--bleu-glaz);
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
}

.actus-eyebrow { margin-bottom: 0.9rem; align-items: flex-start; }
.actus-eyebrow .barres { margin-top: 0.15em; }

.eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; white-space: nowrap; }
.eyebrow a:hover { color: var(--bleu-glaz); }

.actus-titre {
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1;
  text-wrap: balance;
  max-width: 18ch;
  margin-bottom: 1rem;
}

.actus-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--granit);
  max-width: 52ch;
}

/* Intercommunalité : l'entête devient la page de l'EPCI (description importée) */
.actus-entete--epci {
  margin-top: 0.5rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 24px;
  background: var(--sable);
  overflow: hidden;
}

.actus-entete--epci .actus-entete-dept { top: 0.1em; right: 0.15em; color: var(--noir-goemon); opacity: 0.08; }

.actus-epci { max-width: 62rem; }

.actus-epci > :last-child { margin-bottom: 0; }

.demat-epci__intro {
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  line-height: 1.6;
  max-width: 60ch;
}

.demat-epci__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem clamp(1.75rem, 4vw, 3rem);
  list-style: none;
  margin: 1.5rem 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(18, 16, 14, 0.18);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--granit);
}

.demat-epci__facts strong {
  display: block;
  font-family: var(--police-donnees);
  font-variant-numeric: tabular-nums;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--hermine);
}

.actus-epci h2 {
  font-family: var(--police-texte);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--granit);
  margin: 1.75rem 0 0.75rem;
}

/* Communes : puces (EPCI et article) */
.demat-epci__communes,
.actu-corps .demat-news-communes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.demat-epci__communes a,
.actu-corps .demat-news-communes a {
  display: inline-block;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ligne);
  color: var(--hermine);
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease;
}

.demat-epci__communes a:hover,
.actu-corps .demat-news-communes a:hover { border-color: var(--bleu-glaz); color: var(--bleu-glaz-fonce); }

.demat-epci__site { margin: 1.25rem 0 0; }

.demat-epci__site a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  background: var(--noir-goemon);
  color: var(--blanc-ecume);
  font-weight: 650;
  text-decoration: none;
}

.demat-epci__site a::after { content: "\2197"; }
.demat-epci__site a:hover { background: var(--bleu-glaz-fonce); color: #fff; }

/* Intercommunalité : actualités à gauche, communes en colonne de droite */
.actus-colonnes { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }

@media (min-width: 960px) {
  .actus-colonnes { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); align-items: start; }
  .actus-epci-communes { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; }
}

.actus-epci-communes {
  padding: 1.25rem;
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
}

.actus-epci-communes h2 {
  margin: 0 0 0.85rem;
  font-family: var(--police-texte);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--granit);
}

.actus-epci-communes .demat-epci__communes { margin: 0; }

/* --- Barre de territoires ----------------------------------------------------- */

.actus-territoires {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  margin: 1.75rem 0 2.25rem;
  padding-block: 1.1rem;
  border-block: 1px solid var(--ligne);
}

.actus-territoires-rang { display: flex; align-items: baseline; gap: 1rem; min-width: 0; }

.actus-territoires-libelle {
  flex: none;
  width: 10.5rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--granit);
}

.actus-puces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.actus-puce {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.42rem 0.38rem 0.9rem;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  background: #fff;
  color: var(--hermine);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.actus-puce:hover { border-color: var(--bleu-glaz); color: var(--bleu-glaz-fonce); }

.actus-puce-nb {
  min-width: 1.7rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: var(--blanc-ecume);
  font-family: var(--police-donnees);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  text-align: center;
  color: var(--granit);
}

.actus-puce--vide { color: var(--granit); font-weight: 500; }

.actus-puce[aria-current="page"] {
  background: var(--noir-goemon);
  border-color: var(--noir-goemon);
  color: var(--blanc-ecume);
}

.actus-puce[aria-current="page"] .actus-puce-nb { background: var(--bleu-glaz); color: #fff; }

.actus-puce[aria-current="true"] { border-color: var(--noir-goemon); box-shadow: inset 0 0 0 1px var(--noir-goemon); }

/* --- Fil : grille de cartes ------------------------------------------------- */

.actus-fil-titre {
  display: flex;
  align-items: center;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin: 0.5rem 0 1.25rem;
}

.actus-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}

.actus-vide {
  padding: 2rem;
  border: 1px dashed rgba(18, 16, 14, 0.25);
  border-radius: 16px;
  color: var(--granit);
  max-width: 60ch;
}

/* --- Carte ---------------------------------------------------------------------- */

.actu-carte {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
  padding: 1.35rem 1.4rem 1.15rem;
  background: #fff;
  border: 1px solid var(--ligne);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.actu-carte:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--actu) 45%, transparent);
  box-shadow: 0 16px 36px rgba(0, 30, 38, 0.12);
}

.actu-carte:focus-within { outline: 3px solid var(--bleu-glaz); outline-offset: 3px; }

.actu-carte-dept {
  position: absolute;
  z-index: -1;
  top: -0.12em;
  right: 0.1em;
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: 5.5rem;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--actu);
  opacity: 0.09;
  transition: opacity 240ms ease;
  user-select: none;
}

.actu-carte:hover .actu-carte-dept { opacity: 0.2; }

.actu-carte-haut { display: flex; align-items: center; gap: 0.5rem; }

.actu-carte-titre {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.012em;
  text-wrap: pretty;
  margin: 0;
}

.actu-carte-titre a {
  color: var(--hermine);
  text-decoration: none;
  background: linear-gradient(var(--actu), var(--actu)) left bottom / 0 2px no-repeat;
  transition: background-size 280ms ease;
}

/* Tout la carte est la cible du lien (un seul lien, pas d'imbrication) */
.actu-carte-titre a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.actu-carte-titre a:focus-visible { outline: none; }

.actu-carte:hover .actu-carte-titre a { background-size: 100% 2px; }

.actu-carte-extrait {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--granit);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.actu-carte-pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin: auto 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ligne);
  font-size: 0.82rem;
  color: var(--granit);
}

.actu-carte-lieu { font-weight: 650; color: var(--hermine); }
.actu-carte-lieu-dept { font-weight: 400; color: var(--granit); }

.actu-carte-pied time { font-family: var(--police-donnees); font-variant-numeric: tabular-nums; font-size: 0.78rem; }

/* À la une : la première du fil, en grand sur fond goémon */
.actu-carte--vedette {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: "haut haut" "titre extrait" "titre pied";
  gap: 1rem clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: 0;
  border-radius: 24px;
  background: var(--noir-goemon);
  color: var(--blanc-ecume);
}

.actu-carte--vedette .actu-carte-haut { grid-area: haut; }
.actu-carte--vedette .actu-carte-titre { grid-area: titre; align-self: end; font-size: clamp(1.6rem, 3.2vw, 2.5rem); line-height: 1.08; letter-spacing: -0.025em; }
.actu-carte--vedette .actu-carte-extrait { grid-area: extrait; align-self: end; color: rgba(251, 250, 247, 0.8); font-size: 1.02rem; -webkit-line-clamp: 6; }
.actu-carte--vedette .actu-carte-pied { grid-area: pied; border-top-color: rgba(251, 250, 247, 0.18); color: rgba(251, 250, 247, 0.7); }
.actu-carte--vedette .actu-carte-titre a { color: var(--blanc-ecume); background-image: linear-gradient(var(--bleu-glaz), var(--bleu-glaz)); }
.actu-carte--vedette .actu-carte-lieu { color: var(--blanc-ecume); }
.actu-carte--vedette .actu-carte-lieu-dept { color: rgba(251, 250, 247, 0.7); }
.actu-carte--vedette .actu-carte-dept { font-size: clamp(9rem, 18vw, 15rem); top: -0.18em; right: 0.05em; color: var(--blanc-ecume); opacity: 0.06; }
.actu-carte--vedette:hover .actu-carte-dept { opacity: 0.1; }
.actu-carte--vedette .actu-theme { background: rgba(251, 250, 247, 0.1); color: var(--blanc-ecume); }
.actu-carte--vedette .actu-theme-picto { stroke: color-mix(in srgb, var(--actu) 40%, #fff); }

/* --- Pagination ------------------------------------------------------------------ */

.actus-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  --bs-pagination-color: var(--hermine);
  --bs-pagination-bg: #fff;
  --bs-pagination-border-color: var(--ligne);
  --bs-pagination-hover-color: var(--bleu-glaz-fonce);
  --bs-pagination-hover-bg: #fff;
  --bs-pagination-hover-border-color: var(--bleu-glaz);
  --bs-pagination-focus-box-shadow: 0 0 0 3px rgba(14, 125, 140, 0.3);
  --bs-pagination-active-bg: var(--noir-goemon);
  --bs-pagination-active-border-color: var(--noir-goemon);
  --bs-pagination-disabled-color: var(--granit);
  --bs-pagination-disabled-bg: transparent;
  --bs-pagination-border-radius: 10px;
}

.actus-pagination .pagination { gap: 0.35rem; margin: 0 !important; flex-wrap: wrap; }
.actus-pagination .page-link { min-width: 2.6rem; text-align: center; border-radius: 10px !important; font-family: var(--police-donnees); font-variant-numeric: tabular-nums; }
.actus-pagination-compteur { margin: 0; font-size: 0.85rem; color: var(--granit); }

/* --- Article --------------------------------------------------------------------- */

.actu-article { max-width: 50rem; margin-inline: auto; }

.actu-article-entete {
  position: relative;
  isolation: isolate;
  padding-block: clamp(1rem, 3vw, 2rem) 1.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--ligne);
}

.actu-article-entete .actus-entete-dept { color: var(--actu); opacity: 0.1; }

.actu-article-fil { flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.actu-article-fil .barres { margin-right: 0.25rem; }

.actu-article-titre {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
  margin-bottom: 1.1rem;
}

.actu-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--granit);
}

.actu-article-meta a { color: var(--hermine); }

.actu-corps {
  font-size: 1.07rem;
  line-height: 1.72;
  max-width: 66ch;
}

/* Chapô : le premier paragraphe de l'import */
.actu-corps > p:first-child {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.55;
  color: var(--hermine);
  margin-bottom: 2rem;
}

.actu-corps h2 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  margin: 2.4rem 0 0.75rem;
}

.actu-corps h2::before {
  content: "";
  flex: none;
  width: 0.85em;
  height: 0.62em;
  background:
    linear-gradient(var(--actu), var(--actu)) top left / 100% 22% no-repeat,
    linear-gradient(var(--actu), var(--actu)) left center / 62% 22% no-repeat,
    linear-gradient(var(--actu), var(--actu)) bottom left / 81% 22% no-repeat;
}

.actu-corps h3 { font-size: 1.15rem; margin: 1.6rem 0 0.4rem; }
.actu-corps ul { padding-left: 1.2rem; }
.actu-corps li { margin-bottom: 0.4rem; }
.actu-corps li::marker { color: var(--actu); }

/* FAQ */
.actu-faq {
  margin: 2.75rem 0 2rem;
  padding: clamp(1.25rem, 3.5vw, 2rem) clamp(1.25rem, 3.5vw, 2.25rem) 0.5rem;
  border-radius: 20px;
  background: var(--sable);
}

.actu-corps .actu-faq h2 { margin-top: 0; }

.actu-faq-item { padding: 1rem 0; border-top: 1px solid rgba(18, 16, 14, 0.15); }
.actu-faq h2 + .actu-faq-item { border-top: 0; }
.actu-faq-item h3 { margin: 0 0 0.35rem; font-size: 1.08rem; }
.actu-faq-item > :last-child { margin-bottom: 0; }

/* Source : l'article original, bien en vue */
.actu-source {
  margin: 2.5rem 0 1.75rem;
  padding: clamp(1.25rem, 3.5vw, 2rem);
  border-radius: 20px;
  background: var(--noir-goemon);
  color: rgba(251, 250, 247, 0.78);
}

.actu-source-bouton {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(251, 250, 247, 0.16);
  color: var(--blanc-ecume);
  text-decoration: none;
}

.actu-source-sur {
  grid-column: 1;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sable);
}

.actu-source-site {
  grid-column: 1;
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: clamp(1.3rem, 3.2vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.actu-source-bouton svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 3rem;
  height: 3rem;
  padding: 0.7rem;
  border-radius: 50%;
  background: var(--bleu-glaz);
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms ease, background 220ms ease;
}

.actu-source-bouton:hover { color: #fff; }
.actu-source-bouton:hover .actu-source-site { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.actu-source-bouton:hover svg { transform: translate(2px, -2px); background: var(--bleu-glaz-fonce); }
.actu-source-bouton:focus-visible { outline-color: var(--sable); outline-offset: 6px; }

.actu-source .demat-news-source { margin: 0; font-size: 0.9rem; line-height: 1.55; }
.actu-source .demat-news-source a { color: var(--sable); }
.actu-source .demat-news-source a:hover { color: #fff; }

.actu-article-retour { margin: 0 0 1rem; }

/* --- Bloc d'accueil ------------------------------------------------------------------ */

/* Aligné sur les sections de l'accueil (com_demat) : même retrait, même titre */
.site-desktop .bloc:has(> .bloc-contenu > .actus-module) { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gouttiere) 0; }
.bloc:has(> .bloc-contenu > .actus-module) > .bloc-titre { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 1.75rem; text-wrap: balance; }

.actus-module-plus { margin: 1.5rem 0 0; text-align: right; }

/* --- Écrans étroits ------------------------------------------------------------------ */

@media (max-width: 760px) {
  .actu-carte--vedette {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "haut" "titre" "extrait" "pied";
  }

  .actus-territoires-rang { flex-direction: column; align-items: stretch; gap: 0.5rem; }

  /* Puces sur une ligne qui défile : on trouve son territoire au pouce */
  .actus-puces {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .actus-puces::-webkit-scrollbar { display: none; }
  .actus-puces li { scroll-snap-align: start; }

  /* Accueil : les cartes défilent à l'horizontale */
  .actus-grille--module {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 4px 4px 8px;
    margin: -4px -4px 0;
  }

  .actus-grille--module::-webkit-scrollbar { display: none; }
  .actus-grille--module > * { scroll-snap-align: start; }
  .actus-module-plus { text-align: left; }

  .actu-carte:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .actu-carte:hover { transform: none; }
}

/* --- Agenda de la fiche commune (layout demat.agenda_commune) ------------------- */

.agenda-carte { --actu: var(--bleu-glaz); }
.agenda-carte .actu-carte-haut { flex-wrap: wrap; justify-content: space-between; }
.agenda-carte-date {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bleu-glaz) 12%, transparent);
  color: var(--bleu-glaz-fonce);
  font-family: var(--police-donnees);
  font-size: 0.8rem;
  font-weight: 700;
}
.agenda-carte-cat { font-size: 0.78rem; color: var(--granit); }

/* --- Fiche événement (html/com_eventmanager/event) ------------------------------ */

.evenement { --actu: var(--bleu-glaz); max-width: 72rem; margin-inline: auto; }
.evenement-entete { max-width: 50rem; }
.evenement-fil-dept { color: var(--granit); }

.evenement-pastilles { flex-wrap: wrap; gap: 0.5rem; }
.evenement-pastille {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  background: #fff;
  color: var(--hermine);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}
a.evenement-pastille:hover { border-color: var(--bleu-glaz); color: var(--bleu-glaz-fonce); }
.evenement-pastille--date { border-color: transparent; background: color-mix(in srgb, var(--bleu-glaz) 12%, #fff); color: var(--bleu-glaz-fonce); }
.evenement-pastille--gratuit { border-color: transparent; background: color-mix(in srgb, #2f7d32 12%, #fff); color: #1f5e22; }

.evenement-colonnes { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (min-width: 960px) {
  .evenement-colonnes { grid-template-columns: minmax(0, 1fr) minmax(260px, 22rem); }
  .evenement-infos { position: sticky; top: 5.5rem; }
}
.evenement-corps { margin: 0; }

.evenement-infos {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 20px;
  background: var(--sable);
}
.evenement-infos h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.evenement-info { padding: 0.9rem 0; border-top: 1px solid rgba(18, 16, 14, 0.15); }
.evenement-infos h2 + .evenement-info { border-top: 0; }
.evenement-info h3 {
  margin: 0 0 0.3rem;
  font-family: var(--police-donnees);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--granit);
}
.evenement-info p { margin: 0; line-height: 1.5; }
.evenement-dates { margin: 0; padding-left: 1.1rem; }
.evenement-dates li { margin-bottom: 0.25rem; }
.evenement-liens { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.6rem !important; font-size: 0.9rem; }
.evenement-liens a { color: var(--bleu-glaz-fonce); }

.evenement-source { max-width: 50rem; }
.evenement-source p { margin: 0; font-size: 0.85rem; }
.evenement-source p a { color: inherit; }
.evenement .agenda-commune { margin-top: 3rem; }

/* --- Agenda /aujourdui (html/com_eventmanager/events) --------------------------- */

.agenda-recherche {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 40rem;
  margin-top: 1.5rem;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  background: #fff;
}
.agenda-recherche:focus-within { border-color: var(--bleu-glaz); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bleu-glaz) 20%, transparent); }
.agenda-recherche svg { flex: none; fill: none; stroke: var(--granit); stroke-width: 2; stroke-linecap: round; }
.agenda-recherche input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--hermine); padding: 0.45rem 0; }
.agenda-recherche input:focus { outline: none; }
.agenda-recherche button {
  flex: none;
  padding: 0.55rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--bleu-glaz-fonce);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.agenda-recherche button:hover { background: var(--noir-goemon); }

.agenda-filtres .actus-territoires-rang + .actus-territoires-rang { margin-top: 0.6rem; }
.agenda-resultats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin: 2rem 0 1.25rem; font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.agenda-resultats span { font-family: var(--police-donnees); font-size: 0.8rem; font-weight: 600; color: var(--granit); }
.agenda-credit { margin: 2.5rem 0 0; font-size: 0.82rem; color: var(--granit); }
.agenda-credit a { color: inherit; }

@media (max-width: 600px) {
  .agenda-recherche button { padding-inline: 0.85rem; }
}

/* Rubriques éditoriales (Histoire, Initiatives) : pas de thème d’actualité, couleur de la marque. */
.actus--edito, .actu-article--edito { --actu: var(--bleu-glaz); }

/* --- Tourisme (/tourisme, /tourisme/<département>) et lieux à voir --------------------- */

.lieu-carte, .ville-carte { --actu: #2f6b3a; }
.lieu-carte-genre {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--actu) 12%, #fff);
  color: var(--actu);
  font-size: 0.78rem;
  font-weight: 650;
}
.lieux-credit { margin: 1rem 0 0; font-size: 0.8rem; color: var(--granit); }
.lieux-credit a { color: inherit; }

.tourisme-depts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 1rem;
  margin: 0 0 1rem;
}
.tourisme-dept {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 7.5rem;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  background: var(--noir-goemon);
  color: var(--blanc-ecume);
  text-decoration: none;
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease;
}
.tourisme-dept:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0, 30, 38, 0.25); }
.tourisme-dept-num {
  position: absolute; z-index: -1; right: 0.15em; bottom: -0.2em;
  font-family: var(--police-titre); font-weight: 800; font-size: 4.5rem; line-height: 1; letter-spacing: -0.05em;
  color: var(--bleu-glaz); opacity: 0.35;
}
.tourisme-dept-nom { margin-top: auto; font-family: var(--police-titre); font-size: 1.25rem; font-weight: 750; }
.tourisme-dept-nb { font-family: var(--police-donnees); font-size: 0.75rem; opacity: 0.75; }

.tourisme-venir-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 1.25rem; }
.tourisme-venir-bloc { padding: clamp(1.1rem, 3vw, 1.5rem); border-radius: 20px; background: var(--sable); }
.tourisme-venir-bloc h3 { margin: 0 0 0.6rem; font-size: 1.15rem; }
.tourisme-venir-bloc ul { margin: 0; padding-left: 1.1rem; }
.tourisme-venir-bloc li { margin-bottom: 0.45rem; line-height: 1.5; font-size: 0.95rem; }
.tourisme-venir-bloc a { color: var(--bleu-glaz-fonce); }
.tourisme .commune-section { margin-top: 2.5rem; }

/* --- Agenda : bouton « Filtres », filtres actifs, fenêtre des filtres (<dialog>) -------- */

.agenda-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 1.25rem 0 0; }
.agenda-filtres-bouton {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--hermine); border-radius: 999px;
  background: #fff; color: var(--hermine);
  font: inherit; font-weight: 650; cursor: pointer;
}
.agenda-filtres-bouton svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.agenda-filtres-bouton:hover { background: var(--noir-goemon); border-color: var(--noir-goemon); color: #fff; }
.agenda-filtres-nb {
  display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.35rem;
  border-radius: 999px; background: var(--bleu-glaz-fonce); color: #fff; font-size: 0.75rem;
}
.agenda-actifs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.agenda-actif {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  background: color-mix(in srgb, var(--bleu-glaz) 12%, #fff); color: var(--bleu-glaz-fonce);
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
}
.agenda-actif:hover { background: color-mix(in srgb, var(--bleu-glaz) 22%, #fff); }
.agenda-actif--tout { background: transparent; color: var(--granit); text-decoration: underline; }

.agenda-modale {
  width: min(44rem, calc(100% - 2rem));
  max-height: min(85vh, 46rem);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--blanc-ecume);
  color: var(--hermine);
  box-shadow: 0 30px 80px rgba(0, 20, 26, 0.35);
}
.agenda-modale::backdrop { background: rgba(0, 20, 26, 0.55); backdrop-filter: blur(2px); }
.agenda-modale[open] { display: flex; flex-direction: column; }
.agenda-modale-entete, .agenda-modale-pied {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.5rem;
}
.agenda-modale-entete { border-bottom: 1px solid var(--ligne); }
.agenda-modale-entete h2 { margin: 0; font-size: 1.3rem; }
.agenda-modale-entete form, .agenda-modale-pied form { margin: 0; }
.agenda-modale-fermer {
  width: 2.4rem; height: 2.4rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--hermine); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.agenda-modale-fermer:hover { background: var(--sable); }
.agenda-modale .agenda-filtres { flex: 1; overflow-y: auto; margin: 0; padding: 0.5rem 1.5rem 1rem; border: 0; }
.agenda-modale .actus-territoires-rang { display: block; padding: 0.75rem 0; }
.agenda-modale .actus-territoires-rang + .actus-territoires-rang { margin-top: 0; border-top: 1px solid var(--ligne); }
.agenda-modale .actus-territoires-libelle { margin: 0 0 0.6rem; }
.agenda-modale .actus-puces { flex-wrap: wrap; overflow: visible; }
.agenda-modale-pied { border-top: 1px solid var(--ligne); }
.agenda-modale-pied a { color: var(--granit); }
.agenda-modale-voir {
  padding: 0.65rem 1.2rem; border: 0; border-radius: 999px;
  background: var(--bleu-glaz-fonce); color: #fff; font: inherit; font-weight: 650; cursor: pointer;
}
.agenda-modale-voir:hover { background: var(--noir-goemon); }

/* Phones: a sheet from the bottom of the screen */
@media (max-width: 600px) {
  .agenda-modale { width: 100%; max-width: none; max-height: 88vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
}

/* --- Économie (blog_economie.php) : sources suivies, puces de thème en filtre ---- */

.eco-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.9rem;
  margin: 1.1rem 0 0;
  font-size: 0.92rem;
  color: var(--granit);
}

.eco-sources-libelle { font-weight: 600; }

.eco-source { font-weight: 600; color: var(--hermine); }

.eco-source-nb {
  font-family: var(--police-donnees);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: var(--granit);
}

button.actus-puce { font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; }

.actus-puce[aria-pressed="true"] {
  background: var(--noir-goemon);
  border-color: var(--noir-goemon);
  color: var(--blanc-ecume);
}

.actus-puce[aria-pressed="true"] .actus-puce-nb { background: var(--bleu-glaz); color: #fff; }

.actu-carte[hidden] { display: none; }
