/* ---------- Variables ---------- */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --light-gray: #e9ecef;
  --success-color: #4bb543;
  --danger-color: #ff3333;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* ---------- Reset & Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background: #fff;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.primary-btn {
  background: var(--primary-color);
  color: #fff;
}
.primary-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
}
.secondary-btn {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}
.secondary-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
}

/* ---------- Sections ---------- */
.section-padding {
  padding: 80px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}
.section-header h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}
.section-header p {
  color: var(--gray-color);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ---------- Header / Nav ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}
.header.scrolled {
  padding: 10px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}
.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span {
  color: var(--primary-color);
}
.nav-menu {
  display: flex;
  align-items: center;
}
.nav-link {
  margin-left: 30px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-link:hover {
  color: var(--primary-color);
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link.active {
  color: var(--primary-color);
}
.menu-toggle {
  display: none;
  cursor: pointer;
  z-index: 1001;
}
.menu-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background: var(--dark-color);
  transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  padding: 180px 0 100px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hero-content {
  flex: 1;
  max-width: 600px;
}
.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero .subtitle {
  font-size: 1.2rem;
  color: var(--gray-color);
  margin-bottom: 30px;
}
.hero-buttons {
  display: inline-flex;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-image {
  flex: 1;
  text-align: right;
}
.hero-image img {
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}
.service-card {
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgba(67, 97, 238, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-icon i {
  font-size: 2rem;
  color: var(--primary-color);
}
.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}
.service-card p {
  color: var(--gray-color);
  margin-bottom: 20px;
}
.read-more {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  font-weight: 500;
  transition: var(--transition);
}
.read-more i {
  margin-left: 5px;
  transition: var(--transition);
}
.read-more:hover {
  color: var(--secondary-color);
}
.read-more:hover i {
  transform: translateX(5px);
}

/* ---------- Testimonials ---------- */
.testimonials-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
.testimonial-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  z-index: 5;
}
.testimonial-nav:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}
.testimonials-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 30px;
  padding: 20px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
  width: 100%;
  scroll-behavior: smooth;
}
.testimonials-slider::-webkit-scrollbar {
  display: none;
}
.testimonials-slider:active {
  cursor: grabbing;
}
.testimonial-card {
  min-width: 350px;
  max-width: 400px;
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  scroll-snap-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  flex-shrink: 0;
}
.rating {
  color: #ffc107;
  margin-bottom: 20px;
}
.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
}
.testimonial-text::before,
.testimonial-text::after {
  content: '"';
  font-size: 2rem;
  color: var(--light-gray);
  position: absolute;
}
.testimonial-text::before {
  top: -15px;
  left: -10px;
}
.testimonial-text::after {
  bottom: -25px;
  right: -10px;
}
.client-info {
  display: flex;
  align-items: center;
}
.client-info img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
}
.client-info h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}
.client-info span {
  color: var(--gray-color);
  font-size: 0.9rem;
}

/* ---------- Contact ---------- */
.contact-container {
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
}
.contact-info,
.contact-form {
  flex: 1;
  min-width: 300px;
}
.contact-form {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}
.contact-item {
  display: flex;
  margin-bottom: 30px;
}
.contact-icon {
  width: 60px;
  height: 60px;
  background: rgba(67, 97, 238, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  flex-shrink: 0;
}
.contact-icon i {
  font-size: 1.5rem;
  color: var(--primary-color);
}
.contact-details h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}
.social-links {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}
.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(67, 97, 238, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.social-links a:hover {
  background: var(--primary-color);
  color: #fff;
}
.form-group {
  margin-bottom: 20px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--light-gray);
  border-radius: 5px;
  font-family: inherit;
  transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}
.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* ---------- Alerts (form feedback) ---------- */
.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-weight: 500;
}
.alert--success {
  background: var(--success-color);
  color: #fff;
}
.alert--error {
  background: var(--danger-color);
  color: #fff;
}
.alert .close-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: inherit;
  cursor: pointer;
}
.hidden {
  display: none;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--dark-color);
  color: #fff;
  padding: 80px 0 0;
}
.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  margin-bottom: 50px;
}
.footer-col {
  flex: 1;
  min-width: 200px;
}
.footer-col h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary-color);
}
.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}
.footer-col ul li a:hover {
  color: #fff;
  padding-left: 5px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.arabic-text {
  direction: rtl;
}

/* ---------- WhatsApp button ---------- */
.whatsapp-btn {
  border: 2px solid #25d366;
  color: #000;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  border-radius: 8px;
}
.whatsapp-btn:hover {
  background: #25d366;
  color: #fff;
}
.whatsapp-btn i {
  transition: color 0.3s ease;
}
.whatsapp-btn:hover i {
  color: #fff;
}

/* ---------- Overlay (mobile menu) ---------- */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---------- Enhanced hamburger ---------- */
.menu-toggle {
  width: 35px;
  height: 30px;
  position: relative;
  padding: 5px;
  background: transparent;
  border: none;
}
.menu-toggle .bar {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--primary-color);
}

/* ---------- Media Queries ---------- */
@media (max-width: 992px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    margin-bottom: 50px;
  }
  .contact-container {
    flex-direction: column;
  }
  .section-header h2 {
    font-size: 2.2rem;
  }
}
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 50px 0;
    overflow-y: auto;
  }
  .nav-menu.active {
    right: 0;
  }
  .nav-link {
    display: block;
    margin: 15px 0;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
  }
  .nav-link:hover {
    background: rgba(67, 97, 238, 0.08);
    transform: translateY(-3px);
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .section-padding {
    padding: 60px 0;
  }
  .hero-image {
    order: 1;
    margin-bottom: 20px;
    text-align: center;
  }
  .hero-buttons {
    order: 2;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
  }
}
@media (min-width: 576px) and (max-width: 768px) {
  .nav-menu {
    width: 60%;
  }
}
@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }
  .btn {
    padding: 10px 20px;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .testimonial-card {
    min-width: 280px;
  }
}

/* Couleur de fond bleue pour la section CTA */
.cta.bg-primary {
  background: linear-gradient(
    135deg,
    #4361ee 0%,
    #3f37c9 100%
  ); /* dégradé bleu – optionnel */
  /* Ou simplement : background-color: var(--primary-color); */
  color: #ffffff;
}

/* Pour toutes les cartes sans photo */
.testimonial-card .client-info {
  display: block; /* empile les blocs l’un sous l’autre */
  margin-top: 10px; /* petit espace au-dessus si besoin */
}

.testimonial-card .client-info h4 {
  margin: 0 0 4px; /* titre puis rôle juste en dessous */
}
