/* ==========================================================================
   VARIABLES & BASE
   ========================================================================== */
:root {
  --brand-blue: #0b4aa2;
  --brand-blue-2: #083a7e;
  --brand-orange: #f28c1b;
  --brand-yellow: #ffd24a;
  --ink: #0b1220;
  --muted: #5b667a;
  --card: #ffffff;
  --bg: #f6f8fc;
  --border: rgba(13, 27, 60, .10);
  --shadow: 0 18px 50px rgba(10, 30, 70, .15);
  --radius: 18px;
  --topbar-height: 48px;
  --whatsapp: #25D366; /* AJOUT : Variable couleur WhatsApp */
}

/* FIX MOBILE OVERFLOW */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #f6f8fc;
  padding-top: calc(var(--topbar-height) + 75px);
}

/* Arabic font override */
html[dir="rtl"] body {
  font-family: Cairo, Inter, system-ui, sans-serif;
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
  background: rgba(11, 18, 32, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  height: var(--topbar-height);
  z-index: 1060;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  width: 100%;
}

.topbar-link {
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-size: .9rem;
}

.topbar-link i {
  color: var(--brand-yellow);
  margin-inline-end: .4rem;
}

.topbar-social {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
}

.topbar-social:hover {
  background: rgba(242, 140, 27, .18);
  border-color: rgba(242, 140, 27, .35);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  transition: all .25s ease;
  padding-block: .9rem;
  z-index: 1050;
  background: rgba(11, 18, 32, 0.9);
  width: 100%;
}

.navbar.fixed-top {
  top: var(--topbar-height);
}

.navbar.scrolled {
  background: rgba(11, 18, 32, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  padding-block: .6rem;
}

.brand-logo {
  height: 44px;
  width: auto;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .20);
}

.brand-text {
  line-height: 1.05;
}

.brand-name {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .3px;
  color: #fff;
}

.brand-tag {
  font-size: .78rem;
  color: rgba(255, 255, 255, .70);
}

.nav-link {
  color: rgba(255, 255, 255, .85) !important;
  font-weight: 600;
}

.nav-link:hover {
  color: #fff !important;
}

.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px;
    z-index: 1100;
}

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */
.lang-switch {
  display: flex;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
  text-decoration: none;
}

.lang-btn .flag { font-size: 1rem; }

.lang-btn.active {
  background: linear-gradient(135deg, rgba(242, 140, 27, .95), rgba(255, 210, 74, .95));
  color: #121212;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-cta-primary {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-yellow));
  border: 0;
  color: #141414;
  font-weight: 800;
  box-shadow: 0 14px 38px rgba(242, 140, 27, .25);
  transition: all 0.3s ease;
}

.btn-cta-primary:hover {
  filter: brightness(.98);
  transform: translateY(-1px);
}

.btn-cta-outline {
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  background: rgba(255, 255, 255, .06);
  font-weight: 800;
}

/* AJOUT : Style bouton WhatsApp */
.btn-whatsapp {
  background-color: var(--whatsapp);
  color: #fff;
  border: none;
  font-weight: 800;
}
.btn-whatsapp:hover {
  background-color: #1ebd59;
  color: #fff;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 40px;
  overflow: hidden; 
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1508514177221-188b1cf16e9d?auto=format&fit=crop&w=2200&q=80');
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(1100px 500px at 20% 25%, rgba(11, 74, 162, .55), transparent 60%),
    linear-gradient(90deg, rgba(11, 18, 32, .92), rgba(11, 18, 32, .55) 55%, rgba(11, 18, 32, .35));
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .14);
}

.hero-badge i { color: var(--brand-yellow); }

.text-white-75 { color: rgba(255, 255, 255, .78) !important; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-item {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  font-weight: 700;
}

.trust-item i { color: var(--brand-yellow); }

.hero-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .30);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero-card .kicker {
  font-weight: 800;
  color: var(--brand-blue);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.hero-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(11, 74, 162, .08);
  color: var(--brand-blue);
  font-weight: 800;
  font-size: .85rem;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

/* ==========================================================================
   SECTIONS GENERAL
   ========================================================================== */
.section { 
  padding: 86px 0; 
  background: var(--bg); 
  overflow: hidden; 
}
.section-alt { background: #ffffff; }
.section-head { margin-bottom: 30px; }
.eyebrow { font-weight: 900; font-size: .85rem; letter-spacing: .08em; color: var(--brand-blue); text-transform: uppercase; }
.section-title { font-weight: 900; color: #0b1220; }
.section-subtitle { color: var(--muted); max-width: 56ch; }

/* ==========================================================================
   FULL QUOTE FORM (NEW)
   ========================================================================== */
.quote-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0;
    overflow: hidden;
}

.quote-header {
    background: var(--brand-blue);
    padding: 25px;
    color: #fff;
}

.quote-body {
    padding: 30px;
}

.quote-section-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--brand-blue);
    border-bottom: 2px solid var(--brand-yellow);
    display: inline-block;
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.form-group-wrap {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(0,0,0,0.03);
}

.form-check-input:checked {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.input-file-wrapper {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.input-file-wrapper:hover {
    border-color: var(--brand-orange);
    background: rgba(242, 140, 27, 0.05);
}

/* ==========================================================================
   FEATURES / WHY US
   ========================================================================== */
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 14px 32px rgba(10, 30, 70, .06);
  height: 100%;
}

.feature-card i { font-size: 1.2rem; color: var(--brand-orange); }
.feature-card h3 { font-size: 1.05rem; margin-top: 10px; font-weight: 900; }
.feature-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.image-stack { position: relative; }
.image-card {
  position: absolute;
  inset: auto 18px 18px auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  max-width: 320px;
  box-shadow: var(--shadow);
  z-index: 5;
}

.icon-bubble {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(242, 140, 27, .15);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 14px 32px rgba(10, 30, 70, .06);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(11, 74, 162, .10), rgba(242, 140, 27, .10));
}

.service-icon i { color: var(--brand-blue); font-size: 1.25rem; }
.service-card h3 { font-weight: 900; font-size: 1.12rem; margin-top: 12px; }

/* ==========================================================================
   PROJECTS GALLERY (SLIDER & EXTENDABLE GRID)
   ========================================================================== */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  cursor: pointer;
  background: #eee;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 74, 162, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #fff;
  font-size: 1.5rem;
  z-index: 2;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Grille extensible des photos */
.full-photos-grid {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 1s ease-in-out, opacity 0.6s ease;
}

.full-photos-grid.show {
  max-height: 4000px;
  opacity: 1;
  margin-top: 2rem;
}

.swiper-projects {
  padding-bottom: 50px !important;
}

.swiper-button-next, .swiper-button-prev {
  width: 44px !important;
  height: 44px !important;
  background: #fff !important;
  border-radius: 50%;
  color: var(--brand-blue) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.swiper-button-next:after, .swiper-button-prev:after {
  font-size: 1rem !important;
  font-weight: 800;
}

.swiper-pagination-bullet-active {
  background: var(--brand-blue) !important;
}

/* ==========================================================================
   NUMBERS
   ========================================================================== */
.numbers-wrap {
  background: linear-gradient(135deg, rgba(11, 74, 162, .10), rgba(242, 140, 27, .08));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: 22px;
  box-shadow: 0 16px 40px rgba(10, 30, 70, .08);
}

.numbers-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; height: 100%; }
.stat-number { font-weight: 1000; font-size: 1.65rem; color: var(--brand-blue); }
.stat-label { color: var(--muted); font-weight: 700; }

/* ==========================================================================
   AREAS
   ========================================================================== */
.areas-card, .map-card { background: #fff; border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); padding: 18px; }
.areas-main { display: flex; gap: 12px; align-items: center; }
.areas-icon { width: 50px; height: 50px; border-radius: 16px; background: rgba(11, 74, 162, .10); display: flex; align-items: center; justify-content: center; }
.areas-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; padding: 8px 10px; border-radius: 999px; background: rgba(242, 140, 27, .10); border: 1px solid rgba(242, 140, 27, .20); color: #7a3f00; font-weight: 800; font-size: .85rem; }

/* AJOUT : Style bouton actif pour la carte */
.pill.active {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
}

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.testimonial-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stars { color: var(--brand-orange); }

/* ==========================================================================
   CTA / CONTACT SECTION (FIXED VISIBILITY)
   ========================================================================== */
.cta { 
  position: relative; 
  background: #0b1220 !important; 
  overflow: visible; 
  z-index: 10;
  color: #fff !important;
}

.cta-overlay { 
  position: absolute; 
  inset: 0; 
  background: radial(900px 480px at 15% 20%, rgba(242, 140, 27, .45), transparent 55%), 
              linear-gradient(90deg, rgba(11, 18, 32, .95), rgba(11, 18, 32, .60) 55%, rgba(11, 18, 32, .45)); 
  z-index: 1;
}

.cta .container {
  position: relative;
  z-index: 20;
}

.cta-form { 
  background: rgba(255, 255, 255, .98) !important; 
  border: 1px solid rgba(255, 255, 255, .28); 
  border-radius: calc(var(--radius) + 6px); 
  padding: 30px; 
  position: relative; 
  z-index: 30; 
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.cta-form .h5, .cta-form label {
  color: #0b1220 !important;
  font-weight: 800;
}

.mini-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
.mini-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: #0b1220; color: #fff; padding: 50px 0; border-top: 1px solid rgba(255, 255, 255, .10); }
.footer-logo { height: 42px; width: auto; border-radius: 10px; background: #fff; padding: 6px; }

/* ==========================================================================
   FLOATING BUTTONS (POSITIONNÉS À GAUCHE POUR LAISSER CRISP À DROITE)
   ========================================================================== */
.fab-call, .fab-whatsapp {
  position: fixed;
  left: 16px; /* CHANGÉ : de right à left pour tout le monde */
  z-index: 2000;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
}

.fab-call {
  bottom: 16px;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-yellow));
  color: #101010;
}

.fab-whatsapp {
  bottom: 82px; 
  background-color: var(--whatsapp);
  color: #fff;
}

.fab-call:hover, .fab-whatsapp:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   FORMS (Amélioré pour visibilité)
   ========================================================================== */
.form-control, .form-select { 
  border-radius: 14px; 
  border: 1px solid rgba(13, 27, 60, .14); 
  padding: .72rem .85rem; 
  background-color: #fff !important;
  color: #000 !important;
}
.form-control:focus, .form-select:focus { border-color: rgba(11, 74, 162, .55); box-shadow: 0 0 0 .25rem rgba(11, 74, 162, .12); }

/* ==========================================================================
   RTL HELPERS
   ========================================================================== */
html[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }

/* ==========================================================================
   MOBILE & RESPONSIVE FIXES
   ========================================================================== */
@media (max-width: 991.98px) {
  body { padding-top: 0; }

  .topbar {
    position: relative !important;
    height: auto !important;
    padding-block: 10px;
    z-index: 1010;
    width: 100%;
  }

  .navbar {
    position: sticky !important;
    top: 0 !important;
    background: #0b1220 !important;
    z-index: 1050;
    width: 100%;
  }

  .navbar-collapse {
    background: #0b1220;
    padding: 20px;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
  }

  .hero { min-height: auto; padding-bottom: 36px; padding-top: 20px; }
  .image-card { position: static; margin-top: 20px; max-width: none; }
  
  .row {
    margin-right: 0;
    margin-left: 0;
  }
  .row > * {
    padding-right: 12px;
    padding-left: 12px;
  }

  html[dir="rtl"] .navbar-toggler {
    margin-right: auto !important;
    margin-left: 0 !important;
  }
  html[dir="rtl"] .navbar-brand {
    margin-left: auto !important;
    margin-right: 0 !important;
  }
}

/* Ajustements petits écrans */
@media (max-width: 576px) {
  .display-5 { font-size: 1.6rem; }
  .btn-lg { width: 100%; margin-bottom: 10px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-badge { font-size: 0.8rem; }
  .section { padding: 50px 0; }
  .quote-body { padding: 15px; }
  .form-group-wrap { padding: 12px; }
}

/* ANTI-AOS OVERFLOW */
@media (max-width: 480px) {
    [data-aos] {
        transform: none !important;
        opacity: 1 !important;
        transition-duration: 0s !important;
    }
}

/* ==========================================================================
   EVENTS SECTION SPECIFIC
   ========================================================================== */
#events .gallery-item {
    border: 4px solid #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* ==========================================================================
   VISITOR COUNTER
   ========================================================================== */
#visitorCounter {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}
#visitorCounter i {
    color: var(--brand-yellow);
}

/* ==========================================================================
   SIMULATEUR ECONOMIQUE (NOUVEAU)
   ========================================================================== */
.simulator-card {
    background: #fff;
    border-radius: var(--radius);
    border: 2px solid var(--brand-blue);
    padding: 30px;
    box-shadow: var(--shadow);
}
.result-box {
    background: rgba(11, 74, 162, 0.05);
    border-radius: 14px;
    padding: 20px;
    border-left: 5px solid var(--brand-orange);
}
.result-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--brand-blue);
}

/* ==========================================================================
   PORTFOLIO DETAILLE (NOUVEAU)
   ========================================================================== */
.case-study-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--brand-blue);
    color: #fff;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
}
html[dir="rtl"] .case-study-badge { left: auto; right: 15px; }

.portfolio-filters { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-btn { border: 1px solid var(--border); background: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 700; transition: 0.3s; }
.filter-btn.active { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }