.waouh-image {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 12px;
    opacity: 0;
    transform: scale(1.3) rotate(-5deg);
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.waouh-image.animated {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}
.waouh-tags {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 1.2em;
    margin-top: 1em;
    flex-wrap: wrap;
}
.waouh-tag {
    font-size: 0.9em;
    font-weight: bold;
    background: linear-gradient(135deg, #fffefb 0%, #f3dacb 100%);
    color: #000;
    margin: 4px 0;
    padding: 0.4em 1.1em;
    transform: rotate(-8deg);
    border: 2px solid var(--couleur-chaude-fonce);
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.25);
    animation: floatTag 0.7s ease both;
}
.tag-free {
    transform: rotate(6deg);
    animation-delay: 0.4s;
}
.tag-revol {
    transform: rotate(12deg);
    animation-delay: 0.9s;
}
.tag-swipe {
    transform: rotate(20deg);
    animation-delay: 1.4s;
}
@keyframes floatTag {
    from {
        opacity: 0;
        transform: translateY(-10px) rotate(-10deg) scale(0.85);
    }
    to {
        opacity: 1;
        transform: rotate(var(--rotate, -8deg)) scale(1);
    }
}

@media (max-width: 500px) {
    .waouh-tags {
        align-items: center;
        gap: 0.6em;
    }

    .waouh-tag {
        width: fit-content;
    }

    .waouh-image {
        border-radius: 8px;
    }
}

.wow-number .num {
    position: relative;
    z-index: 10;
    font-weight: 1000;
    font-variant-numeric: tabular-nums;
    font-size: 2em;
}
@media (prefers-reduced-motion: reduce) {
.wow-number .num { transition: none; }
}

.image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 1em auto;
}

#magic-text {
  font-family: 'Caveat', cursive;
  position: absolute;
  font-size: 2.4em;
  font-weight: 1000;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 12%;
  padding: 0.2em 0.8em;
  color: #fff;
  text-align: center;
  background: linear-gradient(270deg, #00d4ff, #3a86ff, #00d4ff);
  background-size: 400% 400%;
  border-radius: 18px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35), 0 0 16px rgba(58,134,255,0.75);
  box-shadow: 0 0 60px rgba(0,140,255,0.65), 0 16px 36px rgba(0,0,0,0.28);
  -webkit-text-stroke: 0.5px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;

  will-change: transform, opacity, box-shadow, background-position;
  backface-visibility: hidden;
}

#magic-text.show {
  animation:
    fadeInSoft 1.2s ease-out                0s   1 both,
    ringMotion  1s  ease-in-out             1.7s 1 both,
    vanishDrop  .7s ease                    3.7s 1 forwards,
    pulseGlow   3.7s ease-in-out            0s   1 both,
    colorFlow   3.7s linear                 0s   1 both;
}

/* --- KEYFRAMES --- */

@keyframes fadeInSoft {
  0%   { opacity: 0; }
  60%  { opacity: 0.75; }
  100% { opacity: 1; }
}

@keyframes ringMotion {
  0%   { transform: translate(-50%, -50%) rotate(10deg); }
  25%  { transform: translate(-50%, -50%) rotate(-10deg); }
  50%  { transform: translate(-50%, -50%) rotate(8deg); }
  75%  { transform: translate(-50%, -50%) rotate(-8deg); }
  100% { transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes vanishDrop {
  0%   { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%, calc(-50% + 40px)) rotate(0deg) scale(0.84); }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 42px rgba(0,140,255,0.55), 0 14px 32px rgba(0,0,0,0.24);
  }
  50% {
    box-shadow: 0 0 90px rgba(0,140,255,0.95), 0 18px 40px rgba(0,0,0,0.30);
  }
}

@keyframes colorFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  #magic-text.show { animation: fadeOnly .9s ease .2s 1 forwards; }
}

@keyframes fadeOnly {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@media (max-width: 420px) {
  #magic-text {
    font-size: 1.2em;
    padding: 0.6em 0.8em;
    white-space: normal;
    max-width: 90vw;
    text-align: center;
    word-break: break-word;
    transform-origin: 50% 16%;
    -webkit-text-stroke: 0.3px rgba(0,0,0,0.18);
    text-shadow: 0 1px 6px rgba(0,0,0,0.28), 0 0 10px rgba(58,134,255,0.55);
    box-shadow: 0 0 40px rgba(0,140,255,0.5), 0 10px 24px rgba(0,0,0,0.22);
  }
}




/* === SECTION ÉTAPES (style clean et pro) === */

.steps-section {
  max-width: 720px;
  margin: 3em auto;
  display: flex;
  flex-direction: column;
  gap: 2em;
  padding: 0 1em;
}

/* Cartes */
.step-card {
  background: linear-gradient(145deg, #ffffff 0%, #f6f9ff 100%);
  border: 2px solid rgba(11,129,184,0.1);
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  padding: 2em 1.5em;
  text-align: center;
  transform: translateY(60px) scale(0.96) rotate(2deg);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.25, 0.9, 0.3, 1.3);
  will-change: transform, opacity;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Animation d'apparition */
.step-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
}

/* Texte */
.step-text {
  font-size: 1.12em;
  color: #333;
  line-height: 1.55;
  max-width: 440px;
  margin-bottom: 1em;
}

/* Image : taille fixe, pas de width 100% pour éviter flou */
.step-card img {
  width: 350px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.8s ease;
  object-fit: cover;
}

.step-card.visible img {
  transform: scale(1.03);
}

/* Alternance inclinaison */
.rotate-right { rotate: 2.5deg; }
.rotate-left  { rotate: -2.5deg; }

/* Cascade animation */
.step-card:nth-child(1) { transition-delay: 0.05s; }
.step-card:nth-child(2) { transition-delay: 0.15s; }
.step-card:nth-child(3) { transition-delay: 0.25s; }
.step-card:nth-child(4) { transition-delay: 0.35s; }
.step-card:nth-child(5) { transition-delay: 0.45s; }

/* Intro / Outro encadrées */
.how-it-works-content {
  background: linear-gradient(135deg, #f0f7fa 60%, #b7e1f5 100%);
  border: 2px solid var(--couleur-froide-fonce);
  padding: 1.2em;
  margin: 2em auto;
  max-width: 520px;
  border-radius: 14px;
  font-size: 1em;
  color: #333;
  text-align: center;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.1);
}

.how-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--couleur-froide-fonce);
  margin: 0;
  text-align: center;
}

/* Responsive mobile */
@media (max-width: 600px) {
  .step-card {
    padding: 1.5em 1em;
    min-height: auto;
  }

  .step-card img {
    width: 75%;
  }

  .step-text {
    font-size: 1em;
  }

  .how-it-works-content {
    margin: 1.5em 1em;
    padding: 1em;
  }
}

@media (min-width: 768px) {
  .step-card {
    width: 400px; /* ou 520px si tu veux encore plus étroit */
    margin-left: auto;
    margin-right: auto;
  }
}
