:root {
  --primary: #2563eb;
  --dark: #0f172a;
  --text: #334155;
  --card: rgba(255, 255, 255, .78);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
}
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Image fixe sur toute la page */
.background-image {
  position: fixed;
  inset: 0;
  background-image: url("./img/xformulai-hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

.background-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
      rgba(15, 23, 42, .88),
      rgba(37, 99, 235, .58));
  z-index: -1;
}

/* Header fixe */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  padding: 24px 8%;
  transition: all .25s ease;
}

.brand {
  color: white;
}

.logo {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1px;
  transition: all .25s ease;
}

.badge {
  margin-top: 6px;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: white;
  font-size: 14px;
  backdrop-filter: blur(8px);
  transition: all .25s ease;
}

.topbar.scrolled {
  padding: 10px 8%;
  background: rgba(15, 23, 42, .82);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, .22);
}

.topbar.scrolled .logo {
  font-size: 24px;
}

.topbar.scrolled .badge {
  font-size: 12px;
  padding: 5px 10px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: white;
  color: var(--primary);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, .45);
  color: white;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 160px 8% 90px;
  color: white;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  width: auto;
  margin: 0;
}

.hero-content {
  max-width: 780px;
}

h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  margin: 0 0 24px;
  letter-spacing: -2px;
}

.hero p {
  font-size: 21px;
  line-height: 1.6;
  color: #e2e8f0;
}

/* Sections */
section:not(.hero) {
  margin: 50px auto;
  padding: 60px;
  width: min(1180px, calc(100% - 32px));
  background: var(--card);
  border-radius: 28px;
  backdrop-filter: blur(10px);
  box-shadow: 0 25px 80px rgba(15, 23, 42, .22);
}

section h2 {
  margin: 0 0 16px;
  color: var(--dark);
  font-size: 38px;
}

section p {
  font-size: 18px;
  line-height: 1.7;
}

.steps,
.demo-grid,
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.card {
  background: white;
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, .08);
}

.number {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #dbeafe;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  margin-bottom: 16px;
}

.card h3 {
  color: var(--dark);
  margin: 0 0 10px;
}

.cta {
  text-align: center;
  color: white;
  background: linear-gradient(135deg,
      rgba(37, 99, 235, .92),
      rgba(15, 23, 42, .92));
}

.cta h2 {
  color: white;
}

.cta p {
  color: #dbeafe;
}

@media(max-width:760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 6%;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-actions .btn {
    flex: 1;
    padding: 11px 14px;
    font-size: 14px;
  }

  .hero {
    padding: 190px 6% 70px;
  }

  section {
    padding: 34px 24px;
  }
}

.footer {
  margin-top: 80px;
  background: rgba(15, 23, 42, .95);
  color: #cbd5e1;
  backdrop-filter: blur(10px);
}

.footer-grid {
  max-width: 1200px;
  margin: auto;
  padding: 60px 30px;

  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer h3,
.footer h4 {
  color: white;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li {
  margin-bottom: 12px;
}

.footer a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 25px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

.footer-bottom p {
  margin: 8px 0;
}

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


  .background-image::after {
    background: rgba(15, 23, 42, .92);
  }

  .background-image {
    background-position: center;
    filter: blur(2px);
    transform: scale(1.05);
  }
}

@media (max-width:768px) {

    section {
        padding:24px 18px;
        margin:20px auto;
    }

    .steps,
    .demo-grid,
    .security-grid {
        grid-template-columns:1fr;
        gap:12px;
        margin-top:16px;
    }

    .card {
        padding:16px;
        border-radius:14px;
    }

    .card h3 {
        font-size:18px;
        margin-bottom:6px;
    }

    .card p {
        font-size:14px;
        line-height:1.5;
        margin:0;
    }

    .number {
        width:32px;
        height:32px;
        margin-bottom:10px;
        font-size:14px;
    }

    section h2 {
        font-size:28px;
    }

    section p {
        font-size:15px;
    }
}

@media (max-width:768px) {

    .steps .card {
        display:flex;
        align-items:flex-start;
        gap:12px;
    }

    .steps .number {
        flex-shrink:0;
        margin-bottom:0;
    }
}

@media (max-width:768px) {

    .topbar {
        width:100%;
        max-width:100%;
        padding:14px 16px;
    }

    .nav-actions {
        width:100%;
        display:flex;
        flex-wrap:wrap;
        gap:10px;
    }

    .nav-actions .btn {
        flex:1 1 auto;
        min-width:0;
        max-width:100%;
        font-size:14px;
        padding:10px 12px;
    }

    .hero {
        width:100%;
        max-width:100%;
        padding-left:16px;
        padding-right:16px;
    }

    .hero-content {
        width:100%;
        max-width:100%;
    }

    h1 {
        font-size:clamp(30px, 9vw, 42px);
        word-break:normal;
        overflow-wrap:anywhere;
    }

    section:not(.hero) {
        width:calc(100% - 24px);
        max-width:100%;
        padding:24px 16px;
        margin:20px 12px;
    }

    .card {
        max-width:100%;
        overflow:hidden;
    }
}