/* ================================================================
   ONECLICK MAROC — ADVANCED RESPONSIVE FIXES (ENHANCED)
    supplemental responsive enhancements for modern devices.
   Breakpoints: 576px / 768px / 992px / 1200px
   ================================================================ */

/* ---------------------------------------------------------------
   1. GLOBAL RESET & OVERFLOW GUARD
--------------------------------------------------------------- */

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

html, body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* Ensure all images are responsive by default */
img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

/* ---------------------------------------------------------------
   2. FLUID TYPOGRAPHY (Modern clamp approach)
--------------------------------------------------------------- */

:root {
  /* Fluid scaling for headings: min size, preferred (vw), max size */
  --h1-size: clamp(2rem, 8vw, 3.5rem);
  --h2-size: clamp(1.75rem, 6vw, 2.75rem);
  --h3-size: clamp(1.4rem, 4vw, 2.1rem);
  --section-padding: clamp(3rem, 10vh, 6rem);
}

h1, .h1 { font-size: var(--h1-size) !important; line-height: 1.2; }
h2, .h2 { font-size: var(--h2-size) !important; line-height: 1.25; }
h3, .h3 { font-size: var(--h3-size) !important; line-height: 1.3; }

.section-head h2, 
.section-head .title,
.section-head.style-1 h2 {
  font-size: var(--h2-size);
}

/* ---------------------------------------------------------------
   3. CONTAINER & SECTION SAFETY
--------------------------------------------------------------- */

.content-inner, .content-inner-2 {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

/* Safety padding for small screens */
@media (max-width: 575px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ---------------------------------------------------------------
   4. TOUCH TARGETS (WCAG 2.5.5 - 44px min-size)
--------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea,
.btn {
  min-height: 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------------------------------------------------------------
   5. NAVBAR & MOBILE NAVIGATION
--------------------------------------------------------------- */

/* Tablet & below (≤ 991px) — collapsed navbar breakpoint */
@media (max-width: 991px) {
  
  /* Larger tap target for hamburger toggle */
  .navbar-toggler {
    padding: 10px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* Dropdown tap areas - easier to tap and clearer arrows */
  .header-nav .nav > li > a {
    padding: 15px 20px !important;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .sub-menu-down > a:after {
    margin-top: 0;
    font-size: 1.2rem;
  }

  /* Fix 'extra-nav' crowding */
  .extra-nav {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .extra-nav .btn {
    font-size: 13px;
    padding: 8px 16px;
    white-space: nowrap;
  }
}

/* Mobile only (≤ 575px) */
@media (max-width: 575px) {
  .logo-header img {
    max-width: 140px;
  }

  /* Hide the extra-nav button in header to prevent crowding (it's in the menu) */
  .extra-nav .btn.btn-primary {
    display: none;
  }
}

/* ---------------------------------------------------------------
   6. HERO — banner-one
--------------------------------------------------------------- */

.banner-one {
  position: relative;
  overflow: hidden;
}

@media (max-width: 991px) {
  .banner-one {
    min-height: unset;
    padding-top: 120px;
    padding-bottom: 50px;
    text-align: center;
  }

  .banner-one .banner-media {
    margin: 40px auto 0;
    max-width: 480px;
    text-align: center;
  }

  .banner-one .banner-content {
    padding-right: 0;
  }
}

@media (max-width: 767px) {
  /* Stack buttons nicely on mobile */
  .banner-one .banner-content .btn {
    display: flex;
    width: 100%;
    margin-right: 0 !important;
    margin-bottom: 15px;
  }

  .banner-one .banner-content .btn:last-child {
    margin-bottom: 0;
  }

  /* Prevent layout shifts by hiding decorative background shapes */
  .banner-one .shape-1,
  .banner-one .shape-2,
  .banner-one .shape-3,
  .banner-one .shape-4,
  .banner-one .shape-5 {
    display: none;
  }
}

/* ---------------------------------------------------------------
   7. COMPONENT SPECIFIC FIXES (Preserved & Enhanced)
--------------------------------------------------------------- */

/* Service Cards */
@media (max-width: 767px) {
  .accueil-service-card {
    padding: 30px 20px;
  }
  .accueil-service-icon-box {
    width: 65px;
    height: 65px;
    font-size: 26px;
  }
}

/* Portfolio Cards */
@media (max-width: 575px) {
  .image-container {
    height: 280px;
  }
  .image-container:hover img {
    transform: translateY(calc(-100% + 280px));
  }
}

/* Dialog / Modal */
@media (max-width: 575px) {
  dialog { width: 95%; top: 2vh; }
  dialog .modal-scroll-container { max-height: 96vh; }
  .close-modal { top: -10px; right: -6px; width: 34px; height: 34px; }
}

/* Testimonials */
@media (max-width: 575px) {
  .btn-prev, .btn-next { width: 40px; height: 40px; }
}

/* Clients Logo */
.appscreen-slider .swiper-slide img {
  max-width: 140px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

/* ---------------------------------------------------------------
   8. WHATSAPP CTA — full redesign
   Classes: .wa-cta-section, .wa-cta-card, .wa-cta-left/.right,
            .wa-social-icon, .wa-btn, .wa-phone-link
--------------------------------------------------------------- */

/* === Section wrapper === */
.wa-cta-section {
  padding: 60px 0 80px;
  background: #f4f7ff;
}

/* === Card === */
.wa-cta-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1060 0%, #391aa6 55%, #5e35d4 100%);
  border-radius: 20px;
  padding: 56px 64px;
  display: flex;
  align-items: center;
  gap: 48px;
  box-shadow: 0 24px 60px rgba(57, 26, 166, 0.35);
}

/* --- Decorative blurred circles --- */
.wa-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.wa-deco-1 {
  width: 340px;
  height: 340px;
  background: rgba(255, 255, 255, 0.05);
  top: -120px;
  left: -100px;
}
.wa-deco-2 {
  width: 240px;
  height: 240px;
  background: rgba(94, 53, 212, 0.4);
  bottom: -80px;
  right: 80px;
}

/* === Left column === */
.wa-cta-left {
  position: relative;
  z-index: 1;
  flex: 1;
}

.wa-cta-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
}

.wa-cta-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 14px;
  font-family: var(--font-family-title, 'Poppins', sans-serif);
}

.wa-cta-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 380px;
}

/* Social icons row */
.wa-social-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wa-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 17px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.wa-social-icon:hover,
.wa-social-icon:focus {
  transform: translateY(-3px) scale(1.1);
  color: #fff;
  outline: none;
}

.wa-fb:hover  { background: #1877F2; border-color: #1877F2; }
.wa-x:hover   { background: #000000; border-color: #000; }
.wa-li:hover  { background: #0A66C2; border-color: #0A66C2; }
.wa-ig:hover  { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); border-color: transparent; }
.wa-tt:hover  { background: #010101; border-color: #010101; }

/* === Vertical divider === */
.wa-divider {
  position: relative;
  z-index: 1;
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* === Right column === */
.wa-cta-right {
  position: relative;
  z-index: 1;
  flex: 0 0 300px;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

/* "Available now" indicator */
.wa-available {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.5px;
  margin: 0;
}

/* Pulsing green dot */
.wa-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #25D366;
  flex-shrink: 0;
  animation: wa-pulse 1.8s ease-in-out infinite;
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  50%       { box-shadow: 0 0 0 8px rgba(37, 211, 102, 0); }
}

/* Main WhatsApp button */
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: #25D366;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 16px;
  padding: 16px 28px;
  font-family: var(--font-family-title, 'Poppins', sans-serif);
  transition: background 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.4);
  white-space: nowrap;
}
.wa-btn:hover,
.wa-btn:focus {
  background: #1ebe57;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.55);
  color: #fff !important;
  outline: none;
}

/* WhatsApp icon circle */
.wa-btn-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  transition: background 0.3s ease;
}
.wa-btn:hover .wa-btn-icon {
  background: rgba(255, 255, 255, 0.3);
}

/* Button text block */
.wa-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.wa-btn-action {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.wa-btn-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1.2;
}

/* Phone link */
.wa-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: 0.3px;
}
.wa-phone-link:hover,
.wa-phone-link:focus {
  color: #ffffff;
  outline: none;
}
.wa-phone-link i {
  font-size: 12px;
}

/* ── Responsive — WhatsApp CTA ───────────────────────────────── */

@media (max-width: 1199px) {
  .wa-cta-card {
    padding: 48px 48px;
    gap: 36px;
  }
  .wa-cta-title {
    font-size: 1.7rem;
  }
}

@media (max-width: 991px) {
  .wa-cta-card {
    flex-direction: column;
    text-align: center;
    padding: 44px 36px;
    gap: 32px;
  }
  .wa-cta-sub {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .wa-social-row {
    justify-content: center;
  }
  .wa-divider {
    width: 100%;
    height: 1px;
    align-self: auto;
  }
  .wa-cta-right {
    flex: 0 0 100%;
    width: 100%;
  }
}

@media (max-width: 575px) {
  .wa-cta-section {
    padding: 40px 0 60px;
  }
  .wa-cta-card {
    padding: 36px 24px;
    border-radius: 16px;
  }
  .wa-cta-title {
    font-size: 1.45rem;
  }
  .wa-btn {
    padding: 14px 20px;
    gap: 12px;
    border-radius: 14px;
  }
  .wa-btn-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .wa-btn-action {
    font-size: 15px;
  }
}

/* ---------------------------------------------------------------
   9. LANGUAGE SWITCHER — Clean EN | FR Segmented Control
   Globe icon suppressed via CSS — fixes all en/ pages at once
--------------------------------------------------------------- */

/* ── Suppress globe icon everywhere ─────────────────────────── */
.lang-switcher i,
.lang-switcher-mobile i {
  display: none !important;
}

/* ── Shared container — segmented-control shape ─────────────── */
.lang-switcher,
.lang-switcher-mobile {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  background: transparent;
  border: 1.5px solid rgba(0, 123, 255, 0.28);
  border-radius: 6px;
  overflow: hidden;
  vertical-align: middle;
}

/* ── EN / FR items ───────────────────────────────────────────── */
.lang-switcher .lang-item,
.lang-switcher-mobile .lang-item,
.lang-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  border-radius: 0;
  color: #007BFF !important;
  text-decoration: none !important;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Divider between EN and FR */
.lang-switcher .lang-item + .lang-item,
.lang-switcher-mobile .lang-item + .lang-item {
  border-left: 1.5px solid rgba(0, 123, 255, 0.28);
}

/* Active — filled */
.lang-switcher .lang-item.lang-active,
.lang-switcher-mobile .lang-item.lang-active,
.lang-item.lang-active {
  background: #007BFF;
  color: #fff !important;
  pointer-events: none;
  cursor: default;
}

/* Hover on inactive */
.lang-switcher .lang-item:hover:not(.lang-active),
.lang-switcher-mobile .lang-item:hover:not(.lang-active) {
  background: rgba(0, 123, 255, 0.08);
}

/* ── White variant — style-2 header (dark / gradient bg) ────── */
.site-header.style-2 .lang-switcher {
  border-color: rgba(255, 255, 255, 0.38);
}
.site-header.style-2 .lang-switcher .lang-item {
  color: rgba(255, 255, 255, 0.88) !important;
}
.site-header.style-2 .lang-switcher .lang-item + .lang-item {
  border-left-color: rgba(255, 255, 255, 0.38);
}
.site-header.style-2 .lang-switcher .lang-item.lang-active {
  background: rgba(255, 255, 255, 0.92);
  color: #391aa6 !important;
}
.site-header.style-2 .lang-switcher .lang-item:hover:not(.lang-active) {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

/* ── Mobile (inside collapsed nav) ──────────────────────────── */
.lang-switcher-mobile {
  margin: 14px 20px;
  width: fit-content;
}

/* Visibility control */
@media (max-width: 991px) {
  .lang-switcher        { display: none !important; }
  .lang-switcher-mobile { display: flex   !important; }
}
@media (min-width: 992px) {
  .lang-switcher-mobile { display: none !important; }
}

/* Prevent site nav JS from treating the switcher as a dropdown */
.extra-cell .lang-switcher,
.extra-nav .lang-switcher {
  position: static !important;
  box-shadow: none !important;
}


/* ---------------------------------------------------------------
   10. NAVBAR — All items on one line, Contact included
--------------------------------------------------------------- */

/* ── Prevent nav from wrapping on desktop ───────────────────── */
@media (min-width: 992px) {
  .header-nav .nav.navbar-nav {
    flex-wrap: nowrap !important;
  }
  .header-nav .nav > li > a {
    white-space: nowrap;
  }

  /* Keep extra-cell (EN|FR + Free Quote) on one row */
  .extra-cell.d-flex {
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .extra-cell .btn {
    white-space: nowrap;
  }
}

/* ── Logo compression — reclaim horizontal space ────────────── */
@media only screen and (min-width: 992px) and (max-width: 1400px) {
  .logo-header {
    width: 130px !important;
  }
  .logo-header img {
    max-width: 130px !important;
  }
}

/* ── 992 – 1199 px: tightest fit ────────────────────────────── */
@media only screen and (min-width: 992px) and (max-width: 1199px) {
  .header-nav .nav > li > a,
  .site-header.style-1 .header-nav .nav > li > a,
  .site-header.style-2 .header-nav .nav > li > a {
    padding-left:  8px !important;
    padding-right: 8px !important;
    font-size: 12.5px !important;
  }
  .extra-cell .btn {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }
  .lang-switcher .lang-item {
    min-width: 28px !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
  }
}

/* ── 1200 – 1350 px: moderate compression ───────────────────── */
@media only screen and (min-width: 1200px) and (max-width: 1350px) {
  .header-nav .nav > li > a,
  .site-header.style-1 .header-nav .nav > li > a,
  .site-header.style-2 .header-nav .nav > li > a {
    padding-left:  11px !important;
    padding-right: 11px !important;
    font-size: 13.5px !important;
  }
}

/* ── 1351 – 1500 px: light touch ────────────────────────────── */
@media only screen and (min-width: 1351px) and (max-width: 1500px) {
  .header-nav .nav > li > a,
  .site-header.style-2 .header-nav .nav > li > a {
    padding-left:  14px !important;
    padding-right: 14px !important;
    font-size: 14px !important;
  }
}

/* ---------------------------------------------------------------
   11. UTILITIES
--------------------------------------------------------------- */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dz-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
