/*
 * Section « associations » — cartes blanches sur fond bleu marine.
 *
 * Écarts volontaires à la maquette :
 *
 * 1. Bordure de .assoc-link : la maquette pose rgba(255,255,255,0.2) sur le navy,
 *    soit 1.5:1. Portée à rgba(255,255,255,0.55), soit 3.4:1 — le seuil des
 *    composants d'interface.
 *
 * 2. Le sur-titre de section passe de rgba(236,232,222,0.6) à 0.75 : 4.2:1 sur le
 *    navy au lieu de 3.1:1. Le numéro suit.
 *
 * 3. Le contact de chaque carte est un lien d'appel ou de courriel, là où la
 *    maquette le laissait en texte brut.
 */

.associations {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
  background: var(--navy);
  color: #ece8de;
}

.associations .section-head h2 { color: #fff; }
.associations .section-head h2 .ton2 { color: #fff; opacity: 0.6; }

/* Écart n° 2. */
.associations .section-eyebrow { color: rgba(236, 232, 222, 0.75); }
.associations .section-eyebrow .num { color: rgba(255, 255, 255, 0.75); }

/* Écart n° 1. */
.assoc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: var(--touch);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-pill);
  font-size: 0.84375rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}

.assoc-link:hover { background: var(--terra); border-color: var(--terra); }
.assoc-link svg { width: 13px; height: 13px; --icon-boost: 6px; }

/* ==========================================================================
   Cartes
   ========================================================================== */

/*
 * Trois cartes par ligne, sur une grille de six colonnes : chaque carte en
 * occupe deux, ce qui permet de centrer une dernière ligne incomplète au lieu
 * de la laisser calée à gauche avec un trou à droite (demande du client,
 * 7 octobre 2026 : cinq associations, « 3 puis 2 »). Les cartes gardent la même
 * largeur sur toutes les lignes.
 */
.assoc-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  align-items: stretch;
}

.assoc-grid > .assoc-card { grid-column: span 2; }

/* Dernière ligne de deux cartes : la première part de la deuxième colonne. */
.assoc-grid > .assoc-card:nth-child(3n + 1):nth-last-child(2) { grid-column: 2 / span 2; }

/* Dernière ligne d'une seule carte : au milieu. */
.assoc-grid > .assoc-card:nth-child(3n + 1):last-child { grid-column: 3 / span 2; }

.assoc-card {
  position: relative;
  border-radius: var(--r-card);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .25s, box-shadow .25s;
}

.assoc-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(10, 18, 40, 0.22); }

.assoc-eyebrow {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Le filet rouge devant le sur-titre, signature de la carte. */
.assoc-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--terra);
}

.assoc-card h3 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.12;
}

.assoc-card h3 a { color: inherit; }
.assoc-card h3 a:hover { color: var(--terra); }
.assoc-card h3 a::after { content: none; } /* pas de repère ↗ dans un titre de carte */

.assoc-card p {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.6;
}

/* Écart n° 3 : le contact est actionnable. */
.assoc-card-foot {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8125rem;
  color: var(--ink-3);
  border-top: 1px solid var(--line-soft);
  word-break: break-word;
}

.assoc-card-foot .who { color: var(--ink); font-weight: 600; }

.assoc-card-foot a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.assoc-card-foot a:hover { color: var(--terra); }

/* ==========================================================================
   Sous 980 px
   ========================================================================== */

@media (max-width: 980px) {
  .assoc-grid { grid-template-columns: 1fr; }

  .assoc-grid > .assoc-card,
  .assoc-grid > .assoc-card:nth-child(3n + 1):nth-last-child(2),
  .assoc-grid > .assoc-card:nth-child(3n + 1):last-child { grid-column: auto; }
}
