:root {
  --primary: #2f3192;
  --primary-light: #484cc4;
  --primary-dark: #141745;
  --accent: #00c2ff;
  --background: #f8f9ff;
  --surface: #ffffff;
  --surface-strong: #f3f4ff;
  --text: #111827;
  --muted: #565c7a;
  --border: rgba(15, 23, 42, 0.08);
  --footer-bg: #0c1222;
  --footer-text: #b8bfd4;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
  --background: #050914;
  --surface: #0d1230;
  --surface-strong: #11183f;
  --text: #f3f5ff;
  --muted: #a7b0d0;
  --border: rgba(255, 255, 255, 0.08);
  --footer-bg: #04070f;
  --footer-text: #8e95b7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   HEADER & NAVIGATION LOGIQUE
   ========================================================================== */
header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

body.dark header {
  background: rgba(13, 18, 48, 0.8);
}

.navbar {
  max-width: 1400px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  height: 40px;
  width: auto;
}

nav {
  display: block;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 999px;
  transition: var(--transition);
  opacity: 0.85;
}

nav a:hover {
  opacity: 1;
  background: rgba(47, 49, 146, 0.08);
  color: var(--primary);
}

body.dark nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

nav a.active {
  opacity: 1;
  background: var(--primary);
  color: #ffffff;
}

body.dark nav a.active {
  background: var(--accent);
  color: #050914;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle, .hamburger, .sidebar-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle:hover, .hamburger:hover, .sidebar-close:hover {
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.theme-toggle svg, .hamburger svg, .sidebar-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.hamburger {
  display: none;
}

/* ==========================================================================
   SIDEBAR (MOBILE)
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  right: -360px;
  width: min(360px, 100vw);
  height: 100vh;
  background: var(--surface);
  box-shadow: -12px 0 50px rgba(15, 23, 42, 0.15);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1200;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.sidebar a {
  display: block;
  padding: 12px 18px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar a:hover {
  background: var(--surface-strong);
  padding-left: 24px;
  color: var(--primary);
}

body.dark .sidebar a:hover {
  color: var(--accent);
}

.sidebar a.active {
  background: var(--primary);
  color: #ffffff;
}

body.dark .sidebar a.active {
  background: var(--accent);
  color: #050914;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 20, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 1100;
}

.menu-open {
  overflow: hidden;
}

.menu-open .sidebar {
  right: 0;
}

.menu-open .overlay {
  opacity: 1;
  pointer-events: all;
}

/* ==========================================================================
   RESTE DU CONTENU & SECTIONS
   ========================================================================== */
.site-wrapper {
  padding-top: 80px;
}

.hero-section {
  padding: 100px 24px 64px;
  background: radial-gradient(circle at top right, rgba(0, 194, 255, 0.12), transparent 30%),
              radial-gradient(circle at left center, rgba(47, 49, 146, 0.08), transparent 30%);
}

.hero-container {
  max-width: 1240px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 4vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 22px;
}

.hero-copy p {
  max-width: 700px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 15px 28px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.btn-secondary {
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(47, 49, 146, 0.18);
}

.hero-visual {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.hero-visual img {
  height: 520px;
  width: 100%;
  object-fit: cover;
}

.trust-banner {
  margin: 0 24px 0;
  border-radius: 24px;
  padding: 48px 28px;
  background: var(--surface);
  max-width: 1240px;
  margin-inline: auto;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.trust-banner h2 {
  font-size: clamp(2.1rem, 2.4vw, 3rem);
  margin: 0;
}

.section-padding {
  max-width: 1240px;
  margin: auto;
  padding: 80px 24px;
}

.section-header {
  max-width: 680px;
  margin: auto;
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(2.4rem, 3vw, 3.4rem);
  margin-bottom: 18px;
}

.section-header p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

.services-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card, .badge-card, .bento-item {
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 30px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.05);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 49, 146, 0.2);
}

.service-card h3 {
  margin-bottom: 16px;
  font-size: 1.35rem;
}

.service-card p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.99rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 18px;
}
body.dark .badge { color: var(--accent); }

.legal-section, .engagement-card {
  border-radius: 28px;
  background: var(--surface);
  padding: 56px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 1240px;
  margin: auto;
}

.legal-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 30px;
  align-items: center;
}

.legal-info h3, .engagement-card h3 {
  font-size: 2.1rem;
  margin-bottom: 20px;
}

.legal-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.badge-card {
  background: var(--surface-strong);
  padding: 22px;
  border-radius: 20px;
}

.badge-card span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  color: var(--primary);
  font-weight: 700;
}
body.dark .badge-card span { color: var(--accent); }

.badge-card p {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 260px;
  gap: 22px;
}

.bento-item {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  min-height: 220px;
  padding: 0;
}

.bento-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.1));
}

.bento-content {
  position: relative;
  z-index: 2;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  color: #fff;
}

.bento-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 14px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bento-title {
  font-size: 1.35rem;
  line-height: 1.25;
  margin-bottom: 12px;
  font-weight: 800;
}

.bento-desc {
  max-width: 320px;
  font-size: 0.95rem;
  line-height: 1.75;
  opacity: 0.9;
}

.bento-item.featured {
  grid-column: span 2;
  grid-row: span 2;
}

.engagement-card {
  text-align: center;
}

.engagement-card p {
  color: var(--muted);
  max-width: 860px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 80px 24px 36px;
  margin-top: 60px;
}

.footer-grid {
  max-width: 1240px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-brand p {
  margin-top: 16px;
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 14px;
}

.footer-col a {
  color: var(--footer-text);
  text-decoration: none;
  transition: var(--transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1240px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: #8c92b8;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE EFFECTIF)
   ========================================================================== */
@media (max-width: 1200px) {
  nav {
    display: none;
  }

  .hamburger {
    display: inline-flex;
  }
}

@media (max-width: 1100px) {
  .services-grid, .bento-grid, .legal-cards {
    grid-template-columns: 1fr 1fr;
  }

  .bento-item.featured {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .hero-container {
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    height: 400px;
  }

  .services-grid, .legal-grid, .footer-grid {
    grid-template-columns: 1fr;
  }

  .trust-banner, .legal-section, .engagement-card, .footer-bottom {
    text-align: center;
  }

  .legal-section {
    padding: 32px 24px;
  }

  .trust-banner {
    padding: 36px 20px;
  }
}

@media (max-width: 560px) {
  .bento-grid, .legal-cards, .services-grid {
    grid-template-columns: 1fr;
  }
  .bento-item.featured {
    grid-column: span 1;
    grid-row: span 1;
  }
  .bento-grid {
    grid-auto-rows: auto;
  }
  .navbar {
    padding: 14px 16px;
  }

  .hero-section {
    padding: 60px 16px 40px;
  }

  .hero-copy h1 {
    font-size: 2.2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
