/**
 * assets/css/niche-ideas.css
 *
 * Section « idées de niches » de la page d'accueil publique
 * (includes/niche_ideas_carousel.php + assets/js/niche-ideas.js).
 *
 * Rangée de cartes défilable à la main (balayage au doigt, flèches) ET en
 * automatique : le JS fait avancer scrollLeft en boucle (liste clonée avant
 * et après), s'arrête au toucher / survol / clic sur une flèche et reprend
 * quelques secondes plus tard. Sans JS : simple défilement horizontal natif.
 */
.niche-ideas {
    padding: 10px 0 10px;
}
/* La section Formations qui précède garde 120 px de vide en bas (style.css,
   partagé) : on en reprend une partie pour que l'écart reste du même ordre
   que les autres sections. La section suivante (public-fit) apporte déjà
   60 px de marge haute, d'où le peu de padding bas ci-dessus. */
.public-formations + .niche-ideas {
    margin-top: -80px;
}
.niche-ideas {
    margin-bottom: -20px;
}
.niche-ideas .section-heading {
    margin-bottom: 0;
}
.niche-ideas h2 {
    font-size: 42px;
    margin-bottom: 12px;
}

.niche-ideas .ni-stage {
    position: relative;
}
.niche-ideas .ni-viewport {
    overflow-x: auto;
    padding: 30px 0 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
}
.niche-ideas .ni-viewport::-webkit-scrollbar {
    display: none;
}
.niche-ideas .ni-stage.ni-on .ni-viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.niche-ideas .ni-track {
    display: flex;
    width: max-content;
    margin: 0 auto;
}

/* Flèches : visibles seulement quand la rangée défile (classe posée par le JS). */
.niche-ideas .ni-arrow {
    display: none;
    position: absolute;
    top: 38%;
    z-index: 2;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: rgba(9, 10, 12, .82);
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    padding: 0 0 4px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.niche-ideas .ni-arrow:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.niche-ideas .ni-prev { left: 6px; }
.niche-ideas .ni-next { right: 6px; }
.niche-ideas .ni-stage.ni-on .ni-arrow {
    display: flex;
}

/* Indicateur affiché seulement quand l'utilisateur a mis le défilement en
   pause (toucher / clic sur le carrousel ; le suivant relance). */
.niche-ideas .ni-note {
    position: absolute;
    top: 2px;
    right: 12px;
    z-index: 3;
    padding: 4px 11px;
    border-radius: 20px;
    background: rgba(9, 10, 12, .88);
    border: 1px solid var(--accent);
    color: var(--accent);
    font: 600 10px var(--font-mono);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}
.niche-ideas .ni-note[hidden] {
    display: none;
}

/* Carte au même format que celles du carrousel de preuves (gains-carousel.css) :
   panneau noir très arrondi, en-tête (cercle orange + texte), image dans un
   cadre arrondi 9:12. Les images 9:16 y sont affichées ENTIÈRES (contain). */
.niche-ideas .ni-card {
    width: 300px;
    flex-shrink: 0;
    margin-right: 24px;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 22px 22px 26px;
    box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .9);
    display: flex;
    flex-direction: column;
    transition: border-color .25s, transform .25s;
}
.niche-ideas .ni-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}
.niche-ideas .ni-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.niche-ideas .ni-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--accent);
    color: #14140F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
}
.niche-ideas .ni-meta {
    min-width: 0;
}
.niche-ideas .ni-meta h3 {
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1.15;
    color: var(--text);
}
.niche-ideas .ni-meta p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.niche-ideas .ni-img {
    position: relative;
    margin-top: auto;
    border-radius: 16px;
    overflow: hidden;
    background: #0d0e12;
    aspect-ratio: 9 / 12;
}
.niche-ideas .ni-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
/* Statut de la carte, dans l'en-tête (et non plus sur l'image, dont il
   cachait le texte incrusté). */
.niche-ideas .ni-status {
    display: inline-block;
    margin-bottom: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font: 600 9.5px var(--font-mono);
    letter-spacing: .8px;
    text-transform: uppercase;
    white-space: nowrap;
}
.niche-ideas .ni-status.available {
    background: var(--accent);
    color: #090A0C;
}
.niche-ideas .ni-status.soon {
    border: 1px solid var(--accent);
    color: var(--accent);
}
.niche-ideas .ni-status.idea {
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
}
.niche-ideas .ni-link {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(9, 10, 12, .88);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    font-size: 12.5px;
    text-decoration: none;
}

.niche-ideas .ni-cta {
    text-align: center;
    margin-top: 26px;
}

@media (max-width: 600px) {
    .niche-ideas {
        padding: 0;
    }
    .public-formations + .niche-ideas {
        margin-top: -90px;
    }
    .niche-ideas {
        margin-bottom: -24px;
    }
    .niche-ideas h2 {
        font-size: 30px;
    }
    .niche-ideas .ni-viewport {
        padding: 22px 0 8px;
    }
    .niche-ideas .ni-arrow {
        width: 36px;
        height: 36px;
        margin-top: -18px;
        font-size: 24px;
    }
    .niche-ideas .ni-prev { left: 2px; }
    .niche-ideas .ni-next { right: 2px; }
    .niche-ideas .ni-cta {
        margin-top: 14px;
    }
    .niche-ideas .ni-card {
        width: 72vw;
        max-width: 290px;
        margin-right: 14px;
        padding: 18px 16px 20px;
        border-radius: 24px;
    }
    .niche-ideas .ni-av {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    .niche-ideas .ni-meta h3 {
        font-size: 17px;
    }
    .niche-ideas .ni-img {
        border-radius: 12px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .niche-ideas .ni-card {
        transition: none;
    }
    .niche-ideas .ni-card:hover {
        transform: none;
    }
}
