/* ------------------------------------------------------------------
   Le Bétulas — correctifs de portage React
   Ces règles remplacent ce que faisaient les plugins JS d'origine
   (Swiper, Owl, Magnific, WOW, marquee designesia). Chargé APRÈS
   betulas.css. Voir useBetulasInteractions.ts pour la logique.
   ------------------------------------------------------------------ */

/* Le préchargeur plein écran n'est pas rendu — garde-fou. */
#de-loader { display: none !important; }

/* --------------------------------------------------------------
   Icônes en « carré » : le gabarit référence la famille v4
   "FontAwesome" (flèches \f104/\f105, burger \f0c9, coches, chevrons,
   croix de la lightbox…), mais seule la police FA6 est empaquetée.
   On alias donc "FontAwesome" vers le fichier FA6 Free Solid.
   -------------------------------------------------------------- */
@font-face {
  font-family: "FontAwesome";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src:
    url("/betulas/assets/woff2_02.woff2") format("woff2"),
    url("/betulas/assets/ttf_02.ttf") format("truetype");
}
/* Certains gabarits n'imposent pas le poids solide : on le force. */
.fa-solid,
.fas { font-weight: 900; }
.fa-brands,
.fab { font-weight: 400; }

/* --------------------------------------------------------------
   Révélations gérées par GSAP : on lève le voile visibility du
   gabarit et on part d'opacité 0 (GSAP anime autoAlpha). Sans JS,
   le contenu reste masqué — même comportement que le WOW d'origine.
   -------------------------------------------------------------- */
.wow { visibility: visible; opacity: 0; }

/* Hero : « Sainte-Agathe » en italique, surligné façon marqueur (sauge). */
.hero .betulas-ville {
  font-style: italic;
  padding: 0.04em 0.14em;
  background-color: var(--primary-color); /* vert du bouton « Planifier une visite » */
  color: var(--ivoire);
  border-radius: 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Hero : le slider remplit la zone .mh-800 et déborde pour la parallaxe GSAP. */
.hero .mh-800 { position: relative; }
.hero .swiper { position: absolute; left: 0; right: 0; top: -10%; height: 120%; }
.hero .swiper-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Galerie : le carrousel Owl devient un rail à défilement horizontal. */
#services-carousel.owl-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
#services-carousel.owl-carousel::-webkit-scrollbar { display: none; }
#services-carousel .item {
  flex: 0 0 auto;
  width: min(80vw, 520px);
  scroll-snap-align: start;
}
.de-custom-nav .d-prev,
.de-custom-nav .d-next { cursor: pointer; }

/* Bandeau défilant. */
@keyframes betulasMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.de-marquee-list-1 {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  will-change: transform;
  animation: betulasMarquee 30s linear infinite;
}

/* Lightbox de la galerie. */
.betulas-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  padding: 4vmin;
  cursor: zoom-out;
}
.betulas-lightbox.open { display: flex; }
.betulas-lightbox img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Respect de prefers-reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  .wow { opacity: 1; }
  .de-marquee-list-1 { animation: none; }
  .hero .swiper-wrapper { transition: none !important; }
}

/* --------------------------------------------------------------
   Icônes : la police FontAwesome fournie avec le gabarit est
   sous-ensemblée (beaucoup de glyphes absents → carrés). On passe
   aux icônes lucide en SVG, et aux SVG inline pour les pseudo-
   éléments du gabarit. Plus aucune dépendance à la police d'icônes.
   -------------------------------------------------------------- */

/* Quartier : icône au-dessus du titre (remplace .quartier-item i). */
.quartier-item .quartier-icon {
  display: block;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  stroke-width: 1.75;
}

/* Pied de page : réseaux sociaux. */
.social-icons .social-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* Galerie : les flèches deviennent de vrais SVG dans la pastille. */
.de-custom-nav .d-prev:before,
.de-custom-nav .d-next:before { content: none !important; }
.de-custom-nav .d-prev,
.de-custom-nav .d-next {
  width: 40px;
  height: 40px;
  margin: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.de-custom-nav.dark .d-prev,
.de-custom-nav.dark .d-next { color: #000; }
.de-custom-nav .d-prev:hover,
.de-custom-nav .d-next:hover { background: var(--bg-dark-1); color: #fff; }
.de-custom-nav.dark .d-prev:hover,
.de-custom-nav.dark .d-next:hover { background: var(--bg-light); color: #000; }
.de-custom-nav .d-prev svg,
.de-custom-nav .d-next svg { width: 18px; height: 18px; stroke-width: 2; }

/* FAQ : chevron vers le bas, pivote à l'ouverture. */
.accordion-section-title:before {
  content: "" !important;
  float: right;
  width: 16px;
  height: 16px;
  margin-left: 12px;
  padding: 0 !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2308080A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  transition: transform 0.25s ease;
}
.accordion-section-title.active:before { transform: rotate(180deg); }
.text-light .accordion-section-title:before,
.dark-scheme .accordion-section-title:before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Menu mobile : burger / fermeture en SVG. */
#menu-btn:before {
  content: "" !important;
  display: block;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8E4D9' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
}
#menu-btn.menu-open:before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8E4D9' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}
header:not(.at-top) #menu-btn:before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2308080A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
}

/* Responsive layout: keep the template's legacy rules out of navigation. */
.betulas-header { overflow: visible !important; }
.betulas-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.betulas-header #betulas-navigation { height: auto; }
.betulas-header #mainmenu { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; }
.betulas-header #mainmenu li { margin: 0; }
.betulas-header #mainmenu a.menu-item { padding: 12px 0; white-space: nowrap; }
.betulas-header #mainmenu .mobile-contact { display: none; }
.betulas-header-actions { display: flex; align-items: center; gap: 16px; }
.betulas-header #menu-btn { display: none; margin: 0; padding: 0; width: 44px; height: 44px; border: 1px solid var(--border-color); border-radius: 6px; background: transparent; color: var(--charbon); filter: none; }
.betulas-header #menu-btn::before { display: none; }
.betulas-header a:focus-visible, .betulas-header button:focus-visible { outline: 3px solid #73929a; outline-offset: 4px; }
.project-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.project-fact { min-width: 0; }
.project-fact .d-flex { align-items: flex-start !important; gap: 12px; }
.project-fact img { flex-shrink: 0; margin: 0 !important; }
.project-fact .fs-20 { font-size: 17px; line-height: 1.5; white-space: normal; }
.reg-liste li { flex-wrap: wrap; gap: 4px 14px; }
.reg-note { white-space: normal; flex-shrink: 1; max-width: 100%; text-align: left; }
#wrapper section[id] { scroll-margin-top: 110px; }

@media (max-width: 1199px) {
  header.betulas-header,
  header.betulas-header.at-top,
  header.betulas-header.smaller.scroll-light:not(.at-top) {
    position: sticky !important; top: 0; height: auto; min-height: 0;
    background: var(--bg-default) !important; box-shadow: 0 1px 0 #08080a12;
  }
  .betulas-header > .container, #wrapper .container { width: calc(100% - 48px); max-width: 100%; padding-inline: 0; }
  #wrapper .row:not(.g-0) { --bs-gutter-x: 24px; }
  header.betulas-header div#logo { padding: 10px 0; }
  header.betulas-header div#logo img { height: 56px; width: auto; }
  header.betulas-header div#logo .logo-main, header.betulas-header div#logo .logo-scroll { display: none !important; }
  header.betulas-header div#logo .logo-mobile { display: block !important; }
  .betulas-header #menu-btn { display: grid; place-items: center; flex-shrink: 0; }
  .betulas-header #betulas-navigation {
    display: none; position: absolute; inset: 100% 0 auto; height: auto;
    max-height: calc(100dvh - 84px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg-default); border-top: 1px solid var(--border-color); box-shadow: 0 16px 24px #08080a12;
  }
  .betulas-header.menu-open #betulas-navigation { display: block; }
  .betulas-header #mainmenu { position: static; display: block; width: 100%; height: auto; padding: 8px 24px 20px !important; margin: 0; overflow: visible; }
  .betulas-header #mainmenu li { display: block; width: 100%; border-bottom: 1px solid var(--border-color); }
  .betulas-header #mainmenu .mobile-contact { display: block; border-bottom: 0; }
  .betulas-header #mainmenu a.menu-item { display: flex; align-items: center; min-height: 52px; padding: 12px 0; color: var(--charbon) !important; font-size: 16px; background: transparent; }
  .betulas-header #mainmenu a.menu-item:hover { color: var(--primary-color) !important; }
  .betulas-header #mainmenu a.menu-item::after { display: none; }
  .hero h1.fs-72 { font-size: clamp(36px, 5.5vw, 60px); }
  .project-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-row .feature-txt { padding: 24px; }
  #section-contact .form-control { font-size: 16px; min-height: 48px; }
  #section-contact .agent-photo { width: 72px; height: 72px; }
}

@media (max-width: 767px) {
  .betulas-header > .container, #wrapper .container { width: calc(100% - 40px); }
  #wrapper main > section:not(.p-0):not(.hero) { padding-block: 56px; }
  .promo-band { padding: 10px 20px; font-size: 12px; line-height: 1.65; }
  .hero .mh-800 { min-height: 560px; min-height: clamp(480px, 76svh, 640px); }
  .hero .hero-bloc { position: relative; padding-top: 260px !important; padding-bottom: 32px !important; }
  .hero h1.fs-72 { font-size: clamp(32px, 9.1vw, 54px); line-height: 1.16; }
  .hero h5 { font-size: 14px; line-height: 1.65; }
  #section-projet h3 { font-size: 22px; line-height: 1.5; }
  .project-facts { gap: 24px 18px; }
  .project-fact .d-flex { flex-direction: column; gap: 10px; }
  .project-fact .fs-20 { font-size: 16px; }
  #wrapper h2 { font-size: clamp(28px, 8vw, 36px); line-height: 1.2; overflow-wrap: break-word; }
  #wrapper .reg-bloc { padding: 28px 20px; }
  .reg-liste li { display: flex; flex-direction: column; align-items: flex-start; }
  .reg-item { font-size: 15px; }
  .reg-note { font-size: 13px; }
  .reg-pied { font-size: 14px; line-height: 1.7; }
  #section-galerie .container-fluid { padding-inline: 20px; }
  #section-galerie .container-fluid > .row { margin: 0; }
  #section-galerie .container-fluid > .row > div { padding: 0; }
  .de-custom-nav .d-prev, .de-custom-nav .d-next { width: 44px; height: 44px; }
  #section-quartier .d-tab-nav { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
  #section-quartier .d-tab-nav li { display: flex !important; align-items: center; min-height: 44px; margin: 0; padding: 8px 0; }
  #section-contact h4 { font-size: 18px; }
  #section-contact #send_message { width: 100%; min-height: 48px; }
  #section-contact .sante-box, #section-contact .consent-line { overflow-wrap: anywhere; }
}
@media (max-width: 575px) {
  .betulas-header-actions > .btn-main { display: none; }
  .feature-row img { max-height: 240px; object-fit: cover; }
}

/* Clipping must not create an ancestor scroll container for the sticky header. */
html, body { overflow-x: clip; }
@media (max-width: 1199px) {
  header.betulas-header > .container { min-width: 0; margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

#section-galerie .container-fluid { padding-inline: 20px; }
#section-galerie .container-fluid > .row { margin-inline: 0; }
#section-galerie .container-fluid > .row > div { padding-inline: 0; }
@media (max-width: 767px) {
  .hero .mh-800 { display: flex; align-items: flex-end; }
  .hero .hero-bloc { width: 100%; }
}
.betulas-header #betulas-navigation { transition: none; }
