/* ==========================================================================
   04 — COMPOSANTS
   Les briques réutilisables du site, dans l'ordre :
     1. En-tête et menu        6. Formes décoratives
     2. Pied de page           7. Étiquettes
     3. Boutons                8. Photos
     4. Cartes                 9. Bandeau d'appel (CTA)
     5. Piliers                10. Formulaire
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. EN-TÊTE ET MENU  (includes/header.php)
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: var(--space-sm);
}

.site-logo {
  display: block;
  line-height: 0;
}

.site-logo img {
  height: 56px;
  width: auto;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) 1.75rem;
  padding: 0;
  list-style: none;
  font-weight: 500;
  font-size: 1rem;
}

.site-nav__link {
  color: var(--color-ink);
  text-decoration: none;
}

/* Page en cours : en rouge */
.site-nav__link[aria-current="page"] {
  color: var(--color-red-text);
  font-weight: 600;
}

/* Bouton « Menu » : caché sur ordinateur, affiché sur mobile (06-mobile.css) */
.site-nav__toggle {
  display: none;
}


/* --------------------------------------------------------------------------
   2. PIED DE PAGE  (includes/footer.php)
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-on-dark);
}

.site-footer a {
  color: var(--color-on-dark);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-block: var(--space-xl) var(--space-md);
}

.site-footer__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.625rem;
}

.site-footer__place {
  margin-top: 4px;
  color: var(--color-on-dark-soft);
}

.site-footer__email {
  display: inline-block;
  margin-top: var(--space-xs);
}

.site-footer .site-footer__email {
  color: var(--color-yellow);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1.75rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) 1.75rem;
  padding-block: 1.25rem 2.25rem;
  border-top: 1px solid #4A3E36;
  font-size: var(--text-sm);
  color: var(--color-on-dark-mute);
}

.site-footer__bottom a {
  color: var(--color-on-dark-mute);
}


/* --------------------------------------------------------------------------
   3. BOUTONS
   <a class="btn btn--dark">…</a>
   Variantes : --dark  --red  --yellow  --outline  --outline-light  --small
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 1rem 1.75rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.btn--dark          { background: var(--color-ink);    color: var(--color-white); }
.btn--red           { background: var(--color-red);    color: var(--color-white); }
.btn--yellow        { background: var(--color-yellow); color: var(--color-ink); }
.btn--white         { background: var(--color-white);  color: var(--color-ink); }
.btn--outline       { border-color: var(--color-ink);  color: var(--color-ink); }
.btn--outline-light { border-color: var(--color-white); color: var(--color-white); }

.btn--dark:hover,
.btn--red:hover    { color: var(--color-white); }
.btn--yellow:hover,
.btn--white:hover,
.btn--outline:hover { color: var(--color-ink); }

.btn--small {
  min-height: 44px;
  padding: 0.75rem 1.375rem;
}


/* --------------------------------------------------------------------------
   4. CARTES
   <article class="card"> forme · titre · texte · lien </article>
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
}

.card p {
  color: var(--color-ink-soft);
}

.card .shape {
  margin-bottom: var(--space-xs);
}

/* Lien en bas de carte, toujours aligné en bas */
.card__link {
  margin-top: auto;
  padding-top: var(--space-xs);
  font-weight: 600;
}


/* --------------------------------------------------------------------------
   5. PILIERS (« Pourquoi le jeu ? »)
   <div class="pillar pillar--red"> titre · texte </div>
   -------------------------------------------------------------------------- */
.pillar {
  padding-top: 1.375rem;
  border-top: 4px solid var(--pillar-color, var(--color-ink));
}

.pillar h3 {
  font-size: 1.4375rem;
}

.pillar p {
  margin-top: var(--space-xs);
  color: var(--color-ink-soft);
}

.pillar--red    { --pillar-color: var(--color-red); }
.pillar--yellow { --pillar-color: var(--color-yellow); }
.pillar--green  { --pillar-color: var(--color-green); }
.pillar--blue   { --pillar-color: var(--color-blue); }


/* --------------------------------------------------------------------------
   6. FORMES DÉCORATIVES (pastilles de couleur sur les cartes)
   <div class="shape shape--circle shape--yellow" aria-hidden="true"></div>
   -------------------------------------------------------------------------- */
.shape {
  flex: none;
  width: 48px;
  height: 48px;
  background: var(--shape-color, var(--color-ink));
}

.shape--circle   { border-radius: 50%; }
.shape--square   { border-radius: var(--radius-sm); }
.shape--triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.shape--small    { width: 18px; height: 18px; }
.shape--small.shape--square { border-radius: 5px; }

.shape--ink    { --shape-color: var(--color-ink); }
.shape--red    { --shape-color: var(--color-red); }
.shape--yellow { --shape-color: var(--color-yellow); }
.shape--green  { --shape-color: var(--color-green); }
.shape--blue   { --shape-color: var(--color-blue); }
.shape--rust   { --shape-color: var(--color-rust); }


/* --------------------------------------------------------------------------
   7. ÉTIQUETTES (« En développement »)
   -------------------------------------------------------------------------- */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-yellow);
  color: var(--color-ink);
  font-size: 0.8125rem;
  font-weight: 600;
}

.tag--light {
  background: var(--color-paper);
}

.tag--large {
  padding: 0.375rem 0.875rem;
  font-size: var(--text-sm);
}


/* --------------------------------------------------------------------------
   8. PHOTOS
   .photo           : format paysage 3:2, recadré proprement
   .photo--natural  : garde le format d'origine
   .photo-grid      : rangée de photos qui passe à la ligne sur mobile
   -------------------------------------------------------------------------- */
.photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.photo--natural {
  aspect-ratio: auto;
}

.photo--large {
  border-radius: 28px;
}

.photo-grid {
  --gap: 1rem;
}

.caption {
  margin-top: 0.625rem;
  font-size: var(--text-sm);
  color: var(--color-muted);
}


/* --------------------------------------------------------------------------
   9. BANDEAU D'APPEL (bloc jaune « Nous rejoindre »)
   -------------------------------------------------------------------------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem var(--space-xl);
  padding: var(--space-xl);
  background: var(--color-yellow);
  border-radius: var(--radius-lg);
}

.cta-band__text {
  flex: 1 1 480px;
  min-width: 0;
}

.cta-band__text h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
}

.cta-band__text p {
  margin-top: var(--space-sm);
  font-size: 1.1875rem;
}

/* Version discrète sur fond beige */
.cta-band--soft {
  padding: 2rem 2.5rem;
  background: var(--color-paper-dark);
  border-radius: var(--radius-md);
}

.cta-band--soft p {
  font-size: 1.125rem;
}


/* --------------------------------------------------------------------------
   10. FORMULAIRE  (association.php → contact.php)
   -------------------------------------------------------------------------- */
.form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 2.25rem;
  background: var(--color-white);
  border-radius: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.field__optional {
  font-weight: 400;
  color: var(--color-muted);
}

.field input,
.field select,
.field textarea {
  min-height: 48px;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--color-input-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-ink);
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.form .btn {
  align-self: flex-start;
}

/* Champ piège anti-robots : invisible pour les humains */
.form__trap {
  position: absolute;
  left: -9999px;
}

/* Message d'erreur affiché par PHP si l'envoi a échoué */
.form-error {
  flex: 1 1 100%;
  padding: 0.875rem 1.25rem;
  background: var(--color-white);
  border: 2px solid var(--color-red-text);
  border-radius: var(--radius-sm);
  color: var(--color-red-text);
  font-weight: 600;
}
