* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-dark: #1e466e;
  --primary: #2c628c;
  --secondary: #6ba5b0;
  --accent: #e9b35f;
  --light-bg: #f8fafc;
  --white: #ffffff;
  --gray-light: #eef2f6;
  --text-dark: #1a2c3e;
  --text-muted: #4a627a;
  --shadow-soft: 0 20px 30px -12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 25px 35px -12px rgba(0, 0, 0, 0.1);
  --border-radius-card: 28px;
  --border-radius-btn: 60px;
  --transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light-bg);
  color: var(--text-dark);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body.dark {
  --light-bg: #0f172a;
  --white: #1e293b;
  --gray-light: #334155;
  --text-dark: #f1f5f9;
  --text-muted: #cbd5e1;
  background-color: var(--light-bg);
}

/* Fond animé */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(125deg, #e8f0f8 0%, #ffffff 40%, #e8f0f8 100%);
  background-size: 200% 200%;
  animation: moveGradient 15s ease infinite;
}

@keyframes moveGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body.dark .animated-bg {
  background: linear-gradient(125deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
}

/* Canvas particules */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
}
body.dark #particles-canvas {
  opacity: 0.2;
}

/* RTL pour arabe */
body.rtl {
  direction: rtl;
  font-family: 'Cairo', sans-serif;
}
body.rtl .navbar,
body.rtl .hero-grid,
body.rtl .engagement-inner,
body.rtl .services-grid,
body.rtl .info-grid {
  direction: rtl;
}
body.rtl .nav-links {
  gap: 1.5rem;
}
body.rtl .hero-content h1 span::after {
  bottom: 4px;
  right: 0;
  left: auto;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}
body.dark header {
  background: rgba(15, 23, 42, 0.75);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  flex-wrap: wrap;
}

.logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  transition: transform 0.2s;
}
.logo h1:hover {
  transform: scale(1.02);
}
.logo p {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: -4px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text-dark);
  transition: 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}

.lang-selector {
  display: flex;
  gap: 8px;
  margin-right: 12px;
}
.lang-btn {
  background: transparent;
  border: 1px solid var(--gray-light);
  border-radius: 30px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
  color: var(--text-dark);
}
.lang-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.theme-toggle {
  background: var(--gray-light);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.2s;
}
.theme-toggle:hover {
  transform: scale(1.05);
}
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border-radius: var(--border-radius-btn);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Hero */
.hero {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.hero-shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(44, 98, 140, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(60px);
  z-index: 0;
  animation: floatShape 12s infinite alternate ease-in-out;
}
.hero-shape-1 {
  width: 400px;
  height: 400px;
  top: -150px;
  left: -150px;
}
.hero-shape-2 {
  width: 500px;
  height: 500px;
  bottom: -200px;
  right: -100px;
  animation-delay: -5s;
}
.hero-shape-3 {
  width: 250px;
  height: 250px;
  top: 40%;
  left: 70%;
  animation-duration: 15s;
}
@keyframes floatShape {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -30px) scale(1.1); }
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 50px;
}
.hero-content {
  flex: 1.2;
}
.hero-badge {
  background: rgba(44, 98, 140, 0.12);
  backdrop-filter: blur(4px);
  display: inline-block;
  padding: 6px 16px;
  border-radius: 60px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  border: 1px solid rgba(44, 98, 140, 0.2);
  transition: transform 0.2s;
}
.hero-badge:hover {
  transform: scale(1.02);
}
.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--primary-dark);
  line-height: 1.2;
}
.hero-content h1 span {
  color: var(--primary);
  position: relative;
  display: inline-block;
}
.hero-content h1 span::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(44, 98, 140, 0.15);
  border-radius: 4px;
  z-index: -1;
}
.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 500px;
}
.hero-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}
.stat .speciality {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(44, 98, 140, 0.08);
  padding: 6px 14px;
  border-radius: 60px;
  display: inline-block;
}
.hero-visual {
  flex: 0.9;
  text-align: center;
  perspective: 800px;
}
.hero-visual i {
  font-size: 10rem;
  color: var(--primary);
  filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.1));
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  animation: floatIcon 4s infinite alternate ease-in-out;
}
@keyframes floatIcon {
  0% { transform: translateY(0) rotateY(0deg); }
  100% { transform: translateY(-15px) rotateY(8deg); }
}
.hero-visual:hover i {
  transform: scale(1.02) rotate(2deg);
}

/* Sections */
.section {
  padding: 80px 0;
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--primary-dark);
}
.section-sub {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
  color: var(--text-muted);
}

/* Services & Info grids */
.services-grid, .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 20px;
}
.service-card, .info-card {
  background: var(--white);
  border-radius: var(--border-radius-card);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  border: 1px solid var(--gray-light);
}
.service-card:hover, .info-card:hover {
  transform: translateY(-6px);
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
}
.service-icon, .info-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

/* Engagement */
.engagement {
  background: var(--white);
  border-radius: var(--border-radius-card);
  margin: 20px 0;
}
.engagement-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 50px;
  padding: 40px;
}
.engagement-text {
  flex: 1;
}
.engagement-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-dark);
}
.engagement-icon {
  flex: 1;
  text-align: center;
  font-size: 7rem;
  color: var(--primary);
}

/* Témoignages */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.testimonial-card {
  background: var(--white);
  border-radius: var(--border-radius-card);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}
.testimonial-card:hover {
  transform: scale(1.02);
}
.testimonial-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}
.rating {
  color: var(--accent);
  margin: 12px 0 8px;
}

/* Carte */
.map-container {
  border-radius: var(--border-radius-card);
  overflow: hidden;
  height: 400px;
  box-shadow: var(--shadow-soft);
}

/* Formulaire RDV */
.rdv-form {
  background: var(--white);
  border-radius: var(--border-radius-card);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}
.form-group {
  margin-bottom: 20px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 18px;
  border-radius: 60px;
  border: 1px solid var(--gray-light);
  background: var(--white);
  font-family: inherit;
  transition: 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Footer */
footer {
  background: var(--primary-dark);
  color: white;
  padding: 40px 0 20px;
  border-radius: 40px 40px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}
.social-links a {
  color: white;
  margin-right: 15px;
  font-size: 1.2rem;
  transition: 0.2s;
}
.social-links a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--white);
    padding: 20px;
    border-radius: 24px;
    margin-top: 16px;
  }
  .nav-links.active {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .hero-grid {
    flex-direction: column;
    text-align: center;
  }
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-stats {
    justify-content: center;
  }
  .section {
    padding: 50px 0;
  }
  .engagement-inner {
    padding: 24px;
  }
}

/* Animations scroll */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}