/* AutiHome marketing site */
:root {
  --primary: #2e7fc4;
  --gradient-start: #52a5e2;
  --gradient-end: #16365b;
  --accent: #8dc8ec;
  --soft: #eaf5fc;
  --text: #16365b;
  --text-muted: #4a6a85;
  --white: #ffffff;
  --puzzle-y: #f8b833;
  --puzzle-r: #f36840;
  --puzzle-g: #35b9b1;
  --radius: 18px;
  --font-display: "Outfit", sans-serif;
  --font-body: "Nunito", sans-serif;
  --shadow-soft: none;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--white);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(240, 247, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30, 111, 217, 0.08);
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark img {
  border-radius: 10px;
}

.site-nav {
  display: none;
  gap: 1.25rem;
  margin-left: 0.5rem;
}

.site-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--primary);
}

.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.header-actions .btn {
  display: none;
}

.header-actions .btn.is-hidden-authed {
  display: none !important;
}

body.is-authed .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(46, 127, 196, 0.12);
}

body.is-authed .site-nav {
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: #f4f9fd;
  border: 1px solid rgba(46, 127, 196, 0.1);
}

body.is-authed .site-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

body.is-authed .site-nav a:hover {
  background: rgba(82, 165, 226, 0.12);
  color: var(--primary);
  text-decoration: none;
}

body.is-authed .site-nav a.is-current {
  background: var(--white);
  color: var(--primary);
  box-shadow: none;
  border: 1px solid rgba(46, 127, 196, 0.14);
}

.lang-menu-host--desktop {
  display: none;
  position: relative;
}

@media (min-width: 900px) {
  .lang-menu-host--desktop {
    display: block;
  }
}

.lang-menu {
  position: relative;
}

.lang-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(46, 127, 196, 0.22);
  border-radius: 10px;
  background: var(--white);
  padding: 0.4rem 0.65rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--navy, #16365b);
  cursor: pointer;
  line-height: 1;
}

.lang-menu__trigger:hover {
  border-color: rgba(46, 127, 196, 0.4);
  background: #f4f9fd;
}

.lang-menu__globe {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
  opacity: 0.7;
  flex-shrink: 0;
}

.lang-menu__globe::before,
.lang-menu__globe::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.55;
}

.lang-menu__globe::before {
  border-top: 0;
  border-bottom: 0;
  transform: scaleX(0.55);
}

.lang-menu__globe::after {
  top: 50%;
  bottom: 50%;
  inset-inline: -1px;
  border: 0;
  border-top: 1px solid currentColor;
  border-radius: 0;
}

.lang-menu__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
  margin-inline-start: 0.1rem;
}

.lang-menu.is-open .lang-menu__caret {
  transform: rotate(180deg);
}

.lang-menu__panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 11.5rem;
  padding: 0.35rem;
  background: var(--white);
  border: 1px solid rgba(46, 127, 196, 0.16);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(22, 54, 91, 0.12);
  z-index: 80;
}

.lang-menu.is-open .lang-menu__panel {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lang-menu__option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  text-align: start;
}

.lang-menu__option:hover {
  background: #f4f9fd;
}

.lang-menu__option.is-active {
  background: rgba(82, 165, 226, 0.14);
  color: var(--primary);
  font-weight: 700;
}

.lang-menu__code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: #eef6fc;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--navy, #16365b);
}

.lang-menu__option.is-active .lang-menu__code {
  background: var(--primary);
  color: var(--white);
}

.lang-menu__label {
  flex: 1;
}

.mobile-lang {
  margin-top: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(46, 127, 196, 0.12);
}

.mobile-lang__title {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mobile-lang__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-lang__btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid rgba(46, 127, 196, 0.14);
  border-radius: 10px;
  background: var(--white);
  padding: 0.7rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
  text-align: start;
}

.mobile-lang__btn strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  background: #eef6fc;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--navy, #16365b);
}

.mobile-lang__btn.is-active {
  border-color: rgba(82, 165, 226, 0.45);
  background: rgba(82, 165, 226, 0.1);
  color: var(--primary);
  font-weight: 700;
}

.mobile-lang__btn.is-active strong {
  background: var(--primary);
  color: var(--white);
}

.footer-lang-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.site-footer__langs li:has(.footer-lang-btn.is-active),
.site-footer__langs .footer-lang-btn.is-active {
  background: rgba(82, 165, 226, 0.35);
  color: var(--white);
}

html[dir="rtl"] body,
html[dir="rtl"] .site-header,
html[dir="rtl"] .mobile-nav,
html[dir="rtl"] .hero,
html[dir="rtl"] .site-footer {
  text-align: right;
}

html[dir="rtl"] .lang-menu__option,
html[dir="rtl"] .mobile-lang__btn {
  text-align: right;
}

html[dir="rtl"] .site-nav,
html[dir="rtl"] .header-actions,
html[dir="rtl"] .site-header__inner,
html[dir="rtl"] .mobile-nav {
  direction: rtl;
}

.nav-toggle {
  margin-left: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 1.25rem 1rem;
  background: var(--soft);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 0.75rem 0;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid rgba(30, 111, 217, 0.08);
  text-decoration: none;
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }

  .header-actions .btn:not(.is-hidden-authed) {
    display: inline-flex;
  }

  body.is-authed .header-actions .btn--primary[data-i18n="nav.cta"],
  body.is-authed .header-actions a.btn[href="#telecharger"] {
    display: none !important;
  }

  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 650;
  border-radius: 14px;
  border: 2px solid transparent;
  padding: 0.7rem 1.2rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
}

.btn--primary:hover {
  background: #165db8;
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.section--cta .btn--ghost {
  color: var(--primary);
  border-color: rgba(30, 111, 217, 0.35);
}

.section--cta .btn--ghost:hover {
  background: rgba(30, 111, 217, 0.06);
  color: var(--primary);
}

.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.btn--lg {
  padding: 0.9rem 1.45rem;
  font-size: 1.05rem;
}

.hero .btn--primary {
  background: var(--white);
  color: var(--primary);
}

.hero .btn--primary:hover {
  background: #e8f3fb;
  color: var(--primary);
}

/* Hero — one full-bleed composition, brand first, logo as visual plane */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  overflow: hidden;
  color: var(--white);
  padding: 1.75rem 1.25rem 2.25rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    var(--gradient-start) 0%,
    #2e7fc4 48%,
    var(--gradient-end) 100%
  );
  background-size: 160% 160%;
  animation: gradientShift 14s ease-in-out infinite alternate;
  z-index: 0;
}

.hero__pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.35) 0%, transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(126, 200, 240, 0.45) 0%, transparent 32%),
    radial-gradient(circle at 50% 88%, rgba(255, 255, 255, 0.16) 0%, transparent 42%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 36px,
      rgba(255, 255, 255, 0.04) 36px,
      rgba(255, 255, 255, 0.04) 37px
    );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
}

.hero__visual {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero__logo {
  width: min(52vw, 260px);
  height: auto;
  border-radius: 22%;
  animation: logoFloat 5.5s ease-in-out infinite;
  filter: drop-shadow(0 16px 36px rgba(0, 32, 96, 0.22));
}

.hero__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.22em;
  line-height: 0.95;
  color: var(--white);
  text-shadow: 0 2px 24px rgba(0, 40, 100, 0.2);
  opacity: 0;
  animation: fadeUp 0.9s ease 0.15s forwards;
}

.hero__headline {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 600;
  max-width: 24ch;
  margin: 0 auto 0.5em;
  color: var(--white);
  opacity: 0;
  animation: fadeUp 0.9s ease 0.35s forwards;
}

.hero__lead {
  font-size: clamp(0.98rem, 2vw, 1.08rem);
  max-width: 36ch;
  margin: 0 auto 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  animation: fadeUp 0.9s ease 0.5s forwards;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.65s forwards;
}

@media (min-width: 900px) {
  .hero {
    gap: 1.75rem;
    padding: 2.25rem 2rem 2.75rem;
  }

  .hero__logo {
    width: min(34vw, 360px);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 40%;
  }
  100% {
    background-position: 100% 60%;
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg,
  .hero__logo,
  .hero__brand,
  .hero__headline,
  .hero__lead,
  .hero__cta {
    animation: none !important;
    opacity: 1;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Scroll reveal (subtle) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Disclaimer */
.disclaimer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem 3.5rem;
}

.disclaimer p {
  margin: 0;
  padding: 1.1rem 1.2rem;
  background: var(--white);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  box-shadow: var(--shadow-soft);
}

/* Sections */
.section {
  padding: 4.5rem 1.25rem;
}

.section--soft {
  background:
    radial-gradient(ellipse at 10% 0%, rgba(126, 200, 240, 0.25), transparent 45%),
    radial-gradient(ellipse at 90% 100%, rgba(52, 152, 219, 0.12), transparent 40%),
    var(--soft);
}

.section__inner {
  max-width: 960px;
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: 640px;
  text-align: center;
}

.section__header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.5rem;
}

.section h2 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  color: var(--text);
}

.section__text {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Features — alternating open layout, not card grid */
.feature {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(30, 111, 217, 0.1);
}

.feature:last-child {
  border-bottom: 0;
}

.feature__media {
  width: 140px;
  height: 140px;
  border-radius: 32px;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.feature__media--yellow {
  background: linear-gradient(145deg, #fff6d0, #ffe58a);
}

.feature__media--red {
  background: linear-gradient(145deg, #ffe0dc, #ffb3ab);
}

.feature__media--green {
  background: linear-gradient(145deg, #d9f5e6, #a8e6c5);
}

.feature__media--cyan {
  background: linear-gradient(145deg, #e4f4fc, #b7e3f7);
}

.feature__body {
  text-align: center;
}

.feature__body h3 {
  font-size: 1.45rem;
  margin-bottom: 0.4em;
}

.feature__body p {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

@media (min-width: 760px) {
  .feature {
    grid-template-columns: 160px 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0;
  }

  .feature--rtl {
    grid-template-columns: 1fr 160px;
  }

  .feature--rtl .feature__media {
    order: 2;
  }

  .feature--rtl .feature__body {
    order: 1;
    text-align: right;
  }

  .feature--ltr .feature__body {
    text-align: left;
  }

  .feature__media {
    margin: 0;
  }
}

/* CTA */
.section--cta {
  background:
    radial-gradient(circle at 50% 0%, rgba(52, 152, 219, 0.18), transparent 55%),
    linear-gradient(180deg, var(--soft), #e6f2fb);
}

.cta-block h2 {
  margin-bottom: 0.5em;
}

.cta-block > p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0 1rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 0.85rem 1.2rem;
  border-radius: 14px;
  background: var(--text);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 650;
  text-decoration: none;
  opacity: 0.85;
  pointer-events: none;
}

/* Footer */
.site-footer {
  background: #0f2a4a;
  color: rgba(255, 255, 255, 0.85);
  padding: 2.75rem 1.25rem 2rem;
}

.site-footer a {
  color: var(--accent);
}

.site-footer__inner {
  max-width: 960px;
  margin: 0 auto 1.75rem;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 700px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer__brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.site-footer__brand img {
  border-radius: 12px;
}

.site-footer__brand strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  display: block;
}

.site-footer__brand p {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.65);
}

.site-footer__langs span {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--white);
}

.site-footer__langs ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site-footer__langs li {
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__api {
  opacity: 0.7;
  font-size: 0.92rem;
}

.site-footer__api:hover {
  opacity: 1;
}

.site-footer__admin {
  opacity: 0.45;
  font-size: 0.88rem;
}

.site-footer__admin:hover {
  opacity: 0.85;
}

.site-footer__disclaimer,
.site-footer__copy {
  max-width: 960px;
  margin: 0 auto;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__copy {
  margin-top: 0.75rem;
}

/* ========== API docs page ========== */
.docs-body {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(126, 200, 240, 0.2), transparent 40%),
    var(--soft);
}

.docs-hero {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: var(--white);
  padding: 3.5rem 1.25rem 3rem;
}

.docs-hero__inner {
  max-width: 960px;
  margin: 0 auto;
}

.docs-hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 0.4em;
}

.docs-hero p {
  max-width: 48ch;
  opacity: 0.92;
  font-size: 1.1rem;
}

.docs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.docs-meta code {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.88rem;
}

.docs-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.docs-section {
  margin-bottom: 2.75rem;
}

.docs-section h2 {
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(30, 111, 217, 0.15);
}

.docs-section > p {
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(30, 111, 217, 0.08);
}

table.endpoint-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 640px;
}

.endpoint-table th,
.endpoint-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(30, 111, 217, 0.08);
  vertical-align: top;
}

.endpoint-table th {
  font-family: var(--font-display);
  font-weight: 700;
  background: #e8f3fb;
  color: var(--text);
  white-space: nowrap;
}

.endpoint-table tr:last-child td {
  border-bottom: 0;
}

.method {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  color: var(--white);
}

.method--get {
  background: var(--puzzle-g);
}

.method--post {
  background: var(--primary);
}

.method--put {
  background: var(--puzzle-y);
  color: #16365b;
}

.method--delete {
  background: var(--puzzle-r);
}

.endpoint-table code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  color: #0f2a4a;
}

.auth-note {
  background: var(--white);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.15rem;
  border-radius: 0 12px 12px 0;
  color: var(--text-muted);
}

.docs-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  text-decoration: none;
}

.docs-back:hover {
  color: var(--white);
}

/* —— Auth & account —— */
.account-slot {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  z-index: 60;
}

.account-guest {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.account-guest__login {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(46, 127, 196, 0.18);
  background: var(--white);
}

.account-guest__login:hover {
  border-color: rgba(46, 127, 196, 0.35);
  background: #f4f9fd;
}

.account-guest__register {
  display: inline-flex !important;
}

/* Avatar + sous-menu compte */
.account-menu {
  position: relative;
}

.account-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.2rem 0.35rem 0.2rem 0.2rem;
  border: 1px solid rgba(46, 127, 196, 0.16);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.account-menu__trigger:hover,
.account-menu.is-open .account-menu__trigger {
  border-color: rgba(46, 127, 196, 0.35);
  background: #f4f9fd;
}

.account-menu__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #eaf5fc;
}

.account-menu__caret {
  width: 0;
  height: 0;
  margin-inline-end: 0.2rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  transition: transform 0.15s ease;
}

.account-menu.is-open .account-menu__caret {
  transform: rotate(180deg);
}

.account-menu__panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(280px, calc(100vw - 1.5rem));
  padding: 0.65rem;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid rgba(46, 127, 196, 0.14);
  box-shadow: 0 12px 32px rgba(22, 54, 91, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 80;
}

.account-menu.is-open .account-menu__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.account-menu__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.35rem 0.7rem;
  border-bottom: 1px solid rgba(46, 127, 196, 0.1);
  margin-bottom: 0.55rem;
}

.account-menu__head img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #eaf5fc;
  flex-shrink: 0;
}

.account-menu__head strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu__head span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.account-menu__wallet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.curr-icon {
  display: inline-block;
  vertical-align: -3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.curr-icon--lg {
  width: 22px;
  height: 22px;
  vertical-align: -5px;
}

.account-menu__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  background: #f4f9fd;
  border: 1px solid rgba(46, 127, 196, 0.1);
  text-decoration: none;
  color: inherit;
}

.account-menu__stat-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.account-menu__stat:hover {
  border-color: rgba(46, 127, 196, 0.3);
  text-decoration: none;
}

.account-menu__stat small {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.account-menu__stat b {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.account-menu__stat--pts small {
  color: #b8860b;
}

.account-menu__stat--coins {
  background: rgba(46, 127, 196, 0.1);
}

.account-menu__stat--coins small {
  color: var(--primary);
}

.account-menu__link {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.account-menu__link:hover {
  background: #f4f9fd;
  color: var(--primary);
  text-decoration: none;
}

.account-menu__logout {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: start;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: #c44a2a;
  cursor: pointer;
}

.account-menu__logout:hover {
  background: rgba(243, 104, 64, 0.1);
}

.account-bar,
.account-chip {
  display: none;
}

@media (max-width: 899px) {
  .account-guest__register {
    padding-inline: 0.7rem;
  }

  .account-menu__panel {
    right: -0.25rem;
  }
}

/* —— Espace membre —— */
.member-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.member-hero {
  margin-bottom: 1.75rem;
}

.member-hero__identity {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.member-hero__avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 2px solid rgba(30, 111, 217, 0.2);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
  flex-shrink: 0;
}

.member-hero__lead {
  color: var(--text-muted);
  margin: 0;
}

.member-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .member-grid {
    grid-template-columns: 1fr 1fr;
  }

  .member-card--wide {
    grid-column: 1 / -1;
  }
}

.member-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(30, 111, 217, 0.08);
}

.member-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.member-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.member-points__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--text-muted);
}

.member-points strong {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary);
  line-height: 1;
}

.member-points__item--pts strong {
  color: #b8860b;
}

.member-grade #member-grade-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.member-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.member-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.member-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.member-table th,
.member-table td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid rgba(22, 50, 79, 0.08);
}

.member-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.member-empty {
  color: var(--text-muted);
  text-align: center !important;
  padding: 1rem !important;
}

.member-unlocks {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.member-unlocks li {
  margin-bottom: 0.35rem;
}

.member-unlocks strong {
  color: var(--text);
  text-transform: capitalize;
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }

  .header-actions .btn:not(.is-hidden-authed) {
    display: inline-flex;
  }

  body.is-authed .header-actions .btn--primary[data-i18n="nav.cta"],
  body.is-authed .header-actions a.btn[href="#telecharger"] {
    display: none !important;
  }

  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }
}

.auth-page {
  min-height: calc(100vh - var(--header-h) - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(126, 200, 240, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(30, 111, 217, 0.12), transparent 50%),
    var(--soft);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-soft);
}

.auth-lead {
  color: var(--text-muted);
  margin-top: -0.25rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.5rem 0 1rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.auth-form input {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid rgba(30, 111, 217, 0.2);
  border-radius: 12px;
  color: var(--text);
  background: var(--soft);
}

.auth-form input:focus {
  outline: 2px solid rgba(30, 111, 217, 0.35);
  border-color: var(--primary);
  background: var(--white);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -0.4rem 0 0;
}

.form-hint-inline {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.avatar-picker {
  margin: 0.25rem 0 0;
  padding: 0;
  border: 0;
}

.avatar-picker legend {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.55rem;
}

.avatar-picker__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

@media (max-width: 420px) {
  .avatar-picker__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.avatar-picker__btn {
  display: grid;
  place-items: center;
  padding: 0.35rem;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--soft);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar-picker__btn img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
}

.avatar-picker__btn.is-selected {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(30, 111, 217, 0.2);
  transform: scale(1.03);
  background: var(--white);
}

.form-error {
  background: rgba(231, 76, 60, 0.1);
  color: #b33a2b;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
}

.auth-switch {
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-legal {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  line-height: 1.45;
}

/* —— Shop —— */
.shop-hero {
  padding: 2.5rem 1.25rem 2rem;
  background:
    linear-gradient(135deg, rgba(52, 152, 219, 0.18), rgba(0, 82, 212, 0.08)),
    var(--soft);
  border-bottom: 1px solid rgba(30, 111, 217, 0.08);
}

.shop-hero__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.shop-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.shop-hero__lead {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.mock-badge {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a5a00;
  background: #ffe8a3;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.shop-balance {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--white);
  padding: 0.65rem 1.1rem;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  color: var(--text-muted);
}

.pack-card__points,
.plan-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.shop-balance strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--primary);
}

.shop-alert {
  margin: 1rem auto 0;
  max-width: 520px;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
}

.shop-alert--ok {
  background: rgba(39, 174, 96, 0.12);
  color: #1e7a45;
}

.shop-alert--err {
  background: rgba(231, 76, 60, 0.1);
  color: #b33a2b;
}

.compare-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .compare-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.compare-item {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(30, 111, 217, 0.1);
}

.compare-item--accent {
  background: linear-gradient(160deg, #2e7fc4 0%, #16365b 100%);
  color: var(--white);
  border: 0;
}

.compare-item--accent h3,
.compare-item--accent p {
  color: var(--white);
}

.compare-item--accent .btn--primary {
  background: var(--white);
  color: var(--primary);
}

.compare-item p {
  color: var(--text-muted);
}

.pack-grid {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 720px) {
  .pack-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pack-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  border: 1px solid rgba(30, 111, 217, 0.1);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pack-card__points {
  font-size: 1.35rem;
  margin: 0.25rem 0;
}

.pack-card__points strong {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary);
}

.pack-card__price {
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.plan-box .plan-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  text-align: center;
  border: 2px solid rgba(30, 111, 217, 0.2);
}

.plan-card__meta {
  font-size: 1.1rem;
  margin: 1rem 0 1.25rem;
}

.sub-status {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(39, 174, 96, 0.12);
  color: #1e7a45;
  font-weight: 600;
  text-align: center;
}

.muted {
  color: var(--text-muted);
}

.site-nav a.is-current {
  color: var(--primary);
}

.member-grade {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(30, 111, 217, 0.12);
}

.member-grade__bar {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(30, 111, 217, 0.12);
  overflow: hidden;
  margin: 0.5rem 0 0.75rem;
}

.member-grade__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #52a5e2, #35b9b1);
  border-radius: inherit;
}

.member-badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.member-badges li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.member-badges li.is-earned {
  color: #1e7a45;
  font-weight: 700;
}
