:root {
  --bg: #05070d;
  --bg-soft: #0a101c;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #e8eef7;
  --muted: #9aa8bc;
  --primary: #2ea3f2;
  --cyan: #0ccccc;
  --purple: #7a12e2;
  --green: #18dd11;
  --header: linear-gradient(52deg, #000000 0%, #002b4f 100%);
  --hero: radial-gradient(ellipse at 20% 20%, rgba(46, 163, 242, 0.18), transparent 45%),
          radial-gradient(ellipse at 80% 0%, rgba(122, 18, 226, 0.16), transparent 40%),
          linear-gradient(180deg, #05070d 0%, #0a1220 100%);
  --radius: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  /* system fonts first = texte visible immédiat, Inter en progressive enhancement */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Inter", sans-serif;
  --container: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 92px;
  padding: 0.65rem 0;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  min-width: 0;
}
.brand-logo {
  height: 76px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
}
.brand-text { line-height: 1.15; }
.brand-text { font-size: 1.12rem; }
.brand small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
}

.header-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  order: 3;
}
.brand { order: 1; }
.nav { order: 2; }

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}
.nav-mobile-head { display: none; }
.nav-backdrop { display: none; }
.nav-cta-wrap { display: flex; align-items: center; margin-left: 0.35rem; }
.btn-nav-cta {
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
  white-space: nowrap;
}
.nav > a,
.nav .nav-drop > button {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.nav > a:hover,
.nav .nav-drop > button:hover,
.nav > a.is-active,
.nav .nav-drop.is-active > button {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav-drop { position: relative; }
.nav-chevron {
  display: inline-block;
  font-size: 0.7em;
  opacity: 0.75;
  margin-left: 0.15rem;
  transition: transform .2s ease;
}
.nav-drop.open .nav-chevron,
.nav-drop:hover .nav-chevron { transform: rotate(180deg); }
.nav-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: #06111f;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 0.45rem;
  box-shadow: var(--shadow);
  z-index: 50;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu,
.nav-drop.open .nav-drop-menu { display: grid; gap: 0.15rem; }
.nav-drop-menu a {
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  border-bottom: 0 !important;
}
.nav-drop-menu a:hover,
.nav-drop-menu a.is-active {
  background: rgba(46, 163, 242, 0.14);
  color: #fff;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.lang-btn {
  min-width: 2.1rem;
  min-height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.55rem !important;
  border-radius: 999px !important;
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.7) !important;
  text-decoration: none !important;
  border: 0 !important;
  background: transparent !important;
}
.lang-btn.is-active,
.lang-btn:hover {
  background: rgba(12, 204, 204, 0.22) !important;
  color: #fff !important;
}
/* lang inside desktop nav sits before CTA */
.nav > .lang-switch { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 0;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  text-decoration: none !important;
  /* zone tactile mobile */
  min-height: 44px;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.pricing-card-actions { position: relative; z-index: 2; }
.pricing-card .btn-choose-plan {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
#commande-form,
#form-commande,
.commande-form-anchor {
  scroll-margin-top: 96px;
}
select.plan-highlight,
#plan-select.plan-highlight {
  outline: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(12, 204, 204, 0.2);
}
.btn-primary {
  background: linear-gradient(217deg, #1accd8 0%, #1118e0 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(17, 24, 224, 0.28);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}
.btn-green {
  background: linear-gradient(217deg, #094c1d 0%, #18dd11 100%);
  color: #041007;
}
.btn-purple {
  background: linear-gradient(217deg, #27094c 0%, #7a12e2 100%);
  color: #fff;
}

.menu-toggle {
  display: none; /* visible only ≤980px */
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
}
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Hero */
.hero {
  background: var(--hero);
  padding: 5.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(12, 204, 204, 0.18), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(46, 163, 242, 0.12);
  color: #7dd3fc;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.hero p.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36rem;
  margin: 0 0 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-card {
  background: linear-gradient(160deg, rgba(16, 42, 84, 0.75), rgba(2, 5, 10, 0.9));
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.hero-card h3 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.stat {
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 0.85rem;
  text-align: center;
}
.stat strong { display: block; font-size: 1.25rem; color: var(--cyan); }
.stat span { font-size: 0.75rem; color: var(--muted); }

/* Sections */
.section { padding: 4.5rem 0; }
.section.alt { background: linear-gradient(180deg, rgba(10, 16, 28, 0.8), transparent); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}
.section-head p { margin: 0.4rem 0 0; color: var(--muted); max-width: 40rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
  height: 100%;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 163, 242, 0.35);
  background: rgba(46, 163, 242, 0.06);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(46,163,242,.25), rgba(122,18,226,.2));
  font-size: 1.3rem;
}
.card h3 { margin: 0 0 0.55rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .more {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.feature-list li {
  display: flex;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: "✓";
  color: var(--cyan);
  font-weight: 700;
}

/* Page hero compact */
.page-hero {
  background: var(--header);
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.page-hero h1 { margin: 0 0 0.6rem; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.page-hero p { margin: 0; color: rgba(255,255,255,.72); max-width: 42rem; }

.prose {
  max-width: 760px;
}
.prose h2 { margin-top: 2rem; }
.prose p, .prose li { color: var(--muted); }
.prose a,
.text-link,
.feature-list a,
.card a:not(.btn):not(.more) {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(12, 204, 204, 0.35);
  transition: color .15s ease, border-color .15s ease;
}
.prose a:hover,
.text-link:hover,
.feature-list a:hover {
  color: #7eeeee;
  border-bottom-color: rgba(126, 238, 238, 0.7);
}
/* Avoid double styling on card wrappers */
a.card {
  border-bottom: 0 !important;
  color: inherit !important;
}

/* Forms */
.form-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.5rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
input, textarea, select {
  width: 100%;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: #fff;
  padding: 0.8rem 0.9rem;
  font: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(46,163,242,.45);
  border-color: transparent;
}
textarea { min-height: 140px; resize: vertical; }

.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.alert-success { background: rgba(24,221,17,.12); border: 1px solid rgba(24,221,17,.3); color: #b7ffb3; }
.alert-error { background: rgba(255,80,80,.12); border: 1px solid rgba(255,80,80,.3); color: #ffc9c9; }
.alert-info { background: rgba(46,163,242,.12); border: 1px solid rgba(46,163,242,.3); color: #bfe5ff; }

/* FAQ */
.faq details {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { color: var(--cyan); margin-bottom: 0.5rem; }
.faq p { margin: 0; color: var(--muted); }

/* Tables admin */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
table.data th { color: var(--muted); font-weight: 600; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(46,163,242,.15);
  color: #9fd8ff;
}
.badge-active { background: rgba(24,221,17,.15); color: #b7ffb3; }
.badge-lead { background: rgba(255,196,0,.15); color: #ffe08a; }

/* Footer */
.site-footer {
  margin-top: 3rem;
  background: linear-gradient(180deg, #04060a, #000);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.site-footer h4 { margin: 0 0 0.8rem; font-size: 0.95rem; }
.site-footer a {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.25rem 0;
  border-bottom: 0;
  text-decoration: none;
}
.site-footer a:hover { color: #fff; }
.footer-bottom a {
  display: inline;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.footer-bottom a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
  color: var(--muted);
  font-size: 0.85rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(100deg, #002b4f, #0c0b3d 50%, #094c1d);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  border: 1px solid rgba(255,255,255,.08);
}
.cta-band h2 { margin: 0 0 0.4rem; }
.cta-band p { margin: 0; color: rgba(255,255,255,.78); }

/* Admin shell */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-nav {
  background: #070d16;
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 1.25rem;
}
.admin-nav a {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.admin-nav a:hover, .admin-nav a.is-active {
  background: rgba(46,163,242,.12);
  color: #fff;
}
.admin-main { padding: 1.5rem; }

/* Desktop medium: slightly smaller logo/nav if needed */
@media (max-width: 1200px) {
  .brand-logo { height: 68px; max-width: 240px; }
  .brand-text { display: none; }
  .header-inner { min-height: 84px; }
  .nav > a,
  .nav .nav-drop > button { font-size: 0.84rem; padding: 0.45rem 0.55rem; }
}

@media (max-width: 980px) {
  .header-inner {
    min-height: 72px;
    padding: 0.45rem 0;
  }
  .brand-logo {
    height: 56px;
    max-width: 200px;
  }
  .brand-text { display: none; }
  .header-tools {
    display: inline-flex;
    order: 2;
    margin-left: auto;
  }
  .menu-toggle { display: inline-flex; }
  .brand { order: 1; }
  .nav { order: 3; }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .nav-backdrop.is-on {
    opacity: 1;
    pointer-events: auto;
  }

  .nav {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: min(100%, 360px);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0 0 1.5rem;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.15rem;
    background: linear-gradient(180deg, #00182c 0%, #02080f 100%);
    border-left: 1px solid rgba(255,255,255,.08);
    box-shadow: -20px 0 50px rgba(0,0,0,.45);
    z-index: 95;
    transform: translateX(105%);
    transition: transform .25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav.open { transform: translateX(0); }
  .nav-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-weight: 600;
    font-size: 0.95rem;
    position: sticky;
    top: 0;
    background: #00182c;
    z-index: 2;
  }
  .nav-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
  }
  .nav > a,
  .nav .nav-drop > button {
    width: 100%;
    text-align: left;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    font-size: 1rem;
    min-height: 48px;
  }
  .nav-drop { width: 100%; }
  .nav-drop-menu {
    position: static;
    display: none;
    box-shadow: none;
    background: rgba(0,0,0,.25);
    border: 0;
    border-radius: 12px;
    margin: 0 0.6rem 0.4rem;
    min-width: 0;
  }
  .nav-drop.open .nav-drop-menu { display: grid; gap: 0.1rem; }
  .nav-drop:hover .nav-drop-menu { display: none; }
  .nav-drop.open:hover .nav-drop-menu { display: grid; }
  .nav-drop-menu a {
    padding: 0.85rem 1rem;
    min-height: 46px;
    display: flex;
    align-items: center;
  }
  .nav-cta-wrap {
    margin: 0.75rem 1rem 0;
    display: block;
  }
  .btn-nav-cta {
    width: 100%;
    min-height: 50px;
    font-size: 1rem;
  }

  .hero { padding: 3.25rem 0 2.5rem; }
  .hero h1 { font-size: clamp(1.65rem, 7vw, 2.2rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-grid, .grid-3, .grid-2, .footer-grid, .form-grid, .admin-shell {
    grid-template-columns: 1fr;
  }
  .stat-row { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cta-band { padding: 1.35rem; }
  .cta-band .btn { width: 100%; }
  .page-hero { padding: 2.5rem 0 1.75rem; }
  .container { width: min(100% - 1.25rem, var(--container)); }
  input, textarea, select { font-size: 16px; } /* évite zoom iOS */
  body.nav-open { overflow: hidden; touch-action: none; }
}

@media (max-width: 480px) {
  .brand-logo {
    height: 48px;
    max-width: 170px;
  }
  .header-inner { min-height: 64px; }
  .lang-btn {
    min-width: 1.9rem;
    min-height: 1.9rem;
  }
}
