/* ==========================================================================
   Connection guide page (ConnectionGuidePage), e.g. Campus Connecté.
   Builds on documents_page.css (intro column, section heads, file rows)
   and adds: the credentials list, device tabs, numbered steps.
   ========================================================================== */

/* ---------- Credentials (in the intro column) ---------- */

.estc-guide__creds dl {
    margin: 0;
}

.estc-guide__creds dl > div {
    padding: 12px 0;
    border-bottom: 1px solid var(--estc-line);
}

.estc-guide__creds dt {
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 500;
    color: var(--estc-muted);
}

.estc-guide__creds dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--estc-heading);
    overflow-wrap: anywhere;
}

/* ---------- Device tabs ---------- */

.estc-guide__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--estc-border);
}

.estc-guide__tabs[hidden] {
    display: none;
}

.estc-guide__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border: 0;
    background: none;
    font-family: var(--estc-font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--estc-muted);
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.estc-guide__tab i {
    font-size: 17px;
}

.estc-guide__tab::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: transparent;
    transition: background-color .2s ease;
}

.estc-guide__tab:hover {
    color: var(--estc-heading);
    background: var(--estc-soft);
}

.estc-guide__tab[aria-selected="true"] {
    color: var(--estc-primary);
}

.estc-guide__tab[aria-selected="true"]::after {
    background: var(--estc-primary);
}

/* Without JS every panel is shown; space them out like the documents sections */
.estc-guide__panel + .estc-guide__panel {
    margin-top: 72px;
}

.estc-guide.has-tabs .estc-guide__panel + .estc-guide__panel {
    margin-top: 0;
}

.estc-guide__panel[hidden] {
    display: none;
}

/* ---------- Panel head ---------- */

.estc-guide__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    font-size: 26px;
    color: #fff;
    background: var(--estc-primary);
}

.estc-guide__intro {
    padding: 24px 0 8px;
}

.estc-guide__intro p {
    max-width: 680px;
    margin: 0;
    font-size: 16px;
    line-height: 1.75;
    color: var(--estc-text);
}

.estc-guide__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 8px 14px;
    background: var(--estc-primary-light);
    font-size: 14px;
    font-weight: 600;
    color: var(--estc-primary);
}

.estc-guide__link:hover,
.estc-guide__link:focus-visible {
    color: var(--estc-primary-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Steps ---------- */

.estc-guide__steps {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.estc-guide__step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--estc-border);
}

.estc-guide__num {
    font-family: var(--estc-font-heading);
    font-size: 30px;
    font-weight: 500;
    line-height: 1;
    font-variant-numeric: lining-nums;
    color: var(--estc-primary);
}

.estc-guide__step h4 {
    margin: 2px 0 0;
    font-family: var(--estc-font-heading);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--estc-heading);
}

.estc-guide__text {
    max-width: 680px;
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--estc-text);
}

.estc-guide__text p {
    margin: 0;
}

.estc-guide__text p + p {
    margin-top: 8px;
}

/* Values to type or select (rich text "code" style) */
.estc-guide__text code {
    padding: 2px 7px;
    background: var(--estc-primary-light);
    border: 1px solid rgba(0, 75, 130, .14);
    font-family: Consolas, 'SFMono-Regular', Menlo, monospace;
    font-size: .88em;
    font-weight: 600;
    color: var(--estc-primary-deep);
    white-space: nowrap;
}

.estc-guide__text a {
    font-weight: 600;
    color: var(--estc-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- PDF guide + help ---------- */

.estc-guide__pdf {
    margin-top: 40px;
    padding: 24px 28px;
    background: var(--estc-soft);
    border-bottom: 0;
}

.estc-guide__help {
    max-width: none;
    margin-top: 48px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    .estc-guide__tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-bottom: 36px;
        scrollbar-width: none;
    }

    .estc-guide__tab {
        flex: 0 0 auto;
        padding: 12px 16px;
        font-size: 14px;
    }

    .estc-guide__icon {
        width: 44px;
        height: 44px;
        font-size: 21px;
    }

    .estc-guide__step {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 14px;
    }

    .estc-guide__num {
        font-size: 24px;
    }

    .estc-guide__pdf {
        padding: 20px;
    }
}
