/* =========================================================
   Noctulo — Dark theme SaaS
   ========================================================= */

:root {
  --bg: #0a0b10;
  --bg-2: #0f1118;
  --surface: #14171f;
  --surface-2: #1a1e29;
  --border: #232838;
  --border-strong: #2e3447;
  --text: #e6e8ee;
  --text-muted: #8a91a3;
  --text-dim: #5d6478;

  --primary: #7c5cff;
  --primary-2: #5b8dff;
  --primary-glow: rgba(124, 92, 255, 0.35);
  --accent: #22d3ee;

  --success: #34d399;
  --error: #f87171;
  --warning: #fbbf24;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);

  --container: 1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(800px 500px at -10% 30%, rgba(91, 141, 255, 0.12), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--text); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.muted { color: var(--text-muted); }

/* ========== Header ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 16, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
.brand-center { justify-content: center; margin-bottom: 1.75rem; }

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 18px var(--primary-glow);
}

.brand-name { letter-spacing: -0.02em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a { color: var(--text-muted); font-size: 0.95rem; }
.nav-links a:hover { color: #fff; }

.nav-user {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.inline-form { display: inline-block; margin: 0; }

/* ========== Buttons ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px var(--primary-glow);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--primary);
  color: #fff;
}

.btn-lg { padding: 0.85rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ========== Hero ========== */

.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-title { margin-bottom: 1.2rem; }

.grad {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  max-width: 680px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hero-meta {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.hero-glow {
  position: absolute;
  inset: auto 0 -40% 0;
  height: 80%;
  background: radial-gradient(closest-side, var(--primary-glow), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
}

/* ========== Sections ========== */

.section-title {
  text-align: center;
  margin-bottom: 0.4rem;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* ========== Features ========== */

.features { padding: 5rem 0; }

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

.feature-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(34, 211, 238, 0.15));
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.feature-card h3 { margin-bottom: 0.4rem; }
.feature-card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* ========== How it works ========== */

.how { padding: 5rem 0; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.step-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px -8px var(--primary-glow);
}
.step-card h3 { margin-bottom: 0.4rem; }
.step-card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* ========== FAQ ========== */

.faq { padding: 5rem 0; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 1.25rem;
  transition: border-color 0.18s;
}
.faq-item[open] { border-color: var(--primary); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  margin: 0;
  padding: 0 0 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========== Pricing ========== */

.pricing { padding: 5rem 0; }

.launch-banner {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.12) 0%, rgba(34, 211, 238, 0.08) 100%);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
}
.launch-banner-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: #fff;
  font-size: 1rem;
}
.launch-banner-count {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ff7849;
  letter-spacing: 0.01em;
}

/* --- Toggle Mensuel / Annuel (CSS pur, sans JS) --- */
.billing-radio { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }

.billing-toggle {
  display: flex;
  width: fit-content;
  gap: 0.25rem;
  margin: 0 auto 2.5rem;
  padding: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}
.billing-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.toggle-badge {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}
#bill-monthly:checked ~ .billing-toggle label[for="bill-monthly"],
#bill-annual:checked ~ .billing-toggle label[for="bill-annual"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

/* Bascule de l'affichage des prix */
.price-annual { display: none; }
#bill-annual:checked ~ .pricing-grid .price-annual { display: block; }
#bill-annual:checked ~ .pricing-grid .price-monthly { display: none; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.price-card-featured {
  background:
    linear-gradient(180deg, rgba(124, 92, 255, 0.08) 0%, transparent 60%),
    var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.3), 0 20px 60px -20px var(--primary-glow);
}

.badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.price-card h3 { font-size: 1.05rem; color: var(--text-muted); font-weight: 500; margin-bottom: 0.5rem; }

.price { margin: 0 0 0.5rem; display: flex; align-items: baseline; gap: 0.25rem; }
.amount { font-size: 2.5rem; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.period { color: var(--text-muted); font-size: 0.95rem; }
.price-old {
  color: var(--text-dim);
  font-size: 1.1rem;
  text-decoration: line-through;
  margin-left: 0.4rem;
}

.price-locked {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

.price-desc { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

.price-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
.price-features li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text);
  font-size: 0.94rem;
}
.price-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.85;
}

.pricing-guarantees {
  text-align: center;
  margin: 2.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== CTA ========== */

.cta { padding: 5rem 0; }
.cta-inner {
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.1) 0%, rgba(34, 211, 238, 0.06) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
}
.cta h2 { margin-bottom: 0.4rem; }
.cta p { color: var(--text-muted); margin-bottom: 1.75rem; }

/* ========== Footer ========== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-meta { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-sep { color: var(--text-dim); }

/* ========== Banners (dashboard) ========== */

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.banner-warn {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.14) 0%, rgba(251, 191, 36, 0.1) 100%);
  border: 1px solid rgba(251, 146, 60, 0.4);
  color: #fcd34d;
}
.banner-actions { display: inline-flex; align-items: center; gap: 0.9rem; }
.banner-link {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.banner-close {
  cursor: pointer;
  color: #fcd34d;
  font-size: 1.3rem;
  line-height: 1;
  opacity: 0.7;
  user-select: none;
}
.banner-close:hover { opacity: 1; }
.banner-dismiss-cb { display: none; }
.banner-dismiss-cb:checked + .banner { display: none; }

/* ========== Page de confirmation d'email ========== */
.confirm-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.confirm-card {
  width: 100%;
  max-width: 480px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2.25rem;
  box-shadow: var(--shadow);
}
.confirm-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  border: 2px solid var(--success);
  color: var(--success);
  font-size: 2.2rem;
  font-weight: 800;
}
.confirm-card h1 { font-size: 1.8rem; margin-bottom: 0.75rem; }
.confirm-msg { color: var(--text-muted); line-height: 1.6; margin-bottom: 1.75rem; }
.confirm-card { position: relative; }
.confirm-close {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--success);
  opacity: 0.7;
  text-decoration: none;
}
.confirm-close:hover { opacity: 1; color: var(--success); }

/* ========== Mini carte auth (reset / forgot) ========== */
.mini-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow);
}
.mini-auth-card h1 { font-size: 1.7rem; margin-bottom: 0.3rem; text-align: center; }
.mini-auth-card .auth-sub { text-align: center; }
.code-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.4rem;
  font-weight: 700;
}

/* ========== Mot de passe : œil afficher/masquer ========== */
.password-wrap { position: relative; }
.password-wrap input { width: 100%; padding-right: 5rem; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: #a78bfa;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.2rem 0.35rem;
  z-index: 5;
  transition: color 0.15s ease;
}
.password-toggle:hover { color: #ffffff; }

.field-forgot { margin: 0.5rem 0 0; text-align: right; }
.field-forgot a { color: var(--primary-2); font-size: 0.85rem; }
.field-forgot a:hover { color: #fff; }

.opt { color: var(--text-dim); font-weight: 400; font-size: 0.85em; }
/* ========== Shopify logo ========== */

.shopify-logo-badge {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  flex-shrink: 0;
}
.shopify-logo { height: 22px; width: auto; display: block; }
.panel-header-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.connected-shopify { align-items: center; gap: 0.7rem; }

.shopify-shop-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.96rem;
  font-family: inherit;
  margin-bottom: 0.75rem;
}
.shopify-shop-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

/* ========== Legal pages ========== */

.legal-page { padding: 3rem 0 4rem; }
.container-narrow { max-width: 760px; }
.legal-page h1 { font-size: 2rem; margin-bottom: 0.4rem; }
.legal-updated { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 2rem; }
.legal-page h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.6rem;
  color: #fff;
}
.legal-page p, .legal-page li { color: var(--text-muted); line-height: 1.7; }
.legal-page ul { padding-left: 1.2rem; }
.legal-page li { margin-bottom: 0.4rem; }
.legal-page a { color: var(--primary-2); }
.legal-page a:hover { color: #fff; }
.legal-note {
  margin-top: 2.5rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-style: italic;
}

/* ========== Auth (split layout) ========== */

.auth-split-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

/* --- Colonne gauche : panneau marketing dégradé --- */
.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  padding: 3.5rem;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(124, 92, 255, 0.55), transparent 60%),
    radial-gradient(800px 600px at 95% 95%, rgba(34, 211, 238, 0.35), transparent 60%),
    linear-gradient(150deg, #5b2bd9 0%, #38277f 45%, #0e2746 100%);
}

.auth-aside-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.75rem;
  width: 100%;
  max-width: 460px;
  margin: auto;
}

.brand-light { align-self: flex-start; }
.brand-light .brand-name { color: #fff; }

.auth-slogan {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.auth-benefits li {
  position: relative;
  padding-left: 2.25rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.03rem;
  line-height: 1.5;
}
.auth-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.55rem;
  height: 1.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

/* --- Colonne droite : formulaire épuré --- */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--bg);
}

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}
.auth-form-wrap h1 { font-size: 1.95rem; margin-bottom: 0.35rem; }

.auth-main .field { margin-bottom: 1.25rem; }
.auth-main .field input {
  padding: 0.95rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
}
.auth-main .btn-lg {
  padding: 1rem;
  font-size: 1.05rem;
  margin-top: 0.4rem;
}

/* --- Footer pleine largeur des pages auth --- */
.auth-footer {
  text-align: center;
  padding: 1.4rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.auth-footer a { color: var(--text-muted); }
.auth-footer a:hover { color: #fff; }

.auth-sub { color: var(--text-muted); margin-bottom: 1.5rem; }

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.96rem;
  font-family: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

.hint { color: var(--text-dim); font-size: 0.82rem; margin-top: 0.3rem; display: block; }

.auth-alt {
  text-align: center;
  color: var(--text-muted);
  margin: 1.25rem 0 0;
  font-size: 0.92rem;
}
.auth-alt a { color: var(--primary-2); font-weight: 500; }
.auth-alt a:hover { color: #fff; }

/* ========== Flash messages ========== */

.flash {
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.92rem;
  border: 1px solid;
}
.flash-error {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}
.flash-success {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

/* ========== Dashboard ========== */

.dashboard { padding: 2.5rem 0 4rem; }

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.dashboard-header h1 { font-size: 2rem; margin-bottom: 0.25rem; }

.plan-pill {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.plan-pill strong { color: #fff; margin-left: 0.25rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.stat-label { color: var(--text-muted); font-size: 0.85rem; }
.stat-value { color: #fff; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-meta { color: var(--text-dim); font-size: 0.82rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.panel-header { margin-bottom: 1.25rem; }
.panel-header h2 { font-size: 1.2rem; margin-bottom: 0.2rem; }

.empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
}
.empty-state p { margin-bottom: 1rem; }

.connected {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--success); box-shadow: 0 0 8px var(--success); }

/* ========== Tools (dashboard cards) ========== */

.tools-section { margin-bottom: 1.25rem; }
.tools-title { font-size: 1.2rem; margin-bottom: 1rem; }

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

.tool-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 16px 40px -20px var(--primary-glow);
  color: var(--text);
}
.tool-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.tool-card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(34, 211, 238, 0.15));
  color: var(--primary);
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}

.connect-notice {
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.1) 0%, rgba(34, 211, 238, 0.06) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
}
.connect-notice p { color: var(--text); margin-bottom: 1.25rem; font-size: 1.05rem; }

/* ========== Tool pages (forms + results) ========== */

.tool-page { padding: 2.5rem 0 4rem; }

.tool-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.tool-back:hover { color: #fff; }

.tool-header { margin-bottom: 1.75rem; }
.tool-header h1 { font-size: 1.9rem; margin-bottom: 0.25rem; }

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.96rem;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

.field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.field-check input { width: 16px; height: 16px; accent-color: var(--primary); }

.result-block {
  white-space: pre-wrap;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text);
}

.result-code {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--accent);
  overflow-x: auto;
}

.escalation-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 120, 73, 0.12);
  border: 1px solid rgba(255, 120, 73, 0.4);
  color: #ffa07a;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.kpi {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}
.kpi-label { color: var(--text-muted); font-size: 0.82rem; display: block; }
.kpi-value { color: #fff; font-size: 1.35rem; font-weight: 700; }

.stock-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.stock-table th, .stock-table td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border);
}
.stock-table th { color: var(--text-muted); font-weight: 500; }
.stock-qty-low { color: #ff7849; font-weight: 700; }

/* ========== Data source selector ========== */

.ds-current {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.ds-current strong { color: var(--text); }

.ds-disclosure { margin-bottom: 1.1rem; }
.ds-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  width: fit-content;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  transition: border-color 0.18s, color 0.18s;
}
.ds-toggle::-webkit-details-marker { display: none; }
.ds-toggle::before { content: "⚙"; font-size: 0.9rem; }
.ds-toggle:hover { color: #fff; border-color: var(--primary); }
.ds-disclosure[open] > .ds-toggle { color: #fff; border-color: var(--primary); margin-bottom: 0.9rem; }
.ds-disclosure-body {
  border-left: 2px solid var(--border-strong);
  padding-left: 1rem;
}

.ds-options { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }
.ds-opt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.93rem;
  color: var(--text);
  cursor: pointer;
}
.ds-opt input { accent-color: var(--primary); }
.ds-import { margin-top: 0.5rem; }
.ds-import input[type="file"] {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.ds-import input[type="file"]::file-selector-button {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  margin-right: 0.6rem;
  cursor: pointer;
  font-family: inherit;
}
.ds-paste summary { cursor: pointer; color: var(--text-muted); font-size: 0.88rem; padding: 0.5rem 0; }
.ds-paste summary:hover { color: #fff; }

/* ========== Résultats riches (outils data) ========== */

.result-section { margin-bottom: 1.5rem; }
.result-section h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.result-lead { color: var(--text); font-size: 1rem; line-height: 1.6; }

.insight-card {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 0.6rem;
}
.insight-card .ic-title { font-weight: 600; color: #fff; margin-bottom: 0.2rem; }
.insight-card .ic-meta { color: var(--text-muted); font-size: 0.9rem; }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  color: var(--text);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.pill-critique { background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.4); color: #fca5a5; }
.pill-eleve { background: rgba(255,120,73,0.15); border: 1px solid rgba(255,120,73,0.4); color: #ffa07a; }
.pill-normal { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.35); color: #6ee7b7; }
.pill-info { background: rgba(124,92,255,0.15); border: 1px solid rgba(124,92,255,0.4); color: #b9a6ff; }

.meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }

.raw-json summary { cursor: pointer; color: var(--text-dim); font-size: 0.82rem; margin-top: 1rem; }
.raw-json pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  max-height: 320px;
  overflow: auto;
}

.email-card {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
}
.email-card .em-subject { font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.email-card .em-body { color: var(--text); white-space: pre-wrap; line-height: 1.55; margin-bottom: 0.5rem; }
.email-card .em-cta { display: inline-block; color: var(--accent); font-weight: 600; font-size: 0.9rem; }

/* ========== Sélecteur de langue ========== */

.lang-select { position: relative; display: inline-block; }
.lang-select > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}
.lang-select > summary::-webkit-details-marker { display: none; }
.lang-select > summary::marker { content: ""; }
.lang-select > summary:hover { color: #fff; border-color: var(--primary); }
.lang-globe { display: block; flex-shrink: 0; }
.lang-current { letter-spacing: 0.03em; }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  z-index: 60;
  box-shadow: var(--shadow);
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.lang-menu a:hover { background: var(--surface-2); color: #fff; }
.lang-menu a.is-active { color: #fff; background: rgba(124, 92, 255, 0.2); }
.lang-flag { font-size: 1.05rem; line-height: 1; }

/* Sélecteur de langue épinglé en haut à droite de la page (hors du formulaire). */
.auth-topbar {
  position: absolute;
  top: 1.1rem;
  right: 1.5rem;
  z-index: 30;
  margin: 0;
}
[dir="rtl"] .auth-topbar { right: auto; left: 1.5rem; }

/* ========== Champ téléphone ========== */
.phone-row { display: flex; gap: 0.5rem; }
.phone-row .phone-code { flex: 0 0 44%; }
.phone-row input { flex: 1; }

/* ========== RTL (arabe) ========== */
[dir="rtl"] .auth-main,
[dir="rtl"] .field,
[dir="rtl"] .auth-form-wrap { text-align: right; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .password-toggle { right: auto; left: 0.5rem; }
[dir="rtl"] .password-wrap input { padding-right: 0.9rem; padding-left: 2.8rem; }
[dir="rtl"] .field-check { text-align: right; }

/* ========== Responsive ========== */

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { padding: 2.75rem 1.75rem; }
  .auth-aside-inner { gap: 1.75rem; margin: 0; }
  .auth-main { padding: 2.75rem 1.75rem; }
}

@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 4rem 0 3rem; }
  .features, .pricing, .cta { padding: 3.5rem 0; }
  .dashboard-header { align-items: flex-start; }
  .tool-layout { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
}
