/* Animation titre hero (accueil) */
.hero-animated-text {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.hero-animated-text .hero-line {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
}

.hero-animated-text .hero-line:first-of-type {
    animation: hero-showup 7s infinite;
}

.hero-animated-text .hero-line--reveal {
    width: 0;
    animation: hero-reveal 7s infinite;
}

.hero-animated-text .hero-line--reveal span {
    margin-left: -355px;
    animation: hero-slidein 7s infinite;
}

.hero-line--accent {
    color: var(--yam-brand, #d78731);
}

@keyframes hero-showup {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes hero-slidein {
    0% { margin-left: -800px; }
    20% { margin-left: -800px; }
    35% { margin-left: 0; }
    100% { margin-left: 0; }
}

@keyframes hero-reveal {
    0% { opacity: 0; width: 0; }
    20% { opacity: 1; width: 0; }
    30% { width: 355px; }
    80% { opacity: 1; }
    100% { opacity: 0; width: 355px; }
}

/* Titre centré : animation simplifiée */
.hero-animated-text--center {
    overflow: visible;
    white-space: normal;
}

.hero-animated-text--center .hero-line:first-of-type,
.hero-animated-text--center .hero-line--reveal,
.hero-animated-text--center .hero-line--reveal span {
    animation: none;
    opacity: 1;
    width: auto;
    margin-left: 0;
}

@media (prefers-reduced-motion: reduce) {
    .hero-animated-text .hero-line:first-of-type,
    .hero-animated-text .hero-line--reveal,
    .hero-animated-text .hero-line--reveal span {
        animation: none;
        opacity: 1;
        width: auto;
        margin-left: 0;
    }
}
