/* Optimus Nextgen, page d'accueil one page.
   Palette tirée du logo : gris ardoise et bleu du « X ». */

:root {
  --ink: #151a1f;
  --ink-2: #242c34;
  --text: #1c232a;
  --muted: #56616d;
  --ground: #f3f6f9;
  --surface: #ffffff;
  --rule: #dce3ea;
  --blue: #3b97d3;
  --blue-deep: #1d6aa0;
  --blue-darker: #155584;
  --blue-soft: #e4f0f9;
  --blue-on-dark: #86c2ea;

  --display: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --header-h: 76px;
  --radius: 6px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.onx {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.onx img { max-width: 100%; height: auto; display: block; }
.onx a { color: var(--blue-deep); }
.onx h1, .onx h2, .onx h3 { font-family: var(--display); color: var(--ink); margin: 0; text-wrap: balance; }
.onx p { margin: 0; }

.onx-wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }

.onx-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.onx-skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff !important; padding: 10px 16px; border-radius: var(--radius);
}
.onx-skip:focus { top: 12px; }

.onx :focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

/* ---------- en-tête ---------- */

.onx-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.admin-bar .onx-header { top: 32px; }
.onx-header.is-scrolled { border-bottom-color: var(--rule); box-shadow: 0 6px 20px rgba(21, 26, 31, 0.05); }

.onx-header__inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.onx-brand img { height: 34px; width: auto; }

.onx-nav { display: flex; align-items: center; gap: 28px; }
.onx-nav a:not(.onx-btn) {
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
  padding-block: 6px; border-bottom: 2px solid transparent;
}
.onx-nav a:not(.onx-btn):hover { color: var(--blue-deep); border-bottom-color: var(--blue); }

.onx-menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; position: relative;
}
.onx-menu-toggle__bar,
.onx-menu-toggle__bar::before,
.onx-menu-toggle__bar::after {
  position: absolute; left: 11px; width: 20px; height: 2px; background: var(--ink); content: "";
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.onx-menu-toggle__bar { top: 21px; }
.onx-menu-toggle__bar::before { left: 0; top: -6px; }
.onx-menu-toggle__bar::after { left: 0; top: 6px; }
.onx-menu-toggle[aria-expanded="true"] .onx-menu-toggle__bar { background: transparent; }
.onx-menu-toggle[aria-expanded="true"] .onx-menu-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.onx-menu-toggle[aria-expanded="true"] .onx-menu-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- boutons ---------- */

.onx-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-weight: 600; font-size: 16px; line-height: 1;
  padding: 15px 24px; border-radius: var(--radius);
  background: var(--blue-deep); color: #fff !important; text-decoration: none;
  border: 1.5px solid var(--blue-deep);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.onx-btn:hover { background: var(--blue-darker); border-color: var(--blue-darker); }
.onx-btn--ghost { background: transparent; color: var(--blue-deep) !important; }
.onx-btn--ghost:hover { background: var(--blue-soft); color: var(--blue-darker) !important; border-color: var(--blue-darker); }
.onx-btn--small { padding: 11px 18px; font-size: 15px; }

.onx-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- typographie commune ---------- */

.onx-eyebrow {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-deep);
  margin-bottom: 14px !important;
}

.onx h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.005em; }
.onx h3 { font-size: 1.22rem; font-weight: 500; line-height: 1.25; }

.onx-section { padding-block: clamp(4rem, 8vw, 6.5rem); scroll-margin-top: calc(var(--header-h) + 8px); }
.onx-section__intro { max-width: 60ch; color: var(--muted); font-size: 1.06rem; margin-top: 16px !important; }

/* ---------- héro ---------- */

.onx-hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(var(--rule) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--ground);
  background-blend-mode: normal;
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.onx-hero::after {
  /* Adoucit la trame vers le bas et les côtés */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 30% 40%, transparent 35%, var(--ground) 85%);
}

.onx-hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}

.onx-hero h1 {
  font-size: clamp(2.15rem, 4.4vw, 3.5rem); font-weight: 500;
  line-height: 1.07; letter-spacing: -0.012em;
}

.onx-lede { font-size: 1.14rem; color: var(--muted); max-width: 56ch; margin-top: 22px !important; }

.onx-hero .onx-actions { margin-top: 34px; }

.onx-offres__label {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--ink);
  margin: 30px 0 14px !important;
}

.onx-hero__visuel { position: relative; aspect-ratio: 1 / 1; max-width: 460px; width: 100%; justify-self: end; }

.onx-x { width: 100%; height: 100%; display: block; }
.onx-x__fort { stroke: var(--blue); stroke-width: 54; stroke-linecap: butt; }
.onx-x__fin { stroke: var(--ink); stroke-width: 2; opacity: 0.22; }

.onx-panneau {
  position: absolute; left: -8%; bottom: 6%;
  margin: 0; min-width: 290px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(21, 26, 31, 0.1);
  padding: 8px 18px;
  font-family: var(--mono); font-size: 13.5px;
}
.onx-panneau div {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 9px 0; border-bottom: 1px dashed var(--rule);
}
.onx-panneau div:last-child { border-bottom: 0; }
.onx-panneau dt { color: var(--ink); font-weight: 500; white-space: nowrap; }
.onx-panneau dt::before {
  content: ""; display: inline-block; width: 7px; height: 7px;
  background: var(--blue); margin-right: 9px; vertical-align: 1px;
}
.onx-panneau dd { margin: 0; color: var(--muted); text-align: right; }

/* ---------- services ---------- */

.onx-cartes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
  margin-top: 44px;
}
.onx-carte {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px 24px 28px; background: var(--surface);
  display: flex; flex-direction: column; gap: 12px;
}
.onx-carte h3 { font-size: 1.25rem; }
.onx-carte p { color: var(--muted); font-size: 0.98rem; }

/* ---------- offres ---------- */

.onx-section--offre { background: var(--ground); }

.onx-puces {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.onx-puces li {
  font-family: var(--mono); font-size: 13.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 999px;
  padding: 7px 14px 7px 12px;
}
.onx-puces li::before { content: "✓"; color: var(--blue-deep); font-weight: 600; margin-right: 8px; }

.onx-offre {
  margin-top: 56px; padding-top: 44px; border-top: 1px solid var(--rule);
  scroll-margin-top: calc(var(--header-h) + 8px);
}
.onx-offre h3 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); }
.onx-offre__texte { color: var(--muted); margin-top: 12px !important; }
.onx-grille-tarifs { margin-top: 32px; }
.onx-grille-tarifs stripe-pricing-table { display: block; width: 100%; }

/* ---------- méthode ---------- */

.onx-section--sombre { background: var(--ink); color: #d7dee5; }
.onx-section--sombre h2, .onx-section--sombre h3 { color: #fff; }
.onx-section--sombre .onx-eyebrow { color: var(--blue-on-dark); }

.onx-etapes {
  list-style: none; margin: 48px 0 0; padding: 0; counter-reset: etape;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
}
.onx-etapes li {
  counter-increment: etape;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.onx-etapes li::before {
  content: counter(etape, decimal-leading-zero);
  font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--blue-on-dark);
  letter-spacing: 0.08em;
}
.onx-etapes p { color: #b9c3cd; font-size: 0.99rem; }

/* ---------- contact ---------- */

.onx-contact__grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.onx-contact__carte {
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--ground);
  padding: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.onx-contact__tel {
  font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 500;
  color: var(--ink) !important; text-decoration: none; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.onx-contact__tel:hover { color: var(--blue-deep) !important; }
.onx-contact__carte address { font-style: normal; color: var(--muted); margin-bottom: 8px; }

/* ---------- pied de page ---------- */

.onx-footer { background: var(--ink); color: #9aa6b2; padding-block: 44px; font-size: 14.5px; }
.onx-footer__grid {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px 40px; align-items: start;
}
.onx-footer__nom { font-family: var(--display); font-size: 1.2rem; font-weight: 500; color: #fff; letter-spacing: 0.02em; }
.onx-footer__nom span {
  display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue-on-dark); margin-top: 4px;
}
.onx-footer__legal { max-width: 62ch; }
.onx-footer__liens { display: flex; flex-direction: column; gap: 6px; }
.onx-footer__liens a { color: #d7dee5; text-decoration: none; }
.onx-footer__liens a:hover { color: #fff; text-decoration: underline; }
.onx-footer__copy { grid-column: 1 / -1; font-family: var(--mono); font-size: 12.5px; color: #6f7c88; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 18px; }

/* ---------- adaptatif ---------- */

@media (max-width: 1080px) {
  .onx-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .onx-menu-toggle { display: inline-block; }
  .onx-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--rule);
    padding: 8px 24px 20px; box-shadow: 0 16px 30px rgba(21, 26, 31, 0.08);
    display: none;
  }
  .onx-nav.is-open { display: flex; }
  .onx-nav a:not(.onx-btn) { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
  .onx-nav .onx-btn { margin-top: 16px; }

  .onx-hero__grid { grid-template-columns: 1fr; }
  .onx-hero__visuel { justify-self: center; max-width: 340px; margin-top: 8px; }
  .onx-panneau { left: 50%; transform: translateX(-50%); bottom: -4%; }

  .onx-etapes { grid-template-columns: 1fr; gap: 8px; }
  .onx-contact__grid { grid-template-columns: 1fr; }
  .onx-footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
  .admin-bar .onx-header { top: 46px; }
}

@media (max-width: 600px) {
  body.onx { font-size: 16px; }
  .onx-wrap { padding-inline: 18px; }
  .onx-cartes { grid-template-columns: 1fr; }
  .onx-brand img { height: 28px; }
  .onx-actions .onx-btn { flex: 1 1 100%; }
  .onx-contact__carte { padding: 24px; }
  .onx-contact__carte .onx-btn { width: 100%; }
  /* Sur téléphone, le « X » est retiré : le panneau seul porte l'information. */
  .onx-hero__visuel { aspect-ratio: auto; max-width: none; margin-top: 12px; }
  .onx-x { display: none; }
  .onx-panneau { position: static; transform: none; min-width: 0; width: 100%; box-shadow: 0 10px 24px rgba(21, 26, 31, 0.07); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .onx * { transition: none !important; }
}
