/**
 * Blog Template Pro — Frontend CSS
 * Toutes les classes sont préfixées .btp- pour éviter les conflits avec le thème.
 */

.btp-template {
    --btp-bg: #ffffff;
    --btp-bg-soft: #fafaf9;
    --btp-bg-muted: #f5f5f4;
    --btp-border: #e7e5e4;
    --btp-border-strong: #d6d3d1;
    --btp-text: #1c1917;
    --btp-text-muted: #57534e;
    --btp-text-soft: #78716c;
    --btp-warm: #f59e0b;
    --btp-warm-soft: #fef3c7;

    --btp-container: 1200px;
    --btp-container-narrow: 880px;

    --btp-radius-sm: 8px;
    --btp-radius-md: 12px;
    --btp-radius-lg: 20px;
    --btp-radius-xl: 28px;

    --btp-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
    --btp-shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
    --btp-shadow-lg: 0 12px 32px -8px rgb(0 0 0 / 0.10), 0 4px 8px -4px rgb(0 0 0 / 0.05);
    --btp-shadow-accent: 0 8px 24px -8px rgb(13 148 136 / 0.4);

    --btp-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --btp-transition: 200ms var(--btp-ease);

    font-family: var(--btp-font-sans, 'Inter', system-ui, sans-serif);
    color: var(--btp-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btp-template * {
    box-sizing: border-box;
}

.btp-template img {
    max-width: 100%;
    height: auto;
    display: block;
}

html { scroll-padding-top: 100px; }

/* ==========================================================================
   Boutons génériques
   ========================================================================== */
.btp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    transition: all var(--btp-transition);
    white-space: nowrap;
    line-height: 1;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
}

.btp-btn--primary {
    background: var(--btp-text);
    color: var(--btp-bg);
}

.btp-btn--primary:hover {
    background: var(--btp-accent-dark);
    color: var(--btp-bg);
    transform: translateY(-1px);
    box-shadow: var(--btp-shadow-accent);
}

.btp-btn--white {
    background: white;
    color: var(--btp-text);
}

.btp-btn--white:hover {
    background: var(--btp-bg-muted);
    color: var(--btp-text);
    transform: translateY(-1px);
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.btp-breadcrumb {
    border-bottom: 1px solid var(--btp-border);
    background: var(--btp-bg-soft);
}

.btp-breadcrumb__inner {
    max-width: var(--btp-container);
    margin: 0 auto;
    padding: 14px 24px;
}

.btp-breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--btp-text-soft);
    list-style: none;
    padding: 0;
    margin: 0;
}

.btp-breadcrumb li {
    display: flex;
    align-items: center;
}

.btp-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--btp-text-soft);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--btp-transition);
}

.btp-breadcrumb a:hover {
    color: var(--btp-accent-dark);
}

.btp-breadcrumb__sep {
    color: var(--btp-border-strong);
    display: inline-flex;
}

.btp-breadcrumb [aria-current="page"] {
    color: var(--btp-text);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 50ch;
}

/* ==========================================================================
   Article
   ========================================================================== */
.btp-article__container {
    max-width: var(--btp-container);
    margin: 0 auto;
    padding: 48px 24px 0;
}

.btp-article__header {
    max-width: var(--btp-container-narrow);
    margin: 0 auto 56px;
    text-align: left;
}

.btp-article__category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--btp-category-bg, var(--btp-accent-bg));
    color: var(--btp-category-color, var(--btp-accent-dark));
    border: 1px solid var(--btp-category-border, var(--btp-accent-soft));
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.btp-article__title {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--btp-text);
    margin: 0 0 32px;
    text-wrap: balance;
}

.btp-article__meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 20px 0;
    border-top: 1px solid var(--btp-border);
    border-bottom: 1px solid var(--btp-border);
    font-size: 14px;
    color: var(--btp-text-soft);
    margin-bottom: 40px;
}

.btp-article__meta-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btp-article__meta-author img {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 2px solid white;
    box-shadow: 0 0 0 1px var(--btp-border);
}

.btp-article__meta-author strong {
    color: var(--btp-text);
    font-weight: 600;
}

.btp-article__meta-date,
.btp-article__meta-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btp-article__meta-sep {
    color: var(--btp-border-strong);
    margin: 0 4px;
}

.btp-article__meta-updated {
    color: var(--btp-accent-dark);
    font-weight: 500;
}

.btp-article__cover {
    border-radius: var(--btp-radius-xl);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--btp-bg-muted);
    box-shadow: var(--btp-shadow-lg);
}

.btp-article__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Layout 2 colonnes */
.btp-article__layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 64px;
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 80px;
}

@media (max-width: 980px) {
    .btp-article__layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

/* ==========================================================================
   Contenu
   ========================================================================== */
.btp-article__content {
    font-size: 17px;
    line-height: 1.75;
    color: var(--btp-text-muted);
    min-width: 0;
}

.btp-article__content > * + * {
    margin-top: 1.4em;
}

.btp-article__content p { margin: 0 0 1.4em; }
.btp-article__content > p:last-child { margin-bottom: 0; }
.btp-article__content strong { font-weight: 600; }

/* Couleurs et polices "defauts" : faible specificite via :where() pour que
   les classes Gutenberg (.has-X-color, .has-X-font-family) et les couleurs
   admin BTP (h2_color/h3_color via inline <style>) puissent gagner. */
:where(.btp-article__content) p { color: var(--btp-text-muted); }
:where(.btp-article__content) strong { color: var(--btp-text); }
:where(.btp-article__content) a { color: var(--btp-accent-dark); }
:where(.btp-article__content) h2,
:where(.btp-article__content) h3,
:where(.btp-article__content) h4,
:where(.btp-article__content) h5,
:where(.btp-article__content) h6 {
    color: var(--btp-text);
    font-family: var(--btp-font-display, Georgia, serif);
}

.btp-article__content h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 3em 0 0.6em;
    scroll-margin-top: 100px;
    text-wrap: balance;
}

.btp-article__content h2:first-child {
    margin-top: 0;
}

.btp-article__content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin: 2em 0 0.5em;
}

.btp-article__content h4,
.btp-article__content h5,
.btp-article__content h6 {
    margin: 1.6em 0 0.4em;
}

.btp-article__content ul,
.btp-article__content ol {
    padding: 0;
    margin: 1.4em 0;
    list-style: none;
}

.btp-article__content ul li,
.btp-article__content ol li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    color: var(--btp-text-muted);
}

.btp-article__content ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0.7em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--btp-accent);
}

.btp-article__content ol {
    counter-reset: btp-list-counter;
}

.btp-article__content ol li {
    counter-increment: btp-list-counter;
}

.btp-article__content ol li::before {
    content: counter(btp-list-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--btp-accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btp-article__content blockquote {
    margin: 2.5em 0;
    padding: 32px 36px;
    background: var(--btp-bg-soft);
    border-radius: var(--btp-radius-lg);
    border-left: 4px solid var(--btp-accent);
    position: relative;
}

.btp-article__content blockquote::before {
    content: '"';
    position: absolute;
    top: -8px;
    left: 24px;
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: 80px;
    line-height: 1;
    color: var(--btp-accent);
    opacity: 0.2;
}

.btp-article__content blockquote p {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: 22px;
    line-height: 1.4;
    color: var(--btp-text);
    font-weight: 500;
    font-style: italic;
}

.btp-article__content blockquote cite {
    display: block;
    margin-top: 12px;
    font-style: normal;
    font-size: 14px;
    color: var(--btp-text-soft);
    font-weight: 500;
}

/* Tables (Gutenberg block) */
.btp-article__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 15px;
}

.btp-article__content thead {
    background: var(--btp-bg-soft);
}

.btp-article__content th,
.btp-article__content td {
    padding: 12px 16px;
    border: 1px solid var(--btp-border);
    text-align: left;
}

.btp-article__content th {
    font-weight: 600;
    color: var(--btp-text);
}

.btp-article__content figure {
    margin: 2em 0;
}

.btp-article__content figure.wp-block-table {
    overflow-x: auto;
}

.btp-article__content .wp-block-image {
    border-radius: var(--btp-radius-md);
    overflow: hidden;
}

.btp-article__content .wp-block-image img {
    border-radius: var(--btp-radius-md);
}

.btp-article__content hr {
    border: none;
    border-top: 1px solid var(--btp-border);
    margin: 3em 0;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.btp-faq {
    margin-top: 4em;
    padding-top: 3em;
    border-top: 1px solid var(--btp-border);
}

.btp-faq h2 {
    margin: 0 0 1em;
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--btp-text);
}

.btp-faq__item {
    border-bottom: 1px solid var(--btp-border);
}

.btp-faq__item:first-of-type {
    border-top: 1px solid var(--btp-border);
}

.btp-faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 4px;
    text-align: left;
    font-size: 17px;
    font-weight: 600;
    color: var(--btp-text);
    transition: color var(--btp-transition);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btp-faq__question:hover {
    color: var(--btp-accent-dark);
}

.btp-faq__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--btp-bg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--btp-text);
    transition: all var(--btp-transition);
}

.btp-faq__question[aria-expanded="true"] .btp-faq__icon {
    background: var(--btp-accent);
    color: white;
    transform: rotate(45deg);
}

.btp-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 350ms var(--btp-ease);
}

.btp-faq__answer > div {
    padding: 0 4px 24px;
    color: var(--btp-text-muted);
    font-size: 16px;
    line-height: 1.65;
}

.btp-faq__answer p { margin: 0; }
.btp-faq__answer p + p { margin-top: 0.8em; }

/* ==========================================================================
   Bloc auteur
   ========================================================================== */
.btp-author-card {
    margin-top: 4em;
    display: flex;
    gap: 24px;
    padding: 32px;
    background: linear-gradient(135deg, var(--btp-bg-soft), var(--btp-accent-bg));
    border: 1px solid var(--btp-border);
    border-radius: var(--btp-radius-xl);
    align-items: flex-start;
}

.btp-author-card__avatar {
    flex-shrink: 0;
}

.btp-author-card__avatar img {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    border: 3px solid white;
    box-shadow: var(--btp-shadow-md);
}

.btp-author-card__content { flex: 1; min-width: 0; }

.btp-author-card__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--btp-accent-dark);
    margin-bottom: 4px;
}

.btp-author-card__name {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--btp-text);
    margin: 0 0 4px;
}

.btp-author-card__role {
    color: var(--btp-text-soft);
    font-size: 14px;
    margin: 0 0 12px;
    font-weight: 500;
}

.btp-author-card__bio {
    color: var(--btp-text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.btp-author-card__links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btp-author-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--btp-accent-dark);
    text-decoration: none;
}

.btp-author-card__link svg {
    transition: transform var(--btp-transition);
}

.btp-author-card__link:hover svg {
    transform: translateX(3px);
}

@media (max-width: 600px) {
    .btp-author-card {
        flex-direction: column;
        text-align: center;
        padding: 28px 20px;
    }
    .btp-author-card__links { justify-content: center; }
}

/* ==========================================================================
   Partage
   ========================================================================== */
.btp-share {
    margin-top: 3em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    background: var(--btp-bg-soft);
    border-radius: var(--btp-radius-md);
    border: 1px solid var(--btp-border);
    flex-wrap: wrap;
}

.btp-share__label {
    font-size: 14px;
    color: var(--btp-text-muted);
}

.btp-share__label strong {
    color: var(--btp-text);
    font-weight: 600;
}

.btp-share__buttons {
    display: flex;
    gap: 8px;
}

.btp-share__buttons a,
.btp-share__buttons button {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--btp-text-muted);
    border: 1px solid var(--btp-border);
    transition: all var(--btp-transition);
    cursor: pointer;
    text-decoration: none;
}

.btp-share__buttons a:hover,
.btp-share__buttons button:hover {
    background: var(--btp-text);
    color: white;
    border-color: var(--btp-text);
    transform: translateY(-2px);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
/* Sidebar ENTIERE collee en haut du viewport, suit le scroll, SANS scroll interne. */
.btp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: start;
    position: sticky;
    top: 100px;
}

@media (max-width: 980px) {
    .btp-sidebar {
        position: static;
        gap: 24px;
    }
}

.btp-sidebar-block {
    background: white;
    border: 1px solid var(--btp-border);
    border-radius: var(--btp-radius-md);
    padding: 16px 18px;
}

.btp-sidebar-block__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--btp-text);
    margin-bottom: 10px;
}

.btp-sidebar-block__title svg {
    color: var(--btp-accent);
    width: 14px;
    height: 14px;
}

.btp-sidebar-toc {
    list-style: none;
    margin: 0;
    padding: 0;
}

.btp-sidebar-toc li {
    border-left: 2px solid var(--btp-border);
    transition: border-color var(--btp-transition);
}

.btp-sidebar-toc li.is-active {
    border-left-color: var(--btp-accent);
}

.btp-sidebar-toc a {
    display: block;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--btp-text-soft);
    line-height: 1.35;
    transition: all var(--btp-transition);
    text-decoration: none;
}

.btp-sidebar-toc a:hover {
    color: var(--btp-text);
}

.btp-sidebar-toc li.is-active a {
    color: var(--btp-accent-dark);
    font-weight: 600;
}

.btp-sidebar-block--cta {
    padding: 0;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    border: none;
    flex-shrink: 0;
}

.btp-sidebar-block__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btp-sidebar-block__overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    color: white;
    background: linear-gradient(to bottom, transparent 0%, transparent 30%, rgb(0 0 0 / 0.85) 100%);
}

.btp-sidebar-block__overlay h3 {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 4px;
    color: white;
}

.btp-sidebar-block__overlay p {
    font-size: 12px;
    line-height: 1.4;
    margin: 0 0 10px;
    opacity: 0.9;
}

.btp-sidebar-block__overlay .btp-btn {
    align-self: flex-start;
}

.btp-sidebar-block__text {
    color: var(--btp-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.btp-sidebar-block__text p { margin: 0 0 0.7em; }
.btp-sidebar-block__text p:last-child { margin-bottom: 0; }

@media (max-width: 980px) {
    .btp-sidebar { position: static; }
}

/* ==========================================================================
   Articles similaires
   ========================================================================== */
.btp-related {
    background: var(--btp-bg-soft);
    border-top: 1px solid var(--btp-border);
    padding: 80px 24px;
}

.btp-related__container {
    max-width: var(--btp-container);
    margin: 0 auto;
}

.btp-related__header {
    text-align: center;
    margin-bottom: 48px;
}

.btp-related__header h2 {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--btp-text);
    margin: 0 0 8px;
}

.btp-related__header p {
    color: var(--btp-text-soft);
    font-size: 16px;
    margin: 0;
}

.btp-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.btp-related-card {
    background: white;
    border: 1px solid var(--btp-border);
    border-radius: var(--btp-radius-lg);
    overflow: hidden;
    transition: all var(--btp-transition);
    color: inherit;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.btp-related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--btp-shadow-lg);
    border-color: var(--btp-border-strong);
}

.btp-related-card__image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--btp-bg-muted);
}

.btp-related-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms var(--btp-ease);
}

.btp-related-card:hover .btp-related-card__image img {
    transform: scale(1.05);
}

.btp-related-card__body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.btp-related-card__category {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    background: var(--btp-accent-bg);
    color: var(--btp-accent-dark);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.btp-related-card__title {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--btp-text);
    margin: 0 0 10px;
    text-wrap: balance;
}

.btp-related-card:hover .btp-related-card__title {
    color: var(--btp-accent-dark);
}

.btp-related-card__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--btp-text-muted);
    margin: 0 0 16px;
    flex: 1;
}

.btp-related-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--btp-text-soft);
}

/* ==========================================================================
   Newsletter CTA
   ========================================================================== */
.btp-cta {
    padding: 80px 24px;
    background: var(--btp-text);
    color: white;
}

.btp-cta__container {
    max-width: var(--btp-container-narrow);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
}

.btp-cta__content h2 {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 8px;
    color: white;
}

.btp-cta__content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    margin: 0;
}

.btp-cta__form {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btp-cta__form input {
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: white;
    font-size: 14px;
    width: 280px;
    outline: none;
    font-family: inherit;
}

.btp-cta__form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btp-cta__form .btp-btn--primary {
    background: white;
    color: var(--btp-text);
}

.btp-cta__form .btp-btn--primary:hover {
    background: var(--btp-accent);
    color: white;
}

@media (max-width: 768px) {
    .btp-cta__container {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    .btp-cta__form {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 12px;
    }
    .btp-cta__form input {
        width: 100%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 999px;
    }
    .btp-cta__form .btp-btn { justify-content: center; }
}

/* ==========================================================================
   Back to top + reading progress
   ========================================================================== */
.btp-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--btp-text, #1c1917);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--btp-shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: all 200ms var(--btp-ease);
    z-index: 50;
    border: none;
    cursor: pointer;
}

.btp-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btp-back-to-top:hover {
    background: var(--btp-accent-dark);
    transform: translateY(-2px);
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--btp-accent), var(--btp-accent-dark));
    z-index: 9999;
    transition: width 50ms linear;
    will-change: width;
    width: 0;
}

/* ==========================================================================
   CTA Inline (banner dans le contenu de l'article)
   ========================================================================== */
.btp-inline-cta {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0;
    margin: 40px 0 !important;
    border-radius: var(--btp-radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--btp-accent-bg) 0%, #ffffff 60%);
    border: 1px solid var(--btp-accent-soft);
    box-shadow: 0 8px 24px -12px rgb(13 148 136 / 0.25);
    position: relative;
}

.btp-inline-cta--text {
    grid-template-columns: 1fr;
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--btp-accent-bg) 0%, var(--btp-bg-soft) 100%);
}

.btp-inline-cta__media {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    background: var(--btp-bg-muted);
}

.btp-inline-cta__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btp-inline-cta__content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.btp-inline-cta--text .btp-inline-cta__content {
    padding: 0;
    text-align: center;
    align-items: center;
}

.btp-inline-cta__title {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: var(--btp-text) !important;
    margin: 0 !important;
    letter-spacing: -0.01em;
}

.btp-inline-cta__text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--btp-text-muted);
    margin: 0;
}

.btp-inline-cta__text p {
    margin: 0 0 8px !important;
}

.btp-inline-cta .btp-btn {
    align-self: flex-start;
    margin-top: 6px;
}

.btp-inline-cta--text .btp-btn {
    align-self: center;
}

@media (max-width: 720px) {
    .btp-inline-cta {
        grid-template-columns: 1fr;
    }
    .btp-inline-cta__media {
        min-height: 180px;
        aspect-ratio: 16/9;
    }
    .btp-inline-cta__content {
        padding: 24px;
    }
    .btp-inline-cta__title {
        font-size: 19px !important;
    }
}

/* ==========================================================================
   Sommaire MOBILE (en haut de l'article, < 980px uniquement)
   ========================================================================== */
.btp-mobile-toc {
    display: none;
}

@media (max-width: 980px) {
    .btp-mobile-toc {
        display: block;
        background: var(--btp-bg-soft);
        border: 1px solid var(--btp-border);
        border-radius: var(--btp-radius-md);
        padding: 16px 18px;
        margin: 0 0 32px !important;
    }

    /* Cache la version sidebar du sommaire sur mobile. */
    .btp-sidebar-block--toc {
        display: none;
    }
}

.btp-mobile-toc summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--btp-text);
    user-select: none;
}

.btp-mobile-toc summary::-webkit-details-marker {
    display: none;
}

.btp-mobile-toc summary > svg:first-child {
    color: var(--btp-accent);
    flex-shrink: 0;
}

.btp-mobile-toc__chevron {
    margin-left: auto;
    display: inline-flex;
    color: var(--btp-text-soft);
    transition: transform var(--btp-transition);
}

.btp-mobile-toc[open] .btp-mobile-toc__chevron {
    transform: rotate(180deg);
}

.btp-mobile-toc__list {
    list-style: none;
    margin: 14px 0 0 !important;
    padding: 0;
}

.btp-mobile-toc__list li {
    margin: 0 !important;
    padding: 0 !important;
}

.btp-mobile-toc__list li::before {
    display: none !important;
}

.btp-mobile-toc__list a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--btp-text-muted);
    text-decoration: none;
    border-left: 2px solid var(--btp-border);
    transition: all var(--btp-transition);
}

.btp-mobile-toc__list a:hover {
    background: white;
    border-left-color: var(--btp-accent);
    color: var(--btp-text);
}

/* ==========================================================================
   Encadre auteur - styles et tailles d'avatar
   ========================================================================== */
.btp-author-card {
    margin-top: 4em !important;
    display: flex;
    gap: 24px;
    padding: 32px;
    border-radius: var(--btp-radius-xl);
    align-items: flex-start;
}

/* --- Tailles d'avatar --- */
.btp-author-card--avatar-small .btp-author-card__avatar img {
    width: 60px;
    height: 60px;
}
.btp-author-card--avatar-medium .btp-author-card__avatar img {
    width: 88px;
    height: 88px;
}
.btp-author-card--avatar-large .btp-author-card__avatar img {
    width: 120px;
    height: 120px;
}

.btp-author-card__avatar {
    flex-shrink: 0;
}

.btp-author-card__avatar img {
    border-radius: 999px;
    border: 3px solid white;
    box-shadow: var(--btp-shadow-md);
    display: block;
}

.btp-author-card__content {
    flex: 1;
    min-width: 0;
}

.btp-author-card__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--btp-accent-dark);
    margin-bottom: 4px;
}

.btp-author-card__name {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: 22px !important;
    font-weight: 600 !important;
    color: var(--btp-text) !important;
    margin: 0 0 4px !important;
    line-height: 1.2;
}

.btp-author-card__role {
    color: var(--btp-text-soft) !important;
    font-size: 14px !important;
    margin: 0 0 12px !important;
    font-weight: 500;
}

.btp-author-card__bio {
    color: var(--btp-text-muted) !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 0 0 16px !important;
}

.btp-author-card__links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btp-author-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--btp-accent-dark);
    text-decoration: none;
}

.btp-author-card__link svg {
    transition: transform var(--btp-transition);
}

.btp-author-card__link:hover svg {
    transform: translateX(3px);
}

.btp-author-card__social {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--btp-text-muted);
    border: 1px solid var(--btp-border);
    transition: all var(--btp-transition);
    text-decoration: none;
}

.btp-author-card__social:hover {
    background: var(--btp-text);
    color: white;
    border-color: var(--btp-text);
    transform: translateY(-1px);
}

/* --- Style 1 : Classique (gradient teal soft) --- */
.btp-author-card--classic {
    background: linear-gradient(135deg, var(--btp-bg-soft), var(--btp-accent-bg));
    border: 1px solid var(--btp-border);
}

/* --- Style 2 : Minimal (juste texte, pas de cadre) --- */
.btp-author-card--minimal {
    background: transparent;
    border: none;
    padding: 24px 0;
    border-top: 1px solid var(--btp-border);
    border-bottom: 1px solid var(--btp-border);
    border-radius: 0;
}

.btp-author-card--minimal .btp-author-card__avatar img {
    box-shadow: none;
    border-width: 2px;
}

/* --- Style 3 : Bordered (cadre simple sobre) --- */
.btp-author-card--bordered {
    background: white;
    border: 1px solid var(--btp-border-strong);
}

/* --- Style 4 : Banner (bandeau fonce contrastant) --- */
.btp-author-card--banner {
    background: linear-gradient(135deg, var(--btp-text) 0%, #2d2724 100%);
    color: white;
    padding: 36px 40px;
    border: none;
}

.btp-author-card--banner .btp-author-card__label {
    color: var(--btp-accent);
}

.btp-author-card--banner .btp-author-card__name {
    color: white !important;
}

.btp-author-card--banner .btp-author-card__role {
    color: rgba(255, 255, 255, 0.7) !important;
}

.btp-author-card--banner .btp-author-card__bio {
    color: rgba(255, 255, 255, 0.85) !important;
}

.btp-author-card--banner .btp-author-card__link {
    color: var(--btp-accent);
}

.btp-author-card--banner .btp-author-card__social {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
}

.btp-author-card--banner .btp-author-card__social:hover {
    background: white;
    color: var(--btp-text);
    border-color: white;
}

@media (max-width: 600px) {
    .btp-author-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    .btp-author-card__links {
        justify-content: center;
    }
    .btp-author-card--banner {
        padding: 28px 24px;
    }
}

/* ==========================================================================
   Bandeau promo global
   ========================================================================== */
.btp-promo-banner {
    background: var(--btp-promo-bg, #1c1917);
    color: var(--btp-promo-text, #ffffff);
    border-radius: var(--btp-radius-md);
    overflow: hidden;
    margin: 32px 0 !important;
}

.btp-promo-banner--sticky_top {
    border-radius: 0;
    margin: 0 !important;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.15);
}

.btp-promo-banner__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 24px;
    flex-wrap: wrap;
    max-width: var(--btp-container, 1200px);
    margin: 0 auto;
}

.btp-promo-banner__content {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btp-promo-banner__title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--btp-promo-text, #ffffff);
    line-height: 1.3;
}

.btp-promo-banner__subtitle {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.4;
}

.btp-promo-banner__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--btp-promo-accent, #fbbf24);
    color: var(--btp-promo-bg, #1c1917) !important;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none !important;
    line-height: 1;
    transition: transform var(--btp-transition), box-shadow var(--btp-transition);
    flex-shrink: 0;
    white-space: nowrap;
}

.btp-promo-banner__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.2);
}

.btp-promo-banner__close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.12);
    border: none;
    color: var(--btp-promo-text, #ffffff);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--btp-transition);
}

.btp-promo-banner__close:hover {
    background: rgb(255 255 255 / 0.22);
}

.btp-promo-banner.is-dismissed {
    display: none !important;
}

@media (max-width: 600px) {
    .btp-promo-banner__inner {
        padding: 14px 16px;
        gap: 12px;
    }
    .btp-promo-banner__title { font-size: 14px; }
    .btp-promo-banner__subtitle { font-size: 12px; }
    .btp-promo-banner__cta { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Page Auteur (archive) - design Blog Template Pro
   ========================================================================== */
.btp-author-archive {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    font-family: var(--btp-font-sans, system-ui, sans-serif);
}

.btp-author-archive__header {
    background: linear-gradient(135deg, var(--btp-bg-soft, #f5f5f4), var(--btp-accent-bg, #f0fdfa));
    border-radius: 20px;
    padding: 48px;
    margin-bottom: 48px;
}

.btp-author-archive__profile {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.btp-author-archive__avatar { flex-shrink: 0; }

.btp-author-archive__avatar img {
    width: 160px;
    height: 160px;
    border-radius: 999px;
    border: 4px solid #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    object-fit: cover;
    display: block;
}

.btp-author-archive__info { flex: 1; min-width: 0; }

.btp-author-archive__label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--btp-accent-dark, #0f766e);
    margin-bottom: 8px;
}

.btp-author-archive__name {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.1;
    margin: 0 0 8px;
    color: var(--btp-text, #1c1917);
}

.btp-author-archive__role {
    font-size: 17px;
    color: var(--btp-text-soft, #78716c);
    margin: 0 0 16px;
    font-weight: 500;
}

.btp-author-archive__bio {
    font-size: 16px;
    line-height: 1.7;
    color: var(--btp-text-muted, #57534e);
    margin: 0 0 20px;
    max-width: 720px;
}

.btp-author-archive__bio p { margin: 0 0 12px; }

.btp-author-archive__social {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btp-author-archive__social a {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--btp-text, #1c1917);
    text-decoration: none;
    transition: all 0.18s ease;
}

.btp-author-archive__social a:hover {
    background: var(--btp-accent-dark, #0f766e);
    color: #fff;
    border-color: var(--btp-accent-dark, #0f766e);
    transform: translateY(-1px);
}

.btp-author-archive__count {
    font-size: 14px;
    font-weight: 600;
    color: var(--btp-accent-dark, #0f766e);
    margin: 0;
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 999px;
}

/* Grille d'articles */
.btp-author-archive__grid {
    display: grid;
    gap: 32px;
}

.btp-author-archive__grid--cols-1 { grid-template-columns: 1fr; }
.btp-author-archive__grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.btp-author-archive__grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btp-author-archive__grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.btp-author-card-post {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
}

.btp-author-card-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--btp-accent-soft, #ccfbf1);
}

.btp-author-card-post__thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--btp-bg-soft, #f5f5f4);
}

.btp-author-card-post__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.btp-author-card-post:hover .btp-author-card-post__thumb img {
    transform: scale(1.05);
}

.btp-author-card-post__body {
    padding: 22px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.btp-author-card-post__cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--btp-accent-dark, #0f766e);
    background: var(--btp-accent-bg, #f0fdfa);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.btp-author-card-post__title {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 10px;
}

.btp-author-card-post__title a {
    color: var(--btp-text, #1c1917);
    text-decoration: none;
    transition: color 0.15s;
}

.btp-author-card-post__title a:hover { color: var(--btp-accent-dark, #0f766e); }

.btp-author-card-post__excerpt {
    color: var(--btp-text-muted, #57534e);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px;
    flex: 1;
}

.btp-author-card-post__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--btp-text-soft, #78716c);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 14px;
    margin-top: auto;
}

.btp-author-card-post__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--btp-accent-dark, #0f766e);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: gap 0.18s;
}

.btp-author-card-post__btn:hover { gap: 10px; }

/* Style alternatif : image en haut, fond uniforme */
.btp-author-archive__grid--style-minimal .btp-author-card-post {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
    box-shadow: none;
    padding-bottom: 24px;
}

.btp-author-archive__grid--style-minimal .btp-author-card-post:hover {
    transform: none;
    box-shadow: none;
}

.btp-author-archive__grid--style-minimal .btp-author-card-post__thumb {
    border-radius: 10px;
    aspect-ratio: 16 / 9;
}

.btp-author-archive__grid--style-minimal .btp-author-card-post__body {
    padding: 18px 0 0;
}

/* Pagination */
.btp-author-archive__pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.btp-author-archive__pagination ul,
.btp-author-archive__pagination .page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 6px;
    align-items: center;
}

.btp-author-archive__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--btp-text, #1c1917);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.15s;
}

.btp-author-archive__pagination .page-numbers:hover {
    border-color: var(--btp-accent-dark, #0f766e);
    color: var(--btp-accent-dark, #0f766e);
}

.btp-author-archive__pagination .page-numbers.current {
    background: var(--btp-accent-dark, #0f766e);
    color: #fff;
    border-color: var(--btp-accent-dark, #0f766e);
}

.btp-author-archive__empty {
    text-align: center;
    color: var(--btp-text-soft, #78716c);
    font-size: 16px;
    padding: 60px 20px;
}

/* Responsive */
@media (max-width: 900px) {
    .btp-author-archive__grid--cols-4,
    .btp-author-archive__grid--cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .btp-author-archive { padding: 32px 16px 60px; }
    .btp-author-archive__header { padding: 28px 22px; border-radius: 14px; }
    .btp-author-archive__profile {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 18px;
    }
    .btp-author-archive__avatar img { width: 110px; height: 110px; }
    .btp-author-archive__social { justify-content: center; }
    .btp-author-archive__grid {
        grid-template-columns: 1fr !important;
        gap: 22px;
    }
}

/* ==========================================================================
   Section commentaires (wrapper - le contenu vient de comments.php du theme)
   ========================================================================== */
.btp-comments {
    padding: 48px 24px 24px;
    background: var(--btp-bg-soft, #f5f5f4);
    border-top: 1px solid var(--btp-border, #e7e5e4);
}
.btp-comments__container {
    max-width: 760px;
    margin: 0 auto;
}
.btp-comments h2,
.btp-comments h3 {
    font-family: var(--btp-font-display, Georgia, serif);
    color: var(--btp-text, #1c1917);
}

/* ==========================================================================
   Barre "Resumer avec l'IA" (GEO)
   ========================================================================== */
.btp-ai-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: var(--btp-ai-bg, linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%));
    border: 1px dashed var(--btp-ai-border, #c7d2fe);
    border-radius: 999px;
    margin: 24px 0 !important;
    font-family: var(--btp-font-sans, system-ui, sans-serif);
}

.btp-ai-summary__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--btp-ai-label-color, #4f46e5);
    flex-shrink: 0;
}

.btp-ai-summary__buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.btp-ai-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--btp-ai-btn-bg, white);
    border: 1px solid var(--btp-ai-btn-border, #e5e7eb);
    border-radius: 999px;
    color: var(--btp-ai-btn-color, #1f2937);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.18s ease;
    white-space: nowrap;
}

/* Hover : couleur de marque par defaut (--btp-ai-color injectee par chaque pill) */
.btp-ai-pill:hover {
    border-color: var(--btp-ai-color, #4f46e5);
    color: var(--btp-ai-color, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(79, 70, 229, 0.12);
}

/* Mode "no brand colors" : on garde la couleur du texte fixee au hover */
.btp-ai-no-brand .btp-ai-pill:hover {
    border-color: var(--btp-ai-btn-color, #1f2937);
    color: var(--btp-ai-btn-color, #1f2937);
}
.btp-ai-no-brand .btp-ai-pill__icon,
.btp-ai-no-brand .btp-ai-pill:hover .btp-ai-pill__icon {
    color: var(--btp-ai-btn-color, #1f2937);
}

.btp-ai-pill__icon {
    color: var(--btp-ai-color, #4f46e5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btp-ai-pill:hover .btp-ai-pill__icon { color: var(--btp-ai-color, #4f46e5); }

@media (max-width: 700px) {
    .btp-ai-summary {
        border-radius: 14px;
        padding: 14px 16px;
        gap: 10px;
    }
    .btp-ai-summary__buttons { gap: 6px; }
    .btp-ai-pill { padding: 5px 10px; font-size: 12px; }
}

/* ==========================================================================
   CTA Sticky Scroll
   ========================================================================== */
.btp-cta-sticky {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    z-index: 9990;
    background: var(--btp-cta-sticky-bg, #1c1917);
    color: var(--btp-cta-sticky-color, #ffffff);
    border-radius: 999px;
    padding: 10px 14px 10px 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    max-width: calc(100vw - 32px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    pointer-events: none;
}
.btp-cta-sticky.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.btp-cta-sticky__inner {
    display: flex;
    align-items: center;
    gap: 14px;
}
.btp-cta-sticky__content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.3;
}
.btp-cta-sticky__title { font-size: 14px; font-weight: 700; }
.btp-cta-sticky__sub { font-size: 12px; opacity: 0.75; font-weight: 500; }
.btp-cta-sticky__btn {
    background: var(--btp-cta-sticky-accent, #0d9488);
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}
.btp-cta-sticky__btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(13, 148, 136, 0.4); color: white; }
.btp-cta-sticky__close {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 28px; height: 28px;
    border-radius: 999px;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.btp-cta-sticky__close:hover { background: rgba(255,255,255,0.2); }
@media (max-width: 600px) {
    .btp-cta-sticky { bottom: 8px; padding: 8px 10px 8px 16px; }
    .btp-cta-sticky__sub { display: none; }
    .btp-cta-sticky__btn { padding: 7px 12px; font-size: 12px; }
}

/* ==========================================================================
   Exit-Intent Popup
   ========================================================================== */
.btp-exit-intent {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.btp-exit-intent.is-visible { display: flex; animation: btpExitFadeIn 0.3s ease; }
@keyframes btpExitFadeIn { from { opacity: 0; } to { opacity: 1; } }
.btp-exit-intent__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.btp-exit-intent__box {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 460px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    animation: btpExitSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes btpExitSlide { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.btp-exit-intent__close {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 32px; height: 32px;
    border-radius: 999px;
    cursor: pointer;
    color: #1c1917;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btp-exit-intent__close:hover { background: rgba(0,0,0,0.1); }
.btp-exit-intent__image { aspect-ratio: 16 / 9; background: #f5f5f4; overflow: hidden; }
.btp-exit-intent__image img { width: 100%; height: 100%; object-fit: cover; }
.btp-exit-intent__body { padding: 32px 28px 28px; text-align: center; }
.btp-exit-intent__title {
    font-family: var(--btp-font-display, Georgia, serif);
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1c1917;
    line-height: 1.2;
}
.btp-exit-intent__text {
    color: #57534e;
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 22px;
}
.btp-exit-intent__btn {
    display: inline-block;
    background: var(--btp-accent-dark, #0d9488);
    color: white;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btp-exit-intent__btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.4);
}

/* ==========================================================================
   Mobile FAB (Floating Action Button)
   ========================================================================== */
.btp-mobile-fab {
    position: fixed;
    right: 16px;
    bottom: 90px;
    z-index: 9980;
    background: var(--btp-fab-color, #25D366);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
    text-decoration: none;
    transition: transform 0.2s;
}
.btp-mobile-fab:hover { color: white; transform: scale(1.08); }
.btp-mobile-fab__label { display: none; }
@media (max-width: 980px) {
    .btp-mobile-fab { display: inline-flex; }
}
@media (max-width: 600px) {
    .btp-mobile-fab { bottom: 80px; width: 52px; height: 52px; }
}

/* ==========================================================================
   TTS player "Ecouter l'article" (style SoundCloud-like)
   ========================================================================== */
.btp-tts-player {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--btp-bg-soft, #fafaf9);
    border: 1px solid var(--btp-border, #e7e5e4);
    border-radius: 14px;
    padding: 12px 16px;
    margin: 0 0 28px;
    max-width: 620px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.btp-tts-player:hover { border-color: var(--btp-accent-dark, #0d9488); box-shadow: 0 4px 14px -6px rgba(13,148,136,0.18); }

.btp-tts-player__play {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    border-radius: 999px;
    border: none;
    background: var(--btp-accent-dark, #0d9488);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
    padding: 0;
}
.btp-tts-player__play:hover { transform: scale(1.05); background: var(--btp-accent, #14b8a6); }
.btp-tts-player__play:active { transform: scale(0.96); }
.btp-tts-player__play svg { margin-left: 2px; }
.btp-tts-player.is-playing .btp-tts-player__play svg { margin-left: 0; }

.btp-tts-player__main { flex: 1 1 auto; min-width: 0; }
.btp-tts-player__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.btp-tts-player__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--btp-text, #1c1917);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Voice picker (remplace le titre) */
.btp-tts-player-wrap { margin: 0 0 28px; max-width: 620px; }
.btp-tts-player-wrap .btp-tts-player { margin: 0; }

.btp-tts-player__voice {
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--btp-text, #1c1917);
    background: transparent;
    border: none;
    border-bottom: 1px dashed transparent;
    padding: 0 16px 1px 0;
    margin: 0;
    cursor: pointer;
    max-width: 260px;
    width: auto;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0 center;
    transition: border-color 0.15s, color 0.15s;
}
.btp-tts-player__voice:hover { border-bottom-color: var(--btp-text-muted, #78716c); }
.btp-tts-player__voice:focus { outline: none; border-bottom-color: var(--btp-accent-dark, #0d9488); color: var(--btp-accent-dark, #0d9488); }

/* Hint banner navigateur */
.btp-tts-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--btp-accent-bg, #f0fdfa);
    border: 1px solid rgba(13, 148, 136, 0.22);
    color: var(--btp-accent-dark, #0d9488);
    border-radius: 10px;
    padding: 8px 14px;
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.4;
    font-family: inherit;
}
.btp-tts-hint__icon { flex: 0 0 auto; }
.btp-tts-hint__text { flex: 1 1 auto; }
.btp-tts-hint__close {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    padding: 0 2px;
    font-size: 18px;
    line-height: 1;
    font-family: inherit;
    transition: opacity 0.15s;
}
.btp-tts-hint__close:hover { opacity: 1; }

@media (max-width: 600px) {
    .btp-tts-player__voice { font-size: 11px; max-width: 160px; }
    .btp-tts-hint { font-size: 11px; padding: 7px 11px; gap: 8px; }
}
.btp-tts-player__time {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--btp-text-muted, #78716c);
    white-space: nowrap;
    flex-shrink: 0;
}

.btp-tts-player__track {
    position: relative;
    height: 28px;
    cursor: pointer;
    user-select: none;
}
.btp-tts-player__bars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    width: 100%;
    pointer-events: none;
}
.btp-tts-player__bar {
    flex: 1 1 0;
    background: var(--btp-border, #d6d3d1);
    border-radius: 1px;
    min-height: 3px;
    transition: background 0.2s;
}
.btp-tts-player__bars--played {
    overflow: hidden;
    width: 0%;
    transition: width 0.3s linear;
}
.btp-tts-player__bars--played .btp-tts-player__bar { background: var(--btp-accent-dark, #0d9488); }
.btp-tts-player.is-playing .btp-tts-player__bars--played .btp-tts-player__bar:nth-last-child(-n+3) {
    animation: btp-tts-pulse 1s ease-in-out infinite;
}
@keyframes btp-tts-pulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50%      { opacity: 0.7; transform: scaleY(0.7); }
}

.btp-tts-player__speed {
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid var(--btp-border, #e7e5e4);
    color: var(--btp-text-muted, #78716c);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    transition: all 0.15s;
    min-width: 42px;
    font-family: inherit;
}
.btp-tts-player__speed:hover {
    border-color: var(--btp-accent-dark, #0d9488);
    color: var(--btp-accent-dark, #0d9488);
}

@media (max-width: 600px) {
    .btp-tts-player { padding: 10px 12px; gap: 10px; }
    .btp-tts-player__play { width: 40px; height: 40px; }
    .btp-tts-player__title { font-size: 12px; }
    .btp-tts-player__track { height: 24px; }
    .btp-tts-player__speed { padding: 5px 8px; min-width: 38px; }
}

/* ==========================================================================
   Bloc Resume - structure stylee (header avec icone + body avec puces vertes)
   ========================================================================== */
.btp-article__content .btp-summary,
.btp-summary {
    border-radius: 16px !important;
    padding: 28px 32px !important;
}
.btp-article__content .btp-summary__header,
.btp-summary__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 0;
    border-bottom: none;
}
.btp-summary__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--btp-accent-dark, #0d9488);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}
.btp-summary__icon svg {
    width: 22px;
    height: 22px;
    color: white;
}
.btp-summary__heading {
    flex: 1;
    min-width: 0;
}
.btp-article__content .btp-summary__title,
.btp-summary__title {
    font-family: var(--btp-font-display, Georgia, serif) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 0 2px !important;
    padding: 0 !important;
    color: var(--btp-text, #1c1917) !important;
}
.btp-article__content .btp-summary__subtitle,
.btp-summary__subtitle {
    font-size: 13px !important;
    color: var(--btp-text-soft, #78716c) !important;
    margin: 0 !important;
    font-weight: 500;
    line-height: 1.3;
}
.btp-article__content .btp-summary__body,
.btp-summary__body {
    color: var(--btp-text-muted, #57534e);
}
.btp-article__content .btp-summary__body > * + *,
.btp-summary__body > * + * {
    margin-top: 14px;
}

/* Bullets stylees a l'interieur du body */
.btp-article__content .btp-summary__body ul,
.btp-summary__body ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.btp-article__content .btp-summary__body ul li,
.btp-summary__body ul li {
    position: relative;
    padding-left: 24px !important;
    margin-bottom: 12px !important;
    line-height: 1.55;
}
.btp-article__content .btp-summary__body ul li::before,
.btp-summary__body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--btp-accent-dark, #0d9488);
}

/* Mobile : reduit padding et taille titre */
@media (max-width: 600px) {
    .btp-article__content .btp-summary,
    .btp-summary { padding: 22px 20px !important; }
    .btp-summary__icon { width: 38px; height: 38px; }
    .btp-summary__icon svg { width: 18px; height: 18px; }
    .btp-article__content .btp-summary__title,
    .btp-summary__title { font-size: 19px !important; }
}

/* ==========================================================================
   FIX puces orphelines : cache les <li> vides + sans contenu visible
   (pousses parfois par des SaaS de redaction qui laissent des balises vides)
   ========================================================================== */
.btp-article__content ul li:empty,
.btp-article__content ol li:empty,
.btp-summary__body ul li:empty,
.btp-summary__body ol li:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Si la classe .btp-empty est ajoutee par JS pour les li avec whitespace only */
.btp-article__content li.btp-empty,
.btp-summary__body li.btp-empty {
    display: none !important;
}
