/* =========================================================================
   Events listing: the "next event" panel and the archive band
   ========================================================================= */
/* Recette (Figma "Le prochain rendez-vous"): photo and text share the
   width about equally. */
.next-event {
  display: grid;
  grid-template-columns: minmax(0, 580fr) minmax(0, 550fr);
  gap: 48px;
  align-items: center;
}
.next-event__media {
  position: relative;
  aspect-ratio: 580 / 470;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--syn-bg-soft);
}
.next-event__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.next-event__badge {
  position: absolute;
  top: 18px;
  inset-inline-start: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--syn-green-500);
  color: #fff;
  line-height: 1.1;
}
.next-event__badge-day { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600; }
.next-event__badge-month { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.next-event__badge-year { font-size: 0.6875rem; opacity: 0.8; }
.next-event__status {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  background: rgba(255, 255, 255, 0.92);
}
.next-event__keywords {
  position: absolute;
  inset-inline-end: 14px;
  bottom: 14px;
  inset-inline-start: 14px;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}
.next-event__keywords > * + *::before { content: "•"; margin-inline: 8px; }

.next-event__eyebrow {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--syn-orange);
}
.next-event__eyebrow > * + *::before { content: "•"; margin-inline: 8px; }
.next-event__title { margin: 0 0 14px; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.3; }
.next-event__title a { color: var(--syn-ink); }
.next-event__text { max-width: 640px; color: var(--syn-gray-500); font-size: 0.97rem; line-height: 1.6; }
.next-event__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  margin: 24px 0;
  padding-top: 24px;
  border-top: 1px solid var(--syn-border);
}
.next-event__facts .event__fact-value { font-size: 1rem; line-height: 24px; }

/* A single-row block (the next event) keeps the full width. */
.block-ref--featured .block-ref__content .views-element-container > div { display: block; }

/* Rows stacked full width, e.g. the press releases. */
.block-ref--list .block-ref__content .views-element-container > div {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.block-ref--list .views-row { display: block; }

/* Archive: the newest past event large, the others as compact rows beside it. */
.block-ref--archive .block-ref__content .views-element-container > div {
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: 32px;
}
/* Badge and kicker only belong to the archive rows. */
.teaser__badge,
.teaser__kicker { display: none; }

/* Recette (Figma "Revivez nos temps forts"): the lead event is a photo card
   with its text over a dark fade; the others are white rows with a tinted
   month/year badge, an orange "lieu · type" line and a link. */
.block-ref--archive .views-row:first-child { grid-row: span 2; }
.block-ref--archive .views-row:first-child .teaser { position: relative; min-height: 420px; border: 0; background: #0e1a10; }
.block-ref--archive .views-row:first-child .teaser__media { position: absolute; inset: 0; aspect-ratio: auto; }
.block-ref--archive .views-row:first-child .teaser__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.55) 62%, rgba(6, 20, 8, 0.92) 100%);
}
.block-ref--archive .views-row:first-child .teaser__media img { width: 100%; height: 100%; object-fit: cover; }
.block-ref--archive .views-row:first-child .teaser__body { position: relative; justify-content: flex-end; margin-top: auto; padding: 32px; pointer-events: none; }
.block-ref--archive .views-row:first-child .teaser__body a { pointer-events: auto; }
.block-ref--archive .views-row:first-child .teaser__date { color: var(--syn-amber); }
.block-ref--archive .views-row:first-child .teaser__title { margin: 10px 0 8px; font-family: var(--font-heading); font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 600; }
.block-ref--archive .views-row:first-child .teaser__title a,
.block-ref--archive .views-row:first-child .teaser__link { color: #fff; }
.block-ref--archive .views-row:first-child .teaser__text { color: rgba(255, 255, 255, 0.75); -webkit-line-clamp: 2; }
.block-ref--archive .views-row:first-child .teaser__link { border-top-color: rgba(255, 255, 255, 0.15); }

.block-ref--archive .views-row:not(:first-child) .teaser { flex-direction: row; align-items: stretch; gap: 18px; padding: 14px; }
.block-ref--archive .views-row:not(:first-child) .teaser__media,
.block-ref--archive .views-row:not(:first-child) .teaser__date,
.block-ref--archive .views-row:not(:first-child) .teaser__text { display: none; }
.block-ref--archive .views-row:not(:first-child) .teaser__badge {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  margin: 0;
  border-radius: 10px;
  background: #fff4e0;
  font-size: 0.7rem;
  font-weight: 700;
  color: #eb8200;
}
.block-ref--archive .views-row:nth-child(3n) .teaser__badge { background: #e8f6ec; color: #009933; }
.block-ref--archive .views-row:not(:first-child) .teaser__badge strong { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; color: #131a27; }
.block-ref--archive .views-row:not(:first-child) .teaser__kicker { display: block; margin: 4px 0 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #eb8200; }
.block-ref--archive .views-row:not(:first-child) .teaser__body { padding: 4px 0; }
.block-ref--archive .views-row:not(:first-child) .teaser__title { margin: 8px 0 0; font-family: var(--font-heading); font-size: 1rem; font-weight: 600; }
.block-ref--archive .views-row:not(:first-child) .teaser__link { margin-top: 12px; padding-top: 0; border: 0; }

/* Recette: the featured event keeps its two columns down to phones; the
   archive keeps the desktop layout on tablets. */
@media (max-width: 1024px) {
  .next-event { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
  .block-ref--archive .block-ref__content .views-element-container > div { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
}
@media (max-width: 720px) {
  .next-event { gap: 16px; align-items: start; }
  .next-event__media { aspect-ratio: 3 / 4; }
  .next-event__keywords { display: none; }
  .next-event__status { font-size: 0.7rem; }
  .block-ref--archive .block-ref__content .views-element-container > div { grid-template-columns: minmax(0, 1fr); }
  .block-ref--archive .views-row:first-child { grid-row: auto; }
}

/* Numbered checklist (Figma "Checklist sécurité", 1139:9322). */
.card-grid--steps { background: #f6fbf7; }
.card-grid--steps .section__head { margin-bottom: 30px; }
.card-grid--steps .section__title { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 600; color: #2b3024; }
.card-grid--steps .card-grid__items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.card-grid--steps .card {
  gap: 16px;
  padding: 28px;
  border: 1px solid #e5eaed;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}
.card-grid--steps .card__body { display: flex; flex-direction: column; gap: 16px; }
.card-grid--steps .card__number {
  display: grid;
  place-items: center;
  width: 54px; height: 38px;
  margin: 0;
  border-radius: 19px;
  background: #f6fbf7;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a570d;
}
.card-grid--steps .card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 26px;
  color: #2b3024;
}
.card-grid--steps .card__text { font-size: 0.875rem; line-height: 22px; color: #636e78; }

/* Recette (Figma "Checklist sécurité"): more space between the label, the
   title and the cards, and taller cards. */
.card-grid--steps .eyebrow { margin-bottom: 26px; }
.card-grid--steps .section__head { margin-bottom: 44px; }
.card-grid--steps .card { min-height: 270px; padding: 30px 28px; }
.card-grid--steps .card__body { gap: 22px; }

/* Recette: four steps a row on tablets, two on phones. */
@media (max-width: 1024px) {
  .card-grid--steps .card-grid__items { gap: 16px; }
}
@media (max-width: 720px) {
  .card-grid--steps .card-grid__items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-grid--steps .card__title { font-size: 1rem; line-height: 1.35; }
  .card-grid--steps .card { min-height: 0; padding: 22px 18px; }
  .card-grid--steps .card__body { gap: 12px; }
  .card-grid--steps .card__text { font-size: 0.8rem; line-height: 1.45; }
}
/* Recette: the step cards of a row share its height (each fills its grid
   cell, the tallest text setting the row). */
.card-grid--steps .card { height: 100%; }
@media (max-width: 480px) {
  /* Recette (xs): one step card per row. */
  .card-grid--steps .card-grid__items { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card-grid--steps .card__title { font-size: 1.125rem; }
  .card-grid--steps .card__text { font-size: 0.875rem; line-height: 1.5; }
}

/* =========================================================================
   "Le prochain rendez-vous" closer to Figma (Événements listing, 1139:7701)
   ========================================================================= */
.block-ref--featured .section__head { margin-bottom: 28px; }
.block-ref--featured .eyebrow { margin-bottom: 8px; font-size: 0.8125rem; font-weight: 600; line-height: normal; letter-spacing: 1.3px; }
.block-ref--featured .section__title { margin: 0; line-height: 50px; letter-spacing: 0; color: #131a27; }
.next-event { grid-template-columns: minmax(0, 580fr) minmax(0, 564fr); gap: 56px; }
/* The photo: 580 x 530, a thin white rim and a deeper shadow. */
.next-event__media {
  aspect-ratio: 580 / 530;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  box-shadow: 0 20px 42px -8px rgba(5, 18, 6, 0.15);
}
.next-event__badge {
  top: 23px; inset-inline-start: 23px;
  justify-content: center;
  width: 112px; height: 118px;
  padding: 0;
  border-radius: 16px;
  line-height: normal;
}
.next-event__badge-day { font-size: 2.375rem; line-height: 42px; }
.next-event__badge-month { font-size: 0.8125rem; letter-spacing: 1.56px; }
.next-event__badge-year { font-size: 0.75rem; opacity: 1; color: rgba(255, 255, 255, 0.78); }
.next-event__status {
  top: 23px; inset-inline-end: 23px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: normal;
  color: #007a55;
}
/* The caption: a compact dark pill in the corner, not a full-width band. */
.next-event__keywords {
  inset-inline-end: auto; bottom: 23px; inset-inline-start: 23px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(5, 15, 5, 0.72);
  line-height: normal;
}
/* The text column. */
.next-event__body { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-inline: 4px; }
.next-event__eyebrow { margin: 0; font-size: 0.8125rem; font-weight: 600; letter-spacing: 1.04px; line-height: normal; color: #007a55; }
.next-event__eyebrow > * + *::before { content: "·"; margin-inline: 6px; }
.next-event__title { margin: 0; font-size: clamp(1.4rem, 2.2vw, 1.9375rem); font-weight: 600; line-height: 1.29; }
.next-event__title a { color: #101828; }
.next-event__text { font-size: 1rem; line-height: 25px; color: #636e85; }
.next-event__facts { align-self: stretch; gap: 16px 34px; margin: 0; padding-top: 22px; border-top-color: #d9ded9; }
.next-event__facts .event__fact { display: flex; flex-direction: column; gap: 5px; }
.next-event__facts .event__fact-label { font-weight: 600; letter-spacing: 1.1px; color: #636e85; }
.next-event__facts .event__fact-value { font-size: 0.875rem; font-weight: 600; line-height: 20px; color: #101828; }
/* Buttons: 60px tall with 16px corners; an arrow disc on "S'inscrire", a
   calendar icon on the outline button. */
.next-event .event__actions { gap: 14px; }
.next-event .btn--event {
  gap: 8px;
  min-height: 60px;
  padding: 16px 26px;
  border-radius: 16px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.next-event .btn--primary.btn--event { box-shadow: 0 4px 14px rgba(45, 106, 45, 0.3); }
.next-event .btn--primary.btn--event::after {
  content: "";
  flex: none;
  width: 24px; height: 24px;
  background: var(--icon-arrow-disc) center / contain no-repeat;
}
.next-event .btn--event-outline {
  gap: 9px;
  padding: 13px 18px;
  border: 1.5px solid #007a55;
  font-size: 0.875rem;
  font-weight: 600;
  color: #007a55;
}
.next-event .btn--event-outline::before {
  content: "";
  flex: none;
  width: 18px; height: 18px;
  background: url("../../images/icon-event-calendar.svg") center / contain no-repeat;
}
.next-event .btn--event-outline:hover { background: #007a55; color: #fff; }
.next-event .btn--event-outline:hover::before { filter: brightness(0) invert(1); }
/* The three facts on one row, and the buttons under them on the left. */
.next-event__facts { flex-wrap: nowrap; }
.next-event__facts .event__fact { flex: 0 1 auto; width: auto; min-width: 0; }
.next-event .event__actions { justify-content: flex-start; margin-inline-start: 0; }
@media (max-width: 1024px) {
  .next-event__facts { flex-wrap: wrap; gap: 16px 28px; }
}
@media (max-width: 720px) {
  /* Phones keep photo and text side by side: a compact badge, status and
     buttons so they fit the narrow photo and column. */
  .next-event { gap: 16px; }
  .next-event__media { aspect-ratio: 3 / 4; border-radius: 18px; }
  .next-event__badge { top: 10px; inset-inline-start: 10px; width: auto; height: auto; padding: 6px 10px; border-radius: 12px; }
  .next-event__badge-day { font-size: 1.25rem; line-height: 1.1; }
  .next-event__badge-month { font-size: 0.65rem; letter-spacing: 0.5px; }
  .next-event__badge-year { font-size: 0.6rem; }
  .next-event__status { top: auto; inset-inline-end: 10px; bottom: 10px; inset-inline-start: 10px; padding: 6px 10px; text-align: center; font-size: 0.65rem; }
  .next-event__body { gap: 12px; }
  .next-event .btn--event { min-height: 46px; padding: 10px 16px; font-size: 0.85rem; }
}

/* =========================================================================
   "Revivez nos temps forts" closer to Figma (Événements listing, 1139:7843)
   ========================================================================= */
.block-ref--archive { padding-block: 62px; background: #f6f8f6; }
.block-ref--archive .section__head { margin-bottom: 26px; }
.block-ref--archive .eyebrow { margin-bottom: 7px; font-size: 0.8125rem; font-weight: 600; line-height: normal; letter-spacing: 1.3px; }
.block-ref--archive .section__title { margin: 0; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 44px; letter-spacing: 0; color: #131a27; }
.block-ref--archive .block-ref__content .views-element-container > div {
  grid-template-columns: minmax(0, 742fr) minmax(0, 430fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: 18px 28px;
}
/* The lead event: a 480px photo card, its text on a dark panel along the
   bottom (not over the photo). */
.block-ref--archive .views-row:first-child .teaser {
  min-height: 480px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  box-shadow: 0 18px 38px -8px rgba(5, 18, 6, 0.13);
}
.block-ref--archive .views-row:first-child .teaser__media::after { content: none; }
.block-ref--archive .views-row:first-child .teaser__body {
  flex: none;
  gap: 8px;
  margin-top: auto;
  padding: 22px 28px;
  background: rgba(5, 15, 5, 0.78);
}
.block-ref--archive .views-row:first-child .teaser__date { font-size: 0.75rem; font-weight: 600; line-height: normal; letter-spacing: 1.2px; color: #eb8200; }
.block-ref--archive .views-row:first-child .teaser__title { margin: 0; font-size: clamp(1.3rem, 2vw, 1.5625rem); line-height: 32px; }
.block-ref--archive .views-row:first-child .teaser__text { margin: 0; font-size: 0.8125rem; line-height: 1.45; color: rgba(255, 255, 255, 0.72); }
.block-ref--archive .views-row:first-child .teaser__link { margin-top: 0; padding-top: 0; border: 0; font-size: 0.8125rem; letter-spacing: 0; }
/* The other events: white cards with a tall date tile. */
.block-ref--archive .views-row:not(:first-child) .teaser {
  height: 100%;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid #dbe5d9;
  border-radius: 18px;
  box-shadow: 0 12px 28px -8px rgba(5, 18, 6, 0.09);
}
.block-ref--archive .views-row:not(:first-child) .teaser__badge {
  align-self: stretch;
  gap: 4px;
  width: 80px;
  border-radius: 12px;
  background: #e5f5e8;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #007a55;
}
.block-ref--archive .views-row:nth-child(odd):not(:first-child) .teaser__badge { background: #fff0d6; color: #bf5c00; }
.block-ref--archive .views-row:not(:first-child) .teaser__badge strong { font-size: 1.5rem; color: #101828; }
.block-ref--archive .views-row:not(:first-child) .teaser__body { gap: 11px; padding: 0; }
.block-ref--archive .views-row:not(:first-child) .teaser__kicker { margin: 0; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.88px; color: #eb8200; }
.block-ref--archive .views-row:not(:first-child) .teaser__title { margin: 0; font-size: 1.1875rem; line-height: 26px; color: #101828; }
.block-ref--archive .views-row:not(:first-child) .teaser__title a { color: inherit; }
.block-ref--archive .views-row:not(:first-child) .teaser__link { margin-top: 0; font-size: 0.8125rem; letter-spacing: 0; color: #007a55; }
@media (max-width: 720px) {
  /* Phones: the lead event over the others, one per row. */
  .block-ref--archive .block-ref__content .views-element-container > div { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 16px; }
  .block-ref--archive .views-row:first-child .teaser { min-height: 380px; }
  .block-ref--archive .views-row:first-child .teaser__body { padding: 18px 20px; }
  .block-ref--archive .views-row:not(:first-child) .teaser__badge { width: 68px; }
}
@media (min-width: 721px) and (max-width: 1024px) {
  /* Recette: the two buttons side by side (the event page stacks its own). */
  .next-event .event__actions { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .next-event .btn--event { min-height: 52px; padding: 12px 18px; }
}
@media (min-width: 721px) and (max-width: 900px) {
  /* The narrow column: compact buttons so both still fit on one row. */
  .next-event .event__actions { flex-wrap: nowrap; gap: 8px; }
  .next-event .btn--event { gap: 6px; min-height: 46px; padding: 10px 12px; font-size: 0.8125rem; white-space: nowrap; }
  .next-event .btn--primary.btn--event::after { width: 20px; height: 20px; }
  .next-event .btn--event-outline::before { width: 16px; height: 16px; }
}
@media (max-width: 720px) {
  /* Recette (small screens): a larger date tile, and the dark keywords
     pill shown again, right under the white status pill. */
  .next-event__badge { top: 14px; inset-inline-start: 14px; padding: 10px 14px; border-radius: 14px; }
  .next-event__badge-day { font-size: 1.75rem; }
  .next-event__badge-month { font-size: 0.8rem; letter-spacing: 1px; }
  .next-event__badge-year { font-size: 0.72rem; }
  .next-event__status { inset-inline-end: 14px; bottom: 62px; inset-inline-start: 14px; padding: 8px 12px; font-size: 0.75rem; }
  .next-event__keywords {
    display: flex;
    justify-content: center;
    inset-inline-end: 14px; bottom: 14px; inset-inline-start: 14px;
    padding: 10px 12px;
    font-size: 0.72rem;
    text-align: center;
  }
}
@media (max-width: 720px) {
  /* The two pills stacked from the bottom of the photo; whichever wraps,
     they never overlap. */
  .next-event__media { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 14px; }
  .next-event__media > a { position: absolute; inset: 0; }
  .next-event__status,
  .next-event__keywords { position: relative; inset: auto; z-index: 1; }
  .next-event__keywords > * + *::before { margin-inline: 6px; }
}
@media (max-width: 480px) {
  .next-event__badge { top: 10px; inset-inline-start: 10px; padding: 8px 11px; }
  .next-event__badge-day { font-size: 1.5rem; }
  .next-event__status,
  .next-event__keywords { padding: 7px 8px; font-size: 0.66rem; line-height: 1.3; }
  .next-event__media { gap: 6px; padding: 10px; }
}
@media (max-width: 720px) {
  /* Recette (small screens): the photo above the text, each full width. */
  .next-event { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .next-event__media { aspect-ratio: 4 / 3; }
  .next-event__badge { top: 16px; inset-inline-start: 16px; padding: 10px 14px; }
  .next-event__badge-day { font-size: 1.75rem; }
  .next-event__media { gap: 8px; padding: 16px; }
  .next-event__status,
  .next-event__keywords { padding: 8px 14px; font-size: 0.75rem; }
  .next-event__status { align-self: flex-end; }
  .next-event__keywords { align-self: flex-start; }
  .next-event .event__actions { flex-wrap: wrap; }
  .next-event .btn--event { min-height: 52px; padding: 12px 18px; font-size: 0.9rem; }
}
@media (max-width: 720px) {
  /* Full-width photo: the status pill back in the top right corner, level
     with the date tile, as on desktop; the keywords stay at the bottom. */
  .next-event__status { position: absolute; top: 16px; inset-inline-end: 16px; bottom: auto; inset-inline-start: auto; }
}
@media (max-width: 480px) {
  .next-event__status { top: 12px; inset-inline-end: 12px; }
}
