:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #0b1222;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --border: #1f2937;
  --success: #10b981;
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(circle at 20% 20%, rgba(34,211,238,0.08), transparent 25%),
              radial-gradient(circle at 80% 0%, rgba(139,92,246,0.14), transparent 30%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-2);
  margin: 0 0 6px;
  font-size: 12px;
}

h1, h2, h3 { margin: 8px 0 10px; color: #fff; }
p { margin: 0 0 12px; color: var(--muted); }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  padding: 72px 8vw 32px;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  filter: none;
}
.hero > * { position: relative; z-index: 1; }

.hero__intro { display: flex; gap: 16px; align-items: flex-start; }
.hero__copy { flex: 1; min-width: 0; }
.hero__content h1 { font-size: clamp(32px, 5vw, 44px); }
.hero__content .lede { max-width: 640px; }
.hero__logo { width: 220px; max-width: 56vw; margin-bottom: 14px; padding: 0; border-radius: 0; background: transparent; border: none; box-shadow: none; }
.hero__logo-img { display: block; width: 100%; height: auto; border-radius: 0; object-fit: contain; }

body.home .hero__logo { width: 160px; max-width: 32vw; padding: 10px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
body.home .hero__logo-img { border-radius: 999px; object-fit: cover; }

.hero__actions { display: flex; gap: 12px; margin: 20px 0; }

.hero__trust { display: flex; gap: 10px; flex-wrap: wrap; }

.pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

.hero__card {
  background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(34,211,238,0.08));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.card__header {
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--border);
  text-align: center;
}

.card__body { padding: 12px; }

.checklist { padding-left: 20px; color: var(--muted); }
.checklist li { margin: 8px 0; }

.card__cta { margin-top: 16px; }
.card__cta { display: flex; justify-content: center; }
.card__cta .btn {
  margin-bottom: 0;
  max-width: 240px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s;
}

@media print {
  .no-print { display: none !important; }
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; }
.btn.ghost { background: rgba(255,255,255,0.06); }
.btn.block { width: 100%; }
.btn.google { background: #fff; color: #111827; border: none; display: inline-flex; align-items: center; gap: 10px; }
.btn.google .icon-google { display: inline-flex; width: 18px; height: 18px; }
.btn.google .icon-google svg { width: 100%; height: 100%; display: block; }

.panel {
  padding: 48px 8vw;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.12);
}

.panel#access {
  position: relative;
  overflow: hidden;
}

.panel#access::before {
  content: "";
  position: absolute;
  inset: -20% -8% -10% -8%;
  background:
    linear-gradient(135deg, rgba(15,23,42,0.0) 0%, rgba(15,23,42,0.65) 55%, rgba(15,23,42,0.85) 100%),
    url('/assets/img/logo.jpg') center 50%/cover no-repeat;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  filter: saturate(0.85);
}

.panel#access > * {
  position: relative;
  z-index: 1;
}

.panel.highlight {
  background: linear-gradient(135deg, rgba(34,211,238,0.08), rgba(139,92,246,0.14));
}

.panel__header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.panel#access .panel__header { flex-direction: column; align-items: flex-start; }
.panel#access .access__form { width: 100%; max-width: 420px; }
.panel__body { margin-top: 20px; }

.access__form { min-width: 280px; max-width: 360px; }

.input-group { display: flex; gap: 10px; }
.input-group input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b1222;
  color: #fff;
}
.access__form .input-group { margin-bottom: 12px; }
.access__form form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

.small { font-size: 12px; color: var(--muted); }

.divider { text-align: center; position: relative; margin: 12px 0; color: var(--muted); }
.divider span { background: var(--panel); padding: 0 8px; position: relative; z-index: 1; }
.divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--border); padding: 14px; border-radius: 12px; }
.step__num { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); border-radius: 50%; font-weight: 700; margin-bottom: 6px; }
.step__title { font-weight: 700; color: #fff; margin: 0 0 4px; }
.step__desc { margin: 0; font-size: 14px; color: var(--muted); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b1222;
  color: #fff;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.08); color: #fff; padding: 6px 10px; border-radius: 999px; font-size: 12px; }
.tag { display: inline-block; background: rgba(255,255,255,0.06); padding: 4px 8px; border-radius: 8px; color: var(--muted); font-size: 12px; margin-right: 6px; }

.price { font-weight: 800; font-size: 18px; color: var(--accent-2); }

.tile { background: var(--card); border: 1px solid var(--border); padding: 14px; border-radius: 12px; }

.highlight .tile { background: rgba(0,0,0,0.18); }

.footer { padding: 32px 8vw 40px; border-top: 1px solid var(--border); background: #0b1222; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 8px 0; }

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0b1222;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* Account: centered confirm toast (Cancel subscription) */
.account-confirm-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.account-confirm-toast {
  width: min(420px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.account-confirm-message {
  font-weight: 700;
  color: #fff;
  overflow-wrap: anywhere;
}

.account-confirm-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.account-confirm-actions .btn {
  padding: 10px 12px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8vw;
  gap: 12px;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  font-size: 16px;
  padding: 2px 0 0 2px;
}

.topbar__logo {
  width: auto;
  height: 28px;
  border-radius: 0;
  object-fit: contain;
  border: none;
  background: transparent;
}

.topbar__logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: none;
  background: transparent;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* --- Hamburger menu (progressive enhancement) --- */
.topbar__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: #fff;
  cursor: pointer;
}

.topbar__hamburger:focus {
  outline: 2px solid rgba(34,211,238,0.55);
  outline-offset: 2px;
}

.topbar__hamburger-icon {
  width: 18px;
  height: 14px;
  position: relative;
}

.topbar__hamburger-icon::before,
.topbar__hamburger-icon::after,
.topbar__hamburger-icon span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.92);
  border-radius: 2px;
}

.topbar__hamburger-icon::before { top: 0; }
.topbar__hamburger-icon span { top: 6px; }
.topbar__hamburger-icon::after { bottom: 0; }

.topbar__menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
}

.topbar__menu-panel {
  display: none;
  position: fixed;
  top: 64px;
  right: 18px;
  width: min(320px, calc(100vw - 36px));
  background: rgba(11,18,34,0.98);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
  z-index: 1001;
  overflow: hidden;
}

.topbar__menu-panel .topbar__menu-links {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 6px;
}

.topbar__menu-panel .topbar__link {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
}

.topbar__menu-panel .topbar__link:hover {
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.topbar__menu-open .topbar__menu-overlay,
.topbar__menu-open .topbar__menu-panel {
  display: block;
}

/* When JS creates the hamburger menu, hide the inline nav */
.topbar--menu-ready .topbar__hamburger {
  display: inline-flex;
}

.topbar__menu-panel button.topbar__link {
  background: transparent;
  border: none;
  color: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.topbar__link {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 14px;
}

.topbar__link:hover {
  text-decoration: underline;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-weight: 600;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .topbar {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .topbar__nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }
  .lang-switch {
    margin-left: auto;
  }

  .topbar__menu-panel {
    top: 66px;
    right: 14px;
  }
}

.toast.visible { opacity: 1; transform: translateY(0); }

/* Pages internes */
.page {
  padding: 32px 8vw 48px;
}

.page__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a { color: var(--accent-2); }

.page__section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

.page__section h2 { margin-top: 0; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

.prose h1 { font-size: 28px; margin-top: 0; }
.prose h2 { font-size: 22px; margin: 18px 0 8px; }
.prose h3 { font-size: 18px; margin: 14px 0 6px; }
.prose p { color: var(--muted); }
.prose ul { color: var(--muted); padding-left: 18px; }
.prose li { margin: 6px 0; }
.prose code { background: rgba(255,255,255,0.08); padding: 2px 5px; border-radius: 6px; font-size: 13px; }
.prose a { color: var(--accent-2); }
.prose strong { color: #fff; }

.badge-list { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-list .badge { background: rgba(255,255,255,0.05); }

.hidden { display: none !important; }

.providers-shell { border: 1px solid var(--border); background: rgba(0,0,0,0.12); }

.providers-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.provider-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 6px;
}

.pill-tab {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}

.pill-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #0b1222;
}

.pill-tab:hover { transform: translateY(-1px); }

.provider-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.provider-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  position: relative;
  display: grid;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.provider-card:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.provider-card.active { border-color: var(--accent-2); box-shadow: 0 10px 32px rgba(0,0,0,0.25); }

.provider-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.provider-card.disabled:hover {
  border-color: var(--border);
  transform: none;
}

.provider-card__head { display: flex; align-items: center; gap: 10px; }
.provider-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
}
.provider-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.provider-card__title { margin: 0; color: #fff; font-weight: 700; }
.provider-card__desc { margin: 0; font-size: 13px; color: var(--muted); }
.provider-card__cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-2); }

.premium-pack-card {
  padding: 16px;
  margin: 12px 0;
}

.premium-pack-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cart-premium-logos {
  margin-top: 0;
  gap: 6px;
}

.cart-premium-logos .premium-pack-logo {
  width: 22px;
  height: 22px;
  border-radius: 8px;
}

.premium-pack-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.premium-pack-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.provider-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  position: relative;
  display: grid;
  gap: 12px;
}

.provider-tile-toast {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0,0,0,0.25);
  z-index: 5;
}

.provider-tile-toast__content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  text-align: center;
  max-width: 92%;
}

.provider-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  z-index: 10;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.provider-panel__header { display: flex; align-items: center; gap: 10px; }

.provider-auth, .provider-payment { border-top: 1px solid var(--border); padding-top: 10px; display: grid; gap: 10px; }

.provider-form { display: grid; gap: 10px; }
.provider-form label { display: grid; gap: 4px; color: #fff; font-weight: 700; }
.provider-form input {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b1222;
  color: #fff;
}

.status-ok { color: var(--success); }
.status-error { color: #f87171; }
.status-muted { color: var(--muted); }

.payment-env-note {
  padding: 10px;
  border-radius: 10px;
  background: rgba(34,211,238,0.08);
  border: 1px dashed var(--accent-2);
  color: var(--text);
}

@media (max-width: 960px) {
  .providers-layout { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 56px 6vw 24px; }
  .hero__card { order: -1; }
}
