/*
 * Pages editoriales d'information : /amendes.php et /confiscation.php (inc/page_editorial.php).
 * Complete assets/css/pages/acceuil.css (sf-section, sf-container, sf-section-header, sf-eyebrow,
 * sf-btn), charge juste avant : seuls les blocs propres a ces pages sont definis ici.
 */

body.sf-edito-page { background: #fff; }

/* Reserve aux lecteurs d'ecran (legende du tableau). Redefinie ici : la seule autre definition du
   site vit dans assets/css/pages/maps_mairie.css, qui n'est plus charge par aucune page. */
.sf-edito-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sf-edito-page a:focus-visible,
.sf-edito-page button:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 2px;
}

/* ---------- Hero ---------- */
.sf-edito-hero { position: relative; overflow: hidden; color: var(--brand-ink); }
.sf-edito-hero-inner { position: relative; padding-top: 7rem; padding-bottom: 3rem; }
@media (min-width: 1024px) {
  .sf-edito-hero-inner { padding-top: 8rem; padding-bottom: 3.25rem; }
}

/* La section qui suit ouvre sinon sur 7rem, qui s'ajoutent a la marge basse du hero. */
.sf-edito-hero + .sf-section { padding-top: 3.25rem; }
@media (min-width: 640px) { .sf-edito-hero + .sf-section { padding-top: 4rem; } }

.sf-edito-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

/* Voile double : la colonne de texte a gauche devient presque opaque, la photo reste nette a
   droite. Ces deux photos sont sombres et chargees, un voile vertical seul ne suffit pas. */
.sf-edito-hero-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.93) 0%, rgb(255 255 255 / 0.84) 38%, rgb(255 255 255 / 0.38) 68%, transparent 100%),
    linear-gradient(to bottom, rgb(255 255 255 / 0.55) 0%, rgb(255 255 255 / 0.32) 55%, rgb(255 255 255 / 0.58) 100%);
}
@media (max-width: 767px) {
  .sf-edito-hero-veil {
    background-image: linear-gradient(to bottom, rgb(255 255 255 / 0.92) 0%, rgb(255 255 255 / 0.84) 60%, rgb(255 255 255 / 0.9) 100%);
  }
}

.sf-edito-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--brand-muted);
}
.sf-edito-breadcrumb a { color: inherit; text-decoration: none; }
.sf-edito-breadcrumb a:hover { color: var(--brand-ink); }
.sf-edito-breadcrumb .is-current { font-weight: 500; color: var(--brand-ink); }

.sf-edito-title {
  margin: 1.25rem 0 0;
  max-width: 46rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.875rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--brand-ink);
  text-wrap: balance;
}
@media (min-width: 640px) { .sf-edito-title { font-size: 2.5rem; } }

/* Le jaune de la charte sur fond clair plafonne a ~1,4:1 de contraste : le mot-cle garde l'encre
   et le jaune devient un surligneur, lisible sur n'importe quelle photo. */
.sf-edito-title span {
  color: var(--brand-ink);
  background-image: linear-gradient(to bottom, transparent 58%, rgba(var(--brand-yellow-rgb), 0.9) 58%);
  padding: 0 0.12em 0.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sf-edito-sub {
  margin: 1rem 0 0;
  max-width: 42rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  font-weight: 500;
  color: rgba(var(--brand-ink-rgb), 0.82);
}
@media (min-width: 640px) { .sf-edito-sub { font-size: 1rem; } }

.sf-edito-stats {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
}
.sf-edito-stats .value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--brand-ink);
}
.sf-edito-stats .label { display: block; font-size: 0.8125rem; font-weight: 500; color: rgba(var(--brand-ink-rgb), 0.72); }

/* ---------- Cartes ---------- */
.sf-edito-cards { margin-top: 2.5rem; display: grid; gap: 1rem; }
@media (min-width: 768px) { .sf-edito-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sf-edito-cards.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.sf-edito-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--brand-border);
  border-radius: 1.25rem;
  background: #fff;
  padding: 1.5rem;
}
.sf-edito-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--brand-cream);
  color: var(--brand-ink);
}
.sf-edito-card h3 {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--brand-ink);
}
.sf-edito-card p { margin: 0.5rem 0 0; font-size: 0.9375rem; line-height: 1.7; color: var(--brand-muted); }
.sf-edito-card .amount {
  display: block;
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--brand-ink);
}
.sf-edito-card .amount-note { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--brand-muted); }

/* ---------- Tableau ---------- */
.sf-edito-table-wrap {
  margin-top: 2rem;
  overflow-x: auto;
  border: 1px solid var(--brand-border);
  border-radius: 1.25rem;
  background: #fff;
}
.sf-edito-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.sf-edito-table th,
.sf-edito-table td { padding: 0.9rem 1.25rem; text-align: left; white-space: nowrap; }
.sf-edito-table thead th {
  background: var(--brand-surface);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--brand-muted);
}
.sf-edito-table tbody tr { border-top: 1px solid var(--brand-border); }
.sf-edito-table tbody th { font-weight: 600; color: var(--brand-ink); }
.sf-edito-table td { color: var(--brand-muted); }

/* ---------- Encadre d'avertissement ---------- */
.sf-edito-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  border-radius: 1rem;
  background: rgba(var(--brand-yellow-rgb), 0.12);
  padding: 1rem 1.25rem;
  color: var(--brand-ink);
}
.sf-edito-note svg { flex-shrink: 0; margin-top: 0.15rem; }
.sf-edito-note p { margin: 0; font-size: 0.875rem; line-height: 1.65; color: rgba(var(--brand-ink-rgb), 0.78); }
.sf-edito-note p.title { font-weight: 600; color: var(--brand-ink); }
.sf-edito-note p.title + p { margin-top: 0.25rem; }

/* ---------- Etapes ---------- */
.sf-edito-steps { margin: 2.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.sf-edito-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  background: #fff;
  padding: 1.1rem 1.25rem;
}
.sf-edito-step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--brand-ink);
  color: var(--brand-yellow);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
}
.sf-edito-step p { margin: 0; font-size: 0.9375rem; line-height: 1.7; color: var(--brand-muted); }
.sf-edito-step strong { color: var(--brand-ink); }

/* ---------- Texte courant ---------- */
.sf-edito-prose { max-width: 48rem; }
.sf-edito-prose p { margin: 1rem 0 0; font-size: 0.9375rem; line-height: 1.75; color: var(--brand-muted); }
.sf-edito-prose ul { margin: 1rem 0 0; padding-left: 1.25rem; }
.sf-edito-prose li { margin-top: 0.5rem; font-size: 0.9375rem; line-height: 1.7; color: var(--brand-muted); }
.sf-edito-prose strong { color: var(--brand-ink); }

.sf-edito-links { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sf-edito-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: #fff;
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-ink);
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.sf-edito-links a:hover { background: rgba(var(--brand-yellow-rgb), 0.14); border-color: rgba(var(--brand-yellow-rgb), 0.5); }

/* ---------- CTA sombre ---------- */
.sf-edito-cta { position: relative; overflow: hidden; color: #fff; }
.sf-edito-cta-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 768px) {
  .sf-edito-cta-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 2.5rem; }
}
.sf-edito-cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: #fff;
}
@media (min-width: 640px) { .sf-edito-cta h2 { font-size: 1.75rem; } }
.sf-edito-cta p { margin: 0.5rem 0 0; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.7); }
.sf-edito-cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; flex-shrink: 0; }
