/* CALADE INTRO — VERSION FINALE V3 */

.calade-media-header .calade-media-header-inner {
  position: relative;
}

/* Conteneur temporaire */
.calade-intro-sides {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* Typographie identique pour les deux textes */
.calade-intro-sides span {
  position: absolute;
  top: 50%;
  display: block;
  white-space: nowrap;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(28px, 2.8vw, 44px);
  line-height: 1;
  font-weight: 800;
  font-style: normal;
  letter-spacing: -.035em;
  color: #FFFFFF;
  text-shadow: 0 3px 12px rgba(45,0,20,.28);
  opacity: 0;
}

/* Texte à gauche du logo */
.calade-intro-left {
  right: calc(50% + 64px);
  text-align: right;
}

/* Texte à droite du logo */
.calade-intro-right {
  left: calc(50% + 64px);
  text-align: left;
}

/* Cycle total */
.calade-intro-start {
  animation: caladeIntroLifetime 4.5s linear both;
}

/* Apparition depuis la gauche */
.calade-intro-start .calade-intro-left {
  animation: caladeIntroTextLeft 1.1s ease-out .15s both;
}

/* Apparition depuis la droite */
.calade-intro-start .calade-intro-right {
  animation: caladeIntroTextRight 1.1s ease-out .65s both;
}

@keyframes caladeIntroTextLeft {
  from {
    opacity: 0;
    transform: translate(-24px,-50%);
  }
  to {
    opacity: 1;
    transform: translate(0,-50%);
  }
}

@keyframes caladeIntroTextRight {
  from {
    opacity: 0;
    transform: translate(24px,-50%);
  }
  to {
    opacity: 1;
    transform: translate(0,-50%);
  }
}

@keyframes caladeIntroLifetime {
  0%, 76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Soulignement jaune progressif */
.calade-intro-sides::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: min(560px,45vw);
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    transparent,
    #FFD35B 22%,
    #FFF1B8 50%,
    #FFD35B 78%,
    transparent
  );
  box-shadow: 0 0 9px rgba(255,211,91,.35);
  transform: translateX(-50%) scaleX(0);
  opacity: 0;
}

.calade-intro-start::after {
  animation: caladeIntroLine 3.6s ease-in-out .45s both;
}

@keyframes caladeIntroLine {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
  }
  38%, 78% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleX(1);
  }
}

/* Zoom du vrai logo, sans déplacer son conteneur */
.calade-media-header.calade-intro-active
.calade-header-center .calade-logo {
  transform-origin: center center;
  animation:
    caladeLogoZoom 1s cubic-bezier(.22,1,.36,1) 1.75s both,
    caladeLogoGlow 2s ease-in-out 1.55s both;
}

@keyframes caladeLogoZoom {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.14);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes caladeLogoGlow {
  0%, 100% {
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    filter: drop-shadow(
      0 0 15px rgba(255,211,91,.50)
    );
  }
}

/* Tablette */
@media (min-width:601px) and (max-width:1100px) {
  .calade-intro-sides span {
    font-size: clamp(20px,2.6vw,29px);
  }

  .calade-intro-left {
    right: calc(50% + 50px);
  }

  .calade-intro-right {
    left: calc(50% + 50px);
  }
}

/* Smartphone */
@media (max-width:600px) {
  .calade-intro-sides span {
    font-size: 12px;
    letter-spacing: -.04em;
  }

  .calade-intro-left {
    right: calc(50% + 43px);
  }

  .calade-intro-right {
    left: calc(50% + 43px);
  }

  .calade-intro-sides::after {
    width: min(235px,65vw);
    height: 2px;
    bottom: 3px;
  }
}

@media (max-width:360px) {
  .calade-intro-sides span {
    font-size: 10px;
  }

  .calade-intro-left {
    right: calc(50% + 38px);
  }

  .calade-intro-right {
    left: calc(50% + 38px);
  }
}

/* Respect de la réduction des animations */
@media (prefers-reduced-motion:reduce) {
  .calade-intro-sides,
  .calade-media-header .calade-logo {
    animation: none !important;
  }
}


/* CALADE_LOGO_SMOOTH_V1 */

/* Zoom doux, sans rebond */
.calade-media-header.calade-intro-active
.calade-header-center .calade-logo {
    transform-origin: center center;
    backface-visibility: hidden;
    will-change: transform;
    animation:
        caladeSmoothZoom 1.8s ease-in-out 1.55s both,
        caladeSmoothGlow 1.8s ease-in-out 1.55s both !important;
}

/* Une seule montée, puis descente progressive */
@keyframes caladeSmoothZoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.10);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes caladeSmoothGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0 transparent);
    }
    50% {
        filter: drop-shadow(
            0 0 12px rgba(255,211,91,.38)
        );
    }
}

@media (prefers-reduced-motion: reduce) {
    .calade-media-header.calade-intro-active
    .calade-header-center .calade-logo {
        animation: none !important;
        will-change: auto;
    }
}
