/*
 * Futurist FareHarbor 3 Days - BeeFun visual skin
 * ------------------------------------------------
 * IMPORTANT : ce fichier modifie uniquement la couche visuelle.
 * Le PHP, le JavaScript, la logique FareHarbor, WPML et le shortcode
 * du plugin Futurist Games restent inchanges.
 *
 * Les couleurs principales sont centralisees ci-dessous.
 */

.fg-fh-3days {
  --fg-fh-purple: #6f25c8;
  --fg-fh-purple-light: #9d4cff;
  --fg-fh-purple-dark: #18051f;
  --fg-fh-yellow: #f4d40a;
  --fg-fh-yellow-soft: #fff06a;
  --fg-fh-surface: #100217;
  --fg-fh-card: rgba(255, 255, 255, 0.055);
  --fg-fh-card-hover: rgba(244, 212, 10, 0.09);
  --fg-fh-border: rgba(255, 255, 255, 0.12);
  --fg-fh-text: #fffaf5;
  --fg-fh-muted: rgba(255, 255, 255, 0.58);
  --fg-fh-radius: 30px;
  --fg-fh-heading: "Tilt Warp", "Arial Black", Impact, sans-serif;
  --fg-fh-body: Poppins, Arial, sans-serif;

  position: relative;
  isolation: isolate;
  overflow: hidden;

  width: 75%;
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(20px, 3vw, 34px);

  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--fg-fh-radius);

  color: var(--fg-fh-text);
  font-family: var(--fg-fh-body);

  background:
    radial-gradient(circle at 8% 0%, rgba(157, 76, 255, 0.30), transparent 34%),
    radial-gradient(circle at 96% 10%, rgba(244, 212, 10, 0.10), transparent 25%),
    linear-gradient(145deg, #1a0826 0%, var(--fg-fh-purple-dark) 42%, var(--fg-fh-surface) 100%);

  box-shadow:
    0 35px 90px rgba(8, 0, 15, 0.36),
    inset 0 1px rgba(255, 255, 255, 0.06);
}

.fg-fh-3days::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.11;
  background-image:
    linear-gradient(30deg, transparent 24%, rgba(255,255,255,.08) 25%, rgba(255,255,255,.08) 26%, transparent 27%),
    linear-gradient(150deg, transparent 24%, rgba(255,255,255,.05) 25%, rgba(255,255,255,.05) 26%, transparent 27%);
  background-size: 52px 90px;
  mask-image: linear-gradient(#000, transparent 86%);
}

.fg-fh-3days *,
.fg-fh-3days *::before,
.fg-fh-3days *::after {
  box-sizing: border-box;
}

/* =========================================================
   BARRE SUPERIEURE / NAVIGATION
   ========================================================= */

.fg-fh-toolbar {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.fg-fh-status {
  min-width: 0;
  color: var(--fg-fh-yellow);
  font-family: var(--fg-fh-heading);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.fg-fh-nav {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;

  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;

  background: rgba(255, 255, 255, 0.045);
  color: #fff;

  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;

  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}

.fg-fh-nav:hover,
.fg-fh-nav:focus-visible {
  transform: translateY(-2px);
  border-color: var(--fg-fh-yellow);
  background: var(--fg-fh-yellow);
  color: var(--fg-fh-purple-dark);
  box-shadow: 0 12px 28px rgba(244, 212, 10, 0.16);
  outline: none;
}

.fg-fh-nav:active {
  transform: translateY(0);
}

/* =========================================================
   GRILLE 3 JOURS
   ========================================================= */

.fg-fh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.fg-fh-day {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0 13px 13px;

  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;

  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.018)),
    rgba(7, 0, 12, 0.48);

  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.035);
}

.fg-fh-day::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 15px;
  width: 24px;
  height: 27px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  pointer-events: none;
}

.fg-fh-day-title {
  position: relative;
  margin: 0 -13px 12px;
  padding: 16px 45px 15px 16px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.10);

  background:
    linear-gradient(135deg, rgba(111, 37, 200, 0.92), rgba(46, 9, 66, 0.96));

  color: var(--fg-fh-text);
  font-family: var(--fg-fh-heading);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-align: left;
  text-transform: capitalize;
}

.fg-fh-day-title::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: 8px;
  width: 38px;
  height: 2px;
  border-radius: 999px;
  background: var(--fg-fh-yellow);
  opacity: 0.92;
}

/* =========================================================
   CRENEAUX
   ========================================================= */

.fg-fh-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.fg-fh-slot {
  appearance: none;
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  min-height: 66px;
  width: 100%;
  padding: 11px 12px;

  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;

  background: rgba(255, 255, 255, 0.035);
  color: var(--fg-fh-text);

  font: inherit;
  line-height: 1;
  cursor: pointer;

  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.fg-fh-slot::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -42px;
  width: 80px;
  height: 80px;
  transform: translateX(-50%) rotate(30deg);
  background: rgba(157, 76, 255, 0.10);
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  pointer-events: none;
}

.fg-fh-slot-time {
  position: relative;
  z-index: 1;
  font-family: var(--fg-fh-heading);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.fg-fh-slot-badge {
  position: relative;
  z-index: 1;
  max-width: 54%;
  color: var(--fg-fh-yellow);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.07em;
  text-align: right;
  text-transform: uppercase;
}

.fg-fh-slot:hover,
.fg-fh-slot:focus-visible {
  transform: translateY(-3px);
  border-color: var(--fg-fh-yellow);
  background: var(--fg-fh-card-hover);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  outline: none;
}

.fg-fh-slot:active {
  transform: translateY(0);
}

/* Etat complet : conserve exactement la logique JS Futurist */
.fg-fh-slot.is-sold-out,
.fg-fh-slot.is-sold-out:hover {
  cursor: not-allowed;
  opacity: 0.34;
  filter: grayscale(0.7);
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.fg-fh-slot.is-sold-out .fg-fh-slot-badge {
  color: rgba(255, 255, 255, 0.48);
  font-weight: 900;
}

.fg-fh-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 12px;
  color: var(--fg-fh-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* =========================================================
   REPLI CALENDRIER OFFICIEL
   ========================================================= */

.fg-fh-fallback {
  margin-top: 18px;
  padding: 18px;

  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.035);
  color: var(--fg-fh-text);

  text-align: center;
}

.fg-fh-fallback p {
  margin: 0 0 12px;
  color: var(--fg-fh-muted);
}

.fg-fh-fallback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;

  border: 1px solid var(--fg-fh-yellow);
  border-radius: 12px;

  background: var(--fg-fh-yellow);
  color: var(--fg-fh-purple-dark) !important;

  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-decoration: none !important;

  transition: transform .18s ease, box-shadow .18s ease;
}

.fg-fh-fallback-link:hover,
.fg-fh-fallback-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(244, 212, 10, 0.18);
  outline: none;
}

/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 980px) {
  .fg-fh-3days {
    width: 88%;
  }

  .fg-fh-grid {
    grid-template-columns: 1fr;
  }

  .fg-fh-slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .fg-fh-day-title {
    font-size: 22px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {
  .fg-fh-3days {
    width: 94%;
    padding: 15px;
    border-radius: 22px;
  }

  .fg-fh-toolbar {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
    margin-bottom: 14px;
  }

  .fg-fh-nav {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .fg-fh-status {
    font-size: 10px;
    letter-spacing: 0.055em;
  }

  .fg-fh-grid {
    gap: 11px;
  }

  .fg-fh-day {
    padding: 0 11px 11px;
    border-radius: 18px;
  }

  .fg-fh-day-title {
    margin: 0 -11px 10px;
    padding: 14px 42px 14px 14px;
    font-size: 19px;
  }

  .fg-fh-day-title::after {
    left: 14px;
    bottom: 7px;
  }

  .fg-fh-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fg-fh-slot {
    min-height: 62px;
    padding: 10px;
  }

  .fg-fh-slot-time {
    font-size: 18px;
  }

  .fg-fh-slot-badge {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fg-fh-nav,
  .fg-fh-slot,
  .fg-fh-fallback-link {
    transition: none;
  }
}

/* Navigation arrows: CSS-drawn to avoid missing glyphs in custom fonts. */
.fg-fh-nav {
  font-size: 0;
}
.fg-fh-nav::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.fg-fh-prev::before {
  transform: rotate(-135deg);
  margin-left: 4px;
}
.fg-fh-next::before {
  transform: rotate(45deg);
  margin-right: 4px;
}


/* v0.9.1: bookable slots are real FareHarbor links (same visual card). */
.fg-fh-3days a.fg-fh-slot,
.fg-fh-3days a.fg-fh-slot:visited {
  color: var(--fg-fh-text);
  text-decoration: none;
}
