@import url(animations.css);
@import url(avantages.css);
@import url(comparatif.css);
@import url(features.css);
@import url(hero.css);
@import url(layout.css);
@import url(questionnaire.css);
@import url(seller-tools.css);

/* ── REVEAL H2 — IntersectionObserver custom (remplace AOS) */
.reveal-h2 {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal-h2.visible {
  opacity: 1;
  transform: none;
}

/* ── SOCIAL PROOF BADGE (hero) ─────────────────────────── */
@keyframes social-proof-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes social-proof-glow {
  0%, 100% { box-shadow: 0 8px 24px rgba(41, 151, 255, 0.18), 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
  50%      { box-shadow: 0 12px 32px rgba(41, 151, 255, 0.32), 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
}

@keyframes avatar-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.7); }
  to   { opacity: var(--avatar-opacity, 1); transform: translateY(0) scale(1); }
}

.social-proof {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 5px;
  padding: 10px 40px 10px 25px;
  /* 'translate' est une propriété individuelle CSS : elle se compose avec
     l'animation 'transform' au lieu de la court-circuiter → hover fonctionne
     même quand social-proof-fade-in est en fill-mode: forwards */
  transition: translate 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 100px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  white-space: nowrap; /* tout le contenu sur une seule ligne */
  /* Le parent <span> est flex column → align-items:stretch écraserait
     inline-flex et étirerait la pilule. width:fit-content + align-self
     garantissent que la pilule ne fait que la taille de son contenu. */
  width: fit-content;
  align-self: flex-start;
  opacity: 0;
  transform: translateY(8px);
  animation:
    social-proof-fade-in 0.6s ease-out 0.4s forwards,
    pill-attention 8s ease-in-out 1.8s infinite;
}

/* Halo coloré derrière la pilule */
.social-proof::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.3) 0%, transparent 50%, rgba(139, 92, 246, 0.2) 100%);
  z-index: -1;
  opacity: 0.6;
  filter: blur(10px);
}

/* Couche shimmer — sweep de lumière périodique + au hover */
.social-proof::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.13) 42%,
    rgba(255, 255, 255, 0.2)  50%,
    rgba(255, 255, 255, 0.13) 58%,
    transparent 80%
  );
  background-size: 250% 100%;
  pointer-events: none;
  z-index: 2;
  animation: pill-shimmer-idle 9s ease-in-out 4s infinite;
}

.social-proof:hover::after {
  animation: pill-shimmer-hover 0.6s ease-in-out forwards;
}

.social-proof-avatars {
  display: flex;
  flex-shrink: 0;
}

.social-proof-avatars .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  display: inline-block;
  margin-left: -11px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  background: #fff;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, z-index 0s 0.35s;
  position: relative;
  opacity: 0;
  animation: avatar-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Opacité décroissante de gauche à droite — 1er avatar plein, dernier quasi-invisible */
.social-proof-avatars .avatar:first-child { --avatar-opacity: 1;    margin-left: 0; animation-delay: 0.5s; z-index: 5; }
.social-proof-avatars .avatar:nth-child(2) { --avatar-opacity: 0.78; animation-delay: 0.6s; z-index: 4; }
.social-proof-avatars .avatar:nth-child(3) { --avatar-opacity: 0.54; animation-delay: 0.7s; z-index: 3; }
.social-proof-avatars .avatar:nth-child(4) { --avatar-opacity: 0.3;  animation-delay: 0.8s; z-index: 2; }
.social-proof-avatars .avatar:nth-child(5) { --avatar-opacity: 0.1;  animation-delay: 0.9s; z-index: 1; }

/* Hover pill — translate individuel (se compose avec l'animation transform,
   ne la court-circuite pas) + lueur bleue + bordure visible */
.social-proof:hover {
  translate: 0 -3px;
  border-color: rgba(41, 151, 255, 0.5);
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.22) 0%, rgba(255, 255, 255, 0.07) 100%);
  box-shadow: 0 14px 38px rgba(41, 151, 255, 0.3), 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Hover avatars : révèle l'opacité + arc en éventail */
.social-proof:hover .avatar {
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.28s ease, box-shadow 0.28s ease;
  opacity: 1;
}
.social-proof:hover .avatar:first-child  { transform: translateX(-5px) scale(1.1); }
.social-proof:hover .avatar:nth-child(2) { transform: translateX(-2px) translateY(-3px) scale(1.07); }
.social-proof:hover .avatar:nth-child(3) { transform: translateY(-6px) scale(1.14); }
.social-proof:hover .avatar:nth-child(4) { transform: translateX(2px) translateY(-3px) scale(1.07); }
.social-proof:hover .avatar:nth-child(5) { transform: translateX(5px) scale(1.1); }

.social-proof-text {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.social-proof-count {
  font-weight: 800;
  color: #2997ff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(41, 151, 255, 0.6);
}

.social-proof-text strong {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #b3dcff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 600px) {
  .social-proof {
    margin: 18px auto 0;
    padding: 4px 14px 4px 4px;
    gap: 8px;
  }

  .social-proof-avatars .avatar {
    width: 26px;
    height: 26px;
    margin-left: -9px;
    border-width: 2px;
  }

  .social-proof-text {
    font-size: 11.5px;
  }

  .social-proof-count {
    font-size: 12.5px;
  }
}

/* ── SKIP LINK (accessibilité clavier) ─────────────────── */
.skip-link {
  position: absolute;
  top: -56px;
  left: 16px;
  background: #2997ff;
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease;

  &:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
  }
}

/* ── FOCUS VISIBLE (accessibilité clavier) ──────────────── */
*:focus { outline: none; }

*:focus-visible {
  outline: 2px solid #2997ff;
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
.btn:focus-visible,
.nav-hamburger:focus-visible {
  outline: 2px solid #2997ff;
  outline-offset: 3px;
  border-radius: 50px;
}

a:focus-visible {
  outline: 2px solid #2997ff;
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── STICKY HEADER ─────────────────────────────────────── */
header {
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 24px rgba(0,0,0,0.35);
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  /* S'arrête à la bordure gauche de la scrollbar — var définie par le
     script inline dans <head> grâce à scrollbar-gutter:stable sur <html>.
     Fallback 0px pour macOS/overlay scrollbar (scrollbar width = 0). */
  width: calc(100% - var(--scrollbar-width, 0px));
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  transition: height 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;

  &.scrolled {
    height: calc(var(--header-height) - 12px);
    background: rgba(20, 20, 20, 0.96);
    box-shadow: 0 2px 30px rgba(0,0,0,0.55);
  }

  .logo {
    width: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-left: 0;

    img {
      width: 100%;
      display: block;
    }
  }
}

/* ── NAV LINKS ──────────────────────────────────────────── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;

  .nav-link {
    color: rgba(255,255,255,0.72);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;

    &::after {
      content: '';
      position: absolute;
      bottom: 2px;
      left: 50%;
      transform: translateX(-50%) scaleX(0);
      width: calc(100% - 28px);
      height: 2px;
      border-radius: 2px;
      background: #2997ff;
      transition: transform 0.25s ease;
    }

    &:hover {
      color: #fff;
      background: rgba(255,255,255,0.08);

      &::after {
        transform: translateX(-50%) scaleX(1);
      }
    }

    &.active {
      color: #fff;
      background: rgba(41,151,255,0.15);

      &::after {
        transform: translateX(-50%) scaleX(1);
        background: #2997ff;
      }
    }
  }
}

/* ── MOBILE HAMBURGER ───────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
  background: transparent;
  border: none;
  position: relative;
  z-index: 1001;

  span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
  }

  &.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  &.open span:nth-child(2) {
    opacity: 0;
  }
  &.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}

footer {
  background-color: #111827;
  border-top: 1px solid rgba(41, 151, 255, 0.2);
  color: #9ca3af;
  font-size: 14px;

  .footer-main {
    display: flex;
    gap: 60px;
    padding: 50px 5vw 40px;
    align-items: flex-start;
  }

  .footer-brand {
    flex: 0 0 260px;

    .footer-logo {
      width: 160px;
      margin-bottom: 16px;
      display: block;
    }

    .footer-desc {
      line-height: 1.7;
      color: #9ca3af;
      margin: 0;
      font-size: 13px;

      strong {
        color: #d1d5db;
      }
    }
  }

  .footer-nav {
    display: flex;
    flex: 1;
    gap: 40px;
    justify-content: space-between;
  }

  .footer-col {
    h4 {
      color: #f9fafb;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin: 0 0 16px;
    }

    ul {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    a {
      color: #9ca3af;
      text-decoration: none;
      font-size: 13px;
      transition: color 0.2s ease;

      &:hover {
        color: #2997ff;
      }
    }
  }

  .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 5vw;
    font-size: 12px;
    color: #6b7280;
  }

  .footer-founders {
    font-style: italic;
  }
}

@media (max-width: 980px) {
  footer {
    .footer-main {
      flex-direction: column;
      gap: 40px;
    }

    .footer-brand {
      flex: unset;
    }
  }
}

@media (max-width: 980px) and (min-width: 360px) {
  footer {
    .footer-main {
      flex-direction: column;
      gap: 0;
      padding: 40px 5vw 32px;
      align-items: flex-start;
    }

    .footer-brand {
      flex: unset;
      width: 100%;
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 28px;

      .footer-logo {
        width: 90px;
        margin-bottom: 0;
        flex-shrink: 0;
      }

      .footer-desc {
        font-size: 12px;
        line-height: 1.55;
      }
    }

    .footer-nav {
      width: 100%;
      flex: unset;
      justify-content: space-between;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;

      .footer-col {
        text-align: left;

        h4 {
          font-size: 10px;
          margin-bottom: 10px;
          letter-spacing: 0.06em;
        }

        ul {
          gap: 8px;
        }

        a {
          font-size: 12px;
        }
      }
    }
  }
}

@media (max-width: 360px) {
  footer {
    .footer-main {
      padding: 36px 16px 28px;
      flex-direction: column;
    }

    .footer-brand {
      flex: unset;
    }

    .footer-nav {
      flex-direction: column;
      gap: 24px;
      width: 100%;
    }

    .footer-bottom {
      flex-direction: column;
      gap: 8px;
      text-align: center;
      padding: 16px;
    }
  }
}

@media (max-width: 600px) {
  footer {
    .footer-bottom {
      flex-direction: column;
      gap: 8px;
      text-align: center;
      padding: 16px 20px;
    }
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 15px;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);

    .logo {
      width: 140px;
      margin: 0;
    }
  }

  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;        /* use 100% not 100vw — prevents scrollbar-related overflow */
    max-width: 100%;
    flex-direction: column;
    align-items: stretch;
    background: rgba(15,15,20,0.99);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    gap: 0;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    border-right: 1px solid rgba(255,255,255,0.08);
    z-index: 1000;

    &.mobile-open {
      transform: translateX(0);
    }

    .nav-link {
      width: 100%;
      padding: 14px 20px;
      font-size: 15px;
      border-radius: 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      display: block;

      &:hover {
        background: rgba(255,255,255,0.1);
      }

      &.active {
        background: rgba(41,151,255,0.2);
        border-left: 3px solid #2997ff;
        padding-left: 17px;
      }

      &::after {
        display: none;
      }
    }
  }

  .nav-hamburger {
    display: flex;
    order: 2;
    margin-left: auto;
  }
}
