/* ============================================================
   Wasquehal Vivante — motifs de marque (front + éditeur)
   Complète theme.json pour ce qui n'est pas exprimable en presets :
   bandeaux inclinés, puces chevron, filet arc-en-ciel, cartes…
   Toutes les couleurs réutilisent les variables WP des presets.
   ============================================================ */

:root {
  --wv-skew: -6deg;
  --wv-shadow-punch: 6px 6px 0 rgba(22, 48, 47, 0.18);
}

/* ---- Accessibilité : lien d'évitement ---- */
.wv-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--wp--preset--color--encre);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  font-family: var(--wp--preset--font-family--corps);
  font-weight: 700;
}
.wv-skip-link:focus { left: 0; }

/* Focus visible homogène (RGAA 10.7) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 3px solid var(--wp--preset--color--bleu);
  outline-offset: 2px;
}

/* ---- Filet arc-en-ciel (séparateur signature) ---- */
.wv-filet {
  height: 5px;
  border-radius: 999px;
  background: var(--wp--preset--gradient--arc);
  border: 0;
}
.wv-filet--epais { height: 8px; }

/* ---- Bandeau « punch » incliné ---- */
.wv-punch {
  display: inline-block;
  transform: skewX(var(--wv-skew));
  padding: 0.18em 0.5em;
  box-shadow: var(--wv-shadow-punch);
  white-space: nowrap;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.1;
  background: var(--wp--preset--color--rouge);
  color: #fff;
}
.wv-punch > * { display: inline-block; transform: skewX(calc(-1 * var(--wv-skew))); }
.wv-punch--jaune { background: var(--wp--preset--color--jaune); color: var(--wp--preset--color--encre); }
.wv-punch--violet { background: var(--wp--preset--color--violet); color: #fff; }

/* ---- Étiquette thématique inclinée ---- */
.wv-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  white-space: nowrap;
  transform: skewX(var(--wv-skew));
  padding: 0.4em 0.9em 0.4em 0.7em;
  border-radius: 6px;
  font-family: var(--wp--preset--font-family--titre);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: var(--wp--preset--color--corail);
  text-decoration: none;
  line-height: 1.1;
}
.wv-chip > * { transform: skewX(calc(-1 * var(--wv-skew))); }

/* ---- Liste à puces chevron ---- */
.wv-chevrons { list-style: none; margin: 0; padding: 0; }
.wv-chevrons li {
  position: relative;
  padding-left: 1.4em;
  margin-bottom: 0.6em;
  line-height: 1.55;
}
.wv-chevrons li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: -0.05em;
  font-weight: 900;
  font-size: 1.2em;
  color: var(--wp--preset--color--corail);
  line-height: 1.4;
}
.wv-chevrons--bleu li::before { color: var(--wp--preset--color--bleu); }
.wv-chevrons--vert li::before { color: var(--wp--preset--color--vert); }
.wv-chevrons--violet li::before { color: var(--wp--preset--color--violet); }

/* ---- Carte ---- */
.wv-card {
  background: #fff;
  border: 1px solid var(--wp--preset--color--gris-200);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(22, 48, 47, 0.12);
  overflow: hidden;
}
.wv-card__filet { height: 6px; background: var(--wp--preset--gradient--arc); }
.wv-card__body { padding: 1.5rem; }

/* ---- Encart « note » (callout) : ex-ww-perspective ---- */
.wv-note {
  background: var(--wp--preset--color--gris-100);
  border-left: 4px solid var(--wp--preset--color--jaune);
  border-radius: 0 14px 14px 0;
  padding: 1.5rem 1.75rem;
  margin-block: 2rem;
}
.wv-note > :first-child { margin-top: 0; }
.wv-note > :last-child { margin-bottom: 0; }

/* ---- Cartes élus (page Nos élus) ---- */
.wv-elus { gap: 1.5rem; }
.wv-elu-card {
  background: #fff;
  border: 1px solid var(--wp--preset--color--gris-200);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(22, 48, 47, 0.1);
  overflow: hidden;
  padding-bottom: 1.25rem;
}
.wv-elu-portrait {
  aspect-ratio: 3/4;
  background: var(--wp--preset--color--gris-200);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wv-elu-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wv-elu-portrait:empty::before {
  content: "Portrait à venir";
  font-family: var(--wp--preset--font-family--semicondensed);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--wp--preset--color--gris-500);
}
.wv-elu-card h3 { font-family: var(--wp--preset--font-family--titre); margin: 1rem 1.25rem 0; line-height: 1.1; }
.wv-elu-role { color: var(--wp--preset--color--corail); font-weight: 600; margin: 0.3rem 1.25rem 0; }
.wv-elu-bio  { font-size: 0.95rem; line-height: 1.55; margin: 0.6rem 1.25rem 0; }

/* ---- Titre de section avec filet ---- */
.wv-section-title { margin-bottom: 0.5rem; }
.wv-eyebrow {
  font-family: var(--wp--preset--font-family--semicondensed);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--corail);
  margin-bottom: 0.5rem;
}

/* ---- Lettrine (drop cap natif : core has-drop-cap, restylé Neulis corail) ---- */
p.has-drop-cap::first-letter {
  font-family: var(--wp--preset--font-family--titre);
  font-weight: 700;
  font-style: italic;
  font-size: 3.6em;
  float: left;
  line-height: 0.78;
  padding: 0.06em 0.14em 0 0;
  color: var(--wp--preset--color--corail);
}

/* ---- En-tête : barre translucide ---- */
.wv-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--wp--preset--color--gris-200);
}

/* ---- Tableau de données (infos pratiques / open data) ---- */
.wv-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-family: var(--wp--preset--font-family--condensed); font-variant-numeric: tabular-nums; }
.wv-table caption { text-align: left; font-weight: 700; margin-bottom: 0.5rem; color: var(--wp--preset--color--encre); font-family: var(--wp--preset--font-family--semicondensed); }
.wv-table th,
.wv-table td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--wp--preset--color--gris-200); }
.wv-table thead th {
  background: var(--wp--preset--color--encre);
  color: #fff;
  font-family: var(--wp--preset--font-family--condensed);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.wv-table tbody tr:nth-child(even) { background: var(--wp--preset--color--gris-100); }

/* ---- Badge type de donnée publique ---- */
.wv-tag {
  display: inline-block;
  font-family: var(--wp--preset--font-family--condensed);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.28em 0.7em;
  border-radius: 999px;
  background: var(--wp--preset--color--bleu);
  color: #fff;
}
.wv-tag--arrete { background: var(--wp--preset--color--orange); }
.wv-tag--deliberation { background: var(--wp--preset--color--violet); }
.wv-tag--analyse { background: var(--wp--preset--color--vert); }

/* ---- Réduction des animations (RGAA / préférence utilisateur) ---- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- Lecture longue (corps des articles) : serif, distinct du sans-serif de marque ---- */
.wp-block-post-content {
  font-family: var(--wp--preset--font-family--lecture);
}
.wp-block-post-content .wv-tag,
.wp-block-post-content .wv-data,
.wp-block-post-content .wv-table {
  font-family: var(--wp--preset--font-family--condensed); /* chiffres/étiquettes restent en condensed */
}

/* ---- Titre numéroté (décryptage) : numérotation auto, un par article ---- */
.wp-block-post-content {
  counter-reset: wv-section;
}
.wp-block-post-content h2.wv-numbered::before {
  counter-increment: wv-section;
  content: counter(wv-section) ". ";
  color: var(--wp--preset--color--corail);
}
