/* ==========================================================================
   Tizipedia — Fiche d'une journée médicale (gabarit réutilisable)
   Sections : en-tête événement · l'esprit de la journée · programme ·
              participation (#inscription) — D-41 : « La journée en bref » supprimée
   ========================================================================== */

/* ==========================================================================
   En-tête événement
   ========================================================================== */

.event-hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-6) var(--section-space);
  background:
    radial-gradient(48rem 34rem at 100% 0%, rgb(239 248 240 / 0.95), transparent 70%),
    linear-gradient(180deg, var(--color-mist-blue) 0%, #f7fbfd 100%);
}

.event-hero .breadcrumbs {
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.event-hero__grid {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  align-items: center;
}

.event-hero__title {
  margin: 0;
}

.event-hero__name {
  display: block;
  color: var(--color-navy);
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.032em;
}

.event-hero__theme {
  display: block;
  margin-top: var(--space-3);
  color: var(--color-blue);
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.event-hero__signature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-size: var(--fs-body-lg);
  font-weight: 650;
}

.event-hero__signature::before {
  content: "";
  flex-shrink: 0;
  width: 1.75rem;
  height: 2px;
  border-radius: 2px;
  background: var(--color-green);
}

.event-hero__facts {
  max-width: 34rem;
  margin-top: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
}

.event-hero .facts__icon {
  background: var(--color-surface);
}

.event-hero .btn-group {
  margin-top: var(--space-6);
}

.event-hero__poster {
  justify-self: center;
  width: 100%;
  max-width: 25rem;
}

.event-hero__poster-link {
  display: block;
  padding: 12px;
  border-radius: 16px;
  background: var(--color-surface);
  box-shadow: var(--shadow-lift);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}

.event-hero__poster-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgb(18 59 89 / 0.06), 0 32px 56px -24px rgb(18 59 89 / 0.38);
}

.event-hero__poster img {
  width: 100%;
  border-radius: 8px;
}

.event-hero__poster figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--color-text-soft);
  font-size: var(--fs-xs);
}

.event-hero__poster figcaption .icon {
  width: 14px;
  height: 14px;
}

@media (min-width: 60em) {
  .event-hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(3rem, 0.5rem + 5vw, 6rem);
  }

  .event-hero__poster {
    justify-self: end;
  }
}

/* Mobile (D-41) : fil d'Ariane, eyebrow, titre, signature, AFFICHE, date /
   lieu, puis actions — même logique que les pages d'édition (D-40).
   Réorganisation CSS ; desktop et tablette inchangés. */
@media (max-width: 39.9375em) {
  .event-hero__grid {
    row-gap: 0;
  }

  .event-hero__content {
    display: contents;
  }

  .event-hero__poster {
    order: 1;
    margin-top: var(--space-6);
  }

  .event-hero__facts {
    order: 2;
  }

  .event-hero .btn-group {
    order: 3;
  }
}

/* ==========================================================================
   L'esprit de la journée — composition éditoriale (D-27)
   ========================================================================== */

.event-spirit {
  padding-bottom: clamp(1rem, 0.5rem + 2vw, 2rem);
}

.event-spirit__grid {
  display: grid;
  gap: clamp(1.75rem, 1rem + 3vw, 3rem);
  align-items: start;
}

.event-spirit__title {
  max-width: 24ch;
  margin-top: var(--space-4);
  font-size: var(--fs-h1);
  line-height: 1.12;
  letter-spacing: -0.028em;
}

.event-spirit__lead {
  max-width: 36rem;
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5625rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* Ville · Enfant · Hôpital : trois termes reliés par un filet fin. */
.care-line {
  display: flex;
  align-items: center;
  max-width: 36rem;
  margin-top: clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
  list-style: none;
}

.care-line__item {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-soft);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.care-line__item:first-child {
  flex: 0 0 auto;
}

.care-line__item + .care-line__item {
  padding-left: var(--space-3);
}

.care-line__item + .care-line__item::before {
  content: "";
  flex: 1 1 auto;
  min-width: 1.25rem;
  height: 1px;
  background: linear-gradient(90deg, var(--color-border-strong), rgb(10 182 46 / 0.55));
}

.care-line__item--center {
  color: var(--color-navy);
}

.care-line__item--center::after {
  content: "";
  flex-shrink: 0;
  order: -1;
  width: 7px;
  height: 7px;
  margin-left: var(--space-3);
  border-radius: 50%;
  background: var(--color-green);
}

.care-line__item--center::before {
  order: -2;
}

.care-line__item:last-child::before {
  background: linear-gradient(90deg, rgb(10 182 46 / 0.55), var(--color-border-strong));
}

@media (min-width: 60em) {
  .event-spirit__grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(3rem, 0.5rem + 5vw, 6rem);
  }

  .event-spirit__body {
    padding-top: calc(var(--space-4) + 1.4em);
  }
}

/* ==========================================================================
   Programme — déroulé chronologique (D-51, relief D-52)
   Section générée par `npm run events` depuis journees.json.
   Palette : bleu et vert Tizipedia en déclinaisons claires uniquement.
   Mobile : rail vertical à gauche, pastille horaire au-dessus de chaque carte.
   ≥ 48em : pastilles horaires dans une colonne à gauche, rail et repères, cartes à droite.
   ========================================================================== */

.event-program {
  --agenda-blue-tint: rgb(1 91 153 / 0.08);    /* bleu #015B99 à 8 % */
  --agenda-blue-line: rgb(1 91 153 / 0.2);
  --agenda-green-tint: rgb(9 182 46 / 0.12);   /* vert #09B62E à 12 % */
}

.event-program__head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
}

.event-program__lead {
  margin-top: var(--space-4);
  color: var(--color-text);
  font-size: var(--fs-lead);
}

.agenda {
  --rail: 0.5rem;                      /* axe du rail */
  --dot: 0.875rem;
  --indent: 2rem;                      /* retrait du contenu à droite du rail */
  position: relative;
  display: grid;
  gap: var(--space-5);
  max-width: 62rem;
}

.agenda::before {
  content: "";
  position: absolute;
  top: 0.9rem;
  bottom: 0.9rem;
  left: calc(var(--rail) - 1px);
  width: 2px;
  border-radius: 2px;
  background: var(--agenda-blue-line);
}

.agenda__list {
  display: grid;
  gap: var(--space-4);
  list-style: none;
}

.agenda__row {
  position: relative;
  display: grid;
  justify-items: start;
  gap: var(--space-3);
  padding-left: var(--indent);
}

.agenda__row > :last-child {
  justify-self: stretch;
}

/* Repère posé sur le rail, aligné sur la pastille horaire. */
.agenda__row::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: calc(var(--rail) - var(--dot) / 2);
  width: var(--dot);
  height: var(--dot);
  border: 2px solid var(--color-blue);
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: 0 0 0 4px var(--color-surface);
}

.agenda__row--welcome::before {
  background: var(--color-blue);
}

.agenda__row--break::before {
  border-color: var(--color-green-strong);
  background: var(--color-green);
}

/* Pastille horaire bleue. */
.agenda__time {
  display: inline-flex;
  align-items: center;
  min-height: 1.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--agenda-blue-tint);
  color: var(--color-blue);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 750;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.agenda__row--break .agenda__time {
  background: var(--agenda-green-tint);
  color: var(--color-green-strong);
}

/* --- Accueil et pause ------------------------------------------------------ */

.agenda__step {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--agenda-blue-tint);
  border-radius: var(--radius-card);
  background: var(--color-mist-blue);
}

.agenda__row--break .agenda__step {
  border-color: var(--agenda-green-tint);
  background: var(--color-mist-green);
}

.agenda__step-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-blue);
}

.agenda__row--break .agenda__step-icon {
  color: var(--color-green-strong);
}

.agenda__step-icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.agenda__step-label {
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 750;
}

/* --- Séquences scientifiques ----------------------------------------------- */

.agenda__sequence {
  position: relative;
  display: grid;
  gap: var(--space-4);
  padding-block: var(--space-2);
}

/* En-tête de séquence : bandeau très légèrement teinté, filet bleu à gauche. */
.agenda__sequence-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem var(--space-4);
  margin-left: var(--indent);
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--color-blue);
  border-radius: 4px var(--radius-card) var(--radius-card) 4px;
  background: var(--agenda-blue-tint);
}

/* Repère de séquence sur le rail (carré bleu). */
.agenda__sequence-head::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--rail) - var(--indent) - 3px - 0.4375rem);
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 3px;
  background: var(--color-blue);
  box-shadow: 0 0 0 4px var(--color-surface);
  transform: translateY(-50%) rotate(45deg);
}

.agenda__sequence-title {
  color: var(--color-navy);
  font-size: var(--fs-h3);
}

.agenda__sequence-meta {
  color: var(--color-blue);
  font-size: var(--fs-small);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.agenda__card {
  position: relative;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgb(18 59 89 / 0.05);
}

/* Numéro 01–08 : accent vert discret. */
.agenda__number {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: grid;
  place-items: center;
  min-width: 2.25rem;
  height: 1.75rem;
  padding-inline: 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--color-mist-green);
  color: var(--color-green-strong);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.agenda__title {
  padding-right: 2.75rem;
  color: var(--color-navy);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  font-weight: 750;
  line-height: 1.35;
}

.agenda__speakers {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.125rem 0.625rem;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: var(--lh-meta);
}

.agenda__speakers-label {
  color: var(--color-text-soft);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (min-width: 48em) {
  .agenda {
    --time: 9rem;                      /* colonne des horaires */
    --gap: 3.25rem;                    /* espace horaire → carte, rail au milieu */
    --rail: calc(var(--time) + var(--gap) / 2);
    --indent: calc(var(--time) + var(--gap));
  }

  .agenda__row {
    grid-template-columns: var(--time) minmax(0, 1fr);
    align-items: start;
    column-gap: var(--gap);
    padding-left: 0;
  }

  .agenda__time {
    justify-self: end;
  }

  /* Pastille et repère alignés sur la première ligne du titre de la carte. */
  .agenda__list .agenda__time {
    margin-top: calc(var(--space-5) - 0.2rem);
  }

  .agenda__list .agenda__row::before {
    top: calc(var(--space-5) - 0.2rem + 0.5rem);
  }

  .agenda__row--welcome,
  .agenda__row--break {
    align-items: center;
  }

  .agenda__row--welcome::before,
  .agenda__row--break::before {
    top: 50%;
    transform: translateY(-50%);
  }

  .agenda__step {
    padding: var(--space-4) var(--space-5);
  }

  .agenda__card {
    padding: var(--space-5) var(--space-6);
  }

  .agenda__number {
    top: var(--space-5);
    right: var(--space-6);
  }

  .agenda__title {
    padding-right: 3.5rem;
  }
}

/* ==========================================================================
   Participation (#inscription) — formulaire Tally intégré (D-26)
   ========================================================================== */

.event-registration {
  scroll-margin-top: var(--space-4);
}

/* D-41 : sans la section « La journée en bref », Programme et Participation
   se suivent sur fond blanc — un seul espacement entre les deux. */
.event-program + .event-registration {
  padding-top: 0;
}

.event-registration__grid {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.event-registration__intro p:not(.eyebrow) {
  max-width: 26rem;
  margin-top: var(--space-4);
}

.registration-panel {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: linear-gradient(160deg, #ffffff 0%, #ffffff 60%, var(--color-mist-blue) 100%);
  box-shadow: var(--shadow-soft);
}

/* État « en préparation » (aucun formulaire relié). */
.registration-panel__pending {
  display: grid;
  justify-items: start;
  gap: var(--space-3);
}

.registration-panel__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--color-mist-green);
  color: var(--color-blue);
}

.registration-panel__icon .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.registration-panel__title {
  margin-top: var(--space-2);
  font-size: var(--fs-h3);
}

.registration-panel__pending p {
  max-width: 34rem;
  color: var(--color-text);
}

/* Formulaire ouvert (D-30, D-32) : iframe Tally officielle pleine largeur,
   fond transparent, hauteur dynamique ajustée par le script Tally. */
.registration-panel__form {
  min-width: 0;
}

.registration-panel iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  background: transparent;
}

/* Petits écrans (D-52) : le formulaire Tally est présenté dans une carte blanche
   identifiable (filet discret, coins des cartes du site), avec un retrait intérieur
   modéré pour que ses champs et son bouton gardent toute la largeur utile.
   Aucun style n'est appliqué à l'intérieur de l'iframe. */
@media (max-width: 39.9375em) {
  .registration-panel {
    padding: var(--space-4) var(--space-4) var(--space-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
  }
}

/* D-49 : une seule colonne à toutes les largeurs — le titre, puis le
   formulaire Tally sur toute la largeur du conteneur principal (pas de
   colonne vide à gauche sur desktop). */
@media (min-width: 60em) {
  .event-registration__grid {
    gap: var(--space-7);
  }
}
