/* ==========================================================================
   Passy Actu 2026, direction « Direct » : base
   Reset, typographie, éléments natifs, contenu d'article, boutons, formulaires, utilitaires.
   Polices : Oswald (The Oswald Project Authors) et Inter (Rasmus Andersson), SIL OFL 1.1.
   ========================================================================== */

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--pa-header-h) + 16px); }
body {
  min-height: 100dvh;
  background: var(--pa-bg);
  color: var(--pa-ink-1);
  font-family: var(--pa-font-text);
  font-size: var(--pa-text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, picture, video, canvas, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
#wpadminbar :is(img, svg, canvas) { display: inline-block; max-width: none; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--pa-ink); }
:focus-visible { outline: 3px solid var(--pa-focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--pa-red); color: #fff; }
hr { border: 0; border-top: 1px solid var(--pa-line); }

/* Typographie ------------------------------------------------------------ */
h1, h2, h3, .pa-display {
  font-family: var(--pa-font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .005em;
  color: var(--pa-ink);
  text-wrap: balance;
}
h1 { font-size: var(--pa-text-h1); text-transform: uppercase; line-height: 1.04; }
h2 { font-size: var(--pa-text-h2); }
h3 { font-size: var(--pa-text-h3); }
h4, h5, h6 { font-family: var(--pa-font-text); font-weight: 700; color: var(--pa-ink); line-height: 1.3; }
h4 { font-size: var(--pa-text-h4); }
p { text-wrap: pretty; }
small, .pa-text-sm { font-size: var(--pa-text-sm); }
.pa-text-xs { font-size: var(--pa-text-xs); }
.pa-muted { color: var(--pa-ink-2); }
.pa-faint { color: var(--pa-ink-3); }

/* Surtitre */
.pa-kicker {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--pa-font-display);
  font-size: var(--pa-text-sm);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pa-highlight);
}
.pa-kicker--light { color: var(--pa-highlight); }

/* Badge de rubrique : pavé coloré, capitales condensées */
.pa-badge {
  display: inline-block;
  padding: .28em .62em .24em;
  background: var(--pa-cat, var(--pa-red));
  color: #fff;
  font-family: var(--pa-font-display);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
  border-radius: 3px;
}
.pa-badge:hover { color: #fff; filter: brightness(1.12); }
.pa-badge[data-cat="vie-communale"] { color: #111; }

/* Titre de section : filet rouge vertical + capitales condensées */
.pa-section-head {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--pa-space-2) var(--pa-space-4);
  margin-block-end: var(--pa-space-5);
}
.pa-section-head__title, .pa-section-head h2 {
  display: flex; align-items: center; gap: .55em;
  font-family: var(--pa-font-display);
  font-size: clamp(1.2rem, 1rem + .8vw, 1.55rem);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pa-ink);
}
.pa-section-head__title::before, .pa-section-head h2::before {
  content: ""; flex: none; width: 6px; height: 1.05em; background: var(--pa-red); border-radius: 1px;
}
.pa-section-head__title a:hover { color: var(--pa-highlight); }
.pa-section-head__more {
  margin-inline-start: auto;
  display: inline-flex; align-items: center; gap: .35em;
  font-size: var(--pa-text-sm); font-weight: 600; color: var(--pa-highlight);
}
.pa-section-head__more:hover { color: var(--pa-ink); }
.pa-section-head__more .pa-icon { width: 1em; height: 1em; }
.pa-section-label {
  font-family: var(--pa-font-display); font-size: var(--pa-text-sm); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--pa-ink-2);
}

/* Contenu d'article (the_content) ---------------------------------------- */
.pa-prose { font-size: var(--pa-text-md); line-height: 1.75; color: var(--pa-ink-1); overflow-wrap: break-word; }
.pa-prose > * + * { margin-block-start: 1.15em; }
.pa-prose h2, .pa-prose h3, .pa-prose h4 { margin-block-start: 1.8em; text-transform: none; }
.pa-prose h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); }
.pa-prose h3 { font-size: clamp(1.2rem, 1.1rem + .5vw, 1.4rem); }
.pa-prose a { color: var(--pa-red-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.pa-prose a:hover { color: var(--pa-ink); }
.pa-prose strong { color: var(--pa-ink); }
.pa-prose blockquote, .pa-prose .wp-block-quote {
  margin-inline: 0;
  padding: var(--pa-space-2) 0 var(--pa-space-2) var(--pa-space-5);
  border-inline-start: 4px solid var(--pa-red);
  font-family: var(--pa-font-display);
  font-size: 1.3em; line-height: 1.35;
  color: var(--pa-ink);
}
.pa-prose blockquote cite { display: block; margin-top: .6em; font: 500 var(--pa-text-sm)/1.4 var(--pa-font-text); color: var(--pa-ink-3); font-style: normal; }
.pa-prose figure { margin-inline: 0; }
.pa-prose figcaption, .pa-prose .wp-element-caption { font-size: var(--pa-text-sm); color: var(--pa-ink-3); margin-block-start: var(--pa-space-2); line-height: 1.45; }
.pa-prose img { border-radius: var(--pa-radius); }
.pa-prose ul, .pa-prose ol { padding-inline-start: 1.3em; }
.pa-prose li + li { margin-block-start: .4em; }
.pa-prose li::marker { color: var(--pa-red); }
.pa-prose table { width: 100%; border-collapse: collapse; font-size: var(--pa-text-sm); }
.pa-prose th, .pa-prose td { padding: .6em .8em; border-bottom: 1px solid var(--pa-line); text-align: start; }
.pa-prose th { color: var(--pa-ink); background: var(--pa-surface); }
.pa-prose .wp-block-table { overflow-x: auto; }
.pa-prose pre, .pa-prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: var(--pa-surface); border-radius: var(--pa-radius-sm); }
.pa-prose code { padding: .1em .35em; }
.pa-prose pre { padding: var(--pa-space-4); overflow-x: auto; }
.pa-prose .wp-block-embed, .pa-prose iframe { border-radius: var(--pa-radius); max-width: 100%; }
.pa-prose .wp-block-embed__wrapper { position: relative; }
.pa-prose .wp-block-gallery { gap: var(--pa-space-2); }
.pa-prose .wp-block-separator { border-top: 1px solid var(--pa-line); margin-block: 2em; }
.pa-prose .wp-block-button__link { background: var(--pa-red); color: #fff; border-radius: 999px; text-decoration: none; }
.pa-prose .alignleft { float: left; margin: .3em 1.2em .8em 0; max-width: 50%; }
.pa-prose .alignright { float: right; margin: .3em 0 .8em 1.2em; max-width: 50%; }
.pa-prose .aligncenter { margin-inline: auto; }
.pa-prose .alignwide, .pa-prose .alignfull { max-width: none; }
.pa-prose::after { content: ""; display: table; clear: both; }
.pa-prose .has-text-color { color: inherit; }
.pa-prose .has-background { color: #111; }
.pa-prose mark { background: var(--pa-yellow); color: #111; padding: 0 .15em; }

/* Boutons ---------------------------------------------------------------- */
.pa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--pa-space-2);
  min-height: 44px;
  padding: .6em 1.15em;
  border-radius: 6px;
  background: var(--pa-red); color: #fff;
  font-family: var(--pa-font-display);
  font-size: .95rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid transparent;
  transition: background var(--pa-dur) var(--pa-ease), border-color var(--pa-dur) var(--pa-ease), color var(--pa-dur) var(--pa-ease);
}
.pa-btn:hover { background: var(--pa-red-hover); color: #fff; }
.pa-btn--ghost { background: transparent; color: var(--pa-ink); border-color: var(--pa-line-strong); }
.pa-btn--ghost:hover { background: var(--pa-surface-2); border-color: var(--pa-ink-3); color: var(--pa-ink); }
.pa-btn--light { color: #fff; }
.pa-btn--tiktok { background: var(--pa-contrast-bg); color: var(--pa-contrast-ink); }
.pa-btn--tiktok:hover { background: var(--pa-contrast-bg); color: var(--pa-contrast-ink); filter: brightness(.9); }
.pa-btn--youtube { background: var(--pa-youtube); color: #fff; }
.pa-btn--youtube:hover { background: #d40000; color: #fff; }
.pa-btn .pm-icon, .pa-btn .pa-icon { width: 1.15em; height: 1.15em; }

/* Formulaires ------------------------------------------------------------ */
label { color: var(--pa-ink-2); font-size: var(--pa-text-sm); font-weight: 600; }
.pa-input,
.pa-prose input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.pa-prose textarea, .pa-prose select,
.comment-form input:not([type="checkbox"]):not([type="submit"]), .comment-form textarea,
.wpcf7 input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .wpcf7 textarea, .wpcf7 select {
  width: 100%;
  min-height: 46px;
  padding: .7em .95em;
  border: 1px solid var(--pa-line-strong);
  border-radius: 8px;
  background: var(--pa-surface);
  color: var(--pa-ink);
}
.pa-input::placeholder, textarea::placeholder, input::placeholder { color: var(--pa-ink-3); }
.pa-input:focus, .pa-prose input:focus, .pa-prose textarea:focus, .comment-form :is(input, textarea):focus, .wpcf7 :is(input, textarea, select):focus {
  border-color: var(--pa-red); outline: none; box-shadow: 0 0 0 3px var(--pa-accent-soft);
}
select.pa-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--pa-ink-2) 50%), linear-gradient(135deg, var(--pa-ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 2.4em; }
input[type="submit"], .wpcf7-submit, .comment-form .submit {
  min-height: 46px; padding: .6em 1.3em; border: 0; border-radius: 6px;
  background: var(--pa-red); color: #fff; cursor: pointer;
  font-family: var(--pa-font-display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
input[type="submit"]:hover, .wpcf7-submit:hover, .comment-form .submit:hover { background: var(--pa-red-hover); }
.wpcf7 form > p { margin-block-end: var(--pa-space-4); }
.wpcf7-response-output { border-radius: 8px; }

/* Recherche */
.pa-search-form { display: flex; gap: var(--pa-space-2); width: 100%; }
.pa-search-form .pa-input { flex: 1; }
.pa-search-form .pa-btn { flex: none; }

/* Icônes SVG inline ------------------------------------------------------ */
.pa-icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pm-icon { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; }

/* Accessibilité ---------------------------------------------------------- */
.screen-reader-text, .pa-sr {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.pa-skip {
  position: absolute; inset-inline-start: var(--pa-space-4); top: -100px; z-index: 1000;
  padding: var(--pa-space-3) var(--pa-space-4);
  background: var(--pa-yellow); color: #111; font-weight: 700;
  border-radius: 0 0 8px 8px;
}
.pa-skip:focus { top: 0; }

/* Mise en page minimale -------------------------------------------------- */
.pa-container { width: min(100% - 2 * var(--pa-gutter), var(--pa-max)); margin-inline: auto; }
.pa-container--narrow { width: min(100% - 2 * var(--pa-gutter), var(--pa-narrow)); margin-inline: auto; }
.pa-section { padding-block: clamp(1.75rem, 1.2rem + 2vw, 3rem); }
.pa-stack > * + * { margin-block-start: var(--pa-space-4); }
.pa-cluster { display: flex; flex-wrap: wrap; gap: var(--pa-space-3); align-items: center; }

/* Cadres d'image --------------------------------------------------------- */
.pa-ratio { position: relative; display: block; aspect-ratio: var(--ratio, 16 / 9); overflow: hidden; background: var(--pa-surface-2); }
.pa-ratio > img, .pa-ratio > iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.pa-ratio--portrait { --ratio: 9 / 16; }
.pa-ratio--square { --ratio: 1; }
.pa-ratio--hero { --ratio: 16 / 9; }
/* Photo verticale : image entière sur fond flouté d'elle-même, sans retouche du fichier. */
.pa-ratio--fit > img:not(.pa-ratio__blur) { object-fit: contain; object-position: center; z-index: 1; }
.pa-ratio__blur { filter: blur(26px) saturate(1.15) brightness(.55); transform: scale(1.25); }

/* Logo ------------------------------------------------------------------- */
.custom-logo-link { display: inline-block; line-height: 0; }
.custom-logo { width: auto; height: 44px; }
img.custom-logo { filter: drop-shadow(0 0 1px var(--pa-logo-contour)) drop-shadow(0 0 .5px var(--pa-logo-contour)); }
/* Fichiers officiels 500 x 500 : cadrage sur la zone utile, sans modifier l'image. */
.custom-logo-link.pa-logo--original { display: block; position: relative; flex-shrink: 0; width: calc(var(--pa-logo-height, 44px) * 406 / 202); height: var(--pa-logo-height, 44px); overflow: hidden; }
.custom-logo-link.pa-logo--original > img.custom-logo { position: absolute; width: calc(100% * 500 / 406); height: auto; max-width: none; inset-inline-start: calc(100% * -53 / 406); inset-block-start: calc(100% * -135 / 202); }

/* Mouvement réduit ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
