/* Événements : The Events Calendar et Event Tickets aux couleurs Yshira 2026.
   Écrit en mobile first : la base vise le téléphone, puis 371, 420, 681, 861 et 981 px (voir style.css). */
:root,
.tribe-common,
.tribe-events,
.tribe-tickets {
  --tec-color-accent-primary: #f06a24;
  --tec-color-accent-primary-hover: #d9571a;
  --tec-color-accent-primary-active: #c94f17;
  --tec-color-accent-primary-background: #fdf1e6;
  --tec-color-accent-secondary: #14213d;
  --tec-color-button-primary: #f06a24;
  --tec-color-button-primary-hover: #d9571a;
  --tec-color-button-primary-background: #fdf1e6;
  --tec-color-link-accent: #14213d;
  --tec-color-link-accent-hover: #ee5a1f;
  --tec-color-text-primary: #18233d;
  --tec-color-text-secondary: #586379;
  --tec-color-icon-active: #14213d;
  --tec-color-day-marker-current-month: #14213d;
  --tec-color-border-default: #dde3ec;
  --tec-color-border-secondary: #dde3ec;
  --tec-color-background-events-bar-submit-button: #14213d;
  --tec-color-background-events-bar-submit-button-hover: #2a3c66;
  --tec-color-background-transparent: #ffffff;
  --tec-font-family-sans-serif: "Figtree", system-ui, sans-serif;
  --tec-font-family-base: "Figtree", system-ui, sans-serif;
  --tec-border-radius-default: 14px;
}

.ysh-events-body { padding-top: 8px; }
.ysh-events-body .wrap > .tribe-common,
.ysh-events-body .tribe-events .tribe-events-l-container { padding-top: 0; }
.ysh-events .tribe-events .tribe-events-l-container { padding-left: 0; padding-right: 0; }
/* Le conteneur n'a plus de marge intérieure : l'en-tête du calendrier (marges négatives de The Events Calendar
   sur petit écran) ne doit plus déborder de la page, ce qui créait un défilement horizontal sur téléphone. */
.ysh-events .tribe-events .tribe-events-header { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }

/* Titres en Bricolage, comme le reste du site */
.ysh-events .tribe-events-calendar-list__event-title,
.ysh-events .tribe-events-calendar-month__header-column-title,
.ysh-events .tribe-events-c-top-bar__datepicker-desktop,
.ysh-events .tribe-events-c-top-bar__datepicker-mobile,
.ysh-events .tribe-events-single-event-title,
.ysh-events .tribe-events-calendar-list__month-separator-text,
.ysh-events .tribe-tickets__rsvp-title,
.ysh-events .tribe-tickets__title {
  font-family: var(--display);
  letter-spacing: -.015em;
}
.ysh-events .tribe-events-calendar-list__event-title { font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 700; }
.ysh-events .tribe-events-single-event-title { font-size: clamp(36px, 4.6vw, 60px); line-height: 1; font-weight: 750; }

/* Barre de recherche et sélecteur de vue */
.ysh-events .tribe-events-header__events-bar,
.ysh-events .tribe-events-c-events-bar {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.ysh-events .tribe-events-c-search__button,
.ysh-events .tribe-common .tribe-common-c-btn {
  border-radius: 999px;
  background: var(--soleil-grad);
  color: var(--nuit);
  font-weight: 700;
}
.ysh-events .tribe-common .tribe-common-c-btn:hover,
.ysh-events .tribe-common .tribe-common-c-btn:focus { background: var(--soleil-grad); color: var(--nuit); filter: saturate(1.15); }
.ysh-events .tribe-events-c-view-selector__list-item--active .tribe-events-c-view-selector__list-item-link::after { background: var(--soleil-grad); }

/* Liste : chaque événement est une carte */
.ysh-events .tribe-events-calendar-list__event-row { margin-bottom: 20px; }
.ysh-events .tribe-events-calendar-list__event-wrapper {
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.ysh-events .tribe-events-calendar-list__event-date-tag-weekday { color: var(--muted); }
.ysh-events .tribe-events-calendar-list__event-date-tag-daynum { font-family: var(--display); font-weight: 700; color: var(--nuit); }
.ysh-events .tribe-events-calendar-list__event-featured-image { border-radius: 16px; }
.ysh-events .tribe-events-calendar-list__month-separator-text { font-weight: 700; color: var(--nuit); }
.ysh-event-cta { margin-top: 16px; min-height: 44px; }

/* Calendrier mensuel */
.ysh-events .tribe-events-calendar-month { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.ysh-events .tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-date-daynum,
.ysh-events .tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-date-link { color: var(--soleil); font-weight: 800; }
.ysh-events .tribe-events-calendar-month__calendar-event-title-link { color: var(--nuit); font-weight: 650; }
.ysh-events .tribe-events-calendar-month__multiday-event-bar { background: var(--sable); }

/* Message quand aucun événement n'est publié */
.ysh-events .tribe-events-c-messages__message {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
}

/* Fiche événement */
.ysh-events .tribe-events-single { max-width: 860px; }
.ysh-events .tribe-events-single.ysh-event-single { max-width: 1180px; }
.ysh-events .tribe-events-back a { color: var(--nuit); font-weight: 700; }
.ysh-events .tribe-events-schedule h2,
.ysh-events .tribe-events-schedule .tribe-events-cost { font-family: var(--sans); color: var(--muted); font-size: 1.05rem; font-weight: 600; }
.ysh-events .tribe-events-event-meta { border-radius: var(--r-lg); border-color: var(--line); background: var(--surface); }
.ysh-events .tribe-events-single-section-title { font-family: var(--display); }
.ysh-anchor { display: block; position: relative; top: -110px; visibility: hidden; }

/* Inscription (RSVP) */
.ysh-events .tribe-tickets__rsvp-wrapper,
.ysh-events .tribe-tickets__tickets-wrapper,
.ysh-events .tribe-tickets__rsvp {
  border-color: var(--or);
  border-radius: var(--r-lg);
  background: var(--sable);
}
.ysh-events .tribe-tickets__rsvp-actions .tribe-common-c-btn,
.ysh-events .tribe-tickets__rsvp-form-button,
.ysh-events .tribe-tickets__commerce-checkout-cart-footer .tribe-common-c-btn {
  border-radius: 999px;
  background: var(--soleil-grad);
  color: var(--nuit);
}
.ysh-events .tribe-tickets__rsvp-actions-success-going-check-icon { background: var(--soleil); }

/* Page « Finaliser mon inscription » et confirmation */
.ysh-events [class*="checkout-cart__coupons"] { display: none !important; }
.ysh-events .tribe-tickets__commerce-checkout { max-width: 760px; }
.ysh-events .tribe-tickets__commerce-checkout-header-title { font-family: var(--display); font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; }
.ysh-events .tribe-tickets__commerce-checkout-cart {
  padding: clamp(16px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.ysh-events .tribe-tickets__commerce-checkout-form-submit-button {
  min-height: 50px;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--soleil-grad);
  color: var(--nuit);
  font-weight: 700;
}
.ysh-events .tribe-tickets__commerce-checkout-purchaser-info-form-field input {
  min-height: 50px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--ciel);
}

/* ---------- Liste : bouton, prix, rappel, affiche entière ---------- */
.ysh-list-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; }
.ysh-events a.ysh-event-cta {
  display: inline-flex;
  min-height: 44px;
  margin: 0;
  padding: 10px 22px;
  font-size: .92rem;
  line-height: 1.2;
  color: var(--nuit);
  text-decoration: none;
  white-space: nowrap;
}
.ysh-list-price { padding: 5px 12px; border-radius: 999px; background: var(--nuit); color: #fff; font-size: .84rem; font-weight: 700; }
.ysh-list-urgency { color: #b4400f; font-size: .88rem; font-weight: 700; }
.ysh-events .tribe-events-c-small-cta { display: none; }
.ysh-events .tribe-events-calendar-list__event-featured-image-wrapper { align-self: flex-start; }
.ysh-events .tribe-events-calendar-list__event-featured-image-link { display: block; overflow: hidden; border-radius: 16px; }
.ysh-events .tribe-events-calendar-list__event-featured-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}
.ysh-events .tribe-events-calendar-list__event-venue-title { font-weight: 700; }

/* ---------- Fiche événement ----------
   Téléphone (base) : titre et boutons d'abord, affiche, puis texte.
   Tablette (681 px et +) : affiche à côté du titre et des boutons, texte en pleine largeur.
   Ordinateur (981 px et +) : affiche fixe à gauche, informations puis texte à droite. */
.ysh-events #tribe-events-pg-template, .ysh-events .tribe-events-pg-template { padding: 0; }
.ysh-event-grid,
.tribe-events-single > .tribe_events.ysh-event-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "media" "body";
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: clamp(22px, 3.5vw, 36px);
}
.ysh-event-media { grid-area: media; position: static; top: 112px; justify-self: center; width: 100%; max-width: 420px; min-width: 0; }
.ysh-event-head { grid-area: head; min-width: 0; }
.ysh-event-body { grid-area: body; min-width: 0; margin-top: 8px; }
.admin-bar .ysh-event-media { top: 144px; }
.ysh-event-poster { position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); background: var(--nuit); box-shadow: var(--shadow); }
.ysh-event-poster img { display: block; width: 100%; height: auto; }
.ysh-event-zoom {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #14213dd9;
  color: #fff;
  font-size: .8rem;
  font-weight: 650;
  opacity: 1;
  transition: opacity .2s;
}
.ysh-event-poster:hover .ysh-event-zoom, .ysh-event-poster:focus-visible .ysh-event-zoom { opacity: 1; }
.ysh-event-poster-ph { display: grid; aspect-ratio: 16 / 9; place-content: center; justify-items: center; gap: 6px; color: #fff; background: radial-gradient(420px 320px at 80% 0%, #2a3c66, transparent 70%), var(--nuit); }
.ysh-event-poster-ph b { font: 750 64px/.9 var(--display); color: var(--or); }
.ysh-event-poster-ph span { font-weight: 650; text-transform: capitalize; }

.ysh-event-single .tribe-events-single-event-title { margin: 0 0 18px; font-size: clamp(28px, 8vw, 36px); line-height: 1.06; overflow-wrap: break-word; hyphens: manual; }
.ysh-event-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ysh-event-facts li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.ysh-event-facts li > span { min-width: 0; }
.ysh-event-facts svg { flex: none; margin-top: 2px; color: var(--lagune); }
.ysh-event-facts small { display: block; color: var(--muted); font-size: .8rem; }
.ysh-event-facts b { color: var(--nuit); font: 650 1.05rem/1.3 var(--display); overflow-wrap: anywhere; }
.ysh-event-urgency { display: inline-flex; margin-top: 14px; padding: 7px 14px; border-radius: 999px; background: var(--sable); color: #b4400f; font-weight: 700; }
.ysh-event-actions { display: grid; gap: 10px; margin: 24px 0; }
.ysh-event-actions .button { width: 100%; }
.ysh-event-single .tribe-events-single-event-description { max-width: 70ch; margin-top: 24px; color: var(--ink); font-size: 1rem; line-height: 1.65; overflow-wrap: break-word; }
.ysh-event-single .tribe-events-single-event-description p { margin: 0; }
.ysh-event-single .tribe-events-single-event-description p + p { margin-top: .9em; }
.ysh-event-single .tribe-events-single-event-description strong { color: var(--nuit); font-family: var(--display); font-size: 1.2rem; }
.ysh-event-single .tribe-events-single-event-description :is(img, video, iframe) { display: block; max-width: 100%; height: auto; margin: 1.2em 0; border-radius: var(--r-md); }
.ysh-event-single .tribe-events-single-event-description iframe { width: 100%; aspect-ratio: 16 / 9; }
.ysh-event-single .tribe-events-single-event-description :is(ul, ol) { margin: .9em 0; padding-left: 1.3em; }
.ysh-event-single .tribe-events-single-event-description table { display: block; max-width: 100%; overflow-x: auto; }
.ysh-event-single .tribe-events-c-subscribe-dropdown__container { margin-top: 24px; }
.ysh-event-single .tribe-tickets__tickets-wrapper { margin-top: 32px; padding: 16px; }
.ysh-event-trip { margin-top: 24px; padding: 22px 18px; border-radius: var(--r-md); background: var(--nuit); color: #fff; }
.ysh-event-trip h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; }
.ysh-event-trip .checklist { margin: 16px 0 22px; }
.ysh-event-trip .checklist li > span { background: #ffffff1a; color: var(--or); }
.ysh-event-trip .button { width: 100%; }
.ysh-event-nav { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
.ysh-event-nav ul { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ysh-event-nav li { min-width: 0; max-width: none; }
.ysh-event-nav li:empty { display: none; }
.ysh-event-nav .tribe-events-nav-next { margin-left: 0; text-align: right; }
.ysh-event-nav a { color: var(--nuit); font-weight: 650; overflow-wrap: break-word; }
.ysh-event-nav a:hover { color: var(--soleil); }
.ysh-event-nav li a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; }
.ysh-event-nav .tribe-events-nav-next a { text-align: right; }
.ysh-event-single { padding-bottom: 76px; }
/* Fil d'Ariane sur une ligne, le titre de l'événement coupé par des points de suspension */
.ysh-events .breadcrumbs { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.ysh-events .breadcrumbs > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ysh-events .breadcrumbs svg { flex: none; }

/* Barre d'action en bas d'écran, téléphone et tablette uniquement (masquée à partir de 981 px) */
.ysh-event-bar {
  position: fixed;
  z-index: 30;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 14px;
  border-radius: 999px;
  background: var(--nuit);
  color: #fff;
  box-shadow: 0 18px 40px -16px #14213dcc;
  transform: translateY(140%);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.ysh-event-bar.is-on { transform: none; }
.ysh-event-bar > span { display: grid; min-width: 0; line-height: 1.25; }
.ysh-event-bar b { overflow: hidden; font: 650 .95rem/1.25 var(--display); white-space: nowrap; text-overflow: ellipsis; }
.ysh-event-bar small { display: none; overflow: hidden; color: #f6a21c; font-size: .78rem; white-space: nowrap; text-overflow: ellipsis; }
.ysh-event-bar .button { flex: none; min-height: 44px; padding-inline: 18px; }

@media (min-width: 371px) {
  .ysh-event-bar { padding-left: 18px; }
  .ysh-event-bar small { display: block; }
}

@media (min-width: 681px) {
  .ysh-events-body { padding-top: clamp(32px, 4vw, 56px); }
  .ysh-events .breadcrumbs { flex-wrap: wrap; overflow: visible; white-space: normal; }
  .ysh-events .breadcrumbs > span:last-child { min-width: auto; overflow: visible; text-overflow: clip; }
  .ysh-event-grid,
  .tribe-events-single > .tribe_events.ysh-event-grid {
    grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
    grid-template-areas: "media head" "body body";
  }
  .ysh-event-media { justify-self: auto; width: auto; max-width: none; }
  .ysh-event-zoom { opacity: 0; }
  .ysh-event-poster-ph { aspect-ratio: 4 / 5; }
  .ysh-event-poster-ph b { font-size: clamp(72px, 10vw, 130px); }
  .ysh-event-single .tribe-events-single-event-title { margin-bottom: 22px; font-size: clamp(30px, 4.6vw, 44px); line-height: 1.02; }
  .ysh-event-facts li { padding: 14px 16px; }
  .ysh-event-actions { display: flex; gap: 12px; margin-bottom: 4px; }
  .ysh-event-actions .button { width: auto; }
  .ysh-event-single .tribe-events-single-event-description { margin-top: 30px; font-size: 1.04rem; line-height: 1.7; }
  .ysh-event-single .tribe-tickets__tickets-wrapper { padding: clamp(18px, 2.4vw, 26px); }
  .ysh-event-trip { padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); }
  .ysh-event-trip .button { width: auto; }
  .ysh-event-nav ul { flex-direction: row; gap: 16px; }
  .ysh-event-nav li { max-width: 48%; }
  .ysh-event-nav .tribe-events-nav-next { margin-left: auto; }
  .ysh-event-nav li a { display: inline; padding: 0; border: 0; border-radius: 0; background: none; text-align: inherit; }
  .ysh-event-nav .tribe-events-nav-next a { text-align: inherit; }
  .ysh-event-single { padding-bottom: 0; }
}

@media (min-width: 981px) {
  .ysh-event-grid,
  .tribe-events-single > .tribe_events.ysh-event-grid {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    grid-template-areas: "media head" "media body";
    grid-template-rows: auto 1fr;
    column-gap: clamp(28px, 4.5vw, 64px);
  }
  .ysh-event-media { position: sticky; }
  .ysh-event-body { margin-top: 0; }
  .ysh-event-single .tribe-events-single-event-title { font-size: clamp(34px, 4vw, 54px); }
  .ysh-event-single .tribe-events-single-event-description { max-width: 62ch; }
  .ysh-event-bar { display: none; }
}

/* ---------- Accueil : prix et rappel de clôture ---------- */
.home-events .event-meta .event-price { border-color: var(--nuit); background: var(--nuit); color: #fff; }
.home-events .event-deadline { flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.home-events .event-deadline b { color: #b4400f; }

/* ---------- Page Événements : bandeau avec le prochain rendez-vous ---------- */
.ysh-events .page-hero-event { grid-template-columns: 1fr; }
.page-hero-event .page-hero-copy { grid-column: 1; grid-row: 1; padding-bottom: 22px; }
.ysh-next-event {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: start;
  gap: 12px 14px;
  margin: 0 14px 14px;
  padding: 18px;
  border: 1px solid #ffffff1f;
  border-radius: var(--r-lg);
  background: #ffffff0c;
}
.ysh-next-event p { max-width: none; margin: 0; }
.ysh-next-event .ysh-next-label { grid-column: 1 / -1; color: var(--or); font-size: .88rem; font-weight: 700; }
.ysh-next-media { display: block; overflow: hidden; border-radius: 12px; background: #26375d; }
.ysh-next-media img, .ysh-next-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; }
.ysh-next-body { display: grid; gap: 12px; }
.ysh-next-label + .ysh-next-body { grid-column: 1 / -1; }
.ysh-next-media + .ysh-next-body { grid-column: 2; }
.ysh-next-body h2 { font-size: clamp(1.15rem, 1.6vw, 1.38rem); line-height: 1.22; letter-spacing: -.01em; }
.ysh-next-body h2 a:hover { color: var(--or); }
.ysh-next-body dl { display: grid; gap: 8px; margin: 0; }
.ysh-next-body dl div { display: grid; gap: 1px; }
.ysh-next-body dt { color: #aebad0; font-size: .8rem; }
.ysh-next-body dd { margin: 0; color: #fff; font-size: .94rem; font-weight: 600; line-height: 1.35; }
.ysh-next-event .ysh-next-urgency { color: var(--or); font-size: .9rem; font-weight: 700; }
.ysh-next-event .ysh-next-deadline { color: #c9d3e4; font-size: .9rem; }
.ysh-next-body .button { justify-self: start; margin-top: 4px; }

/* Lieu dans la liste : « Ville, Pays » avec un repère */
.ysh-events .ysh-list-place { display: flex; align-items: center; gap: 6px; }
.ysh-events .ysh-list-place svg { flex: none; color: var(--lagune); }

/* Sections sous le calendrier */
.ysh-participer { border-top: 1px solid var(--line); }
.ysh-participer .reading-copy > p { margin-bottom: 8px; }
.ysh-participer .panel-dark .button { margin-top: 8px; }
.ysh-faq-intro { margin-top: 14px; color: var(--muted); max-width: 36ch; }
.ysh-events-banner { margin-top: clamp(56px, 6.5vw, 96px); }

@media (min-width: 420px) {
  .ysh-next-event { grid-template-columns: 96px minmax(0, 1fr); gap: 14px 18px; }
}
@media (min-width: 861px) {
  .ysh-events .page-hero-event { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
  .page-hero-event .page-hero-copy { padding-bottom: clamp(32px, 5vw, 72px); }
  .ysh-next-event { grid-column: 2; grid-row: 1; grid-template-columns: 104px minmax(0, 1fr); margin: clamp(24px, 3.4vw, 48px); margin-left: 0; padding: 22px; }
}
