/**
 * Parcours Qualiopi — vue compacte (remplace l’ancienne timeline lourde)
 *
 * @package Loop_Formation
 */

.htl-lite {
    position: relative;
    padding: clamp(72px, 10vw, 120px) 0;
    overflow: hidden;
    background: radial-gradient(120% 80% at 50% 0%, rgba(255, 151, 96, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, #0c1222 0%, #151b2e 42%, #0f1524 100%);
    color: #e8ecf4;
}

.htl-lite__bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(127, 119, 221, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(29, 158, 117, 0.15) 0%, transparent 38%),
        radial-gradient(circle at 50% 100%, rgba(255, 151, 96, 0.1) 0%, transparent 45%);
    pointer-events: none;
}

.htl-lite__inner {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.htl-lite__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffb48a;
    margin-bottom: 16px;
}

.htl-lite__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 auto 16px;
    max-width: 18ch;
}

.htl-lite__lead {
    font-size: clamp(1rem, 1.9vw, 1.15rem);
    line-height: 1.65;
    color: rgba(232, 236, 244, 0.82);
    max-width: 42rem;
    margin: 0 auto 36px;
}

.htl-lite__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 900px;
    margin: 0 auto 28px;
}

@media (max-width: 720px) {
    .htl-lite__stats {
        grid-template-columns: 1fr;
    }
}

.htl-lite__stat {
    padding: 20px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.htl-lite__stat-num {
    display: block;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #fff 0%, #ffc8a4 45%, #7f77dd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 8px;
}

.htl-lite__stat-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(232, 236, 244, 0.75);
    line-height: 1.35;
}

.htl-lite__pillbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.htl-lite__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.htl-lite__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.htl-lite__visual {
    position: relative;
    max-width: 920px;
    margin: 0 auto 40px;
}

.htl-lite__frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 151, 96, 0.15);
    background: #0b0f18;
}

.htl-lite__frame img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.htl-lite__glow {
    position: absolute;
    inset: auto -10% -30%;
    height: 55%;
    background: radial-gradient(ellipse at center, rgba(255, 151, 96, 0.35) 0%, transparent 65%);
    filter: blur(28px);
    pointer-events: none;
    opacity: 0.85;
}

.htl-lite__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.htl-lite__cta .btn-primary {
    background: linear-gradient(135deg, #ff9760, #ff6b2c);
    border: none;
    box-shadow: 0 14px 40px rgba(255, 107, 44, 0.35);
}

.htl-lite__cta .btn-primary:hover {
    filter: brightness(1.06);
}

.htl-lite__cta .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.htl-lite__cta .btn-ghost:hover {
    border-color: rgba(255, 151, 96, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

/* ========== Timeline détaillée (clair) ========== */
.htl-parcours {
    position: relative;
}

#parcours.htl-parcours,
#parcours-detail.htl-detail {
    scroll-margin-top: 88px;
}

.htl-detail {
    padding: clamp(64px, 8vw, 100px) 0 clamp(80px, 10vw, 120px);
    background: linear-gradient(180deg, #f6f8fc 0%, #fff 40%, #fafbfc 100%);
    border-top: 1px solid rgba(12, 18, 34, 0.06);
}

.htl-detail__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.htl-detail__intro {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 64px);
}

.htl-detail__eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ff7a3d;
    margin-bottom: 12px;
}

.htl-detail__title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #0c1222;
    margin: 0 auto 12px;
    max-width: 26ch;
    line-height: 1.12;
}

.htl-detail__sub {
    margin: 0 auto;
    max-width: 38rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #5a6578;
}

.htl-dphase {
    margin-bottom: clamp(48px, 7vw, 72px);
}

.htl-dphase:last-child {
    margin-bottom: 0;
}

.htl-dphase__head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid rgba(255, 151, 96, 0.35);
}

.htl-dphase__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #ff9760, #ff6b2c);
    flex-shrink: 0;
    box-shadow: 0 12px 32px rgba(255, 107, 44, 0.25);
}

.htl-dphase__label {
    margin: 0;
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    font-weight: 900;
    color: #0c1222;
    letter-spacing: -0.02em;
}

.htl-dphase__meta {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #64708b;
}

.htl-dphase__steps {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.htl-dstep {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px 26px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(12, 18, 34, 0.07);
    box-shadow: 0 16px 48px rgba(12, 18, 34, 0.07);
    /* Offset pour ancres #etape-* (sticky header + admin bar) */
    scroll-margin-top: 96px;
    transition: box-shadow 0.4s ease;
}

@media (max-width: 768px) {
    .htl-dstep { scroll-margin-top: 72px; }
}

/* Surbrillance temporaire quand on arrive sur une étape via #etape-{key} */
.htl-dstep.is-target {
    box-shadow:
        0 0 0 3px rgba(255, 138, 76, 0.45),
        0 28px 64px -16px rgba(255, 138, 76, 0.32);
}

.htl-dstep.is-target-pulse {
    animation: htlTargetPulse 1.8s ease-out;
}

@keyframes htlTargetPulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 138, 76, 0.85), 0 0 0 12px rgba(255, 138, 76, 0); }
    60%  { box-shadow: 0 0 0 6px rgba(255, 138, 76, 0.55), 0 0 0 18px rgba(255, 138, 76, 0); }
    100% { box-shadow: 0 0 0 3px rgba(255, 138, 76, 0.45), 0 28px 64px -16px rgba(255, 138, 76, 0.32); }
}

.htl-dstep__top {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 28px 36px;
    align-items: start;
}

@media (max-width: 900px) {
    .htl-dstep {
        padding: 22px 18px;
    }
    .htl-dstep__top {
        grid-template-columns: 1fr;
    }
}

.htl-dstep__media {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #0c1222;
    border: 1px solid rgba(12, 18, 34, 0.1);
    padding: 0;
    margin: 0;
    width: 100%;
    cursor: zoom-in;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.htl-dstep__media:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px rgba(12, 18, 34, 0.18);
}

.htl-dstep__media:focus-visible {
    outline: 3px solid #ff8a4c;
    outline-offset: 4px;
}

.htl-dstep__zoom {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(12, 18, 34, 0.7);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.htl-dstep__media:hover .htl-dstep__zoom,
.htl-dstep__media:focus-visible .htl-dstep__zoom {
    opacity: 1;
    transform: translateY(0);
}

.htl-dstep__media img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 220px;
    max-height: 420px;
    object-fit: cover;
    object-position: top center;
}

.htl-dstep__media-glow {
    position: absolute;
    inset: auto -20% -40%;
    height: 50%;
    /* --htl-c défini sur l’élément (couleur phase) ; dégradé lisible sans color-mix */
    background: radial-gradient(ellipse at center, var(--htl-c, #ff9760) 0%, transparent 68%);
    filter: blur(24px);
    pointer-events: none;
    opacity: 0.42;
}

.htl-dstep__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.htl-dstep__timing {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64708b;
}

.htl-dstep__qualiopi {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 6px;
    background: #faeeda;
    color: #854f0b;
}

.htl-dstep__special {
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
}

.htl-dstep__special--valid {
    background: rgba(29, 158, 117, 0.12);
    color: #1d9e75;
}

.htl-dstep__special--block {
    background: rgba(226, 75, 74, 0.1);
    color: #c53030;
}

.htl-dstep__title {
    margin: 0 0 10px;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    font-weight: 900;
    color: #0c1222;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.htl-dstep__excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 14px;
}

.htl-dstep__excerpt strong {
    color: #0c1222;
}

.htl-dstep__badges {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.htl-dstep__badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.htl-dstep__badge--auto {
    background: rgba(29, 158, 117, 0.1);
    color: #1d9e75;
}

.htl-dstep__badge--qualiopi {
    background: #faeeda;
    color: #854f0b;
}

.htl-dstep__badge--relance {
    background: #fbeaf0;
    color: #993556;
}

.htl-dstep__badge--docs {
    background: #eeedfe;
    color: #534ab7;
}

.htl-dstep__badge--block {
    background: rgba(226, 75, 74, 0.1);
    color: #e24b4a;
}

.htl-dstep__badge--valid {
    background: rgba(29, 158, 117, 0.12);
    color: #1d9e75;
}

.htl-dstep__rel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(12, 18, 34, 0.06);
}

.htl-dstep__rel-item {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(12, 18, 34, 0.06);
    min-width: 0;
}

.htl-dstep__rel-t {
    font-size: 11px;
    font-weight: 900;
    color: #0c1222;
}

.htl-dstep__rel-l {
    font-size: 11px;
    color: #64708b;
    font-weight: 600;
}

.htl-dstep__details {
    width: 100%;
    margin: 0;
    border-radius: 12px;
    border: 1px solid rgba(12, 18, 34, 0.08);
    background: #fafbfc;
    overflow: hidden;
}

.htl-dstep__panel {
    columns: 2;
    column-gap: 28px;
}

.htl-dstep__panel .htl-modal__section {
    break-inside: avoid;
    page-break-inside: avoid;
}

@media (max-width: 900px) {
    .htl-dstep__panel {
        columns: 1;
    }
}

.htl-dstep__summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 800;
    color: #0c1222;
    user-select: none;
}

.htl-dstep__summary::-webkit-details-marker {
    display: none;
}

.htl-dstep__summary::after {
    content: '›';
    float: right;
    font-size: 1.2rem;
    font-weight: 900;
    color: #ff7a3d;
    transition: transform 0.2s;
}

.htl-dstep__details[open] .htl-dstep__summary::after {
    transform: rotate(90deg);
}

.htl-dstep__panel {
    padding: 0 18px 18px;
    font-size: 15px;
    line-height: 1.65;
    color: #4a5568;
    border-top: 1px solid rgba(12, 18, 34, 0.06);
}

.htl-dstep__panel .htl-modal__section {
    border-left: 3px solid #ff9760;
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 0 10px 10px 0;
    background: #fff;
}

.htl-dstep__panel .htl-modal__section-title {
    font-size: 14px;
    font-weight: 800;
    color: #0c1222;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.htl-dstep__panel .htl-modal__section--highlight {
    background: rgba(255, 159, 39, 0.06);
    border-left-color: #ef9f27;
}

.htl-dstep__panel .htl-modal__section--qualiopi {
    background: rgba(239, 159, 39, 0.05);
    border-left-color: #c9a227;
}

.htl-dstep__panel p {
    margin: 0 0 10px;
}

.htl-dstep__panel ul {
    margin: 0;
    padding-left: 18px;
}

.htl-dstep__panel li {
    margin-bottom: 6px;
}

/* Accueil test : le parcours / timeline reste au-dessus des sections suivantes */
.loop-home-test.lxc .htl-parcours {
    position: relative;
    z-index: 2;
    isolation: isolate;
}
