/* ==========================================================================
   Humour d'Utilité Publique — Base — variables, typographie, en-tête, pied de page, boutons.
   Chargée sur toutes les pages.
   ========================================================================== */

:root {
  /* Verts */
  --vert-page:        #83ba9d;
  --vert-clair:       #e8fff0;
  --vert-menthe:      #c1fbdb;
  --vert-menthe-2:    #cdffe2;
  --vert-menthe-3:    #bcf5d5;
  --vert-blur:        #b6efd0;
  --vert-pale:        #cde9d7;
  --vert-fonce:       #476052;
  --vert-profond:     #294f45;
  --vert-gris:        #59665e;

  /* Accents */
  --orange:           #f56d27;
  --violet:           #992b99;
  --violet-fonce:     #864784;
  --violet-don:       #8c45ad;
  --rose:             #fdb0f5;
  --rose-2:           #faadf3;

  /* Neutres */
  --texte:            #424844;
  --placeholder:      #6b7280;
  --blanc:            #ffffff;

  /* Bordures */
  --bord-vert:        rgba(114, 121, 115, 0.1);
  --bord-vert-2:      rgba(48, 72, 59, 0.05);
  --bord-vert-3:      rgba(48, 72, 59, 0.1);
  --bord-input:       rgba(114, 121, 115, 0.2);
  --bord-don:         #cce0d1;

  /* Typo */
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
  --corps:   "Open Sans", system-ui, sans-serif;
  --serif:   "Alegreya", Georgia, serif;
  --ui:      "Inter", system-ui, sans-serif;

  /* Layout */
  --conteneur: 1280px;
  --gouttiere: 64px;

  --couleur-du-logo: #5e9d79;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--vert-page);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

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

a   { color: inherit; text-decoration: none; }

/* Une adresse email ou une URL est un mot insécable : sur petit écran elle
   élargirait sa colonne au-delà de la fenêtre. On l'autorise à se couper. */
a[href^="mailto:"], a[href^="http"] { overflow-wrap: anywhere; }

ul, ol { margin: 0; padding: 0; }

button, input, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, p { margin: 0; }

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

.conteneur {
  width: 100%;
  max-width: var(--conteneur);
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}

.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;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  text-align: center;
  transition: transform .15s ease, filter .15s ease;
}

.btn:hover  { filter: brightness(1.06); }

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

.btn--vert     { background: var(--vert-fonce);    color: var(--blanc); }

.btn--pill-sm {
  padding: 8px 24px;
  font-family: var(--corps);
  font-size: 16px;
  line-height: 24px;
}

.entete {
  background: var(--vert-clair);
  border-bottom: 1px solid var(--bord-vert);
  position: sticky;
  top: 0;
  z-index: 50;
}

.entete__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 48px;
}

.marque { display: flex; align-items: center; gap: 16px; }

.marque__logo { width: 48px; height: 48px; object-fit: contain; mix-blend-mode: multiply; }

.marque__nom {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  line-height: 36.4px;
  color: var(--couleur-du-logo);
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 32px; }

.nav a {
  font-size: 16px;
  line-height: 24px;
  color: var(--texte);
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--vert-fonce); }

.nav a.actif {
  font-weight: 600;
  color: var(--vert-fonce);
  padding-bottom: 6px;
  border-bottom-color: var(--vert-fonce);
}

.burger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 24px; height: 2px;
  margin: 5px 0;
  background: var(--vert-fonce);
  transition: transform .2s ease, opacity .2s ease;
}

.pied {
  background: var(--vert-menthe);
  border-top: 1px solid var(--bord-vert-3);
}

.pied__haut {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.pied__marque { display: flex; align-items: center; gap: 12px; }

.pied__marque img {  
  height: 80px; 
  object-fit: contain; 
  mix-blend-mode: multiply;
}

.pied__marque p {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  line-height: 36.4px;
  color: var(--couleur-du-logo);
}

.pied__baseline { margin-top: 24px; white-space: pre-line; }

.pied__titre {
  font-family: var(--corps);
  font-weight: 600;
  font-size: 20px;
  line-height: 24px;
  color: var(--vert-fonce);
  margin-bottom: 24px;
}

.pied__liens { list-style: none; display: flex; flex-direction: column; gap: 16px; }

.pied__liens a:hover { text-decoration: underline; }

.pied__liens .en-cours,
.pied__legal .en-cours { font-weight: 600; color: var(--orange); text-decoration: underline; }

.pied__ligne { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.pied__ligne img { width: 20px; height: 16px; object-fit: contain; flex: none; }

.pied__ligne img.icone-pin { width: 16px; height: 20px; }

.pied__ligne a { text-decoration: underline; }

.pied__reseaux { display: flex; align-items: center; gap: 2px; margin-top: 16px; padding-left: 174px; }

.pied__reseaux img { object-fit: contain; }

.pied__reseaux a:nth-child(1) img { width: 35px; height: 35px; }

.pied__reseaux a:nth-child(2) img { width: 57px;}

.pied__reseaux a:nth-child(3) img { width: 37px; height: 37px; }

.pied__bas {
  border-top: 1px solid var(--bord-vert-2);
  padding: 33px 16px 32px;
  text-align: center;
}

.pied__copyright { opacity: .7; }

.pied__legal {
  display: flex; justify-content: center; gap: 24px;
  margin-top: 16px; font-size: 12px; line-height: 16px;
}

.pied__legal a:hover { text-decoration: underline; }

.bandeau-declic .btn { margin-top: 40px; margin-left: 106px; }

.cta-blob h2, .cta-blob .btn { position: relative; z-index: 1; }

.cta-blob .btn { margin-top: 32px; padding: 16px 40px; font-weight: 600; font-size: 18px; line-height: 28px; }

.cta-final .btn { margin-top: 56px; }

.champ--erreur input, .champ--erreur textarea { border-color: var(--orange); }

.champ--erreur .champ__erreur { display: block; }

.form-message.visible { display: block; }

.carte-info--adhesion .btn { width: 100%; padding: 12px 24px; font-weight: 700; }

.faq__item.ouvert .faq__chevron { transform: rotate(180deg); }

.faq__item.ouvert .faq__reponse { max-height: 400px; }

.don-bascule button.actif { background: var(--vert-profond); color: var(--blanc); font-weight: 600; }

.don-montant.actif { border: 2px solid var(--vert-profond); padding: 26px 22px; }

@media (max-width: 1180px) {
  :root { --gouttiere: 40px; }
  .nav { gap: 20px; }
  .marque__nom { font-size: 22px; }
}

@media (max-width: 900px) {
  :root { --gouttiere: 24px; }
  .burger { display: block; }
  .nav {
      display: none;
      position: absolute;
      top: 100%; left: 0; right: 0;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      padding: 16px var(--gouttiere) 24px;
      background: var(--vert-clair);
      border-bottom: 1px solid var(--bord-vert);
    }
  .nav.ouvert { display: flex; }
  .entete__inner { position: relative; flex-wrap: wrap; padding: 8px 0; }
  .entete .btn--pill-sm { margin-left: auto; }
  /* Les grilles des pages sont repliées dans leur propre feuille : déclarées
     ici, elles seraient écrasées par les feuilles chargées après base.css. */
  .pied__haut { grid-template-columns: 1fr; }
  .bandeau-declic .btn { margin-left: 0; }
  .pied__reseaux { padding-left: 0; }
}

/* Très petits écrans : le nom de l'association, en une seule ligne insécable,
   dépassait de la fenêtre à côté du logo. On l'autorise à passer à la ligne. */
@media (max-width: 480px) {
  :root { --gouttiere: 16px; }
  .marque { gap: 10px; }
  .marque__logo { width: 40px; height: 40px; }
  .marque__nom { font-size: 18px; line-height: 24px; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
      animation-duration: .01ms !important;
      transition-duration: .01ms !important;
      scroll-behavior: auto !important;
    }
}

/* Liens vers une ancre (ex. contact.html#adhesion) : l'en-tête collant
   masquait le haut de la section visée. */
[id] { scroll-margin-top: 96px; }
