/* Livres blancs : encadré dans les articles et le lexique, pages de téléchargement.
   Voir inc/livres-blancs.php. */

/* ---------- Encadré (articles, lexique) ---------- */
.lb-cta {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    margin: 2.5rem 0;
    padding: 1.25rem 1.75rem 1.25rem 1.25rem;
    background: #fff;
    border: 1px solid rgba(43, 159, 232, 0.22);
    border-radius: 16px;
    box-shadow: 0 18px 40px -22px rgba(43, 159, 232, 0.35);
}
.lb-cta__cover { display: block; line-height: 0; }
.lb-cta__img {
    width: 88px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.35);
}
.lb-cta__body { min-width: 0; }
.lb-cta__eyebrow {
    display: inline-block;
    margin-bottom: 0.375rem;
    color: #2B9FE8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.lb-cta .lb-cta__title {
    margin: 0 0 0.25rem;
    color: #0F172A;
    font-size: 1.1875rem;
    font-weight: 800;
    line-height: 1.3;
}
.lb-cta .lb-cta__text {
    margin: 0;
    color: #475569;
    font-size: 0.9375rem;
    line-height: 1.5;
}
.lb-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.8125rem 1.375rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #5DD39E 0%, #2B9FE8 100%);
    color: #fff !important;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 12px 24px -10px rgba(43, 159, 232, 0.5);
}
.lb-cta__btn:hover { transform: translateY(-2px); }

@media (max-width: 720px) {
    .lb-cta {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 1rem;
        padding: 1.125rem;
    }
    .lb-cta__img { width: 64px; }
    .lb-cta__btn {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

/* ---------- Pages ---------- */
.lb-page { background: #fff; }
.lb-eyebrow {
    margin: 0 0 0.75rem;
    color: #2B9FE8;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.lb-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #F0FAF6 0%, #EAF4FD 100%);
}
.lb-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 4rem;
    align-items: start;
}
.lb-hero__title {
    margin: 0 0 1rem;
    color: #0F172A;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.lb-hero__subtitle {
    margin: 0 0 1.25rem;
    color: #1E293B;
    font-size: 1.25rem;
    line-height: 1.45;
}
.lb-hero__intro {
    margin: 0 0 2rem;
    color: #475569;
    font-size: 1.0625rem;
    line-height: 1.7;
}
.lb-hero__h2 {
    margin: 0 0 1rem;
    color: #0F172A;
    font-size: 1.125rem;
    font-weight: 700;
}
.lb-benefits {
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}
.lb-benefits li {
    position: relative;
    margin: 0 0 0.875rem;
    padding-left: 2rem;
    color: #1E293B;
    font-size: 1rem;
    line-height: 1.55;
}
.lb-benefits li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #5DD39E 0%, #2B9FE8 100%);
}
.lb-benefits li::after {
    content: "";
    position: absolute;
    left: 0.42rem;
    top: 0.42em;
    width: 0.35rem;
    height: 0.6rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.lb-audience { margin: 0; color: #475569; font-size: 0.9375rem; line-height: 1.6; }

/* Carte formulaire */
.lb-hero__aside { position: sticky; top: 7rem; }
.lb-card {
    padding: 1.75rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.3);
}
.lb-card__cover {
    margin: -4.5rem auto 1.25rem;
    width: 58%;
    line-height: 0;
}
.lb-card__img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 18px 36px -14px rgba(15, 23, 42, 0.45);
}
.lb-form__title { margin: 0 0 1rem; color: #0F172A; font-size: 1.125rem; font-weight: 800; }
.lb-form__label {
    display: block;
    margin: 0 0 0.375rem;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
}
.lb-form__input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 1rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    background: #fff;
    color: #0F172A;
    font: inherit;
    font-size: 1rem;
}
.lb-form__input:focus { outline: 2px solid #2B9FE8; outline-offset: 1px; border-color: #2B9FE8; }
.lb-form__check {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin: 0 0 1.25rem;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.45;
    cursor: pointer;
}
.lb-form__check input { flex: none; margin-top: 0.15rem; width: 1rem; height: 1rem; }
.lb-form__check span { min-width: 0; }
.lb-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lb-form__btn {
    display: block;
    width: 100%;
    padding: 0.9375rem 1.25rem;
    border: 0;
    border-radius: 9999px;
    background: linear-gradient(135deg, #5DD39E 0%, #2B9FE8 100%);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 28px -10px rgba(43, 159, 232, 0.5);
    transition: transform 0.2s;
}
.lb-form__btn:hover { transform: translateY(-2px); }
.lb-form__btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }
.lb-form__msg { margin: 0.875rem 0 0; font-size: 0.9375rem; line-height: 1.5; }
.lb-form__msg:empty { display: none; }
.lb-form__msg.is-ok { color: #047857; }
.lb-form__msg.is-err { color: #B91C1C; }
.lb-form__note { margin: 1rem 0 0; color: #64748B; font-size: 0.8125rem; line-height: 1.5; }
.lb-form__note a { color: #2B7DE9; }

/* Sommaire */
.lb-toc { padding: 4.5rem 0; }
.lb-toc h2, .lb-others h2 { margin: 0 0 1.5rem; color: #0F172A; font-size: 1.75rem; font-weight: 800; }
.lb-toc__list { margin: 0; padding: 0; list-style: none; counter-reset: lbtoc; }
.lb-toc__list li {
    counter-increment: lbtoc;
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #E2E8F0;
    color: #1E293B;
    font-size: 1.0625rem;
    font-weight: 600;
}
.lb-toc__list li::before {
    content: counter(lbtoc, decimal-leading-zero);
    color: #2B9FE8;
    font-weight: 800;
}
.lb-toc__more { margin-top: 2rem; color: #334155; line-height: 1.75; }

/* Grille de guides */
.lb-others { padding: 4.5rem 0 5rem; background: #F8FAFC; }
.lb-others__all { margin: 2rem 0 0; }
.lb-others__all a { color: #2B7DE9; font-weight: 600; }
.lb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.lb-grid--hub { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.lb-tile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}
.lb-tile:hover { transform: translateY(-3px); border-color: #2B9FE8; }
.lb-tile__cover { display: block; margin-bottom: 0.75rem; line-height: 0; text-align: center; }
.lb-tile__img {
    width: 46%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 14px 28px -12px rgba(15, 23, 42, 0.4);
}
.lb-tile--hub .lb-tile__img { width: 62%; }
.lb-tile__meta { color: #2B9FE8; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.lb-tile__title { color: #0F172A; font-size: 1.1875rem; font-weight: 800; line-height: 1.3; }
.lb-tile__text { color: #475569; font-size: 0.9375rem; line-height: 1.55; }
.lb-tile__btn { margin-top: auto; padding-top: 0.75rem; color: #2B9FE8; font-weight: 700; }

.lb-hub-hero { padding: 8rem 0 2.5rem; background: linear-gradient(135deg, #F0FAF6 0%, #EAF4FD 100%); }
.lb-hub-hero__intro { color: #475569; font-size: 1.125rem; line-height: 1.7; }
.lb-hub { padding: 4rem 0 5rem; }

/* Raccourci vers le formulaire : seulement quand il passe sous le texte */
.lb-jump { display: none; margin: -0.75rem 0 2rem; }
.lb-jump a {
    display: block;
    padding: 0.875rem 1.25rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #5DD39E 0%, #2B9FE8 100%);
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
#formulaire { scroll-margin-top: 7rem; }

@media (max-width: 1024px) {
    .lb-jump { display: block; }
    .lb-hero__grid { grid-template-columns: 1fr; gap: 3.5rem; }
    .lb-hero__aside { position: static; max-width: 520px; width: 100%; margin: 2rem auto 0; }
    .lb-grid--hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .lb-hero { padding: 7rem 0 3rem; }
    .lb-grid, .lb-grid--hub { grid-template-columns: 1fr; }
    .lb-card { padding: 1.25rem; }
}

/* Aperçu réservé aux éditeurs connectés, tant que la page du guide est en brouillon */
.lb-cta { position: relative; }
.lb-cta__preview {
    position: absolute;
    top: -0.7rem;
    right: 1rem;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.6875rem;
    font-weight: 700;
}

/* ---------- Fenêtre surgissante (articles et lexique) ----------
   Un seul balisage : carte carrée centrée sur voile (ordinateur), bandeau compact en bas (mobile). */
.lb-pop[hidden] { display: none; }
.lb-pop { position: fixed; inset: 0; z-index: 9990; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.lb-pop__overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.25s; }
.lb-pop.is-open .lb-pop__overlay { opacity: 1; }
.lb-pop__card {
    position: relative;
    box-sizing: border-box;
    width: 420px;
    min-height: 420px;
    padding: 2.25rem 2.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 80px -30px rgba(15, 23, 42, 0.55);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.25s, transform 0.25s;
}
.lb-pop__card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, #5DD39E 0%, #2B9FE8 100%); }
.lb-pop.is-open .lb-pop__card { opacity: 1; transform: none; }
.lb-pop__close { position: absolute; top: 0.75rem; right: 0.75rem; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: #F1F5F9; color: #475569; font-size: 1.375rem; line-height: 1; cursor: pointer; }
.lb-pop__close:hover { background: #E2E8F0; color: #0F172A; }
.lb-pop__cover { display: block; width: 96px; margin-bottom: 1.25rem; line-height: 0; }
.lb-pop__img { width: 96px; height: auto; border-radius: 4px; box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.45); }
.lb-pop__eyebrow { display: block; margin-bottom: 0.5rem; color: #2B9FE8; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.lb-pop .lb-pop__title { margin: 0 0 0.5rem; color: #0F172A; font-size: 1.375rem; font-weight: 800; line-height: 1.25; }
.lb-pop .lb-pop__text { margin: 0 0 1.5rem; color: #475569; font-size: 0.9375rem; line-height: 1.55; }
.lb-pop__btn {
    display: block;
    margin-top: auto;
    padding: 0.9375rem 1.25rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #5DD39E 0%, #2B9FE8 100%);
    color: #fff !important;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 14px 28px -10px rgba(43, 159, 232, 0.5);
}
.lb-pop__later { margin: 0.75rem auto 0; padding: 0.25rem 0.5rem; border: 0; background: none; color: #64748B; font: inherit; font-size: 0.875rem; text-decoration: underline; cursor: pointer; }
.lb-pop__preview { position: absolute; top: 0.9rem; left: 2.25rem; padding: 0.15rem 0.6rem; border-radius: 9999px; background: #FEF3C7; color: #92400E; font-size: 0.6875rem; font-weight: 700; }
html.lb-pop-lock, html.lb-pop-lock body { overflow: hidden; }

@media (max-width: 1023px) {
    /* Bandeau compact : ni voile ni blocage de la lecture */
    .lb-pop { inset: auto 0 0 0; padding: 0 0.625rem 0.625rem; align-items: flex-end; pointer-events: none; }
    .lb-pop__overlay, .lb-pop__text, .lb-pop__later { display: none; }
    .lb-pop__card {
        pointer-events: auto;
        width: 100%;
        min-height: 0;
        padding: 0.75rem 2.75rem 0.75rem 0.75rem;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
        border-radius: 14px;
        box-shadow: 0 -10px 40px -12px rgba(15, 23, 42, 0.35);
        transform: translateY(110%);
    }
    .lb-pop__card::before { height: 4px; }
    .lb-pop__cover { width: 44px; margin: 0; }
    .lb-pop__img { width: 44px; }
    .lb-pop__eyebrow { margin-bottom: 0.125rem; font-size: 0.625rem; }
    .lb-pop .lb-pop__title { margin: 0; font-size: 0.875rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .lb-pop__btn { margin: 0; padding: 0.5rem 0.875rem; font-size: 0.8125rem; white-space: nowrap; box-shadow: none; }
    .lb-pop__close { top: 50%; right: 0.375rem; width: 2rem; height: 2rem; margin-top: -1rem; font-size: 1.125rem; background: none; }
    .lb-pop__preview { top: auto; bottom: 100%; left: 0.5rem; margin-bottom: 0.25rem; }
}

/* ---------- Bandeau des guides sur la page du blog ---------- */
.lb-band { margin-top: 3.2rem; padding: 2.2rem 2.4rem; border-radius: var(--radius-xl, 20px); background: #0F172A; color: #E2E8F0; }
.lb-band__head { max-width: 40rem; margin-bottom: 1.8rem; }
.lb-band__k { margin: 0 0 0.5rem; color: #5DD39E; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.lb-band h2 { margin: 0 0 0.5rem; color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-weight: 800; line-height: 1.2; }
.lb-band__head p:last-child { margin: 0; color: #CBD5E1; }
.lb-band__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.lb-band__item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 1rem; align-items: start; padding: 1.1rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; background: rgba(255, 255, 255, 0.04); color: inherit; text-decoration: none; transition: transform 0.2s, border-color 0.2s; }
.lb-band__item:hover { transform: translateY(-3px); border-color: #2B9FE8; }
.lb-band__cover { line-height: 0; }
.lb-band__img { width: 72px; height: auto; border-radius: 3px; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.6); }
.lb-band__txt { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.lb-band__title { color: #fff; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.lb-band__promise { color: #94A3B8; font-size: 0.875rem; line-height: 1.5; }
.lb-band__go { margin-top: 0.25rem; color: #5DD39E; font-size: 0.875rem; font-weight: 700; }
.lb-band__all { margin: 1.4rem 0 0; }
.lb-band__all a { color: #fff; font-weight: 600; text-decoration: underline; }
@media (max-width: 1024px) { .lb-band__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .lb-band { padding: 1.6rem 1.25rem; } }
