/* ==========================================================================
   Pipelines — hub : une carte par pipeline, toute la carte ouvre la fiche.
   Teintes de la charte (--ae-blue-* / --ae-green-*) : light + dark.
   ========================================================================== */

.pp-tone--orange {
    --c-fill: var(--ae-orange-fill);
    --c-edge: var(--ae-orange-edge);
    --c-glow: var(--ae-orange-glow);
    --c-deep: var(--ae-orange-deep);
    --c-shadow: var(--ae-orange-shadow);
}

.pp-tone--blue {
    --c-fill: var(--ae-blue-fill);
    --c-edge: var(--ae-blue-edge);
    --c-glow: var(--ae-blue-glow);
    --c-deep: var(--ae-blue-deep);
    --c-shadow: var(--ae-blue-shadow);
}

.pp-tone--green {
    --c-fill: var(--ae-green-fill);
    --c-edge: var(--ae-green-edge);
    --c-glow: var(--ae-green-glow);
    --c-deep: var(--ae-green-deep);
    --c-shadow: var(--ae-green-shadow);
}

.pipelines-hub-page .pp-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* Carte explicative (façon fiche modèle) : icône + titre, résumé, étapes, CTA.
   Plus de schéma intégré : la carte tient sur une seule colonne. */
.pp-hub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    height: 100%;
    padding: 24px;
    border: 1px solid var(--c-edge);
    border-radius: var(--ae-radius-xl, 18px);
    background:
        radial-gradient(120% 90% at 0% 0%, var(--c-glow) 0%, transparent 60%),
        var(--c-fill);
    box-shadow: 0 1px 2px var(--c-shadow);
    transition: box-shadow var(--ae-ease), transform var(--ae-ease), border-color var(--ae-ease);
}

.pp-hub-card:hover,
.pp-hub-card:focus-within {
    border-color: color-mix(in srgb, var(--c-deep) 45%, var(--c-edge));
    box-shadow: 0 16px 34px -18px var(--c-shadow), 0 1px 2px var(--c-shadow);
    transform: translateY(-2px);
}

html.dark .pp-hub-card {
    box-shadow: none;
}

html.dark .pp-hub-card:hover,
html.dark .pp-hub-card:focus-within {
    box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.9);
}

.pp-hub-card__head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
}

.pp-hub-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--c-deep);
    color: var(--c-fill);
    font-size: 1.05rem;
    box-shadow: 0 6px 14px -8px var(--c-shadow);
}

.pp-hub-card__titles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
}

.pp-hub-card__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.pp-hub-card__link {
    color: var(--c-deep);
    text-decoration: none;
}

/* Toute la carte est cliquable (lien étiré) */
.pp-hub-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
}

.pp-hub-card__link:focus-visible {
    outline: none;
}

.pp-hub-card:has(.pp-hub-card__link:focus-visible) {
    outline: 2px solid var(--c-deep);
    outline-offset: 3px;
}

.pp-hub-card__tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--c-deep) 22%, transparent);
    border-radius: var(--ae-radius-pill, 999px);
    background: color-mix(in srgb, var(--c-deep) 8%, transparent);
    color: var(--c-deep);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.pp-hub-card__summary {
    margin: 0;
    max-width: 52ch;
    color: color-mix(in srgb, var(--c-deep) 80%, var(--ae-ink));
    font-size: 0.9375rem;
    line-height: 1.6;
}

.pp-hub-card__steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pp-hub-card__steps li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    color: color-mix(in srgb, var(--c-deep) 85%, var(--ae-ink));
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
}

.pp-hub-card__step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--c-deep) 10%, transparent);
    color: var(--c-deep);
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pp-hub-card__foot {
    display: flex;
    align-items: center;
    margin-top: auto;
    padding-top: 4px;
}

.pp-hub-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--ae-radius, 10px);
    background: var(--c-deep);
    color: var(--c-fill);
    font-size: 0.875rem;
    font-weight: 600;
    transition: gap var(--ae-ease);
}

.pp-hub-card__cta i {
    font-size: 0.8em;
}

.pp-hub-card:hover .pp-hub-card__cta {
    gap: 12px;
}

/* Aperçu du schéma : supprimé du hub (cartes explicatives). */

@media (max-width: 1000px) {
    .pp-hub-card {
        gap: 16px;
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pp-hub-card,
    .pp-hub-card__cta {
        transition: none;
    }

    .pp-hub-card:hover,
    .pp-hub-card:focus-within {
        transform: none;
    }
}
