/* ============================================================
   Amicale des Sapeurs-Pompiers Volontaires
   Doennange-Deiffelt-Lentzweiler ASBL — styles.css
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-var.woff2") format("woff2-variations");
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-var.woff2") format("woff2-variations");
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
}

/* ---------- Tokens ---------- */
:root {
  --ivory: #FAF7F1;
  --white: #FFFFFF;
  --burgundy: #7B2639;
  --burgundy-dark: #5E1B2C;
  --terracotta: #C85C42;
  --terracotta-dark: #A94A33;
  --gold: #D6A84B;
  --gold-dark: #B98C33;
  --forest: #315C4C;
  --forest-dark: #24463A;
  --charcoal: #232323;
  --warm-gray: #6D6862;
  --pale-rose: #F5E9E6;
  --line: #E7DFD2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(35, 35, 35, 0.08);
  --shadow-md: 0 12px 30px rgba(35, 35, 35, 0.12);
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", Arial, Helvetica, sans-serif;
  --container: 1140px;
  --focus: 3px solid var(--gold);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--charcoal);
  background-color: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--terracotta-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terracotta); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { padding-left: 1.4rem; }

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold); color: var(--charcoal); }

/* ---------- Layout utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

.section { padding-block: clamp(3rem, 7vw, 5.25rem); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section--tint { background-color: var(--white); }
.section--rose { background-color: var(--pale-rose); }
.section--forest { background-color: var(--forest); color: var(--ivory); }
.section--forest h1, .section--forest h2, .section--forest h3 { color: var(--ivory); }
.section--dark { background-color: var(--charcoal); color: var(--ivory); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
}

.section--forest .kicker, .section--dark .kicker { color: var(--gold); }

.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.65; color: var(--warm-gray); }
.section--forest .lead, .section--dark .lead { color: rgba(250, 247, 241, 0.85); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background-color: var(--burgundy); color: var(--white); }
.btn--primary:hover { background-color: var(--burgundy-dark); color: var(--white); }

.btn--secondary { background-color: var(--terracotta); color: var(--white); }
.btn--secondary:hover { background-color: var(--terracotta-dark); color: var(--white); }

.btn--gold { background-color: var(--gold); color: var(--charcoal); }
.btn--gold:hover { background-color: var(--gold-dark); color: var(--charcoal); }

.btn--ghost { border-color: currentColor; background: transparent; color: inherit; }
.btn--ghost:hover { background-color: rgba(255, 255, 255, 0.12); }

.btn--ghost-dark { border-color: var(--charcoal); color: var(--charcoal); background: transparent; }
.btn--ghost-dark:hover { background-color: var(--charcoal); color: var(--white); }

.btn--sm { padding: 0.7rem 1.15rem; font-size: 0.92rem; }
.btn--lg { padding: 1.1rem 2rem; font-size: 1.1rem; }
.btn--block { width: 100%; }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.link-arrow { font-weight: 700; text-decoration: none; color: var(--burgundy); }
.link-arrow:hover { color: var(--terracotta); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--burgundy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 0; color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 241, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}

.logo__mark { width: 42px; height: 42px; flex-shrink: 0; }

.logo__word {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--burgundy);
  line-height: 1.1;
}

.logo__tag {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-top: 0.15rem;
  white-space: nowrap;
}

/* Desktop nav */
.nav--main ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav__link {
  display: block;
  padding: 0.5rem 0.6rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--charcoal);
  text-decoration: none;
  border-radius: var(--radius-sm);
  position: relative;
  white-space: nowrap;
}

.nav__link:hover { color: var(--burgundy); background: rgba(123, 38, 57, 0.06); }

.nav__link[aria-current="page"] { color: var(--burgundy); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.1rem;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.nav__item--dropdown { position: relative; }

.nav__link--trigger {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav__caret {
  flex-shrink: 0;
  color: var(--warm-gray);
  transition: transform 0.15s ease;
}

.nav__link--trigger[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }
.nav__link--trigger[aria-expanded="true"] { color: var(--burgundy); }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  min-width: 250px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
  list-style: none;
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
}

.dropdown.is-open {
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: dropdown-in 0.16s ease-out;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.dropdown a:hover { background: var(--pale-rose); color: var(--burgundy); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer (mobile) */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(35, 35, 35, 0.45);
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer.is-open { visibility: visible; opacity: 1; }

.drawer__panel {
  width: min(360px, 88vw);
  height: 100%;
  background: var(--ivory);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.drawer.is-open .drawer__panel { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

.drawer__close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drawer .nav__link {
  padding: 0.8rem 0.5rem;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.drawer__sub {
  padding-left: 1.1rem;
}
.drawer__sub a {
  display: block;
  padding: 0.6rem 0.5rem;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--warm-gray);
  text-decoration: none;
}
.drawer__sub a:hover { color: var(--burgundy); }

.drawer__cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(480px, 68vh, 640px);
  color: var(--white);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(35, 35, 35, 0.82) 0%, rgba(94, 27, 44, 0.62) 55%, rgba(35, 35, 35, 0.28) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  padding-block: clamp(3rem, 8vw, 5rem);
}

.hero h1 { color: var(--white); margin-bottom: 0.5rem; }
.hero__intro { color: rgba(250, 247, 241, 0.92); font-size: clamp(1.05rem, 2vw, 1.25rem); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.8rem; }

.hero--inner { min-height: clamp(280px, 38vh, 360px); }
.hero--inner .hero__content { padding-block: clamp(2.5rem, 6vw, 4rem); }
.hero--inner h1 { font-size: clamp(2rem, 4.5vw, 3rem); }

.breadcrumbs {
  position: relative;
  z-index: 2;
  font-size: 0.85rem;
  color: rgba(250, 247, 241, 0.8);
  margin-bottom: 0.75rem;
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.6; }
.breadcrumbs a { color: rgba(250, 247, 241, 0.85); }
.breadcrumbs a:hover { color: var(--white); }
.breadcrumbs [aria-current="page"] { color: var(--white); font-weight: 700; }

/* ---------- Split / feature sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.split__media { border-radius: var(--radius); box-shadow: var(--shadow-md); }

.split--reverse .split__media { order: -1; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

.check-list { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.check-list li { position: relative; padding-left: 2rem; margin-bottom: 0.7rem; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card__media img { transform: scale(1.04); }

.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card__title { margin: 0; font-size: 1.25rem; }
.card__text { color: var(--warm-gray); font-size: 0.98rem; margin: 0; }
.card__footer { margin-top: auto; padding-top: 0.9rem; }

.card--plain { box-shadow: none; }
.card--tinted { background: var(--pale-rose); border-color: transparent; box-shadow: none; }
.card--tinted:hover { transform: none; box-shadow: var(--shadow-sm); }

/* Feature / value icon tiles */
.tile { text-align: center; padding: 1.6rem 1.2rem; }
.tile__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pale-rose);
  color: var(--burgundy);
}
.tile__icon svg { width: 32px; height: 32px; }
.tile h3 { margin-bottom: 0.35rem; }
.tile p { font-size: 0.95rem; color: var(--warm-gray); margin-bottom: 0; }

/* ---------- Band / CTA ---------- */
.band {
  text-align: center;
  padding-block: clamp(3rem, 7vw, 4.5rem);
}
.band h2 { max-width: 30rem; margin-inline: auto; }
.band__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.85rem; margin-top: 1.6rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; min-width: 560px; }
th, td { text-align: left; padding: 0.95rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  background: var(--pale-rose);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--burgundy);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--ivory); }

/* ---------- Definition / info lists ---------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list > div { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { font-weight: 800; color: var(--burgundy); }
.info-list dd { margin: 0; }
@media (max-width: 640px) {
  .info-list > div { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ---------- Accessibilité ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Drawer : sous-menu « Nos actions » ---------- */
.drawer__details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.drawer__details summary::-webkit-details-marker { display: none; }
.drawer__details summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-right: 2px solid var(--warm-gray);
  border-bottom: 2px solid var(--warm-gray);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.drawer__details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.drawer__details[open] .nav__link { color: var(--burgundy); }

/* ---------- Accordion ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.4rem 1.1rem 0.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--charcoal);
  position: relative;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pale-rose);
  color: var(--burgundy);
  font-weight: 800;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}
.accordion details[open] summary::after { content: "−"; }
.accordion details[open] summary { color: var(--burgundy); }
.accordion__body { padding: 0 0.25rem 1.25rem; color: var(--warm-gray); }

/* ---------- Donation ---------- */
.donation-panel {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 560px;
}

.donation-panel__sub { color: var(--warm-gray); font-size: 0.95rem; }

.donation-amounts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin: 0.75rem 0 1.1rem;
}

.donation-amounts input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.donation-amounts label {
  display: block;
  text-align: center;
  padding: 0.85rem 0.5rem;
  border: 2px solid var(--burgundy);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--burgundy);
  background: var(--white);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.donation-amounts label:hover { border-color: var(--gold); }

.donation-amounts input:checked + label {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--white);
}

.donation-amounts input:focus-visible + label {
  outline: var(--focus);
  outline-offset: 3px;
}

.donation-amounts input:disabled + label { opacity: 0.5; cursor: not-allowed; }

.donation-custom { margin: 0 0 1.2rem; }
.donation-custom[hidden] { display: none; }
.donation-custom label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.donation-custom input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ivory);
  color: var(--charcoal);
}
.donation-custom input:focus-visible { outline: var(--focus); outline-offset: 2px; }
.donation-custom input[disabled] { opacity: 0.5; }

.donation-fields {
  border: 0;
  padding: 0;
  margin: 0 0 1.2rem;
  display: grid;
  gap: 1rem;
}

.donation-anon {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--charcoal);
}
.donation-anon input {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--burgundy);
  flex-shrink: 0;
}

.donation-submit { margin-top: 0.4rem; }

.donation-error {
  font-size: 0.85rem;
  font-weight: 600;
  color: #A03232;
  min-height: 1.1em;
  margin: 0 0 1rem;
}
.donation-error:empty { display: none; }

.donation-note { font-size: 0.85rem; color: var(--warm-gray); margin-top: 1rem; }
.donation-note a { color: var(--terracotta-dark); }

/* Notification de confirmation du don (coin supérieur droit) */
.donation-toast {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  width: min(380px, calc(100% - 2rem));
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--forest);
  color: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: toast-in 0.3s ease-out;
}
.donation-toast[hidden] { display: none; }
.donation-toast__icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.donation-toast__icon svg { width: 0.9rem; height: 0.9rem; }
.donation-toast p { margin: 0; flex: 1; }
.donation-toast__close {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.donation-toast__close:hover { background: rgba(255, 255, 255, 0.18); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.donation-status {
  margin-top: 1.1rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
}

.donation-status--info { background: var(--pale-rose); color: var(--burgundy); }
.donation-status--error { background: #FBE3E0; color: #8C2F2F; }
.donation-status--success { background: #E3EFE9; color: var(--forest); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; }
.form-row--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-row--2 { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label { font-weight: 700; font-size: 0.95rem; }
.form-group .req { color: var(--terracotta); }

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--charcoal);
}
.form-group textarea { resize: vertical; min-height: 150px; }
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible { outline: var(--focus); outline-offset: 2px; }

.form-group .field-error {
  font-size: 0.85rem;
  font-weight: 600;
  color: #A03232;
  min-height: 1.1em;
}
.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea { border-color: #A03232; }

.form-help { font-size: 0.85rem; color: var(--warm-gray); }
.form-note { font-size: 0.85rem; color: var(--warm-gray); }
.form-note a { color: var(--terracotta-dark); }

.contact-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(680px, calc(100% - 2rem));
  background: var(--charcoal);
  color: var(--ivory);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 1.6rem;
  z-index: 200;
}

.cookie-banner[hidden] { display: none; }

.cookie-banner h2 { color: var(--ivory); font-size: 1.15rem; margin-bottom: 0.5rem; }
.cookie-banner p { font-size: 0.92rem; color: rgba(250, 247, 241, 0.85); margin-bottom: 0.5rem; }
.cookie-banner a { color: var(--gold); }

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.cookie-banner__custom {
  margin-top: 1rem;
  border-top: 1px solid rgba(250, 247, 241, 0.18);
  padding-top: 1rem;
}

.cookie-banner__custom h3 { color: var(--ivory); font-size: 0.95rem; }
.cookie-banner__custom .cookie-row { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.9rem; margin-bottom: 0.8rem; }
.cookie-banner__custom input { margin-top: 0.3rem; accent-color: var(--gold); }
.cookie-banner__custom .cookie-row p { margin: 0; }
.cookie-banner__custom .cookie-row strong { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: rgba(250, 247, 241, 0.82);
  font-size: 0.95rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

.site-footer h2, .site-footer h3 {
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.site-footer a { color: rgba(250, 247, 241, 0.82); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }

.footer__brand .logo { margin-bottom: 1rem; }
.footer__brand .logo__word { color: var(--ivory); }
.footer__brand .logo__tag { color: rgba(250, 247, 241, 0.6); }

.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li { margin-bottom: 0.55rem; }

.footer__contact { list-style: none; margin: 0; padding: 0; }
.footer__contact li { margin-bottom: 0.55rem; }
.footer__contact svg { vertical-align: -3px; margin-right: 0.4rem; color: var(--gold); }

.footer__bottom {
  border-top: 1px solid rgba(250, 247, 241, 0.14);
  padding-block: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(250, 247, 241, 0.6);
}

.footer__legal { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0; padding: 0; }
.footer__legal a { color: rgba(250, 247, 241, 0.72); }

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: rgba(250, 247, 241, 0.72);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-button:hover { color: var(--gold); }

/* ---------- Misc ---------- */
.pager-title { margin: 0; }
.text-center { text-align: center; }

.page-hero-pad { padding-block: 2rem 0; }

.badge {
  display: inline-block;
  background: var(--pale-rose);
  color: var(--burgundy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

.alert-note {
  background: var(--pale-rose);
  border-left: 4px solid var(--terracotta);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  color: var(--charcoal);
}

.figure-note { font-size: 0.82rem; color: var(--warm-gray); margin-top: 0.5rem; }

/* ---------- Actualités ---------- */
.news-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.news-card--featured { padding: clamp(1.6rem, 4vw, 2.4rem); }
.news-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.news-card__date { font-size: 0.85rem; font-weight: 600; color: var(--warm-gray); }
.news-card h2, .news-card h3 { margin: 0; }
.news-card__title { font-size: 1.35rem; }
.news-card--featured .news-card__title { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.news-card__text { color: var(--warm-gray); margin: 0; }
.news-card__ref {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.85rem;
  color: var(--burgundy);
  background: var(--pale-rose);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
}
.news-details { border-top: 1px solid var(--line); margin-top: 0.4rem; padding-top: 0.8rem; }
.news-details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--burgundy);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.news-details summary::-webkit-details-marker { display: none; }
.news-details summary::after {
  content: "+";
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.news-details[open] summary::after { content: "\2212"; }
.news-details__body { padding-top: 0.9rem; color: var(--warm-gray); font-size: 0.97rem; }
.news-details__body ul { margin: 0; }
.news-details__body li { margin-bottom: 0.45rem; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 3vw, 1.75rem);
}
@media (max-width: 760px) {
  .news-grid { grid-template-columns: 1fr; }
}

.verified-note {
  background: var(--pale-rose);
  border-left: 4px solid var(--forest);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  color: var(--charcoal);
  font-size: 0.95rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1319px) {
  /* Largeurs moyennes : on replie la mention des villages du logo
     pour éviter toute collision entre les libellés du menu. */
  .logo__tag { display: none; }
}

@media (max-width: 1240px) {
  .nav--main ul { gap: 0.1rem; }
  .nav__link { padding: 0.5rem 0.45rem; font-size: 0.88rem; }
  .header__inner { gap: 0.6rem; }
}

@media (max-width: 1080px) {
  .nav--main { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .header__actions .btn--ghost { display: none; }
  .logo__tag { display: none; }
}

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

/* ---------- No-JS fallback ---------- */
noscript .nav--main { display: block; }
noscript .nav--main ul { flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 0.5rem 0; }
noscript .nav-toggle { display: none; }
