/**
 * Leadgen — Widget Timeline Steps CSS
 * Ligne verticale connectée + cercles numérotés + animation scroll.
 */

/* ── Conteneur global ─────────────────────────────── */
.lgts-timeline {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ── Étape ────────────────────────────────────────── */
.lgts-step {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
}

/* ── Colonne gauche : cercle + ligne ──────────────── */
.lgts-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    /* La largeur = taille du cercle + un peu d'air */
    width: 52px;
    min-width: 52px;
}

/* ── Cercle numéroté ──────────────────────────────── */
.lgts-circle {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    border: 2px solid #0A5C55;
    background: #ffffff;
    color: #0A5C55;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    transition: background 0.25s, border-color 0.25s;
}

/* Hover : remplissage du cercle */
.lgts-step:hover .lgts-circle {
    background: #0A5C55;
    color: #ffffff;
}

.lgts-num {
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    font-family: inherit;
}

.lgts-icon {
    font-size: 18px;
    line-height: 1;
}

/* ── Ligne connectrice ────────────────────────────── */
.lgts-connector {
    flex: 1;
    min-height: 40px;
    width: 0;
    border-left: 2px dashed #C8E6E4;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Variantes de ligne */
.lgts-connector--solid  { border-left-style: solid;  }
.lgts-connector--dashed { border-left-style: dashed; }
.lgts-connector--dotted { border-left-style: dotted; }
.lgts-connector--none   { border-left-color: transparent; }

/* ── Colonne droite : contenu ─────────────────────── */
.lgts-content {
    flex: 1;
    padding: 0 0 0 20px;       /* Espacement entre ligne et texte */
    padding-bottom: 8px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    /* Aligner le texte avec le haut du cercle */
    padding-top: 10px;
}

/* Dernier step : pas de padding-bottom excessif */
.lgts-step:last-child .lgts-content {
    padding-bottom: 0;
}

/* ── Badge ────────────────────────────────────────── */
.lgts-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    padding: 5px 14px;
    border-radius: 20px;
    color: #0A5C55;
    background: transparent;
    margin-top: 14px;              /* ← espace après la description */
    align-self: flex-start;
}

/* ── Titre ────────────────────────────────────────── */
.lgts-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

/* ── Description ──────────────────────────────────── */
.lgts-desc {
    font-size: 14px;
    line-height: 1.75;
    color: #6B7280;
    margin: 0;
}

/* ── LAYOUT : numéro au centre ────────────────────── */
.lgts-layout-center .lgts-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lgts-layout-center .lgts-left {
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin-bottom: 16px;
}

.lgts-layout-center .lgts-connector {
    flex: 1;
    height: 0;
    width: auto;
    border-left: none;
    border-top: 2px dashed #C8E6E4;
    min-height: 0;
    min-width: 20px;
}

.lgts-layout-center .lgts-connector--solid  { border-top-style: solid;  border-left: none; }
.lgts-layout-center .lgts-connector--dashed { border-top-style: dashed; border-left: none; }
.lgts-layout-center .lgts-connector--dotted { border-top-style: dotted; border-left: none; }

.lgts-layout-center .lgts-content {
    padding: 0;
    width: 100%;
}

/* ── LAYOUT : numéro à droite ─────────────────────── */
.lgts-layout-right .lgts-step {
    flex-direction: row-reverse;
}

.lgts-layout-right .lgts-content {
    padding-left: 0;
    padding-right: 20px;
    text-align: right;
}

/* ── ANIMATIONS SCROLL ────────────────────────────── */
.lgts-step--hidden {
    opacity: 0;
    transform: translateY(20px);
}

.lgts-step--visible,
.lgts-step:not(.lgts-step--hidden) {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Pas d'animation si reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .lgts-step--hidden {
        opacity: 1;
        transform: none;
    }
    .lgts-step--visible {
        transition: none;
    }
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 600px) {
    .lgts-circle {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .lgts-left {
        width: 40px;
        min-width: 40px;
    }

    .lgts-num    { font-size: 15px; }
    .lgts-icon   { font-size: 15px; }
    .lgts-title  { font-size: 15px; }
    .lgts-desc   { font-size: 13px; }

    .lgts-content { padding-left: 14px; }

    /* Layout centré → vertical sur mobile */
    .lgts-layout-center .lgts-step {
        flex-direction: column;
        align-items: flex-start;
    }
    .lgts-layout-center .lgts-left {
        flex-direction: column;
        width: 40px;
    }
    .lgts-layout-center .lgts-connector {
        height: auto;
        width: 0;
        min-height: 30px;
        border-top: none;
        border-left: 2px dashed #C8E6E4;
    }
    .lgts-layout-center .lgts-content {
        padding-left: 14px;
    }
}

/* ══════════════════════════════════════════════════
   LAYOUT HORIZONTAL
══════════════════════════════════════════════════ */

.lgts-timeline--horizontal {
    flex-direction: row;       /* étapes côte à côte */
    align-items: flex-start;
    overflow-x: auto;          /* scroll si trop d'étapes */
    padding-bottom: 8px;
}

/* ── Étape horizontale ────────────────────────── */
.lgts-timeline--horizontal .lgts-step {
    flex-direction: column;    /* cercle EN HAUT, texte EN BAS */
    align-items: center;
    min-width: 200px;
    flex: 1;
    margin-bottom: 0;
}

/* ── Colonne "gauche" devient "haut" ──────────── */
.lgts-timeline--horizontal .lgts-left {
    flex-direction: column;       /* cercle + ligne côte à côte */
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

/* ── Ligne connectrice horizontale ───────────── */
.lgts-timeline--horizontal .lgts-connector {
    flex: 1;
    height: 2px;
    min-height: 0;
    width: auto;
    min-width: 20px;
    border-left: none;
    border-top: 2px dashed #C8E6E4;
    margin: 0;
}

/* Variantes ligne */
.lgts-timeline--horizontal .lgts-connector--solid  { border-top-style: solid;  border-left: none; }
.lgts-timeline--horizontal .lgts-connector--dashed { border-top-style: dashed; border-left: none; }
.lgts-timeline--horizontal .lgts-connector--dotted { border-top-style: dotted; border-left: none; }
.lgts-timeline--horizontal .lgts-connector--none   { border-top-color: transparent; }

/* Masquer la ligne après le dernier item */
.lgts-timeline--horizontal .lgts-step:last-child .lgts-connector {
    display: none;
}

/* ── Contenu texte ────────────────────────────── */
.lgts-timeline--horizontal .lgts-content {
    padding: 0 12px;
    text-align: center;
    align-items: center;
    width: 100%;
}

/* ══════════════════════════════════════════════════
   LAYOUT HORIZONTAL ALTERNÉ (haut / bas)
══════════════════════════════════════════════════ */

.lgts-layout-horizontal-alt .lgts-step {
    flex-direction: column;
    align-items: center;
}

/* Étapes paires : texte en haut, cercle en bas */
.lgts-layout-horizontal-alt .lgts-step[data-alt="top"] {
    flex-direction: column-reverse;
}

/* Étapes paires : inverser aussi le .lgts-left */
.lgts-layout-horizontal-alt .lgts-step[data-alt="top"] .lgts-left {
    flex-direction: row;
}

/* Contenu alterné haut : aligner en bas */
.lgts-layout-horizontal-alt .lgts-step[data-alt="top"] .lgts-content {
    margin-bottom: 20px;
    margin-top: 0;
}

/* Contenu alterné bas */
.lgts-layout-horizontal-alt .lgts-step[data-alt="bottom"] .lgts-content {
    margin-top: 20px;
}

/* Ligne centrale commune aux deux layouts */
.lgts-layout-horizontal-alt .lgts-connector {
    border-left: none;
    border-top: 2px dashed #C8E6E4;
    height: 2px;
    min-height: 0;
    flex: 1;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — revenir en vertical sur mobile
══════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .lgts-timeline--horizontal,
    .lgts-layout-horizontal-alt {
        flex-direction: column !important;
        overflow-x: visible;
    }

    .lgts-timeline--horizontal .lgts-step,
    .lgts-layout-horizontal-alt .lgts-step,
    .lgts-layout-horizontal-alt .lgts-step[data-alt="top"] {
        flex-direction: row !important;
        min-width: 0;
        width: 100%;
    }

    .lgts-timeline--horizontal .lgts-left,
    .lgts-layout-horizontal-alt .lgts-left {
        flex-direction: column;
        width: 52px;
        min-width: 52px;
    }

    .lgts-timeline--horizontal .lgts-connector,
    .lgts-layout-horizontal-alt .lgts-connector {
        border-top: none;
        border-left: 2px dashed #C8E6E4;
        height: auto;
        min-height: 30px;
        width: 0;
        flex: 1;
    }

    .lgts-timeline--horizontal .lgts-content,
    .lgts-layout-horizontal-alt .lgts-content {
        text-align: left !important;
        align-items: flex-start !important;
        padding-left: 16px;
        margin: 0 !important;
    }

    .lgts-timeline--horizontal .lgts-step:last-child .lgts-connector {
        display: block;
    }

    .lgts-layout-horizontal-alt .lgts-step[data-alt="top"] .lgts-left {
        flex-direction: column;
    }
}