/* ==========================================================================
   home.css - affinages specifiques a l'accueil (charge via is_page_template).
   Couleurs : tokens var(--fp-*) uniquement (discipline verifiee par check-zones).
   La structure reprend fidelement l'accueil RParc : nav en pilule + mega-menu,
   hero photo + voile leger + mascotte, intro a forme arrondie debordante avec
   badges flottants, carrousel d'offres auto, grille d'activites coloree a pattes
   animees, horaires (mascotte + table), ravitaillement sur fond topo, anniversaire,
   auberge, newsletter, widget mascotte (bulle typing).
   ========================================================================== */

/* ==========================================================================
   1. NAV : conteneur de menu en PILULE ARRONDIE (~80%, pas full-width), memes
      couleurs que le RParc, bouton compte + « Reserver » blanc mis en avant.
   ========================================================================== */
.fp-nav-pill {
  display: flex; align-items: center; justify-content: center;
  flex: 0 1 auto; max-width: 80%;
  padding: 6px 10px; border-radius: var(--fp-pill);
  background: color-mix(in srgb, var(--fp-paper) 86%, transparent);
  border: 1px solid var(--fp-line);
  box-shadow: var(--fp-shadow);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.fp-has-dark-hero .fp-nav:not(.is-stuck) .fp-nav-pill {
  background: rgba(0, 0, 0, .28);
  border-color: var(--fp-line-light);
}
/* Une fois scrollee (plus de barre pleine largeur) : la pilule et le bouton compte
   deviennent solides (teal fonce) pour rester lisibles par-dessus le contenu. */
.fp-has-dark-hero .fp-nav.is-stuck .fp-nav-pill,
.fp-has-dark-hero .fp-nav.is-stuck .fp-nav-account {
  background: color-mix(in srgb, var(--fp-dark) 92%, transparent);
  border-color: transparent;
}
.fp-nav-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.fp-nav-account {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--fp-line);
  background: color-mix(in srgb, var(--fp-paper) 86%, transparent);
  color: var(--fp-primary); transition: transform .15s ease, background .2s ease;
}
.fp-nav-account:hover { transform: translateY(-2px); background: var(--fp-paper); }
.fp-nav-account svg { width: 22px; height: 22px; }
.fp-has-dark-hero .fp-nav:not(.is-stuck) .fp-nav-account {
  background: rgba(0, 0, 0, .28); border-color: var(--fp-line-light); color: var(--fp-white);
}
/* Le bouton Reserver reste blanc (fp-btn-light) meme sur fond clair : mise en avant. */
.fp-nav-cta { padding: 11px 24px; }
.fp-brand-logo { max-height: 56px; width: auto; margin-right: 10px; }

/* Mega-menu (jet-mega-menu RParc) : 2 colonnes de liens + 3e colonne info coloree. */
.fp-has-mega { position: relative; }
.fp-mega {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(720px, 86vw); padding-top: 16px; z-index: 30;
  opacity: 0; visibility: hidden; pointer-events: none;
  /* Fermeture legerement differee (180ms) pour ne pas disparaitre des qu'on bouge. */
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .18s;
}
/* padding-top = PONT DE SURVOL : pas de trou entre l'item et le panneau, donc le
   survol ne se perd plus quand on descend la souris vers le mega-menu. */
.fp-has-mega:hover > .fp-mega,
.fp-has-mega:focus-within > .fp-mega {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity .2s ease, transform .2s ease, visibility 0s; /* ouverture immediate */
}
.fp-mega-inner {
  display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 0;
  background: var(--fp-paper); color: var(--fp-ink);
  border-radius: var(--fp-pill); overflow: hidden;
  box-shadow: var(--fp-shadow-lg); border: 1px solid var(--fp-line);
}
.fp-mega-col { list-style: none; margin: 0; padding: 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.fp-mega-col li { position: static; }
.fp-mega-col a {
  display: block; padding: 9px 12px; border-radius: var(--fp-radius-sm);
  font-family: var(--fp-font-body); font-weight: 500; font-size: .98rem;
  text-transform: none; letter-spacing: 0; color: var(--fp-ink);
}
.fp-mega-col a:hover { background: var(--fp-cream); color: var(--fp-primary); }
/* 3e colonne « info sympa » coloree (accent), avec mascotte. */
.fp-mega-info {
  position: relative; padding: 24px 22px; color: var(--fp-white);
  background: var(--fp-primary); display: flex; flex-direction: column; gap: 8px;
  justify-content: center; overflow: hidden;
}
.fp-mega-info-title { font-family: var(--fp-font-heading); font-weight: 700; text-transform: uppercase; margin: 0; font-size: 1.2rem; }
.fp-mega-info-text { margin: 0; font-size: .95rem; opacity: .95; }
.fp-mega-info-cta { align-self: flex-start; margin-top: 6px; padding: 9px 18px; font-size: .9rem; }
.fp-mega-info-img { position: absolute; right: -10px; bottom: -14px; width: 92px; height: auto; opacity: .85; }

/* ==========================================================================
   2. HERO : fond MOINS vert (photo + voile leger), mascotte sur le cote.
   ========================================================================== */
.page-template-template-home .fp-hero { min-height: min(94vh, 880px); }
/* Voile plus leger que le defaut : on laisse respirer la photo. */
.page-template-template-home .fp-hero-overlay {
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--fp-dark) 58%, transparent) 0%, color-mix(in srgb, var(--fp-dark) 24%, transparent) 55%, color-mix(in srgb, var(--fp-primary) 18%, transparent) 100%),
    linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.34) 100%);
}
.page-template-template-home .fp-hero-title { font-size: clamp(2.8rem, 7vw, 5.6rem); }
.page-template-template-home .fp-hero-lead { font-size: clamp(1.1rem, 2vw, 1.4rem); }
/* Mascotte du hero plus presente sur le cote. */
.page-template-template-home .fp-hero-mascotte-img img { max-width: min(480px, 100%); }

/* ==========================================================================
   3. INTRO : forme ARRONDIE qui DEBORDE, mascotte POSEE dessus (pieds sur le
      bord), eyebrow = icon-box (pin Lucide), GROS titre, badges Element flottants.
   ========================================================================== */
.page-template-template-home .fp-intro { overflow: visible; }
.fp-intro-title {
  font-family: var(--fp-font-heading); font-weight: 700; text-transform: uppercase;
  line-height: 1.02; letter-spacing: .005em; margin: 16px 0 18px;
  font-size: clamp(2.4rem, 5vw, 4rem); max-width: 16ch; color: var(--fp-ink);
}
.fp-intro-aside { overflow: visible; }
/* La « forme arrondie qui deborde » : grand blob teal clair, deborde du flux. */
.fp-intro-blob {
  position: relative; width: min(440px, 86vw); aspect-ratio: 1 / 1; margin: 0 auto;
}
.fp-intro-blob::before {
  content: ''; position: absolute; inset: 6%;
  background: color-mix(in srgb, var(--fp-accent) 30%, var(--fp-cream));
  border: 2px solid color-mix(in srgb, var(--fp-primary) 30%, transparent);
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  box-shadow: var(--fp-shadow);
}
/* Mascotte posee : pieds sur le bord superieur du blob (deborde vers le haut). */
.fp-intro-mascotte {
  position: absolute; left: 50%; bottom: 46%; transform: translateX(-50%);
  width: 56%; z-index: 4; pointer-events: none;
}
.fp-intro-mascotte img { width: 100%; height: auto; filter: drop-shadow(0 18px 26px rgba(0,0,0,.22)); }
/* Le cluster (patte centrale + Element badges) reutilise la zone du blob. */
.fp-intro-blob .fp-cluster { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Badges Element flottants (vrais Element-*.svg) repartis autour du rond. */
.fp-cluster-el {
  position: absolute; width: 30%; height: 30%; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  animation: fp-orbit 7s ease-in-out infinite;
}
.fp-cluster-el img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.18)); }
.fp-cluster-el-1 { top: -6%; left: 30%; animation-delay: 0s; }
.fp-cluster-el-2 { top: 8%; right: -8%; animation-delay: .5s; }
.fp-cluster-el-3 { top: 40%; right: -12%; animation-delay: 1s; }
.fp-cluster-el-4 { bottom: 2%; right: 2%; animation-delay: 1.5s; }
.fp-cluster-el-5 { bottom: -8%; left: 32%; animation-delay: 2s; }
.fp-cluster-el-6 { bottom: 6%; left: -10%; animation-delay: 2.5s; }
.fp-cluster-el-7 { top: 30%; left: -12%; animation-delay: 3s; }
/* Glisse depuis la gauche a l'apparition + flotte ensuite. */
@keyframes fp-orbit {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(0, -12px) rotate(6deg); }
}
.fp-reveal .fp-cluster-el { opacity: 0; transform: translateX(-40px); }
.fp-reveal.is-in .fp-cluster-el { opacity: 1; transform: translateX(0); transition: opacity .6s ease, transform .7s ease; }
@media (prefers-reduced-motion: reduce) { .fp-cluster-el { animation: none; } }

/* ==========================================================================
   4. OFFRES : carrousel auto. Cartes-image signature (em-card-border RParc) :
      image en fond, label + texte par-dessus, hover sureleve + ombre + rotation.
   ========================================================================== */
.page-template-template-home .fp-offres { padding-top: var(--fp-section-y-sm); }
/* La carte d'offre montre l'image RParc en haut, texte dessous, contour creme. */
.page-template-template-home .fp-offre-card {
  background: var(--fp-cream); border: 1px solid var(--fp-primary);
  border-radius: var(--fp-radius-lg); box-shadow: var(--fp-shadow);
  transform-origin: center;
  transition: transform .4s ease, box-shadow .3s ease, border-color .3s ease;
}
.page-template-template-home .fp-offre-card:hover {
  transform: translateY(-8px) rotate(-2deg); box-shadow: 8px 8px 0 0 var(--fp-secondary-dark);
}
.page-template-template-home .fp-offre-media {
  display: block; aspect-ratio: 1 / 1; background: var(--fp-cream) center/cover no-repeat;
}
@media (prefers-reduced-motion: reduce) {
  .page-template-template-home .fp-offre-card:hover { transform: none; }
}

/* ==========================================================================
   5. ACTIVITES : motif de pattes anime en fond + cartes signature (contour
      blanc, image en fond, label par-dessus « BILLARD » « BOWLING », hover
      sureleve + ombre + arrondi + rotation).
   ========================================================================== */
.page-template-template-home .fp-activites { overflow: hidden; }
/* Motif de pattes anime en fond de section (GSAP si dispo, sinon CSS). */
.fp-paws { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.fp-paw { position: absolute; width: 88px; opacity: .12; animation: fp-paw-float 7s ease-in-out infinite; }
.fp-paw img { width: 100%; height: auto; filter: brightness(0) invert(1); }
.fp-paw-1 { top: 6%; left: 4%; animation-delay: 0s; }
.fp-paw-2 { top: 18%; right: 8%; width: 64px; animation-delay: .8s; }
.fp-paw-3 { top: 48%; left: 10%; width: 56px; animation-delay: 1.6s; }
.fp-paw-4 { bottom: 12%; right: 6%; animation-delay: 2.4s; }
.fp-paw-5 { bottom: 6%; left: 30%; width: 72px; animation-delay: 3.2s; }
.fp-paw-6 { top: 30%; right: 28%; width: 48px; animation-delay: 1.2s; }
.fp-paw-7 { top: 70%; right: 18%; width: 60px; animation-delay: 2s; }
.fp-paw-8 { top: 60%; left: 44%; width: 44px; animation-delay: .4s; }
@keyframes fp-paw-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) { .fp-paw { animation: none; } }

/* Cartes activites : la tuile devient une carte signature (contour, hover lift). */
.page-template-template-home .fp-activites .fp-tile-grid { position: relative; z-index: 1; }
.page-template-template-home .fp-activites .fp-tile {
  aspect-ratio: 1 / 1; border: 2px solid var(--fp-white);
  border-radius: var(--fp-radius-lg); transform-origin: center;
  transition: transform .4s ease, box-shadow .3s ease;
}
.page-template-template-home .fp-activites .fp-tile:hover {
  transform: translateY(-8px) rotate(-2deg); box-shadow: 8px 8px 0 0 var(--fp-secondary-dark);
}
.page-template-template-home .fp-activites .fp-tile-title { font-size: 1.15rem; }
@media (prefers-reduced-motion: reduce) {
  .page-template-template-home .fp-activites .fp-tile:hover { transform: none; }
}

/* ==========================================================================
   6. HORAIRES : mascotte a gauche, horaires en dur (paragraphes) a droite.
   ========================================================================== */
.page-template-template-home .fp-horaires-body p {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 13px 18px; margin: 0; border-bottom: 1px solid var(--fp-line);
  background: var(--fp-paper);
}
.page-template-template-home .fp-horaires-body p:nth-child(even) { background: var(--fp-cream); }
.page-template-template-home .fp-horaires-body p:first-child { border-top-left-radius: var(--fp-radius); border-top-right-radius: var(--fp-radius); }
.page-template-template-home .fp-horaires-body p:last-child { border-bottom: 0; border-bottom-left-radius: var(--fp-radius); border-bottom-right-radius: var(--fp-radius); }
.page-template-template-home .fp-horaires-body {
  border-radius: var(--fp-radius); overflow: hidden; box-shadow: var(--fp-shadow);
}

/* ==========================================================================
   7. RAVITAILLEMENT : fond image TOPO (lignes), bord ARRONDI EN HAUT avec une
      bordure « verre » claire arrondie ; puces d'info en icon-box.
   ========================================================================== */
.fp-ravito { position: relative; overflow: hidden; border-top-left-radius: 40px; border-top-right-radius: 40px; margin-top: -40px; }
.fp-ravito-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: 300px; background-repeat: repeat; opacity: .14;
}
/* Bordure « verre » claire arrondie en haut. */
.fp-ravito-glass {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-top-left-radius: 40px; border-top-right-radius: 40px;
  border-top: 2px solid var(--fp-line-light);
  background: linear-gradient(180deg, color-mix(in srgb, var(--fp-white) 55%, transparent) 0%, transparent 18%);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.fp-ravito .fp-inner { position: relative; z-index: 2; }
.fp-ravito-iboxes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }

/* ==========================================================================
   8. RESTAURATION : (tuiles deja stylees) + icon-box d'infos (ci-dessus).
   ========================================================================== */

/* ==========================================================================
   10. ANNIVERSAIRE : grande carte coloree arrondie + mascotte Rafy.
   ========================================================================== */
.fp-anniv { background: var(--fp-paper); padding: var(--fp-section-y) 0; }
.fp-anniv-card {
  position: relative; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center;
  gap: 24px; background: var(--fp-secondary); color: var(--fp-white);
  border-radius: var(--fp-radius-lg); padding: clamp(28px, 4vw, 56px); overflow: hidden;
  box-shadow: var(--fp-shadow-lg);
}
.fp-anniv-pattern {
  position: absolute; inset: 0; z-index: 0; opacity: .12;
  background: url('https://raiffeisen-parc.ch/wp-content/uploads/2025/04/bg-pattes-color-100.webp') center/420px repeat;
}
.fp-anniv-text { position: relative; z-index: 1; }
.fp-anniv-title { margin: 14px 0 12px; font-size: clamp(2rem, 4vw, 3.2rem); max-width: 18ch; }
.fp-anniv-body { color: rgba(255, 255, 255, .92); max-width: 48ch; }
.fp-anniv-body p { color: rgba(255, 255, 255, .92); }
.fp-anniv-actions { margin-top: 22px; }
.fp-anniv-media { position: relative; z-index: 1; text-align: center; }
.fp-anniv-media img { max-width: min(320px, 100%); height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.3)); }
@media (max-width: 860px) {
  .fp-anniv-card { grid-template-columns: 1fr; text-align: center; }
  .fp-anniv-title { margin-left: auto; margin-right: auto; }
  .fp-anniv-actions { display: flex; justify-content: center; }
}

/* ==========================================================================
   9. WIDGET mascotte : bulle « Funny » en effet typing (une seule fois).
   ========================================================================== */
.fp-widget-greet {
  position: absolute; right: 84px; bottom: 14px; max-width: 240px;
  padding: 12px 16px; border-radius: var(--fp-radius) var(--fp-radius) 4px var(--fp-radius);
  background: var(--fp-paper); color: var(--fp-ink); box-shadow: var(--fp-shadow-lg);
  font-family: var(--fp-font-body); font-size: .95rem; line-height: 1.4;
  opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease;
  pointer-events: none; white-space: normal;
}
.fp-widget-greet.is-on { opacity: 1; transform: translateY(0); }
.fp-widget-greet::after {
  content: ''; position: absolute; right: -7px; bottom: 14px;
  border: 7px solid transparent; border-left-color: var(--fp-paper);
}
@media (max-width: 520px) { .fp-widget-greet { display: none; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .fp-nav-pill { max-width: 100%; }
  .fp-mega-inner { grid-template-columns: 1fr 1fr; }
  .fp-mega-info { display: none; }
}
@media (max-width: 980px) {
  /* Mega-menu en accordeon mobile : le panneau reste dans le flux. */
  .fp-mega { position: static; transform: none; width: 100%; opacity: 1; visibility: visible; pointer-events: auto; padding: 0 0 8px; }
  .fp-mega-inner { grid-template-columns: 1fr; box-shadow: none; border: 0; border-radius: var(--fp-radius); background: var(--fp-cream); }
  .fp-mega-info { display: none; }
  .fp-nav-pill { max-width: 100%; flex-direction: column; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; padding: 0; }
  .fp-nav-actions { width: 100%; justify-content: center; margin-top: 10px; }
}
@media (max-width: 900px) {
  .fp-intro-blob { width: min(360px, 80vw); }
}
