/* HORM — landing vitrine. Charte V2 Corporate Blue & Gold (howto.md). Zéro CDN. */
:root {
  --bg-primary: #0A111E;
  --bg-secondary: #121E31;
  --bg-tertiary: #1A2942;
  --steel-dark: #243552;
  --steel-light: #3A5278;
  --gold-primary: #E5A93C;
  --gold-hover: #F5BC53;
  --gold-glow: rgba(229, 169, 60, 0.25);
  --text-main: #F0F4F8;
  --text-muted: #8A9CB7;
  --border-color: #263852;
  --gold-ink: #F5BC53;   /* encre dorée : liens et accents (contraste adapté au thème) */
  /* Bleu d'action — identique à l'app (cohérence chat.horm.fr) */
  --cta: #1F88C7;
  --cta-hover: #2FA4DE;
  --cta-glow: rgba(31, 136, 199, 0.35);
  --radius: 14px;
}
/* Thème clair — mêmes tokens que l'app (127.0.0.1:8001), clé partagée horm.theme */
html.light {
  --bg-primary: #EDF1F7;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #E1E8F2;
  --steel-dark: #C7D3E3;
  --text-main: #0D1B30;
  --text-muted: #5C6E89;
  --border-color: #D0D9E6;
  --gold-ink: #8A5A0B;
  color-scheme: light;
}
html.light .topbar { background: rgba(237, 241, 247, 0.92); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}
h1, h2, h3, .brand span { font-family: Montserrat, "Segoe UI", system-ui, sans-serif; }
a { color: var(--gold-ink); }
img { max-width: 100%; }
.theme-btn {
  background: var(--bg-secondary); color: var(--text-main);
  border: 1px solid var(--border-color); border-radius: 50%;
  width: 40px; height: 40px; font-size: 17px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-btn:hover { border-color: var(--gold-primary); }

/* ---------- barre haute ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  background: rgba(10, 17, 30, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-main); }
.brand img { border-radius: 8px; }
.brand span { font-weight: 700; font-size: 22px; letter-spacing: 2px; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--gold-hover); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.burger { display: none; background: none; border: 1px solid var(--border-color); color: var(--text-main); border-radius: 10px; font-size: 20px; padding: 6px 12px; cursor: pointer; }

/* ---------- boutons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  border-radius: 12px; padding: 10px 22px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; transition: all 150ms ease;
}
.btn-gold { background: var(--cta); color: #fff; }
.btn-gold:hover { background: var(--cta-hover); box-shadow: 0 0 12px var(--cta-glow); }
.btn-ghost { background: transparent; color: var(--text-main); border-color: var(--border-color); }
.btn-ghost:hover { border-color: var(--cta); color: var(--cta); box-shadow: 0 0 12px var(--cta-glow); }
.btn-lg { padding: 14px 32px; font-size: 17px; }
.btn-block { display: block; text-align: center; margin-top: 18px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 24px 72px; text-align: center;
}
#stars { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
main, footer { position: relative; z-index: 1; }
.hero-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.section.alt { background: rgba(18, 30, 49, 0.72); max-width: none; }
html.light .section.alt { background: rgba(255, 255, 255, 0.72); }

/* ---------- fonds alternatifs du hero (?bg=waves|aurora|grid) ---------- */
.bg-waves { position: absolute; left: 0; right: 0; bottom: -2px; height: 130px; pointer-events: none; overflow: hidden; }
.bg-waves svg { width: 200%; height: 100%; display: block; animation: waveSlide 14s linear infinite; }
.bg-waves svg path { fill: #1F88C7; }
.bg-waves .w1 { opacity: 0.10; }
.bg-waves .w2 { opacity: 0.16; animation-duration: 9s; animation-direction: reverse; }
.bg-waves .w3 { opacity: 0.22; animation-duration: 6s; }
html.light .bg-waves svg path { fill: #1F88C7; }
@keyframes waveSlide { to { transform: translateX(-50%); } }
.aurora { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.aurora.a { width: 46vw; height: 46vw; min-width: 380px; min-height: 380px; left: -10vw; top: -14vw; background: rgba(31, 136, 199, 0.20); animation: aurA 16s ease-in-out infinite alternate; }
.aurora.b { width: 40vw; height: 40vw; min-width: 320px; min-height: 320px; right: -8vw; top: -6vw; background: rgba(58, 82, 120, 0.35); animation: aurB 20s ease-in-out infinite alternate; }
html.light .aurora.a { background: rgba(31, 136, 199, 0.14); }
html.light .aurora.b { background: rgba(58, 82, 120, 0.16); }
@keyframes aurA { to { transform: translate(6vw, 4vw) scale(1.15); } }
@keyframes aurB { to { transform: translate(-5vw, 5vw) scale(0.9); } }
.hero.grid-bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(31,136,199,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,136,199,0.14) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 30%, transparent 75%);
  animation: gridMove 2.6s linear infinite;
}
@keyframes gridMove { to { background-position-y: 44px; } }
/* Robot à gauche du texte centré (comme l'app) ; empilé sur mobile. */
.hero-split { max-width: 1020px; display: flex; align-items: center; gap: 48px; text-align: center; }
.hero-split .hero-text { flex: 1; }
.hero-robot {
  width: 220px; height: auto; flex-shrink: 0;
  filter: drop-shadow(0 0 22px var(--cta-glow));
  transition: filter 1.4s ease-out; /* retrait lent du halo au mouseleave */
}
.hero-robot:hover { animation: haloPulse 2.4s ease-in-out infinite; }
@keyframes haloPulse {
  0%, 100% { filter: drop-shadow(0 0 12px var(--cta-glow)); }
  50% { filter: drop-shadow(0 0 14px var(--cta)) drop-shadow(0 0 28px var(--cta-glow)); }
}
html.light .hero-robot { filter: drop-shadow(0 6px 18px rgba(13, 27, 48, 0.25)); }
.enclave { color: var(--text-muted); font-size: 14px; letter-spacing: 1px; margin-bottom: 20px; }
.enclave .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cta); box-shadow: 0 0 10px var(--cta); margin-right: 8px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.15; margin-bottom: 18px; }
.hero h1 .hl { color: var(--cta); }
.hero .sub { color: var(--text-muted); font-size: clamp(16px, 2.4vw, 20px); max-width: 680px; margin: 0 auto 30px; }
.hero .sub .brand-word {
  color: var(--cta); font-weight: 800; font-size: 1.5em; letter-spacing: 2px;
  font-family: Montserrat, "Segoe UI", system-ui, sans-serif;
  text-shadow: 0 0 14px var(--cta-glow);
}
/* Flèche courbe mot HORM → robot (tracée en JS, blanche lisible sur les 2 thèmes). */
.hero-split { position: relative; }
#link-arrow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
@media (max-width: 760px) { #link-arrow { display: none; } }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.fr-badge { margin-top: 26px; color: var(--text-muted); font-size: 15px; }

/* ---------- sections ---------- */
.section { padding: 72px 24px; max-width: 1120px; margin: 0 auto; }
.section.alt { background: var(--bg-secondary); max-width: none; }
.section.alt > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.section h2 { font-size: clamp(26px, 4vw, 38px); text-align: center; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--text-muted); max-width: 640px; margin: 0 auto 40px; font-size: 17px; }
.section-sub.balance { text-wrap: balance; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
}
.section.alt .card { background: var(--bg-primary); }
.card .icon { font-size: 30px; margin-bottom: 12px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p, .card li { color: var(--text-muted); font-size: 15px; }

/* ---------- tarifs ---------- */
.pricing { align-items: stretch; }
.price { display: flex; flex-direction: column; position: relative; }
.price .amount { font-size: 40px; font-weight: 800; color: var(--text-main); font-family: Montserrat, sans-serif; }
.price .amount span { font-size: 17px; font-weight: 400; color: var(--text-muted); }
.price .per { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }
.price ul { list-style: none; display: grid; gap: 8px; flex: 1; padding: 0; }
.contact-cta { text-align: center; margin-top: 18px; font-size: 17px; font-weight: 600; }
.price .btn-block { margin-top: 22px; }
.price ul li::before { content: "✓ "; color: var(--gold-ink); font-weight: 700; }
.price.featured { border-color: var(--cta); box-shadow: 0 0 15px var(--cta-glow); }
.price .flag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--cta); color: #fff; font-size: 13px; font-weight: 700;
  padding: 3px 16px; border-radius: 999px; white-space: nowrap;
}
.note { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 26px; }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 16px 20px; }
.section.alt .faq details { background: var(--bg-primary); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; }
.faq summary:hover { color: var(--cta); }
.faq p { color: var(--text-muted); margin-top: 10px; font-size: 15px; }

/* ---------- contact / footer ---------- */
.contact-mail { display: flex; justify-content: center; margin-top: 10px; }
.contact-mail .btn { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .contact-mail .btn-lg { padding: 12px 18px; font-size: 15px; }
  .contact-cta { font-size: 15px; padding: 8px 20px; }
}
footer { border-top: 1px solid var(--border-color); padding: 32px 24px; text-align: center; color: var(--text-muted); font-size: 14px; }
footer nav { margin: 10px 0; }
footer nav a { color: var(--text-muted); text-decoration: none; margin: 0 4px; }
footer nav a:hover { color: var(--gold-hover); }
footer .copy { margin-top: 8px; font-size: 13px; }

/* ---------- page légale ---------- */
.legal { max-width: 800px; margin: 0 auto; padding: 56px 24px 72px; }
.legal h1 { font-size: 32px; margin-bottom: 6px; }
.legal .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.legal h2 { font-size: 21px; margin: 28px 0 8px; text-align: left; }
.legal p, .legal li { color: var(--text-muted); font-size: 15px; margin-bottom: 10px; }
.legal ul { padding-left: 22px; }
.todo { color: var(--gold-primary); font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .hero-split { flex-direction: column; gap: 8px; }
  .hero-robot { width: 150px; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color); padding: 12px 24px 18px; gap: 12px;
  }
  .nav.open { display: flex; }
  .burger { display: block; }
  .topbar { position: sticky; }
  .hero { padding: 64px 20px 52px; }
  .section { padding: 52px 20px; }
  .grid-4 { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
