:root {
  --bg: #eef8fc;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --ink: #102131;
  --ink-soft: #385166;
  --ink-muted: #71879b;
  --line: rgba(16, 48, 74, 0.12);
  --line-strong: rgba(16, 48, 74, 0.2);
  --accent: #37a7d8;
  --highlight: #2cc28b;
  --shadow: 0 30px 70px rgba(8, 30, 49, 0.12);
  --shadow-soft: 0 20px 44px rgba(13, 45, 68, 0.1);
  --wrap: min(1220px, calc(100% - 32px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0) 24%),
    linear-gradient(180deg, #fbfeff 0%, #eef8fc 46%, #e7f4f8 100%);
  font: 500 16px/1.7 "Space Grotesk", "Inter", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(55, 167, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 167, 216, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.06) 65%, transparent);
}

body.nav-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.scene-glow,
.orb,
.grid-fade {
  display: none !important;
}

.topbar,
.navbar,
.legal-section,
.footer {
  position: relative;
  z-index: 1;
}

.topbar,
.navbar {
  width: var(--wrap);
  margin: 18px auto 0;
}

.topbar,
.nav-container {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(55, 167, 216, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 54px rgba(15, 55, 84, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar--scrolled,
.navbar.nav-open .nav-container {
  box-shadow: 0 20px 42px rgba(15, 55, 84, 0.12);
}

.brand,
.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand img,
.logo img,
.footer-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
}

.brand span,
.footer-logo strong {
  font-size: 1rem;
}

.menu,
.nav-menu,
.nav-links,
.topbar-actions,
.nav-auth,
.lang-switch,
.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu,
.nav-menu {
  justify-content: center;
  min-width: 0;
}

.nav-links {
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.menu a,
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 700;
}

.menu a:hover,
.nav-links a:hover {
  color: var(--ink);
  background: rgba(55, 167, 216, 0.08);
}

.lang-switch {
  flex-wrap: wrap;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(55, 167, 216, 0.16);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.7);
}

.lang-link img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
}

.lang-link::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  flex: 0 0 auto;
}

.lang-link[data-flag-img]::before {
  display: none;
}

.lang-link[lang="fr"]::before {
  background-image: url("/images/ui/flag-fr.svg");
}

.lang-link[lang="en"]::before {
  background-image: url("/images/ui/flag-en.svg");
}

.lang-link.is-active,
.lang-link:hover {
  color: var(--ink);
  border-color: rgba(55, 167, 216, 0.24);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(229, 247, 252, 0.96));
}

.mon-compte-btn,
.service-cta a,
.cta-row a,
.compare-cta a,
.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid rgba(55, 167, 216, 0.18);
  border-radius: 18px;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(229, 247, 252, 0.94));
  box-shadow: 0 18px 36px rgba(18, 105, 130, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.mon-compte-btn:hover,
.service-cta a:hover,
.cta-row a:hover,
.compare-cta a:hover,
.back:hover {
  transform: translateY(-2px);
  border-color: rgba(55, 167, 216, 0.24);
  box-shadow: 0 22px 44px rgba(18, 105, 130, 0.14);
}

.service-cta a:first-child,
.cta-row a:first-child,
.compare-cta a:first-child {
  color: #fff;
  border-color: rgba(17, 136, 177, 0.92);
  background: linear-gradient(135deg, #1499d3 0%, #1eb7cb 42%, #31cc96 100%);
  box-shadow: 0 24px 50px rgba(20, 153, 211, 0.24);
}

.menu-toggle,
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(55, 167, 216, 0.16);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.topbar-progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 10px;
  height: 2px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(55, 167, 216, 0.08);
}

.topbar-progress span {
  display: block;
  width: calc(var(--scroll-progress, 0) * 100%);
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
}

.legal-section {
  padding: 44px 0 92px;
}

.legal-container {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px clamp(20px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.page-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.page-breadcrumb a:hover,
.legal-content a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.section-title {
  margin: 0;
  font-family: "Syne", "Unbounded", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  letter-spacing: -0.05em;
  line-height: 0.92;
  text-wrap: balance;
}

.legal-content {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.legal-content > p:first-of-type,
.compare-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.8;
}

.legal-content p,
.legal-content li,
.legal-content td,
.legal-content th {
  color: var(--ink-soft);
}

.legal-content h2,
.legal-content h3 {
  margin: 18px 0 0;
  color: var(--ink);
  font-family: "Syne", "Unbounded", sans-serif;
  letter-spacing: -0.03em;
}

.legal-content h2 {
  font-size: 1.45rem;
}

.legal-content h3 {
  font-size: 1.15rem;
}

.legal-content ul,
.legal-content ol {
  margin: 0;
  padding-left: 1.25rem;
}

.legal-content li + li {
  margin-top: 8px;
}

.legal-content strong {
  color: var(--ink);
}

.legal-content a {
  color: var(--accent);
}

.service-kpis,
.service-cta,
.cta-row,
.compare-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.service-kpis {
  margin: 8px 0 2px;
}

.service-kpis span,
.compare-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(55, 167, 216, 0.1);
}

.service-faq {
  display: grid;
  gap: 12px;
}

.service-faq p {
  margin: 0;
  padding: 18px 18px 16px;
  border: 1px solid rgba(55, 167, 216, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
}

.service-lang-note,
.service-note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.service-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.service-link-grid a {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 18px;
  border: 1px solid rgba(55, 167, 216, 0.14);
  border-radius: 22px;
  color: var(--ink);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.service-link-grid a:hover {
  border-color: rgba(55, 167, 216, 0.24);
  transform: translateY(-2px);
}

.table-scroll,
.cookies-table-wrapper {
  overflow: auto;
  margin-top: 18px;
  padding-bottom: 6px;
}

.compare-table,
.cookies-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(55, 167, 216, 0.16);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.compare-table caption {
  padding: 0 0 12px;
  color: var(--ink-muted);
  caption-side: top;
  text-align: left;
  font-size: 0.9rem;
}

.compare-table thead th,
.cookies-table thead th {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(231, 248, 255, 0.98), rgba(225, 252, 243, 0.94));
}

.compare-table th,
.compare-table td,
.cookies-table th,
.cookies-table td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(16, 48, 74, 0.08);
}

.compare-table tbody tr:last-child td,
.compare-table tbody tr:last-child th,
.cookies-table tbody tr:last-child td,
.cookies-table tbody tr:last-child th {
  border-bottom: 0;
}

.footer {
  margin-top: 56px;
  padding: 34px 0 24px;
  border-top: 1px solid rgba(16, 48, 74, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(231, 245, 249, 0.92));
}

.footer-container,
.footer-bottom {
  width: var(--wrap);
  margin: 0 auto;
}

.footer-container {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.7fr));
  gap: 28px;
}

.footer-desc,
.footer-bottom p,
.footer-links a,
.footer-links li {
  color: var(--ink-soft);
}

.footer-links h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: "Syne", "Unbounded", sans-serif;
  font-size: 1rem;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(16, 48, 74, 0.08);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(55, 167, 216, 0.16);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.social-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(55, 167, 216, 0.24);
}

.wrap {
  width: min(920px, calc(100% - 32px));
  margin: 48px auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

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

  .service-link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar,
  .nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .menu-toggle,
  .nav-toggle {
    display: inline-flex;
  }

  .menu,
  .topbar-actions,
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 14px;
  }

  .topbar.menu-open .menu,
  .topbar.menu-open .topbar-actions,
  .navbar.nav-open .nav-menu {
    display: flex;
  }

  .nav-links,
  .topbar .menu {
    flex-direction: column;
    align-items: stretch;
  }

  .menu a,
  .nav-links a,
  .mon-compte-btn {
    justify-content: space-between;
    width: 100%;
  }

  .topbar-actions .nav-auth,
  .nav-menu .nav-auth {
    width: 100%;
  }

  .topbar-actions .lang-switch {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .topbar,
  .navbar {
    width: min(calc(100% - 20px), 100%);
    margin-top: 10px;
  }

  .topbar,
  .nav-container {
    padding: 12px;
  }

  .brand span,
  .footer-logo strong {
    font-size: 0.9rem;
  }

  .legal-section {
    padding: 28px 0 72px;
  }

  .legal-container,
  .wrap {
    width: min(calc(100% - 20px), 100%);
    padding: 22px 16px;
    border-radius: 26px;
  }

  .section-title {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
  }

  .service-cta,
  .cta-row,
  .compare-cta,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .service-cta a,
  .cta-row a,
  .compare-cta a,
  .mon-compte-btn,
  .back {
    width: 100%;
  }

  .compare-table,
  .cookies-table {
    min-width: 620px;
  }
}
