/* OCTOPUS — feuille de style principale. Sobre, professionnelle, compatible RTL. */
:root {
  --bg: #0f1420;
  --surface: #1a2030;
  --surface-2: #232b3d;
  --text: #eef1f7;
  --muted: #9aa4b8;
  --primary: #4f7cff;
  --primary-dark: #3a63e0;
  --danger: #c0392b;
  --border: #2c3447;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(160deg, #0f1420, #131a2b);
  color: var(--text);
  min-height: 100vh;
}

/* En-tête */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap; /* évite tout débordement sur petits écrans */
  padding: 14px 22px;
  background: rgba(20, 26, 40, 0.8);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  z-index: 10;
}
.brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Mise en page centrée */
.center {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 18px;
}
.app-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 18px 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Cartes */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.auth-card {
  width: 100%;
  max-width: 420px;
}

h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}
h2 {
  margin: 0 0 14px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.85rem;
}

/* Formulaires */
.form,
.field {
  display: flex;
  flex-direction: column;
}
.field {
  gap: 6px;
  margin-bottom: 14px;
}
.field span {
  font-size: 0.9rem;
  color: var(--muted);
}
input,
select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
input:focus {
  border-color: var(--primary);
}

/* Boutons */
.btn {
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 0.98rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s, opacity 0.15s;
}
.btn.primary {
  background: var(--primary);
  color: white;
}
.btn.primary:hover {
  background: var(--primary-dark);
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn.ghost:hover {
  color: var(--text);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.lang-select {
  padding: 8px 10px;
  font-size: 0.9rem;
}

/* Séparateur « ou » */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 18px 0 14px;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span {
  padding: 0 12px;
}

/* Boutons de connexion sociale */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  background: #ffffff;
  color: #1f2430;
  border: 1px solid var(--border);
}
.btn.social:hover {
  background: #f1f3f7;
}
.social-ico {
  display: inline-flex;
  align-items: center;
}

/* Onglets */
.tabs {
  display: flex;
  gap: 6px;
  margin: 18px 0;
}
.tab {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Messages */
.error-msg {
  background: rgba(192, 57, 43, 0.15);
  border: 1px solid var(--danger);
  color: #ff9c91;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 10px 0;
  font-size: 0.92rem;
}
.badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  color: var(--text);
}
.badge.trial {
  background: rgba(212, 160, 23, 0.18);
  border-color: #d4a017;
  color: #ffd877;
}

/* Formules */
.plans-wrap {
  text-align: center;
  max-width: 920px;
}
.trial-note {
  color: #ffd877;
  margin-bottom: 18px;
}
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
}
.plan-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 124, 255, 0.35);
}
.plan-desc {
  color: var(--muted);
  min-height: 48px;
  font-size: 0.92rem;
}
.plan-price {
  font-size: 2rem;
  font-weight: 700;
  margin: 14px 0;
}
.plan-price .per {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
}

/* Application : question + résultat */
.ask-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.ask-form input {
  flex: 1;
}

.result-grid {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.chart-box {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  margin: 0 auto;
}
.prob-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 700;
}
.result-details {
  flex: 1;
  min-width: 260px;
}
.result-details h3 {
  margin: 14px 0 6px;
  font-size: 1rem;
  color: var(--muted);
}
.result-outcome {
  color: var(--primary);
}
.confidence {
  font-size: 1.05rem;
}
.disclaimer {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-inline-start: 3px solid #d4a017;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Historique */
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
}
.history-prob {
  font-weight: 700;
  color: var(--primary);
}

/* ============================================================
   PAGE D'ACCUEIL (landing)
   ============================================================ */
.landing {
  overflow-x: hidden;
}
.landing-topbar {
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
}

/* Halos lumineux animés en arrière-plan */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: float 16s ease-in-out infinite;
}
.orb-1 {
  width: 420px;
  height: 420px;
  background: #4f7cff;
  top: -80px;
  inset-inline-start: -80px;
}
.orb-2 {
  width: 360px;
  height: 360px;
  background: #7b3ff2;
  top: 40%;
  inset-inline-end: -100px;
  animation-delay: -5s;
}
.orb-3 {
  width: 300px;
  height: 300px;
  background: #2e9e5b;
  bottom: -60px;
  inset-inline-start: 30%;
  animation-delay: -9s;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-30px) translateX(20px);
  }
}

/* Hero : deux colonnes */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 22px 30px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  min-height: 66vh;
}
.hero-copy {
  animation: rise 0.7s ease both;
}
.pill {
  display: inline-block;
  background: rgba(79, 124, 255, 0.15);
  border: 1px solid rgba(79, 124, 255, 0.4);
  color: #a9c0ff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 16px;
  background: linear-gradient(120deg, #ffffff, #a9c0ff 60%, #7b3ff2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 26px;
  line-height: 1.6;
}
.hero-feats {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-feats li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.02rem;
}
.feat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 1.1rem;
}
.hero-trust {
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.8;
}

.hero-auth {
  animation: rise 0.7s ease 0.1s both;
}
.trial-hook {
  color: #ffd877;
  margin-top: -4px;
  margin-bottom: 12px;
  font-weight: 600;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bouton avec halo */
.btn.glow {
  box-shadow: 0 8px 24px rgba(79, 124, 255, 0.4);
}
.btn.glow:hover {
  box-shadow: 0 10px 30px rgba(79, 124, 255, 0.55);
}

/* Comment ça marche */
.how {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 20px auto 0;
  padding: 40px 22px 10px;
  text-align: center;
}
.how-title {
  font-size: 1.7rem;
  margin-bottom: 30px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step {
  background: rgba(26, 32, 48, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: start;
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.step h3 {
  margin: 0 0 8px;
}
.step p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.landing-footer {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 40px auto 0;
  padding: 24px 22px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Pages de contenu (Confidentialité, Conditions, À propos, FAQ, Contact) */
.content-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 22px 20px;
}
.content-article h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.content-article h2 {
  font-size: 1.15rem;
  margin: 26px 0 8px;
  color: #cdd6ea;
}
.content-article h3 {
  font-size: 1.02rem;
  margin: 0 0 6px;
}
.content-article p {
  color: #c4cbdb;
  line-height: 1.7;
  margin: 0 0 12px;
}
.faq-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.contact-form {
  margin-top: 18px;
}
.contact-form textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}
.feedback {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 6px 0;
  font-size: 0.92rem;
}
.feedback.success {
  background: rgba(46, 158, 91, 0.15);
  border: 1px solid #2e9e5b;
  color: #8fe3b0;
}
.feedback.error {
  background: rgba(192, 57, 43, 0.15);
  border: 1px solid var(--danger);
  color: #ff9c91;
}

/* Pied de page global */
.site-footer,
.landing-footer {
  max-width: 1120px;
  margin: 40px auto 0;
  padding: 24px 22px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--text);
}
a.brand {
  text-decoration: none;
  color: var(--text);
}

/* Responsive */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 20px;
    min-height: auto;
  }
  .hero-auth {
    order: -1;
  }
}
/* Tablettes */
@media (max-width: 768px) {
  .center {
    padding: 28px 16px;
  }
  .app-main {
    padding: 20px 14px 50px;
  }
  .card {
    padding: 22px;
  }
  .result-grid {
    gap: 18px;
  }
}

/* Téléphones */
@media (max-width: 560px) {
  .topbar {
    padding: 12px 14px;
  }
  .topbar-actions {
    gap: 6px;
    width: 100%;
  }
  .btn.ghost {
    padding: 8px 10px;
    font-size: 0.85rem;
    flex: 1; /* boutons d'égale largeur, faciles à toucher */
  }
  .lang-select {
    flex: 1;
  }

  /* La question et son bouton s'empilent */
  .ask-form {
    flex-direction: column;
  }
  .ask-form .btn {
    width: 100%;
    padding: 13px; /* cible tactile confortable */
  }

  /* Hero plus compact */
  .hero {
    padding: 14px 16px;
  }
  .hero-sub {
    font-size: 1rem;
  }
  .how {
    padding: 24px 16px 0;
  }

  /* Résultat : graphique centré, détails dessous */
  .result-grid {
    flex-direction: column;
    align-items: stretch;
  }
  .chart-box {
    margin: 0 auto;
  }

  /* Formules : une colonne, pleine largeur */
  .plan-card {
    padding: 22px 18px;
  }

  /* Badges et titres légèrement réduits */
  .badge {
    font-size: 0.75rem;
    padding: 4px 9px;
  }
  h1 {
    font-size: 1.4rem;
  }
}

/* Très petits écrans (≤ 380 px) */
@media (max-width: 380px) {
  .brand {
    font-size: 1.1rem;
  }
  .plan-price {
    font-size: 1.7rem;
  }
}
