/* Aide du logiciel de bureau (/desktop/aide/{windows|macos|linux}) : desktop-aide.html.
   Couleurs uniquement par les variables du thème (clair et sombre). */

.dh-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

.dh-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--sv-ink-2);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.dh-back:hover,
.dh-back:focus-visible {
    color: var(--sv-accent);
}

.dh-hero {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: var(--sv-surface);
    border: 1px solid var(--sv-line);
    border-radius: 20px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}

.dh-hero-icon {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    background: var(--sv-accent-soft);
    color: var(--sv-accent-strong);
}

.dh-hero-text h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.6rem, 3.5vw, 2.1rem);
    color: var(--sv-heading);
}

.dh-hero-text p {
    margin: 0 0 1rem;
    color: var(--sv-ink-2);
}

.dh-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.dh-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    background: var(--sv-accent);
    color: var(--sv-accent-ink);
    font-weight: 600;
    text-decoration: none;
}

.dh-btn-primary:hover,
.dh-btn-primary:focus-visible {
    background: var(--sv-accent-hover);
}

.dh-other-label {
    color: var(--sv-ink-3);
    font-size: 0.9rem;
    margin-left: 0.4rem;
}

.dh-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--sv-line-2);
    color: var(--sv-ink);
    text-decoration: none;
    font-size: 0.9rem;
}

.dh-chip:hover,
.dh-chip:focus-visible {
    border-color: var(--sv-accent);
    color: var(--sv-accent);
}

/* Menu latéral + une rubrique à la fois (desktop-aide.js). Sans JavaScript, toutes les rubriques restent affichées. */
.dh-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.dh-sidebar {
    position: sticky;
    top: 86px; /* sous l'en-tête collant du site (70 px, landing.css) */
    padding: 1rem 0.75rem;
    border-radius: 18px;
    background: var(--sv-surface);
    border: 1px solid var(--sv-line);
}

.dh-sidebar-title {
    margin: 0 0 0.5rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sv-ink-2);
}

.dh-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dh-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.6rem;
    border-radius: 12px;
    color: var(--sv-ink);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.3;
}

.dh-nav-link:hover,
.dh-nav-link:focus-visible {
    background: var(--sv-bg);
}

.dh-nav-link[aria-current="true"] {
    background: var(--sv-accent-soft);
    color: var(--sv-accent-strong);
    font-weight: 600;
}

.dh-nav-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--sv-accent-soft);
    color: var(--sv-accent-strong);
}

.landing-v2 .dh-section {
    background: var(--sv-surface);
    border: 1px solid var(--sv-line);
    border-radius: 18px;
    padding: 1.6rem 1.75rem;
    margin: 0 0 1.1rem;
    scroll-margin-top: 90px;
}

.dh-layout.dh-js .dh-section {
    animation: dh-apparition 0.18s ease-out;
}

.dh-layout [data-dh-panel][hidden] {
    display: none;
}

@keyframes dh-apparition {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .dh-layout.dh-js .dh-section {
        animation: none;
    }
}

.dh-section-title:focus {
    outline: none;
}

.dh-section-title:focus-visible {
    outline: 2px solid var(--sv-accent);
    outline-offset: 4px;
    border-radius: 6px;
}

.dh-pager {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--sv-line);
}

.dh-pager-prev,
.dh-pager-next {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 48%;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--sv-line-2);
    color: var(--sv-ink);
    text-decoration: none;
}

.dh-pager-next {
    margin-left: auto;
    text-align: right;
}

.dh-pager-prev:hover,
.dh-pager-prev:focus-visible,
.dh-pager-next:hover,
.dh-pager-next:focus-visible {
    border-color: var(--sv-accent);
}

.dh-pager-text {
    display: flex;
    flex-direction: column;
}

.dh-pager-label {
    font-size: 0.78rem;
    color: var(--sv-ink-2);
}

.dh-pager-title {
    font-weight: 600;
}

.dh-section-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 1rem;
    font-size: 1.3rem;
    color: var(--sv-heading);
}

.dh-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--sv-accent-soft);
    color: var(--sv-accent-strong);
    font-size: 1.15rem;
}

.dh-steps {
    list-style: none;
    counter-reset: dh-step;
    margin: 0;
    padding: 0;
}

.dh-steps li {
    counter-increment: dh-step;
    position: relative;
    padding: 0.2rem 0 0.9rem 2.6rem;
    color: var(--sv-ink);
    line-height: 1.55;
}

.dh-steps li::before {
    content: counter(dh-step);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--sv-accent);
    color: var(--sv-accent-ink);
}

.dh-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dh-list li {
    position: relative;
    padding: 0.15rem 0 0.8rem 1.6rem;
    color: var(--sv-ink);
    line-height: 1.55;
}

.dh-list li::before {
    content: "";
    position: absolute;
    left: 0.25rem;
    top: 0.65rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--sv-accent);
}

.dh-note {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin: 0.4rem 0 0;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background: var(--sv-info-soft);
    border: 1px solid var(--sv-info-border);
    color: var(--sv-ink);
}

.dh-note .bi {
    color: var(--sv-info);
    margin-top: 0.15rem;
}

.dh-faq details {
    border: 1px solid var(--sv-line);
    border-radius: 12px;
    margin-bottom: 0.6rem;
    background: var(--sv-bg);
}

.dh-faq summary {
    cursor: pointer;
    padding: 0.85rem 1rem;
    font-weight: 600;
    color: var(--sv-ink);
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.dh-faq summary::-webkit-details-marker {
    display: none;
}

.dh-faq summary::after {
    content: "+";
    color: var(--sv-accent);
    font-weight: 700;
}

.dh-faq details[open] summary::after {
    content: "−";
}

.dh-faq details p {
    margin: 0;
    padding: 0 1rem 1rem;
    color: var(--sv-ink-2);
    line-height: 1.55;
}

.landing-v2 .dh-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    border-radius: 18px;
    background: var(--sv-accent-soft);
    border: 1px solid var(--sv-accent-border);
}

.dh-contact h2 {
    margin: 0 0 0.3rem;
    font-size: 1.2rem;
    color: var(--sv-heading);
}

.dh-contact p {
    margin: 0;
    color: var(--sv-ink-2);
}

@media (max-width: 860px) {
    .dh-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .dh-sidebar {
        top: 70px;
        z-index: 5;
        padding: 0.5rem;
        border-radius: 14px;
    }

    .dh-sidebar-title {
        display: none;
    }

    /* Lien profond : l'en-tête (70 px) et la barre d'onglets collante (~60 px) ne recouvrent pas le titre. */
    .landing-v2 .dh-section {
        scroll-margin-top: 145px;
    }

    .dh-nav {
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .dh-nav::-webkit-scrollbar {
        display: none;
    }

    .dh-nav-link {
        white-space: nowrap;
        padding: 0.45rem 0.7rem;
    }

    .dh-nav-icon {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 640px) {
    .dh-hero {
        flex-direction: column;
        padding: 1.25rem;
    }

    .landing-v2 .dh-section {
        padding: 1.2rem 1.1rem;
    }

    .landing-v2 .dh-contact {
        padding: 1.2rem 1.1rem;
    }
}

/* Bouton « Aide » accolé à chaque bouton de téléchargement de /desktop. */
.app-landing-cta-group {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.app-landing-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--sv-line-2);
    color: var(--sv-ink);
    text-decoration: none;
    font-size: 0.9rem;
    background: var(--sv-surface);
}

.app-landing-help-btn:hover,
.app-landing-help-btn:focus-visible {
    border-color: var(--sv-accent);
    color: var(--sv-accent);
}

@media (max-width: 640px) {
    .app-landing-cta-group {
        display: flex;
        width: 100%;
    }

    .app-landing-cta-group .app-landing-play-btn {
        flex: 1;
    }
}
