/*
 * Section « actions » — l'aperçu « Nos actions » de la maquette.
 *
 * Contient aussi .actions-intro (titre à gauche, introduction à droite), que la
 * maquette réemploie en tête de la section contact : ce fichier est chargé avant
 * contact.css (ordre alphabétique), la règle y est donc disponible.
 *
 * Écarts : un seul lien par carte, étendu à la carte (voir le template) ; liseré
 * de focus sur toute la carte (:focus-within) ; photo en <img>.
 *
 * Contrastes : titre de carte bleu sur blanc 11.6:1 ; résumé gris 5.33:1 ;
 * étiquette encre sur papier 16.4:1 (son icône dorée est décorative) ; « En
 * savoir plus » bleu 11.6:1. Le numéro blanc sur la photo est décoratif.
 */

.actions-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}

.actions-intro-link { margin-top: 20px; }

.actions-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 56, 116, 0.1);
}

/* Le liseré de focus encadre la carte entière, pas le seul titre. */
.action-card:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.action-card .action-title a:focus-visible { outline: none; }

.action-card.card-a { grid-column: span 7; }
.action-card.card-b { grid-column: span 5; }
.action-card.card-c { grid-column: span 5; }
.action-card.card-d { grid-column: span 7; }

.action-img {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--primary-pale);
}

.action-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.action-img .num {
  position: absolute;
  top: 18px;
  left: 20px;
  font-family: var(--ff-heading);
  font-weight: 500;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--on-primary);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.action-img .tag {
  position: absolute;
  bottom: 18px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.action-img .tag .icon { width: 12px; height: 12px; color: var(--accent); }

.action-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 28px 32px;
}

.action-body .action-title {
  font-family: var(--ff-heading);
  font-weight: 600;
  font-size: var(--fs-h3-card);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--primary);
}

/* Le lien du titre couvre toute la carte. */
.action-body .action-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.action-body p {
  font-size: 15px;
  color: var(--text-muted);
}

.action-body .more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ==========================================================================
   Action sans photo — une carte pensée pour le texte
   ==========================================================================

   Pas de cadre vide : la carte passe sur fond bleu. En tête, le grand numéro
   doré (décoratif, grand texte : 4.13:1) et la catégorie ; en bas, la période
   en italique, un titre agrandi, le résumé. Dans la grille, elle prend la
   hauteur de sa voisine : l'espace libre reste en haut, le texte en bas.

   Contrastes sur --primary : titre papier 10.9:1 ; période et catégorie en or
   clair 6.92:1 ; résumé --on-primary-2 6.79:1 ; « En savoir plus » or clair
   6.92:1. Le liseré de focus, décalé de 3 px, se dessine sur le papier.
   ========================================================================== */

.action-card--texte {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.action-card--texte:hover { box-shadow: 0 16px 30px rgba(0, 56, 116, 0.22); }

.action-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 0;
}

.action-card-head .num {
  font-family: var(--ff-heading);
  font-weight: 400;
  font-size: clamp(56px, 5.5vw, 88px);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.action-card-head .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(250, 248, 243, 0.3);
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.action-card-head .tag .icon { width: 12px; height: 12px; color: var(--accent); }

.action-card--texte .action-body {
  justify-content: flex-end;
  padding-top: 56px;
}

.action-card--texte .action-body .action-title {
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.05;
  text-wrap: balance;
  color: var(--on-primary);
}

/* Après le titre dans le code (lu après lui), au-dessus à l'écran. */
.action-card--texte .action-body .action-date {
  order: -1;
  font-family: var(--ff-editorial);
  font-style: italic;
  font-size: clamp(22px, 1.9vw, 28px);
  line-height: 1.2;
  color: var(--accent-soft);
}

.action-card--texte .action-body p { max-width: 46ch; color: var(--on-primary-2); }

.action-card--texte .action-body .more {
  margin-top: 12px;
  color: var(--accent-soft);
}

@media (max-width: 900px) {
  .actions-intro { grid-template-columns: 1fr; gap: 24px; }
  .action-card.card-a,
  .action-card.card-b,
  .action-card.card-c,
  .action-card.card-d { grid-column: span 12; }
}
