/* ==========================================================================
   PITIÉ INTERNATIONALE — Feuille de style
   --------------------------------------------------------------------------
   Pour personnaliser les couleurs, modifiez les variables ci-dessous.
   ========================================================================== */
:root {
  --bleu: #1f4e8c;
  /* bleu institutionnel */
  --bleu-fonce: #16355f;
  --orange: #e8801a;
  /* orange d'action (boutons don) */
  --orange-fonce: #c96a10;
  --fond: #ffffff;
  --fond-alt: #f4f6f9;
  --texte: #24303f;
  --texte-doux: #5b6b7d;
  --bordure: #dfe5ec;
  --rayon: 12px;
  --ombre: 0 8px 24px rgba(22, 53, 95, 0.08);
  --police: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--police);
  color: var(--texte);
  background: var(--fond);
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--bleu);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Titres centrés, textes justifiés */
h1,
h2,
h3,
h4 {
  text-align: center;
  color: var(--bleu-fonce);
  line-height: 1.25;
}

h2 {
  font-size: 1.9rem;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.3rem;
  margin: 2rem 0 1rem;
}

p {
  text-align: justify;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--orange-fonce);
}

.btn-outline {
  border-color: var(--bleu);
  color: var(--bleu);
  background: transparent;
}

.btn-outline:hover {
  background: var(--bleu);
  color: #fff;
}

.btn-light {
  background: #fff;
  color: var(--orange-fonce);
}

.btn-don {
  background: var(--orange);
  color: #fff !important;
  padding: 0.45rem 1.1rem;
}

.btn-don:hover {
  background: var(--orange-fonce);
  text-decoration: none;
}

/* ---------- En-tête ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--bordure);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.brand-logo {
  height: 64px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--orange);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--orange);
  text-decoration: none;
}

.nav a.active {
  color: var(--orange);
  background-color: var(--blue);
  font-weight: 600;
}

/* Accessibilité au clavier */
.nav a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.menu-btn {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bleu-fonce);
}

/* ---------- Héro ---------- */
.hero {
  background: linear-gradient(180deg, var(--fond-alt), #fff);
  padding: 3.5rem 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  color: var(--orange-fonce);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  text-align: left;
}

.hero h1 {
  font-size: 2.6rem;
  text-align: left;
  margin: 0.4rem 0 0.8rem;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--texte-doux);
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}

.hero-media img {
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}

/* ---------- Sections ---------- */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--fond-alt);
}

.section-intro {
  max-width: 760px;
  margin: 0.4rem auto 2rem;
  color: var(--texte-doux);
}

/* ---------- Grilles & cartes ---------- */
.grid {
  display: grid;
  gap: 1.4rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.4rem;
  box-shadow: var(--ombre);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card img {
  border-radius: 8px;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.card h4 {
  font-size: 1.05rem;
  text-align: left;
}

.card .tag {
  align-self: flex-start;
  background: var(--bleu);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}

.card ul {
  margin-left: 1.1rem;
  color: var(--texte-doux);
  font-size: 0.93rem;
}

.card .meta {
  color: var(--texte-doux);
  font-size: 0.85rem;
}

/* ---------- Statistiques ---------- */
.stats .card {
  align-items: center;
  text-align: center;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--orange);
}

.stat-label {
  color: var(--texte-doux);
}

/* ---------- Actualités : filtres ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.6rem;
}

.filters button {
  border: 1px solid var(--bordure);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--texte-doux);
}

.filters button.active {
  background: var(--bleu);
  color: #fff;
  border-color: var(--bleu);
}

/* ---------- Galerie ---------- */
.gallery figure {
  position: relative;
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre);
}

.gallery img {
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery figure:hover img {
  transform: scale(1.04);
}

.gallery figcaption {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(22, 53, 95, 0.8);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  text-align: left;
}

/* ---------- Section don ---------- */
.section-don {
  background: var(--bleu-fonce);
  color: #fff;
}

.section-don h2,
.section-don .section-intro {
  color: #fff;
}

.don-inner {
  text-align: center;
}

.don-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.4rem 0 0.8rem;
}

.don-amounts button {
  min-width: 92px;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.don-amounts button.active {
  background: #fff;
  color: var(--bleu-fonce);
  border-color: #fff;
}

.don-tier {
  text-align: center;
  min-height: 1.6em;
  margin-bottom: 1.2rem;
  opacity: 0.9;
}

.form-note.light {
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Formulaires ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.form input,
.form select,
.form textarea {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--bordure);
  border-radius: 8px;
  background: #fff;
  color: var(--texte);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid var(--bleu);
  outline-offset: 1px;
}

.form-note {
  font-size: 0.82rem;
  color: var(--texte-doux);
  text-align: left;
}

.contact-grid {
  align-items: start;
}

/* ---------- Pied de page ---------- */
.footer {
  background: var(--bleu-fonce);
  color: #dfe7f2;
  padding: 2.5rem 0 1rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}

.footer h4 {
  color: #fff;
  text-align: left;
  margin-bottom: 0.6rem;
}

.footer a {
  display: block;
  color: #dfe7f2;
  margin-bottom: 0.35rem;
}

.footer-logo {
  height: 72px;
  width: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.6rem;
}

.footer p {
  text-align: left;
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 150%);
  background: var(--bleu-fonce);
  color: #fff;
  padding: 0.9rem 1.6rem;
  border-radius: 10px;
  box-shadow: var(--ombre);
  transition: transform 0.3s ease;
  z-index: 99;
  max-width: 90%;
}

.toast.show {
  transform: translate(-50%, 0);
}

/* ---------- Apparition au défilement ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {

  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    text-align: center;
  }

  .hero-kicker {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 640px) {

  .grid-4,
  .grid-3,
  .grid-2,
  .form-row,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .menu-btn {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 4%;
    border-bottom: 1px solid var(--bordure);
    gap: 0.8rem;
  }

  .nav.open {
    display: flex;
  }
}