:root {
  --orange: #f6821f;
  --orange-dark: #d9730d;
  --ink: #0b1622;
  --ink-soft: #1c2b3a;
  --paper: #ffffff;
  --surface: #f4f6f8;
  --muted: #5b6b7c;
  --border: #e2e8ef;
  --radius: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); text-align: center; }
h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
p { margin: 0 0 1em; color: var(--muted); }

a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap--narrow { max-width: 760px; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
}
.brand__logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.nav__links {
  display: flex;
  gap: 24px;
}
.nav__links a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav__links a:hover { color: var(--orange-dark); text-decoration: none; }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-switch {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 9px;
}
.lang-switch:hover { color: var(--orange-dark); border-color: var(--orange); text-decoration: none; }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn--primary {
  background: var(--orange);
  color: #fff;
}
.btn--primary:hover { background: var(--orange-dark); text-decoration: none; }
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--orange); text-decoration: none; }
.btn--small { padding: 8px 16px; font-size: 0.85rem; }
.btn--block { width: 100%; text-align: center; font-size: 1rem; padding: 14px; }

/* HERO */
.hero {
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: #fff;
  padding: 96px 0 88px;
}
.hero__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 16px;
}
.hero h1 { color: #fff; margin-bottom: 20px; }
.rotator {
  display: inline-block;
  color: var(--orange);
  transition: opacity 0.25s ease;
}
@media (prefers-reduced-motion: reduce) {
  .rotator { transition: none; }
}
.hero .lede { color: #c3cdd8; font-size: clamp(0.85rem, 1.6vw, 1.1rem); max-width: 100%; margin: 0 auto 32px; }
@media (min-width: 760px) {
  .hero .lede { white-space: nowrap; }
}
.hero__ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .btn--ghost { border-color: rgba(255,255,255,0.3); color: #fff; }
.hero .btn--ghost:hover { border-color: var(--orange); }

/* SECTIONS */
.section { padding: 80px 0; scroll-margin-top: 96px; }
.section--alt { background: var(--surface); }
.section__intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
}

/* GRIDS / CARDS */
.grid { display: grid; gap: 24px; margin-top: 40px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.section--alt .card { background: #fff; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

.card--persona { text-align: left; }
.persona-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}

/* STEPS */
.steps-path {
  display: block;
  width: 100%;
  max-width: 1000px;
  height: auto;
  margin: 8px auto 32px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  scroll-margin-top: 96px;
}
.step__num {
  display: inline-block;
  font-weight: 800;
  color: var(--orange-dark);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.offer-name {
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.15em;
  color: var(--orange-dark);
}
.offer-name-ref {
  color: var(--orange-dark);
  text-decoration: none;
  margin-left: 4px;
}
.offer-name-ref sup {
  font-size: 0.55em;
}

.kpi-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 720px;
  margin: 0 auto;
}
.kpi-box h3 { text-align: center; }
.kpi-box ul { margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.kpi-box li { margin-bottom: 8px; }
.kpi-list {
  list-style: none;
  padding-left: 0;
}
.kpi-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.kpi-icon {
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  margin-top: 3px;
  color: var(--orange-dark);
}

/* PERMISSIONS */
.permission-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}
.permission-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
  font-weight: 500;
  position: relative;
  padding-left: 40px;
}
.permission-list li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  color: var(--orange-dark);
  font-weight: 800;
}
.access-level {
  color: var(--orange-dark);
  font-weight: 800;
}
/* PRICING */
.section--pricing { text-align: center; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
  gap: 24px;
  max-width: 840px;
  margin: 40px auto 0;
}
.price-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: left;
}
.price-card__illustration {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: -8px auto 8px;
}
/* Pousse le bouton de paiement en bas de carte, pour que les deux boutons
   s'alignent même quand une carte a plus de contenu au-dessus (ex. la note
   "60 minutes cumulées" présente uniquement sur Done for you). */
.price-card .checkout-button { margin-top: auto; }
.price-card--featured {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}
.price-card h3 { text-align: center; }
.price-sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin: -8px 0 12px;
}
.price {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--orange-dark);
  margin: 8px 0 24px;
}
.price-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}
.price-per {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}
.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  color: var(--ink-soft);
}
.price-features li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 10px;
  font-size: 0.92rem;
}
.price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--orange-dark);
  font-weight: 800;
}
.price-note {
  text-align: center;
  font-size: 0.82rem;
  margin: 14px 0 0;
}
.plan-footnote {
  font-size: 0.78rem;
  color: var(--muted);
  margin: -10px 0 18px;
}
#offer-names-note {
  text-align: center;
  margin: 28px 0 0;
}
.topic-select {
  margin: 0 0 14px;
  text-align: left;
}
.topic-select label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.topic-select select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.contact-form { margin-top: 24px; }
.contact-form .cf-turnstile { margin: 0 0 16px; }
.form-field {
  margin: 0 0 16px;
  text-align: left;
}
.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}
.checkout-error {
  color: #b3261e;
  font-size: 0.85rem;
  text-align: center;
  margin: 12px 0 0;
}
.form-success {
  color: #1a7f37;
  font-size: 0.95rem;
  text-align: center;
  margin: 24px 0 0;
}

/* FOOTER */
.footer {
  background: var(--ink);
  color: #9fb0bf;
  padding: 32px 0;
}
.footer__inner { text-align: center; font-size: 0.8rem; }
.footer p { color: #9fb0bf; margin: 0 0 4px; }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .steps-path { display: none; }
}

@media (max-width: 640px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .pricing-grid { gap: 10px; }
  .price-card { padding: 16px; }
  .price { font-size: 1.7rem; }
  .price-features { font-size: 0.8rem; }
  .price-features li { padding-left: 18px; }
  .price-sub { font-size: 0.75rem; }
  .price-card .btn--block { padding: 10px 6px; font-size: 0.82rem; }
}

/* CHAT WIDGET */
.chat-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 1000;
}
.chat-bubble:hover { background: var(--orange-dark); }
.chat-bubble svg { width: 26px; height: 26px; }
/* Pastille de messages non lus, alimentée par data-unread côté JS. */
.chat-bubble[data-unread]:not([data-unread=""])::after {
  content: attr(data-unread);
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #b3261e;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

/* Sans cette règle, display: flex ci-dessous l'emporte sur le [hidden] de la
   feuille de style UA : le panneau resterait affiché une fois refermé, alors
   que le polling, lui, s'arrête. */
.chat-panel[hidden] { display: none; }
.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: 340px;
  max-width: calc(100vw - 40px);
  max-height: min(480px, calc(100vh - 120px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}
.chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.chat-panel__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.chat-panel__body {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 10px;
  overflow-y: auto;
}
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.chat-message {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  max-width: 85%;
  line-height: 1.4;
  white-space: pre-wrap;
}
.chat-message--visitor {
  align-self: flex-end;
  background: var(--orange);
  color: #fff;
}
.chat-message--steve {
  align-self: flex-start;
  background: #f1f3f5;
  color: var(--ink);
}
.chat-message--ai {
  align-self: flex-start;
  background: #eef2ff;
  color: var(--ink);
  border: 1px solid #dbe4ff;
}
.chat-message__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5b6fd6;
  margin-bottom: 2px;
}
.chat-message__time {
  display: block;
  font-size: 0.65rem;
  margin-top: 3px;
  opacity: 0.65;
}
.chat-message--typing {
  align-self: flex-start;
  background: #f1f3f5;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
}
.chat-message--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: chat-typing-bounce 1.2s infinite ease-in-out;
}
.chat-message--typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-message--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-message--typing span { animation: none; opacity: 0.7; }
}
.chat-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-start-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* display: flex l'emporterait sinon sur le [hidden] de la feuille de style UA. */
.chat-start-fields[hidden] { display: none; }
.chat-email,
.chat-text {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.85rem;
}
.chat-text { resize: vertical; min-height: 60px; }

@media (max-width: 640px) {
  .chat-panel { right: 12px; left: 12px; width: auto; bottom: 84px; }
  .chat-bubble { right: 12px; bottom: 12px; }
}
