/* Réinitialisation et comportements globaux */
html {
  scroll-behavior: smooth;
}

main section[id] {
  scroll-margin-top: 6rem;
}

body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle {
  list-style: none;
}

.mobile-menu-toggle::-webkit-details-marker {
  display: none;
}

/* Fallback pour les classes Tailwind manquantes quand le CDN ne charge pas */
.hidden {
  display: none;
}

@media (min-width: 640px) {
  .sm\:inline-flex {
    display: inline-flex !important;
  }
}

@media (min-width: 768px) {
  .md\:flex {
    display: flex !important;
  }

  .md\:hidden {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .md\:hidden {
    display: block !important;
  }
}

@media (min-width: 1024px) {
  .lg\:flex {
    display: flex !important;
  }

  .lg\:hidden {
    display: none !important;
  }

  header nav[aria-label="Navigation principale"] a[aria-current],
  header nav[aria-label="Navigation principale"] a.is-active {
    border-radius: 0.75rem;
    padding: 0.5rem 0.625rem;
  }
}

@media (max-width: 1023px) {
  .lg\:hidden {
    display: block !important;
  }
}

header nav[aria-label="Navigation principale"] a[aria-current],
header nav[aria-label="Navigation mobile"] a[aria-current],
header nav[aria-label="Navigation principale"] a.is-active,
header nav[aria-label="Navigation mobile"] a.is-active {
  background-color: rgb(0 88 188 / 10%);
  color: #0058bc;
}

header nav[aria-label="Navigation principale"] a {
  white-space: nowrap;
}

.donation-header-button {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background-color: #006e28;
  color: #ffffff;
  transition: background-color 200ms ease, transform 200ms ease;
}

.donation-header-button:hover {
  background-color: #005a21;
  transform: translateY(-1px);
}

.donation-header-label {
  display: none;
}

@media (min-width: 1024px) {
  .donation-header-button {
    width: auto;
    padding: 0 0.875rem;
    gap: 0.5rem;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
  }

  .donation-header-label {
    display: inline;
  }
}

.mission-reveal {
  opacity: 1;
  transform: none;
}

.motion-ready .mission-reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(24px);
}

.motion-ready .mission-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.motion-ready .mission-reveal {
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.motion-ready .mission-reveal.is-visible:nth-child(1) {
  transition-delay: 100ms;
}

.motion-ready .mission-reveal.is-visible:nth-child(2) {
  transition-delay: 220ms;
}

.motion-ready .mission-reveal.is-visible:nth-child(3) {
  transition-delay: 340ms;
}

#contexte .grid > .mission-reveal {
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1), background-color 200ms ease;
}

#contexte .grid > .mission-reveal:hover {
  transform: translateY(-4px);
  background-color: rgb(255 255 255 / 16%);
}

/* Masquer la barre de défilement tout en gardant le scroll actif */
::-webkit-scrollbar {
  display: none;
}

* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Animation de transfert de données sécurisé */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.animate-shimmer {
  width: 50% !important;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 65%), transparent);
  animation: shimmer 2s infinite ease-in-out;
}

.faq-content {
  overflow: hidden;
  transition: max-height 300ms ease;
}

.faq-item {
  cursor: pointer;
}

.faq-item:focus-visible {
  outline: 2px solid #0058bc;
  outline-offset: 3px;
}

[data-help-search-item][hidden] {
  display: none !important;
}

.faq-item .material-symbols-outlined {
  transition: transform 300ms ease;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   Animations & micro-interactions (mise à jour 2026)
   ========================================================= */

/* Apparition douce de la page */
@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body {
  animation: page-in 500ms ease-out both;
}

body.is-leaving {
  opacity: 0;
  transition: opacity 220ms ease;
}

/* Évite le défilement horizontal pendant les animations latérales */
main {
  overflow-x: clip;
}

/* Barre de progression de lecture */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #0058bc, #4c4aca, #006e28);
  pointer-events: none;
}

/* En-tête qui se densifie au défilement */
body > header {
  transition: box-shadow 300ms ease, background-color 300ms ease;
}

body > header.is-scrolled {
  background-color: rgb(250 249 254 / 92%);
  box-shadow: 0 8px 30px -12px rgb(0 26 65 / 25%);
}

body > header a img {
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

body > header a:hover img {
  transform: rotate(-12deg) scale(1.08);
}

/* Soulignement animé des liens de navigation */
header nav[aria-label="Navigation principale"] a {
  position: relative;
}

header nav[aria-label="Navigation principale"] a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: #0058bc;
  transition: left 250ms ease, right 250ms ease;
}

header nav[aria-label="Navigation principale"] a:hover::after {
  left: 0.625rem;
  right: 0.625rem;
}

/* Menu mobile qui glisse */
@keyframes menu-drop {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

details[open] > nav[aria-label="Navigation mobile"] {
  animation: menu-drop 220ms ease-out both;
}

/* Apparition au défilement (appliquée automatiquement par script.js) */
.motion-ready .reveal {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity 700ms ease var(--reveal-delay, 0ms),
    translate 700ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms),
    scale 700ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms);
}

.motion-ready .reveal.reveal-zoom {
  translate: 0 16px;
  scale: 0.94;
}

.motion-ready .reveal.reveal-left {
  translate: -36px 0;
}

.motion-ready .reveal.reveal-right {
  translate: 36px 0;
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

/* Cartes : élévation au survol */
.card-hover {
  transition:
    translate 300ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 300ms ease,
    border-color 300ms ease,
    opacity 700ms ease var(--reveal-delay, 0ms),
    scale 700ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms);
}

/* Une fois apparue, la carte réagit au survol sans délai */
.motion-ready .card-hover.reveal.is-revealed {
  transition:
    translate 300ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 300ms ease,
    border-color 300ms ease;
}

.card-hover:hover {
  translate: 0 -6px;
  box-shadow: 0 22px 45px -20px rgb(0 88 188 / 35%);
  border-color: rgb(0 88 188 / 20%);
}

.card-hover .material-symbols-outlined {
  transition: transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-hover:hover > div:first-child > .material-symbols-outlined {
  transform: scale(1.15) rotate(-8deg);
}

/* Boutons : reflet lumineux + effet d'onde */
.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-shine::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 35%) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 700ms ease;
}

.btn-shine:hover::before {
  transform: translateX(120%);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: currentColor;
  opacity: 0.3;
  transform: scale(0);
  animation: ripple 600ms ease-out forwards;
}

@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}

/* Héros : entrée en cascade */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

.hero-intro > * {
  animation: rise-in 800ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-intro > *:nth-child(1) { animation-delay: 100ms; }
.hero-intro > *:nth-child(2) { animation-delay: 220ms; }
.hero-intro > *:nth-child(3) { animation-delay: 340ms; }
.hero-intro > *:nth-child(4) { animation-delay: 460ms; }
.hero-intro > *:nth-child(5) { animation-delay: 580ms; }

/* Texte en dégradé animé */
.text-gradient {
  background: linear-gradient(90deg, #0058bc, #4c4aca, #0070eb, #006e28, #0058bc);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-pan 8s ease-in-out infinite;
}

@keyframes gradient-pan {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Halos flottants en arrière-plan */
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 25px) scale(0.95); }
}

.blob-float {
  animation: blob-float 14s ease-in-out infinite;
}

.blob-float-slow {
  animation: blob-float 20s ease-in-out infinite reverse;
}

/* Maquette du téléphone */
@keyframes mockup-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

.hero-mockup {
  animation: rise-in 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 300ms both;
  perspective: 1200px;
}

.hero-mockup-inner {
  animation: mockup-float 6s ease-in-out 1.2s infinite;
  transform-style: preserve-3d;
  transition: transform 400ms ease-out;
}

@keyframes fill-bar {
  from { width: 0; }
}

.progress-fill {
  animation: fill-bar 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 900ms both;
}

/* Pastille « en ligne » et marqueur de carte */
.live-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: #006e28;
  vertical-align: middle;
}

.live-dot::after,
.map-pulse::before,
.map-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}

.live-dot::after {
  background: #006e28;
}

.map-pulse {
  position: relative;
}

.map-pulse::before,
.map-pulse::after {
  z-index: -1;
  background: rgb(0 88 188 / 35%);
}

.map-pulse::after {
  animation-delay: 1s;
}

@keyframes pulse-ring {
  from { transform: scale(1); opacity: 0.8; }
  to { transform: scale(3); opacity: 0; }
}

/* Notifications flottantes autour de la maquette */
.float-notif {
  position: absolute;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.95rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -16px rgb(0 26 65 / 35%);
  border: 1px solid rgb(193 198 215 / 40%);
  font-size: 0.75rem;
  white-space: nowrap;
  animation:
    notif-pop 700ms cubic-bezier(0.34, 1.56, 0.64, 1) var(--notif-delay, 1.4s) both,
    notif-bob 5s ease-in-out calc(var(--notif-delay, 1.4s) + 700ms) infinite;
}

@keyframes notif-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.85); }
  to { opacity: 1; transform: none; }
}

@keyframes notif-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* Battement de cœur (dons) */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.18); }
  28% { transform: scale(1); }
  42% { transform: scale(1.12); }
  70% { transform: scale(1); }
}

.heartbeat,
.donation-header-button .material-symbols-outlined {
  animation: heartbeat 2.4s ease-in-out infinite;
}

/* Compte à rebours du lancement */
.countdown {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.countdown-unit {
  min-width: 4.75rem;
  padding: 0.9rem 0.5rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 14%);
  border: 1px solid rgb(255 255 255 / 22%);
  backdrop-filter: blur(6px);
}

.countdown-value {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-value.tick {
  animation: tick 400ms ease;
}

@keyframes tick {
  0% { transform: translateY(-6px); opacity: 0.3; }
  100% { transform: none; opacity: 1; }
}

.countdown-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d8e2ff;
}

@media (max-width: 420px) {
  .countdown { gap: 0.45rem; }
  .countdown-unit { min-width: 3.9rem; }
  .countdown-value { font-size: 1.5rem; }
}

/* Particules dans les bandeaux colorés */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particles span {
  position: absolute;
  bottom: -20px;
  width: var(--size, 8px);
  height: var(--size, 8px);
  border-radius: 50%;
  background: rgb(255 255 255 / 30%);
  animation: particle-rise var(--dur, 9s) linear var(--delay, 0s) infinite;
}

@keyframes particle-rise {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-420px); opacity: 0; }
}

/* Bouton retour en haut */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 55;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #0058bc;
  color: #ffffff;
  box-shadow: 0 14px 30px -10px rgb(0 88 188 / 60%);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 200ms ease;
}

.back-to-top.is-shown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top.is-shown:hover {
  background: #0070eb;
  transform: translateY(-3px);
}

/* Copie du numéro MonCash */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.6rem;
  background: rgb(0 88 188 / 10%);
  color: #0058bc;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
  transition: background-color 200ms ease, transform 200ms ease;
}

.copy-btn:hover {
  background: rgb(0 88 188 / 18%);
  transform: translateY(-1px);
}

.copy-btn.is-copied {
  background: #006e28;
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }

  .hero-intro > *,
  .hero-mockup,
  .float-notif {
    animation: none !important;
    opacity: 1 !important;
  }

  .particles {
    display: none;
  }
}

/* =========================================================
   Design immersif : orbite, menaces, chiffres, récit des fonctionnalités
   ========================================================= */

.hero-intro > *:nth-child(6) { animation-delay: 700ms; }

.section-title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgb(0 88 188 / 10%);
  color: #0058bc;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  color: #414755;
}

.hero-tagline i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0070eb;
}

/* Orbite d'icônes autour de la maquette */
@keyframes spin {
  to { rotate: 360deg; }
}

.orbit-wrap {
  --orbit-size: 600px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--orbit-size);
  height: var(--orbit-size);
  translate: -50% -50%;
  pointer-events: none;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgb(0 88 188 / 18%);
}

.orbit-ring.r2 {
  inset: 13%;
  border-style: solid;
  border-color: rgb(76 74 202 / 12%);
}

.orbit-spin {
  position: absolute;
  inset: 0;
  animation: spin 70s linear infinite;
}

.orbit-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px;
  transform: rotate(var(--a)) translateX(calc(var(--orbit-size) / 2)) rotate(calc(-1 * var(--a)));
}

.orbit-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #ffffff;
  color: var(--c, #0058bc);
  box-shadow: 0 12px 28px -12px rgb(0 26 65 / 40%);
  animation: spin 70s linear infinite reverse;
}

.orbit-mobile,
.orbit-mobile .orbit-wrap {
  --orbit-size: 250px;
}

.orbit-mobile {
  position: relative;
  width: 100%;
  height: 330px;
}

.orbit-mobile .orbit-item {
  width: 42px;
  height: 42px;
  margin: -21px;
}

.orbit-mobile .orbit-icon {
  border-radius: 12px;
}

.orbit-center {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 20px 40px -16px rgb(0 88 188 / 45%);
}

/* Ondes radar */
@keyframes radar {
  from { transform: scale(0.4); opacity: 0.55; }
  to { transform: scale(1.9); opacity: 0; }
}

.radar-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgb(0 112 235 / 55%);
  animation: radar 4s ease-out infinite;
  pointer-events: none;
}

.radar-pulse:nth-child(2) { animation-delay: 1.33s; }
.radar-pulse:nth-child(3) { animation-delay: 2.66s; }

/* Section menaces */
.threat-shield {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #e9eefb);
  box-shadow: 0 25px 50px -20px rgb(0 88 188 / 50%);
}

.threat-shield img {
  position: relative;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.threat-counter {
  margin-top: 1.75rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  color: #006e28;
}

.threat-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  max-width: 860px;
  margin: 2rem auto 0;
}

@keyframes chip-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

.threat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid #f6c7c1;
  background: #fff1ef;
  color: #b3261e;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  animation: chip-float 6s ease-in-out var(--d, 0s) infinite;
  transition: background-color 500ms ease, color 500ms ease, border-color 500ms ease, box-shadow 500ms ease;
}

.threat-chip .material-symbols-outlined {
  font-size: 1.2rem;
}

.threat-chip .icon-safe {
  display: none;
}

.threat-chip.is-protected {
  border-color: #a9e5b9;
  background: #e8f8ed;
  color: #006e28;
  box-shadow: 0 10px 24px -14px rgb(0 110 40 / 60%);
}

.threat-chip.is-protected .icon-danger {
  display: none;
}

.threat-chip.is-protected .icon-safe {
  display: inline;
  animation: heartbeat 900ms ease-out 1;
}

/* Bandeau de chiffres */
.stats-band {
  background: linear-gradient(120deg, #003f8a, #0058bc 45%, #4c4aca);
  box-shadow: 0 30px 60px -30px rgb(0 58 138 / 70%);
}

.stat-value {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
}

.stat-label {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #d8e2ff;
}

/* Récit des fonctionnalités avec téléphone fixe */
.story {
  display: grid;
  gap: 1.25rem;
}

.story-phone-wrap {
  display: none;
}

.story-step {
  padding: 1.75rem;
  border-radius: 1.5rem;
  background: #ffffff;
  border: 1px solid rgb(193 198 215 / 40%);
  scroll-margin-top: 110px;
}

.story-step-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.story-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--c, #0058bc) 12%, transparent);
  color: var(--c, #0058bc);
}

.story-num {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: #717786;
}

.story-tag {
  margin-left: auto;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgb(0 110 40 / 10%);
  color: #006e28;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.story-points {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: #1a1b1f;
}

.story-points li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.story-points li::before {
  content: "check_circle";
  font-family: "Material Symbols Outlined";
  font-size: 1.15rem;
  color: #006e28;
}

@media (min-width: 1024px) {
  .story {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .story-step {
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    background: none;
    border: 0;
    opacity: 0.25;
    translate: 0 20px;
    transition: opacity 500ms ease, translate 500ms ease;
  }

  .story-step.is-active {
    opacity: 1;
    translate: 0 0;
  }

  .story-step h3 {
    font-size: 2.25rem;
  }

  .story-phone-wrap {
    position: sticky;
    top: 100px;
    height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.story-phone {
  position: relative;
  width: 290px;
  height: min(590px, calc(100vh - 160px));
  padding: 11px;
  border-radius: 46px;
  background: #121a33;
  box-shadow: 0 40px 80px -30px rgb(0 26 65 / 60%), inset 0 0 0 2px #2a3558;
}

.story-phone::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 5;
  width: 84px;
  height: 22px;
  translate: -50% 0;
  border-radius: 999px;
  background: #121a33;
}

.story-phone-glow {
  position: absolute;
  inset: 12% -30%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(0 112 235 / 30%), transparent 65%);
  filter: blur(10px);
  transition: background 600ms ease;
}

.story-screen-area {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 36px;
  background: #f4f3f8;
}

.phone-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 3.4rem 1rem 1rem;
  opacity: 0;
  translate: 0 28px;
  scale: 0.97;
  transition: opacity 450ms ease, translate 450ms cubic-bezier(0.2, 0.7, 0.2, 1), scale 450ms ease;
  font-size: 0.78rem;
}

.phone-screen.is-active {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

.screen-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #1a1b1f;
}

.screen-sub {
  margin-top: -0.4rem;
  color: #717786;
  font-size: 0.72rem;
}

.s-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.9rem;
  background: #ffffff;
  box-shadow: 0 4px 14px -10px rgb(0 26 65 / 40%);
}

.s-row strong {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.8rem;
  color: #1a1b1f;
}

.s-row small {
  color: #717786;
  font-size: 0.68rem;
}

.s-ico {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--c, #0058bc) 14%, transparent);
  color: var(--c, #0058bc);
}

.s-ico .material-symbols-outlined {
  font-size: 1.1rem;
}

.s-toggle {
  position: relative;
  margin-left: auto;
  width: 2.1rem;
  height: 1.2rem;
  border-radius: 999px;
  background: #c1c6d7;
}

.s-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.2rem - 4px);
  height: calc(1.2rem - 4px);
  border-radius: 50%;
  background: #ffffff;
  transition: left 400ms ease;
}

.s-toggle.on {
  background: #0058bc;
}

.phone-screen.is-active .s-toggle.on::after {
  left: calc(100% - 1.2rem + 2px);
  transition-delay: 300ms;
}

.s-badge {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.s-badge.bad { background: #ffe3df; color: #b3261e; }
.s-badge.good { background: #dcf5e3; color: #006e28; }

.s-map {
  position: relative;
  flex: 1;
  border-radius: 1.1rem;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 70%) 2px, transparent 2px) 0 0 / 38px 38px,
    linear-gradient(rgb(255 255 255 / 70%) 2px, transparent 2px) 0 0 / 38px 38px,
    linear-gradient(160deg, #cfe8d6, #d8e2ff 60%, #e9e7ed);
}

.s-zone {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 130px;
  height: 130px;
  translate: -50% -50%;
  border-radius: 50%;
  background: rgb(0 110 40 / 12%);
  border: 2px dashed rgb(0 110 40 / 45%);
}

.s-marker {
  position: absolute;
  left: 50%;
  top: 45%;
  translate: -50% -50%;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: #0058bc;
  color: #ffffff;
  font-weight: 800;
}

.s-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 140px;
  padding: 0.8rem;
  border-radius: 1rem;
  background: #ffffff;
}

.s-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 0.4rem 0.4rem 0.2rem 0.2rem;
  background: linear-gradient(#0070eb, #4c4aca);
  transform-origin: bottom;
  scale: 1 0;
  transition: scale 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.phone-screen.is-active .s-bars span {
  scale: 1 1;
}

.phone-screen.is-active .s-bars span:nth-child(2) { transition-delay: 60ms; }
.phone-screen.is-active .s-bars span:nth-child(3) { transition-delay: 120ms; }
.phone-screen.is-active .s-bars span:nth-child(4) { transition-delay: 180ms; }
.phone-screen.is-active .s-bars span:nth-child(5) { transition-delay: 240ms; }
.phone-screen.is-active .s-bars span:nth-child(6) { transition-delay: 300ms; }
.phone-screen.is-active .s-bars span:nth-child(7) { transition-delay: 360ms; }

.s-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.s-photos span {
  aspect-ratio: 1;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--p1), var(--p2));
}

.s-thumb {
  flex: 0 0 auto;
  width: 3.4rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  color: #ffffff;
}

.s-bubble {
  max-width: 82%;
  padding: 0.55rem 0.75rem;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 4px 14px -10px rgb(0 26 65 / 40%);
}

.s-bubble.me {
  align-self: flex-end;
  background: #0058bc;
  color: #ffffff;
}

.s-bubble.flag {
  border: 1.5px solid #f6a49a;
  background: #fff1ef;
}

@keyframes wave {
  0%, 100% { scale: 1 0.3; }
  50% { scale: 1 1; }
}

.s-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 120px;
}

.s-wave span {
  width: 6px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(#0070eb, #4c4aca);
  animation: wave 1.1s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.13s);
}

.s-sos {
  position: relative;
  width: 8.5rem;
  height: 8.5rem;
  margin: 1.2rem auto 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6b5e, #c62828);
  color: #ffffff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 18px 40px -12px rgb(198 40 40 / 70%);
}

.s-sos .radar-pulse {
  border-color: rgb(198 40 40 / 60%);
}

.s-eye-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgb(255 170 60 / 0%);
  transition: background 1.2s ease 300ms;
}

.phone-screen.is-active .s-eye-overlay {
  background: rgb(255 170 60 / 16%);
}

.s-slider {
  position: relative;
  height: 0.45rem;
  border-radius: 999px;
  background: #e3e2e7;
}

.s-slider span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v);
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb74d, #f57c00);
}

.s-pin {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.4rem 0;
}

.s-pin i {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  border: 2px solid #0058bc;
}

.s-pin i.on {
  background: #0058bc;
}

.s-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.s-keys span {
  padding: 0.45rem 0;
  border-radius: 0.7rem;
  background: #ffffff;
  text-align: center;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  color: #1a1b1f;
}

/* Tuiles récapitulatives */
.feature-tile {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feature-tile .story-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
}

/* Bouton magasin d'applications */
.store-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.3rem;
  border-radius: 1rem;
  background: #0b1020;
  color: #ffffff;
  text-align: left;
  box-shadow: 0 16px 30px -16px rgb(0 0 0 / 60%);
  transition: translate 250ms ease;
}

.store-button:hover {
  translate: 0 -3px;
}

.store-button small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c1c6d7;
}

.store-button strong {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.05rem;
}

@media (prefers-reduced-motion: reduce) {
  .orbit-spin,
  .orbit-icon,
  .threat-chip,
  .radar-pulse,
  .s-wave span {
    animation: none !important;
  }

  .story-step {
    opacity: 1 !important;
    translate: none !important;
  }
}

/* Sur petit écran, la maquette reste seule : pas d'orbite ni de notifications flottantes */
@media (max-width: 1023px) {
  .hero-mockup .orbit-wrap,
  .hero-mockup .float-notif {
    display: none;
  }
}

/* Navigation par pages sur l'accueil : seule la page choisie est affichée */
main > section[data-view][hidden] {
  display: none !important;
}

main > section[data-view] {
  animation: page-in 450ms ease-out both;
}

main[data-active-view]:not([data-active-view="accueil"]) {
  min-height: calc(100vh - 5rem);
}

/* En-tête : le nom ne se coupe pas et le bouton de lancement laisse la place au menu sur écran moyen */
body > header a > span.font-headline {
  white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 1100px) {
  body > header .sm\:inline-flex {
    display: none !important;
  }
}

.stat-value {
  white-space: nowrap;
  font-size: clamp(1.7rem, 5vw, 3.4rem);
}
