/**
 * Telebib2 - Custom Theme Styles
 * Child theme of Cassiopeia
 *
 * Design System based on telebib2_charte_officielle.html
 */

/* ==========================================================================
   CSS VARIABLES - Design System
   ========================================================================== */

:root {
    /* Primary Colors */
    --tb2-primary: #0047AB;
    --tb2-primary-dark: #003580;
    --tb2-primary-darker: #001F4D;
    --tb2-secondary: #00B4D8;
    --tb2-accent: #FF8C5A;

    /* Couleur de survol des lignes de tableau (bleuté, commun .table + sppb) */
    --tb2-row-hover: #F8FAFC;

    /* Neutral Colors */
    --tb2-dark: #1A1D29;
    --tb2-grey: #6B7280;
    --tb2-light-grey: #F3F4F6;
    --tb2-white: #FFFFFF;

    /* Status Colors */
    --tb2-success: #10B981;
    --tb2-success-bg: #DCFCE7;
    --tb2-info: #1E40AF;
    --tb2-info-bg: #DBEAFE;

    /* Typography */
    --tb2-font-main: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --tb2-font-code: 'Calibri', 'Segoe UI', Tahoma, sans-serif;

    /* Spacing */
    --tb2-radius-sm: 4px;
    --tb2-radius: 8px;
    --tb2-radius-lg: 12px;
    --tb2-radius-xl: 16px;

    /* Shadows */
    --tb2-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --tb2-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --tb2-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --tb2-transition: all 0.3s ease;

    /* Header offset — valeur initiale, recalculée dynamiquement par template.js */
    --tb2-header-offset: 100px;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

body {
    font-family: var(--tb2-font-main);
    color: var(--tb2-dark);
    line-height: 1.6;
    background-color: var(--tb2-white);
    margin:0!important;
    overflow-x: hidden;
}

/* Empêche le scroll anchoring d'ajuster scrollY quand le header sticky change
   de hauteur (topbar qui se masque) — évite la boucle tremblement/oscillation */
.site-grid {
    overflow-anchor: none;
}

/* Override Cassiopeia default link colors */
a {
    color: var(--tb2-primary);
    transition: var(--tb2-transition);
}

a:hover {
    color: var(--tb2-secondary);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--tb2-font-main);
    font-weight: 700;
    color: var(--tb2-dark);
}

/* Code elements - use Calibri */
code, .version-badge, .message-code,
[class*="version"], [class*="code-"] {
    font-family: var(--tb2-font-code);
    font-weight: 600;
}

/* ==========================================================================
   DEFAULT HTML ELEMENTS — Telebib2 Styling
   (éléments sans classes spécifiques)
   ========================================================================== */

/* ── Headings — tailles et marges ──────────────────────────────────────────── */
h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 1.5rem;
}

h2 {
    font-size: 1.875rem;
    line-height: 1.25;
    margin: 2.5rem 0 1rem;
    color: var(--tb2-primary);
}

h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 2rem 0 0.75rem;
    color: var(--tb2-primary);
}

h4 {
    font-size: 1.2rem;
    line-height: 1.35;
    margin: 1.5rem 0 0.5rem;
}

h5 {
    font-size: 1rem;
    line-height: 1.4;
    margin: 1.25rem 0 0.4rem;
}

h6 {
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 1rem 0 0.4rem;
    color: var(--tb2-grey);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Paragraphes ─────────────────────────────────────────────────────────── */
p {
    margin: 0 0 1.25rem;
    line-height: 1.8;
}

/* ── Texte en valeur ─────────────────────────────────────────────────────── */
strong, b {
    font-weight: 700;
    color: var(--tb2-dark);
}

.container-bottom-a strong, .container-bottom-a b {
    font-weight: 700;
    color: inherit;
}

mark {
    background-color: rgba(0, 180, 216, 0.18);
    color: var(--tb2-primary-darker);
    padding: 0.1em 0.4em;
    border-radius: var(--tb2-radius-sm);
}

abbr[title] {
    text-decoration: underline dotted var(--tb2-grey);
    cursor: help;
}

/* ── Blockquote ──────────────────────────────────────────────────────────── */
blockquote {
    border-left: 4px solid var(--tb2-primary);
    margin: 1.75rem 0;
    padding: 1rem 1.5rem;
    background: var(--tb2-light-grey);
    border-radius: 0 var(--tb2-radius) var(--tb2-radius) 0;
    color: var(--tb2-grey);
    font-size: 1.05rem;
    font-style: italic;
}

blockquote cite,
blockquote footer {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-style: normal;
    color: var(--tb2-primary);
    font-weight: 600;
}

/* ── Séparateur ──────────────────────────────────────────────────────────── */
hr {
    border: none;
    border-top: 2px solid var(--tb2-light-grey);
    margin: 2.5rem 0;
}

/* ── Listes ──────────────────────────────────────────────────────────────── */
ul, ol {
    padding-left: 1.75rem;
    margin: 0 0 1.25rem;
    margin-left: 1rem;
}

ul ul, ol ol, ul ol, ol ul {
    margin-bottom: 0;
    margin-top: 0.25rem;
}

li {
    margin-bottom: 0.4rem;
    line-height: 1.75;
}

ul li::marker {
    color: var(--tb2-primary);
}

ol li::marker {
    color: var(--tb2-primary);
    font-weight: 700;
}

/* Listes de définitions */
dl {
    margin: 0 0 1.25rem;
}

dt {
    font-weight: 700;
    color: var(--tb2-dark);
    margin-top: 0.75rem;
}

dd {
    padding-left: 1.5rem;
    color: var(--tb2-grey);
    margin-bottom: 0.25rem;
}

/* ── Code & Pre ──────────────────────────────────────────────────────────── */
code {
    font-family: var(--tb2-font-code);
    font-weight: 600;
    font-size: 0.9em;
    background: var(--tb2-light-grey);
    color: var(--tb2-primary-darker);
    padding: 0.15em 0.45em;
    border-radius: var(--tb2-radius-sm);
}

pre {
    background: var(--tb2-dark);
    color: #e2e8f0;
    font-family: var(--tb2-font-code);
    font-size: 0.9rem;
    line-height: 1.7;
    padding: 1.5rem;
    border-radius: var(--tb2-radius);
    overflow-x: auto;
    margin: 0 0 1.5rem;
    box-shadow: var(--tb2-shadow-sm);
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

kbd {
    font-family: var(--tb2-font-code);
    font-size: 0.85em;
    background: var(--tb2-dark);
    color: var(--tb2-white);
    padding: 0.15em 0.5em;
    border-radius: var(--tb2-radius-sm);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

/* ── Images ──────────────────────────────────────────────────────────────── */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--tb2-radius);
}

/* Logo dans le header : pas de border-radius hérité de img */
.tb2-brand-logo img {
    border-radius: 0;
}

figure {
    margin: 1.5rem 0;
    text-align: center;
}

figcaption {
    font-size: 0.875rem;
    color: var(--tb2-grey);
    margin-top: 0.5rem;
    font-style: italic;
}

/* ── Légende tableau ─────────────────────────────────────────────────────── */
caption {
    caption-side: top;
    font-size: 0.9rem;
    color: var(--tb2-grey);
    font-style: italic;
    margin-bottom: 0.5rem;
    text-align: left;
}

/* ── Boutons natifs (sans classe) ────────────────────────────────────────── */
button,
input[type="submit"],
input[type="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--tb2-font-main);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--tb2-radius);
    border: none;
    cursor: pointer;
    transition: var(--tb2-transition);
    background: var(--tb2-accent);
    color: var(--tb2-white);
    line-height: 1;
    text-decoration: none;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: #e5732e;
    transform: translateY(-2px);
    color: var(--tb2-white);
}

button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

input[type="reset"] {
    display: inline-flex;
    align-items: center;
    font-family: var(--tb2-font-main);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--tb2-radius);
    border: 1.5px solid var(--tb2-light-grey);
    cursor: pointer;
    transition: var(--tb2-transition);
    background: transparent;
    color: var(--tb2-grey);
    line-height: 1;
}

input[type="reset"]:hover {
    background: var(--tb2-light-grey);
    color: var(--tb2-dark);
    border-color: var(--tb2-grey);
}

/* ── Labels & Fieldset ───────────────────────────────────────────────────── */
label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--tb2-dark);
    margin-bottom: 0.4rem;
}

fieldset {
    border: 2px solid var(--tb2-light-grey);
    border-radius: var(--tb2-radius);
    padding: 1.25rem 1.5rem;
    margin: 0 0 1.5rem;
}

legend {
    font-weight: 700;
    color: var(--tb2-primary);
    padding: 0 0.5rem;
    font-size: 1rem;
}

/* ── Details / Summary (accordéon natif) ─────────────────────────────────── */
details {
    border: 1.5px solid var(--tb2-light-grey);
    border-radius: var(--tb2-radius);
    margin: 0 0 1rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

details[open] {
    border-color: var(--tb2-primary);
}

summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--tb2-dark);
    cursor: pointer;
    list-style: none;
    background: var(--tb2-light-grey);
    transition: background 0.2s ease, color 0.2s ease;
    user-select: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
    content: '▼';
    font-size: 0.7rem;
    color: var(--tb2-primary);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

details[open] > summary {
    background: var(--tb2-primary);
    color: var(--tb2-white);
}

details[open] > summary::after {
    transform: rotate(180deg);
    color: var(--tb2-white);
}

details > :not(summary) {
    padding: 1rem 1.25rem;
}

/* ── Sélection de texte ──────────────────────────────────────────────────── */
::selection {
    background: rgba(0, 71, 171, 0.18);
    color: var(--tb2-primary-darker);
}

/* ==========================================================================
   HEADER STYLES
   ========================================================================== */

.container-header,
header.header {
    background: var(--tb2-white);
    box-shadow: var(--tb2-shadow-sm);
}

/* Subheader / Topbar */
.container-topbar {
    background: var(--tb2-light-grey);
    border-bottom: 1px solid #E5E7EB;
    padding: 0.5rem 0;
}

/* Logo */
.navbar-brand,
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand .logo {
    max-height: 50px;
}

/* CTA Button générique (utilisé hors nav) */
.cta-button {
    background: var(--tb2-accent);
    color: var(--tb2-white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: var(--tb2-radius);
    font-weight: 600;
    transition: var(--tb2-transition);
}

.cta-button:hover {
    background: var(--tb2-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 71, 171, 0.2);
}

/* ==========================================================================
   ARTICLE PAGE - BLUE TITLE BANNER
   ========================================================================== */

/* Blue banner for article title */
.com-content-article .page-header,
.item-page .page-header {
    background-image: linear-gradient(135deg, rgb(0, 71, 171) 0%, rgb(0, 53, 128) 50%, rgb(0, 31, 77) 100%) !important;
    color: var(--tb2-white);
    padding: 2rem;
    margin: 0 -1rem 2rem ; /* Extend beyond container */
    border-radius: 0;
}

.mod-breadcrumbs li, .mod-breadcrumbs li span {
    margin-bottom: 0;
}

.com-content-article.item-page {
    padding: 0 0 4rem;
}

/* ==========================================================================
   FULLBLEED — articles SP Page Builder qui gerent leur propre header/footer.
   Activation au choix :
     - Menu item > Page Display > Page Class = "tb2-fullbleed"  (sur <body>)
     - Article > Options > Page Class = " tb2-fullbleed"        (sur .item-page,
       laisser l'espace avant car Joomla concatene sans separateur)
   Effet : masque le bandeau bleu (.page-header) ET supprime le padding bas.
   ========================================================================== */
body.tb2-fullbleed:has(#sp-page-builder) .page-header,
body.tb2-fullbleed:has(#sp-page-builder) .com-content-article .page-header,
.item-page.tb2-fullbleed > .page-header,
.item-page.tb2-fullbleed > .com-content-article > .page-header,
.com-content-article.item-page.tb2-fullbleed .page-header {
    display: none !important;
}

body.tb2-fullbleed:has(#sp-page-builder) .com-content-article.item-page,
body.tb2-fullbleed:has(#sp-page-builder) .item-page,
.item-page.tb2-fullbleed,
.com-content-article.item-page.tb2-fullbleed {
    padding: 0 !important;
}

/* Neutralise la marge negative du banner et evite tout decalage residuel */
body.tb2-fullbleed:has(#sp-page-builder) .com-content-article__body,
.item-page.tb2-fullbleed .com-content-article__body {
    margin: 0 !important;
}

/* Full width banner */
.site-grid .container-component .com-content-article .page-header {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50% + 1rem);
    padding-right: calc(50vw - 50% + 1rem);
}

.com-content-article .page-header h1,
.item-page .page-header h1 {
    color: var(--tb2-white);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* Hide article metadata (author, date, category, hits) */
.com-content-article .article-info,
.item-page .article-info,
.com-content-article .icons,
.item-page .icons,
.article-info-term,
.createdby,
.category-name,
.published,
.hits,
.modified {
    display: none !important;
}

/* Article body styling */
.com-content-article__body,
.item-page .item-content {
    font-size: 1rem;
    line-height: 1.8;
}

.com-content-article__body h2,
.com-content-article__body h3 {
    color: var(--tb2-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.com-content-article__body ul,
.com-content-article__body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.com-content-article__body li {
    margin-bottom: 0.5rem;
}

/* Prose elements: narrower width for readability (simple articles) */
.tb2-article-body > p,
.tb2-article-body > h2,
.tb2-article-body > h3,
.tb2-article-body > h4,
.tb2-article-body > h5,
.tb2-article-body > h6,
.tb2-article-body > ul,
.tb2-article-body > ol,
.tb2-article-body > blockquote {
    max-width: 992px;
}

/* Hide article navigation */
.com-content-article .pagenavigation {
    display: none;
}

/* ==========================================================================
   BREADCRUMBS — mod_breadcrumbs override
   Style identique au .tb2-breadcrumb des headers d'articles
   ========================================================================== */

/* Masquer le titre du module breadcrumb */
.breadcrumbs h3,
.mod-breadcrumbs__wrapper h3 {
    display: none;
}

/* ── Icône de lieu (icon-location) et texte "Vous êtes ici" — cachés ──────── */
.mod-breadcrumbs__divider,
.mod-breadcrumbs__here,
.icon-location,
.icon-home {
    display: none !important;
}

/* ── Conteneur nav ────────────────────────────────────────────────────────── */
.mod-breadcrumbs__wrapper {
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

/* ── Liste ol ─────────────────────────────────────────────────────────────── */
.mod-breadcrumbs {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    list-style: none !important;
    opacity: 0.85;
}

/* ── Items ────────────────────────────────────────────────────────────────── */
.mod-breadcrumbs__item,
.mod-breadcrumbs .breadcrumb-item {
    display: flex;
    align-items: center;
    padding: 0 !important;
}

/* ── Liens ────────────────────────────────────────────────────────────────── */
.mod-breadcrumbs__item a,
.mod-breadcrumbs .breadcrumb-item a,
.mod-breadcrumbs__item .pathway {
    color: var(--tb2-white);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.mod-breadcrumbs__item a:hover,
.mod-breadcrumbs .breadcrumb-item a:hover,
.mod-breadcrumbs__item .pathway:hover {
    color: var(--tb2-white);
    text-decoration: underline;
    opacity: 1;
}

/* ── Item actif (page courante) ───────────────────────────────────────────── */
.mod-breadcrumbs__item.active span,
.mod-breadcrumbs .breadcrumb-item.active span {
    color: var(--tb2-white);
    opacity: 0.75;
}

/* ── Séparateur "/" entre items ───────────────────────────────────────────── */
.mod-breadcrumbs__item + .mod-breadcrumbs__item::before,
.mod-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    margin-right: 0.35rem;
    color: var(--tb2-white);
    opacity: 0.6;
    font-size: 0.8rem;
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

/* Footer main area — voir section "Footer colonnes (bottom-a)" plus bas */
.container-bottom-b {
    background: var(--tb2-dark);
    color: var(--tb2-white);
    padding: 3rem 0;
}
.container-footer .no-card{display:none!important}

.container-bottom-b .card {
    background: transparent;
    border: none;
    box-shadow: none;
}

.container-bottom-b .card-body {
    padding: 0;
}

.container-bottom-b h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--tb2-secondary);
    font-weight: 600;
}

/* Footer contact info */
.footer-contact h4 {
    color: var(--tb2-secondary);
    margin-bottom: 1rem;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-contact a {
    color: var(--tb2-secondary);
}

/* Subfooter (footer position) */
.container-footer,
footer.footer {
    background: var(--tb2-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.container-footer .grid-child {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Hide login form in footer */
.container-footer .mod-login-logout,
.container-footer .login-greeting,
.container-footer form[id^="login-form"] {
    display: none !important;
}

/* Bouton "passkey" WebAuthn : contraindre la taille du SVG (sinon énorme) */
.plg_system_webauthn_login_button svg {
    width: 30px !important;
    height: auto !important;
    margin: 4px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn-primary,
.btn.btn-primary {
    background: var(--tb2-accent);
    border-color: var(--tb2-accent);
    color: var(--tb2-white);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--tb2-radius);
    transition: var(--tb2-transition);
}

.btn-primary:hover,
.btn.btn-primary:hover {
    background: #FF6B35;
    border-color: #FF6B35;
    transform: translateY(-2px);
}

.btn-secondary,
.btn.btn-secondary {
    background: transparent;
    border: 2px solid var(--tb2-primary);
    color: var(--tb2-primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--tb2-radius);
    transition: var(--tb2-transition);
}

.btn-secondary:hover,
.btn.btn-secondary:hover {
    background: var(--tb2-primary);
    color: var(--tb2-white);
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: var(--tb2-white);
    border-radius: var(--tb2-radius-lg);
    border: 1px solid #E5E7EB;
    box-shadow: none;
    transition: border-color 0.3s ease;
}

.card:hover {
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--tb2-dark);
    color: var(--tb2-white);
}

th {
    text-align: left;
    padding: 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr {
    border-bottom: 1px solid var(--tb2-light-grey);
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #F8FAFF;
}

td {
    padding: 1.25rem;
}

/* ── Tableaux SANS classe dans le contenu d'article (éditeur TinyMCE) ─────────
   L'éditeur Joomla n'ajoute aucune classe : on style directement les <table>
   du corps d'article pour leur donner le même look que .table (header lavande,
   coins arrondis, hover doux). Exclut .table pour ne pas dupliquer le style. */
.com-content-article__body table:not([class]),
.com-content-article__body table:not(.table):not(.sppb-addon-table-main),
.item-page .item-content table:not([class]),
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) {
    width: 100%;
    margin: 1.5rem 0 2rem;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #D5DAE3;
    border-radius: 14px;
    overflow: hidden;
    font-family: var(--tb2-font-main);
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--tb2-dark);
    background: #fff;
}

/* En-tête : <thead> ou cellules <th> (première ligne / première colonne) */
.com-content-article__body table:not(.table):not(.sppb-addon-table-main) thead th,
.com-content-article__body table:not(.table):not(.sppb-addon-table-main) thead td,
.com-content-article__body table:not(.table):not(.sppb-addon-table-main) > tbody > tr:first-child th,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) thead th,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) thead td,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) > tbody > tr:first-child th {
    background: #EEF2FF;
    color: #4B5563;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid #DDE4F3;
}

/* Cellules du corps */
.com-content-article__body table:not(.table):not(.sppb-addon-table-main) td,
.com-content-article__body table:not(.table):not(.sppb-addon-table-main) th,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) td,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) th {
    padding: 0.85rem 1.1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #E1E5EC;
}

/* Zébrage léger : les lignes paires se détachent du fond blanc */
.com-content-article__body table:not(.table):not(.sppb-addon-table-main) tbody tr:nth-child(even),
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) tbody tr:nth-child(even) {
    background: #FAFBFD;
}

.com-content-article__body table:not(.table):not(.sppb-addon-table-main) tbody tr:last-child td,
.com-content-article__body table:not(.table):not(.sppb-addon-table-main) tbody tr:last-child th,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) tbody tr:last-child td,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) tbody tr:last-child th {
    border-bottom: none;
}

.com-content-article__body table:not(.table):not(.sppb-addon-table-main) tbody tr:hover,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) tbody tr:hover {
    background: #EEF2FF;
}

/* Cellule d'en-tête de ligne (première colonne) : garde le fond lavande léger */
.com-content-article__body table:not(.table):not(.sppb-addon-table-main) tbody th,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) tbody th {
    background: #F7F9FC;
    font-weight: 600;
    text-transform: none;
    font-size: 0.9rem;
    letter-spacing: 0;
    color: var(--tb2-dark);
}

/* Liens dans les cellules */
.com-content-article__body table:not(.table):not(.sppb-addon-table-main) a,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) a {
    color: var(--tb2-primary);
    text-decoration: none;
    font-weight: 600;
}

.com-content-article__body table:not(.table):not(.sppb-addon-table-main) a:hover,
.item-page .item-content table:not(.table):not(.sppb-addon-table-main) a:hover {
    color: var(--tb2-secondary);
    text-decoration: underline;
}

/* Scroll horizontal sur mobile pour éviter le débordement */
@media (max-width: 640px) {
    .com-content-article__body table:not(.table):not(.sppb-addon-table-main),
    .item-page .item-content table:not(.table):not(.sppb-addon-table-main) {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}




/* Version badges */
.version-badge {
    font-family: var(--tb2-font-code);
    background: var(--tb2-light-grey);
    padding: 0.25rem 0.75rem;
    border-radius: var(--tb2-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tb2-dark);
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-release {
    background: var(--tb2-success-bg);
    color: #166534;
}

.status-adaptation {
    background: var(--tb2-info-bg);
    color: var(--tb2-info);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea,
select {
    border: 2px solid var(--tb2-light-grey);
    border-radius: var(--tb2-radius);
    padding: 0.75rem 1rem;
    font-family: var(--tb2-font-main);
    transition: var(--tb2-transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--tb2-primary);
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

/* ==========================================================================
   SP PAGE BUILDER INTEGRATION
   ========================================================================== */

/* Ensure SPPB pages get proper styling */
.com-sppagebuilder .sp-page-builder {
    max-width: 100%;
}

/* Containers internes SP Page Builder — suivent --tb2-container */
.sppb-container,
.sppb-container-inner {
    max-width: var(--tb2-container) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Override .sppb-row-container — remplace les breakpoints Bootstrap SPB par --tb2-container */
.sppb-row-container {
    max-width: var(--tb2-container) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Breakpoint XL : tout .container interne aux pages SPPB suit --tb2-container sur grands écrans.
   Compense Bootstrap .container (plafonné à 1320px en BS5) pour s'aligner sur header/footer. */
@media (min-width: 1440px) {
    .com-sppagebuilder .container,
    .sp-page-builder .container {
        max-width: var(--tb2-container) !important;
    }
}


.tb2-article-header .sppb-row-column .mod-breadcrumbs__wrapper {
    margin-bottom: 0 !important;
    height: 24px;
    line-height: 1;
}

    /* Boutons SPPB */
.sppb-btn-primary {
    background: var(--tb2-accent);
    border-color: var(--tb2-accent);
    color: var(--tb2-white);
    font-weight: 600;
    border-radius: var(--tb2-radius);
    transition: var(--tb2-transition);
}

.sppb-btn-primary:hover {
    background: #e5732e;
    border-color: #e5732e;
    color: var(--tb2-white);
    transform: translateY(-2px);
}

.sppb-btn-secondary {
    background: transparent;
    border: 2px solid var(--tb2-primary);
    color: var(--tb2-primary);
    font-weight: 600;
    border-radius: var(--tb2-radius);
    transition: var(--tb2-transition);
}

.sppb-btn-secondary:hover {
    background: var(--tb2-primary);
    color: var(--tb2-white);
}

/* Titres de sections SPPB */
.sppb-addon-title {
    font-family: var(--tb2-font-main);
    font-weight: 700;
    color: var(--tb2-dark);
}

/* Cartes SPPB */
.sppb-card {
    border-radius: var(--tb2-radius-lg);
    border: 1px solid #E5E7EB;
    box-shadow: none;
    transition: var(--tb2-transition);
}

.sppb-card:hover {
    box-shadow: none;
}

/* Badges status SPPB (homepage tableau releases) */
.sppb-addon .badge-release {
    background: var(--tb2-success-bg);
    color: #166534;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.sppb-addon .badge-all {
    background: var(--tb2-info-bg);
    color: var(--tb2-info);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.sppb-addon .badge-version {
    background: var(--tb2-light-grey);
    color: var(--tb2-dark);
    border-radius: var(--tb2-radius-sm);
    padding: 3px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--tb2-font-code);
}

/* ==========================================================================
   SECTION HEADER — En-tête unifié (modules releases, lastpublications, etc.)
   ========================================================================== */

.tb2-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tb2-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--tb2-dark);
    margin: 0;
}

.tb2-section-viewall {
    color: var(--tb2-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--tb2-transition);
}

.tb2-section-viewall:hover {
    color: var(--tb2-secondary);
}

/* Grille responsive de cartes — toujours 3 colonnes, 1 carte = 1/3 de largeur */
.tb2-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

/* Carte individuelle */
.tb2-news-card {
    background: var(--tb2-white);
    border-radius: var(--tb2-radius-lg);
    overflow: hidden;
    border: 1px solid #E5E7EB;
    box-shadow: none;
    position: relative;
    transition: var(--tb2-transition);
    text-decoration: none;
    color: inherit;
}

.tb2-news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--tb2-primary);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.35s ease;
}

.tb2-news-card:hover::before {
    transform: scaleX(1);
}

.tb2-news-card *,
.tb2-news-card *:hover {
    text-decoration: none;
    color: inherit;
}

.tb2-news-card:hover {
    box-shadow: none;
}

a.tb2-news-card:hover,
a.tb2-news-card:hover * {
    color: inherit;
}

/* Bannière année (gradient bleu) */
.tb2-news-card__year {
    height: 160px;
    background: linear-gradient(135deg, var(--tb2-primary) 0%, var(--tb2-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tb2-white);
    font-size: 2.5rem;
    font-weight: 700;
}

/* Corps de la carte */
.tb2-news-card__body {
    padding: 1.75rem;
}

/* Tags (pills) au-dessus du titre */
.tb2-news-card__tags,
.com-content-article__body .tb2-news-card__tags {
    list-style: none;
    margin: 0 0 0.75rem 0;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tb2-news-card__tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: #E5E7EB;
    color: var(--tb2-dark);
}

.tb2-news-card__tag--blue   { background: #DBEAFE; color: #0047AB; }
.tb2-news-card__tag--cyan   { background: #CFFAFE; color: #0E7490; }
.tb2-news-card__tag--orange { background: #FFE4D1; color: #C2410C; }
.tb2-news-card__tag--green  { background: #DCFCE7; color: #15803D; }
.tb2-news-card__tag--purple { background: #EDE9FE; color: #6D28D9; }

.tb2-news-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--tb2-dark);
}

.tb2-news-card__title a {
    color: inherit;
    text-decoration: none;
    transition: var(--tb2-transition);
}

.tb2-news-card__title a:hover {
    color: var(--tb2-primary);
}

.tb2-news-card__intro {
    color: var(--tb2-grey);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.95rem;
}


/* Responsive */
@media (max-width: 991px) {
    .tb2-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tb2-section-title {
        font-size: 1.5rem;
    }

    .tb2-news-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

/* Hide Joomla edit buttons for logged users in frontend */
.jmodedit {
    display: none !important;
}

.container-topbar [role="tooltip"] {
    display: none !important;
}

/* Container max-width — suit --tb2-container pour cohérence avec le reste du layout */
.container {
    max-width: var(--tb2-container);
    margin: 0 auto;
    padding: 0 var(--tb2-padding);
}
.site-grid > .container-component, .site-grid > .grid-child.container-component {
    max-width: var(--tb2-container) !important;
    margin: 0 auto !important;
    padding: 0!important;
    min-height: 60vh;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 992px) {
    .com-content-article .page-header h1,
    .item-page .page-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Article header */
    .com-content-article .page-header {
        padding: 1.5rem 1rem;
    }

    .com-content-article .page-header h1 {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   HEADER TELEBIB2 — Override du header Cassiopeia
   Structure : .tb2-topbar + .tb2-header-main (.tb2-brand + .tb2-nav)
   ========================================================================== */

/* ── Conteneur principal du header ─────────────────────────────────────────── */
.tb2-header {
    background-color: var(--headerbg, #ffffff);
    box-shadow: 0 2px 12px rgba(0, 71, 171, 0.08);
    padding: 0;
}

/* ── TOPBAR : barre utilitaire foncée ───────────────────────────────────────── */
.tb2-topbar {
    background-color: var(--tb2-dark);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8125rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Transition pour le masquage au scroll */
    overflow: hidden;
    max-height: 80px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
}

.tb2-topbar--hidden {
    max-height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tb2-topbar-inner {
    max-width: var(--tb2-container);
    margin: 0 auto;
    padding: 0.35rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.tb2-topbar a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.tb2-topbar a:hover {
    color: var(--tb2-secondary);
}

/* Module langue dans la topbar */
.tb2-topbar .mod-languages {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tb2-topbar .mod-languages ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
}

.tb2-topbar .mod-languages li {
    margin: 0;
}

.tb2-topbar .mod-languages img {
    width: 18px;
    height: auto;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 4px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.tb2-topbar .mod-languages a:hover img {
    opacity: 1;
}

/* ── HEADER PRINCIPAL ───────────────────────────────────────────────────────── */
.tb2-header-main {
    background-color: var(--headerbg, #ffffff);
}

.tb2-header-inner {
    max-width: var(--tb2-container);
    margin: 0 auto;
    padding: 0.75rem  var(--tb2-padding);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
}

/* Nav poussé à droite, logo reste à gauche */
.tb2-header-inner .tb2-nav {
    margin-left: auto;
}

/* ── BRAND : logo + tagline ─────────────────────────────────────────────────── */
.tb2-brand {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.tb2-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.tb2-brand-logo img {
    height: 75px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

/* Logo textuel (si pas d'image) */
.tb2-brand-logo span {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tb2-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.tb2-site-title {
    font-family: var(--tb2-font-main);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tb2-dark);
    letter-spacing: -0.01em;
    white-space: nowrap;
    line-height: 1;
    text-decoration: none;
}

.tb2-site-description {
    font-size: 0.75rem;
    color: var(--tb2-grey);
    letter-spacing: 0.03em;
    margin: 0;
    line-height: 1.3;
}

/* ── NAVIGATION ─────────────────────────────────────────────────────────────── */
.tb2-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
}

/* Menu MetisMenu / Cassiopeia dans le header Telebib2 */
.tb2-nav .mod-menu,
.tb2-nav .nav-pills {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tb2-nav .mod-menu > ul {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tb2-nav .mod-menu > ul > li > a,
.tb2-nav .mod-menu > ul > li > span {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--headercolor, var(--tb2-dark));
    text-decoration: none;
    border-radius: var(--tb2-radius-sm);
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
    position: relative;
}

/* Ligne de soulignement animée au hover */
.tb2-nav .mod-menu > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0.9rem;
    right: 0.9rem;
    height: 2px;
    background-color: var(--tb2-primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
    border-radius: 2px;
}

.tb2-nav .mod-menu > ul > li > a:hover,
.tb2-nav .mod-menu > ul > li > a:focus {
    color: var(--tb2-primary);
    background-color: rgba(0, 71, 171, 0.06);
}

.tb2-nav .mod-menu > ul > li > a:hover::after {
    transform: scaleX(1);
}

/* Élément actif / courant */
.tb2-nav .mod-menu > ul > li.active > a,
.tb2-nav .mod-menu > ul > li.current > a {
    color: var(--tb2-primary);
    font-weight: 700;
}

.tb2-nav .mod-menu > ul > li.active > a::after,
.tb2-nav .mod-menu > ul > li.current > a::after {
    transform: scaleX(1);
    background-color: var(--tb2-accent);
}

/* Sous-menus déroulants */
.tb2-nav .mod-menu ul ul {
    background-color: #fff;
    border: 1px solid rgba(0, 71, 171, 0.12);
    border-top: 3px solid var(--tb2-primary);
    border-radius: 0 0 var(--tb2-radius) var(--tb2-radius);
    box-shadow: var(--tb2-shadow-lg);
    min-width: 220px;
    padding: 0.5rem 0;
}

.tb2-nav .mod-menu ul ul li a {
    padding: 0.55rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tb2-dark);
    display: block;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.tb2-nav .mod-menu ul ul li a:hover {
    color: var(--tb2-primary);
    padding-left: 1.6rem;
    background-color: var(--tb2-light-grey);
}

/* ── RECHERCHE dans le header ───────────────────────────────────────────────── */
.tb2-search {
    display: flex;
    align-items: center;
}

.tb2-search .search-query {
    border: 1.5px solid rgba(0, 71, 171, 0.2);
    border-radius: var(--tb2-radius) 0 0 var(--tb2-radius);
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
    background: var(--tb2-light-grey);
    color: var(--tb2-dark);
    min-width: 180px;
}

.tb2-search .search-query:focus {
    border-color: var(--tb2-primary);
    background: #fff;
}

.tb2-search .btn {
    border-radius: 0 var(--tb2-radius) var(--tb2-radius) 0;
    background-color: var(--tb2-primary);
    border-color: var(--tb2-primary);
    color: #fff;
    padding: 0.45rem 0.8rem;
    transition: background-color 0.2s ease;
}

.tb2-search .btn:hover {
    background-color: var(--tb2-primary-dark);
    border-color: var(--tb2-primary-dark);
}

/* ── DRAWER NAV : wrapper transparent sur desktop ───────────────────────────── */
.tb2-drawer-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
}


/* ── BURGER BUTTON ───────────────────────────────────────────────────────────── */
.tb2-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 8px;
    transition: background .2s;
}

.tb2-nav-toggle:hover { background: var(--tb2-light-grey); }

.tb2-nav-toggle span {
    display: block;
    height: 2px;
    background-color: var(--tb2-primary);
    border-radius: 2px;
    transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .25s, width .25s;
    transform-origin: center;
}

.tb2-nav-toggle span:nth-child(1) { width: 22px; }
.tb2-nav-toggle span:nth-child(2) { width: 16px; }
.tb2-nav-toggle span:nth-child(3) { width: 22px; }

.tb2-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 22px; }
.tb2-nav-toggle.open span:nth-child(2) { opacity: 0; }
.tb2-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 22px; }

/* ── OVERLAY ─────────────────────────────────────────────────────────────────── */
.tb2-overlay {
    display: none;
    position: fixed;
    top: var(--tb2-header-offset, 100px);
    left: 0; right: 0; bottom: 0;
    background: rgba(26, 29, 41, .35);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s;
}

.tb2-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ── RESPONSIVE MOBILE ───────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {

    .tb2-header-inner {
        padding: 0.6rem 1rem;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0;
    }

    .tb2-brand { flex: 1 1 auto; }
    .tb2-brand-logo img { height: 40px; }

    /* Afficher burger + overlay */
    .tb2-nav-toggle { display: flex; }
    .tb2-overlay { display: block; }

    /* Drawer latéral depuis la droite */
    .tb2-nav {
        position: fixed;
        top: var(--tb2-header-offset, 100px);
        right: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        background: white;
        z-index: 99;
        transform: translateX(110%);
        transition: transform .35s cubic-bezier(.4,0,.2,1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: -4px 0 20px rgba(0,0,0,.1);
        flex: none;
        gap: 0;
        justify-content: flex-start;
        align-items: stretch;
    }

    .tb2-nav.open { transform: translateX(0); }

    /* Barre gradient en haut du drawer */
    .tb2-nav::before {
        content: '';
        display: block;
        height: 4px;
        background: linear-gradient(90deg, var(--tb2-primary), var(--tb2-secondary));
        flex-shrink: 0;
    }

    /* Zone scrollable — flex column pour que margin-top:auto fonctionne */
    .tb2-drawer-nav {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    /* Reset mod-menu en colonne pleine largeur */
    .tb2-nav .mod-menu,
    .tb2-nav .nav-pills {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
    }

    /* Items du menu */
    .tb2-nav .mod-menu > ul {
        flex: 1;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
        gap: 0;
    }

    /* Items : styles visuels sur le li */
    .tb2-nav .mod-menu > ul > li {
        position: relative;
        list-style: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1.5rem;
        border-bottom: 1px solid #F0F0F0;
        transition: background .15s;
    }

    /* Chevron sur le li */
    .tb2-nav .mod-menu > ul > li::after {
        content: '›';
        font-size: 1.4rem;
        font-weight: 300;
        color: var(--tb2-grey);
        line-height: 1;
        flex-shrink: 0;
    }

    /* Le a occupe tout l'espace cliquable */
    .tb2-nav .mod-menu > ul > li > a,
    .tb2-nav .mod-menu > ul > li > span {
        flex: 1;
        display: block;
        padding: 1.25rem 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--tb2-dark);
        text-decoration: none;
        background: none;
        border-radius: 0;
        white-space: normal;
        border-bottom: none;
    }

    /* Reset des pseudo-éléments desktop sur le a */
    .tb2-nav .mod-menu > ul > li > a::after,
    .tb2-nav .mod-menu > ul > li > a::before {
        display: none !important;
    }

    .tb2-nav .mod-menu > ul > li:hover {
        background: var(--tb2-light-grey);
    }

    .tb2-nav .mod-menu > ul > li:hover > a {
        color: var(--tb2-primary);
    }

    /* Élément actif : barre bleue à gauche */
    .tb2-nav .mod-menu > ul > li.active,
    .tb2-nav .mod-menu > ul > li.current {
        border-left: 4px solid var(--tb2-primary);
        padding-left: calc(1.5rem - 4px);
    }

    .tb2-nav .mod-menu > ul > li.active > a,
    .tb2-nav .mod-menu > ul > li.current > a {
        color: var(--tb2-primary);
    }

    /* Cacher les sous-menus dans le drawer */
    .tb2-nav .mod-menu ul ul { display: none; }

    /* Recherche dans le drawer */
    .tb2-search {
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid #F0F0F0;
    }

    .tb2-search .search-query {
        min-width: 0;
        flex: 1;
        border-radius: var(--tb2-radius) 0 0 var(--tb2-radius);
    }

    /* CTA : dernier li extrait du scroll et collé en bas (via JS → .tb2-drawer-bottom) */
    .tb2-drawer-bottom {
        flex-shrink: 0;
        padding: 1.25rem 1.5rem;
        border-top: 2px solid var(--tb2-light-grey);
    }

    .tb2-drawer-bottom li {
        list-style: none;
        display: block;
        border: none !important;
        padding: 0 !important;
        margin: 0;
    }

    .tb2-drawer-bottom li::after { display: none; }

    .tb2-drawer-bottom li > a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.85rem 1.25rem !important;
        background: var(--tb2-accent);
        color: white !important;
        font-size: 0.95rem;
        font-weight: 700;
        border-radius: 8px;
        text-decoration: none !important;
        transition: background .2s, transform .15s;
    }

    .tb2-drawer-bottom li > a:hover {
        background: #e8722e;
        color: white !important;
        transform: translateY(-1px);
    }

    .tb2-drawer-bottom li > a:active { transform: translateY(0); }
}

@media (max-width: 575.98px) {

    /* Topbar : search limité pour que les langues tiennent à côté */
    .tb2-topbar-inner {
        padding: 0.3rem 0.75rem;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .tb2-topbar .tb2-search,
    .tb2-topbar .mod-search,
    .tb2-topbar .mod-search-simple {
        flex: 1;
        min-width: 0;
        max-width: 170px;
    }

    .tb2-topbar .search-query,
    .tb2-topbar input[type="search"],
    .tb2-topbar input[type="text"] {
        width: 100%;
        min-width: 0;
        font-size: 0.78rem;
        padding: 0.3rem 0.5rem;
    }

    /* Header : logo bien à gauche */
    .tb2-header-inner {
        padding: 0.5rem 0.75rem;
        justify-content: flex-start;
        gap: 0;
    }

    .tb2-brand { flex: 1; }

    .tb2-nav-toggle { margin-left: auto; }

    .tb2-brand-logo img { height: 34px; }

    .tb2-site-description { display: none; }
}

.tb2-footer-inner {
    max-width: var(--tb2-container);
    margin: 0 auto;
    padding: 0.35rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    header, footer,
    .container-topbar,
    .breadcrumbs,
    .pagenavigation {
        display: none !important;
    }

    .com-content-article .page-header {
        background: none !important;
        color: #000 !important;
        padding: 0 !important;
        margin: 0 0 1rem 0 !important;
    }

    .com-content-article .page-header h1 {
        color: #000 !important;
    }
}

/* ==========================================================================
   CUSTOM STYLES — (ex user.css v8)
   Logo réduit, siteTitle, breadcrumb dans hero
   ========================================================================== */

/* ── Variables supplémentaires ─────────────────────────────────────────────── */
:root {
    --tb2-container: 1440px;   /* Grand écran standard (1440px) */
    --tb2-padding: 2rem;
    --tb2-border: #E5E7EB;
}

/* Très grands écrans : container élargi progressivement */
@media (min-width: 1600px) {
    :root { --tb2-container: 1560px; }
}

/* ── Masquer tous les titres de modules ────────────────────────────────────── */
.container-header h3,
.container-header label,
.container-header .card-header,
.container-header .module-title,
.container-header .moduletable > h3,
.container-topbar h3,
.container-topbar label,
.container-topbar .card-header,
.container-topbar .module-title,
.mod-languages__header,
.mod-languages h3,
.mod-languages label,
.site-grid .breadcrumbs h3,
.breadcrumbs .mod-breadcrumbs__here {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ── Header principal ──────────────────────────────────────────────────────── */
header.container-header,
.container-header.full-width {
    background: var(--tb2-white) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

/* ── Topbar — Recherche + Langues ──────────────────────────────────────────── */
.container-topbar {
    background: var(--tb2-light-grey) !important;
    border-bottom: 1px solid var(--tb2-border) !important;
    padding: 0.5rem 0 !important;
}

.container-topbar.tb2-topbar--hidden {
    padding: 0 !important;
}

.visually-hidden { display: none !important; }

.container-topbar > *:first-child,
.container-topbar .topbar,
.container-topbar > .grid-child {
    max-width: var(--tb2-container) !important;
    margin: 0 auto !important;
    padding: 0 var(--tb2-padding) !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 2rem !important;
}

/* L'élément <search> généré par Joomla a display:grid en inline style — on le force en flex item */
/* Topbar : supprime le dropdown d'autosuggestion Awesomplete */
.tb2-topbar-inner .awesomplete > ul,
.container-topbar .awesomplete > ul {
    display: none !important;
}

.tb2-topbar-inner search {
    display: flex !important;
    flex: 0 1 70% !important;
    max-width: 70% !important;
    min-width: 0 !important;
}

.container-topbar .mod-finder {
    flex: 1 !important;
    max-width: none !important;
    width: 100% !important;
}

.container-topbar .mod-finder form {
    position: relative !important;
    margin: 0 !important;
    width: 100% !important;
}

.container-topbar .mod-finder input {
    width: 100% !important;
    padding: 0.6rem 1rem !important;
    border: 2px solid var(--tb2-white) !important;
    border-radius: 8px !important;
    background: var(--tb2-white) !important;
    font-size: 0.95rem !important;
    font-family: 'DM Sans', sans-serif !important;
}

.container-topbar .mod-finder input:focus {
    outline: none !important;
    border-color: var(--tb2-primary) !important;
}

.container-topbar .mod-finder {
    margin-right: 0.75rem !important;
}

.container-topbar .mod-languages {
    flex-shrink: 0 !important;
    padding-left: 0.75rem !important;
    border-left: 1px solid rgba(0, 0, 0, 0.12) !important;
}

.container-topbar .mod-languages ul {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.container-topbar .mod-languages li {
    margin: 0 !important;
}

.container-topbar .mod-languages li:not(:last-child)::after {
    content: '|' !important;
    margin-left: 0.5rem !important;
    color: var(--tb2-grey) !important;
}

.container-topbar .mod-languages a {
    text-decoration: none !important;
    color: var(--tb2-grey) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    padding: 0.4rem 0.75rem !important;
    border-radius: 4px !important;
}

.container-topbar .mod-languages a:hover {
    background: var(--tb2-white) !important;
    color: var(--tb2-primary) !important;
}

.container-topbar .mod-languages .lang-active a {
    background: var(--tb2-primary) !important;
    color: var(--tb2-white) !important;
}

/* ── Zone brand + menu ─────────────────────────────────────────────────────── */
header.container-header > .grid-child:not(.container-topbar):not(.container-nav) {
    max-width: var(--tb2-container) !important;
    margin: 0 auto !important;
    padding: 1rem var(--tb2-padding) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.navbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}

.navbar-brand .logo,
.navbar-brand > a,
.navbar-brand .brand-logo {
    display: flex !important;
    align-items: center !important;
}

.navbar-brand .logo img,
.navbar-brand > img,
.navbar-brand .brand-logo img,
.navbar-brand img {
    max-height: 75px !important;
    height: 75px !important;
    width: auto !important;
    display: block !important;
}

.navbar-brand .site-title {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--tb2-dark) !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    overflow: visible !important;
}

.navbar-brand .site-description {
    display: none !important;
}

header.container-header > .grid-child.container-nav {
    position: absolute !important;
    right: var(--tb2-padding) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 70% !important;
}

@media (min-width: 1200px) {
    header.container-header > .grid-child.container-nav {
        right: calc((100vw - var(--tb2-container)) / 2 + var(--tb2-padding)) !important;
    }
}

.container-nav ul.mod-menu {
    display: flex !important;
    list-style: none !important;
    gap: 2rem !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.container-nav .mod-menu li {
    margin: 0 !important;
}

.container-nav .mod-menu a {
    text-decoration: none !important;
    color: var(--tb2-grey) !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    padding: 0.5rem 0 !important;
    position: relative !important;
    white-space: nowrap !important;
}

.container-nav .mod-menu a::after {
    content: '' !important;
    position: absolute !important;
    bottom: -5px !important;
    left: 0 !important;
    width: 0 !important;
    height: 2px !important;
    background: var(--tb2-primary) !important;
    transition: width 0.3s ease !important;
}

.container-nav .mod-menu a:hover {
    color: var(--tb2-primary) !important;
}

.container-nav .mod-menu a:hover::after {
    width: 100% !important;
}

.container-nav .mod-menu .active > a,
.container-nav .mod-menu .current > a {
    color: var(--tb2-primary) !important;
    font-weight: 600 !important;
}

.container-nav .mod-menu .active > a::after,
.container-nav .mod-menu .current > a::after {
    width: 100% !important;
}

.container-nav .mod-menu .item-115 a,
.container-nav .mod-menu .item-121 a {
    background: var(--tb2-accent) !important;
    color: var(--tb2-white) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.container-nav .mod-menu .item-115 a::after,
.container-nav .mod-menu .item-121 a::after {
    display: none !important;
}

.container-nav .mod-menu .item-115 a:hover,
.container-nav .mod-menu .item-121 a:hover {
    background: var(--tb2-primary) !important;
}

/* ── Breadcrumb — caché ici, affiché dans hero ─────────────────────────────── */
.site-grid > .container-component > .breadcrumbs,
.site-grid .breadcrumbs:not(.tb2-breadcrumb) {
    display: none !important;
}

/* ── Hero banner avec breadcrumb intégré ───────────────────────────────────── */
.page-header.tb2-article-header {
    background-image: linear-gradient(135deg, rgb(0, 71, 171) 0%, rgb(0, 53, 128) 50%, rgb(0, 31, 77) 100%) !important;
    color: var(--tb2-white) !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
    margin-bottom: 2rem !important;
    padding: 0 !important;
}

.tb2-article-header .tb2-header-container {
    max-width: var(--tb2-container) !important;
    margin: 0 auto !important;
    padding: 3rem var(--tb2-padding) !important;
}

.tb2-article-header .breadcrumb {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
    font-size: 0.9rem !important;
    opacity: 0.8 !important;
    padding: 0 !important;
}

.tb2-article-header .breadcrumb a,
.tb2-article-header .breadcrumb span {
    color: var(--tb2-white) !important;
    text-decoration: none !important;
}

.tb2-article-header .breadcrumb a:hover {
    text-decoration: underline !important;
}

.tb2-article-header h1 {
    color: var(--tb2-white) !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

/* ── Contenu principal ─────────────────────────────────────────────────────── */
.site-grid > .container-component,
.site-grid > .grid-child.container-component {
    max-width: var(--tb2-container) !important;
    margin: 0 auto !important;
    padding: 0 var(--tb2-padding) !important;
    min-height: 60vh;
}

/* ── Article body ──────────────────────────────────────────────────────────── */
#sp-page-builder .page-content .sppb-section:not(div.sppb-section.tb2-article-header):not(.tb2-hero-title):first-child {
    margin-top: 0;
}

/* ── Hero title section (SPPB) — clone exact du bandeau d'articles ──────── */
.sp-page-builder .sppb-section.tb2-hero-title {
    background-image: linear-gradient(135deg, rgb(0, 71, 171) 0%, rgb(0, 53, 128) 50%, rgb(0, 31, 77) 100%) !important;
    color: var(--tb2-white) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Le .sppb-row-container joue le rôle de .tb2-header-container */
.sp-page-builder .sppb-section.tb2-hero-title > .sppb-row-container {
    max-width: var(--tb2-container) !important;
    margin: 0 auto !important;
    padding: 3rem var(--tb2-padding) !important;
}

/* Neutralisation totale des conteneurs SPPB internes (lignes, colonnes,
   sections imbriquées) — toute la structure doit être "à plat" sans padding
   ni breakout, pour reproduire exactement la structure simple de l'article. */
.sp-page-builder .sppb-section.tb2-hero-title .sppb-row,
.sp-page-builder .sppb-section.tb2-hero-title .sppb-row-column,
.sp-page-builder .sppb-section.tb2-hero-title .sppb-column,
.sp-page-builder .sppb-section.tb2-hero-title .sppb-column-addons,
.sp-page-builder .sppb-section.tb2-hero-title .sppb-container-inner,
.sp-page-builder .sppb-section.tb2-hero-title .sppb-nested-row {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    background: transparent !important;
}


/* Section SPPB imbriquée dans le hero (peu importe ses classes/inline styles) */
.sp-page-builder .sppb-section.tb2-hero-title .sppb-section {
    background: transparent !important;
    width: auto !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Breadcrumb — identique au header d'article */
.sp-page-builder .sppb-section.tb2-hero-title .sppb-addon-module.tb2-breadcrumb,
.sp-page-builder .sppb-section.tb2-hero-title .sppb-addon-content,
.sp-page-builder .sppb-section.tb2-hero-title .mod-breadcrumbs__wrapper {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.sp-page-builder .sppb-section.tb2-hero-title .breadcrumb {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    opacity: 0.8 !important;
    padding: 0 !important;
    margin: 0 !important; /* gap supprimé sous le breadcrumb */
    background: transparent !important;
    list-style: none !important;
}

.sp-page-builder .sppb-section.tb2-hero-title .breadcrumb,
.sp-page-builder .sppb-section.tb2-hero-title .breadcrumb li,
.sp-page-builder .sppb-section.tb2-hero-title .breadcrumb a,
.sp-page-builder .sppb-section.tb2-hero-title .breadcrumb span,
.sp-page-builder .sppb-section.tb2-hero-title .mod-breadcrumbs__divider {
    color: var(--tb2-white) !important;
    text-decoration: none !important;
    font-weight: 400 !important;
}

.sp-page-builder .sppb-section.tb2-hero-title .breadcrumb a:hover {
    text-decoration: underline !important;
}

/* H1 — identique au .tb2-article-header h1 */
.sp-page-builder .sppb-section.tb2-hero-title .sppb-addon-header h1.sppb-addon-title,
.sp-page-builder .sppb-section.tb2-hero-title h1.sppb-addon-title {
    color: var(--tb2-white) !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1 !important;
    font-family: inherit !important;
}

/* Aucun espace entre les addons internes (le gap vient du margin du breadcrumb) */
.sp-page-builder .sppb-section.tb2-hero-title .sppb-addon-wrapper,
.sp-page-builder .sppb-section.tb2-hero-title .sppb-addon {
    margin: 0 !important;
    padding: 0 !important;
}

.sp-page-builder .sppb-section.tb2-hero-title .sppb-addon-wrapper + .sppb-addon-wrapper {
    margin-top: 0 !important;
}

.tb2-article-body {
    font-size: 1.05rem !important;
    line-height: 1.8 !important;
}

/* Padding bas uniquement sur les articles avec bandeau (= pas SPPB fullbleed) */
body:not(:has(#sp-page-builder)) .tb2-article-body {
    padding-bottom: 4rem !important;
}

.tb2-article-body h2 {
    color: var(--tb2-primary) !important;
    margin-top: 2.5rem !important;
    font-size: 1.75rem !important;
    font-weight: 600 !important;
}

.tb2-article-body h3 {
    color: var(--tb2-primary) !important;
    margin-top: 2rem !important;
    font-size: 1.35rem !important;
    font-weight: 600 !important;
}

.tb2-article-body h4 {
    color: var(--tb2-primary) !important;
    margin-top: 1.75rem !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
}

.tb2-article-body h5 {
    color: var(--tb2-primary) !important;
    margin-top: 1.5rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

.tb2-article-body h6 {
    color: var(--tb2-primary) !important;
    margin-top: 1.5rem !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
}

/* ── Footer colonnes (bottom-a) ────────────────────────────────────────────── */
/*
 * Technique : la grille EST le conteneur.
 * Le padding horizontal = (100% - container) / 2 + padding interne
 * → fond pleine largeur + contenu aligné sur le header.
 */
.site-grid > .container-bottom-a,
.container-bottom-a {
    background: var(--tb2-dark) !important;
    color: var(--tb2-white) !important;
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
    padding-left: max(var(--tb2-padding), calc((100% - var(--tb2-container)) / 2 + var(--tb2-padding))) !important;
    padding-right: max(var(--tb2-padding), calc((100% - var(--tb2-container)) / 2 + var(--tb2-padding))) !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    margin-top: 4rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Pages SP Page Builder : pas de gap entre la dernière row et le footer.
   Joomla ajoute la classe `com_sppagebuilder` au <body> sur les vues SPPB.
   Idem pour les articles taggués `tb2-fullbleed` via la Page Class du menu item. */
body.com_sppagebuilder .site-grid > .container-bottom-a,
body.com_sppagebuilder .container-bottom-a,
body.com-sppagebuilder .site-grid > .container-bottom-a,
body.com-sppagebuilder .container-bottom-a,
body.tb2-fullbleed .site-grid > .container-bottom-a,
body.tb2-fullbleed .container-bottom-a {
    margin-top: 0 !important;
}

/* Chaque module = une colonne transparente */
.container-bottom-a .moduletable,
.container-bottom-a .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.container-bottom-a .card-body {
    padding: 0 !important;
}

/* ── Titres des modules bottom-a ───────────────────────────────────────────── */
.container-bottom-a .card-header {
    display: block !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.container-bottom-a h3 {
    color: var(--tb2-secondary) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 0 1rem 0 !important;
    /* Annuler tout visually-hidden éventuel */
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
}

.container-bottom-a p,
.container-bottom-a a,
.container-bottom-a li {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.95rem !important;
    text-decoration: none;
}
.container-bottom-a li{
    display: block;
    width: 100%;
    text-decoration: none;
}


.container-bottom-a a:hover {
    color: var(--tb2-white) !important;
}

.container-bottom-a ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.container-bottom-a li {
    margin-bottom: 0.5rem !important;
}

/* ── Subfooter ─────────────────────────────────────────────────────────────── */
.site-grid > .container-footer,
.container-footer {
    background: var(--tb2-dark) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.5rem 0 !important;
}

.container-footer .footer,
.container-footer > div:first-child {
    max-width: var(--tb2-container) !important;
    margin: 0 auto !important;
    padding: 0 var(--tb2-padding) !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.9rem !important;
}

.container-footer a {
    color: rgba(255, 255, 255, 0.6) !important;
}

.container-footer a:hover {
    color: var(--tb2-white) !important;
}

/* ── Menu dans le subfooter : centré ───────────────────────────────────────── */
.container-footer ul.mod-menu,
.container-footer nav > ul,
.container-footer .moduletable ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0.25rem 1.5rem !important;
}

.container-footer ul.mod-menu li,
.container-footer nav > ul li,
.container-footer .moduletable li {
    margin: 0 !important;
}

.container-footer ul.mod-menu a,
.container-footer nav > ul a,
.container-footer .moduletable li a {
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    padding: 0.2rem 0 !important;
    display: inline-block !important;
}

.container-footer ul.mod-menu a:hover,
.container-footer nav > ul a:hover,
.container-footer .moduletable li a:hover {
    color: var(--tb2-white) !important;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root {
        --tb2-padding: 1.5rem;
    }

    .container-nav .mod-menu {
        gap: 1.5rem !important;
    }

    header.container-header > .grid-child.container-nav {
        right: var(--tb2-padding) !important;
    }
}

@media (max-width: 768px) {
    :root {
        --tb2-padding: 1rem;
    }

    header.container-header > .grid-child:not(.container-topbar):not(.container-nav) {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    header.container-header > .grid-child.container-nav {
        position: static !important;
        transform: none !important;
        max-width: 100% !important;
        padding: 0 var(--tb2-padding) 1rem !important;
    }

    .container-nav .mod-menu li{
        width: 100% !important;
        margin: 20px 15px!important;
    }

    .navbar-brand{
        align-items: flex-start !important;
    }

    .container-topbar > *:first-child,
    .container-topbar .topbar {
        display: flex !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }

    .container-topbar .mod-finder {
        max-width: 100% !important;
    }

    .navbar-brand .logo img,
    .navbar-brand > img,
    .navbar-brand img {
        max-height: 40px !important;
        height: 40px !important;
    }

    .navbar-brand .site-title {
        font-size: 1.25rem !important;
    }

    .container-nav ul.mod-menu {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .tb2-article-header .tb2-header-container {
        padding: 2rem var(--tb2-padding) !important;
    }

    .tb2-article-header h1 {
        font-size: 1.75rem !important;
    }

    .site-grid > .container-bottom-a,
    .container-bottom-a {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding-left: var(--tb2-padding) !important;
        padding-right: var(--tb2-padding) !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* ==========================================================================
   PAGE CATÉGORIE — Banner + Cards
   (styles issus de com_content/category/default.php)
   ========================================================================== */

/* ── Banner catégorie ──────────────────────────────────────────────────────── */
.tb2-category-header {
    background-image: linear-gradient(135deg, rgb(0, 71, 171) 0%, rgb(0, 53, 128) 50%, rgb(0, 31, 77) 100%) !important;
    color: var(--tb2-white);
    padding: 0;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    margin-bottom: 2rem;
}



.tb2-category-header .tb2-header-container {
    max-width: var(--tb2-container);
    margin: 0 auto;
    padding: 3rem var(--tb2-padding);
}

.tb2-category-header .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    padding: 0;
}

.tb2-category-header .breadcrumb a,
.tb2-category-header .breadcrumb span {
    color: var(--tb2-white);
    text-decoration: none;
}

.tb2-category-header .breadcrumb a:hover {
    text-decoration: underline;
}

.tb2-category-header h1 {
    color: var(--tb2-white) !important;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.tb2-category-header .tb2-category-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  CATALOGUE HUB PAGE                                                        */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ── Intro ─────────────────────────────────────────────────────────────────── */
.tb2-cat-intro {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.tb2-cat-intro__lead {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--tb2-grey);
    margin: 0;
}

/* ── Grid layouts ──────────────────────────────────────────────────────────── */
.tb2-cat-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.tb2-cat-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.tb2-cat-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.tb2-cat-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius-lg);
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

/* Animated top accent bar */
.tb2-cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.35s ease;
}

.tb2-cat-card:hover {
    border-color: #D1D5DB;
    transform: translateY(-2px);
}

.tb2-cat-card:hover::before {
    transform: scaleX(1);
    transform-origin: left center;
}

/* Color variants */
.tb2-cat-card--blue::before  { background: var(--tb2-primary); }
.tb2-cat-card--cyan::before  { background: var(--tb2-secondary); }
.tb2-cat-card--orange::before { background: var(--tb2-accent); }

/* ── Card body ─────────────────────────────────────────────────────────────── */
.tb2-cat-card__body {
    flex: 1;
    padding: 1.75rem 1.5rem 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
}

/* Tag / eyebrow */
.tb2-cat-card__tag {
    display: inline-block;
    width: fit-content;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.tb2-cat-tag--blue {
    background: #EBF0FA;
    color: var(--tb2-primary);
}

.tb2-cat-tag--cyan {
    background: #E6F7FB;
    color: #0096C7;
}

.tb2-cat-tag--orange {
    background: #FFF1EB;
    color: #D96B3A;
}

/* Title */
.tb2-cat-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tb2-dark);
    margin: 0 0 0.6rem;
    line-height: 1.3;
}

/* Description */
.tb2-cat-card__desc {
    font-size: 0.9rem;
    color: var(--tb2-grey);
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

/* Meta info (e.g. "Dernière release : 202601") */
.tb2-cat-card__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tb2-primary);
}

.tb2-cat-card__meta svg {
    flex-shrink: 0;
    color: var(--tb2-primary);
}

/* Arrow indicator */
.tb2-cat-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    flex-shrink: 0;
    color: #D1D5DB;
    border-left: 1px solid #F3F4F6;
    transition: color 0.25s ease, background 0.25s ease;
}

.tb2-cat-card:hover .tb2-cat-card__arrow {
    color: var(--tb2-primary);
    background: #F8FAFF;
}

.tb2-cat-card--cyan:hover .tb2-cat-card__arrow {
    color: var(--tb2-secondary);
    background: #F0FBFE;
}

.tb2-cat-card--orange:hover .tb2-cat-card__arrow {
    color: var(--tb2-accent);
    background: #FFF8F5;
}

/* ── Featured cards (row of 2) — taller ────────────────────────────────────── */
.tb2-cat-grid--2 .tb2-cat-card__body {
    padding: 2rem 1.75rem 2rem 2rem;
}

.tb2-cat-grid--2 .tb2-cat-card__title {
    font-size: 1.4rem;
}

.tb2-cat-grid--2 .tb2-cat-card__arrow {
    width: 64px;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .tb2-cat-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tb2-cat-grid--2,
    .tb2-cat-grid--3 {
        grid-template-columns: 1fr;
    }

    .tb2-cat-card__arrow {
        width: 48px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  RELEASES LIST PAGE                                                         */
/* ═══════════════════════════════════════════════════════════════════════════ */

.tb2-rel-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 860px;
    margin: 0 auto 2.5rem;
}

/* ── Release card (horizontal) ─────────────────────────────────────────────── */
.tb2-rel-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius-lg);
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

/* Animated top accent bar — reuses .tb2-cat-card--blue / --cyan ::before */
.tb2-rel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.35s ease;
}

.tb2-rel-card:hover {
    border-color: #D1D5DB;
    transform: translateY(-2px);
}

.tb2-rel-card:hover::before {
    transform: scaleX(1);
    transform-origin: left center;
}

/* ── Badge (left section with release number) ──────────────────────────────── */
.tb2-rel-card__badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 120px;
    padding: 1.25rem 1rem;
    background: #F8FAFF;
    border-right: 1px solid #F3F4F6;
    flex-shrink: 0;
}

.tb2-rel-card__number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--tb2-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.tb2-rel-card__latest {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.55rem;
    border-radius: 3px;
    background: var(--tb2-primary);
    color: #fff;
}

/* ── Body (center) ─────────────────────────────────────────────────────────── */
.tb2-rel-card__body {
    flex: 1;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tb2-rel-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tb2-dark);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.tb2-rel-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.tb2-rel-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--tb2-grey);
}

.tb2-rel-stat svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* ── Arrow (right) — reuses tb2-cat-card__arrow ────────────────────────────── */
.tb2-rel-card .tb2-cat-card__arrow {
    width: 56px;
}

/* ── "Current" release visual emphasis ─────────────────────────────────────── */
.tb2-rel-card--current {
    border: 2px solid var(--tb2-secondary);
}

.tb2-rel-card--current .tb2-rel-card__badge {
    background: #E0F7FC;
}

.tb2-rel-card--current .tb2-rel-card__number {
    color: var(--tb2-secondary);
}

.tb2-rel-card__latest--current {
    background: var(--tb2-secondary) !important;
}

/* ── "Latest" (upcoming) — subtle accent ──────────────────────────────────── */
.tb2-rel-card--latest {
    border: 2px solid var(--tb2-primary);
}

/* ── Archives section ──────────────────────────────────────────────────────── */
.tb2-rel-archives {
    max-width: 860px;
    margin: 2.5rem auto 2rem;
}

.tb2-rel-archives__title {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--tb2-grey);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #E5E7EB;
}

.tb2-rel-archives__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .75rem;
}

.tb2-rel-archive-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    background: #FAFBFC;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    text-decoration: none !important;
    color: inherit;
    transition: background .15s, border-color .15s;
}

.tb2-rel-archive-card:hover {
    background: #F0F4FF;
    border-color: var(--tb2-primary);
}

.tb2-rel-archive-card__number {
    font-size: 1rem;
    font-weight: 800;
    color: var(--tb2-grey);
    white-space: nowrap;
}

.tb2-rel-archive-card:hover .tb2-rel-archive-card__number {
    color: var(--tb2-primary);
}

.tb2-rel-archive-card__stats {
    flex: 1;
    font-size: .78rem;
    color: #9CA3AF;
}

.tb2-rel-archive-card__arrow {
    flex-shrink: 0;
    color: #D1D5DB;
    transition: color .15s;
}

.tb2-rel-archive-card:hover .tb2-rel-archive-card__arrow {
    color: var(--tb2-primary);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tb2-rel-card__badge {
        min-width: 90px;
        padding: 1rem 0.75rem;
    }

    .tb2-rel-card__number {
        font-size: 1.2rem;
    }

    .tb2-rel-card__body {
        padding: 1rem;
    }

    .tb2-rel-card__stats {
        gap: 0.75rem;
    }

    .tb2-rel-stat {
        font-size: 0.8rem;
    }

    .tb2-rel-card .tb2-cat-card__arrow {
        width: 44px;
    }

    .tb2-rel-archives__grid {
        grid-template-columns: 1fr;
    }
}

/* ── Category sort/filter bar ──────────────────────────────────────────────── */
.tb2-category-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tb2-filters-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--tb2-dark);
}

.tb2-filters-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tb2-filter-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: #fff;
    color: var(--tb2-dark);
    text-decoration: none;
    transition: var(--tb2-transition);
}

.tb2-filter-btn:hover {
    border-color: var(--tb2-primary);
    color: var(--tb2-primary);
    text-decoration: none;
}

.tb2-filter-btn.active {
    background: var(--tb2-primary);
    border-color: var(--tb2-primary);
    color: #fff;
}

/* ── Grille de cards ───────────────────────────────────────────────────────── */
.tb2-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-bottom: 2.5rem;
}

/* ── Card individuelle ─────────────────────────────────────────────────────── */
.tb2-article-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: #fff;
    text-decoration: none !important;
    color: inherit;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tb2-article-card:hover {
    box-shadow: 0 8px 32px rgba(0, 71, 171, 0.18);
}

/* Haut de card : dégradés alternés */
.tb2-card-top {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

/* Cards impaires (1re, 3e, 5e…) : cobalt → cyan */
.tb2-article-card:nth-child(odd) .tb2-card-top {
    background: linear-gradient(135deg, var(--tb2-primary) 0%, var(--tb2-secondary) 100%);
}

/* Cards paires (2e, 4e, 6e…) : cyan → cyan foncé */
.tb2-article-card:nth-child(even) .tb2-card-top {
    background: linear-gradient(135deg, #00B4D8 0%, #0096C7 100%);
}

.tb2-card-top-title {
    color: #fff !important;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.25;
    margin: 0;
}

/* Bas de card : contenu blanc */
.tb2-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tb2-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tb2-dark);
    margin: 0 0 0.6rem;
    line-height: 1.4;
}

.tb2-card-excerpt {
    font-size: 0.9rem;
    color: var(--tb2-grey);
    line-height: 1.6;
    flex: 1;
    margin: 0 0 0.9rem;
}


/* Pagination catégorie */
.tb2-category-pagination {
    margin-top: 1rem;
}

.tb2-no-articles {
    padding: 2rem;
    text-align: center;
    color: var(--tb2-grey);
}

/* ── Catégorie : grille de cartes alignée sur le style SLA du landing ────────
   Utilisée par html/com_content/category/default_articles.php */
.tb2-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* 1re carte seule sur la 1re ligne (col 1), les suivantes basculent en ligne 2 */
.tb2-category-grid > .tb2-category-card:first-child {
    grid-column: 1 / 2;
}
.tb2-category-grid > .tb2-category-card:nth-child(2) {
    grid-column-start: 1;
}

.tb2-category-card {
    background: #fff;
    border: 1px solid var(--tb2-border, #E5E7EB);
    border-radius: 14px;
    padding: 2rem;
    border-top: 4px solid var(--tb2-primary);
    text-decoration: none !important;
    color: inherit;
    display: block;
    transition: transform .25s, box-shadow .25s;
}

/* Cycle de couleurs sur 3 (blue → cyan → orange) */
.tb2-category-card:nth-child(3n+2) { border-top-color: var(--tb2-secondary); }
.tb2-category-card:nth-child(3n+3) { border-top-color: var(--tb2-accent); }

.tb2-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 24px rgba(0, 71, 171, .08);
}

.tb2-category-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: .75rem;
    color: var(--tb2-dark);
    line-height: 1.35;
}

.tb2-category-card p {
    color: #6B7280;
    font-size: .95rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 991.98px) {
    .tb2-category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 599.98px) {
    .tb2-category-grid { grid-template-columns: 1fr; }
}

/* ── Admin icons (articles) ────────────────────────────────────────────────── */
.tb2-admin-icons {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.tb2-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

/* ── Responsive catégorie ──────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .tb2-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tb2-cards-grid {
        grid-template-columns: 1fr;
    }

    .tb2-category-header .tb2-header-container {
        padding: 2rem var(--tb2-padding);
    }

    .tb2-category-header h1 {
        font-size: 1.75rem;
    }
}

.rsform-type-submitbutton .col-sm-3{
    display:none!important;
}

a.tb2-brand-logo:hover{
    text-decoration: none!important;
}

/* ==========================================================================
   COM_FINDER — Override Telebib2
   ========================================================================== */

.tb2-search-page {
    font-family: var(--tb2-font-main);
}

.tb2-search-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem var(--tb2-padding) 4rem;
}

/* ── Barre de recherche ─────────────────────────────────────────────────────── */
.tb2-search-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: var(--tb2-radius);
    box-shadow: var(--tb2-shadow-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.tb2-search-bar__icon {
    color: var(--tb2-grey);
    flex-shrink: 0;
}

.tb2-search-bar__input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-family: var(--tb2-font-main);
    font-size: 1rem;
    color: var(--tb2-dark);
    padding: 0 !important;
    min-width: 0;
}

.tb2-search-bar__input::placeholder { color: #9CA3AF; }

.tb2-search-bar__toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: var(--tb2-radius-sm);
    padding: 0.45rem 0.8rem;
    font-family: var(--tb2-font-main);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tb2-grey);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.tb2-search-bar__toggle:hover,
.tb2-search-bar__toggle[aria-expanded="true"] {
    border-color: var(--tb2-primary);
    color: var(--tb2-primary);
    background: rgba(0, 71, 171, 0.05);
}

.tb2-search-bar__submit {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--tb2-primary);
    color: #fff;
    border: none;
    border-radius: var(--tb2-radius-sm);
    padding: 0.5rem 1.1rem;
    font-family: var(--tb2-font-main);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.tb2-search-bar__submit:hover { background: var(--tb2-primary-dark); }

/* ── Panneau filtres avancés ────────────────────────────────────────────────── */
.tb2-filters-panel {
    background: #fff;
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: var(--tb2-radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
    animation: tb2FadeDown 0.18s ease;
}

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

.tb2-filters-hint {
    font-size: 0.85rem;
    color: var(--tb2-grey);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color, #E5E7EB);
    line-height: 1.55;
}

/* filter.select génère : .filter-branch > .control-group > .control-label + .controls > select */
.tb2-filters-grid .filter-branch {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.6rem 1.25rem;
}

.tb2-filters-grid .control-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
}

.tb2-filters-grid .control-label {
    margin: 0;
}

.tb2-filters-grid .control-label label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tb2-grey);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
    cursor: default;
}

/* "RECHERCHE PAR TYPE" → on affiche seulement la dernière partie via word-spacing trick */
.tb2-filters-grid .control-label label {
    /* Le texte complet reste visible mais compact */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tb2-filters-grid .controls {
    flex: 1;
}

.tb2-filters-grid .controls select,
.tb2-filters-grid select {
    width: 100%;
    border: 1.5px solid #D1D5DB !important;
    border-radius: var(--tb2-radius-sm) !important;
    padding: 0.45rem 0.75rem !important;
    font-family: var(--tb2-font-main);
    font-size: 0.875rem;
    color: var(--tb2-dark);
    background: #fff !important;
    cursor: pointer;
    appearance: auto;
}

.tb2-filters-grid .controls select:focus,
.tb2-filters-grid select:focus {
    border-color: var(--tb2-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1) !important;
    outline: none !important;
}

/* État actif du bouton toggle filtres */
.tb2-search-bar__toggle--active {
    border-color: var(--tb2-primary) !important;
    color: var(--tb2-primary) !important;
    background: rgba(0, 71, 171, 0.06) !important;
}

/* Animation ouverture panneau filtres */
.tb2-filters-panel:not([hidden]) {
    animation: tb2FadeDown 0.18s ease;
}

/* ── Barre méta résultats ───────────────────────────────────────────────────── */
.tb2-results-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tb2-results-summary {
    font-size: 0.9rem;
    color: var(--tb2-grey);
}

.tb2-results-summary strong { color: var(--tb2-dark); }

.tb2-query-term {
    display: inline-block;
    background: rgba(0, 71, 171, 0.08);
    color: var(--tb2-primary);
    font-weight: 600;
    padding: 0.05rem 0.45rem;
    border-radius: 5px;
    font-size: 0.9em;
}

.tb2-results-page {
    font-size: 0.85rem;
    color: var(--tb2-grey);
}

/* ── Cartes résultat ────────────────────────────────────────────────────────── */
.tb2-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.tb2-result-card {
    background: #fff;
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: var(--tb2-radius);
    padding: 1.1rem 1.35rem;
    transition: box-shadow 0.2s, border-color 0.2s;
    animation: tb2FadeDown 0.22s ease both;
}

.tb2-result-card:hover {
    box-shadow: none;
    border-color: #C7D9F5;
}

.tb2-result-card:nth-child(1) { animation-delay: .04s; }
.tb2-result-card:nth-child(2) { animation-delay: .08s; }
.tb2-result-card:nth-child(3) { animation-delay: .12s; }
.tb2-result-card:nth-child(4) { animation-delay: .16s; }
.tb2-result-card:nth-child(5) { animation-delay: .20s; }

.tb2-result-url {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--tb2-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.tb2-result-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.tb2-result-title__link {
    color: var(--tb2-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.tb2-result-title__link:hover { color: var(--tb2-secondary); }

.tb2-result-excerpt {
    font-size: 0.9rem;
    color: var(--tb2-grey);
    line-height: 1.55;
    margin: 0 0 0.65rem;
}

/* Highlight du terme cherché */
.tb2-result-excerpt mark,
.tb2-results-list mark[data-markjs] {
    background: #FFF3CD;
    color: #92400E;
    border-radius: 3px;
    padding: 0 0.2em;
    font-weight: 600;
}

/* ── Méta (date + tags) ─────────────────────────────────────────────────────── */
.tb2-result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
}

.tb2-meta-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: #9CA3AF;
}

.tb2-meta-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--tb2-light-grey);
    border: 1px solid var(--bs-border-color, #E5E7EB);
    color: var(--tb2-grey);
}

/* Type */
.tb2-meta-tag--type,
.tb2-meta-tag--Type {
    background: rgba(0, 71, 171, 0.07);
    border-color: #C7D9F5;
    color: var(--tb2-primary);
}

/* Catégorie */
.tb2-meta-tag--category,
.tb2-meta-tag--Category {
    background: #FFF7ED;
    border-color: #FED7AA;
    color: #C2410C;
}

/* Langue */
.tb2-meta-tag--language,
.tb2-meta-tag--Language {
    background: #F5F3FF;
    border-color: #DDD6FE;
    color: #6D28D9;
}

/* ── État vide ───────────────────────────────────────────────────────────────── */
.tb2-search-empty {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--tb2-grey);
}

.tb2-search-empty svg   { opacity: 0.3; margin-bottom: 1rem; }
.tb2-search-empty h2    { font-size: 1.1rem; color: var(--tb2-dark); margin-bottom: 0.5rem; }
.tb2-search-empty p     { font-size: 0.9rem; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.tb2-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.tb2-results-count {
    font-size: 0.85rem;
    color: var(--tb2-grey);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .tb2-search-bar {
        flex-wrap: wrap;
    }

    .tb2-search-bar__submit,
    .tb2-search-bar__toggle {
        flex: 1;
        justify-content: center;
    }

    .tb2-search-inner {
        padding-top: 1.25rem;
    }
}

/* ==========================================================================
   BACK TO TOP
   ========================================================================== */
#back-top.back-to-top-link {
    position: fixed;
    bottom: 2rem;
    right: 1.75rem;
    z-index: 999;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;

    background: transparent;
    border: 2px solid var(--tb2-accent);
    border-radius: 50%;
    color: var(--tb2-accent);
    font-size: 1.1rem;
    text-decoration: none;

    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease,
                background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

#back-top.back-to-top-link:hover {
    background: var(--tb2-accent);
    color: #fff;
    transform: translateY(-2px);
}

#back-top.back-to-top-link:active {
    transform: translateY(0);
    box-shadow: none;
}

@media (max-width: 768px) {
    #back-top.back-to-top-link {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
    }
}

.com_sppagebuilder .site-grid > .container-component{
    padding: 0!important;
}

/* ==========================================================================
   BOOTSTRAP 5 — OVERRIDES CHARTE TELEBIB2
   Tous les composants Bootstrap remappés sur le design system TB2
   ========================================================================== */

/* ── VARIABLES BOOTSTRAP → TB2 ─────────────────────────────────────────────── */
:root {
    --bs-primary:           var(--tb2-primary);
    --bs-primary-rgb:       0, 71, 171;
    --bs-secondary:         #6B7280;
    --bs-secondary-rgb:     107, 114, 128;
    --bs-success:           var(--tb2-success);
    --bs-success-rgb:       16, 185, 129;
    --bs-info:              var(--tb2-secondary);
    --bs-info-rgb:          0, 180, 216;
    --bs-warning:           #F59E0B;
    --bs-warning-rgb:       245, 158, 11;
    --bs-danger:            #EF4444;
    --bs-danger-rgb:        239, 68, 68;
    --bs-dark:              var(--tb2-dark);
    --bs-dark-rgb:          26, 29, 41;
    --bs-light:             var(--tb2-light-grey);
    --bs-light-rgb:         243, 244, 246;
    --bs-border-radius:     var(--tb2-radius);
    --bs-border-radius-sm:  var(--tb2-radius-sm);
    --bs-border-radius-lg:  var(--tb2-radius-lg);
    --bs-font-sans-serif:   var(--tb2-font-main);
    --bs-link-color:        var(--tb2-primary);
    --bs-link-hover-color:  var(--tb2-primary-dark);
    --bs-border-color:      #E5E7EB;
    --bs-body-font-family:  var(--tb2-font-main);
    --bs-body-color:        var(--tb2-dark);
}

/* ── TYPOGRAPHIE ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--tb2-font-main);
    font-weight: 700;
    color: var(--tb2-dark);
    line-height: 1.25;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--tb2-grey);
}

.text-muted { color: var(--tb2-grey) !important; }
.text-primary { color: var(--tb2-primary) !important; }
.text-secondary { color: var(--tb2-grey) !important; }
.text-success { color: var(--tb2-success) !important; }
.text-danger { color: #EF4444 !important; }
.text-warning { color: #D97706 !important; }
.text-info { color: var(--tb2-secondary) !important; }
.text-dark { color: var(--tb2-dark) !important; }

.bg-primary { background-color: var(--tb2-primary) !important; color: #fff !important; }
.bg-secondary { background-color: var(--tb2-grey) !important; color: #fff !important; }
.bg-success { background-color: var(--tb2-success) !important; color: #fff !important; }
.bg-danger { background-color: #EF4444 !important; color: #fff !important; }
.bg-warning { background-color: #F59E0B !important; color: #fff !important; }
.bg-info { background-color: var(--tb2-secondary) !important; color: #fff !important; }
.bg-dark { background-color: var(--tb2-dark) !important; color: #fff !important; }
.bg-light { background-color: var(--tb2-light-grey) !important; }

blockquote, .blockquote {
    border-left: 4px solid var(--tb2-primary);
    padding: 0.75rem 1.25rem;
    background: rgba(0, 71, 171, 0.04);
    border-radius: 0 var(--tb2-radius-sm) var(--tb2-radius-sm) 0;
    font-size: 1rem;
    color: var(--tb2-dark);
    margin: 1.5rem 0;
}

.blockquote-footer { color: var(--tb2-grey); }

hr { border-color: #E5E7EB; opacity: 1; }

/* ── BOUTONS — variantes complètes ──────────────────────────────────────────── */
.btn {
    font-family: var(--tb2-font-main);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--tb2-radius);
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}

.btn:active { transform: translateY(1px); }

/* Tailles */
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1.0625rem; border-radius: var(--tb2-radius-lg); }
.btn-sm { padding: 0.3rem 0.85rem;  font-size: 0.8125rem; border-radius: var(--tb2-radius-sm); }

/* success */
.btn-success {
    background: var(--tb2-success);
    border-color: var(--tb2-success);
    color: #fff;
}
.btn-success:hover, .btn-success:focus {
    background: #0EA271;
    border-color: #0EA271;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* danger */
.btn-danger {
    background: #EF4444;
    border-color: #EF4444;
    color: #fff;
}
.btn-danger:hover, .btn-danger:focus {
    background: #DC2626;
    border-color: #DC2626;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* warning */
.btn-warning {
    background: #F59E0B;
    border-color: #F59E0B;
    color: #fff;
}
.btn-warning:hover, .btn-warning:focus {
    background: #D97706;
    border-color: #D97706;
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* info */
.btn-info {
    background: var(--tb2-secondary);
    border-color: var(--tb2-secondary);
    color: #fff;
}
.btn-info:hover, .btn-info:focus {
    background: #0096B4;
    border-color: #0096B4;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

/* dark */
.btn-dark {
    background: var(--tb2-dark);
    border-color: var(--tb2-dark);
    color: #fff;
}
.btn-dark:hover, .btn-dark:focus {
    background: #0E1120;
    border-color: #0E1120;
    color: #fff;
}

/* light */
.btn-light {
    background: var(--tb2-light-grey);
    border-color: #E5E7EB;
    color: var(--tb2-dark);
}
.btn-light:hover, .btn-light:focus {
    background: #E5E7EB;
    border-color: #D1D5DB;
    color: var(--tb2-dark);
}

/* link */
.btn-link { color: var(--tb2-primary); font-weight: 600; text-decoration: none; }
.btn-link:hover { color: var(--tb2-primary-dark); text-decoration: underline; }

/* Outline variants */
.btn-outline-primary {
    color: var(--tb2-primary);
    border-color: var(--tb2-primary);
    background: transparent;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
    background: var(--tb2-primary);
    border-color: var(--tb2-primary);
    color: #fff;
}

.btn-outline-secondary {
    color: var(--tb2-grey);
    border-color: #D1D5DB;
    background: transparent;
}
.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background: var(--tb2-grey);
    border-color: var(--tb2-grey);
    color: #fff;
}

.btn-outline-success {
    color: var(--tb2-success);
    border-color: var(--tb2-success);
    background: transparent;
}
.btn-outline-success:hover { background: var(--tb2-success); color: #fff; }

.btn-outline-danger {
    color: #EF4444;
    border-color: #EF4444;
    background: transparent;
}
.btn-outline-danger:hover { background: #EF4444; color: #fff; }

.btn-outline-warning {
    color: #D97706;
    border-color: #F59E0B;
    background: transparent;
}
.btn-outline-warning:hover { background: #F59E0B; color: #fff; }

.btn-outline-info {
    color: var(--tb2-secondary);
    border-color: var(--tb2-secondary);
    background: transparent;
}
.btn-outline-info:hover { background: var(--tb2-secondary); color: #fff; }

.btn-outline-dark {
    color: var(--tb2-dark);
    border-color: var(--tb2-dark);
    background: transparent;
}
.btn-outline-dark:hover { background: var(--tb2-dark); color: #fff; }

.btn-outline-light {
    color: var(--tb2-dark);
    border-color: #E5E7EB;
    background: transparent;
}
.btn-outline-light:hover { background: var(--tb2-light-grey); color: var(--tb2-dark); }

/* ── ALERTES ────────────────────────────────────────────────────────────────── */
.alert {
    border-radius: var(--tb2-radius);
    border-width: 1px;
    border-style: solid;
    padding: 0.9rem 1.25rem;
    font-size: 0.9375rem;
    border-left-width: 4px;
}

.alert-primary {
    background: rgba(0, 71, 171, 0.07);
    border-color: var(--tb2-primary);
    color: var(--tb2-primary-darker, #001F4D);
}
.alert-primary .alert-link { color: var(--tb2-primary-dark); }

.alert-secondary {
    background: #F9FAFB;
    border-color: #D1D5DB;
    color: var(--tb2-dark);
}

.alert-success {
    background: var(--tb2-success-bg);
    border-color: var(--tb2-success);
    color: #065F46;
}
.alert-success .alert-link { color: #065F46; }

.alert-danger {
    background: #FEE2E2;
    border-color: #EF4444;
    color: #991B1B;
}
.alert-danger .alert-link { color: #991B1B; }

.alert-warning {
    background: #FEF3C7;
    border-color: #F59E0B;
    color: #92400E;
}
.alert-warning .alert-link { color: #92400E; }

.alert-info {
    background: rgba(0, 180, 216, 0.08);
    border-color: var(--tb2-secondary);
    color: #0E6B87;
}
.alert-info .alert-link { color: #0E6B87; }

.alert-dark {
    background: rgba(26, 29, 41, 0.08);
    border-color: var(--tb2-dark);
    color: var(--tb2-dark);
}

.alert-light {
    background: var(--tb2-light-grey);
    border-color: #E5E7EB;
    color: var(--tb2-dark);
}

.alert-dismissible .btn-close { opacity: 0.6; }
.alert-dismissible .btn-close:hover { opacity: 1; }

/* ── BADGES ─────────────────────────────────────────────────────────────────── */
.badge {
    font-family: var(--tb2-font-main);
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: var(--tb2-radius-sm);
    padding: 0.3em 0.65em;
    letter-spacing: 0.02em;
}

.bg-primary.badge, .badge.bg-primary { background-color: var(--tb2-primary) !important; }
.bg-secondary.badge, .badge.bg-secondary { background-color: var(--tb2-grey) !important; }
.bg-success.badge, .badge.bg-success { background-color: var(--tb2-success) !important; }
.bg-danger.badge, .badge.bg-danger { background-color: #EF4444 !important; }
.bg-warning.badge, .badge.bg-warning { background-color: #F59E0B !important; }
.bg-info.badge, .badge.bg-info { background-color: var(--tb2-secondary) !important; }
.bg-dark.badge, .badge.bg-dark { background-color: var(--tb2-dark) !important; }
.bg-light.badge, .badge.bg-light { background-color: var(--tb2-light-grey) !important; color: var(--tb2-dark) !important; }

/* ── FORMULAIRES ────────────────────────────────────────────────────────────── */
.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tb2-dark);
    margin-bottom: 0.375rem;
}

.form-text {
    font-size: 0.8125rem;
    color: var(--tb2-grey);
}

.form-control,
.form-select {
    font-family: var(--tb2-font-main);
    font-size: 0.9375rem;
    color: var(--tb2-dark);
    background: #fff;
    border: 1.5px solid #D1D5DB;
    border-radius: var(--tb2-radius);
    padding: 0.55rem 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:hover,
.form-select:hover {
    border-color: #9CA3AF;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tb2-primary);
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.12);
    outline: none;
    background: #fff;
    color: var(--tb2-dark);
}

.form-control::placeholder { color: #9CA3AF; }

.form-control.is-valid, .was-validated .form-control:valid {
    border-color: var(--tb2-success);
    background-image: none;
}
.form-control.is-valid:focus, .was-validated .form-control:valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-control.is-invalid, .was-validated .form-control:invalid {
    border-color: #EF4444;
    background-image: none;
}
.form-control.is-invalid:focus, .was-validated .form-control:invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.valid-feedback   { color: var(--tb2-success); font-size: 0.8125rem; }
.invalid-feedback { color: #EF4444;            font-size: 0.8125rem; }

.form-check-input {
    border: 1.5px solid #D1D5DB;
    border-radius: 3px;
}

.form-check-input:checked {
    background-color: var(--tb2-primary);
    border-color: var(--tb2-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.12);
    border-color: var(--tb2-primary);
}

.form-switch .form-check-input {
    border-radius: 1rem;
}

.form-switch .form-check-input:checked {
    background-color: var(--tb2-primary);
    border-color: var(--tb2-primary);
}

.input-group-text {
    background: var(--tb2-light-grey);
    border: 1.5px solid #D1D5DB;
    color: var(--tb2-grey);
    font-size: 0.9375rem;
}

.form-range::-webkit-slider-thumb { background: var(--tb2-primary); }
.form-range::-moz-range-thumb     { background: var(--tb2-primary); }

/* ── CARDS ──────────────────────────────────────────────────────────────────── */
.card-header {
    background: var(--tb2-light-grey);
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
    color: var(--tb2-dark);
    padding: 0.85rem 1.25rem;
}

.card-footer {
    background: var(--tb2-light-grey);
    border-top: 1px solid #E5E7EB;
    padding: 0.75rem 1.25rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tb2-dark);
    margin-bottom: 0.5rem;
}

.card-subtitle { color: var(--tb2-grey); }
.card-text     { color: var(--tb2-dark); line-height: 1.6; }

.card-img-top  { border-radius: var(--tb2-radius) var(--tb2-radius) 0 0; }
.card-img-bottom { border-radius: 0 0 var(--tb2-radius) var(--tb2-radius); }

/* ── TABLEAUX ────────────────────────────────────────────────────────────────── */
/* Repli global : toute <table> sans aucune classe reçoit une bordure visible.
   (Les tables scopées dans les articles et les .table / sppb gardent leur style.) */
table:not([class]) {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    border: 1px solid var(--tb2-border, #E5E7EB);
    font-size: 0.9rem;
    color: var(--tb2-dark);
    background: #fff;
}

table:not([class]) th,
table:not([class]) td {
    border: 1px solid var(--tb2-border, #E5E7EB);
    padding: 0.6rem 0.9rem;
    text-align: left;
    vertical-align: top;
}

table:not([class]) thead th {
    background: #EEF2FF;
    font-weight: 700;
    color: #4B5563;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 71, 171, 0.03);
}

.table-hover > tbody > tr:hover > * {
    background-color: var(--tb2-row-hover);
}

.table-bordered > :not(caption) > * > * {
    border-color: #E5E7EB;
}

.table-sm > :not(caption) > * > * {
    padding: 0.35rem 0.6rem;
}

.table-primary   { --bs-table-bg: rgba(0, 71, 171, 0.08);   --bs-table-color: var(--tb2-primary-darker); }
.table-secondary { --bs-table-bg: rgba(107, 114, 128, 0.08); --bs-table-color: var(--tb2-dark); }
.table-success   { --bs-table-bg: rgba(16, 185, 129, 0.08);  --bs-table-color: #065F46; }
.table-danger    { --bs-table-bg: rgba(239, 68, 68, 0.08);   --bs-table-color: #991B1B; }
.table-warning   { --bs-table-bg: rgba(245, 158, 11, 0.08);  --bs-table-color: #92400E; }
.table-info      { --bs-table-bg: rgba(0, 180, 216, 0.08);   --bs-table-color: #0E6B87; }
.table-dark      { --bs-table-bg: var(--tb2-dark);            --bs-table-color: #fff; }
.table-light     { --bs-table-bg: var(--tb2-light-grey);      --bs-table-color: var(--tb2-dark); }

/* ── PAGINATION ──────────────────────────────────────────────────────────────── */
.pagination { gap: 0.2rem; }

.page-item .page-link {
    font-family: var(--tb2-font-main);
    font-weight: 500;
    color: var(--tb2-primary);
    background: #fff;
    border: 1.5px solid #E5E7EB;
    border-radius: var(--tb2-radius) !important;
    padding: 0.45rem 0.85rem;
    font-size: 0.9375rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.page-item .page-link:hover {
    background: rgba(0, 71, 171, 0.07);
    border-color: var(--tb2-primary);
    color: var(--tb2-primary);
}

.page-item.active .page-link {
    background: var(--tb2-primary);
    border-color: var(--tb2-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 71, 171, 0.25);
}

.page-item.disabled .page-link {
    color: #D1D5DB;
    border-color: #F3F4F6;
    background: #F9FAFB;
}

/* ── LIST GROUP ──────────────────────────────────────────────────────────────── */
.list-group-item {
    font-family: var(--tb2-font-main);
    color: var(--tb2-dark);
    border-color: #E5E7EB;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: background 0.15s;
}

.list-group-item.active {
    background: var(--tb2-primary);
    border-color: var(--tb2-primary);
    color: #fff;
}

.list-group-item-action:hover {
    background: rgba(0, 71, 171, 0.05);
    color: var(--tb2-dark);
}

.list-group-item-primary   { background: rgba(0, 71, 171, 0.08);   color: var(--tb2-primary-darker); border-color: rgba(0, 71, 171, 0.15); }
.list-group-item-success   { background: rgba(16, 185, 129, 0.08); color: #065F46; border-color: rgba(16, 185, 129, 0.2); }
.list-group-item-danger    { background: rgba(239, 68, 68, 0.08);  color: #991B1B; border-color: rgba(239, 68, 68, 0.2); }
.list-group-item-warning   { background: rgba(245, 158, 11, 0.08); color: #92400E; border-color: rgba(245, 158, 11, 0.2); }
.list-group-item-info      { background: rgba(0, 180, 216, 0.08);  color: #0E6B87; border-color: rgba(0, 180, 216, 0.2); }

/* ── NAV TABS ────────────────────────────────────────────────────────────────── */
.nav-tabs {
    border-bottom: 2px solid #E5E7EB;
    gap: 0.25rem;
}

.nav-tabs .nav-link {
    font-family: var(--tb2-font-main);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--tb2-grey);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.65rem 1rem;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--tb2-primary);
    border-bottom-color: rgba(0, 71, 171, 0.3);
}

.nav-tabs .nav-link.active {
    color: var(--tb2-primary);
    border-bottom-color: var(--tb2-primary);
    background: transparent;
}

.tab-content { padding-top: 1.25rem; }

/* Release : supprimer l'espace entre le hero bleu (avec onglets) et le contenu */
.tb2-category-header.has-hero-tabs {
    margin-bottom: 0;
}
#releaseTabsContent {
    padding-top: 1.5rem;
}

/* ── NAV PILLS ───────────────────────────────────────────────────────────────── */
.nav-pills .nav-link {
    font-family: var(--tb2-font-main);
    font-weight: 600;
    color: var(--tb2-grey);
    border-radius: var(--tb2-radius);
    padding: 0.55rem 1rem;
    font-size: 0.9375rem;
    transition: background 0.2s, color 0.2s;
}

.nav-pills .nav-link:hover { background: rgba(0, 71, 171, 0.07); color: var(--tb2-primary); }

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background: var(--tb2-primary);
    color: #fff;
}

/* ── DROPDOWN ────────────────────────────────────────────────────────────────── */
.dropdown-menu {
    font-family: var(--tb2-font-main);
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius);
    box-shadow: var(--tb2-shadow);
    padding: 0.35rem;
    min-width: 180px;
}

.dropdown-item {
    font-size: 0.9375rem;
    color: var(--tb2-dark);
    border-radius: var(--tb2-radius-sm);
    padding: 0.5rem 0.85rem;
    transition: background 0.15s, color 0.15s;
}

.dropdown-item:hover, .dropdown-item:focus {
    background: rgba(0, 71, 171, 0.07);
    color: var(--tb2-primary);
}

.dropdown-item.active, .dropdown-item:active {
    background: var(--tb2-primary);
    color: #fff;
}

.dropdown-divider { border-color: #E5E7EB; margin: 0.3rem 0; }

.dropdown-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--tb2-grey);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.4rem 0.85rem 0.2rem;
}

.dropdown-toggle::after { opacity: 0.6; }

/* ── ACCORDION ───────────────────────────────────────────────────────────────── */
.accordion-item {
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius) !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion-button {
    font-family: var(--tb2-font-main);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--tb2-dark);
    background: #fff;
    padding: 0.9rem 1.25rem;
}

.accordion-button:not(.collapsed) {
    color: var(--tb2-primary);
    background: rgba(0, 71, 171, 0.05);
    box-shadow: none;
}

.accordion-button::after {
    filter: none;
    opacity: 0.6;
}

.accordion-button:not(.collapsed)::after {
    filter: none;
    opacity: 1;
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.12);
    border-color: var(--tb2-primary);
}

.accordion-body {
    padding: 0.9rem 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--tb2-dark);
    border-top: 1px solid #E5E7EB;
}

/* ── MODALS ──────────────────────────────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: var(--tb2-radius-lg);
    box-shadow: var(--tb2-shadow-lg);
    font-family: var(--tb2-font-main);
}

.modal-header {
    border-bottom: 1px solid #E5E7EB;
    padding: 1.1rem 1.5rem;
    background: var(--tb2-light-grey);
    border-radius: var(--tb2-radius-lg) var(--tb2-radius-lg) 0 0;
}

.modal-title {
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--tb2-dark);
}

.modal-body {
    padding: 1.25rem 1.5rem;
    color: var(--tb2-dark);
    line-height: 1.65;
}

.modal-footer {
    border-top: 1px solid #E5E7EB;
    padding: 0.85rem 1.5rem;
    gap: 0.5rem;
}

.modal-backdrop.show { opacity: 0.4; }

/* ── TOOLTIPS & POPOVERS ─────────────────────────────────────────────────────── */
.tooltip .tooltip-inner {
    background: var(--tb2-dark);
    font-family: var(--tb2-font-main);
    font-size: 0.8125rem;
    border-radius: var(--tb2-radius-sm);
    padding: 0.35rem 0.75rem;
}

.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before    { border-top-color:    var(--tb2-dark); }
.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,
.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: var(--tb2-dark); }
.bs-tooltip-auto[data-popper-placement^=start] .tooltip-arrow::before,
.bs-tooltip-start .tooltip-arrow::before  { border-left-color:   var(--tb2-dark); }
.bs-tooltip-auto[data-popper-placement^=end] .tooltip-arrow::before,
.bs-tooltip-end .tooltip-arrow::before    { border-right-color:  var(--tb2-dark); }

.popover {
    font-family: var(--tb2-font-main);
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius);
    box-shadow: var(--tb2-shadow);
}

.popover-header {
    background: var(--tb2-light-grey);
    border-bottom: 1px solid #E5E7EB;
    font-weight: 700;
    color: var(--tb2-dark);
    border-radius: var(--tb2-radius) var(--tb2-radius) 0 0;
}

.popover-body { color: var(--tb2-dark); font-size: 0.9rem; }

/* ── PROGRESS ────────────────────────────────────────────────────────────────── */
.progress {
    height: 8px;
    background: #E5E7EB;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    background: var(--tb2-primary);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.progress-bar.bg-success  { background: var(--tb2-success) !important; }
.progress-bar.bg-danger   { background: #EF4444 !important; }
.progress-bar.bg-warning  { background: #F59E0B !important; }
.progress-bar.bg-info     { background: var(--tb2-secondary) !important; }

/* ── SPINNERS ────────────────────────────────────────────────────────────────── */
.spinner-border { color: var(--tb2-primary); }
.spinner-grow   { color: var(--tb2-primary); }

.spinner-border.text-primary, .spinner-grow.text-primary { color: var(--tb2-primary) !important; }

/* ── TOASTS ──────────────────────────────────────────────────────────────────── */
.toast {
    font-family: var(--tb2-font-main);
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius);
    box-shadow: var(--tb2-shadow);
    font-size: 0.9375rem;
}

.toast-header {
    background: var(--tb2-light-grey);
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
    color: var(--tb2-dark);
}

/* ── OFFCANVAS ───────────────────────────────────────────────────────────────── */
.offcanvas {
    font-family: var(--tb2-font-main);
}

.offcanvas-header {
    border-bottom: 1px solid #E5E7EB;
    padding: 1.1rem 1.5rem;
    background: var(--tb2-light-grey);
}

.offcanvas-title {
    font-weight: 700;
    color: var(--tb2-dark);
}

/* ── BREADCRUMB ──────────────────────────────────────────────────────────────── */
.breadcrumb {
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--tb2-grey);
    content: "›";
}

.breadcrumb-item a {
    color: var(--tb2-primary);
    text-decoration: none;
}

.breadcrumb-item a:hover { text-decoration: underline; }

.breadcrumb-item.active { color: var(--tb2-grey); }

/* ── CLOSE BUTTON ────────────────────────────────────────────────────────────── */
.btn-close {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-close:hover { opacity: 1; }

/* ==========================================================================
   PAGE D'ERREUR (404, 403, 500)
   ========================================================================== */

.tb2-error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--tb2-light-grey);
    font-family: var(--tb2-font-main);
}

/* Header */
.tb2-error-header {
    background: #fff;
    border-bottom: 1px solid #E5E7EB;
    padding: 0.75rem 0;
}

.tb2-error-header-inner {
    max-width: var(--tb2-container, 1200px);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tb2-error-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.tb2-error-brand img {
    height: 48px;
    width: auto;
}

.tb2-error-sitename {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tb2-dark);
}

.tb2-btn-home {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tb2-primary);
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border: 1.5px solid var(--tb2-primary);
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.tb2-btn-home:hover {
    background: var(--tb2-primary);
    color: #fff;
}

/* Main */
.tb2-error-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.tb2-error-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
}

/* Grand chiffre décoratif */
.tb2-error-code {
    font-size: clamp(7rem, 20vw, 12rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--tb2-primary) 0%, var(--tb2-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.12;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.05em;
}

/* Corps du message */
.tb2-error-body {
    position: relative;
    padding-top: 3rem;
}

.tb2-error-icon {
    margin-bottom: 1.25rem;
}

.tb2-error-heading {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--tb2-dark);
    margin: 0 0 0.75rem;
}

.tb2-error-text {
    font-size: 1.0625rem;
    color: var(--tb2-grey);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.tb2-error-suggestions {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: inline-flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
}

.tb2-error-suggestions li {
    font-size: 0.9375rem;
    color: var(--tb2-grey);
    padding-left: 1.25rem;
    position: relative;
}

.tb2-error-suggestions li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--tb2-secondary);
    font-weight: 600;
}

/* CTA bouton */
.tb2-error-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--tb2-accent);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.8rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(255, 140, 90, 0.35);
}

.tb2-error-cta:hover {
    background: #e67340;
    color: #fff;
    transform: translateY(-1px);
}

/* Debug */
.tb2-error-debug {
    margin-top: 2.5rem;
    text-align: left;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--tb2-grey);
}

.tb2-error-debug summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--tb2-dark);
}

.tb2-error-debug-body {
    margin-top: 0.75rem;
    overflow-x: auto;
}

/* Footer */
.tb2-error-footer {
    background: var(--tb2-dark);
    padding: 1rem 0;
}

.tb2-error-footer-inner {
    max-width: var(--tb2-container, 1200px);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
}

.tb2-error-footer-inner a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s;
}

.tb2-error-footer-inner a:hover {
    color: var(--tb2-secondary);
}

.tb2-error-footer-sep {
    opacity: 0.35;
}
/* -------------------------------------------------- */
/* HERO                                                */
/* -------------------------------------------------- */

#sp-page-builder .page-content .sppb-section.tb2-hero,
.tb2-hero {
    padding: 8rem 0 13rem 0 !important;
    /* background-image: linear-gradient(135deg, rgb(0, 71, 171) 0%, rgb(0, 53, 128) 50%, rgb(0, 31, 77) 100%) !important; */
}

@media (max-width: 1800px) {
    #sp-page-builder .page-content .sppb-section.tb2-hero,
    .tb2-hero {
        padding: 5rem 0 10rem 0 !important;
    }
}

.tb2-hero .tb2-hero-content,
.sppb-section.tb2-hero .tb2-hero-content {
    max-width: 900px;
}

.tb2-hero-title,
.sppb-section.tb2-hero .tb2-hero-title {
    font-size: 3rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 1rem !important;
    line-height: 1.2 !important;
}

.tb2-hero-text,
.sppb-section.tb2-hero .tb2-hero-text {
    font-size: 1.15rem !important;
    color: rgba(255,255,255,.9) !important;
    margin-bottom: 1.75rem !important;
    max-width: 720px !important;
    line-height: 1.7 !important;
}

.tb2-hero-buttons,
.sppb-section.tb2-hero .tb2-hero-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
}

/* Buttons */
.tb2-btn {
    padding: 1rem 2rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.tb2-btn-primary {
    background: #FF6B35 !important;
    color: #fff !important;
}

.tb2-btn-secondary {
    background: rgba(255,255,255,.1) !important;
    color: #fff !important;
    border: 2px solid rgba(255,255,255,.5) !important;
}

/* ==========================================================================
   FEATURE CARDS — Cartes de fonctionnalités (homepage SP Page Builder)
   ========================================================================== */

/* SPB génère des box-shadow inline sur .sppb-column — on les neutralise sur
   la section feature cards (section-id fixe) et on laisse la border de la card */
#section-id-53ff82d2-36b2-4123-99dc-b90a8e550afb .sppb-column,
#section-id-53ff82d2-36b2-4123-99dc-b90a8e550afb .sppb-addon-wrapper {
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
}

.tb2-feature-card {
    background: #fff;
    border-radius: var(--tb2-radius-lg);
    padding: 2rem;
    height: 100%;
    border: 1px solid #E5E7EB;
    box-shadow: none !important;
    position: relative;
    overflow: hidden;
    transition: var(--tb2-transition);
}

.tb2-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.35s ease;
}

.tb2-feature-card:hover::before {
    transform: scaleX(1);
}

.tb2-feature-card:hover {
    box-shadow: none !important;
}

.tb2-border-blue::before  { background: var(--tb2-primary); }
.tb2-border-cyan::before  { background: var(--tb2-secondary); }
.tb2-border-orange::before{ background: var(--tb2-accent); }

.tb2-feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.tb2-feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tb2-dark);
    margin-bottom: 0.75rem;
}

.tb2-feature-card p {
    color: var(--tb2-grey);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.tb2-link {
    color: var(--tb2-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--tb2-transition);
}

.tb2-link:hover {
    color: var(--tb2-secondary);
    text-decoration: underline;
}

/* ── Feature card as clickable block with arrow (CSS-only) ─────────────────── */
a.tb2-feature-card {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    align-items: stretch;
    padding: 0;
}

a.tb2-feature-card > div {
    flex: 1;
    padding: 2rem;
    min-width: 0;
}

a.tb2-feature-card > div > img:first-child {
    display: block;
    margin-bottom: 1rem;
}

a.tb2-feature-card > div > span:last-child {
    color: var(--tb2-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

a.tb2-feature-card::after {
    content: '';
    display: block;
    width: 56px;
    flex-shrink: 0;
    border-left: 1px solid #F3F4F6;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23D1D5DB' stroke-width='2'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5l7 7-7 7'/%3E%3C/svg%3E") center center no-repeat;
    transition: background 0.25s ease;
}

a.tb2-feature-card:hover::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230047AB' stroke-width='2'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5l7 7-7 7'/%3E%3C/svg%3E") center center no-repeat #F8FAFF;
}

a.tb2-feature-card.tb2-border-cyan:hover::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300B4D8' stroke-width='2'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5l7 7-7 7'/%3E%3C/svg%3E") center center no-repeat #F0FBFE;
}

a.tb2-feature-card.tb2-border-orange:hover::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23FF8C5A' stroke-width='2'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5l7 7-7 7'/%3E%3C/svg%3E") center center no-repeat #FFF8F5;
}

/* ==========================================================================
   SUB-HERO — Bande "Premiers pas" (homepage SP Page Builder)
   ========================================================================== */

.sppb-section.tb2-sub-hero {
    background: var(--tb2-light-grey);
    padding: 1.5rem 0;
}

.tb2-subhero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: var(--tb2-container);
    margin: 0 auto;
    padding: 0 var(--tb2-padding);
}

.tb2-subhero-text {
    font-weight: 600;
    color: #1A1D29;
    font-size: 1.1rem;
    margin: 0;
}

.tb2-btn-blue {
    background: #0047AB;
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s ease;
    white-space: nowrap;
}

.tb2-btn-blue:hover {
    background: var(--tb2-primary-dark);
    color: #fff;
}

/**
 * Telebib2 — Bootstrap Overrides for MIG Component
 * Surcharge des styles Bootstrap pour intégrer la charte Telebib2
 * À inclure après les CSS Bootstrap dans le template Joomla
 */

/* ────────────────────────────────────────────────────
   VARIABLES TELEBIB2
   ──────────────────────────────────────────────────── */
:root {
    --tb2-blue:          #0047AB;
    --tb2-blue-dark:     #003580;
    --tb2-blue-light:    #E8EEF9;
    --tb2-blue-muted:    #D0DDEF;
    --tb2-cyan:          #00B4D8;
    --tb2-cyan-light:    #E0F7FC;
    --tb2-orange:        #FF6B35;
    --tb2-orange-light:  #FFF0EB;
    --tb2-dark:          #1A1D29;
    --tb2-grey:          #6B7280;
    --tb2-grey-light:    #F3F4F6;
    --tb2-border:        #E5E7EB;
    --tb2-white:         #FFFFFF;
    --tb2-radius:        8px;
    --tb2-radius-lg:     12px;
}

/* ────────────────────────────────────────────────────
   TYPOGRAPHIE GÉNÉRALE
   ──────────────────────────────────────────────────── */
body {
    font-family: 'DM Sans', sans-serif;
    color: var(--tb2-dark);
    background: var(--tb2-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: var(--tb2-dark);
}

.com-telebib-migs h2.mb-4 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--tb2-blue);
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--tb2-blue);
    margin-bottom: 2rem !important;
}

/* ────────────────────────────────────────────────────
   FILTRES — Release dropdown + radio buttons
   ──────────────────────────────────────────────────── */
#filter_form .col-form-label.fw-semibold {
    color: var(--tb2-dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#filter_form .form-select {
    border: 1.5px solid var(--tb2-border);
    border-radius: var(--tb2-radius);
    color: var(--tb2-dark);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    background-color: var(--tb2-white);
    transition: border-color 0.2s ease;
}

#filter_form .form-select:focus {
    border-color: var(--tb2-blue);
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.12);
    outline: none;
}

/* Radio buttons */
#filter_form .form-check-input {
    border-color: var(--tb2-blue);
    cursor: pointer;
}

#filter_form .form-check-input:checked {
    background-color: var(--tb2-blue);
    border-color: var(--tb2-blue);
}

#filter_form .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.12);
}

#filter_form .form-check-label {
    font-size: 0.9rem;
    color: var(--tb2-grey);
    cursor: pointer;
}

/* ────────────────────────────────────────────────────
   BOUTONS DE CATÉGORIE (Contrats / Sinistres / etc.)
   ──────────────────────────────────────────────────── */
#filter_form .btn-primary {
    background-color: var(--tb2-blue);
    border-color: var(--tb2-blue);
    color: var(--tb2-white);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 2rem;
    padding: 0.45rem 1.25rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
}

#filter_form .btn-primary:hover,
#filter_form .btn-primary:focus {
    background-color: var(--tb2-blue-dark);
    border-color: var(--tb2-blue-dark);
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.25);
}

#filter_form .btn-outline-primary {
    color: var(--tb2-blue);
    border-color: var(--tb2-blue);
    background-color: transparent;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 2rem;
    padding: 0.45rem 1.25rem;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#filter_form .btn-outline-primary:hover,
#filter_form .btn-outline-primary:focus {
    background-color: var(--tb2-blue-light);
    color: var(--tb2-blue);
    border-color: var(--tb2-blue);
    box-shadow: 0 2px 8px rgba(0, 71, 171, 0.15);
}

/* ────────────────────────────────────────────────────
   ACCORDÉONS — Structure principale
   ──────────────────────────────────────────────────── */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.accordion-item {
    border: 1.5px solid var(--tb2-border);
    border-radius: var(--tb2-radius-lg) !important;
    overflow: hidden;
    background: var(--tb2-white);
    transition: box-shadow 0.2s ease;
}

.accordion-item:hover {
    box-shadow: 0 2px 12px rgba(0, 71, 171, 0.08);
}

/* Header de l'accordéon */
.accordion-header {
    margin: 0;
}

.accordion-button {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.975rem;
    color: var(--tb2-dark);
    background-color: var(--tb2-white);
    border: none;
    padding: 1rem 1.25rem;
    border-radius: var(--tb2-radius-lg) !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* CORRECTION : supprimer le comportement orange/bleu Bootstrap par défaut */
.accordion-button:not(.collapsed) {
    color: var(--tb2-blue);
    background-color: var(--tb2-blue-light);
    box-shadow: inset 0 -1px 0 var(--tb2-blue-muted);
}

.accordion-button:hover {
    background-color: var(--tb2-grey-light);
    color: var(--tb2-blue);
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.12);
    outline: none;
}

/* Flèche de l'accordéon — en bleu */
.accordion-button::after {
    filter: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230047AB'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230047AB'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

/* Corps de l'accordéon ouvert */
.accordion-collapse.show .accordion-body {
    border-top: 1px solid var(--tb2-border);
}

.accordion-body {
    padding: 0;
    background: var(--tb2-white);
}

/* ────────────────────────────────────────────────────
   TABLEAU DES MIGs dans les accordéons
   ──────────────────────────────────────────────────── */
.accordion-body .table {
    margin: 0;
    font-size: 0.9rem;
}

.accordion-body .table tbody tr {
    border-bottom: 1px solid var(--tb2-border);
    transition: background-color 0.15s ease;
}

.accordion-body .table tbody tr:last-child {
    border-bottom: none;
}

.accordion-body .table tbody tr:hover {
    background-color: var(--tb2-row-hover);
}

.accordion-body .table td {
    padding: 0.75rem 1.25rem;
    vertical-align: middle;
    border: none;
}

/* Code message — colonne 1 */
.accordion-body .table td:first-child .fw-bold {
    font-family: 'Calibri', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--tb2-blue);
    background: var(--tb2-blue-light);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Lien vers le MIG — colonne 2 — classe Bootstrap link-primary */
.accordion-body .table a.link-primary {
    color: var(--tb2-dark) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.accordion-body .table a.link-primary:hover {
    color: var(--tb2-blue) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* Lien Définitions — colonne 4 — classe Bootstrap link-secondary */
.accordion-body .table a.link-secondary {
    color: var(--tb2-grey) !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.accordion-body .table a.link-secondary:hover {
    color: var(--tb2-blue) !important;
}

/* Icône livre avant "Définitions" */
.accordion-body .table .fa-book-open {
    color: var(--tb2-cyan);
}

/* ────────────────────────────────────────────────────
   BADGES — Modifié / Non modifié
   ──────────────────────────────────────────────────── */

/* "Non modifié" — text-bg-light : effacé, juste un contour */
.badge.rounded-pill.text-bg-light {
    background-color: transparent !important;
    color: var(--tb2-grey) !important;
    border: 1px solid var(--tb2-border);
    font-weight: 400;
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
}

/* "Modifié" — text-bg-secondary : orange charte Telebib2 */
.badge.rounded-pill.text-bg-secondary {
    background-color: var(--tb2-orange-light) !important;
    color: var(--tb2-orange) !important;
    border: 1px solid rgba(255, 107, 53, 0.3);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
}

/* ────────────────────────────────────────────────────
   COMPTEUR DE RÉSULTATS
   ──────────────────────────────────────────────────── */
.text-muted.small.mt-2 {
    color: var(--tb2-grey) !important;
    font-size: 0.825rem;
    margin-top: 1.5rem !important;
    padding-top: 0.75rem;
    border-top: 1px solid var(--tb2-border);
}

/* ────────────────────────────────────────────────────
   STRIPED TABLE — supprimer le gris Bootstrap
   ──────────────────────────────────────────────────── */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: var(--tb2-grey-light);
    color: var(--tb2-dark);
}

/* ────────────────────────────────────────────────────
   BREADCRUMB
   ──────────────────────────────────────────────────── */
.mod-breadcrumbs__wrapper {
    font-size: 0.85rem;
}

.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--tb2-blue);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--tb2-grey);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--tb2-grey);
}

/* ────────────────────────────────────────────────────
   RESPONSIVE — Mobile
   ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    #filter_form .col-auto {
        width: 100%;
    }

    #filter_form .btn-primary,
    #filter_form .btn-outline-primary {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }

    .accordion-body .table td {
        padding: 0.6rem 0.75rem;
    }

    .accordion-button {
        font-size: 0.9rem;
        padding: 0.875rem 1rem;
    }
}

/* ==========================================================================
   SELECT - Accordion-style angle-down arrow
   ========================================================================== */

#telebib-release {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230047AB'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2em 1.2em;
}

/* Caret down sur les selects de version (MCI) et de release (MIG) */
#tb2-mci-version-select,
#tb2-migs-release-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230047AB'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 1em 1em;
    padding-right: 2.25rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ==========================================================================
   TABLE - Hover row
   ========================================================================== */

.table > tbody > tr:hover > * {
    --bs-table-accent-bg: transparent;
    background-color: var(--tb2-row-hover);
    transition: background-color 0.15s ease;
}

/* ==========================================================================
   TIMELINE - Vertical timeline for category layout "timeline"
   ========================================================================== */

.tb2-timeline {
    position: relative;
    max-width: var(--tb2-container);
    margin: 4rem auto;
    padding: 2rem 1rem;
}

/* Central vertical line */
.tb2-timeline__line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--tb2-secondary), var(--tb2-primary));
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Each timeline item */
.tb2-timeline__item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: -1.5rem;
    width: 50%;
}

.tb2-timeline__item--left {
    justify-content: flex-end;
    padding-right: 3rem;
    align-self: flex-start;
    margin-left: 0;
}

.tb2-timeline__item--right {
    justify-content: flex-start;
    padding-left: 3rem;
    align-self: flex-start;
    margin-left: 50%;
}

/* Dot on the line */
.tb2-timeline__dot {
    position: absolute;
    top: 1.2rem;
    width: 14px;
    height: 14px;
    background: var(--tb2-primary);
    border: 3px solid var(--tb2-white, #fff);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--tb2-primary);
    z-index: 2;
}

.tb2-timeline__item--left .tb2-timeline__dot {
    right: -7px;
}

.tb2-timeline__item--right .tb2-timeline__dot {
    left: -7px;
}

/* Content card */
.tb2-timeline__content {
    background: var(--tb2-white, #fff);
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius, 8px);
    padding: 1.5rem 2rem;
    max-width: 480px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tb2-timeline__content:hover {
    transform: translateY(-2px);
    border-color: var(--tb2-secondary);
}

/* Date label */
.tb2-timeline__date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--tb2-white, #fff);
    background: var(--tb2-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

/* Title */
.tb2-timeline__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tb2-dark);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

/* Text */
.tb2-timeline__text {
    font-size: 0.925rem;
    line-height: 1.7;
    color: var(--tb2-grey, #6B7280);
    margin: 0;
}

/* ── Timeline responsive ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .tb2-timeline__line {
        left: 24px;
    }

    .tb2-timeline__item {
        width: 100%;
        margin-left: 0;
        margin-bottom: 2rem;
        padding-left: 3.5rem;
        padding-right: 0;
        justify-content: flex-start;
    }

    .tb2-timeline__item--left {
        padding-right: 0;
        padding-left: 3.5rem;
        justify-content: flex-start;
    }

    .tb2-timeline__item--right {
        margin-left: 0;
    }

    .tb2-timeline__dot {
        left: 18px !important;
        right: auto !important;
    }

    .tb2-timeline__content {
        max-width: 100%;
    }
}



/* ================================================== */
/* DATAMODEL — Articles "Modèle de données"            */
/* Ciblé via .tb2-datamodel (parent) — pas de classes  */
/* utilitaires dans le HTML.                           */
/* HTML : <div class="tb2-datamodel" data-group="…">   */
/*           <header><span class="tag">…</span><h1>…</h1></header> */
/*           <div class="row g-4 align-items-start body"> */
/*             <div class="col-lg-5"><figure>…</figure></div> */
/*             <div class="col-lg-7 text">…</div>      */
/*           </div>                                    */
/*           <nav class="pager">…</nav>                */
/*        </div>                                       */
/* ================================================== */

.tb2-datamodel { max-width: 100%; }

/* — En-tête — */
.tb2-datamodel > header {
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}
.tb2-datamodel > header > h1,
.tb2-datamodel > header > h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--tb2-dark);
    line-height: 1.25;
    margin: 0 !important;
}

/* — Tag (groupe) — couleur via [data-group], alignée sur les puces sidebar — */
.tb2-datamodel .tag {
    display: inline-block;
    border-radius: 4px;
    padding: 2px 10px;
    margin-bottom: 2px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.6;
    background: #f1f5f9;
    color: #475569;
}
.tb2-datamodel[data-group="intro"]     .tag { background: #f1f5f9; color: #475569; } /* slate */
.tb2-datamodel[data-group="contracts"] .tag { background: #003e94; color: #ffffff; } /* cobalt */
.tb2-datamodel[data-group="claims"]    .tag { background: #4b5563; color: #ffffff; } /* slate foncé */
.tb2-datamodel[data-group="finance"]   .tag { background: #85bef1; color: #ffffff; } /* bleu clair */
/* Section Documentation — série JSON */
.tb2-datamodel[data-group="understand"] .tag { background: #0f766e; color: #ffffff; } /* teal   — Comprendre */
.tb2-datamodel[data-group="read"]       .tag { background: #1d4ed8; color: #ffffff; } /* bleu   — Lire un message */
.tb2-datamodel[data-group="orient"]     .tag { background: #6d28d9; color: #ffffff; } /* violet — S.orienter */
.tb2-datamodel[data-group="write"]      .tag { background: #b45309; color: #ffffff; } /* ambre  — Ecrire et valider */
.tb2-datamodel[data-group="follow"]     .tag { background: #4b5563; color: #ffffff; } /* slate  — Suivre les releases */
.tb2-datamodel[data-group="json"]      .tag { background: #0f766e; color: #ffffff; } /* teal  — Fondations */
.tb2-datamodel[data-group="registry"]  .tag { background: #1d4ed8; color: #ffffff; } /* bleu  — Le registre */
.tb2-datamodel[data-group="implement"] .tag { background: #b45309; color: #ffffff; } /* ambre — Implémenter */
.tb2-datamodel[data-group="caveats"]   .tag { background: #9f1239; color: #ffffff; } /* rubis — Points d'attention */
.tb2-datamodel[data-group="lifecycle"] .tag { background: #4b5563; color: #ffffff; } /* slate — Cycle de vie */
.tb2-datamodel[data-group="reference"] .tag { background: #f1f5f9; color: #475569; } /* clair — Référence */
/* Articles en pleine largeur (pas de colonne diagramme) : code et listes. */
.tb2-datamodel .text > pre {
   font-size: 0.82rem;
   line-height: 1.6;
   padding: 1.1rem 1.3rem;
   margin: 0 0 1.15rem;
}
.tb2-datamodel .text > ul,
.tb2-datamodel .text > ol {
   font-size: 14px;
   color: #374151;
   line-height: 1.78;
   margin-bottom: 12px;
}
/* Figure intercalée dans le flux du texte (la règle de base a margin: 0,
  pensée pour la colonne diagramme des articles du modèle de données).
  Largeur limitée à 60 % et centrée : en pleine largeur, un diagramme
  écrase le texte qui l'entoure. */
.tb2-datamodel .text > figure {
   max-width: 60%;
   margin: 1.6rem auto 1.9rem;
}
@media (max-width: 991px) {
   .tb2-datamodel .text > figure {
       max-width: 100%;
   }
}
/* — Sections à deux colonnes : le texte à gauche, le code ou le visuel à
    droite. La colonne de contenu fait ~1100px : en pleine largeur, une
    ligne de texte dépasse les 140 caractères, bien au-delà du confortable.
    Le titre de section est HORS de la grille, en pleine largeur : les deux
    colonnes démarrent ainsi exactement au même niveau sous lui.
    Markup attendu :
<div class="tb2-section">
<h3 class="tb2-section-title">…</h3>
<div class="row g-4 align-items-start">
<div class="col-lg-6 text"> … </div>
<div class="col-lg-6 code"> <pre> ou <figure> </div>
</div>
</div>                                                              */
.tb2-datamodel .tb2-section + .tb2-section {
   margin-top: 2rem;
}
.tb2-datamodel .tb2-section-title {
   font-size: 15px;
   font-weight: 700;
   color: var(--tb2-dark);
   line-height: 1.35;
   margin: 0 0 14px;
   padding-bottom: 9px;
   border-bottom: 1px solid #f0f0f0;
}
/* min-width: 0 — sans quoi un <pre> long refuse de rétrécir et fait
  déborder la grille au lieu de défiler dans son propre cadre. */
.tb2-datamodel .code {
   min-width: 0;
}
.tb2-datamodel .code > pre {
   font-size: 0.78rem;
   line-height: 1.6;
   padding: 1.1rem 1.2rem;
   margin: 0 0 1.15rem;
}
.tb2-datamodel .code > figure {
   margin: 0 0 1.15rem;
}
/* Plusieurs blocs empilés dans la colonne de droite : on les espace,
  sauf le premier qui doit rester aligné sur le haut du texte. */
.tb2-datamodel .code > pre + pre {
   margin-top: 1.15rem;
}
/* Libellé au-dessus d'un bloc de code : « Écarté » / « Retenu », etc. */
.tb2-datamodel .code > p.tb2-code-label {
   margin: 0 0 7px;
   font-size: 11px;
   font-weight: 700;
   letter-spacing: .4px;
   text-transform: uppercase;
   color: #6b7280;
   line-height: 1.45;
}
.tb2-datamodel .code > pre + p.tb2-code-label {
   margin-top: 1.3rem;
}
/* Le titre porte désormais la respiration de la section : le premier
  paragraphe d'une colonne ne doit plus faire chapô, ni décaler la
  colonne de code d'une marge haute. Le vrai chapô d'article se marque
  explicitement avec .tb2-lede. */
.tb2-datamodel .tb2-section .text > p:first-child {
   font-size: 14px;
   font-weight: 400;
   color: #374151;
   line-height: 1.78;
}
.tb2-datamodel .tb2-section .text > *:first-child {
   margin-top: 0;
}
.tb2-datamodel .text > p.tb2-lede {
   font-size: 15px;
   font-weight: 500;
   color: var(--tb2-dark);
   line-height: 1.7;
}
/* En pleine largeur (col-12), on borne la mesure du texte mais pas celle
  des blocs de code ni des figures, qui ont besoin de la place. */
.tb2-datamodel .col-12.text > p,
.tb2-datamodel .col-12.text > ul,
.tb2-datamodel .col-12.text > ol,
.tb2-datamodel .col-12.text > aside {
   max-width: 82ch;
}
/* — Glossaire — */
.tb2-glossary-nav {
   display: flex;
   flex-wrap: wrap;
   gap: 6px;
   margin: 1.2rem 0 1.8rem;
   padding-bottom: 1.2rem;
   border-bottom: 1px solid #f0f0f0;
}
.tb2-glossary-nav a {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-width: 30px;
   height: 30px;
   padding: 0 6px;
   border: 1px solid #e5e7eb;
   border-radius: 6px;
   background: #fff;
   color: #4b5563;
   font-size: 12px;
   font-weight: 700;
   text-decoration: none;
   transition: background .12s, color .12s, border-color .12s;
}
.tb2-glossary-nav a:hover {
   background: #f0f5ff;
   border-color: var(--tb2-primary);
   color: var(--tb2-primary);
   text-decoration: none;
}
.tb2-glossary {
   margin: 0;
   /* Meme mesure de lecture que le reste : sans borne, une definition
      occupe les ~1100px de la colonne de contenu. */
   max-width: 88ch;
}
.tb2-glossary dt {
   font-size: 14.5px;
   font-weight: 700;
   color: var(--tb2-primary);
   margin: 22px 0 0;
   padding-top: 14px;
   border-top: 1px solid #f3f4f6;
   /* En-tête collant du site : évite que l'ancre se cache dessous. */
   scroll-margin-top: 110px;
}
.tb2-glossary dt:first-of-type {
   margin-top: 0;
   padding-top: 0;
   border-top: none;
}
.tb2-glossary dd {
   margin: 6px 0 0;
   font-size: 14px;
   color: #374151;
   line-height: 1.78;
}
.tb2-glossary dd code {
   font-size: 0.85em;
}
/* — Corps : diagramme + texte — */
.tb2-datamodel .body { margin-bottom: 0; }

.tb2-datamodel figure {
    background: #f8faff;
    border: 1px solid #dde8ff;
    border-radius: 8px;
    padding: 16px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tb2-datamodel figure img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}
.tb2-datamodel figcaption {
    font-size: 11.5px;
    color: #6b7280;
    text-align: center;
    font-style: italic;
    margin-top: 8px;
    line-height: 1.5;
}

/* — Colonne texte — */
.tb2-datamodel .text > p {
    font-size: 14px;
    color: #374151;
    line-height: 1.78;
    margin-bottom: 12px;
}
/* Premier paragraphe = lead */
.tb2-datamodel .text > p:first-child {
    font-size: 15px;
    font-weight: 500;
    color: var(--tb2-dark);
    line-height: 1.7;
    margin-bottom: 16px;
}
.tb2-datamodel .text > h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--tb2-dark);
    margin: 18px 0 7px;
    padding-left: 11px;
    border-left: 3px solid var(--tb2-primary);
}

/* — Callout (aside) — */
.tb2-datamodel .text > aside {
    background: #f0f5ff;
    border-left: 3px solid var(--tb2-primary);
    border-radius: 0 8px 8px 0;
    padding: 13px 16px;
    font-size: 13.5px;
    color: #374151;
    line-height: 1.65;
    margin-top: 18px;
}
.tb2-datamodel .text > aside strong { color: var(--tb2-primary); }

/* — Pager prev / next — */
.tb2-datamodel .pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}
.tb2-datamodel .pager a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tb2-primary);
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.tb2-datamodel .pager a:hover {
    background: #f0f5ff;
    border-color: var(--tb2-primary);
    text-decoration: none;
}

/* — Responsive — */
@media (max-width: 991px) {
    .tb2-datamodel .body .col-lg-5,
    .tb2-datamodel .body .col-lg-7 {
        width: 100%;
    }
    .tb2-datamodel figure { margin-bottom: 1.5rem; }
}

/* ================================================== */
/* SIDEBAR — module mod_menu "Modèle de données"       */
/* Classe sur le module : tb2-sidenav                  */
/* ================================================== */

/* ================================================== */
/* SIDEBAR — module mod_menu "Modèle de données"       */
/* Classe sur le module : tb2-sidenav                  */
/* Markup produit par l'override mod_menu/default.php  */
/*   .tb2-sidenav-nav > .tb2-nav-group                 */
/*       > .tb2-nav-glabel (avec .tb2-nav-gdot)        */
/*       > a.tb2-nav-item (avec .active)               */
/* ================================================== */

.tb2-sidenav {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: sticky;
    top: 1rem;
}
/* En-tête bleu (titre du module) */
.tb2-sidenav .moduletable > h3,
.tb2-sidenav > h3 {
    background: var(--tb2-primary);
    color: #fff;
    margin: 0;
    padding: 13px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
}

/* Groupes */
.tb2-sidenav .tb2-nav-group {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
}
.tb2-sidenav .tb2-nav-group:last-child {
    border-bottom: none;
}

/* Label de groupe */
.tb2-sidenav .tb2-nav-glabel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px 5px;
    font-size: 10.5px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tb2-sidenav .tb2-nav-gdot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

/* Items */
.tb2-sidenav a.tb2-nav-item {
    display: block;
    padding: 5px 16px 5px 32px;
    font-size: 13px;
    color: #4b5563;
    text-decoration: none;
    border-left: 3px solid transparent;
    line-height: 1.45;
    transition: background .12s, color .12s;
}
.tb2-sidenav a.tb2-nav-item:hover {
    background: #f0f5ff;
    color: var(--tb2-primary);
}
.tb2-sidenav a.tb2-nav-item.active {
    background: #eef2ff;
    color: var(--tb2-primary);
    font-weight: 600;
    border-left-color: var(--tb2-primary);
}


/* ================================================== */
/* ================================================== */
/* LAYOUT main-row : sidebar gauche + contenu dans     */
/* le container. Layout classique de doc.              */
/* Wrapper rendu par index.php quand sidebar-left existe.*/
/* ================================================== */

.tb2-main-row {
    max-width: var(--tb2-container);
    margin: 0 auto;
    padding: 0 var(--tb2-padding) 4rem;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    min-height: 60vh;
}

.tb2-main-row > .container-component {
    min-width: 0;
}

.tb2-main-row > .container-sidebar-left {
    position: sticky;
    top: calc(var(--tb2-header-offset, 100px) + 1rem);
    width: 240px;
    align-self: start;
    max-height: calc(100vh - var(--tb2-header-offset, 100px) - 2rem);
    overflow-y: auto;
}

/* Sous 1200px : la sidebar est masquée et le contenu prend toute la largeur.
   La navigation reste accessible via le menu principal / le breadcrumb. */
@media (max-width: 1199.98px) {
    .tb2-main-row {
        display: block;
    }
    .tb2-main-row > .container-sidebar-left {
        display: none;
    }
}


/* ================================================== */
/* LIGHTBOX — image .tb2-datamodel agrandie au clic    */
/* ================================================== */
.tb2-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 10000;
    cursor: zoom-out;
}
.tb2-lightbox.is-open {
    display: flex;
}
.tb2-lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
}
.tb2-lightbox__close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background .15s;
}
.tb2-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   LANDING « LA NORME TELEBIB2 »
   Toutes les classes sont préfixées .tb2-landing__
   L'éditeur ne touche JAMAIS aux classes — uniquement texte/images/liens.
   ============================================================ */

/* ── HERO (Row Class : tb2-landing__hero) ────────────────── */
.tb2-landing__hero{
  background:linear-gradient(135deg,var(--tb2-primary) 0%,#003580 50%,#001F4D 100%) !important;
  color:#fff;padding:5rem 0 6rem !important;position:relative;overflow:hidden;
}
.tb2-landing__hero::before{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(circle at 20% 30%,rgba(0,180,216,.18) 0,transparent 50%),
    radial-gradient(circle at 80% 70%,rgba(255,140,90,.15) 0,transparent 50%);
  pointer-events:none;
}
.tb2-landing__hero .sppb-row-container,
.tb2-landing__hero .sppb-container-inner,
.tb2-landing__hero .container{position:relative;z-index:1}
.tb2-landing__hero .eyebrow{
  display:inline-block;font-size:.78rem;font-weight:700;letter-spacing:1.5px;
  text-transform:uppercase;padding:.4rem 1rem;border-radius:99px;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);
  color:#fff;margin-bottom:1.5rem;
}
.tb2-landing__hero h1{font-size:3.25rem;font-weight:700;line-height:1.1;margin-bottom:1.5rem;color:#fff}
.tb2-landing__hero p{font-size:1.15rem;opacity:.92;line-height:1.7;margin-bottom:2rem;max-width:560px;color:#fff}
.tb2-landing__hero .actions{display:flex;gap:1rem;flex-wrap:wrap}
.tb2-landing__hero-art{
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.15);
  border-radius:14px;padding:1.5rem;backdrop-filter:blur(8px);
}
.tb2-landing__hero-art img{border-radius:10px;display:block;max-width:100%;height:auto}

/* ── Boutons (scopés à la landing) ───────────────────────── */
.tb2-landing__hero .btn,
.tb2-landing__section .btn{
  display:inline-flex;align-items:center;gap:.5rem;
  padding:.95rem 1.75rem;border-radius:8px;
  font-weight:600;font-size:.95rem;border:0;cursor:pointer;text-decoration:none;
  transition:transform .2s,box-shadow .2s,background .2s;
}
.tb2-landing__hero .btn--primary,
.tb2-landing__section .btn--primary{background:var(--tb2-accent);color:#fff;box-shadow:0 4px 16px rgba(255,140,90,.35)}
.tb2-landing__hero .btn--primary:hover,
.tb2-landing__section .btn--primary:hover{background:#ff7a40;transform:translateY(-2px);color:#fff;opacity:1}
.tb2-landing__hero .btn--ghost{background:rgba(255,255,255,.1);color:#fff;border:1.5px solid rgba(255,255,255,.35)}
.tb2-landing__hero .btn--ghost:hover{background:rgba(255,255,255,.18);color:#fff;opacity:1}
.tb2-landing__section .btn--outline{background:transparent;color:var(--tb2-primary);border:1.5px solid var(--tb2-primary)}
.tb2-landing__section .btn--outline:hover{background:var(--tb2-primary);color:#fff;opacity:1}
.tb2-landing__section .btn--solid{background:var(--tb2-primary);color:#fff}
.tb2-landing__section .btn--solid:hover{background:#001F4D;color:#fff;opacity:1}

/* ── Sections génériques ─────────────────────────────────── */
.tb2-landing__section{padding:5rem 0 !important}
.tb2-landing__section--grey{background:#F8F9FB !important}

.tb2-landing__section-head{text-align:center;max-width:760px;margin:0 auto 3.5rem}
.tb2-landing__section-eyebrow{
  font-size:.78rem;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;
  color:var(--tb2-accent);margin-bottom:.85rem;
}
.tb2-landing__section-head h2{font-size:2.25rem;font-weight:700;margin-bottom:1rem;line-height:1.2}
.tb2-landing__section-head p{font-size:1.1rem;color:#6B7280;line-height:1.7}

/* ── 3 piliers Mission / Organisation / Histoire ─────────── */
.tb2-landing__pillars{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}
.tb2-landing__pillar{
  background:#fff;border:1px solid #E5E7EB;border-radius:14px;
  padding:2rem;text-align:center;transition:transform .25s,box-shadow .25s;
  position:relative;overflow:hidden;
}
.tb2-landing__pillar::before{
  content:"";position:absolute;top:0;left:0;right:0;height:4px;
  background:var(--tb2-primary);transform:scaleX(0);transform-origin:right;transition:transform .35s;
}
.tb2-landing__pillar:hover{transform:translateY(-4px);box-shadow:0 4px 24px rgba(0,71,171,.08)}
.tb2-landing__pillar:hover::before{transform:scaleX(1);transform-origin:left}
.tb2-landing__pillar-icon{
  width:56px;height:56px;margin:0 auto 1.25rem;border-radius:14px;
  background:linear-gradient(135deg,var(--tb2-primary),var(--tb2-secondary));
  display:flex;align-items:center;justify-content:center;color:#fff;
}
.tb2-landing__pillar h3{font-size:1.25rem;font-weight:700;margin-bottom:.6rem;color:var(--tb2-dark)}
.tb2-landing__pillar p{color:#6B7280;font-size:.95rem;margin-bottom:1.25rem;min-height:3em}
.tb2-landing__pillar a,
.tb2-landing__pillar-link{font-weight:600;font-size:.9rem;display:inline-flex;gap:.25rem;align-items:center;color:var(--tb2-primary)}
a.tb2-landing__pillar{text-decoration:none;color:inherit;display:block}
a.tb2-landing__pillar:hover .tb2-landing__pillar-link{text-decoration:underline}
a.tb2-landing__sla-card{text-decoration:none;color:inherit;display:block}

.tb2-landing__contact-strip{
  margin-top:3rem;background:#fff;border:1px solid #E5E7EB;border-radius:14px;
  padding:1.5rem 2rem;display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;
}
.tb2-landing__contact-strip strong{color:var(--tb2-primary)}

/* ── Features avec gros visuels ──────────────────────────── */
.tb2-landing__feature{display:grid;grid-template-columns:1fr 1fr;gap:4rem;align-items:center}
.tb2-landing__feature--reverse .tb2-landing__feature-text{order:2}
.tb2-landing__feature-text h3{font-size:1.65rem;font-weight:700;margin-bottom:1rem;line-height:1.25}
.tb2-landing__feature-text p{color:#6B7280;font-size:1.05rem;margin-bottom:1.25rem;line-height:1.8}
.tb2-landing__feature-text ul{list-style:none;margin:0 0 1.75rem;padding:0}
.tb2-landing__feature-text li{padding:.5rem 0 .5rem 1.75rem;position:relative;font-size:1rem}
.tb2-landing__feature-text li::before{
  content:"";position:absolute;left:0;top:.85rem;width:1.05rem;height:1.05rem;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300B4D8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center/contain;
}
.tb2-landing__feature-art{
  background:#fff;border:1px solid #E5E7EB;border-radius:14px;
  padding:2rem;box-shadow:0 4px 24px rgba(0,71,171,.08);
}
.tb2-landing__feature-art img{display:block;max-width:100%;height:auto;margin:0 auto}

/* ── Documentation : 2 sous-blocs ────────────────────────── */
.tb2-landing__doc{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;margin-bottom:2rem}
.tb2-landing__doc-block{
  background:#fff;border:1px solid #E5E7EB;border-radius:14px;
  padding:2rem;border-top:4px solid var(--tb2-primary);
}
.tb2-landing__doc-block--accent{border-top-color:var(--tb2-accent)}
.tb2-landing__doc-block h3{font-size:1.2rem;font-weight:700;margin-bottom:1.25rem;color:var(--tb2-primary)}
.tb2-landing__doc-block--accent h3{color:var(--tb2-accent)}
.tb2-landing__doc-block dl{display:grid;gap:1rem;margin:0}
.tb2-landing__doc-block dt{font-weight:700;font-size:.95rem;margin-bottom:.25rem;display:flex;align-items:center;gap:.5rem}
.tb2-landing__doc-block dt::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--tb2-secondary);flex-shrink:0}
.tb2-landing__doc-block--accent dt::before{background:var(--tb2-accent)}
.tb2-landing__doc-block dd{color:#6B7280;font-size:.95rem;line-height:1.65;padding-left:1rem;margin:0}

/* ── Europe ──────────────────────────────────────────────── */
.tb2-landing__europe{display:grid;grid-template-columns:1.4fr 1fr;gap:3.5rem;align-items:center}
.tb2-landing__europe-text h3{font-size:1.65rem;font-weight:700;margin-bottom:1rem}
.tb2-landing__europe-text p{color:#6B7280;font-size:1rem;line-height:1.8;margin-bottom:1.1rem}
.tb2-landing__europe-text .callout{
  margin-top:1.5rem;padding:1rem 1.25rem;border-left:4px solid var(--tb2-secondary);
  background:rgba(0,180,216,.06);border-radius:0 10px 10px 0;
  font-size:.95rem;color:var(--tb2-dark);
}
.tb2-landing__europe-card{
  background:linear-gradient(135deg,var(--tb2-secondary),var(--tb2-primary));
  color:#fff;padding:2.5rem;border-radius:14px;text-align:center;
}
.tb2-landing__europe-card-icon{font-size:3rem;margin-bottom:.75rem;opacity:.9}
.tb2-landing__europe-card h4{font-size:1.3rem;font-weight:700;margin-bottom:.5rem;color:#fff !important}
.tb2-landing__europe-card p{font-size:.95rem;opacity:.85;margin-bottom:1.5rem;color:#fff}

/* ── SLA ─────────────────────────────────────────────────── */
.tb2-landing__sla{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem;margin-bottom:2rem}

/* Card Intro pleine largeur, au-dessus des 3 SLA */
.tb2-landing__sla-intro{
  display:flex;align-items:center;gap:1.5rem;
  background:#fff;border:1px solid #E5E7EB;border-radius:14px;
  border-top:4px solid var(--tb2-dark);
  padding:1.5rem 2rem;margin-bottom:1.5rem;
  transition:transform .25s,box-shadow .25s;
}
.tb2-landing__sla-intro:hover{transform:translateY(-4px);box-shadow:0 4px 24px rgba(0,71,171,.08)}
.tb2-landing__sla-intro-tag{
  flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;
  min-width:56px;height:32px;padding:0 .85rem;border-radius:6px;
  background:var(--tb2-dark);color:#fff;font-weight:700;font-size:.85rem;
  letter-spacing:.5px;
}
.tb2-landing__sla-intro-body{flex:1}
.tb2-landing__sla-intro h3{font-size:1.15rem;font-weight:700;margin:0 0 .35rem}
.tb2-landing__sla-intro p{color:#6B7280;font-size:.95rem;line-height:1.6;margin:0}
.tb2-landing__sla-intro-arrow{
  flex-shrink:0;color:var(--tb2-primary);font-weight:700;font-size:1.1rem;
}

.tb2-landing__sla-card{
  background:#fff;border:1px solid #E5E7EB;border-radius:14px;
  padding:2rem;transition:transform .25s,box-shadow .25s;
  border-top:4px solid var(--tb2-primary);
}
.tb2-landing__sla-card:nth-child(2){border-top-color:var(--tb2-secondary)}
.tb2-landing__sla-card:nth-child(3){border-top-color:var(--tb2-accent)}
.tb2-landing__sla-card:hover{transform:translateY(-4px);box-shadow:0 4px 24px rgba(0,71,171,.08)}
.tb2-landing__sla-num{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:56px;height:32px;padding:0 .85rem;border-radius:6px;
  background:var(--tb2-primary);color:#fff;font-weight:700;font-size:.85rem;
  margin-bottom:1rem;letter-spacing:.5px;
}
.tb2-landing__sla-card:nth-child(2) .tb2-landing__sla-num{background:var(--tb2-secondary)}
.tb2-landing__sla-card:nth-child(3) .tb2-landing__sla-num{background:var(--tb2-accent)}
.tb2-landing__sla-card h3{font-size:1.15rem;font-weight:700;margin-bottom:.75rem}
.tb2-landing__sla-card p{color:#6B7280;font-size:.95rem;line-height:1.7;margin:0}

.tb2-landing__sla-meta{
  background:#fff;border:1px solid #E5E7EB;border-left:4px solid var(--tb2-secondary);
  border-radius:10px;padding:1rem 1.5rem;font-size:.95rem;color:#6B7280;
}
.tb2-landing__sla-meta strong{color:var(--tb2-dark)}

.tb2-landing__cta-row{text-align:center;margin-top:2.5rem}

/* ── Neutralisation des shadows SPPB inline ──────────────── */
.tb2-landing__hero,
.tb2-landing__section,
.tb2-landing__section--grey{box-shadow:none !important}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width:1080px){
  .tb2-landing__hero h1{font-size:2.5rem}
}
@media (max-width:860px){
  .tb2-landing__hero .container,
  .tb2-landing__feature,
  .tb2-landing__doc,
  .tb2-landing__europe{grid-template-columns:1fr}
  .tb2-landing__feature--reverse .tb2-landing__feature-text{order:0}
  .tb2-landing__pillars,
  .tb2-landing__sla{grid-template-columns:1fr}
  .tb2-landing__hero h1{font-size:2rem}
  .tb2-landing__section-head h2{font-size:1.7rem}
  .tb2-landing__section{padding:3.5rem 0 !important}
  .tb2-landing__hero{padding:3.5rem 0 4rem !important}
}

/* ==========================================================================
   DOWNLOADS LIST — Liste de fichiers à télécharger
   Utilisé dans les pages SPPB (raw_html addon)
   ========================================================================== */
.tb2-downloads__list {
    list-style: none;
    margin: 0;
    padding: 0 !important;
    border: 1px solid var(--tb2-border, #E5E7EB);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.tb2-downloads__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 !important;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--tb2-border, #E5E7EB);
    transition: background 0.15s;
}

.tb2-downloads__item:last-child {
    border-bottom: none;
}

.tb2-downloads__item:hover {
    background: #F8FAFC;
}

.tb2-downloads__label {
    flex: 1;
    font-size: 0.95rem;
    color: var(--tb2-dark);
    line-height: 1.5;
}

.tb2-downloads__label strong {
    font-weight: 600;
    color: var(--tb2-dark);
}

.tb2-downloads__label small {
    color: #6B7280;
    font-size: 0.85em;
}

.tb2-downloads__label a {
    color: var(--tb2-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.tb2-downloads__label a:hover {
    border-bottom-color: var(--tb2-primary);
}

.tb2-downloads__size {
    font-size: 0.8rem;
    color: #9CA3AF;
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

.tb2-downloads__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 110px;
    padding: 0.6rem 1.25rem;
    background: var(--tb2-primary);
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.tb2-downloads__btn:hover {
    background: #003580;
    color: #fff !important;
    transform: translateY(-1px);
}

.tb2-downloads__btn:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .tb2-downloads__item {
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
        padding: 1rem 1.25rem;
    }
    .tb2-downloads__label {
        flex: 1 1 100%;
    }
    .tb2-downloads__size {
        order: 2;
        flex: 1;
        text-align: left;
        min-width: auto;
    }
    .tb2-downloads__btn {
        order: 3;
        min-width: 100px;
    }
}

/* ==========================================================================
   UTILITAIRES RESPONSIVE
   ========================================================================== */
.tb2-hide-mobile {
    display: block;
}

@media (max-width: 860px) {
    .tb2-hide-mobile {
        display: none !important;
    }
}

/* ==========================================================================
   HERO GRID — Grille 2 colonnes pour hero SPPB
   ========================================================================== */
.tb2-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 860px) {
    .tb2-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ==========================================================================
   SP PAGE BUILDER — Overrides charte Telebib2
   Neutralise les couleurs par défaut (#3366FF, #6c7ae0, #1D9C61, etc.)
   et applique la palette de marque.
   ========================================================================== */

/* ── Boutons SPPB (sppb-btn-custom) ──────────────────────────────────────── */
.sp-page-builder .sppb-btn,
.sp-page-builder .sppb-btn-custom,
.sp-page-builder [id^="btn-"].sppb-btn-custom {
    background-color: var(--tb2-primary) !important;
    border-color: var(--tb2-primary) !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    padding: 0.6rem 1.25rem !important;
    line-height: 1.75 !important;
    letter-spacing: 0.01em;
    transition: background-color .2s, transform .15s !important;
    box-shadow: none !important;
}

.sp-page-builder .sppb-btn:hover,
.sp-page-builder .sppb-btn-custom:hover,
.sp-page-builder [id^="btn-"].sppb-btn-custom:hover {
    background-color: #003580 !important;
    border-color: #003580 !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* ── Feature Box ─────────────────────────────────────────────────────────── */
.sp-page-builder .sppb-addon-feature {
    background: #fff;
    border: 1px solid var(--tb2-border, #E5E7EB);
    border-radius: 14px;
    padding: 2rem 1.75rem;
    text-align: center;
    transition: transform .25s, box-shadow .25s;
    height: 100%;
}

.sp-page-builder .sppb-addon-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 24px rgba(0, 71, 171, .08);
}

.sp-page-builder .sppb-addon-feature .sppb-feature-box-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: var(--tb2-dark) !important;
    margin: 0 0 1rem !important;
}

.sp-page-builder .sppb-addon-feature .sppb-icon .sppb-icon-container {
    color: var(--tb2-primary) !important;
    background: rgba(0, 71, 171, .08);
    width: 64px !important;
    height: 64px !important;
    line-height: 64px !important;
    border-radius: 50% !important;
    margin-bottom: 1rem;
}

.sp-page-builder .sppb-addon-feature .sppb-icon .sppb-icon-container > i {
    font-size: 26px !important;
    width: auto !important;
    height: auto !important;
    line-height: 64px !important;
    color: var(--tb2-primary) !important;
}

.sp-page-builder .sppb-addon-feature .sppb-addon-text {
    color: #6B7280;
    font-size: .95rem;
    line-height: 1.7;
}

/* ── Accordion (sppb-addon-accordion) ────────────────────────────────────── */
.sp-page-builder .sppb-addon-accordion {
    text-align: left !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-custom {
    background: #fff !important;
    border: 1px solid var(--tb2-border, #E5E7EB) !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: none !important;
    margin-bottom: 0.75rem !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-heading {
    background: #fff !important;
    padding: 1rem 1.5rem !important;
    border: none !important;
    font-weight: 600 !important;
    color: var(--tb2-dark) !important;
    text-align: left !important;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-heading:hover,
.sp-page-builder .sppb-addon-accordion .sppb-panel-heading.active {
    background: #F8FAFC !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-heading.active {
    color: var(--tb2-primary) !important;
    border-bottom: 1px solid var(--tb2-border, #E5E7EB) !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-title {
    font-size: 1rem !important;
    text-align: left !important;
    margin: 0 !important;
    flex: 1;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-title a {
    text-align: left !important;
    display: block;
    color: inherit !important;
    text-decoration: none !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-body {
    padding: 1.25rem 1.5rem !important;
    color: #6B7280;
    line-height: 1.7;
    text-align: left !important;
    border-top-color: var(--tb2-border, #E5E7EB) !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-body *,
.sp-page-builder .sppb-addon-accordion .sppb-panel-body p,
.sp-page-builder .sppb-addon-accordion .sppb-panel-body div,
.sp-page-builder .sppb-addon-accordion .sppb-panel-body span,
.sp-page-builder .sppb-addon-accordion .sppb-panel-body li,
.sp-page-builder .sppb-addon-accordion .sppb-panel-body .sppb-addon-text-block {
    text-align: left !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-accordion-icon-wrap {
    color: var(--tb2-primary) !important;
    flex-shrink: 0;
}

/* ── Progress Bars ───────────────────────────────────────────────────────── */
.sp-page-builder .sppb-progress {
    background-color: rgba(0, 71, 171, .1) !important;
    border-radius: 100px !important;
    height: 14px !important;
    overflow: hidden;
    box-shadow: none !important;
}

.sp-page-builder .sppb-progress-bar {
    background-color: var(--tb2-primary) !important;
    border-radius: 100px !important;
    line-height: 14px !important;
    font-size: 0 !important;
    transition: width .6s ease !important;
}

/* Variantes pour donner du rythme : 2e et 3e barres alternent */
.sp-page-builder .sppb-row > div:nth-child(2) .sppb-addon-wrapper:nth-of-type(odd) .sppb-progress {
    background-color: rgba(0, 180, 216, .15) !important;
}
.sp-page-builder .sppb-row > div:nth-child(2) .sppb-addon-wrapper:nth-of-type(odd) .sppb-progress-bar {
    background-color: var(--tb2-secondary) !important;
}

/* ── Tables (sppb-addon-table) ───────────────────────────────────────────── */
/* La bordure + le radius sont portés par le wrapper (pas la table) pour éviter
   l'écart visible à gauche de chaque ligne au survol. */
.sp-page-builder .sppb-addon-table {
    border: 1px solid var(--tb2-border, #E5E7EB);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.sp-page-builder .sppb-addon-table-main,
.sp-page-builder table.sppb-addon-table-main {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: none !important;
    font-size: 0.92rem;
    background: #fff;
}

.sp-page-builder .sppb-addon-table-main thead {
    background: var(--tb2-primary) !important;
}

.sp-page-builder .sppb-addon-table-main thead tr,
.sp-page-builder .sppb-addon-table-main thead th {
    background: var(--tb2-primary) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 0.85rem 1rem !important;
    border: none !important;
    border-bottom: none !important;
    font-size: 0.92rem !important;
    text-align: left !important;
    vertical-align: middle !important;
}

.sp-page-builder .sppb-addon-table-main thead th:first-child {
    padding-left: 1.25rem !important;
}

.sp-page-builder .sppb-addon-table-main tbody td {
    padding: 0.8rem 1rem !important;
    border: none !important;
    border-top: 1px solid var(--tb2-border, #E5E7EB) !important;
    color: var(--tb2-dark) !important;
    background: #fff;
    vertical-align: middle !important;
    text-align: left !important;
}

.sp-page-builder .sppb-addon-table-main tbody td:first-child {
    padding-left: 1.25rem !important;
    font-weight: 600;
    color: var(--tb2-dark) !important;
}

.sp-page-builder .sppb-addon-table-main tbody tr:nth-child(even) td {
    background: #F9FAFB;
}

.sp-page-builder .sppb-addon-table-main tbody tr:hover td {
    background: var(--tb2-row-hover);
}

/* Mode responsive "bt" : labels avant les cellules sur mobile */
.sp-page-builder .sppb-addon-table-main.bt tbody td:before {
    background: transparent !important;
    color: var(--tb2-dark) !important;
    font-weight: 600 !important;
    padding: 0 !important;
}

/* Le sppb-addon-text-block dans les cellules doit hériter du style */
.sp-page-builder .sppb-addon-table-main .sppb-addon-text-block,
.sp-page-builder .sppb-addon-table-main p {
    margin: 0 !important;
    color: inherit !important;
}

/* ── Block Number ────────────────────────────────────────────────────────── */
.sp-page-builder .sppb-addon-blocknumber .sppb-blocknumber-number {
    background-color: var(--tb2-primary) !important;
    color: #fff !important;
    border-color: var(--tb2-primary) !important;
    width: 48px !important;
    height: 48px !important;
    line-height: 48px !important;
    border-radius: 50% !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    text-align: center;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 71, 171, .15);
}

/* Cycle de couleurs : 1er bleu, 2e cyan, 3e orange */
.sp-page-builder .sppb-column-addons > .sppb-addon-wrapper:nth-of-type(3n+2) .sppb-blocknumber-number {
    background-color: var(--tb2-secondary) !important;
    border-color: var(--tb2-secondary) !important;
    box-shadow: 0 2px 8px rgba(0, 180, 216, .2);
}

.sp-page-builder .sppb-column-addons > .sppb-addon-wrapper:nth-of-type(3n+3) .sppb-blocknumber-number {
    background-color: var(--tb2-accent) !important;
    border-color: var(--tb2-accent) !important;
    box-shadow: 0 2px 8px rgba(255, 140, 90, .2);
}

.sp-page-builder .sppb-addon-blocknumber .sppb-media-heading {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--tb2-dark) !important;
    margin-bottom: 0.4rem !important;
}

.sp-page-builder .sppb-addon-blocknumber .sppb-blocknumber-text {
    color: #6B7280;
    font-size: 0.95rem;
    line-height: 1.6;
}

.sp-page-builder .sppb-addon-blocknumber .sppb-blocknumber.sppb-media {
    align-items: flex-start;
    gap: 1.25rem;
}

.sp-page-builder .sppb-addon-blocknumber .sppb-blocknumber.sppb-media .pull-left {
    float: none;
    margin-right: 0;
}

/* ── Heading ─────────────────────────────────────────────────────────────── */
/* On garde uniquement la cohérence typo : famille, poids, couleur.
   On NE force PAS les tailles pour préserver les réglages SPPB par addon
   (notamment la zone Hero qui définit sa propre taille). */
.sp-page-builder .sppb-addon-header .sppb-addon-title {
    font-family: inherit !important;
    line-height: 1.25;
}

/* Espacement entre addons */
.sp-page-builder .sppb-addon-wrapper + .sppb-addon-wrapper {
    margin-top: 1.5rem;
}

/* ── Image content ───────────────────────────────────────────────────────── */
.sp-page-builder .sppb-addon-image-content .sppb-image-content-text {
    color: var(--tb2-dark);
    line-height: 1.7;
    font-size: 1rem;
}

/* ── Section title (sppb-section-title) ──────────────────────────────────── */
.sp-page-builder .sppb-section-title .sppb-title-heading {
    color: var(--tb2-dark);
    font-weight: 700;
}

.sp-page-builder .sppb-section-title .sppb-title-subheading {
    color: #6B7280;
}

/* ── Text Block ──────────────────────────────────────────────────────────── */
.sp-page-builder .sppb-addon-text-block {
    color: var(--tb2-dark);
    line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SP PAGE BUILDER — Typographie alignée sur les articles Joomla
   S'applique à toutes les sections SPPB SAUF le hero (.tb2-hero-title / .tb2-hero)
   et SAUF les sections fond sombre (.tb2-community)
   ────────────────────────────────────────────────────────────────────────── */
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block p {
    font-size: 1rem !important;
    line-height: 1.8 !important;
    color: var(--tb2-dark) !important;
}

.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block p {
    margin-bottom: 1rem;
}

/* Titres SPPB dans les sections de contenu : couleur primaire, comme dans les articles */
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-header h2.sppb-addon-title,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-header h3.sppb-addon-title,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-header h4.sppb-addon-title,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block h2,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block h3,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block h4 {
    color: var(--tb2-primary) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
}

.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-header h2.sppb-addon-title,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block h2 {
    font-size: 1.75rem !important;
}

.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-header h3.sppb-addon-title,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block h3 {
    font-size: 1.35rem !important;
}

.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-header h4.sppb-addon-title,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block h4 {
    font-size: 1.15rem !important;
}

/* Listes dans les text-blocks : style article */
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block ul,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block ol {
    padding-left: 1.5rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.8 !important;
    color: var(--tb2-dark) !important;
}

.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block li {
    margin-bottom: 0.5rem !important;
}

/* Liens dans le contenu SPPB */
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block a {
    color: var(--tb2-primary);
    text-decoration: underline;
}

.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero):not(.tb2-community) .sppb-addon-text-block a:hover {
    color: var(--tb2-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPPB — Overrides génériques (s'appliquent à toutes les pages SP Page Builder)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Accordéon — design Telebib2 ──────────────────────────────────────── */
.sp-page-builder .sppb-addon-accordion .sppb-panel-group .sppb-panel {
    border: 1px solid #E5E7EB !important;
    border-radius: 6px !important;
    background: #fff !important;
    overflow: hidden !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-group .sppb-panel + .sppb-panel,
.sp-page-builder .sppb-addon-accordion .sppb-panel-group .sppb-panel:not(:last-child) {
    margin-bottom: 0.5rem !important;
}

/* Header bar — bouton + titre + chevron à droite */
.sp-page-builder .sppb-addon-accordion .sppb-panel-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    width: 100% !important;
    padding: 0.85rem 1.25rem !important;
    background: #fff !important;
    border: none !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: background-color .2s ease, color .2s ease !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-heading:hover {
    background: #F5F8FF !important;
    color: var(--tb2-primary) !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-heading.active {
    background: var(--tb2-primary) !important;
    color: var(--tb2-white, #fff) !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-heading .sppb-panel-title {
    flex: 1 1 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: inherit !important;
}

/* Chevron : généré en CSS (le markup peut ne pas contenir .sppb-accordion-icon-wrap) */
.sp-page-builder .sppb-addon-accordion .sppb-panel-heading::after {
    content: "" !important;
    flex: 0 0 auto !important;
    width: 0.6rem !important;
    height: 0.6rem !important;
    border-right: 2px solid currentColor !important;
    border-bottom: 2px solid currentColor !important;
    transform: rotate(45deg) !important;
    transform-origin: center !important;
    transition: transform .25s ease !important;
    margin-right: 0.25rem !important;
    margin-top: -0.25rem !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-heading.active::after {
    transform: rotate(-135deg) !important;
    margin-top: 0.15rem !important;
}

/* Si SPPB rend déjà son propre icon-wrap, on masque notre pseudo pour éviter le doublon */
.sp-page-builder .sppb-addon-accordion .sppb-panel-heading:has(.sppb-accordion-icon-wrap)::after {
    display: none !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-accordion-icon-wrap {
    flex: 0 0 auto !important;
    margin-left: auto !important;
    transition: transform .25s ease !important;
}

/* Corps du panneau */
.sp-page-builder .sppb-addon-accordion .sppb-panel-body {
    padding: 1rem 1.25rem !important;
    border-top: 1px solid #E5E7EB !important;
    background: #fff !important;
}

/* Titre + sous-titre internes (sppb-section-title) : compacts */
.sp-page-builder .sppb-addon-accordion .sppb-panel-body .sppb-section-title {
    margin: 0 0 0.75rem 0 !important;
    padding: 0 !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-body .sppb-section-title .sppb-title-heading {
    margin: 0 0 0.25rem 0 !important;
    padding: 0 !important;
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
    color: var(--tb2-primary) !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-body .sppb-section-title .sppb-title-subheading {
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    color: #6B7280 !important;
}

/* Section imbriquée dans le panel-body : retirer les paddings hérités */
.sp-page-builder .sppb-addon-accordion .sppb-panel-body .sppb-section {
    padding: 0 !important;
    margin: 0 !important;
}

.sp-page-builder .sppb-addon-accordion .sppb-panel-body .sppb-container-inner,
.sp-page-builder .sppb-addon-accordion .sppb-panel-body .sppb-row-container {
    padding: 0 !important;
    margin: 0 !important;
}

/* ── 1bis. Progress bars — cycle de couleurs quand plusieurs dans une section ── */
/* Par défaut (1ʳᵉ progress bar) = primary */
.sp-page-builder .sppb-column-addons > .addon-root-progress-bar .sppb-progress {
    background-color: rgba(0, 71, 171, 0.15) !important; /* primary 15% */
}
.sp-page-builder .sppb-column-addons > .addon-root-progress-bar .sppb-progress-bar {
    background-color: var(--tb2-primary) !important;
}

/* 2ᵉ progress bar (et au-delà) = secondary — la dernière règle gagne */
.sp-page-builder .sppb-column-addons > .addon-root-progress-bar
    ~ .addon-root-progress-bar .sppb-progress {
    background-color: rgba(0, 180, 216, 0.18) !important; /* secondary 18% */
}
.sp-page-builder .sppb-column-addons > .addon-root-progress-bar
    ~ .addon-root-progress-bar .sppb-progress-bar {
    background-color: var(--tb2-secondary) !important;
}

/* 3ᵉ progress bar (et au-delà) = accent */
.sp-page-builder .sppb-column-addons > .addon-root-progress-bar
    ~ .addon-root-progress-bar
    ~ .addon-root-progress-bar .sppb-progress {
    background-color: rgba(255, 140, 90, 0.22) !important; /* accent 22% */
}
.sp-page-builder .sppb-column-addons > .addon-root-progress-bar
    ~ .addon-root-progress-bar
    ~ .addon-root-progress-bar .sppb-progress-bar {
    background-color: var(--tb2-accent) !important;
}

/* ── 2. Table — header blanc sur fond primary, pas de stripping ───────────── */
.sp-page-builder .sppb-addon-table .sppb-addon-table-main thead th,
.sp-page-builder .sppb-addon-table .sppb-addon-table-main th {
    background: var(--tb2-primary) !important;
    color: var(--tb2-white, #fff) !important;
    border-color: var(--tb2-primary) !important;
}

.sp-page-builder .sppb-addon-table .sppb-addon-table-main thead th .sppb-addon-content,
.sp-page-builder .sppb-addon-table .sppb-addon-table-main th .sppb-addon-content {
    color: var(--tb2-white, #fff) !important;
}

/* Pas de stripping : toutes les lignes ont le même fond */
.sp-page-builder .sppb-addon-table .sppb-addon-table-main tbody tr,
.sp-page-builder .sppb-addon-table .sppb-addon-table-main tbody tr:nth-child(odd),
.sp-page-builder .sppb-addon-table .sppb-addon-table-main tbody tr:nth-child(even),
.sp-page-builder .sppb-addon-table .sppb-addon-table-main tbody tr:nth-of-type(odd),
.sp-page-builder .sppb-addon-table .sppb-addon-table-main tbody tr:nth-of-type(even) {
    background: #fff !important;
}

.sp-page-builder .sppb-addon-table .sppb-addon-table-main tbody td {
    background: transparent !important;
}

/* ── 3. Block Number — espace entre le chiffre et le titre ────────────────── */
.sp-page-builder .sppb-addon-blocknumber .sppb-blocknumber.sppb-media .pull-left,
.sp-page-builder .sppb-addon-blocknumber .sppb-blocknumber .sppb-blocknumber-number {
    margin-right: 1rem !important;
}

.sp-page-builder .sppb-addon-blocknumber .sppb-media-body {
    padding-left: 0.25rem !important;
}

/* ── 4. Boutons (sppb-btn / sppb-button) — pas de soulignement, pas de transform au hover, couleur accent au hover ── */
.sp-page-builder a.sppb-btn,
.sp-page-builder .sppb-button-wrapper a.sppb-btn,
.sp-page-builder .sppb-btn {
    text-decoration: none !important;
    transform: none !important;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease !important;
}

.sp-page-builder a.sppb-btn:hover,
.sp-page-builder a.sppb-btn:focus,
.sp-page-builder a.sppb-btn:active,
.sp-page-builder .sppb-button-wrapper a.sppb-btn:hover,
.sp-page-builder .sppb-button-wrapper a.sppb-btn:focus,
.sp-page-builder .sppb-button-wrapper a.sppb-btn:active,
.sp-page-builder .sppb-btn:hover,
.sp-page-builder .sppb-btn:focus,
.sp-page-builder .sppb-btn:active {
    text-decoration: none !important;
    transform: none !important;
    background-color: #003580 !important;
    border-color: #003580 !important;
    color: var(--tb2-white, #fff) !important;
    box-shadow: none !important;
}

/* ── 5. Titres SPPB — couleur primary cobalt + tailles alignées sur les articles
       (s'applique partout SAUF dans le hero qui a ses propres réglages) ────── */
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-blocknumber .sppb-media-heading,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-accordion > .sppb-addon-title {
    color: var(--tb2-primary) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

/* Tailles par balise — n'écrase pas les réglages explicites SPPB par addon mais
   donne une hiérarchie cohérente avec les articles Joomla (h2 1.75 / h3 1.35 / h4 1.15) */
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) h2.sppb-addon-title {
    font-size: 1.75rem !important;
}
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) h3.sppb-addon-title,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-accordion > h3.sppb-addon-title {
    font-size: 1.35rem !important;
}
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) h4.sppb-addon-title {
    font-size: 1.15rem !important;
}

/* Sous-titre block number : pas en primary, on garde la couleur de texte normale */
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-blocknumber .sppb-media-heading {
    color: var(--tb2-dark) !important;
    font-size: 1.05rem !important;
    margin-bottom: 0.25rem !important;
}

/* Titre d'un accordéon entier (au-dessus du panel-group) : marge sous le titre */
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-accordion > .sppb-addon-title {
    margin: 0 0 1rem 0 !important;
}

/* ── 6. Espacements — rythme vertical entre addons et autour des titres ───── */

/* Distance entre 2 addons consécutifs dans une même colonne SPPB.
   Surcharge la règle existante (1.5rem) pour donner plus d'air. */
.sp-page-builder .sppb-column-addons > .sppb-addon-wrapper + .sppb-addon-wrapper {
    margin-top: 2rem !important;
}

/* Après un titre (heading), on resserre légèrement pour qu'il soit "attaché"
   à son contenu (texte, barres, etc.) — pattern article Telebib2 */
.sp-page-builder .sppb-column-addons > .addon-root-heading + .sppb-addon-wrapper {
    margin-top: 1rem !important;
}

/* Progress bars consécutives : espacement régulier, plus serré qu'entre 2 addons différents */
.sp-page-builder .sppb-column-addons > .addon-root-progress-bar + .addon-root-progress-bar {
    margin-top: 0.85rem !important;
}

/* Block numbers consécutifs : un peu d'air entre 2 chiffres */
.sp-page-builder .sppb-column-addons > .addon-root-blocknumber + .addon-root-blocknumber {
    margin-top: 1.5rem !important;
}

/* Texte d'un block number : line-height confortable */
.sp-page-builder .sppb-addon-blocknumber .sppb-blocknumber-text {
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
    color: var(--tb2-text-muted, #6B7280) !important;
}

/* Hauteur des progress bars : un peu plus fine pour un look moderne */
.sp-page-builder .sppb-progress {
    height: 14px !important;
    border-radius: 100px !important;
    overflow: hidden !important;
    box-shadow: none !important;
}
.sp-page-builder .sppb-progress-bar {
    border-radius: 100px !important;
    line-height: 14px !important;
    font-size: 0 !important; /* on masque le "60%" dans la barre */
}

/* ── 7. Padding des sections — plus généreux que les 75px par défaut SPPB ── */
/* On surcharge le style inline #section-id-... { padding-top:75px ... }
   en ciblant le sélecteur très spécifique de SPPB avec !important.       */
body.tb2-fullbleed .sp-page-builder .page-content > .sppb-section:not(.tb2-hero-title):not(.tb2-hero),
body.tb2-fullbleed .sp-page-builder .page-content > section.sppb-section:not(.tb2-hero-title):not(.tb2-hero),
body.tb2-fullbleed .sp-page-builder .page-content > div.sppb-section:not(.tb2-hero-title):not(.tb2-hero) {
    padding-top: 6rem;    /* ~96 px */
    padding-bottom: 6rem;
}

@media (max-width: 767.98px) {
    body.tb2-fullbleed .sp-page-builder .page-content > .sppb-section:not(.tb2-hero-title):not(.tb2-hero),
    body.tb2-fullbleed .sp-page-builder .page-content > section.sppb-section:not(.tb2-hero-title):not(.tb2-hero),
    body.tb2-fullbleed .sp-page-builder .page-content > div.sppb-section:not(.tb2-hero-title):not(.tb2-hero) {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }
}

/* ── 8. Hero — le H1 reste TOUJOURS blanc (la règle "titres primary" ne doit
       pas le toucher, mais on force ici pour être 100% sûr) ───────────────── */
.sp-page-builder .sppb-section.tb2-hero-title .sppb-addon-header .sppb-addon-title,
.sp-page-builder .sppb-section.tb2-hero-title h1,
.sp-page-builder .sppb-section.tb2-hero-title h1.sppb-addon-title,
.sp-page-builder .sppb-section.tb2-hero .sppb-addon-header .sppb-addon-title,
.sp-page-builder .sppb-section.tb2-hero h1,
.sp-page-builder .sppb-section.tb2-hero h1.sppb-addon-title {
    color: var(--tb2-white, #fff) !important;
}

/* ── 9. Titres dans les addons "image content" (et autres) — bleu primary
       par défaut, comme les heading addons ────────────────────────────────── */
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-image-content .sppb-content-holder h2,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-image-content .sppb-content-holder h3,
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-image-content .sppb-content-holder h4 {
    color: var(--tb2-primary) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-image-content .sppb-content-holder h2 { font-size: 1.75rem !important; }
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-image-content .sppb-content-holder h3 { font-size: 1.35rem !important; }
.sp-page-builder .sppb-section:not(.tb2-hero-title):not(.tb2-hero) .sppb-addon-image-content .sppb-content-holder h4 { font-size: 1.15rem !important; }




/* ── 11. Row SPPB a une seule colonne : pas de padding lateral
       (les colonnes Bootstrap d'SPPB ont un padding-left/right par defaut
       qui n'a aucun interet quand la row ne contient qu'une colonne).      */
.sp-page-builder .sppb-column {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* ==========================================================================
   TB2 PARTNERS — bandeau logos partenaires (homepage)
   La classe `tb2-partners` se pose sur la sppb-section.
   Markup attendu dans l'addon Raw HTML :
     <h2>Titre</h2>
     <p>Intro</p>
     <nav>
       <a href="..."><img src="..." alt=""></a> x4
     </nav>
   ========================================================================== */
.tb2-partners .sppb-container-inner{
  max-width:var(--tb2-container);margin:0 auto;
  padding:0 var(--tb2-padding);text-align:center;
}
.tb2-partners h2{font-size:1.6rem;font-weight:700;color:var(--tb2-dark);margin:0 0 1rem}
.tb2-partners .sppb-addon-content > p,
.tb2-partners p{max-width:780px;margin:0 0 2.5rem;color:#6B7280;font-size:1rem;line-height:1.7}
.tb2-partners nav{
  display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem;align-items:stretch;
}
.tb2-partners nav > a{
  display:flex;align-items:center;justify-content:center;
  background:#fff;border:1px solid #E5E7EB;border-radius:14px;
  padding:1.5rem 1.75rem;min-height:130px;
  transition:transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tb2-partners nav > a:hover{
  transform:translateY(-4px);
  border-color:var(--tb2-secondary);
  box-shadow:0 6px 20px rgba(0,71,171,.08);
}
.tb2-partners nav img{
  display:block;max-width:100%;max-height:64px;width:auto;height:auto;object-fit:contain;
}
@media (max-width:991.98px){.tb2-partners nav{grid-template-columns:repeat(2,1fr);gap:1.25rem}}
@media (max-width:575.98px){.tb2-partners nav{grid-template-columns:1fr;gap:1rem}}

/* ==========================================================================
   TB2 COMMUNITY — Rejoindre la communaute (fond bleu sombre + visuel neon)
   La classe `tb2-community` se pose sur la sppb-section.
   Markup (Raw HTML addon recommande) :
     <div class="tb2-community__grid">
       <div class="tb2-community__text">
         <span class="tb2-community__eyebrow">Work with us</span>
         <h2 class="tb2-community__title">Titre</h2>
         <p class="tb2-community__desc">Paragraphe</p>
         <p class="tb2-community__desc">Paragraphe</p>
         <div class="tb2-community__cta">
           <a href="..." class="tb2-community__btn tb2-community__btn--primary">Primary →</a>
           <a href="..." class="tb2-community__btn tb2-community__btn--ghost">Ghost</a>
         </div>
       </div>
       <figure class="tb2-community__media">
         <img src="..." alt="">
       </figure>
     </div>
   ========================================================================== */
.tb2-community{
  position:relative;
  background:radial-gradient(ellipse at right top, #00345f 0%, #001F4D 45%, #000d24 100%) !important;
  color:#fff;overflow:hidden;
}
.tb2-community::before{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
  background:
    radial-gradient(circle at 80% 35%, rgba(0,180,216,.18) 0%, transparent 55%),
    radial-gradient(circle at 15% 80%, rgba(0,71,171,.25) 0%, transparent 55%);
}
.tb2-community .sppb-container-inner{
  position:relative;z-index:1;
  max-width:var(--tb2-container);margin:0 auto;
  padding:2.5rem var(--tb2-padding);
}

.tb2-community,
.tb2-community .sppb-addon,
.tb2-community .sppb-addon-content,
.tb2-community .sppb-addon-text-block{color:#E6EEF8 !important}

.tb2-community__grid{
  display:grid;grid-template-columns:1.05fr 1fr;gap:2.5rem;align-items:center;
}
.tb2-community__text{min-width:0}

.tb2-community .tb2-community__eyebrow{
  display:inline-block;font-size:.78rem;font-weight:700;text-transform:uppercase;
  letter-spacing:.12em;color:#5FD4F0 !important;margin:0 0 .65rem;
}
.tb2-community .tb2-community__title{
  font-size:2rem;font-weight:800;color:#fff !important;
  margin:0 0 .85rem;line-height:1.15;letter-spacing:-.01em;
}
.tb2-community .tb2-community__desc{
  color:#E6EEF8 !important;font-size:.98rem;line-height:1.6;margin:0 0 .6rem;
}
.tb2-community .tb2-community__desc strong{color:#fff !important}

.tb2-community .tb2-community__cta{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.25rem}
.tb2-community .tb2-community__btn{
  display:inline-flex;align-items:center;gap:.5rem;
  padding:.95rem 1.75rem;text-decoration:none !important;border-radius:8px;
  font-weight:600;font-size:1rem;
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tb2-community .tb2-community__btn--primary{
  background:var(--tb2-accent) !important;color:#fff !important;
  box-shadow:0 4px 14px rgba(255,140,90,.35);border:none;
}
.tb2-community .tb2-community__btn--primary:hover{
  background:#ff7a3f !important;transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(255,140,90,.45);color:#fff !important;
}
.tb2-community .tb2-community__btn--ghost{
  background:transparent !important;color:#fff !important;
  border:1.5px solid rgba(255,255,255,.35);
}
.tb2-community .tb2-community__btn--ghost:hover{
  background:rgba(255,255,255,.08) !important;border-color:#fff;color:#fff !important;
}

.tb2-community__media{
  margin:0;display:flex;align-items:center;justify-content:center;position:relative;
}
.tb2-community__media img{
  display:block;width: 420px;max-width:100%;height:auto;
  filter:drop-shadow(0 0 40px rgba(0,180,216,.35)) drop-shadow(0 10px 30px rgba(0,0,0,.4));
  animation:tb2-community-float 6s ease-in-out infinite;
}
@keyframes tb2-community-float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-10px)}
}

@media (max-width:767.98px){
  .tb2-community__grid{grid-template-columns:1fr;gap:2rem}
  .tb2-community .sppb-container-inner{padding:3rem var(--tb2-padding)}
  .tb2-community__title{font-size:1.65rem}
  .tb2-community__media{order:-1;max-width:280px;margin:0 auto}
}

/* ─────────────────────────────────────────────────────────────────────────────
   SP Page Builder — Spacing mobile (rows & columns)
   ─────────────────────────────────────────────────────────────────────────────
   - Padding latéral sur les rows pour que le texte ne colle pas aux bords
   - Espacement vertical entre les colonnes empilées (< 992px)
   Exclut .tb2-hero-title (bandeau article géré séparément). */
@media (max-width: 991.98px) {
    .sp-page-builder .sppb-section:not(.tb2-hero-title) > .sppb-row-container {
        padding-left: var(--tb2-padding) !important;
        padding-right: var(--tb2-padding) !important;
    }

    /* Espacement vertical entre colonnes qui s'empilent.
       SPPB applique inline `margin-bottom:30px` sur .sppb-column en mobile via JS,
       mais ce n'est pas toujours fiable — on force ici un gap visuel. */
    .sp-page-builder .sppb-section:not(.tb2-hero-title) .sppb-row > [class*="sppb-col-"] {
        margin-bottom: 1.5rem;
    }

    .sp-page-builder .sppb-section:not(.tb2-hero-title) .sppb-row > [class*="sppb-col-"]:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    /* Sur très petit écran : padding interne sur les addons texte/image pour respirer */
    .sp-page-builder .sppb-section:not(.tb2-hero-title) > .sppb-row-container {
        padding-left: var(--tb2-padding) !important;
        padding-right: var(--tb2-padding) !important;
    }

    /* Réduit les paddings verticaux excessifs définis inline par SPPB */
    .sp-page-builder .sppb-section:not(.tb2-hero-title) {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}




/* ==========================================================================
   TABLES — Style global (header lavande, links bleus, hover doux)
   S'applique a TOUTES les .table (Bootstrap) du site.
   Le wrapper .table-responsive recoit le container arrondi.
   ========================================================================== */

.table-responsive {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    overflow: hidden;
}

table.table {
    width: 100%;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
    font-family: var(--tb2-font-main);
    font-size: 0.9rem;
    color: var(--tb2-dark);
    background: #fff;
    border: none !important;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
table.table thead tr {
    background: #EEF2FF !important;
}

table.table thead th {
    background: #EEF2FF !important;
    color: #4B5563 !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.95rem 1.1rem;
    border: none !important;
    border-bottom: 1px solid #DDE4F3 !important;
    text-align: left;
    white-space: nowrap;
}

/* ── Body ─────────────────────────────────────────────────────────────────── */
table.table tbody tr {
    background: #fff !important;
    transition: background-color 0.15s ease;
}

table.table tbody tr:hover {
    background: var(--tb2-row-hover) !important;
}

/* Ligne entiere cliquable (data-href + JS) */
table.table tbody tr.tb2-row-link {
    cursor: pointer;
}

table.table tbody tr.tb2-row-link:focus-visible {
    outline: 2px solid var(--tb2-primary);
    outline-offset: -2px;
}

/* Annule le stripping eventuel de Bootstrap (.table-striped) */
table.table-striped > tbody > tr:nth-of-type(odd) > *,
table.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: transparent !important;
    --bs-table-bg-type: transparent;
    --bs-table-accent-bg: transparent;
}

table.table tbody td {
    padding: 0.9rem 1.1rem;
    border: none !important;
    border-bottom: 1px solid #F1F3F7 !important;
    vertical-align: middle;
    color: var(--tb2-dark);
    background: transparent !important;
}

table.table tbody tr:last-child td {
    border-bottom: none !important;
}

/* ── Cellule nowrap (utilisee pour les dates) : grise et compacte ────────── */
table.table td.text-nowrap {
    color: #6B7280;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ── Cellule en gras avec lien : style code/version bleu primary ─────────── */
table.table td.fw-semibold a,
table.table td.fw-semibold a.link-primary {
    color: var(--tb2-primary) !important;
    font-weight: 700;
    text-decoration: none !important;
    font-size: 0.92rem;
}

table.table td.fw-semibold a:hover,
table.table td.fw-semibold a.link-primary:hover {
    color: var(--tb2-secondary) !important;
    text-decoration: underline !important;
}

/* ── Pills (statut + tags) dans les cellules ─────────────────────────────── */
table.table .tb2-news-card__tag {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0.1rem 0.2rem 0.1rem 0;
}

/* ── Colonnes du tableau minor-releases (homepage) ──────────────────────── */
.mod-minor-releases table.table {
    table-layout: fixed;
    width: 100%;
}

/* Col 1 : Date */
.mod-minor-releases table.table th:nth-child(1),
.mod-minor-releases table.table td:nth-child(1) {
    width: 110px;
}

/* Col 2 : Type (tags) */
.mod-minor-releases table.table th:nth-child(2),
.mod-minor-releases table.table td:nth-child(2) {
    width: 170px;
}

/* Col 3 : Titre (version/article) — un peu plus large */
.mod-minor-releases table.table th:nth-child(3),
.mod-minor-releases table.table td:nth-child(3) {
    width: 190px;
}

.mod-minor-releases table.table td.tb2-minor-desc {
    overflow: hidden;
}

.tb2-minor-desc__inner {
    display: flex;
    align-items: baseline;
    overflow: hidden;
    white-space: nowrap;
}

.tb2-minor-desc__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 0;
    min-width: 0;
}

.tb2-readmore {
    flex: 0 0 auto;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--tb2-primary);
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.75;
    transition: opacity 0.15s, transform 0.15s;
}
.tb2-readmore:hover {
    opacity: 1;
    transform: translateX(2px);
}

/* ── Section header au-dessus d'un tableau (mod_minor_releases & cie) ────── */
.mod-minor-releases { margin: 0 0 2.5rem; }

.mod-minor-releases .tb2-section-header {
    margin-bottom: 1.25rem;
}

.mod-minor-releases .tb2-section-header h2 {
    color: var(--tb2-primary);
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

/* Lien "Toutes les minor releases" sous le tableau */
.mod-minor-releases__footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}
.mod-minor-releases__footer .tb2-section-viewall {
    font-weight: 600;
}

/* ── Catégorie : changelog vertical (layout minor_releases) ─────────────── */
.category-minor-releases .tb2-container {
    max-width: var(--tb2-container, 1440px);
    margin: 0 auto;
    padding: 3rem var(--tb2-padding, 2rem) 4rem;
}

.tb2-releases {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tb2-release {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.tb2-release__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.4rem;
    background: rgba(0, 71, 171, 0.06);
    border: 1px solid rgba(0, 71, 171, 0.25);
    color: var(--tb2-primary, #0047AB);
    border-radius: 8px;
    line-height: 1.1;
    text-align: center;
    min-height: 80px;
}
.tb2-release__day {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tb2-primary, #0047AB);
}
.tb2-release__month {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
    margin-top: 0.1rem;
    color: var(--tb2-dark, #1A1D29);
}
.tb2-release__year {
    font-size: 0.68rem;
    opacity: 0.7;
    margin-top: 0.05rem;
    color: var(--tb2-dark, #1A1D29);
}

.tb2-release__card {
    display: block;
    position: relative;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}
.tb2-release__card:hover,
.tb2-release__card:focus {
    text-decoration: none;
    color: inherit;
    border-color: var(--tb2-secondary, #00B4D8);
}
.tb2-release__card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--tb2-secondary, #00B4D8);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}
.tb2-release__card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.tb2-release__date-mobile {
    display: none;
    font-size: 0.8rem;
    color: var(--tb2-primary, #0047AB);
    font-weight: 600;
    text-transform: lowercase;
    margin-bottom: 0.4rem;
}

.tb2-release__title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--tb2-dark, #1A1D29);
}
.tb2-release__card:hover .tb2-release__title {
    color: var(--tb2-primary, #0047AB);
}

.tb2-release__tags {
    list-style: none;
    margin: 0 0 0.65rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tb2-release__desc {
    margin: 0 0 0.85rem;
    color: #4B5563;
    font-size: 0.95rem;
    line-height: 1.55;
}

.tb2-release__more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--tb2-primary, #0047AB);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.tb2-release__more:hover {
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .tb2-release {
        grid-template-columns: 1fr;
    }
    .tb2-release__date {
        display: none;
    }
    .tb2-release__date-mobile {
        display: block;
    }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    table.table {
        font-size: 0.82rem;
    }

    table.table thead th,
    table.table tbody td {
        padding: 0.7rem 0.75rem;
    }
}

/* ==========================================================================
   GLOBAL — Aucun lien souligné, aucun mouvement au survol
   --------------------------------------------------------------------------
   Demande client : valable PARTOUT sur le site, y compris le code futur.
   La répétition de :root augmente la spécificité (sans recourir à un #id)
   afin de battre les règles existantes en !important (breadcrumbs, liens de
   tableaux, btn-link, etc.).
   - text-decoration:none → plus jamais de souligné sur les liens / au survol
   - transform:none au survol → plus jamais de « lift »/déplacement de carte,
     bouton ou lien. (Les changements de couleur, bordure ou ombre sont
     conservés : ce ne sont pas des mouvements.)
   ========================================================================== */
:root:root:root a,
:root:root:root a:link,
:root:root:root a:visited,
:root:root:root a:hover,
:root:root:root a:focus,
:root:root:root a:active,
:root:root:root *:hover {
    text-decoration: none !important;
}

:root:root:root a:hover,
:root:root:root button:hover,
:root:root:root input:hover,
:root:root:root .cta-button:hover,
:root:root:root [class*="btn"]:hover,
:root:root:root [class*="card"]:hover,
:root:root:root [class*="pillar"]:hover,
:root:root:root [class*="tile"]:hover,
:root:root:root [class*="intro"]:hover {
    transform: none !important;
}

/* ==========================================================================
   PAGE RESSOURCES / MIDDELEN (layout com_content/category/resources.php)
   Toolbar (filtres + tri), cartes ressources, pagination client-side.
   ========================================================================== */
.category-resources .tb2-container {
    max-width: var(--tb2-container, 1440px);
    margin: 0 auto;
    padding: 3rem var(--tb2-padding, 2rem) 4rem;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.tb2-resources-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tb2-resources-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Chips de filtre */
.tb2-chip {
    font-family: var(--tb2-font-main);
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.2;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid #E5E7EB;
    background: var(--tb2-white);
    color: var(--tb2-grey);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tb2-chip:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
    color: var(--tb2-dark);
}

.tb2-chip.is-active {
    background: var(--tb2-primary);
    border-color: var(--tb2-primary);
    color: #fff;
}

/* Accent par catégorie à l'état actif — pastel, aligné sur les pills des cartes */
.tb2-chip--blue.is-active   { background: #DBEAFE; border-color: #BFDBFE; color: #0047AB; }
.tb2-chip--cyan.is-active   { background: #CFFAFE; border-color: #A5F0FA; color: #0E7490; }
.tb2-chip--orange.is-active { background: #FFE4D1; border-color: #FFD1B3; color: #C2410C; }
.tb2-chip--green.is-active  { background: #DCFCE7; border-color: #BBF7D0; color: #15803D; }
.tb2-chip--purple.is-active { background: #EDE9FE; border-color: #DDD6FE; color: #6D28D9; }

/* ── Tri ─────────────────────────────────────────────────────────────────── */
.tb2-resources-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.tb2-resources-sort label {
    font-weight: 600;
    color: var(--tb2-grey);
    margin: 0;
}

.tb2-resources-sort__select {
    font-family: var(--tb2-font-main);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tb2-dark);
    padding: 0.5rem 2rem 0.5rem 0.85rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius, 8px);
    background-color: var(--tb2-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tb2-resources-sort__select:focus {
    outline: none;
    border-color: var(--tb2-primary);
}

/* ── Carte ressource : pied (date + lien) ────────────────────────────────── */
.tb2-resource-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.tb2-resource-card__date {
    font-size: 0.8125rem;
    color: var(--tb2-grey);
}

.tb2-resource-card__more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tb2-primary);
}

/* ── Pagination client-side ──────────────────────────────────────────────── */
.tb2-resources-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin-top: 2.5rem;
}

.tb2-page {
    font-family: var(--tb2-font-main);
    font-weight: 600;
    font-size: 0.9375rem;
    min-width: 2.4rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius, 8px);
    background: var(--tb2-white);
    color: var(--tb2-dark);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tb2-page:hover {
    border-color: var(--tb2-primary);
    color: var(--tb2-primary);
}

.tb2-page.is-active {
    background: var(--tb2-primary);
    border-color: var(--tb2-primary);
    color: #fff;
    cursor: default;
}

.tb2-page.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tb2-resources-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .tb2-resources-toolbar__right {
        justify-content: space-between;
    }
    .tb2-resources-sort {
        justify-content: flex-start;
    }
}

/* Figure « plaque » : le visuel porte déjà son propre fond et son cadre
  arrondi (cas des SVG d'illustration, dessinés sur le fond sombre du site).
  On retire donc le cadre clair de .tb2-datamodel figure, qui ferait double
  emploi, et on plafonne à la largeur native du dessin — au-delà, le texte
  qu'il contient grossirait sans rien gagner en lisibilité. */
.tb2-datamodel .text > figure.tb2-figure-plate {
    max-width: 100%;
    margin: 1.9rem 0 2.1rem;
    padding: 0;
    background: none;
    border: none;
}
.tb2-datamodel .text > figure.tb2-figure-plate img {
    border-radius: 12px;
}

/* ── Bascule vue cartes / vue liste ──────────────────────────────────────── */
.tb2-resources-view {
    display: flex;
    gap: 0.35rem;
}

.tb2-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #E5E7EB;
    border-radius: var(--tb2-radius, 8px);
    background: var(--tb2-white);
    color: var(--tb2-grey);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tb2-view-btn:hover {
    border-color: #D1D5DB;
    color: var(--tb2-dark);
}

.tb2-view-btn.is-active {
    background: var(--tb2-primary);
    border-color: var(--tb2-primary);
    color: #fff;
}

/* ── Vue liste : une ligne compacte par ressource ────────────────────────── */
.tb2-resources-grid--list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.tb2-resources-toolbar__right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tb2-resources-grid--list .tb2-news-card::before {
    display: none;
}

.tb2-resources-grid--list .tb2-news-card__body {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    padding: 0.9rem 1.25rem;
}

.tb2-resources-grid--list .tb2-news-card__tags {
    flex: 0 0 auto;
    margin: 0;
}

.tb2-resources-grid--list .tb2-news-card__title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1rem;
}

.tb2-resources-grid--list .tb2-news-card__intro {
    display: none;
}

.tb2-resources-grid--list .tb2-resource-card__footer {
    flex: 0 0 auto;
    margin: 0;
    gap: 1.25rem;
}

@media (max-width: 576px) {
    .tb2-resources-grid--list .tb2-news-card__body {
        gap: 0.5rem;
    }
    .tb2-resources-grid--list .tb2-resource-card__footer {
        width: 100%;
        justify-content: space-between;
    }
}

/* ==========================================================================
   TABLE - Hover bleuté homogène sur toutes les .table de base.
   Place en fin de fichier + spécificité renforcée pour battre le striping
   Bootstrap (transparent !important) et le hover gris par défaut.
   ========================================================================== */
table.table.table-striped > tbody > tr:hover > *,
table.table.table-hover > tbody > tr:hover > *,
table.table > tbody > tr:hover > * {
    background-color: var(--tb2-row-hover) !important;
    /* Bootstrap peint le hover via box-shadow inset : réassigner ses variables */
    --bs-table-bg-state: var(--tb2-row-hover);
    --bs-table-hover-bg: var(--tb2-row-hover);
    --bs-table-accent-bg: var(--tb2-row-hover);
}