/*
 * Pages du guide (/guide) : mêmes jetons et boutons que la vitrine.
 * Les composants sont préfixés `gd-`.
 */

/* ---------- Barre du haut ---------- */

/* Collée en haut à partir de la tablette seulement : sur mobile, elle prendrait trop de hauteur. */
.gd-bar {
    position: relative;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 0.75rem 1rem;
    background: rgb(251 243 234 / 0.92);
    border-bottom: 1px solid rgb(36 24 19 / 0.08);
    backdrop-filter: blur(16px);
}

.gd-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
}

.gd-brand img {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    object-fit: cover;
    object-position: top center;
}

.gd-bar-links {
    order: 3;
    display: flex;
    gap: 0.25rem;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.gd-bar-links a {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}

.gd-bar-links a:hover {
    background: var(--blush);
    color: var(--ink);
}

.gd-bar-links a[aria-current="page"] {
    background: var(--ink);
    color: #fff;
}

.gd-bar-action {
    min-height: 2.25rem;
    padding: 0 1rem;
    box-shadow: none;
}

/* ---------- Bandeau ---------- */

.gd-hero {
    padding: 3.5rem 1.25rem 3rem;
    background:
        radial-gradient(circle at 90% 10%, rgb(196 22 73 / 0.35), transparent 45%),
        radial-gradient(circle at 5% 100%, rgb(47 89 78 / 0.5), transparent 55%),
        var(--ink);
    color: #fff;
}

.gd-hero-inner {
    max-width: 72rem;
    margin: 0 auto;
}

.gd-hero-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1;
}

.gd-hero-lead {
    max-width: 44rem;
    margin-top: 1.25rem;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: rgb(255 255 255 / 0.8);
}

/* ---------- Mise en page ---------- */

.gd-layout {
    display: grid;
    gap: 2rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.gd-toc {
    padding: 1.25rem;
    border-radius: 1.25rem;
    background: var(--ivory);
    border: 1px solid rgb(36 24 19 / 0.08);
}

.gd-toc ol {
    display: grid;
    gap: 0.25rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}

.gd-toc li {
    counter-increment: toc;
}

.gd-toc a {
    display: flex;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
}

.gd-toc a::before {
    content: counter(toc);
    min-width: 1.1rem;
    font-weight: 800;
    color: var(--rose);
}

.gd-toc a:hover {
    background: var(--blush);
    color: var(--ink);
}

.gd-article {
    display: grid;
    gap: 1.25rem;
    min-width: 0;
}

/* ---------- Sections ---------- */

.gd-section {
    display: grid;
    gap: 1rem;
    padding: 1.75rem 1.25rem;
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(36 24 19 / 0.05);
    scroll-margin-top: 1.5rem;
    line-height: 1.7;
}

.gd-section a,
.gd-wikis a {
    font-weight: 700;
    color: var(--rose);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gd-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.15;
}

.gd-number {
    display: inline-grid;
    flex-shrink: 0;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: var(--blush);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--rose);
}

.gd-subtitle {
    margin: 0.5rem 0 -0.25rem;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--leaf);
}

.gd-list {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.gd-list li::marker {
    color: var(--rose);
}

.gd-note {
    padding: 0.9rem 1rem;
    border: 1px solid rgb(212 161 63 / 0.35);
    border-radius: 0.75rem;
    background: rgb(212 161 63 / 0.12);
    font-size: 0.95rem;
}

.gd-section code,
.gd-choice code,
.gd-hero code {
    padding: 0.1rem 0.35rem;
    border-radius: 0.35rem;
    background: var(--cream);
    font-size: 0.9em;
}

.gd-title code {
    font-size: 0.75em;
}

/* Tableau des options */

.gd-table-wrap {
    overflow-x: auto;
}

.gd-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    font-size: 0.925rem;
}

.gd-table th,
.gd-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgb(36 24 19 / 0.08);
    text-align: left;
    vertical-align: top;
}

.gd-table th {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Pour aller plus loin ---------- */

.gd-more,
.gd-wikis {
    padding: 1.5rem 1.25rem;
    border-radius: 1.5rem;
    background: var(--leaf);
    color: #fff;
}

.gd-wikis {
    max-width: 72rem;
    margin: 0 auto 4rem;
    line-height: 1.7;
}

.gd-wikis a {
    color: #fff;
}

.gd-more-title {
    margin-bottom: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
}

.gd-more-links {
    display: grid;
    gap: 0.5rem;
}

.gd-more-links a {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgb(255 255 255 / 0.4);
    text-underline-offset: 3px;
}

.gd-more-links a:hover {
    text-decoration-color: #fff;
}

/* ---------- Accueil du guide ---------- */

.gd-choices {
    display: grid;
    gap: 1.25rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 2rem;
}

.gd-choice {
    display: grid;
    align-content: start;
    gap: 0.9rem;
    padding: 2rem 1.5rem;
    border-radius: 1.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(36 24 19 / 0.05);
    transition: transform 0.15s, box-shadow 0.15s;
}

.gd-choice:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -12px rgb(36 24 19 / 0.2);
}

.gd-choice--ink {
    background: var(--ink);
    color: #fff;
}

.gd-choice--ink .lp-eyebrow {
    color: var(--pink);
}

.gd-choice-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.05;
}

.gd-choice-text {
    line-height: 1.7;
    color: var(--muted);
}

.gd-choice--ink .gd-choice-text {
    color: rgb(255 255 255 / 0.75);
}

.gd-choice-cta {
    font-weight: 900;
    color: var(--rose);
}

.gd-choice--ink .gd-choice-cta {
    color: var(--pink);
}

.gd-choice--ink code {
    background: rgb(255 255 255 / 0.12);
}

@media (prefers-reduced-motion: reduce) {
    .gd-choice {
        transition: none;
    }

    .gd-choice:hover {
        transform: none;
    }
}

/* ---------- Tablette (≥ 48rem) ---------- */

@media (min-width: 48rem) {
    .gd-bar {
        position: sticky;
        top: 0;
        flex-wrap: nowrap;
        padding: 0.75rem 2rem;
    }

    .gd-section {
        scroll-margin-top: 5.5rem;
    }

    .gd-bar-links {
        order: 0;
        width: auto;
    }

    .gd-hero {
        padding: 5rem 3rem 4rem;
    }

    .gd-hero-title {
        font-size: 4rem;
    }

    .gd-layout,
    .gd-choices {
        padding-inline: 3rem;
    }

    .gd-wikis {
        margin-inline: 3rem;
    }

    .gd-choices {
        grid-template-columns: 1fr 1fr;
        padding-top: 3.5rem;
    }

    .gd-section {
        padding: 2.25rem 2rem;
    }

    .gd-more,
    .gd-wikis {
        padding: 1.75rem 2rem;
    }
}

/* ---------- Bureau (≥ 64rem) ---------- */

@media (min-width: 64rem) {
    .gd-layout {
        grid-template-columns: 15rem minmax(0, 1fr);
        align-items: start;
    }

    .gd-toc {
        position: sticky;
        top: 5.5rem;
    }
}

/* Bureau large : la marge latérale de .gd-wikis s'aligne sur le contenu. */
@media (min-width: 78rem) {
    .gd-wikis {
        margin-inline: auto;
    }
}
