/* ===== Tokens ===== */
:root {
  --forest: #142E24;
  --forest-2: #0F241C;
  --panel: #1C3B2E;
  --paper: #F4EFE1;
  --paper-2: #EAE3CE;
  --ink: #101A15;
  --ink-soft: #3C4A42;
  --gold: #C9A84C;
  --gold-bright: #E4C468;
  --line: rgba(244, 239, 225, 0.14);
  --line-dark: rgba(16, 26, 21, 0.12);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 4px;
  --forest-3: #0A1712;
  --glow: rgba(228, 196, 104, 0.22);
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0 0 14px;
}
.eyebrow--dark { color: #8A7530; }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 48px;
  max-width: 20ch;
  color: var(--ink);
}
.section-title--light { color: var(--paper); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--gold);
  color: var(--forest-2);
  box-shadow: 0 0 0 0 var(--glow);
}
.btn--primary:hover { background: var(--gold-bright); box-shadow: 0 8px 28px -6px var(--glow); }
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn--block { width: 100%; }

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 46, 36, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand span { color: var(--gold-bright); }
.topbar__nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.92rem;
}
.topbar__nav a {
  color: var(--paper);
  text-decoration: none;
  opacity: 0.85;
}
.topbar__nav a:hover { opacity: 1; color: var(--gold-bright); }
.topbar__cta {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 1 !important;
}
.topbar__cta:hover { border-color: var(--gold); color: var(--gold-bright) !important; }

@media (max-width: 760px) {
  .topbar__nav a:not(.topbar__cta) { display: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 15% -10%, #1E4232 0%, var(--forest) 45%, var(--forest-2) 100%);
  color: var(--paper);
  padding: 96px 0 104px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244,239,225,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,239,225,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 20% 10%, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  right: -160px;
  top: -120px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-drift 9s ease-in-out infinite;
}
@keyframes hero-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-24px, 30px); }
}
.hero__wrap { position: relative; padding-bottom: 260px; }
@media (prefers-reduced-motion: reduce) {
  .hero::after { animation: none; }
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
  max-width: 15ch;
}
.hero__title em {
  font-style: italic;
  color: var(--gold-bright);
}
.hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.hero__sub {
  font-size: 1.08rem;
  color: rgba(244, 239, 225, 0.82);
  max-width: 42ch;
  margin: 0;
}
.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Signature element: dispatch board — flotte et déborde de la section hero */
.dispatch {
  position: absolute;
  right: 0;
  bottom: -200px;
  width: min(380px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.55), 0 0 0 1px rgba(228,196,104,0.05);
  z-index: 2;
}
@media (max-width: 860px) {
  .dispatch { position: static; width: 100%; margin-top: 40px; }
  .hero__wrap { padding-bottom: 0; }
}
.dispatch__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 225, 0.7);
}
.dispatch__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7FBF8C;
  box-shadow: 0 0 0 0 rgba(127,191,140,0.6);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(127,191,140,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(127,191,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(127,191,140,0); }
}
.dispatch__list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.dispatch__list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(244,239,225,0.06);
  font-size: 0.92rem;
}
.dispatch__list li:last-child { border-bottom: none; }
.dispatch__code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-bright);
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 3px;
  padding: 2px 7px;
  flex-shrink: 0;
}
.dispatch__desc { color: rgba(244,239,225,0.8); }

.dispatch__ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--forest-3);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(127,191,140,0.9);
  min-height: 40px;
}
.dispatch__ticker-prompt { color: var(--gold-bright); }
.dispatch__ticker-cursor {
  width: 6px;
  height: 13px;
  background: rgba(127,191,140,0.85);
  animation: cursor-blink 0.9s step-end infinite;
}
@keyframes cursor-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .dispatch__ticker-cursor { animation: none; }
}

/* ===== Agents / Services ===== */
.agents { padding: 200px 0 96px; background: var(--paper); }
.agents__head { margin-bottom: 56px; }
@media (max-width: 860px) {
  .agents { padding-top: 96px; }
}

.agent-rail {
  border-top: 1px solid var(--line-dark);
}
.agent-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-dark);
  transition: background 0.18s ease;
}
.agent-row:hover { background: rgba(201,168,76,0.05); }
.agent-row:hover .agent-row__code {
  color: var(--forest);
  background: var(--gold);
  border-color: var(--gold);
}
.agent-row__code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  padding: 4px 10px;
  width: fit-content;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.agent-row__body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 8px;
}
.agent-row__body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 58ch;
}
.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
  padding-top: 4px;
}
.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4C8C5D;
}

@media (max-width: 640px) {
  .agent-row { grid-template-columns: 1fr; gap: 10px; }
  .status { padding-top: 0; }
}

/* ===== Methode ===== */
.methode { background: var(--forest-2); color: var(--paper); padding: 120px 0; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.step__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold-bright);
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 8px;
}
.step p {
  margin: 0;
  color: rgba(244,239,225,0.78);
  max-width: 56ch;
  font-size: 1rem;
}

/* ===== Preuve ===== */
.preuve { background: var(--paper-2); padding: 96px 0; }
.preuve__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.preuve__text { color: var(--ink-soft); font-size: 1.02rem; }
.preuve__card {
  background: var(--forest);
  color: var(--paper);
  border-radius: 8px;
  padding: 28px;
}
.preuve__card .dispatch__code { margin-bottom: 14px; display: inline-block; }
.preuve__card p { margin: 0; color: rgba(244,239,225,0.85); }

@media (max-width: 860px) {
  .preuve__grid { grid-template-columns: 1fr; }
}

/* ===== Contact ===== */
.contact { background: var(--forest); color: var(--paper); padding: 96px 0; }
.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}
.contact__intro p { color: rgba(244,239,225,0.8); max-width: 40ch; }
.contact__alt {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.contact__alt a {
  display: inline-block;
  margin-top: 6px;
  color: var(--gold-bright);
  text-decoration: none;
  font-weight: 600;
}
.contact__alt a:hover { text-decoration: underline; }

.lead-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  display: grid;
  gap: 18px;
}
.field { display: grid; gap: 7px; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244,239,225,0.72);
}
.field__optional { text-transform: none; letter-spacing: 0; opacity: 0.7; }
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--forest-2);
  color: var(--paper);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(244,239,225,0.4); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
}
.lead-form__status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
}
.lead-form__status[data-state="ok"] { color: #8FD79E; }
.lead-form__status[data-state="error"] { color: #E8A0A0; }

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
}

/* ===== FAQ ===== */
.faq { background: var(--paper-2); padding: 110px 0 130px; }
.faq-list { max-width: 820px; border-top: 1px solid var(--line-dark); }
.faq-item {
  border-bottom: 1px solid var(--line-dark);
  padding: 26px 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--gold);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "+"; transform: rotate(45deg); }
.faq-item p { margin: 14px 0 0; color: var(--ink-soft); max-width: 62ch; }

/* ===== Footer ===== */
.footer { background: var(--forest-2); color: rgba(244,239,225,0.7); padding: 32px 0; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}
.brand--footer { color: var(--paper); font-size: 1rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--gold-bright); }

/* ===== Scroll reveal ===== */
.agent-row,
.step,
.faq-item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.agent-row.is-visible,
.step.is-visible,
.faq-item.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .agent-row, .step, .faq-item { opacity: 1; transform: none; }
}

/* ===== Bee bot =====
   L'ancre de repos est un simple position:fixed bottom/right en CSS pur —
   ça ne peut jamais se retrouver hors écran, quel que soit le calcul JS.
   Le suivi du curseur applique juste un transform: translate() par-dessus. */
.bee-bot {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  width: 68px;
  height: 68px;
}

.bee-mascot {
  position: relative;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--forest-2);
  box-shadow: 0 10px 24px -8px rgba(16,26,21,0.5), 0 0 0 5px rgba(228,196,104,0.14);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.bee-mascot:hover {
  background: var(--gold-bright);
  box-shadow: 0 12px 28px -8px rgba(16,26,21,0.55), 0 0 0 7px rgba(228,196,104,0.2);
}
.bee-mascot.is-active { background: var(--gold-bright); }

.bee-mascot__wing { transform-origin: center; animation: bee-flap 0.32s ease-in-out infinite; }
.bee-mascot__wing--r { animation-delay: 0.06s; }
@keyframes bee-flap {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.55); }
}

.bee-mascot__ping {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7FBF8C;
  border: 2px solid var(--paper);
}
.bee-mascot.is-active .bee-mascot__ping { display: none; }

@media (prefers-reduced-motion: reduce) {
  .bee-mascot__wing { animation: none; }
}

.bee-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 51;
  width: min(340px, calc(100vw - 40px));
  max-height: min(460px, calc(100vh - 140px));
  display: flex;
  flex-direction: column;
  background: var(--panel);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55);
  overflow: hidden;
  pointer-events: auto;
}
.bee-panel[hidden] { display: none; }

.bee-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--forest-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1rem;
}
.bee-panel__close {
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  padding: 2px 4px;
}
.bee-panel__close:hover { opacity: 1; color: var(--gold-bright); }

.bee-panel__log {
  padding: 16px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  font-size: 0.92rem;
}
.bee-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 8px;
  line-height: 1.45;
}
.bee-msg--bot {
  background: var(--forest-2);
  border: 1px solid var(--line);
  align-self: flex-start;
}
.bee-msg--user {
  background: var(--gold);
  color: var(--forest-2);
  font-weight: 600;
  align-self: flex-end;
  margin-left: auto;
}

.bee-panel__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.bee-choice {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.bee-choice:hover { border-color: var(--gold); color: var(--gold-bright); }
.bee-choice--link { text-decoration: none; display: inline-flex; }

.bee-panel__form {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.bee-panel__form input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 10px 13px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--forest-2);
  color: var(--paper);
}
.bee-panel__form input::placeholder { color: rgba(244,239,225,0.4); }
.bee-panel__form input:focus { border-color: var(--gold); }
.bee-panel__send {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: var(--forest-2);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bee-panel__send:hover { background: var(--gold-bright); }
.bee-panel__send:disabled { opacity: 0.5; cursor: default; }

.bee-msg--typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 3px;
  border-radius: 50%;
  background: rgba(244,239,225,0.6);
  animation: bee-typing 1s ease-in-out infinite;
}
.bee-msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.bee-msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bee-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}
