/*
Theme Name: Assafaa Bayt Theme
Theme URI: https://AtlasTechSolution.com
Author: AtlasTechSolution.com
Author URI: https://AtlasTechSolution.com
Description: Thème WordPress sur-mesure pour Assafaa Bayt, promoteur immobilier à Marrakech. Compatible Elementor.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: assafaa-bayt
*/

/* 
 * -----------------------------------------------------------------------------
 * 1. Elementor Resets & Global Overrides
 * -----------------------------------------------------------------------------
 * We ensure that Elementor's global styles do not override our specific design 
 * system elements like typography, base colors, and container widths.
 */

:root {
  --elementor-page-title-display: none;
}

body {
  margin: 0;
  padding: 0;
}

/* Ensure the body font matches the original design */
body, html {
  font-family: 'Inter', 'Inter Tight', sans-serif;
  color: #191919;
  background-color: #F2F4F7;
}

/* Fix Webflow container centering */
.w-container {
  margin-left: auto;
  margin-right: auto;
  max-width: 940px;
}
@media screen and (min-width: 1440px) {
  .w-container {
    max-width: 1200px;
  }
}

/* Make sure elements don't conflict with Elementor margins */
.elementor-widget-text-editor {
  font-family: inherit;
  color: inherit;
}

/* =============================================================================
 * GLOBAL VIEWPORT & ZOOM RESET (100% Full Width on Desktop, Tablet & Mobile)
 * ============================================================================= */
html, body {
  zoom: 1 !important;
  overflow-x: clip !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* =============================================================================
 * FIX: four-steps-design-process — 4 colonnes sur desktop sans coupure
 * ============================================================================= */

/* Conteneur élargi pour laisser la place aux 4 cartes de respirer */
.for-steps-design-process .main-container.w-container {
  max-width: 1400px !important;
  width: 100% !important;
}

@media screen and (min-width: 1025px) {
  /* Afficher la version desktop comme un flex row */
  #four-step.four-steps-grid.for-desktop,
  .four-steps-grid.for-desktop {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 16px !important;
    align-items: stretch !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
  }

  /* Cartes : dimensions strictes gérées par les variables Webflow (--card-expanded / --card-collapsed) */
  #card-01,
  #card-02,
  #card-03,
  #card-04 {
    flex-shrink: 0 !important; /* CRUCIAL : ne pas écraser les cartes à l'étroit */
    height: 560px !important;
    padding: 1.75rem 1.25rem !important; /* Padding interne propre */
    border-radius: 20px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    transition: width 0.9s cubic-bezier(0.65, 0, 0.35, 1), transform 0.4s ease !important;
  }

  /* Conteneur d'image : pas de coupure d'overflow pour les chiffres */
  #four-step .discovery-research-image {
    position: relative !important;
    overflow: visible !important;
    width: 100% !important;
  }

  /* Images dans les cartes : proportions naturelles conservées */
  #four-step .discovery-research-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 240px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    display: block !important;
  }

  /* FIX: Chiffres (.01, .02, .03, .04) : taille proportionnelle, toujours lisibles et jamais coupés */
  #four-step .head-01 {
    position: absolute !important;
    inset: auto 0.5rem 0.5rem auto !important;
    z-index: 10 !important;
    width: auto !important;
  }

  #four-step .head-01 h2,
  #four-step .display-sm.display-color.padding-right.font-weight,
  #four-step .display-sm {
    width: auto !important;
    height: auto !important;
    font-size: 3.25rem !important; /* ~52px : s'intègre parfaitement sans déborder */
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: right !important;
    white-space: nowrap !important;
    letter-spacing: -1px !important;
  }

  /* Titres des cartes : retour à la ligne automatique pour ne pas être tronqués */
  #four-step .h5-head-component {
    white-space: normal !important;
    word-break: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    width: auto !important;
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
  }

  /* Textes de description */
  #four-step .para-text-md.custom-color {
    width: auto !important;
    white-space: normal !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }

  /* Masquer la version grille mobile */
  .four-steps-grid.for-mobile-cards {
    display: none !important;
  }

  /* Masquer le slider mobile Webflow */
  .for-only-mobile-scrreen {
    display: none !important;
  }
}

/* =============================================================================
 * TABLET & MOBILE UI / UX ENHANCEMENTS (<= 1024px)
 * ============================================================================= */

@media screen and (max-width: 1024px) {
  /* Masquer la version bureau à expansion complexe */
  .four-steps-grid.for-desktop {
    display: none !important;
  }
  .for-only-mobile-scrreen {
    display: none !important;
  }

  /* 4 Étapes : Carrousel horizontal tactile natif (Scroll-Snap fluide 60fps) */
  .four-steps-grid.for-mobile-cards {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 20px !important;
    padding: 10px 24px 28px 24px !important;
    scrollbar-width: none !important;
  }
  .four-steps-grid.for-mobile-cards::-webkit-scrollbar {
    display: none !important;
  }

  /* Carte d'étape : par défaut sur tablette (768px-1024px), 2 cartes visibles */
  .four-steps-grid.for-mobile-cards .discovery-research {
    flex: 0 0 47% !important;
    max-width: 380px !important;
    scroll-snap-align: start !important;
    box-sizing: border-box !important;
    border-radius: 20px !important;
    padding: 1.75rem 1.25rem !important;
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 480px !important;
  }

  .four-steps-grid.for-mobile-cards .h5-head-component {
    font-size: 1.25rem !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    color: #191919 !important;
    margin-bottom: 8px !important;
  }

  .four-steps-grid.for-mobile-cards .para-text-md {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: #667085 !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .four-steps-grid.for-mobile-cards .discovery-research-image {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    margin-top: 18px !important;
    height: 210px !important;
  }

  .four-steps-grid.for-mobile-cards .discovery-research-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .four-steps-grid.for-mobile-cards .head-01 {
    position: absolute !important;
    right: 0.75rem !important;
    bottom: 0.5rem !important;
    z-index: 10 !important;
  }

  .four-steps-grid.for-mobile-cards .head-01 h2 {
    font-size: 3rem !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
    font-weight: 700 !important;
    letter-spacing: -1px !important;
  }
}

/* =============================================================================
 * RESPONSIVE POLISH & HARMONIE TABLETTE (768px - 1024px)
 * ============================================================================= */

@media screen and (min-width: 768px) and (max-width: 1024px) {
  /* Conteneur et paddings tablette */
  .main-container.padding-2rem,
  .main-container {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }

  /* Normaliser les grands espacements Webflow vides sur tablette */
  .spacer-80, .spacer-78 {
    height: 48px !important;
  }
  .spacer-60, .spacer-42 {
    height: 36px !important;
  }
  .spacer-27, .spacer-20 {
    height: 20px !important;
  }

  /* Typographie fluide adaptée aux tablettes */
  h1.head-h1-component, .h1-head-component {
    font-size: 2.75rem !important;
    line-height: 1.25 !important;
  }
  h2.h4-head-component, .h4-head-component {
    font-size: 2rem !important;
    line-height: 1.35 !important;
  }
  .para-text-lg {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
  }
  .para-text-xl {
    font-size: 1.35rem !important;
    line-height: 1.45 !important;
  }

  /* Section 2 : About Us & Chiffres Clés sur tablette */
  .about-us-section.counter-section {
    padding-top: 85px !important;
    padding-bottom: 50px !important;
    scroll-margin-top: 90px !important;
  }
  .sec-2-main-div {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
    text-align: left !important;
  }
  .about-developios {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 32px !important;
  }
  .video-wrapper-custom {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
  }
  .video-wrapper-custom video {
    width: 100% !important;
    max-width: 460px !important;
    height: auto !important;
    max-height: 52vh !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    display: block !important;
    margin: 0 auto !important;
  }
  .about-sec-cards {
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    text-align: left !important;
  }
  .about-sec-cards .para-text-xl {
    font-size: 1.15rem !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
    color: #475467 !important;
    opacity: 1 !important;
    text-align: left !important;
  }
  .about-sec-cards .spacer-42 {
    display: none !important;
  }
  .two-cards-custom {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
  }
  .two-cards-custom .spacer-78 {
    height: 20px !important;
  }
  .two-cards-custom .card-01,
  .two-cards-custom .card-02 {
    padding: 22px 18px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    text-align: left !important;
  }
  .two-cards-custom .h3-head-component {
    font-size: 32px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    color: #101828 !important;
  }
  .two-cards-custom .para-text-md {
    font-size: 14px !important;
    line-height: 1.35 !important;
    color: #667085 !important;
  }

  /* Grille des prestations (5 équipements) équilibrée sur tablette */
  .amenities-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 20px !important;
  }
  .amenity-card {
    width: 30% !important;
    max-width: 220px !important;
    box-sizing: border-box !important;
  }

  /* Section Patrimoine : Stacking & Transitions 3D sur tablette */
  .case-studies {
    position: relative !important;
    overflow: visible !important;
    padding-top: 20px !important;
    padding-bottom: 60px !important;
  }
  .case-studies .container-main {
    position: relative !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  .parent-amplify-div {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 85px !important;
    z-index: 10 !important;
    margin-bottom: 50px !important;
    height: auto !important;
    will-change: transform;
  }
  .parent-zum-max {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 102px !important;
    z-index: 20 !important;
    margin-bottom: 50px !important;
    height: auto !important;
    will-change: transform;
  }
  .parent-zum-max.samphire {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 119px !important;
    z-index: 30 !important;
    margin-bottom: 40px !important;
    height: auto !important;
    will-change: transform;
  }
  .case-study-image,
  .case-study-image-2 {
    background-color: #ffffff !important;
    border-radius: 24px !important;
    padding: 16px !important;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.08), 0 20px 45px rgba(0, 0, 0, 0.14) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    overflow: hidden !important;
    transform-origin: center top !important;
    transition: transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.25s ease !important;
    max-width: 720px !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .apmlify-image,
  .zum-wax-image {
    width: 100% !important;
    height: 280px !important;
    max-height: 36vh !important;
    object-fit: cover !important;
    border-radius: 16px !important;
    display: block !important;
  }
  .amplify-text-wrapper {
    position: static !important;
    width: 100% !important;
    padding: 18px 10px 8px 10px !important;
    background: transparent !important;
    box-sizing: border-box !important;
  }
  .amplify-text-wrapper .h6-head-component {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: #101828 !important;
    margin-bottom: 8px !important;
    line-height: 1.25 !important;
  }
  .amplify-text-wrapper .spacer-19 {
    display: none !important;
  }
  .amplify-text-wrapper .para-text-md {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: #475467 !important;
    margin-bottom: 14px !important;
  }
  .amplify-text-wrapper .tag-div {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  .amplify-text-wrapper .crm {
    padding: 4px 12px !important;
    border-radius: 8px !important;
    background-color: #F2F4F7 !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
  }
  .amplify-text-wrapper .text-light {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #344054 !important;
  }
}

/* =============================================================================
 * RESPONSIVE POLISH & HARMONIE GLOBALE SMARTPHONE (< 768px)
 * ============================================================================= */

@media screen and (max-width: 767px) {
  /* 4 Étapes sur smartphone : 1 carte avec 82% pour aperçu de la suivante */
  .four-steps-grid.for-mobile-cards {
    gap: 16px !important;
    padding: 10px 20px 24px 20px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .four-steps-grid.for-mobile-cards .discovery-research {
    flex: 0 0 82% !important;
    max-width: 82% !important;
    scroll-snap-align: center !important;
    min-height: 440px !important;
  }
  .four-steps-grid.for-mobile-cards .discovery-research-image {
    height: 190px !important;
  }
  .four-steps-grid.for-mobile-cards .head-01 h2 {
    font-size: 2.75rem !important;
  }

  /* Normaliser les grands espacements Webflow vides sur smartphone */
  .spacer-80, .spacer-78 {
    height: 36px !important;
  }
  .spacer-60, .spacer-42 {
    height: 28px !important;
  }
  .spacer-27, .spacer-20 {
    height: 16px !important;
  }

  /* Padding horizontal doux sur conteneurs */
  .main-container.padding-2rem,
  .main-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Typographie fluide adaptée aux écrans de smartphone */
  h1.head-h1-component, .h1-head-component {
    font-size: 2.2rem !important;
    line-height: 1.25 !important;
  }
  h2.h4-head-component, .h4-head-component {
    font-size: 1.65rem !important;
    line-height: 1.35 !important;
  }
  .para-text-lg {
    font-size: 1rem !important;
    line-height: 1.55 !important;
  }
  .para-text-xl {
    font-size: 1.15rem !important;
    line-height: 1.45 !important;
  }

  /* Grille des prestations (5 équipements) équilibrée */
  .amenities-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 16px 12px !important;
  }
  .amenity-card {
    width: 46% !important;
    max-width: 175px !important;
    box-sizing: border-box !important;
  }
  /* Centrer élégamment le 5ème item orphelin */
  .amenity-card:last-child:nth-child(odd) {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Section Patrimoine : Stacking & Transitions 3D sur smartphone */
  .parent-amplify-div {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 75px !important;
    margin-bottom: 35px !important;
    will-change: transform;
  }
  .parent-zum-max {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 88px !important;
    margin-bottom: 35px !important;
    will-change: transform;
  }
  .parent-zum-max.samphire {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 101px !important;
    margin-bottom: 30px !important;
    will-change: transform;
  }
  .case-study-image,
  .case-study-image-2 {
    border-radius: 18px !important;
    padding: 12px !important;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.09), 0 16px 36px rgba(0, 0, 0, 0.16) !important;
  }
  .apmlify-image,
  .zum-wax-image {
    height: 190px !important;
    max-height: 27vh !important;
    border-radius: 12px !important;
  }
  .amplify-text-wrapper {
    padding: 14px 6px 4px 6px !important;
  }
  .amplify-text-wrapper .h6-head-component {
    font-size: 1.15rem !important;
    margin-bottom: 6px !important;
  }
  .amplify-text-wrapper .para-text-md {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
  }
  .amplify-text-wrapper .crm {
    padding: 3px 8px !important;
    border-radius: 6px !important;
  }
  .amplify-text-wrapper .text-light {
    font-size: 0.7rem !important;
  }
}

/* ==========================================================================
   Hero Full Screen (100vh / 100dvh) sur tous les écrans (Desktop, Tablette, Mobile)
   ========================================================================== */
.hero-section,
.hero-swiper,
.hero-section.swiper,
.hero-swiper.swiper {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    position: relative !important;
}
.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide {
    width: 100% !important;
    height: 100% !important;
}
.hero-swiper .background-media,
.hero-swiper .background-media video,
.hero-swiper .background-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}


