/* LBW Design — leblogdewilly.fr */

.lbw-body {
    --lbw-bg: #16171b;
    --lbw-bg-elevated: #1f2126;
    --lbw-bg-elevated-hover: #262930;
    --lbw-border: #2c2e35;
    --lbw-text: #f2f2ef;
    --lbw-text-muted: #9a9ca6;
    --lbw-blue: #4d8dff;
    --lbw-blue-dark: #2f6fed;
    --lbw-yellow: #ffc93c;
    --lbw-orange: #ff7a30;
    --lbw-green: #4cbb6e;
    --lbw-red: #e0525f;
    --lbw-radius: 10px;
    --lbw-font-display: 'Barlow Condensed', sans-serif;
    --lbw-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    background: var(--lbw-bg);
    color: var(--lbw-text);
    font-family: var(--lbw-font-body);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.lbw-body * { box-sizing: border-box; }
.lbw-body a { color: inherit; text-decoration: none; }
.lbw-body img { max-width: 100%; display: block; }
.lbw-body ul { list-style: none; margin: 0; padding: 0; }

.lbw-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Header ---------- */
.lbw-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--lbw-border);
}
/* backdrop-filter vit sur ce pseudo-élément (et non sur .lbw-header) car un
   filter/backdrop-filter crée un containing block pour les descendants en
   position:fixed — ça cassait le panneau plein écran du menu mobile, qui se
   retrouvait confiné à la hauteur du header au lieu de couvrir l'écran. */
.lbw-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(22, 23, 27, 0.92);
    backdrop-filter: blur(8px);
}

.lbw-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.lbw-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.lbw-logo-img { height: 38px; width: auto; }
.lbw-logo-text {
    font-family: var(--lbw-font-display);
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 0.5px;
    color: var(--lbw-text);
}
.lbw-logo:hover .lbw-logo-text { color: var(--lbw-blue); }

.lbw-nav { flex: 1; }
.lbw-nav-list { display: flex; gap: 4px; }

.lbw-nav-item { position: relative; }

.lbw-nav-item > a {
    display: block;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--lbw-text);
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}
.lbw-nav-item > a:hover { color: var(--lbw-blue); background: var(--lbw-bg-elevated); }

.lbw-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--lbw-bg-elevated);
    border: 1px solid var(--lbw-border);
    border-radius: var(--lbw-radius);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}
.lbw-nav-item:hover .lbw-submenu,
.lbw-nav-item.lbw-open .lbw-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lbw-submenu a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
    color: var(--lbw-text-muted);
    transition: color 0.15s ease, background 0.15s ease;
}
.lbw-submenu a:hover { color: var(--lbw-text); background: var(--lbw-bg-elevated-hover); }

.lbw-menu-toggle {
    display: none;
    position: relative;
    z-index: 10;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.lbw-menu-toggle span { pointer-events: none; }
.lbw-menu-toggle span {
    display: block;
    height: 2px;
    background: var(--lbw-text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Layout ---------- */
.lbw-home {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.lbw-section { margin-top: 56px; }
.lbw-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}
.lbw-section-title {
    font-family: var(--lbw-font-display);
    font-weight: 800;
    font-size: 30px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 20px;
    border-left: 4px solid var(--lbw-blue);
    padding-left: 12px;
}
.lbw-section-head .lbw-section-title { margin-bottom: 0; }
.lbw-section-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--lbw-text-muted);
    transition: color 0.15s ease;
}
.lbw-section-more:hover { color: var(--lbw-blue); }

/* ---------- Cards ---------- */
.lbw-card { height: 100%; }
.lbw-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--lbw-bg-elevated);
    border: 1px solid var(--lbw-border);
    border-radius: var(--lbw-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.lbw-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    border-color: var(--lbw-blue-dark);
}
.lbw-card-media {
    aspect-ratio: 16 / 10;
    background: #0f1013;
    overflow: hidden;
}
.lbw-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.lbw-card-link:hover .lbw-card-media img { transform: scale(1.06); }

.lbw-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.lbw-badge {
    display: inline-block;
    width: fit-content;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 5px 8px 4px;
    border-radius: 4px;
    color: #111;
}
.lbw-badge--blue { background: var(--lbw-blue); color: #0c1626; }
.lbw-badge--orange { background: var(--lbw-orange); color: #2b1200; }
.lbw-badge--yellow { background: var(--lbw-yellow); color: #2b2000; }
.lbw-badge--green { background: var(--lbw-green); color: #0d2114; }
.lbw-badge--red { background: var(--lbw-red); color: #2b0d10; }

.lbw-badge-group { display: flex; gap: 6px; flex-wrap: wrap; }

.lbw-card-title {
    font-family: var(--lbw-font-display);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.25;
    margin: 0;
    color: var(--lbw-text);
    transition: color 0.15s ease;
}
.lbw-card-link:hover .lbw-card-title { color: var(--lbw-blue); }

.lbw-card-excerpt {
    font-size: 14px;
    color: var(--lbw-text-muted);
    line-height: 1.5;
    margin: 0;
}

.lbw-card-date {
    margin-top: auto;
    font-size: 12px;
    color: var(--lbw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ---------- Grids ---------- */
.lbw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.lbw-grid--row { grid-template-columns: repeat(4, 1fr); }

/* ---------- Hero ---------- */
.lbw-hero .lbw-card-link {
    flex-direction: column;
}
.lbw-hero .lbw-card-media { aspect-ratio: 21 / 9; }
.lbw-hero .lbw-card-title { font-size: 36px; }
.lbw-hero .lbw-card-body { padding: 24px; gap: 12px; }
.lbw-hero .lbw-badge { font-size: 12px; padding: 4px 10px; }

/* ---------- Contact CTA ---------- */
.lbw-contact-cta {
    text-align: center;
    background: var(--lbw-bg-elevated);
    border: 1px solid var(--lbw-border);
    border-radius: var(--lbw-radius);
    padding: 48px 24px;
}
.lbw-contact-cta .lbw-section-title {
    border-left: none;
    padding-left: 0;
    justify-content: center;
    display: block;
}
.lbw-contact-text {
    max-width: 520px;
    margin: 0 auto 24px;
    color: var(--lbw-text-muted);
    font-size: 16px;
    line-height: 1.6;
}
.lbw-contact-button {
    display: inline-block;
    background: var(--lbw-blue);
    color: #0c1626;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 28px;
    border-radius: 8px;
    transition: background 0.15s ease, transform 0.15s ease;
}
.lbw-contact-button:hover { background: var(--lbw-yellow); transform: translateY(-2px); }

/* ---------- Footer ---------- */
.lbw-footer {
    border-top: 1px solid var(--lbw-border);
    background: #101217;
    margin-top: 64px;
}
.lbw-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
}
.lbw-logo--footer .lbw-logo-text { font-size: 30px; }
.lbw-logo--footer .lbw-logo-img { height: 72px; }
.lbw-footer-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.lbw-footer-col { min-width: 160px; }
.lbw-footer-heading {
    font-family: var(--lbw-font-display);
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #fff;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--lbw-orange);
    display: inline-block;
}
.lbw-footer-links { display: flex; flex-direction: column; gap: 10px; }
.lbw-footer-links a {
    font-size: 14px;
    color: var(--lbw-orange);
    transition: color 0.15s ease;
}
.lbw-footer-links a:hover { color: var(--lbw-blue); }

.lbw-footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 32px;
    border-top: 1px solid var(--lbw-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.lbw-footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.lbw-footer-legal a {
    font-size: 13px;
    color: var(--lbw-text-muted);
    transition: color 0.15s ease;
}
.lbw-footer-legal a:hover { color: var(--lbw-text); }
.lbw-footer-copy {
    font-size: 12px;
    color: var(--lbw-text-muted);
    margin: 0;
}

/* ---------- Article (singular) ---------- */
.lbw-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}
.lbw-article-head { margin-bottom: 24px; }
.lbw-article-title {
    font-family: var(--lbw-font-display);
    font-weight: 800;
    font-size: 42px;
    line-height: 1.15;
    color: #fff;
    margin: 12px 0 16px;
}
.lbw-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--lbw-text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.lbw-article-meta a { color: var(--lbw-text); text-decoration: none; }
.lbw-article-meta a:hover { color: var(--lbw-blue); }
.lbw-author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.lbw-article-thumb {
    margin: 24px 0;
    border-radius: var(--lbw-radius);
    overflow: hidden;
}

.lbw-author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 48px;
    padding: 24px;
    background: var(--lbw-bg-elevated);
    border: 1px solid var(--lbw-border);
    border-radius: var(--lbw-radius);
}
.lbw-author-box-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}
.lbw-author-box-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--lbw-text-muted);
    margin-bottom: 4px;
}
.lbw-author-box-name {
    font-family: var(--lbw-font-display);
    font-weight: 700;
    font-size: 20px;
    color: #fff;
}
.lbw-author-box-name:hover { color: var(--lbw-blue); }
.lbw-author-box-bio {
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--lbw-text-muted);
}

.lbw-prose { font-size: 17px; line-height: 1.75; }
.lbw-prose h2 {
    font-family: var(--lbw-font-display);
    font-weight: 800;
    font-size: 32px;
    line-height: 1.2;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 56px 0 24px;
    padding-left: 18px;
    border-left: 5px solid var(--lbw-orange);
}
.lbw-prose h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--lbw-font-display);
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    margin: 36px 0 16px;
}
.lbw-prose h3::before {
    content: "";
    flex: 0 0 auto;
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--lbw-blue);
}
.lbw-prose p, .lbw-prose ul, .lbw-prose ol { margin: 0 0 20px; }
.lbw-prose ul, .lbw-prose ol { padding-left: 22px; }
.lbw-prose li { margin-bottom: 8px; }
.lbw-prose a { color: var(--lbw-blue); text-decoration: underline; text-underline-offset: 2px; }
.lbw-prose a:hover { color: var(--lbw-yellow); }
.lbw-prose img { border-radius: var(--lbw-radius); margin: 24px 0; }
.lbw-prose blockquote {
    margin: 24px 0;
    padding: 4px 20px;
    border-left: 3px solid var(--lbw-orange);
    color: var(--lbw-text-muted);
    font-style: italic;
}
/* Conteneur ajouté par script.js autour de chaque <table> : c'est LUI qui
   gère la largeur/le scroll horizontal (fiable), pas la table elle-même. */
.lbw-table-scroll {
    margin: 32px 0 !important;
    border: 1px solid var(--lbw-border) !important;
    border-radius: var(--lbw-radius) !important;
    background: var(--lbw-bg-elevated) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}
.lbw-table-scroll::-webkit-scrollbar { height: 8px; }
.lbw-table-scroll::-webkit-scrollbar-thumb { background: var(--lbw-orange); border-radius: 10px; }
.lbw-prose table {
    width: 100% !important;
    min-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 !important;
}
.lbw-prose th, .lbw-prose td {
    border: none !important;
    border-bottom: 1px solid var(--lbw-border) !important;
    padding: 14px 16px !important;
    text-align: left !important;
    background: transparent !important;
    color: var(--lbw-text) !important;
    font-size: 15px !important;
}
.lbw-prose tr:last-child th, .lbw-prose tr:last-child td { border-bottom: none !important; }
.lbw-prose th {
    background: var(--lbw-orange) !important;
    color: #2b1200 !important;
    font-family: var(--lbw-font-display);
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 13px !important;
}
/* Anciens tableaux sans vrai <thead> (juste des <td> sur la première ligne) :
   on stylise cette ligne comme un en-tête, pour rester cohérent visuellement
   avec les tableaux qui en ont un. Neutralisé si un vrai <thead> existe déjà
   (sinon on stylerait aussi la première ligne de données par erreur). */
.lbw-prose table tr:first-child td {
    background: var(--lbw-orange) !important;
    color: #2b1200 !important;
    font-family: var(--lbw-font-display);
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 13px !important;
}
.lbw-prose table thead + tbody tr:first-child td {
    background: transparent !important;
    color: var(--lbw-text) !important;
    font-family: inherit;
    font-weight: 400 !important;
    text-transform: none;
    letter-spacing: normal;
    font-size: 15px !important;
}
.lbw-prose tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.03) !important; }
.lbw-prose strong { color: #fff; }

/* ---------- Archive ---------- */
.lbw-archive {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}
.lbw-archive-title {
    font-family: var(--lbw-font-display);
    font-weight: 800;
    font-size: 38px;
    color: #fff;
    text-transform: uppercase;
    margin: 0 0 32px;
    border-left: 4px solid var(--lbw-orange);
    padding-left: 14px;
}

.lbw-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}
.lbw-pagination a, .lbw-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--lbw-bg-elevated);
    border: 1px solid var(--lbw-border);
    color: var(--lbw-text-muted);
    font-size: 14px;
    font-weight: 600;
}
.lbw-pagination a:hover { color: var(--lbw-blue); border-color: var(--lbw-blue-dark); }
.lbw-pagination .current { color: #fff; background: var(--lbw-blue-dark); border-color: var(--lbw-blue-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .lbw-grid--row { grid-template-columns: repeat(2, 1fr); }
    .lbw-hero .lbw-card-title { font-size: 28px; }
}

@media (max-width: 782px) {
    .lbw-nav {
        position: fixed;
        top: 61px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--lbw-bg);
        transform: translateX(100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
        padding: 12px;
    }
    .lbw-nav.lbw-nav-open { transform: translateX(0); }
    .lbw-nav-list { flex-direction: column; }
    .lbw-nav-item > a { font-size: 16px; padding: 14px; }
    .lbw-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        border: none;
        background: none;
        box-shadow: none;
        padding-left: 12px;
    }
    .lbw-nav-item.lbw-open .lbw-submenu { display: block; }
    .lbw-menu-toggle { display: flex; }
    .lbw-menu-toggle.lbw-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .lbw-menu-toggle.lbw-open span:nth-child(2) { opacity: 0; }
    .lbw-menu-toggle.lbw-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .lbw-grid--row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    .lbw-header-inner { padding: 12px 16px; }
    .lbw-home, .lbw-article, .lbw-archive { padding-left: 16px; padding-right: 16px; }
    .lbw-grid, .lbw-grid--row { grid-template-columns: 1fr; }
    .lbw-hero .lbw-card-title { font-size: 24px; }
    .lbw-section-title { font-size: 22px; }
    .lbw-logo-img { height: 30px; }
    .lbw-logo-text { font-size: 20px; }
    .lbw-article-title { font-size: 30px; }
    .lbw-archive-title { font-size: 28px; }
}
