/* ====================================================================
   Almaviva Portail — Single Actualité (V4.0-fix)
   Charte V2.1 (vars --alm-blue, --alm-orange-dark, --cta-bg, --alm-bg-grey).
   Scope : single-actualite.php uniquement. N'affecte PAS l'archive.
   ==================================================================== */

.alm-actu-single { background: #fff; }

/* ===== HERO compact ===== */
.alm-actu-hero {
  background: var(--alm-blue);
  color: #fff;
  padding-block: clamp(40px, 8vw, 80px) clamp(40px, 7vw, 60px);
  padding-inline: clamp(20px, 5vw, 40px);
}
.alm-actu-hero__inner {
  max-width: 900px;
  margin: 0 auto;
}

/* breadcrumb */
.alm-actu-breadcrumb {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
  margin: 0 0 24px;
}
.alm-actu-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.alm-actu-breadcrumb li + li::before {
  content: '›';
  margin-right: 6px;
  opacity: 0.7;
}
.alm-actu-breadcrumb a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.4);
  text-underline-offset: 2px;
}
.alm-actu-breadcrumb a:hover {
  text-decoration-color: #fff;
  color: #fff;
}
.alm-actu-breadcrumb [aria-current="page"] {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

/* pill catégorie (orange dark = WCAG OK sur blanc, 4.13:1 minimum) */
.alm-actu-cat-pill {
  display: inline-block;
  background: var(--alm-orange-dark);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.alm-actu-cat-pill--sm {
  font-size: 0.6875rem;
  padding: 3px 9px;
  margin-bottom: 8px;
}

/* titre */
.alm-actu-title {
  font-family: var(--font-title);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 16px;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 24ch;
}

/* meta */
.alm-actu-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
}
.alm-actu-meta__sep {
  opacity: 0.55;
}

/* ===== CORPS article (760px max, padding latéral cohérent) ===== */
.alm-actu-body {
  max-width: 760px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 40px);
  padding-block: clamp(32px, 5vw, 56px);
}

/* typo corps confortable */
.alm-actu-content {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--alm-text); /* var(--alm-gray-900) */
}
.alm-actu-content > * + * { margin-top: 1.25em; }
.alm-actu-content p { margin: 0 0 1.25em; }
.alm-actu-content p:last-child { margin-bottom: 0; }

/* headings dans le contenu */
.alm-actu-content h2 {
  font-family: var(--font-title);
  color: var(--alm-blue);
  font-size: 1.5rem;
  line-height: 1.25;
  margin-top: 2em;
  margin-bottom: 0.5em;
  font-weight: 700;
}
.alm-actu-content h3 {
  font-family: var(--font-title);
  color: var(--alm-blue);
  font-size: 1.25rem;
  line-height: 1.3;
  margin-top: 1.6em;
  margin-bottom: 0.4em;
  font-weight: 600;
}
.alm-actu-content h2:first-child,
.alm-actu-content h3:first-child { margin-top: 0; }

.alm-actu-content ul,
.alm-actu-content ol {
  padding-left: 1.5em;
  margin: 0 0 1.25em;
}
.alm-actu-content li { margin: 0 0 0.4em; }

.alm-actu-content a {
  color: var(--alm-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.alm-actu-content a:hover {
  color: var(--alm-orange-dark);
  text-decoration-thickness: 2px;
}

.alm-actu-content blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 3px solid var(--alm-orange-dark);
  background: var(--alm-bg-grey);
  font-style: italic;
  color: var(--alm-text);
}

.alm-actu-content strong { font-weight: 700; color: var(--alm-text); }
.alm-actu-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 1.5em 0; }

/* ===== SHARE — discret ===== */
.alm-actu-share {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--alm-bg-grey);
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.alm-actu-share__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--alm-text-soft);
  margin-right: 4px;
}
.alm-actu-share__btn {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--alm-blue);
  border-radius: 4px;
  color: var(--alm-blue);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  background: transparent;
  transition: background var(--tr, 0.2s), color var(--tr, 0.2s);
}
.alm-actu-share__btn:hover {
  background: var(--alm-blue);
  color: #fff;
}

/* ===== ARTICLES SIMILAIRES ===== */
.alm-actu-related {
  background: var(--alm-bg-light, #fafafa);
  padding-block: 60px;
  padding-inline: clamp(20px, 5vw, 40px);
  border-top: 1px solid var(--alm-border, var(--alm-gray-200));
}
.alm-actu-related__inner {
  max-width: 1200px;
  margin: 0 auto;
}
.alm-actu-related__title {
  font-family: var(--font-title);
  color: var(--alm-blue);
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin: 0 0 36px;
  font-weight: 700;
}

/* Grid : 3 cols desktop, auto-fit fallback ; centrée si < 3 cards */
.alm-actu-related__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  justify-content: center;
}
/* Si 1 ou 2 cards : centrer la grid plutôt que d'étirer */
.alm-actu-related--count-1 .alm-actu-related__grid,
.alm-actu-related--count-2 .alm-actu-related__grid {
  max-width: calc(2 * 360px + 24px);
  margin: 0 auto;
}
.alm-actu-related--count-1 .alm-actu-related__grid {
  max-width: 380px;
}
@media (min-width: 1024px) {
  .alm-actu-related--count-3 .alm-actu-related__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.alm-actu-related__card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--alm-border, var(--alm-gray-200));
  box-shadow: 0 2px 8px rgba(0,72,153,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.alm-actu-related__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,72,153,0.10);
}

.alm-actu-related__img {
  aspect-ratio: 16/9;
  background: var(--alm-bg-grey);
  overflow: hidden;
}
.alm-actu-related__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.alm-actu-related__img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(0,72,153,0.18);
}
.alm-actu-related__img-placeholder svg {
  width: 48px;
  height: 48px;
}

.alm-actu-related__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.alm-actu-related__t {
  font-family: var(--font-title);
  font-size: 1.125rem;
  line-height: 1.3;
  margin: 0;
  color: var(--alm-blue);
  font-weight: 600;
}
.alm-actu-related__date {
  font-size: 0.8125rem;
  color: var(--alm-text-soft);
  margin-top: auto;
}

/* ===== MOBILE ===== */
@media (max-width: 640px) {
  .alm-actu-hero { padding-block: 56px 40px; }
  .alm-actu-title { max-width: 100%; }
  .alm-actu-share {
    flex-direction: column;
    align-items: stretch;
  }
  .alm-actu-share__btn { text-align: center; }
  .alm-actu-related { padding-block: 48px; }
}
