/* =====================================================================
   Page « Accueil » — styles externalisés (CSP style-src stricte).
   Fond du hero (anciennement en variables CSS inline).
   ===================================================================== */
.hero-bg-accueil {
    --hero-bg: url('/img/background2.jpeg');
    --hero-bg-opacity: 1;
}

/* Desktop : confiner UNIQUEMENT le bloc texte (description + boutons + stats)
   à gauche, pour ne pas recouvrir l'écriture de la carte en arrière-plan.
   Le titre et le panneau « En 4 étapes » ne sont pas touchés. */
@media (min-width: 992px) {
    .hero-bg-accueil .hero-inner > div:not(.hero-card) {
        max-width: 58%;
    }

    /* Boutons « Déposer ma demande » / « Suivre mon dossier » : texte plus
       petit + pas de retour à la ligne, pour les aligner sur une seule ligne. */
    .hero-bg-accueil .hero-btns {
        flex-wrap: nowrap;
    }

    .hero-bg-accueil .hero-btns .btn {
        font-size: 14px;
        padding: 12px 20px;
        white-space: nowrap;
    }

    /* Statistiques (1 mois / 3 ans / 25 000 F CFA) : tout sur une seule ligne. */
    .hero-bg-accueil .hero-stats {
        flex-wrap: nowrap;
        gap: 18px;
    }

    .hero-bg-accueil .hero-stats .stat-val {
        font-size: 20px;
        white-space: nowrap;
    }

    .hero-bg-accueil .hero-stats .stat-lbl {
        white-space: nowrap;
    }
}

/* =====================================================================
   Ticker d'infos — messages diffusés en bas du hero, superposés sur
   l'image de fond. Défilement horizontal en CSS pur (aucun JS → CSP-safe).
   ===================================================================== */

/* Réserve de l'espace en bas du hero pour ne pas masquer le contenu. */
.hero-bg-accueil.has-ticker { padding-bottom: 92px; }

.hero-ticker {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: stretch;
    min-height: 46px;
    background: linear-gradient(90deg, rgba(18, 74, 40, .82), rgba(18, 74, 40, .66));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .18);
}

/* Étiquette fixe à gauche (n'défile pas). */
.hero-ticker-label {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: var(--or, #F5A623);
    color: #1A1A2E;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
    padding-right: 26px;
}

.hero-ticker-label i { font-size: 16px; }

/* Fenêtre de défilement : masque le débordement + fondu sur les bords. */
.hero-ticker-viewport {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent);
}

.hero-ticker-track {
    display: flex;
    width: max-content;
    animation: hero-ticker-scroll 32s linear infinite;
}

/* Pause au survol pour laisser lire / cliquer les liens. */
.hero-ticker:hover .hero-ticker-track { animation-play-state: paused; }

.hero-ticker-group {
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding-left: 18px;
}

.ht-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: #fff;
    font-weight: 600;
}

.ht-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--or, #F5A623);
    flex-shrink: 0;
}

.ht-dot-info    { background: #7fd1a6; }
.ht-dot-success { background: #4caf7d; }
.ht-dot-warning { background: var(--or, #F5A623); }
.ht-dot-danger  { background: #ff6b6b; }

.ht-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
    padding: 3px 12px;
    border-radius: 50px;
    background: var(--or, #F5A623);
    color: #1A1A2E;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease;
}

.ht-link:hover { background: #ffbe4d; }

.ht-sep {
    color: rgba(255, 255, 255, .45);
    font-size: 14px;
    margin: 0 20px;
}

@keyframes hero-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Accessibilité : pas d'animation si l'utilisateur la refuse → défilement
   manuel possible et second groupe masqué. */
@media (prefers-reduced-motion: reduce) {
    .hero-ticker-track { animation: none; }
    .hero-ticker-viewport {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .hero-ticker-group[aria-hidden="true"] { display: none; }
}

@media (max-width: 575px) {
    .hero-bg-accueil.has-ticker { padding-bottom: 84px; }
    .hero-ticker-label-txt { display: none; }
    .hero-ticker-label { padding-right: 22px; }
    .ht-item { font-size: 13px; }
}

@media (min-width: 992px) {
    .hero-bg-accueil.has-ticker { padding-bottom: 148px; }
    .hero-ticker { min-height: 50px; }
    .ht-item { font-size: 15px; }
}
