/*
 * Compléments du thème billetterie BDS 2027 (intégration TrustEvent).
 * style.css est le Tailwind compilé de la maquette : n'y ajouter que des classes
 * absentes de ce fichier, préfixées bds- quand elles sont propres à l'intégration.
 * Requêtes média en min-width / max-width, sans imbrication : Safari ignore la syntaxe
 * de plage (`width >= 40rem`) avant 16.4 et les règles imbriquées avant 16.5.
 */

/* Utilitaires utilisés par l'intégration mais absents du CSS compilé. */
.bg-\[\#f4f6f8\] { background-color: #f4f6f8; }
.p-8 { padding: 2rem; }
.pb-20 { padding-bottom: 5rem; }
.text-\[clamp\(26px\,5vw\,40px\)\] { font-size: clamp(26px, 5vw, 40px); }
/* Lien d'évitement : réapparaît au focus clavier (absent du CSS compilé de la maquette). */
.focus\:top-0:focus { top: 0; }
@media (min-width: 64rem) {
  .lg\:pb-0 { padding-bottom: 0; }
}

/* Tarif épuisé, à la place du sélecteur de quantité. */
.bds-soldout {
  display: inline-grid;
  place-items: center;
  min-width: 102px;
  height: 34px;
  padding: 0 12px;
  border: 1px dashed #d1d9e0;
  border-radius: .5rem;
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.bds-soldout--dark {
  border-color: rgb(255 255 255 / .25);
  color: rgb(255 255 255 / .6);
}

/* Durée restante de réservation des places. */
.bds-hold {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: #e8faf0;
  color: #127a33;
  font-size: 10px;
}
.bds-hold[hidden] { display: none; }

/* Erreur de saisie ou de paiement, au-dessus du bouton d'envoi. */
.bds-form-error {
  padding: .9rem 1rem;
  border: 1px solid #fca5a5;
  border-left-width: 5px;
  border-radius: .75rem;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.bds-form-error[hidden] { display: none; }

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgb(220 38 38 / .12);
}

button[aria-busy="true"] { cursor: progress; opacity: .75; }

@keyframes bds-spin { to { transform: rotate(360deg); } }
.bds-spin { animation: bds-spin 1.1s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .bds-spin { animation: none; }
}

/* ---------------------------------------------------------------------------
 * Contenus 2027 : encart « Déjà un billet ? », programmation, aftermovie, FAQ.
 * ------------------------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.bds-eyebrow {
  color: #127a33; font-size: 9px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
}
.bds-day-detail { margin-top: .25rem; color: rgb(255 255 255 / .5); font-size: 9px; }

/* Déjà un billet ? */
.bds-lookup {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center;
  margin-top: 2rem; padding: 1.25rem; border: 1px solid #cfe9d8; border-radius: 20px; background: #f2fdf5;
}
.bds-lookup__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: #fff; color: #127a33; box-shadow: inset 0 0 0 1px #cfe9d8;
}
.bds-lookup__body h2 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; }
.bds-lookup__body p { margin-top: .25rem; color: #4b5563; font-size: 12px; line-height: 1.55; }
.bds-lookup__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .625rem; }
@media (min-width: 48rem) {
  .bds-lookup { grid-template-columns: auto minmax(0, 1fr) auto; padding: 1.25rem 1.5rem; }
  .bds-lookup__actions { grid-column: auto; justify-content: flex-end; }
}

/* Programmation */
.bds-lineup {
  margin-top: 2rem; padding: 1.5rem; border-radius: 22px; background: #160a28; color: #fff;
}
.bds-lineup .bds-eyebrow { color: #faad48; }
.bds-lineup__head h2 {
  margin-top: .4rem; color: #fff5e4; font-size: clamp(28px, 4vw, 42px); font-weight: 700;
  line-height: 1.05; letter-spacing: -.045em;
}
.bds-lineup__intro { max-width: 40rem; margin-top: .75rem; color: rgb(255 255 255 / .65); font-size: 13px; line-height: 1.6; }
.bds-reveals {
  display: grid; gap: .625rem; margin: 1.5rem 0 0; padding: 0; list-style: none;
}
@media (min-width: 40rem) { .bds-reveals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bds-reveal {
  display: flex; flex-direction: column; gap: .2rem; padding: 1rem; border: 1px solid rgb(255 255 255 / .12);
  border-radius: 16px; background: rgb(255 255 255 / .04);
}
.bds-reveal--current { border-color: #faad48; background: rgb(250 173 72 / .1); }
.bds-reveal--done { opacity: .72; }
.bds-reveal__date { color: #faad48; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bds-reveal__title { color: #fff5e4; font-size: 15px; }
.bds-reveal__text { margin-bottom: .6rem; color: rgb(255 255 255 / .6); font-size: 11px; line-height: 1.5; }
.bds-reveal__state {
  display: inline-flex; align-items: center; gap: .3rem; width: fit-content; margin-top: auto;
  padding: .2rem .55rem; border-radius: 999px; background: rgb(255 255 255 / .1);
  color: rgb(255 255 255 / .8); font-size: 9px; font-weight: 700;
}
.bds-reveal--current .bds-reveal__state { background: #faad48; color: #160a28; }
.bds-artists {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem;
  margin: 1.25rem 0 0; padding: 0; list-style: none;
}
@media (min-width: 48rem) { .bds-artists { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bds-artist {
  overflow: hidden; border: 1px solid rgb(255 255 255 / .1); border-radius: 16px; background: rgb(255 255 255 / .055);
}
.bds-artist__media {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgb(129 86 208 / .55), transparent 60%), #20103a;
}
.bds-artist__media img { opacity: .85; }
.bds-artist__badge {
  position: absolute; left: .6rem; top: .6rem; padding: .2rem .55rem; border-radius: 999px;
  background: rgb(0 0 0 / .6); color: #faad48; font-size: 9px; font-weight: 700;
}
.bds-artist__mark { color: rgb(255 245 228 / .35); font-size: 44px; font-weight: 700; line-height: 1; }
.bds-artist__body { padding: .8rem .9rem .95rem; }
.bds-artist__body small {
  color: rgb(255 255 255 / .5); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.bds-artist__body h3 { margin-top: .2rem; color: #fff5e4; font-size: 15px; font-weight: 700; line-height: 1.25; }
.bds-artist__body h3 a { color: inherit; text-decoration: underline; text-decoration-color: rgb(255 255 255 / .3); text-underline-offset: 3px; }
.bds-artist--soon { border-style: dashed; background: transparent; }
.bds-artist--soon .bds-artist__media { background: repeating-linear-gradient(135deg, rgb(255 255 255 / .03) 0 10px, transparent 10px 20px); }
.bds-artist--soon h3 { color: rgb(255 245 228 / .7); }

/* Aftermovie : façade cliquable, YouTube chargé seulement au clic. */
.bds-video { margin-top: 1.5rem; padding: .75rem; border-radius: 22px; background: #09090b; box-shadow: 0 20px 60px rgb(5 3 12 / .14); }
.bds-video__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #000; }
.bds-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bds-video__play { position: absolute; inset: 0; display: block; color: #fff; }
.bds-video__play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease, opacity .3s ease; }
.bds-video__play:hover img { transform: scale(1.02); opacity: .9; }
.bds-video__play:focus-visible { outline: 3px solid #faad48; outline-offset: -3px; }
.bds-video__label {
  position: absolute; left: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1.1rem .45rem .45rem; border-radius: 999px; background: #127a33; color: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / .35); font-size: 14px; font-weight: 700;
  transition: background-color .2s ease;
}
.bds-video__play:hover .bds-video__label { background: #15803d; }
.bds-video__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; background: rgb(255 255 255 / .16); }
.bds-video__notice { margin: .6rem .25rem 0; color: rgb(255 255 255 / .55); font-size: 10px; }
@media (min-width: 40rem) { .bds-video { padding: 1rem; } }
@media (prefers-reduced-motion: reduce) { .bds-video__play img { transition: none; } }

/* FAQ : accordéon natif (details/summary), utilisable au clavier sans script. */
.bds-faq { margin-top: 2rem; padding: 1.5rem; border: 1px solid #e5e9ee; border-radius: 20px; background: #fff; }
.bds-faq > h2 { margin-top: .25rem; font-size: 1.5rem; font-weight: 700; letter-spacing: -.04em; }
.bds-faq__group { margin-top: 1.5rem; }
.bds-faq__group h3 { color: #8156d0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bds-faq__item { border-bottom: 1px solid #e5e9ee; }
.bds-faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px;
  padding: .75rem 0; cursor: pointer; font-size: 14px; font-weight: 700; list-style: none;
}
.bds-faq__item summary::-webkit-details-marker { display: none; }
.bds-faq__item summary:hover { color: #127a33; }
.bds-faq__item summary:focus-visible { outline: 3px solid #15803d; outline-offset: 2px; border-radius: 4px; }
.bds-faq__chevron { flex-shrink: 0; color: #6b7280; transition: transform .2s ease; }
.bds-faq__item[open] .bds-faq__chevron { transform: rotate(180deg); }
.bds-faq__item p { max-width: 46rem; padding: 0 0 1rem; color: #4b5563; font-size: 13px; line-height: 1.65; }
.bds-faq__contact { margin-top: 1.25rem; color: #4b5563; font-size: 13px; }
.bds-faq__contact a { color: #127a33; font-weight: 700; text-decoration: underline; }
@media (min-width: 40rem) { .bds-faq, .bds-lineup { padding: 2rem; } }
@media (prefers-reduced-motion: reduce) { .bds-faq__chevron { transition: none; } }

/* Page « Mes billets » (renvoi par e-mail). */
.bds-field { display: grid; gap: .4rem; }
.bds-field label { font-size: 12px; font-weight: 700; }
.bds-field input {
  min-height: 46px; padding: 0 .9rem; border: 1px solid #d1d9e0; border-radius: .6rem; background: #fff; font-size: 15px;
}
.bds-field input:focus { outline: 3px solid rgb(21 128 61 / .3); border-color: #15803d; }
.bds-field small { color: #6b7280; font-size: 11px; }
.bds-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.bds-notice {
  padding: .9rem 1rem; border: 1px solid #b7e4c7; border-left-width: 5px; border-radius: .75rem;
  background: #f2fdf5; color: #14532d; font-size: 13px; line-height: 1.55;
}
.bds-lookup-grid { display: grid; align-items: start; gap: 1.25rem; }
.bds-lookup-submit { width: 100%; }
@media (min-width: 48rem) {
  .bds-lookup-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .bds-lookup-submit { width: fit-content; }
}
@media not all and (min-width: 40rem) {
  .bds-video__label { left: .6rem; bottom: .6rem; padding-right: .8rem; font-size: 12px; }
  .bds-video__icon { width: 30px; height: 30px; }
}

/* Acceptation des CGV (étape « Billets & coordonnées ») */
.bds-cgv-check__note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: #f4f6f8; font-size: 12px; line-height: 1.55; color: #374151; }
.bds-cgv-check__label { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; cursor: pointer; font-size: 13px; line-height: 1.55; color: #374151; }
.bds-cgv-check__label input { width: 22px; height: 22px; margin: 0; accent-color: #15803d; cursor: pointer; }
.bds-cgv-check a { font-weight: 700; color: #127a33; text-decoration: underline; text-underline-offset: 2px; }
.bds-cgv-check a:hover { color: #0f5f28; }
.bds-cgv-check a:focus-visible, .bds-cgv-check__label input:focus-visible { outline: 2px solid #127a33; outline-offset: 2px; border-radius: 3px; }
.bds-cgv-check abbr { text-decoration: none; color: #b42318; }
.bds-cgv-check__label input[aria-invalid="true"] { outline: 2px solid #b42318; outline-offset: 2px; }

/* Lien d'évitement « Aller au contenu » : texte blanc sur le vert (contraste AA). */
a.fixed[href^="#"].focus\:top-0 { color: #fff; }

/* iOS agrandit la page dès qu'on touche un champ écrit en moins de 16 px (et la laisse
   zoomée) : 16 px minimum sur téléphone. !important : le kit UI impose .text-xs à 14 px
   en !important ; ce sélecteur, plus spécifique, l'emporte. */
@media (max-width: 639.98px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select:not([multiple]),
  textarea:not([hidden]) { font-size: 16px !important; }
}

/* Espace festivalier : une adresse e-mail longue passe à la ligne au lieu d'élargir la
   page sur téléphone (les boutons du kit ne passent jamais à la ligne). */
.bds-account-wrap { min-width: 0; overflow-wrap: anywhere; }
.bds-account-wrap .te-btn.bds-account-send {
  max-width: 100%; height: auto; min-height: 40px; padding-block: .55rem;
  white-space: normal; line-height: 1.35; text-align: center;
}
