/* ==========================================================================
   1. IMPORTS & CONFIGURATION (VARIABLES)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  /* Colors */
  --bg: #050b18;
  --bg2: #07152c;
  --panel: #0b1c36;
  --panel2: #0d2343;
  --text: #f4f8ff;
  --muted: #a9bad4;
  --blue: #1687ff;
  --cyan: #22d3ee;
  --gold: #ffbd28;
  --green: #58c96b;
  --line: rgba(255, 255, 255, 0.1);

  /* Layout & Decor */
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

/* ==========================================================================
   2. BASE & RESET
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: 
    radial-gradient(circle at 75% 8%, rgba(16, 107, 255, 0.18), transparent 30%),
    radial-gradient(circle at 12% 28%, rgba(34, 211, 238, 0.08), transparent 25%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: Manrope, Inter, sans-serif;
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 0;
}

h1 {
  font-size: clamp(46px, 6.4vw, 80px);
  margin: 24px 0;
}

/* ==========================================================================
   3. LAYOUT & REUSABLE COMPONENTS
   ========================================================================== */

/* Layout Container */
.container {
  width: min(1180px, 92%);
  margin: auto;
}

/* Section Containers */
.section {
  padding: 105px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 45px;
}

.section h2 {
  font-size: clamp(34px, 4.5vw, 56px);
}

.section-head p {
  color: var(--muted);
  font-size: 17px;
}

.dark-band {
  background: linear-gradient(180deg, #06152d, #091e3a);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Grids */
.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 13px;
  padding: 13px 19px;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid transparent;
  transition: 0.25s;
}

.btn-primary {
  background: linear-gradient(135deg, #1687ff, #0054d8);
  box-shadow: 0 12px 28px rgba(0, 108, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

/* Cards & Icons */
.card {
  background: linear-gradient(145deg, rgba(17, 43, 78, 0.8), rgba(8, 22, 42, 0.82));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
}

.card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.icon {
  width: 45px;
  height: 45px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #147eff, #13c9e5);
  font-weight: 900;
  margin-bottom: 20px;
}

/* Badges & Labels */
.eyebrow {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.06);
  color: #8eeeff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
}

.kicker {
  color: #54d9ef;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 13px;
}

.pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(88, 201, 107, 0.1);
  border: 1px solid rgba(88, 201, 107, 0.25);
  color: #8be39a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.badge {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #cbd9ea;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 700;
}

.gradient {
  background: linear-gradient(90deg, #fff 10%, #70bfff 48%, #20d6ed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mobile {
  display: none;
}

/* ==========================================================================
   4. NAVIGATION
   ========================================================================== */

.nav {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(5, 11, 24, 0.7);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-inner {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

/* Logo Bannière Corriger */
.brand img {
  height: 64px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.brand span {
  font-size: 22px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.links {
  display: flex;
  gap: 28px;
  align-items: center;
  color: #c7d4e8;
  font-size: 14px;
  font-weight: 600;
}

.links a:hover {
  color: #fff;
}

/* ==========================================================================
   5. HERO SECTION & ARTWORKS
   ========================================================================== */

.hero {
  padding: 155px 0 100px;
  min-height: 760px;
  position: relative;
  overflow: hidden;
}

.subhero {
  padding: 140px 0 80px;
  background: radial-gradient(circle at 80% 20%, rgba(18, 135, 255, 0.18), transparent 35%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  gap: 55px;
  align-items: center;
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 670px;
}

.hero-actions {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  margin: 30px 0;
}

.trust {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  color: #9fb1cb;
  font-size: 12px;
  margin-top: 22px;
}

.trust strong {
  color: #fff;
}

/* Visual Artwork / Hero Elements */
.hero-art {
  position: relative;
  min-height: 510px;
  display: grid;
  place-items: center;
}

.orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(32, 211, 238, 0.25), rgba(0, 89, 255, 0.12) 45%, transparent 70%);
  filter: blur(4px);
}

.ring {
  position: absolute;
  width: 410px;
  height: 410px;
  border: 1px solid rgba(43, 145, 255, 0.35);
  border-radius: 50%;
  box-shadow: inset 0 0 50px rgba(24, 137, 255, 0.12), 0 0 70px rgba(24, 137, 255, 0.12);
  animation: spin 18s linear infinite;
}

.ring:after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #20d6ed;
  box-shadow: 0 0 24px #20d6ed;
  top: 35px;
  left: 75px;
}

.device {
  position: relative;
  width: 300px;
  padding: 22px;
  border-radius: 32px;
  background: linear-gradient(145deg, #132f58, #071426);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
  transform: rotate(-5deg);
}

.device img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.4));
}

.chip {
  position: absolute;
  right: -32px;
  top: 62px;
  background: rgba(8, 25, 50, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.13);
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  font-size: 12px;
}

.chip b {
  display: block;
  color: #fff;
  font-size: 18px;
}

.chip span {
  color: #8ea8c8;
}

/* ==========================================================================
   6. PAGE SECTIONS & SPECIFIC COMPONENTS
   ========================================================================== */

/* Process / Flow Section */
.flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
}

.step {
  padding: 28px 20px;
  position: relative;
  background: rgba(255, 255, 255, 0.025);
  min-height: 175px;
}

.step:not(:last-child):after {
  content: "→";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  color: #1ea8ff;
  font-size: 20px;
  z-index: 2;
}

.num {
  font-size: 11px;
  color: #55d9ef;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.step h3 {
  font-size: 18px;
  margin: 18px 0 8px;
}

.step p {
  color: var(--muted);
  font-size: 13px;
}

/* Code Display Section */
.code-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: stretch;
}

.code-panel {
  border-radius: 22px;
  background: #030913;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-head {
  padding: 14px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #91a5bf;
  font-size: 12px;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4d6079;
}

.code {
  padding: 24px;
  font: 13px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #b9d4f4;
  overflow: auto;
}

.code .key { color: #56d9ef; }
.code .str { color: #ffcf68; }
.code .green { color: #7ce38d; }

/* Features Section */
.feature-list {
  display: grid;
  gap: 12px;
}

.feature {
  display: flex;
  gap: 15px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 17px;
}

.feature b {
  display: block;
  margin-bottom: 4px;
}

.feature span {
  color: var(--muted);
  font-size: 13px;
}

/* Use Cases Section */
.usecases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.usecase {
  min-height: 190px;
  border-radius: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(13, 38, 70, 0.9), rgba(6, 19, 37, 0.8));
  position: relative;
  overflow: hidden;
}

.usecase:after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  right: -45px;
  bottom: -55px;
  background: rgba(25, 146, 255, 0.13);
}

.usecase h3 {
  font-size: 23px;
  margin: 30px 0 10px;
}

.usecase p {
  color: var(--muted);
  font-size: 14px;
}

/* Q-Section */
.q-section {
  position: relative;
  overflow: hidden;
}

.q-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 45px;
  align-items: center;
}

.q-image {
  border-radius: 25px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  background: #fff;
}

.q-image img {
  width: 100%;
  display: block;
}

/* Call To Action (CTA) Section */
.cta {
  padding: 90px 0;
}

.cta-box {
  border-radius: 30px;
  padding: 55px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0d3f83, #061b3a 60%, #07294c);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
}

.cta-box:after {
  content: "";
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  right: -170px;
  top: -230px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.24), transparent 65%);
}

.cta-box p {
  max-width: 700px;
  color: #bfd0e5;
}

/* Footer Section */
.footer {
  padding: 35px 0;
  border-top: 1px solid var(--line);
  color: #879bb7;
  font-size: 12px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ==========================================================================
   7. ANIMATIONS
   ========================================================================== */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   8. MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================================================== */

/* Tablet Breakdown */
@media (max-width: 980px) {
  .links {
    display: none;
  }

  .mobile {
    display: block;
  }

  .hero-grid,
  .code-wrap,
  .q-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 125px;
  }

  .hero-art {
    min-height: 420px;
  }

  .grid4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow {
    grid-template-columns: repeat(3, 1fr);
  }

  .step:nth-child(3):after {
    display: none;
  }

  .usecases,
  .mini-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile Breakdown */
@media (max-width: 650px) {
  .nav-inner {
    height: 68px;
  }

  /* Logo Mobile Corriger */
  .brand img {
    height: 50px;
    max-width: 170px;
  }

  .brand span {
    font-size: 19px;
  }

  .hero {
    padding-bottom: 65px;
  }

  .hero-art {
    min-height: 340px;
  }

  .device {
    width: 235px;
  }

  .device img {
    height: 230px;
  }

  .ring,
  .orb {
    width: 300px;
    height: 300px;
  }

  .chip {
    right: -5px;
    top: 25px;
  }

  .section {
    padding: 75px 0;
  }

  .grid4,
  .flow,
  .usecases,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .step:not(:last-child):after {
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -14px;
    transform: translateX(-50%);
  }

  .step {
    min-height: auto;
  }

  .cta-box {
    padding: 32px 24px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .q-image {
    order: 2;
  }
}
/* ==========================================================================
   14. OFFRES COMMERCIALES (PRICING) — chargées dynamiquement depuis
   GET /public/offers de xfin-api. Présentation purement informative
   (aucun bouton d'action) : chaque offre a sa propre carte, nettement
   séparée et teintée d'une couleur qui lui est propre.
   ========================================================================== */

.offers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.offers-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 14px;
}

.offers-status.is-error {
  flex-direction: column;
  text-align: center;
}

.offers-status .btn {
  margin-top: 6px;
}

.offers-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--cyan);
  animation: offers-spin 0.8s linear infinite;
  flex: none;
}

@keyframes offers-spin {
  to { transform: rotate(360deg); }
}

/* Carte d'offre : chaque teinte est portée par --accent-h/--accent-s (HSL),
   ce qui permet de dériver fond, bordure et texte de titre en cohérence,
   sans dépendre d'une couleur fixe par offre codée en dur côté HTML. */
.offer-card {
  --accent-h: 205;
  --accent-s: 90%;
  position: relative;
  border-radius: 24px;
  padding: 30px 28px 28px;
  background:
    linear-gradient(165deg, hsla(var(--accent-h), var(--accent-s), 55%, 0.16), hsla(var(--accent-h), var(--accent-s), 20%, 0.06)),
    linear-gradient(180deg, rgba(9, 22, 42, 0.92), rgba(9, 22, 42, 0.92));
  border: 1.5px solid hsla(var(--accent-h), var(--accent-s), 60%, 0.4);
  box-shadow: 0 22px 48px hsla(var(--accent-h), var(--accent-s), 45%, 0.16);
}

.offer-card[data-offer-code="DEVELOPER"] { --accent-h: 189; --accent-s: 85%; }
.offer-card[data-offer-code="BUSINESS"]  { --accent-h: 213; --accent-s: 95%; }
.offer-card[data-offer-code="PREMIUM"]   { --accent-h: 40;  --accent-s: 95%; }

.offer-card--disabled {
  opacity: 0.55;
}

.offer-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.offer-card-name {
  font-family: Manrope, Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: hsl(var(--accent-h), var(--accent-s), 72%);
}

.offer-flag {
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: hsla(var(--accent-h), var(--accent-s), 60%, 0.16);
  border: 1px solid hsla(var(--accent-h), var(--accent-s), 60%, 0.4);
  color: hsl(var(--accent-h), var(--accent-s), 78%);
  white-space: nowrap;
}

.offer-card-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 4px;
}

.offer-card-price b {
  font-family: Manrope, Inter, sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.offer-card-price span {
  color: var(--muted);
  font-size: 12.5px;
}

.offer-card-quota {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 20px;
}

.offer-card-divider {
  height: 1px;
  background: hsla(var(--accent-h), var(--accent-s), 60%, 0.25);
  margin: 0 0 20px;
}

.offer-feature-grid {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.offer-feature-grid li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text);
}

.offer-feature-grid li.is-muted {
  color: var(--muted);
}

.offer-feature-grid .ico {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 900;
  margin-top: 1px;
  background: hsla(var(--accent-h), var(--accent-s), 60%, 0.18);
  color: hsl(var(--accent-h), var(--accent-s), 75%);
}

.offer-feature-grid li.is-muted .ico {
  background: rgba(255, 255, 255, 0.06);
  color: #62728a;
}

/* Points d'information libres (rendu de secours si le catalogue renvoyé
   par l'API arrive sous forme de texte non structuré, voir offers.js). */
.offer-freeform-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offer-freeform-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text);
}

.offer-freeform-list li:before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
  background: hsl(var(--accent-h), var(--accent-s), 65%);
}

.offer-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 16px;
  border-top: 1px solid hsla(var(--accent-h), var(--accent-s), 60%, 0.2);
  font-size: 11.5px;
  color: var(--muted);
}

.offer-card-meta strong {
  color: hsl(var(--accent-h), var(--accent-s), 78%);
  font-weight: 700;
}

.offers-footnote {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.offers-footnote a {
  color: #8eeeff;
  font-weight: 700;
  text-decoration: underline;
}

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

@media (max-width: 650px) {
  .offers-grid {
    grid-template-columns: 1fr;
  }
  .offer-feature-grid {
    grid-template-columns: 1fr;
  }
}
