/*
 * LV Projet Event - Styles publics
 * Tu peux modifier ce fichier directement pour adapter le rendu au site du Festival.
 * Chaque élément important possède une classe dédiée afin de pouvoir être stylé séparément.
 */

/* ===== Liste des événements ===== */
.fpuf-events-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.fpuf-event-card,
.fpuf-event-detail {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  overflow: hidden;
}

.fpuf-event-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

/* Classes de statut disponibles sur la carte :
 * .fpuf-event-card--open
 * .fpuf-event-card--full
 * .fpuf-event-card--closed
 */

.fpuf-event-card__image-link,
.fpuf-event-image {
  display: block;
  width: 100%;
  aspect-ratio: 350 / 220;
  overflow: hidden;
  background: #f4f4f4;
}

.fpuf-event-card__image,
.fpuf-event-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fpuf-event-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.fpuf-event-card__title,
.fpuf-event-title {
  margin: 0 0 12px;
}

.fpuf-event-card__title-link,
.fpuf-event-title a {
  color: inherit;
  text-decoration: none;
}

.fpuf-event-card__meta,
.fpuf-event-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
}

.fpuf-event-card__datetime {
  display: block;
}

.fpuf-event-card__date {
  display: inline;
}

.fpuf-event-card__time {
  display: inline;
}

.fpuf-event-card__status {
  display: block;
}

.fpuf-event-card__availability,
.fpuf-availability {
  font-weight: 600;
}

.fpuf-event-card__availability--available {}
.fpuf-event-card__availability--full {}
.fpuf-event-card__availability--closed {}

.fpuf-event-card__actions {
  display: flex;
  justify-content: center;
  margin-top: auto;
  width: 100%;
}

.fpuf-event-card__button {
  border-radius: 0;
  text-align: center;
}

/* ===== Boutons ===== */
.fpuf-button {
  display: inline-block;
  padding: 11px 18px;
  border: 0;
  border-radius: 0;
  background: #111;
  color: #fff !important;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.fpuf-button:hover {
  opacity: .88;
}

/* ===== Badges / états ===== */
.fpuf-badge {
  display: inline-block;
  border-radius: 0;
  padding: 7px 11px;
  font-size: .92em;
  font-weight: 600;
}

.fpuf-badge--full {
  background: #f3efe4;
}

.fpuf-badge--closed {
  background: #eee;
}

/* ===== Fiche événement ===== */
.fpuf-event-detail {
  padding: 22px;
}

.fpuf-event-detail__image {}

.fpuf-event-detail__image-element,
.fpuf-event-detail__image img {
  display: block;
  width: 100%;
  height: auto;
}

.fpuf-event-detail__title {}

.fpuf-event-meta--detail {
  margin-bottom: 22px;
}

.fpuf-event-detail__meta-row {}
.fpuf-event-detail__date {}
.fpuf-event-detail__time {}
.fpuf-event-detail__location {}
.fpuf-event-detail__address {}
.fpuf-event-detail__meta-label {}
.fpuf-event-detail__meta-value {}
.fpuf-event-description {}

.fpuf-registration-box,
.fpuf-event-detail__registration {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e5e5e5;
}

.fpuf-event-detail__availability {}
.fpuf-event-detail__availability--available {}
.fpuf-event-detail__availability--full {}
.fpuf-event-detail__availability--waitlist {}
.fpuf-event-detail__availability--closed {}
.fpuf-event-detail__remaining-count {}
.fpuf-event-detail__remaining-label {}

/* ===== Formulaire d'inscription ===== */
.fpuf-registration-form {}

.fpuf-form-grid,
.fpuf-registration-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.fpuf-registration-form p {
  margin: 0 0 16px;
}

.fpuf-form-field {}
.fpuf-form-field--first-name {}
.fpuf-form-field--last-name {}
.fpuf-form-field--email {}
.fpuf-form-field--phone {}

.fpuf-form-label {
  display: block;
  font-weight: 600;
}

.fpuf-form-required {}

.fpuf-form-input,
.fpuf-registration-form input[type="text"],
.fpuf-registration-form input[type="email"],
.fpuf-registration-form input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 0;
}

.fpuf-form-input--text {}
.fpuf-form-input--first-name {}
.fpuf-form-input--last-name {}
.fpuf-form-input--email {}
.fpuf-form-input--tel {}

.fpuf-consent,
.fpuf-registration-form__consent {}

.fpuf-consent__label,
.fpuf-consent label {
  font-weight: 400;
}

.fpuf-consent__input {
  border-radius: 0;
}
.fpuf-consent__text {}

.fpuf-registration-form__actions {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: 0;
}

.fpuf-registration-form__submit {}

/* ===== Messages ===== */
.fpuf-message {
  margin: 18px 0;
  border-radius: 0;
  padding: 12px 14px;
}

.fpuf-message--success {
  background: #eef7ee;
  border: 1px solid #b8dcb8;
}

.fpuf-message--error {
  background: #fff0f0;
  border: 1px solid #e7bcbc;
}

.fpuf-empty {
  grid-column: 1 / -1;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .fpuf-events-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fpuf-events-list,
  .fpuf-form-grid,
  .fpuf-registration-form__grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Nettoyage du template WordPress sur les fiches événements =====
 * Ces règles sont volontairement limitées aux pages d'événement du module.
 * Elles masquent les métadonnées d'article ajoutées par le thème : auteur,
 * date de publication et boutons de favoris / cœur les plus courants.
 */
.lvpe-single-event .entry-meta,
.lvpe-single-event .post-meta,
.lvpe-single-event .post-metadata,
.lvpe-single-event .entry-author,
.lvpe-single-event .post-author,
.lvpe-single-event .author-info,
.lvpe-single-event .posted-on,
.lvpe-single-event .post-date,
.lvpe-single-event .entry-date,
.lvpe-single-event .simplefavorite-button,
.lvpe-single-event .favorites-button,
.lvpe-single-event .favorite-button,
.lvpe-single-event .post-favorite,
.lvpe-single-event .wpulike,
.lvpe-single-event .wp_ulike_general_class {
  display: none !important;
}

/* ===== Nettoyage complémentaire des blocs article du thème =====
 * Partage social / “Share this post” et navigation Previous / Next.
 * Tout est limité aux fiches événement LV Projet Event.
 */
.lvpe-single-event .fusion-sharing-box,
.lvpe-single-event .share-box,
.lvpe-single-event .post-share,
.lvpe-single-event .entry-share,
.lvpe-single-event .share-post,
.lvpe-single-event .share-this-post,
.lvpe-single-event .social-share,
.lvpe-single-event .sharedaddy,
.lvpe-single-event .addtoany_share_save_container,
.lvpe-single-event .heateor_sss_sharing_container,
.lvpe-single-event .av-share-box,
.lvpe-single-event .nectar-social,
.lvpe-single-event #jp-post-flair,
.lvpe-single-event .fusion-post-nav,
.lvpe-single-event .post-navigation,
.lvpe-single-event .single-post-navigation,
.lvpe-single-event .navigation-post,
.lvpe-single-event .entry-navigation,
.lvpe-single-event .post-nav,
.lvpe-single-event .blog_next_prev_buttons,
.lvpe-single-event .avia-post-nav,
.lvpe-single-event .previous-post,
.lvpe-single-event .next-post,
.lvpe-single-event .prev-post,
.lvpe-single-event .pagination-single {
  display: none !important;
}

/* ===== Descriptif de l'événement ===== */
.fpuf-event-detail__description {}
.fpuf-event-description__title {
  margin: 24px 0 12px;
}
.fpuf-event-description__content {}

/* ===== Nettoyage renforcé de la fiche événement =====
 * Les thèmes WordPress utilisent des classes très variables pour le partage,
 * les favoris et les likes. Ces sélecteurs restent limités aux fiches LVPE.
 */
.lvpe-single-event [class*="favorite" i],
.lvpe-single-event [class*="favourite" i],
.lvpe-single-event [class*="bookmark" i],
.lvpe-single-event [class*="post-like" i],
.lvpe-single-event [class*="post_like" i],
.lvpe-single-event [class*="like-button" i],
.lvpe-single-event [class*="like_button" i],
.lvpe-single-event [id*="favorite" i],
.lvpe-single-event [id*="favourite" i],
.lvpe-single-event [id*="post-like" i],
.lvpe-single-event [id*="post_like" i] {
  display: none !important;
}

.single-post-content .entry-footer {
  display: none !important;
}


/* Image principale centrée sur la fiche événement, qu'elle provienne du module
 * ou du template du thème. On centre aussi le conteneur car certains thèmes
 * imposent leur propre largeur ou leur propre alignement sur l'image mise en avant. */
.fpuf-event-detail__image,
.lvpe-single-event .post-thumbnail,
.lvpe-single-event .entry-thumbnail,
.lvpe-single-event .featured-image,
.lvpe-single-event .post-featured-image,
.lvpe-single-event .featured-media,
.lvpe-single-event figure.wp-block-post-featured-image {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  float: none !important;
  text-align: center !important;
}

.fpuf-event-detail__image-element,
.fpuf-event-detail__image img,
.lvpe-single-event .post-thumbnail img,
.lvpe-single-event .entry-thumbnail img,
.lvpe-single-event .featured-image img,
.lvpe-single-event .post-featured-image img,
.lvpe-single-event .featured-media img,
.lvpe-single-event figure.wp-block-post-featured-image img,
.lvpe-single-event img.wp-post-image {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
