/* ================================================================
   FEDET  -  articles.css : pages publiques d’actualités
   Utilisé par articles.html (la liste) et article.html (la lecture).
   Chargé après base.css et avant anim.css, comme les autres pages.
   ================================================================ */

/* ================================================================
   1. En-tête de section (commune aux deux pages)
   ================================================================ */
.actus {
  padding: 72px 0 100px;
}
.actus-head {
  text-align: center;
  margin-bottom: 56px;
}
.actus-head .eyebrow {
  display: inline-block;
  margin-bottom: 14px;
}
.actus-head h1 {
  margin-bottom: 16px;
}
.actus-head .section-sub {
  max-width: 620px;
  margin: 0 auto;
}

/* ================================================================
   2. Blocs d’état : chargement, liste vide, erreur, article introuvable
   ================================================================ */
.actus-etat {
  max-width: 620px;
  margin: 0 auto;
  padding: 48px 28px;
  border: 1px dashed rgba(9, 9, 9, 0.16);
  border-radius: 12px;
  background: rgb(252, 252, 252);
  text-align: center;
}
.actus-etat h2 {
  font-family: var(--sans);
  font-size: 26px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.8px;
  color: var(--black);
  margin-bottom: 12px;
}
.actus-etat p {
  font-family: var(--body);
  font-size: 16px;
  line-height: 26px;
  color: var(--gray);
}
.actus-etat p + p {
  margin-top: 12px;
}
.actus-etat .btn-blue {
  margin-top: 24px;
}
/* Variante « quelque chose ne va pas » : cadre bleu plutôt que gris */
.actus-etat.erreur {
  border-style: solid;
  border-color: rgba(36, 81, 159, 0.28);
  background: rgba(36, 81, 159, 0.04);
}
.actus-etat code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  color: var(--blue-dark);
  background: rgba(36, 81, 159, 0.08);
  border-radius: 6px;
  padding: 2px 7px;
  /* une commande ne doit jamais élargir la page sur petit écran */
  overflow-wrap: anywhere;
}

/* ================================================================
   3. Grille de cartes
   3 colonnes ≥ 1200px · 2 colonnes 810-1199px · 1 colonne < 810px
   ================================================================ */
.actus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
}

.actu-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgb(252, 252, 252);
  border: 1px solid rgba(9, 9, 9, 0.09);
  border-radius: 12px;
  overflow: hidden;
  color: var(--black);
}
.actu-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(36, 81, 159, 0.06);
}
.actu-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.actu-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
}
.actu-date {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--gray);
}
.actu-title {
  font-family: var(--sans);
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.7px;
  color: var(--black);
  /* titres longs : 3 lignes maximum, coupure propre */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}
.actu-chapo {
  font-family: var(--body);
  font-size: 15px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--gray-2);
  /* troncature à 3 lignes avec les points de suspension du navigateur */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.actu-more {
  margin-top: auto;
  padding-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--blue);
}
.actu-more .fleche {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.actu-card:hover .actu-more .fleche {
  transform: translateX(5px);
}

/* ---------- Vignette de remplacement (image absente ou introuvable) ----------
   Même principe que les avatars de l’équipe : dégradé FEDET + initiale
   du titre en Conneqt. Décorative : le titre est juste en dessous. */
.actu-vignette {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(130% 100% at 22% 14%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 58%),
    linear-gradient(var(--vg-angle, 160deg), var(--blue), var(--blue-dark));
}
.actu-vignette span {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 8vw, 92px);
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  opacity: 0.96;
}
/* l’angle du dégradé change d’une carte à l’autre */
.actu-card:nth-child(4n + 1) .actu-vignette { --vg-angle: 140deg; }
.actu-card:nth-child(4n + 2) .actu-vignette { --vg-angle: 175deg; }
.actu-card:nth-child(4n + 3) .actu-vignette { --vg-angle: 205deg; }
.actu-card:nth-child(4n + 4) .actu-vignette { --vg-angle: 115deg; }

/* ================================================================
   4. Page de lecture (article.html)
   ================================================================ */

/* ---------- Lien de retour ---------- */
.art-retour-barre {
  padding: 24px 0 0;
}
.art-retour {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--blue);
}
.art-retour:hover {
  color: var(--blue-dark);
}
.art-retour .fleche {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.art-retour:hover .fleche {
  transform: translateX(-4px);
}

/* ---------- Bandeau de couverture (parallaxe légère via data-plx) ---------- */
.art-cover {
  position: relative;
  height: 420px;
  margin-top: 12px;
  overflow: hidden;
  background: rgba(36, 81, 159, 0.06);
}
.art-cover img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%; /* 20% de marge : la parallaxe ne découvre jamais un bord */
  object-fit: cover;
  object-position: center;
  will-change: transform;
}
.art-cover .actu-vignette span {
  font-size: clamp(110px, 17vw, 210px);
}

/* ---------- Colonne de lecture ---------- */
.art-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}
.art-head {
  padding-top: 56px;
}
/* Le titre garde la fonte et le tracking de .display-lg, mais 88px dans une
   colonne de 720px casserait la lecture : palier de taille propre à l’article. */
.art-title {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  overflow-wrap: break-word;
}
.art-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--gray);
}
.art-meta .sep {
  color: rgba(9, 9, 9, 0.22);
}
.art-meta .auteur {
  color: var(--ink);
}
.art-chapo {
  margin-top: 30px;
  padding-left: 20px;
  border-left: 3px solid var(--blue);
  font-family: var(--sans);
  font-size: 20px;
  line-height: 31px;
  font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--ink);
}

/* ---------- Corps de l’article (rendu du format léger) ---------- */
.art-corps {
  margin-top: 40px;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--ink);
}
.art-corps p {
  margin-bottom: 26px;
}
.art-corps .art-h2 {
  margin: 48px 0 18px;
  font-family: var(--sans);
  font-size: 27px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.9px;
  color: var(--black);
}
.art-corps .art-h2:first-child {
  margin-top: 0;
}
.art-corps .art-liste {
  margin: 0 0 26px;
  padding: 0;
}
.art-corps .art-liste li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}
.art-corps .art-liste li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.art-corps > *:last-child {
  margin-bottom: 0;
}
.art-corps strong {
  font-weight: 700;
  color: var(--black);
}
.art-corps em {
  font-style: italic;
}
.art-corps a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere; /* une URL longue ne déborde pas de la colonne */
}
.art-corps a:hover {
  color: var(--blue-dark);
}

/* ---------- Financeurs de l’action ---------- */
.art-funders {
  margin-top: 56px;
  padding: 30px;
  border: 1px solid rgba(36, 81, 159, .14);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(36, 81, 159, .075), rgba(255, 255, 255, .9) 55%),
    var(--white);
  box-shadow: 0 18px 55px rgba(9, 9, 9, .06);
}
.art-funders-heading .eyebrow { margin-bottom: 5px; }
.art-funders-heading h2 {
  font-family: var(--sans);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -.7px;
}
.art-funders-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.art-funder {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(9, 9, 9, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  text-align: center;
}
.art-funder img {
  width: 100%;
  height: 58px;
  object-fit: contain;
}
.art-funder > span:last-child {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.art-funder-monogram {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -.04em;
}

/* ---------- Partage (navigator.share, sinon copie du lien) ---------- */
.art-partage {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid rgba(9, 9, 9, 0.08);
}
.art-partage-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid rgba(36, 81, 159, 0.32);
  border-radius: 24px;
  background: var(--white);
  color: var(--blue);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.1px;
  line-height: 22px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.art-partage-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.art-partage-msg {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--blue);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.art-partage-msg.on {
  opacity: 1;
  transform: none;
}

/* ---------- À lire aussi ---------- */
.art-aussi {
  margin-top: 72px;
  padding-top: 44px;
  border-top: 1px solid rgba(9, 9, 9, 0.08);
}
.art-aussi h2 {
  margin-bottom: 28px;
  font-family: var(--sans);
  font-size: 27px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.9px;
  color: var(--black);
}
.art-aussi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.actu-card.compacte .actu-body {
  padding: 18px 18px 20px;
  gap: 8px;
}
.actu-card.compacte .actu-title {
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.5px;
}
.actu-card.compacte .actu-chapo,
.actu-card.compacte .actu-more {
  display: none;
}

/* ================================================================
   5. Accessibilité : focus clavier toujours visible
   ================================================================ */
.actu-card:focus-visible,
.art-retour:focus-visible,
.art-partage-btn:focus-visible,
.art-corps a:focus-visible,
.actus-etat .btn-blue:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Lettres FEDET du footer : en pause jusqu’à leur apparition (anim.js pose
   .visible), comme sur les autres pages du site. */
.site-footer .footer-brand span { animation-play-state: paused; }
.site-footer .footer-brand.visible span { animation-play-state: running; }

/* ================================================================
   6. Responsive
   ================================================================ */
@media (max-width: 1199px) {
  .actus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .art-cover {
    height: 340px;
  }
}

@media (max-width: 809px) {
  .actus {
    padding: 48px 0 72px;
  }
  .actus-head {
    margin-bottom: 40px;
  }
  .actus-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .art-cover {
    height: 260px;
  }
  .art-head {
    padding-top: 40px;
  }
  .art-corps {
    margin-top: 32px;
    font-size: 17px;
  }
  .art-chapo {
    font-size: 18px;
    line-height: 28px;
  }
  .art-corps .art-h2,
  .art-aussi h2 {
    font-size: 23px;
    line-height: 29px;
  }
  .art-aussi {
    margin-top: 56px;
  }
  .art-aussi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 479px) {
  .art-cover {
    height: 220px;
  }
  .actus-etat {
    padding: 36px 20px;
  }
  .art-chapo {
    padding-left: 16px;
  }
  .art-partage-btn {
    width: 100%;
    justify-content: center;
  }
  .art-funders { margin-top: 44px; padding: 22px 16px; border-radius: 16px; }
  .art-funders-list { grid-template-columns: 1fr 1fr; }
  .art-funder { min-height: 112px; padding: 12px 8px; }
}

/* Mouvement réduit : la flèche des cartes et du retour ne bouge plus */
@media (prefers-reduced-motion: reduce) {
  .actu-card:hover .actu-more .fleche,
  .art-retour:hover .fleche {
    transform: none !important;
  }
}
