/* Graisses utilisées par le Hero de news.php, avec des familles réservées au bandeau. */
@font-face {
  font-family: 'Sofia Sans Hero';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/sofiasans/v20/Yq6E-LCVXSLy9uPBwlAThu1SY8Cx8rlT69D6t53qpPOgW08lfLY.woff2') format('woff2');
}

@font-face {
  font-family: 'Albert Sans Hero';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/albertsans/v4/i7dZIFdwYjGaAMFtZd_QA3xXSKZqhr-TenSHTJTPq4f3bRUz17Zt.woff2') format('woff2');
}

/* Le lien de retour identifie les actualités dans le gabarit partagé avec les cours. */
.heroCentre:has(+ .news-detail-wrapper > .news-detail-back[href="news.php"]) {
  position: relative;
  align-items: flex-end;
  height: auto;
  min-height: clamp(320px, 45vh, 520px);
  padding: 48px clamp(24px, 7vw, 90px);
  border-radius: 20px;
  background-image: linear-gradient(90deg, #151613d9, #15161326), url('../images/hero-centre.jpg');
  color: #fffdf8;

  & > .hero-text {
    position: static;
    width: 100%;
    max-width: 1180px;
    color: inherit;
    text-align: left;
  }

  & > .hero-text::before {
    content: 'La vie du club' / '';
    display: block;
    margin-bottom: 16px;
    color: #ebbaa3;
    font: 700 12px/1.3 'Albert Sans Hero', 'Albert Sans', sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  & h1 {
    margin: 0;
    filter: none;
    font: 800 clamp(40px, 5vw, 68px)/1.04 'Sofia Sans Hero', 'Sofia Sans', sans-serif;
    letter-spacing: -.025em;
    text-wrap: balance;
  }

  @media (max-width: 760px) {
    min-height: 224px;
    padding: 32px 24px;
  }
}

.news-detail-wrapper {
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 70px auto;
}

.news-detail-back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 28px;
  color: #111;
  text-decoration: none;
  font-size: 0.95rem;
  font-family: 'Sofia Sans', sans-serif;
  font-weight: 600;
}

.news-detail-back:hover {
  text-decoration: underline;
}

.news-detail-card {
  display: grid;
  grid-template-columns: minmax(0, 338.56px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.news-detail-card + .news-detail-card {
  margin-top: 24px;
}

.news-detail-image {
  border-radius: 24px;
  overflow: hidden;
  background: #ddd;
}

.news-detail-image img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.news-detail-content {
  background: #CB6743;
  border-radius: 24px;
  padding: 34px;
}

.news-detail-date {
  display: block;
  font-family: 'Sofia Sans', sans-serif;
  margin-bottom: 12px;
  color: #FFFFFF;
  font-size: 0.85rem;
}

.news-detail-content h2 {
  margin: 0 0 22px;
  font-family: 'Sofia Sans', sans-serif;
  font-size: clamp(26px, 2.5vw, 38px);
  line-height: 1;
  text-transform: uppercase;
  color: #FFFFFF;
}

.news-detail-text {
  color: #FFFFFF;
  font-family: 'Albert Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

.news-detail-text p {
  margin: 0 0 14px;
}

.news-detail-text a {
  color: #FFFFFF;
  text-decoration: underline;
}

.news-detail-text ul,
.news-detail-text ol {
  margin: 0 0 18px 22px;
  font-family: 'Albert Sans', sans-serif;
}

.news-detail-text li {
  font-family: 'Albert Sans', sans-serif;
}

.news-detail-text h2,
.news-detail-text h3 {
  margin: 24px 0 12px;
  font-family: 'Sofia Sans', sans-serif;
  line-height: 1.15;
}

.news-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.news-detail-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.news-not-found {
  background: #eeeeee;
  padding: 34px;
  border-radius: 24px;
}

.news-not-found h2 {
  margin-top: 0;
  font-family: 'Sofia Sans', sans-serif;
  font-size: 2rem;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .news-detail-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .news-detail-wrapper {
    width: calc(100% - 40px);
    margin: 45px auto;
  }

  .news-detail-content {
    padding: 24px;
  }
}

/* Deux réductions successives de 20 % : 529 px × 0,8 × 0,8. */
.news-detail-image { width: 100%; max-width: 338.56px; }
.news-detail-card, .news-detail-content { min-width: 0; }
.news-detail-text { overflow-wrap: anywhere; }
.news-detail-text img, .news-detail-text video { max-width: 100%; height: auto; }
.news-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}
.news-detail-sidebar {
  padding: 24px;
  border: 1px solid #dedbd2;
  border-radius: 16px;
  background: #fffdf8;
  color: #242522;
  font-family: 'Albert Sans', sans-serif;
}
.news-detail-sidebar h2 {
  margin: 0 0 20px;
  color: #242522;
  font: 500 24px/1.1 'Sofia Sans', sans-serif;
}
.news-detail-other-list { list-style: none; margin: 0; padding: 0; }
.news-detail-other-list li + li { border-top: 1px solid #dedbd2; }
.news-detail-other-list a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  min-height: 44px;
  color: #242522;
  text-decoration: none;
  font: 500 16px/1.3 'Sofia Sans', sans-serif;
  overflow-wrap: anywhere;
}
.news-detail-other-list li:first-child a { padding-top: 0; }
.news-detail-other-list li:last-child a { padding-bottom: 0; }
.news-detail-other-date { color: #595b54; font: 400 12px/1.4 'Albert Sans', sans-serif; }
.news-detail-other-list a:hover { color: #873023; }
.news-detail-other-list a:focus-visible { outline: 2px solid #873023; outline-offset: 4px; }
@media (max-width: 900px) {
  .news-detail-wrapper { width: calc(100% - 40px); }
  .news-detail-layout { grid-template-columns: 1fr; }
}

.news-detail-layout--courses {
  --course-visual-width: 423.2px; /* 338.56px × 1.25 */
  --course-columns: minmax(0, var(--course-visual-width)) minmax(0, 1fr);
}

.news-detail-layout--courses,
.news-detail-layout--courses .news-detail-card {
  grid-template-columns: var(--course-columns);
  column-gap: 24px;
}

.news-detail-layout--courses .news-detail-articles { grid-column: 1 / -1; }
.news-detail-layout--courses .news-detail-image { max-width: var(--course-visual-width); }
.news-detail-layout--courses .news-detail-sidebar { grid-column: 2; }

@media (max-width: 900px) {
  .news-detail-layout--courses { --course-columns: minmax(0, 1fr); }
  .news-detail-layout--courses .news-detail-sidebar { grid-column: 1; }
}
