/* Marvin site — animations + interactive class styles
   (visual styling lives inline in index.html to mirror the design prototype 1:1) */

/* ---- Scrollbar : retire les flèches haut/bas (Chromium) ---- */
::-webkit-scrollbar-button { display: none; }

/* ---- Animations ---- */
@keyframes marqueeRTL {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}
@keyframes pulseRec {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@keyframes pulseRecItin {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Persona mocks : 3 panels partagent la même structure ---- */
[data-persona-mock] {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #fdfcfa;
  border: 1px solid rgba(36, 0, 70, 0.1);
  box-shadow: 0 18px 48px rgba(36, 0, 70, 0.10), 0 0 0 1px rgba(36, 0, 70, 0.04);
  height: 480px;
  display: flex;
  flex-direction: column;
}
[data-persona-mock-inner] {
  flex: 1;
  display: grid;
  grid-template-columns: 180px 1fr;
  background: #fdfcfa;
}
[data-persona-mock-sidebar] {
  background: #f7f5fa;
  border-right: 1px solid rgba(36, 0, 70, 0.06);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- Hero copy : chips + social proof avatars ---- */
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d1de54;
  box-shadow: 0 0 8px rgba(209, 222, 84, 0.55);
}
.hero-strip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: -10px;
}
.hero-strip-avatar:first-child { margin-left: 0; }

/* ---- Card témoignage (10 instances dans le marquee) ---- */
.tcard {
  width: 400px;
  flex-shrink: 0;
  background: var(--grad-tcard);
  border: 1px solid rgba(135, 89, 255, 0.35);
  border-radius: 16px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 12px 32px rgba(36, 0, 70, 0.18);
  position: relative;
  overflow: hidden;
  color: #fdfcf6;
}
.tcard-aura {
  position: absolute;
  top: -30%;
  right: -25%;
  width: 70%;
  height: 120%;
  background: url('../assets/aura-violet.png') center / contain no-repeat;
  opacity: 0.35;
  mix-blend-mode: screen;
  pointer-events: none;
}
.tcard-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 52px;
}
.tcard-logo-wrap {
  display: flex;
  align-items: center;
  height: 52px;
}
.tcard-rate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tcard-stars {
  display: inline-flex;
  gap: 2px;
}
.tcard-rate-num {
  font-size: 12px;
  color: rgba(253, 252, 246, 0.85);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.tcard-quote {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #fdfcf6;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* ---- Logos témoignages : silhouette blanche sur fond violet ---- */
/* Sauf BNP Paribas et Saverglass : leur PNG a déjà été repalettisé pour
   afficher correctement sur la card violette (badge blanc + étoiles
   noires + texte blanc pour BNP, forme blanche + SAVER noir + GLASS
   blanc pour SG). */
.testimonials-marquee img:not([alt="BNP Paribas"]):not([alt="Saverglass"]) {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* ---- Flèche "témoignage suivant" : cachée par défaut (desktop), visible
        sur mobile via mobile.css ---- */
.testimonials-mobile-arrow {
  display: none;
}

/* ---- Marquees pause on hover ---- */
.logo-marquee, .testimonials-marquee {
  display: flex;
  gap: 96px;
  width: max-content;
  animation: marqueeRTL 38s linear infinite;
}
.testimonials-marquee {
  gap: 24px;
  animation-duration: 42s;
}
.logo-marquee:hover,
.testimonials-marquee:hover {
  animation-play-state: paused;
}

/* ---- Nav: scrolled state (toggled by JS) ---- */
.site-nav {
  background: rgba(255,255,255,0.98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: all .25s ease;
}
.site-nav.is-scrolled {
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(36,0,70,0.06);
}
.nav-link { transition: color .2s ease; }
.nav-link:hover { color: var(--marvin-violet-intense) !important; }
.nav-cta {
  transition: all .2s ease;
  box-shadow: 0 1px 2px rgba(36,0,70,0.12);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(36,0,70,0.22);
}

/* ---- Reusable CTAs (rectangular, slightly rounded — UI kit) ---- */
.cta-primary,
.cta-outline,
.cta-deep {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 6px;
  padding: 14px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all .2s ease;
  text-decoration: none;
}
.cta-primary {
  color: #fff;
  background: var(--marvin-violet);
  border: 1.5px solid var(--marvin-violet);
}
.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(135,89,255,0.5), 0 8px 22px rgba(135,89,255,0.25);
}
.cta-outline {
  color: var(--marvin-violet-intense);
  background: transparent;
  border: 1.5px solid var(--marvin-violet-intense);
}
.cta-outline.on-dark {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.cta-outline:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(36,0,70,0.22);
}
.cta-outline.on-dark:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}
.cta-deep {
  color: #fff;
  background: linear-gradient(180deg, #3a0d5c 0%, var(--marvin-violet-intense) 100%);
  border: 1.5px solid var(--marvin-violet-intense);
}
.cta-deep:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(36,0,70,0.22);
}
.cta-lime {
  background: var(--marvin-vert);
  color: var(--marvin-violet-intense);
  border: 1.5px solid var(--marvin-vert);
}
.cta-ghost-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.55);
}

/* ---- Hero slider ---- */
.hero-slider .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.2s ease, transform 8s ease;
}
.hero-slider .slide.is-active {
  opacity: 1;
  transform: scale(1.02);
}
.hero-slider .pager-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  transition: all .3s ease;
  padding: 0;
}
.hero-slider .pager-dot.is-active {
  width: 36px;
  background: var(--marvin-vert);
}
.pager-dot:focus-visible {
  outline: 2px solid var(--marvin-vert);
  outline-offset: 3px;
}
.hero-slider .overlay-widget,
.hero-slider .overlay-persona { display: none; }
.hero-slider[data-overlay="widget"] .overlay-widget { display: block; }
.hero-slider[data-overlay="persona"] .overlay-persona { display: flex; }

/* ---- HowItWorks: feature cards + center stage ---- */
.feature-card {
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  padding: 18px 20px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  background: rgba(253,252,246,0.045);
  border: 1px solid rgba(253,252,246,0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .25s ease;
}
.feature-card:hover { background: rgba(253,252,246,0.085); }
.feature-card.is-active {
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.06) 100%);
  border-color: rgba(209,222,84,0.55);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
.feature-card .feat-tag-color { color: rgba(253,252,246,0.7); }
.feature-card.is-active .feat-tag-color { color: var(--marvin-vert); }
.center-stage .stage-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  opacity: 0;
  transition: opacity .8s ease;
}
.center-stage .stage-photo.is-active { opacity: 1; }
/* Card overlay (data preview au-dessus du stage-photo) — desktop comme mobile */
.stage-overlay {
  width: 300px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(36, 0, 70, 0.28), 0 4px 12px rgba(36, 0, 70, 0.08);
  backdrop-filter: blur(10px);
}
.center-stage .stage-overlay { display: none; }
.center-stage .stage-overlay.is-active { display: block; }
.howitworks-pager .pager-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  border: none;
  cursor: pointer;
  transition: all .3s ease;
  padding: 0;
}
.howitworks-pager .pager-dot.is-active {
  width: 24px;
  background: var(--marvin-vert);
}

/* ---- Persona tabs (underline style) ---- */
.persona-tab {
  font-family: inherit;
  padding: 16px 4px 18px;
  margin-right: 28px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--fg-muted);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.005em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: -1px;
  transition: all .2s ease;
  white-space: nowrap;
}
.persona-tab:hover { color: var(--marvin-violet-intense); }
.persona-tab.is-active {
  color: var(--marvin-violet-intense);
  font-weight: 500;
  border-bottom-color: var(--marvin-violet-intense);
}
.persona-tab .tab-icon { color: currentColor; display: inline-flex; }
.persona-tab.is-active .tab-icon { color: var(--marvin-violet); }
.persona-panel { display: none; animation: fadein .4s ease; }
.persona-panel.is-active { display: grid; }

/* ---- FAQ accordion ---- */
.faq-item {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(36,0,70,0.1);
  transition: all .2s ease;
}
.faq-item.is-open {
  box-shadow: 0 6px 18px rgba(36,0,70,0.06);
}
.faq-toggle {
  width: 100%;
  padding: 18px 22px;
  background: transparent;
  border: none;
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  color: var(--marvin-violet-intense);
  font-size: 15px;
  font-weight: 500;
}
.faq-toggle .chev {
  flex-shrink: 0;
  transition: transform .25s;
}
.faq-item.is-open .chev { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 22px 22px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg-muted);
}
.faq-item.is-open .faq-answer {
  display: block;
  animation: fadein .25s ease;
}

/* ---- DifferenceMarvin SalesApps hover card ---- */
.salesapps-card {
  transition: all .25s ease;
}
.salesapps-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(36,0,70,0.10);
}

/* ---- VideoDemo : conteneur responsive (16:9 desktop, 9:16 mobile) + mute toggle ---- */
.video-demo .video-frame {
  width: 100%;
  max-width: 1180px;
  aspect-ratio: 16 / 9;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(36,0,70,0.22), 0 12px 32px rgba(36,0,70,0.10);
}
.video-demo .video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  background: transparent;
}
@media (max-width: 767px) {
  .video-demo .video-frame {
    aspect-ratio: 9 / 16;
    max-width: 340px;
    border-radius: 24px;
    margin: 0 auto;
  }
  /* Zoom 2% pour masquer un artefact violet en haut du fichier mobile.mp4
     (bordure d'encodage). Le container .video-frame a overflow:hidden,
     donc les bords cropés sont invisibles. */
  .video-demo .video-frame video {
    transform: scale(1.02);
    transform-origin: center;
  }
}

.video-mute-toggle {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: none;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s ease, transform 0.15s ease;
}
.video-mute-toggle:hover { background: rgba(0,0,0,0.75); transform: scale(1.05); }
.video-mute-toggle:focus-visible { outline: 2px solid var(--marvin-vert); outline-offset: 2px; }
.video-mute-toggle .icon-unmuted { display: none; }
.video-mute-toggle.is-unmuted .icon-muted { display: none; }
.video-mute-toggle.is-unmuted .icon-unmuted { display: block; }

/* ---- Inline pulse helpers ---- */
.pulse-rec  { animation: pulseRec 1.4s ease-in-out infinite; }
.pulse-itin { animation: pulseRecItin 1.6s ease-in-out infinite; }
.pulse-dot  { animation: pulseDot 1.5s ease-in-out infinite; }

/* ============================================================
   HowItWorks — Mobile (≤ 768px)
   Approche d'Arnaud rétablie : sur mobile, le carousel est désactivé,
   chaque feature-card 01-04 reçoit son propre photo+overlay reparentés
   par JS dans un bloc .feature-card-mobile-stage (mini center-stage
   avec photo + overlay positionné dessus). Pas de slider, pas de dots.
   Chaque "block" = stage (photo+overlay) puis carte texte.
   ============================================================ */
@media (max-width: 768px) {
  /* Section : padding réduit + min-height non bloquant */
  .howitworks {
    padding: 56px 16px 48px !important;
    min-height: auto !important;
  }

  /* Header : titre compact */
  .howitworks-header {
    margin-bottom: 28px !important;
  }
  .howitworks h2 {
    font-size: clamp(24px, 6.5vw, 32px) !important;
  }

  /* Grid 3-col → stack 1-col */
  .howitworks-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    align-items: stretch !important;
  }
  .howitworks-col-left  { order: 1; }
  .howitworks-col-right { order: 2; }

  /* Quand le reparenting mobile est actif : */
  /* - cache le central stage (le contenu a été déplacé) */
  /* - cache le pager (pas de slider sur mobile) */
  .howitworks.is-mobile-layout .howitworks-stage-col { display: none !important; }
  .howitworks.is-mobile-layout .howitworks-pager     { display: none !important; }

  /* Bloc par feature : mini center-stage (photo + overlay positionné dessus) */
  .feature-card-mobile-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(36,0,70,0.32);
    margin-bottom: 6px;
  }
  /* Photo : remplit le wrap entièrement */
  .feature-card-mobile-stage .stage-photo {
    position: absolute !important;
    inset: 0 !important;
    width: 100%;
    height: 100%;
    opacity: 1 !important;
    background-size: cover;
    background-repeat: no-repeat;
  }
  /* Overlay card : positionnée bas-centre, par-dessus la photo */
  .feature-card-mobile-stage .stage-overlay {
    display: block !important;
    position: absolute !important;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 2;
    width: calc(100% - 36px);
    max-width: 320px;
    box-sizing: border-box;
  }
  /* Vignette pour lisibilité de l'overlay sur la photo */
  .feature-card-mobile-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(200deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.25) 100%);
    pointer-events: none;
    z-index: 1;
  }

  /* Toutes les cartes feature visibles sur mobile (pas de hiding) */
  .howitworks.is-mobile-layout .feature-card { display: flex !important; padding: 16px 18px; }

  /* Cartes : look sobre (pas de glow desktop) sur mobile */
  .howitworks.is-mobile-layout .feature-card.is-active {
    background: rgba(253,252,246,0.045) !important;
    border-color: rgba(253,252,246,0.14) !important;
    box-shadow: none !important;
  }
  /* Tag toujours en lime sur mobile */
  .howitworks.is-mobile-layout .feature-card .feat-tag-color {
    color: var(--marvin-vert) !important;
  }
}

/* Smartphones étroits (≤ 480px) */
@media (max-width: 480px) {
  .howitworks {
    padding: 48px 12px 40px !important;
  }
}


/* ===== Nav dropdown « Ressources » (desktop) ===== */
.nav-resources { position: relative; display: inline-flex; align-items: center; }
.nav-resources > .nav-link { display: inline-flex; align-items: center; gap: 5px; }
.nav-resources .nav-caret { font-size: 9px; color: #8b8196; transition: transform .18s ease; }
.nav-resources:hover .nav-caret, .nav-resources:focus-within .nav-caret { transform: rotate(180deg); }
.nav-resources::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; }
.nav-resources .nav-dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(4px);
  min-width: 190px; background: #fff; border: 1px solid rgba(36,0,70,0.1);
  border-radius: 12px; box-shadow: 0 16px 40px rgba(36,0,70,0.14); padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s; z-index: 50;
}
.nav-resources:hover .nav-dropdown, .nav-resources:focus-within .nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(10px);
}
.nav-resources .nav-dropdown a {
  padding: 9px 12px; border-radius: 7px; font-size: 14px; font-weight: 400; color: #0a0012;
  text-decoration: none; white-space: nowrap; transition: background .14s ease, color .14s ease;
}
.nav-resources .nav-dropdown a:hover { background: rgba(135,89,255,0.08); color: #240046; }

/* --- Newsletter (encart footer) — dupliqué en HTML sur ~29 pages, styles ici --- */
.footer-nl { margin: 0; }
.footer-nl-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 14px; font-weight: 500; }
.footer-nl-title { font-size: 15px; color: #fff; font-weight: 500; margin-bottom: 14px; line-height: 1.4; max-width: 340px; }
.footer-nl-form { margin: 0; }
.footer-nl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-nl-input { flex: 1 1 170px; min-width: 0; padding: 11px 13px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: #fff; font: inherit; font-size: 13.5px; }
.footer-nl-input::placeholder { color: rgba(255,255,255,0.45); }
.footer-nl-input:focus { outline: none; border-color: rgba(135,89,255,0.7); box-shadow: 0 0 0 3px rgba(135,89,255,0.25); }
.footer-nl-btn { padding: 11px 20px; border-radius: 6px; border: none; background: var(--marvin-violet); color: #fff; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.footer-nl-btn:hover { background: #7548e6; }
.footer-nl-btn:disabled { opacity: 0.6; cursor: default; }
.footer-nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.footer-nl-msg { margin: 8px 0 0; min-height: 14px; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.55); }
.footer-nl-consent { margin: 6px 0 0; font-size: 11px; line-height: 1.5; color: rgba(255,255,255,0.4); }
.footer-nl-consent a { color: rgba(255,255,255,0.6); text-decoration: underline; }
