/*
Theme Name: FoyerFSM
Description: Thème WordPress sur mesure basé sur Sitejet
Version: 1.0.0
*/

/* =========================================================
   RESET / GLOBAL
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Espace en bas géré par JS pour la barre contact mobile */
  --mobile-bar-space: 0px;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Open Sans", sans-serif;
  font-weight: 200;
  font-size: 18px;
  line-height: 2.2;
  color: #2b2b2b;
  background-color: #ffffff;
  /*background-color: #e9bfee;*/
  text-transform: uppercase;

  /* Fix trou sous footer (ex padding-bottom: 76px injecté ailleurs) */
  padding-bottom: var(--mobile-bar-space) !important;

  /* Layout sticky footer */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Admin bar fix */
body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* =========================================================
   HEADER – SITEJET / ASTROTHEMES (STABLE)
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;

  background: transparent;
  box-shadow: none;

  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

/* État HERO (au chargement, sur le slider) */
.site-header.is-hero {
  background: rgba(0, 0, 0, 0.25);
}

/* État SCROLL (sticky visible) */
.site-header.is-scrolled {
  background: rgba(210, 131, 131, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Structure interne */
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.site-logo a {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
}

/* Navigation (base) */
.site-navigation ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-navigation a {
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.9;
}

.site-navigation a:hover {
  opacity: 1;
}

/* Liens standards */
.site-navigation li:not(.menu-cta)>a {
  padding: 8px 0;
  line-height: 1;
}

/* CTA */
.site-navigation .menu-cta {
  margin-left: 12px;
}

.site-navigation .menu-cta>a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background-color: #a9c5a6;
  color: #ffffff !important;

  padding: 12px 24px;
  border-radius: 999px;

  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;

  line-height: 1;
  white-space: nowrap;

  transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.site-navigation .menu-cta>a:hover {
  background-color: #8fb18a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  text-decoration: none;
}

/* =========================================================
   HERO / SLIDER
   ========================================================= */

.preset-banner-v3-home-4 {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
  overflow: hidden;
}

.preset-banner-v3-home-4 .metaslider {
  position: absolute !important;
  inset: 0;
  z-index: 1;
}

.preset-banner-v3-home-4 .metaslider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
.preset-banner-v3-home-4::before {
  content: "";
  position: absolute;
  inset: 0;
 background: rgba(0, 0, 0, 0.35);
  z-index: 2;
}*/

.hero-overlay {
  position: relative;
  z-index: 3;
  min-height: 85vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  color: #fff;
  padding: 0 24px;
}

/* =========================================================
   BOUTON SITEJET
   ========================================================= */

.wp-block-button.btn-sitejet .wp-block-button__link {
  background: #a9c5a6 !important;
  color: #fff !important;
  border: none !important;

  padding: 14px 34px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;

  transition: background-color 0.3s ease, transform 0.2s ease;
}

.wp-block-button.btn-sitejet .wp-block-button__link:hover {
  background-color: #8fb18a !important;
  transform: translateY(-1px);
}

/* =========================================================
   SECTIONS COMMUNES
   ========================================================= */

.section-about,
.section-values,
.section-services,
.section-chambres {
  padding: 80px 24px;
}

.section-about,
.section-services {
  background-color: #f7f7f7;
}

.section-values,
.section-chambres {
  background-color: #ffffff;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

/* =========================================================
   À PROPOS
   ========================================================= */

.section-about .wp-block-columns {
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
  gap: 48px;
}

.section-about img {
  border-radius: 12px;
}

/* =========================================================
   VALEURS
   ========================================================= */

.section-values .wp-block-columns {
  max-width: 1200px;
  margin: 0 auto;
  gap: 32px;
}

.section-values .wp-block-column {
  text-align: center;
  padding: 32px 24px;
  background-color: #f7f7f7;
  border-radius: 16px;

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-values .wp-block-column:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.section-values img {
  width: 72px;
  margin-bottom: 20px;
}

/* =========================================================
   SERVICES – ACCORDÉON
   ========================================================= */

.section-services details {
  max-width: 900px;
  margin: 0 auto 16px;
  background: #e9bfee;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

.section-services summary {
  padding: 20px 56px 20px 24px;
  cursor: pointer;
  font-weight: 600;
  position: relative;
  list-style: none;
}

.section-services summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.section-services details[open] summary::after {
  content: "–";
}

/* =========================================================
   CHAMBRES
   ========================================================= */

.chambres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.chambre-card {
  border-radius: 16px;
  overflow: hidden;
  background: #f7f7f7;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chambre-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   GALERIE CHAMBRE
   ========================================================= */

.single-chambre .wp-block-gallery img {
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.4s ease;
}

.single-chambre .wp-block-gallery img:hover {
  transform: scale(1.05);
}

/* =========================================================
   LIGHTBOX
   ========================================================= */

.slbOverlay {
  background: rgba(0, 0, 0, 0.9);
}

.slbCloseBtn {
  font-size: 28px;
  color: #fff;
}

/* =========================================================
   FOOTER – THEME BASED / SITEJET
   ========================================================= */

.site-footer {
  background: #2b2b2b;
  color: #ffffff;

  margin-bottom: 0 !important;
  padding-bottom: 0;
  flex-shrink: 0;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 32px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 48px;
  margin-bottom: 40px;
}

.footer-widget h2,
.footer-widget h3,
.footer-widget h4 {
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-widget p,
.footer-widget a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.7;
}

.footer-widget a:hover {
  color: #ffffff;
}

/* Menu pied de page */
.footer-menu {
  display: flex;
  gap: 16px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.footer-menu a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-menu a:hover {
  color: #ffffff;
}

/* Copyright */
.footer-copy {
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
}

/* =========================================================
   FOOTER MAP
   ========================================================= */

.footer-map {
  margin-top: 48px;
  border-radius: 16px;
  overflow: hidden;
}

.footer-map iframe {
  width: 100%;
  height: 220px;
  border: 0;
}

/* Desktop only (carte masquée sur mobile) */
@media (max-width: 768px) {
  .footer-map {
    display: none;
  }
}

.footer-map-link {
  display: none;
  text-align: center;
  margin-top: 24px;
}

.footer-map-link a {
  display: inline-block;
  background: #a9c5a6;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 768px) {
  .footer-map-link {
    display: block;
  }
}

/* =========================================================
   BARRE CONTACT MOBILE
   ========================================================= */

.mobile-contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9998;

  background: #333232;
  border-top: 1px solid #e5e5e5;

  transform: translateY(100%);
  opacity: 0;

  transition: transform 0.35s ease, opacity 0.35s ease;
}

.mobile-contact-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile uniquement */
@media (min-width: 768px) {
  .mobile-contact-bar {
    display: none;
  }
}

.mobile-contact-bar a {
  flex: 1;
  text-align: center;

  color: #ffffff;
  text-decoration: none;
  font-size: 12px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mobile-contact-bar .mobile-cta {
  background: #a9c5a6;
  color: #1f1f1f;
  font-weight: 700;

  border-radius: 10px;
  margin: 0 4px;
  padding: 6px 0;

  font-size: 11px;
}

.mobile-contact-bar span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* =========================================================
   HEADER MOBILE + MENU
   ========================================================= */

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  margin: 6px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Overlay menu */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Menu */
.mobile-menu {
  text-align: center;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.mobile-menu-list li {
  margin-bottom: 20px;
}

.mobile-menu-list a {
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
}

/* CTA menu mobile */
.mobile-menu-cta {
  display: inline-block;
  background: #a9c5a6;
  color: #1f1f1f;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

/* =========================================================
   HEADER MOBILE – VERSION PRO SITEJET
   ========================================================= */

@media (max-width: 768px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;

    background: rgba(0, 0, 0, 0.92);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);

    transition: background-color 0.3s ease, box-shadow 0.3s ease;
  }

  .site-header.is-hero {
    position: fixed;
    background: rgba(0, 0, 0, 0.92);
  }

  .site-header-inner {
    min-height: 56px;
    padding: 10px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .site-logo img {
    max-height: 30px;
    width: auto;
  }

  .site-logo a {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
  }

  /* Décalage global du contenu (header fixe) */
  body {
    padding-top: 56px;
  }

  .preset-banner-v3-home-4 {
    margin-top: 0;
  }
}

/* =========================================================
   BURGER MENU – ANIMATION ☰ → ✕
   ========================================================= */

.menu-toggle {
  display: none;
  width: 34px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
}

.menu-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) {
  top: 0;
}

.menu-toggle span:nth-child(2) {
  top: 11px;
}

.menu-toggle span:nth-child(3) {
  bottom: 0;
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: rotate(45deg);
  top: 11px;
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 11px;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
}

/* =========================================================
   CHAMBRES – GRID 3 COLONNES + FLIP CARD
   ========================================================= */

.chambres-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Responsive */
@media (max-width: 980px) {
  .chambres-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .chambres-grid {
    grid-template-columns: 1fr;
  }
}

.chambre-card {
  perspective: 1200px;
}

.chambre-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Conteneur flip */
.chambre-flip {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 320px;
  /* hauteur carte */
}

.chambre-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

/* =========================================================
   CARTES CHAMBRES – STYLE PREMIUM
   ========================================================= */

.chambre-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

@media (hover: hover) {
  .chambre-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
  }
}

/* Flip plus fluide */
.chambre-flip-inner {
  transition: transform 0.6s cubic-bezier(.4,.2,.2,1);
}

/* Hover desktop */
@media (hover: none) {
  .chambre-card:hover .chambre-flip-inner{
    transform: none;
  }
}

/* Faces */
.chambre-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 22px;
}

.chambre-front {
  background: #f7f7f7;
}

.chambre-back {
  background: rgba(0, 0, 0, 0.90);
  color: #fff;
  transform: rotateY(180deg);
  text-align: center;
}

/* Cadre image 200×200 homogène */
.chambre-media {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chambre-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* remplit sans déformer */
  display: block;
}

.chambre-thumb--placeholder {
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.25);
}

.chambre-front-content {
  margin-top: 14px;
}

.chambre-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.chambre-back-text {
  margin: 12px 0 18px;
  font-size: 14px;
  line-height: 1.6;
  text-transform: none;
  /* texte lisible */
  max-width: 28ch;
}

.chambre-back-cta {
  display: inline-block;
  background: #a9c5a6;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
}

/* Flip désactivé via option admin */
body.flip-disabled .chambre-flip-inner {
  transform: none !important;
}

.chambre-back-cta {
  margin-top: 16px;
  background: #a9c5a6;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.chambre-card:hover .chambre-back-cta {
  background-color: #8fb18a;
  transform: translateY(-1px);
}
