/* ===== Page Notre Histoire ===== */

.mmstory-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mmstory-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Hero --- */
.mmstory-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}

.mmstory-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mmstory-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.5;
}

.mmstory-orb--1 {
  width: 320px;
  height: 320px;
  top: -120px;
  left: -80px;
  background: rgba(255, 133, 0, 0.35);
  animation: mmstory-drift 11s ease-in-out infinite;
}

.mmstory-orb--2 {
  width: 260px;
  height: 260px;
  bottom: -100px;
  right: -60px;
  background: rgba(107, 46, 0, 0.28);
  animation: mmstory-drift 13s ease-in-out infinite reverse;
}

.mmstory-orb--3 {
  width: 180px;
  height: 180px;
  top: 30%;
  right: 20%;
  background: rgba(255, 133, 0, 0.2);
  animation: mmstory-drift 9s ease-in-out infinite;
}

.mmstory-hero-inner {
  position: relative;
}

.mmstory-hero h1 {
  max-width: 680px;
  margin: 0 auto 1rem;
  font-size: clamp(1.8rem, 5.5vw, 3rem);
  line-height: 1.15;
}

.mmstory-hero p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

.mmstory-scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mmstory-scroll-hint i {
  display: block;
  width: 20px;
  height: 32px;
  border: 2px solid rgba(107, 46, 0, 0.35);
  border-radius: 999px;
  position: relative;
}

.mmstory-scroll-hint i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 999px;
  background: var(--primary);
  animation: mmstory-scrolldot 1.8s ease-in-out infinite;
}

/* --- Timeline --- */
.mmstory-timeline-wrap {
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}

.mmstory-timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 2.4rem;
  display: grid;
  gap: clamp(2rem, 5vw, 3.25rem);
}

.mmstory-timeline-line {
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: rgba(255, 133, 0, 0.16);
  overflow: hidden;
}

.mmstory-timeline-line i {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 999px;
  transition: height 0.2s linear;
}

.mmstory-chapter {
  position: relative;
}

.mmstory-chapter-dot {
  position: absolute;
  left: -2.4rem;
  top: 10px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 5px rgba(255, 133, 0, 0.14);
}

.mmstory-chapter-card {
  padding: clamp(1.25rem, 3vw, 1.9rem);
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(255, 133, 0, 0.14);
  box-shadow: 0 14px 32px rgba(107, 46, 0, 0.07);
}

.mmstory-chapter-tag {
  display: inline-block;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 133, 0, 0.12);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.7rem;
}

.mmstory-chapter-card h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  color: var(--secondary);
}

.mmstory-chapter-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.96rem;
}

/* --- Petites illustrations CSS des chapitres --- */
.mmstory-illus {
  position: relative;
  height: 74px;
  margin-top: 1.1rem;
  border-radius: 13px;
  background: var(--bg-soft);
  border: 1px dashed rgba(255, 133, 0, 0.3);
  overflow: hidden;
}

/* Ch.1 : la carte papier qui part en vrille */
.mmstory-illus-paper {
  position: absolute;
  left: 22px;
  top: 14px;
  width: 36px;
  height: 46px;
  background: #fff;
  border: 2px solid rgba(107, 46, 0, 0.35);
  border-radius: 4px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 6px;
  transform: rotate(-8deg);
  animation: mmstory-tilt 3.2s ease-in-out infinite;
}

.mmstory-illus-paper b {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: rgba(107, 46, 0, 0.3);
}

.mmstory-illus-cross {
  position: absolute;
  left: 78px;
  top: 22px;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--danger);
  animation: mmstory-blink 2.4s ease-in-out infinite;
}

.mmstory-illus-bubble {
  position: absolute;
  right: 26px;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 4px;
  background: rgba(107, 46, 0, 0.14);
  color: var(--secondary);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: mmstory-bob 2.8s ease-in-out infinite;
}

/* Ch.2 : le QR + l'étincelle + le téléphone */
.mmstory-illus-qr {
  position: absolute;
  left: 26px;
  top: 15px;
  width: 44px;
  height: 44px;
  border: 2.5px solid var(--secondary);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  background: #fff;
}

.mmstory-illus-qr b {
  background: var(--secondary);
  border-radius: 2px;
}

.mmstory-illus-qr b:last-child {
  background: var(--primary);
}

.mmstory-illus-spark {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--primary);
  animation: mmstory-spin-pop 2.6s ease-in-out infinite;
}

.mmstory-illus-phone-mini {
  position: absolute;
  right: 30px;
  top: 12px;
  width: 30px;
  height: 50px;
  border-radius: 8px;
  background: #1f2937;
  box-shadow: inset 0 0 0 2px #374151, inset 0 -6px 0 #374151;
  animation: mmstory-bob 3s ease-in-out infinite;
}

/* Ch.3 : les blocs qui s'empilent */
.mmstory-illus--build {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding-bottom: 12px;
}

.mmstory-illus-block {
  width: 34px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  animation: mmstory-grow 2.8s ease-in-out infinite;
}

.mmstory-illus-block:nth-child(1) { height: 26px; animation-delay: 0s; }
.mmstory-illus-block:nth-child(2) { height: 40px; animation-delay: 0.25s; }
.mmstory-illus-block:nth-child(3) { height: 32px; animation-delay: 0.5s; }

.mmstory-illus-gear {
  position: absolute;
  right: 24px;
  top: 12px;
  font-size: 1.4rem;
  color: var(--secondary);
  animation: mmstory-rotate 5s linear infinite;
}

/* Ch.4 : la coche + les ondes */
.mmstory-illus--today {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.mmstory-illus-check {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(255, 133, 0, 0.4);
  animation: mmstory-pop 2.6s ease-in-out infinite;
}

.mmstory-illus-wave {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
}

.mmstory-illus-wave b {
  width: 5px;
  border-radius: 999px;
  background: var(--secondary);
  animation: mmstory-eq 1.4s ease-in-out infinite;
}

.mmstory-illus-wave b:nth-child(1) { height: 12px; animation-delay: 0s; }
.mmstory-illus-wave b:nth-child(2) { height: 24px; animation-delay: 0.15s; }
.mmstory-illus-wave b:nth-child(3) { height: 32px; animation-delay: 0.3s; }
.mmstory-illus-wave b:nth-child(4) { height: 20px; animation-delay: 0.45s; }
.mmstory-illus-wave b:nth-child(5) { height: 14px; animation-delay: 0.6s; }

/* --- Valeurs --- */
.mmstory-values {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.mmstory-values-head {
  text-align: center;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

.mmstory-values-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.mmstory-values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 960px;
  margin: 0 auto;
}

.mmstory-value {
  padding: 1.4rem 1.2rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(255, 133, 0, 0.14);
  box-shadow: 0 10px 24px rgba(107, 46, 0, 0.06);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mmstory-value:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(107, 46, 0, 0.12);
}

.mmstory-value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 133, 0, 0.12);
  color: var(--primary);
  margin-bottom: 0.7rem;
}

.mmstory-value-icon svg {
  width: 23px;
  height: 23px;
}

.mmstory-value h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  color: var(--secondary);
}

.mmstory-value p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* --- CTA --- */
.mmstory-cta {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.mmstory-cta-inner {
  text-align: center;
  max-width: 580px;
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--secondary) 0%, #8a4207 65%, #b35b0a 100%);
  color: #fff;
  box-shadow: 0 24px 50px rgba(107, 46, 0, 0.28);
}

.mmstory-cta-inner h2 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  padding: 0 1rem;
}

.mmstory-cta-inner p {
  margin: 0 auto 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 440px;
  padding: 0 1rem;
}

.mmstory-cta-inner .hero-actions {
  justify-content: center;
}

.mmstory-cta-inner .btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* --- Animations --- */
@keyframes mmstory-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(24px, -18px); }
}

@keyframes mmstory-scrolldot {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0; transform: translateY(0); }
}

@keyframes mmstory-tilt {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(5deg) translateY(-3px); }
}

@keyframes mmstory-blink {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

@keyframes mmstory-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes mmstory-spin-pop {
  0%, 100% { transform: translateX(-50%) scale(0.85) rotate(0deg); opacity: 0.6; }
  50% { transform: translateX(-50%) scale(1.2) rotate(24deg); opacity: 1; }
}

@keyframes mmstory-grow {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.22); }
}

@keyframes mmstory-rotate {
  to { transform: rotate(360deg); }
}

@keyframes mmstory-pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes mmstory-eq {
  0%, 100% { transform: scaleY(0.6); }
  50% { transform: scaleY(1.15); }
}

/* --- Responsive --- */
@media (max-width: 720px) {
  .mmstory-values-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .mmstory-timeline {
    padding-left: 2rem;
  }

  .mmstory-chapter-dot {
    left: -2rem;
    width: 21px;
    height: 21px;
  }
}

/* --- Accessibilité : mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
  .mmstory-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .mmstory-orb,
  .mmstory-scroll-hint i::after,
  .mmstory-illus-paper,
  .mmstory-illus-cross,
  .mmstory-illus-bubble,
  .mmstory-illus-spark,
  .mmstory-illus-phone-mini,
  .mmstory-illus-block,
  .mmstory-illus-gear,
  .mmstory-illus-check,
  .mmstory-illus-wave b {
    animation: none;
  }

  .mmstory-timeline-line i {
    height: 100% !important;
  }
}
