/* ================================================================
   ONECLICK MAROC — responsive.css
   Supplemental responsive fixes (mobile-first additions)
   Breakpoints mirroring Bootstrap: 576 / 768 / 992 / 1200
   ================================================================ */


/* ---------------------------------------------------------------
   1. GLOBAL — overflow guard + image safety
--------------------------------------------------------------- */

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* Ensure every element respects the box model */
*, *::before, *::after {
  box-sizing: border-box;
}


/* ---------------------------------------------------------------
   2. NAVBAR / HEADER
   Fixes: logo overflow, hamburger tap area, CTA button crowding
--------------------------------------------------------------- */

/* Tablet & below (≤ 991px) — collapsed navbar breakpoint */
@media (max-width: 991px) {

  /* Constrain logo so it doesn't push other items */
  .logo-header img {
    max-width: 150px;
    height: auto;
  }

  /* Ensure "Devis Gratuit" button in extra-nav fits */
  .extra-nav .btn {
    font-size: 13px;
    padding: 8px 14px;
  }

  /* Larger tap target for hamburger toggle */
  .navbar-toggler {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
  }
}

/* Mobile only (≤ 575px) — very tight screens */
@media (max-width: 575px) {

  .logo-header img {
    max-width: 130px;
  }

  /* Hide the extra "Devis Gratuit" button in the header bar on tiny screens
     (it's still accessible from the mobile nav menu) */
  .extra-nav {
    display: none;
  }
}


/* ---------------------------------------------------------------
   3. HERO — banner-one
   Fixes: negative right margin overflow, H1 size, button layout,
          excessive min-height, inner image centering
--------------------------------------------------------------- */

/* Tablet (≤ 991px): remove the desktop-only negative right margin */
@media (max-width: 991px) {

  .banner-one .banner-media {
    margin-right: 0;
    text-align: center;
  }

  .banner-one .banner-media img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/* Mobile (≤ 767px): stack everything, centre text, reduce whitespace */
@media (max-width: 767px) {

  /* Remove the fixed tall min-height that creates dead space */
  .banner-one {
    min-height: unset;
    padding-top: 100px;
    padding-bottom: 30px;
  }

  /* Centre hero copy */
  .banner-one .banner-content {
    text-align: center;
    padding-bottom: 20px;
    padding-top: 20px;
  }

  /* Stack the two CTA buttons vertically — full-width, spaced apart */
  .banner-one .banner-content .btn {
    display: block;
    width: 100%;
    margin-right: 0 !important;
    margin-bottom: 12px;
  }

  /* Constrain hero image on mobile */
  .banner-one .banner-media .main-img {
    max-width: 260px;
    display: block;
    margin: 0 auto;
  }
}

/* Very small phones (≤ 575px) */
@media (max-width: 575px) {

  .banner-one {
    padding-top: 80px;
  }

  .banner-one .banner-media .main-img {
    max-width: 220px;
  }
}


/* ---------------------------------------------------------------
   4. SECTION PADDING — reduce vertical breathing room on mobile
--------------------------------------------------------------- */

@media (max-width: 767px) {

  .content-inner {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .content-inner-2 {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

@media (max-width: 575px) {

  .content-inner,
  .content-inner-2 {
    padding-top: 30px;
    padding-bottom: 30px;
  }
}


/* ---------------------------------------------------------------
   5. TYPOGRAPHY — section headings
--------------------------------------------------------------- */

@media (max-width: 767px) {

  /* Prevent very large section titles from overflowing */
  .section-head h2,
  .section-head .title,
  .section-head.style-1 h2 {
    font-size: clamp(1.4rem, 5vw, 2rem);
    line-height: 1.3;
  }

  /* Sub-titles */
  .section-head p {
    font-size: 0.95rem;
  }
}

@media (max-width: 575px) {

  h1, .h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
    line-height: 1.25;
  }

  h2, .h2 {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
  }

  h3, .h3 {
    font-size: clamp(1.1rem, 5vw, 1.4rem);
  }
}


/* ---------------------------------------------------------------
   6. BUTTONS — minimum 44 px touch target (WCAG 2.5.5)
--------------------------------------------------------------- */

@media (max-width: 767px) {

  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}


/* ---------------------------------------------------------------
   7. SERVICE CARDS (accueil-service-grid)
   Already has 3→2→1 col breakpoints in services.css;
   these polish the padding/spacing on small screens.
--------------------------------------------------------------- */

@media (max-width: 767px) {

  .accueil-service-section {
    padding: 50px 0;
  }

  .accueil-service-card {
    padding: 25px 20px;
  }

  .accueil-service-title {
    font-size: 18px;
  }

  .accueil-service-icon-box {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
}


/* ---------------------------------------------------------------
   8. ABOUT SECTION
--------------------------------------------------------------- */

@media (max-width: 767px) {

  /* Ensure the left media column doesn't overlap on mobile */
  .about-bx1 .dz-media {
    margin-bottom: 30px;
  }

  /* The decorative SVG blob should not overflow */
  .about-bx1 .dz-media svg {
    display: none;
  }
}


/* ---------------------------------------------------------------
   9. PORTFOLIO / PROJECT CARDS
--------------------------------------------------------------- */

@media (max-width: 575px) {

  /* Reduce card height so images fit without excessive scroll */
  .image-container {
    height: 280px;
  }

  .image-container:hover img {
    transform: translateY(calc(-100% + 280px));
  }

  .project-title {
    font-size: 15px;
    padding: 15px;
  }
}


/* ---------------------------------------------------------------
   10. DIALOG / MODAL — portfolio lightbox
--------------------------------------------------------------- */

@media (max-width: 575px) {

  dialog {
    width: 95%;
    top: 2vh;
  }

  dialog .modal-scroll-container {
    max-height: 96vh;
  }

  /* Smaller close button so it doesn't clip on tiny screens */
  .close-modal {
    top: -10px;
    right: -6px;
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}


/* ---------------------------------------------------------------
   11. TESTIMONIALS / REVIEWS
--------------------------------------------------------------- */

@media (max-width: 575px) {

  /* Swiper nav arrows: ensure they don't overlap text */
  .btn-prev,
  .btn-next {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .testimonial-pagination {
    margin-top: 10px;
  }
}


/* ---------------------------------------------------------------
   12 & 13. 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;           /* very light blue-grey tint */
}

/* === 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 (background depth) --- */
.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: text + social === */
.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;
}

/* Individual brand colours on hover */
.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: WhatsApp button + phone === */
.wa-cta-right {
  position: relative;
  z-index: 1;
  flex: 0 0 300px;        /* fixed width so column never shrinks */
  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 below the button */
.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
--------------------------------------------------------------- */

/* Tablet: reduce padding, shrink gaps */
@media (max-width: 1199px) {
  .wa-cta-card {
    padding: 48px 48px;
    gap: 36px;
  }
  .wa-cta-title {
    font-size: 1.7rem;
  }
}

/* Small tablet: stack left + right vertically, hide divider */
@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%;
  }
}

/* Mobile */
@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;
  }
}


/* ---------------------------------------------------------------
   14. FOOTER
--------------------------------------------------------------- */

@media (max-width: 767px) {

  /* Add bottom spacing between footer columns when stacked */
  .footer-top .col-xl-4,
  .footer-top .col-xl-3,
  .footer-top .col-xl-2 {
    margin-bottom: 28px;
  }

  .footer-title {
    margin-top: 8px;
  }
}

@media (max-width: 575px) {

  /* Force footer link columns to full-width on tiny screens */
  .site-footer .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}


/* ---------------------------------------------------------------
   15. CLIENTS LOGO SLIDER — prevent image distortion
--------------------------------------------------------------- */

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

@media (max-width: 575px) {

  .appscreen-slider .swiper-slide img {
    max-width: 100px;
  }
}


/* ---------------------------------------------------------------
   16. CASABLANCA FEATURES SECTION
   services.css already has 2-col → 1-col breakpoints.
   These trim excess whitespace on mobile.
--------------------------------------------------------------- */

@media (max-width: 767px) {

  .casablanca-section {
    padding: 50px 0;
  }

  .casablanca-title {
    font-size: clamp(1.4rem, 6vw, 1.9rem);
  }

  .casablanca-subtitle {
    font-size: 14px;
  }
}

/* ---------------------------------------------------------------
   17. LANGUAGE SWITCHER — Clean FR | EN Segmented Control
   Globe icon suppressed via CSS — fixes all 178+ HTML 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;
}

/* ── FR / EN items ───────────────────────────────────────────── */
.lang-switcher .lang-item,
.lang-switcher-mobile .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 FR and EN */
.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 {
  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: #007BFF !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;
}


/* ---------------------------------------------------------------
   18. NAVBAR — All items on one line (Accueil → Contact)
--------------------------------------------------------------- */

/* ── Never let the nav row wrap 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 (FR|EN + Devis Gratuit) 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 (6 items + extra-nav) ─────── */
@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;
  }
}


/* ---------------------------------------------------------------
   19. WHATSAPP FLOATING ICON — Fixed bottom-right corner
--------------------------------------------------------------- */

.whatsapp-icon {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  z-index: 99;
  animation: whatsapp-float 3s ease-in-out infinite;
}

.whatsapp-icon:hover {
  background: #1ebe57;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  text-decoration: none;
}

.whatsapp-icon:active {
  transform: scale(0.95);
}

/* Floating animation */
@keyframes whatsapp-float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Mobile responsiveness */
@media (max-width: 575px) {
  .whatsapp-icon {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
    font-size: 28px;
  }
}

/* Tablet responsiveness */
@media (max-width: 991px) and (min-width: 576px) {
  .whatsapp-icon {
    width: 55px;
    height: 55px;
    bottom: 25px;
    right: 25px;
    font-size: 30px;
  }
}
