/* ============================================
   M2R — Hero System
   Multiple layouts, overlays, shapes, parallax
   ============================================ */

/* ── Base Hero ────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  color: #fff;
  padding: clamp(80px, 10vw, 140px) 0;
  background-size: cover;
  background-position: center;
}

/* Overlay gradient — strong for text readability */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    160deg,
    rgba(15, 27, 45, 0.94) 0%,
    rgba(15, 27, 45, 0.80) 100%
  );
}

.hero::after {
  display: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-5);
  max-width: 700px;
  letter-spacing: -0.03em;
  color: #fff;
}

.hero h1 span {
  color: var(--secondary);
}

.hero .lead {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  opacity: 0.85;
  max-width: 560px;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Hero badges */
.hero-badges {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  opacity: 0.75;
  font-weight: 500;
}

.hero-badge svg { flex-shrink: 0; }

/* ── HERO HOME (special) ─────────────────── */
.hero-home {
  padding: clamp(100px, 12vw, 180px) 0;
}

.hero-home h1 {
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
}

/* ── HERO SPLIT: texte + image produit ───── */
.hero-split {
  padding: clamp(60px, 8vw, 100px) 0;
}

.hero-split .container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-12);
  align-items: center;
}

.hero-split .hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-split .hero-visual img {
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 16px 40px rgba(0,0,0,0.4));
}

/* ── HERO COMPACT: pages secondaires ──────── */
.hero-compact {
  padding: clamp(48px, 6vw, 72px) 0;
}

.hero-compact h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

/* ── HERO MINIMAL: legal pages ────────────── */
.hero-minimal {
  padding: 40px 0;
}

.hero-minimal h1 {
  font-size: var(--text-2xl);
}

/* ── Overlay Color Variants ──────────────── */
.hero-navy::before {
  background: linear-gradient(160deg, rgba(15,27,45,0.94) 0%, rgba(15,27,45,0.82) 100%);
}

.hero-accent::before {
  background: linear-gradient(160deg, rgba(0,80,140,0.93) 0%, rgba(0,145,213,0.80) 100%);
}

.hero-magenta::before {
  background: linear-gradient(160deg, rgba(120,0,60,0.93) 0%, rgba(200,0,110,0.78) 100%);
}

.hero-green::before {
  background: linear-gradient(160deg, rgba(8,50,35,0.93) 0%, rgba(25,120,80,0.80) 100%);
}

.hero-warm::before {
  background: linear-gradient(160deg, rgba(80,40,5,0.93) 0%, rgba(180,120,25,0.78) 100%);
}

/* ── Text Position Variants ──────────────── */
.hero-center .container {
  text-align: center;
}

.hero-center h1,
.hero-center .lead {
  margin-left: auto;
  margin-right: auto;
}

.hero-center .hero-actions {
  justify-content: center;
}

.hero-center .hero-badges {
  justify-content: center;
}

.hero-right .container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.hero-right h1,
.hero-right .lead {
  margin-left: auto;
}

/* ── Bottom Shape Variants ───────────────── */
.hero-curved {
  padding-bottom: clamp(96px, 12vw, 160px);
}

.hero-curved::after {
  display: block;
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-warm);
  border-radius: 50% 50% 0 0;
  z-index: 2;
}

.hero-diagonal {
  padding-bottom: clamp(96px, 12vw, 160px);
}

.hero-diagonal::after {
  display: block;
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--bg-warm);
  clip-path: polygon(0 55%, 100% 0, 100% 100%, 0 100%);
  z-index: 2;
}

.hero-wave {
  padding-bottom: clamp(88px, 10vw, 140px);
}

.hero-wave::after {
  display: block;
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 52px;
  background: var(--bg-warm);
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 2;
}

/* ── Floating Shapes ─────────────────────── */
.hero-shapes .shape {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  opacity: 0.04;
  background: #fff;
  pointer-events: none;
}

.hero-shapes .shape-1 {
  width: 300px;
  height: 300px;
  top: -80px;
  right: 8%;
  animation: heroFloat 7s ease-in-out infinite;
}

.hero-shapes .shape-2 {
  width: 150px;
  height: 150px;
  bottom: 40px;
  right: 25%;
  animation: heroFloat 6s 1s ease-in-out infinite;
}

.hero-shapes .shape-3 {
  width: 80px;
  height: 80px;
  top: 30%;
  left: 5%;
  animation: heroFloat 8s 0.5s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
}

/* ── Parallax layers (JS-controlled) ──── */
[data-parallax] {
  will-change: transform;
}

/* ── Hero entrance animations ────────────── */
.hero h1 {
  animation: heroFadeUp 0.8s var(--ease-out) both;
}

.hero .lead {
  animation: heroFadeUp 0.8s 0.1s var(--ease-out) both;
}

.hero-actions {
  animation: heroFadeUp 0.8s 0.2s var(--ease-out) both;
}

.hero-badges {
  animation: heroFadeUp 0.8s 0.3s var(--ease-out) both;
}

.hero-split .hero-visual {
  animation: heroSlideRight 0.9s 0.15s var(--ease-out) both;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSlideRight {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ── Responsive Hero ─────────────────────── */
@media (max-width: 768px) {
  .hero {
    padding: clamp(56px, 8vw, 80px) 0;
  }

  .hero h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .hero-home h1 {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  .hero-split .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-split .hero-visual {
    display: none;
  }

  .hero-curved,
  .hero-diagonal,
  .hero-wave {
    padding-bottom: 72px;
  }

  .hero-badges {
    flex-direction: column;
    gap: var(--space-3);
  }

  .hero-right .container {
    align-items: flex-start;
    text-align: left;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   CONTRASTE DES HÉROS COLORÉS — 2026-08-20
   Les voiles colorés (cyan, magenta, vert, ambre) étaient trop clairs :
   le <span> cyan du titre tombait à 1,5 de contraste, donc illisible.
   Voiles assombris + span en blanc sur ces variantes.
   ────────────────────────────────────────────────────────────────────────── */
.hero-accent::before {
  background: linear-gradient(160deg, rgba(0,48,84,0.95) 0%, rgba(0,86,132,0.88) 100%);
}
.hero-magenta::before {
  background: linear-gradient(160deg, rgba(74,0,38,0.95) 0%, rgba(134,0,72,0.88) 100%);
}
.hero-green::before {
  background: linear-gradient(160deg, rgba(5,32,22,0.95) 0%, rgba(14,74,50,0.88) 100%);
}
.hero-warm::before {
  background: linear-gradient(160deg, rgba(48,24,2,0.95) 0%, rgba(104,68,12,0.88) 100%);
}
.hero-accent h1 span,
.hero-magenta h1 span,
.hero-green h1 span,
.hero-warm h1 span { color: #fff; opacity: 0.82; }

/* Surtitre et chapô sur photo : assez opaques pour rester lisibles */
.hero .section-eyebrow { color: rgba(255,255,255,0.92); }
.hero .lead { color: rgba(255,255,255,0.94); }
