/*
Theme Name: Le blog de la sûreté
Theme URI: https://leblogdelasurete.com/
Author: Le blog de la sûreté
Description: Thème éditorial WordPress consacré aux métiers de la sûreté, aux technologies, à la cybersécurité et aux référentiels ANSSI, NIS2 et APSAD.
Version: 3.3.0
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lbds
*/

/* ==========================================================================
   1. Jetons de design
   Les couleurs et polices viennent de theme.json (--wp--preset--*) ; l'outil de
   personnalisation les modifie à la source. Les valeurs après la virgule sont des
   secours si les styles globaux de WordPress ne sont pas chargés.
   ========================================================================== */
:root {
  --lbds-navy: var(--wp--preset--color--navy, #0B1F33);
  --lbds-steel: var(--wp--preset--color--steel, #284B63);
  --lbds-blue: var(--wp--preset--color--blue, #168AAD);
  --lbds-blue-dark: var(--wp--preset--color--blue-dark, #096B88);
  --lbds-cyan: var(--wp--preset--color--cyan, #34B6C9);
  --lbds-ink: var(--wp--preset--color--ink, #17212B);
  --lbds-muted: var(--wp--preset--color--muted, #5F6B77);
  --lbds-gray: var(--wp--preset--color--gray, #E9EEF2);
  --lbds-off: var(--wp--preset--color--off, #F8FAFB);
  --lbds-white: var(--wp--preset--color--white, #FFFFFF);
  --lbds-amber: var(--wp--preset--color--amber, #F4A261);
  --lbds-deep: #071A2A;
  --lbds-success: #168F78;
  --lbds-ref: #3976C8;
  --lbds-line: #E1E8ED;
  --lbds-line-strong: #CCD8DF;
  --lbds-tint: #EEF7FA;
  --lbds-font-body: var(--wp--preset--font-family--inter, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --lbds-font-heading: var(--wp--preset--font-family--manrope, Manrope, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --lbds-font-mono: var(--wp--preset--font-family--ibm-plex-mono, "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  --lbds-radius: 14px;
  --lbds-radius-sm: 10px;
  --lbds-shadow: 0 12px 32px rgba(11, 31, 51, .10);
  --lbds-shadow-sm: 0 6px 18px rgba(11, 31, 51, .05);
  --lbds-max: 1200px;
  --lbds-gutter: 16px;
  --lbds-header-h: 76px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip; /* évite la barre de défilement horizontale des blocs pleine largeur */
  background: var(--lbds-off);
  color: var(--lbds-ink);
  font-family: var(--lbds-font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--lbds-blue-dark); text-decoration: none; }
a:hover { color: var(--lbds-navy); }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--lbds-font-heading); color: var(--lbds-navy); line-height: 1.15; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Titres et textes sur fonds sombres : les styles de theme.json colorent tous les titres en bleu nuit. */
:is(.hero, .archive-hero, .section-dark, .site-footer) :is(h1, h2, h3, h4, h5, h6) { color: #fff; }

:focus-visible { outline: 3px solid var(--lbds-blue-dark); outline-offset: 3px; }
:is(.hero, .archive-hero, .section-dark, .site-footer) :focus-visible { outline-color: var(--lbds-cyan); }
#content:focus { outline: none; }

.container { width: min(calc(100% - 2 * var(--lbds-gutter)), var(--lbds-max)); margin-inline: auto; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 10000;
  padding: 12px 20px; border-radius: 8px;
  background: var(--lbds-navy); color: #fff; font-weight: 700;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; color: #fff; }

.eyebrow {
  margin: 0;
  font-family: var(--lbds-font-mono);
  font-size: .76rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--lbds-blue-dark);
}
:is(.hero, .archive-hero, .section-dark) .eyebrow { color: var(--lbds-cyan); }

.post-kicker {
  margin: 0;
  font-family: var(--lbds-font-mono);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--lbds-blue-dark);
}
.post-kicker a { color: inherit; }
.post-kicker a:hover { color: var(--lbds-navy); }

.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; color: var(--lbds-muted); font-size: .84rem; }
.post-meta a { color: inherit; text-decoration: underline; text-underline-offset: .18em; }

/* ==========================================================================
   3. Boutons et icônes
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  border: 0; border-radius: 8px;
  font-weight: 800; line-height: 1.2; text-align: center;
  cursor: pointer;
}
.btn-primary { background: var(--lbds-blue-dark); color: #fff; }
.btn-primary:hover { background: var(--lbds-cyan); color: var(--lbds-navy); }
.btn-secondary { border: 1px solid rgba(255, 255, 255, .6); color: #fff; background: transparent; }
.btn-secondary:hover { background: #fff; color: var(--lbds-navy); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--lbds-navy);
  cursor: pointer;
}
.icon-btn:hover { background: var(--lbds-gray); }
.icon { width: 22px; height: 22px; }

/* ==========================================================================
   4. En-tête, navigation et recherche
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid #DFE7ED;
  backdrop-filter: blur(12px);
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.header-inner { min-height: var(--lbds-header-h); display: flex; align-items: center; gap: 12px 20px; }
.site-branding { margin-right: auto; }
.brand-link { display: flex; align-items: center; gap: 12px; color: var(--lbds-navy); }
.brand-link:hover { color: var(--lbds-navy); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-mark .bm-outer, .brand-mark .bm-axis { stroke: var(--lbds-blue); }
.brand-mark .bm-inner { stroke: var(--lbds-navy); }
.brand-name { font-family: var(--lbds-font-heading); font-weight: 800; font-size: 1.2rem; line-height: 1.05; }
.brand-name span { display: block; }
.brand-name .accent { color: var(--lbds-blue-dark); }
.custom-logo { max-height: 56px; width: auto; }

.primary-menu { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.primary-menu li { position: relative; }
.primary-menu a { display: block; padding: 6px 0; font-size: .92rem; font-weight: 700; color: var(--lbds-navy); }
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current-menu-ancestor > a { color: var(--lbds-blue-dark); }
.primary-menu .current-menu-item > a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.primary-menu .sub-menu {
  display: none; position: absolute; top: 100%; left: -12px; z-index: 30;
  min-width: 230px; margin: 0; padding: 10px 12px; list-style: none;
  background: #fff; border: 1px solid var(--lbds-line); border-radius: var(--lbds-radius-sm);
  box-shadow: var(--lbds-shadow);
}
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { display: block; }
.primary-menu .sub-menu a { padding: 8px 6px; }
.primary-menu .sub-menu .sub-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; }
.nav-cta { display: none; }

.header-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 15px; border-radius: 8px;
  background: var(--lbds-navy); color: #fff;
  font-size: .88rem; font-weight: 800;
}
.header-cta:hover { background: var(--lbds-blue-dark); color: #fff; }

.header-search > summary { list-style: none; }
.header-search > summary::-webkit-details-marker { display: none; }
.header-search[open] > summary { background: var(--lbds-gray); }
.header-search-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  padding: 16px max(var(--lbds-gutter), calc((100% - var(--lbds-max)) / 2));
  background: #fff; border-bottom: 1px solid #DFE7ED; box-shadow: var(--lbds-shadow-sm);
}

.search-form { display: flex; gap: 8px; width: 100%; max-width: 720px; }
.search-field {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  border: 1px solid var(--lbds-line-strong); border-radius: 8px; background: #fff; color: var(--lbds-ink);
}
.search-submit { flex: none; }

.menu-toggle { display: none; }
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ==========================================================================
   5. Accueil : héros, thématiques, à la une, valeurs
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 82px;
  background: linear-gradient(110deg, rgba(7, 27, 45, .96), rgba(10, 57, 83, .85)), radial-gradient(circle at 80% 20%, rgba(52, 182, 201, .26), transparent 30%), var(--lbds-navy);
  color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 72%);
  mask-image: linear-gradient(to left, #000, transparent 72%);
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 5rem); line-height: 1.02; letter-spacing: -.045em; margin: .6rem 0 1rem; }
.hero p:not(.eyebrow) { max-width: 680px; font-size: clamp(1rem, 1.6vw, 1.22rem); color: #DCECF3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero--compact { padding: 72px 0; }
.hero--compact h1 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); }
.hero-search { margin-top: 24px; }
.hero-search .search-field { border-color: transparent; }

.topic-strip { background: #fff; border-bottom: 1px solid #DDE7EE; }
.topic-grid { display: grid; grid-template-columns: repeat(6, 1fr); margin-block: 0; padding: 0; list-style: none; }
.topic-grid > li { display: flex; border-right: 1px solid #E7EDF1; }
.topic-grid > li:first-child { border-left: 1px solid #E7EDF1; }
.topic-card { flex: 1; padding: 25px 16px; text-align: center; color: var(--lbds-navy); }
.topic-card:hover { background: var(--lbds-off); color: var(--lbds-navy); }
.topic-icon { display: block; width: 34px; height: 34px; margin: 0 auto 10px; color: var(--lbds-blue-dark); }
.topic-card strong { display: block; font-size: .88rem; }
.topic-card small { display: block; margin-top: 4px; color: var(--lbds-muted); font-size: .8rem; line-height: 1.35; }

.section { padding: 64px 0; }
.section-white { background: #fff; }
.section-dark { background: var(--lbds-navy); color: #fff; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-heading h2 { margin: .3rem 0 0; font-size: clamp(1.8rem, 3vw, 2.55rem); letter-spacing: -.03em; }
.section-heading > a { font-weight: 800; }

.featured-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; align-items: center; }
.featured-image {
  display: block; margin: 0; overflow: hidden;
  aspect-ratio: 16 / 10; border-radius: var(--lbds-radius);
  background: linear-gradient(135deg, var(--lbds-navy), var(--lbds-steel));
  box-shadow: var(--lbds-shadow);
}
.featured-image img { width: 100%; height: 100%; object-fit: cover; }
.featured-title { margin: .5rem 0 1rem; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.08; letter-spacing: -.035em; }
.featured-title a { color: inherit; }
.featured-title a:hover { color: var(--lbds-blue-dark); }
.read-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 800; }

.value-bar { display: grid; grid-template-columns: 1.3fr repeat(4, .7fr) 1fr; gap: 18px; align-items: center; }
.value-bar h2 { margin: 0; font-size: 1.6rem; }
.value-item { font-size: .86rem; color: #D6E7EF; }
.value-item strong { display: block; color: #fff; }

/* ==========================================================================
   6. Cartes d'articles (toute la carte est cliquable via le lien du titre)
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: #fff; border: 1px solid var(--lbds-line); border-radius: 12px; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--lbds-shadow); }
.post-card:focus-within { outline: 3px solid var(--lbds-blue-dark); outline-offset: 3px; }
.post-card:focus-within .post-card-link:focus-visible { outline: none; }
.post-card-media { position: relative; flex: none; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--lbds-steel), var(--lbds-blue)); }
.post-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card-body { display: flex; flex-direction: column; flex: 1; gap: .55rem; min-width: 0; padding: 20px; overflow-wrap: break-word; }
.post-card-title { margin: 0; font-size: 1.28rem; line-height: 1.18; letter-spacing: -.025em; }
.post-card-link { color: var(--lbds-navy); }
.post-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post-card:hover .post-card-link { color: var(--lbds-blue-dark); }
.post-card-excerpt { margin: 0 0 .3rem; color: var(--lbds-ink); }
.post-card .post-meta { margin-top: auto; }

.pagination { margin-top: 42px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 42px; min-height: 42px; padding: 0 12px; border: 1px solid #DFE6EB; border-radius: 7px; background: #fff; color: var(--lbds-navy); font-weight: 700; }
.pagination .page-numbers:hover { border-color: var(--lbds-blue-dark); }
.pagination .current { background: var(--lbds-navy); border-color: var(--lbds-navy); color: #fff; }
.empty-state { padding: 32px; border: 1px dashed var(--lbds-line-strong); border-radius: var(--lbds-radius); background: #fff; }
.empty-state p { margin-top: 0; }

/* ==========================================================================
   7. Archives, recherche, filtres
   ========================================================================== */
.archive-hero { padding: 58px 0; background: var(--lbds-navy); color: #fff; }
.archive-hero h1 { margin: .4rem 0; font-size: clamp(2.2rem, 4vw, 3.8rem); letter-spacing: -.03em; }
.archive-description { max-width: 720px; color: #D8E6ED; }
.archive-description p { margin: .3rem 0 0; }

.lbds-filter-form {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  margin-bottom: 36px; padding: 18px;
  background: #fff; border: 1px solid #DCE5EB; border-radius: var(--lbds-radius); box-shadow: var(--lbds-shadow-sm);
}
.filter-field { display: grid; gap: 6px; flex: 1 1 180px; min-width: 0; }
.filter-field--search { flex: 2 1 260px; }
.filter-field label { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lbds-muted); }
.filter-field :is(input, select) { width: 100%; min-width: 0; height: 46px; padding: 0 11px; border: 1px solid var(--lbds-line-strong); border-radius: 8px; background: #fff; color: var(--lbds-ink); }
.filter-actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.filter-reset { font-weight: 700; text-decoration: underline; text-underline-offset: .18em; }

/* ==========================================================================
   8. Article et page
   ========================================================================== */
.breadcrumbs { padding: 18px 0; font-size: .84rem; color: var(--lbds-muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.breadcrumbs li + li::before { content: "›"; color: var(--lbds-muted); }
.breadcrumbs a { font-weight: 700; color: var(--lbds-steel); }
.breadcrumbs a:hover { color: var(--lbds-blue-dark); }
.breadcrumbs [aria-current="page"] { max-width: 420px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.article-header { padding: 56px 0 36px; background: #fff; border-bottom: 1px solid #E4EAEE; }
.article-header h1 { max-width: 980px; margin: .65rem 0 1rem; font-size: clamp(2.1rem, 5vw, 4.2rem); line-height: 1.04; letter-spacing: -.045em; }
.article-deck { max-width: 800px; margin: 0 0 1.2rem; font-size: 1.15rem; color: #4F6070; }
.featured-image--single { margin-top: 32px; aspect-ratio: auto; box-shadow: var(--lbds-shadow); }
.featured-image--single img { aspect-ratio: 16 / 10; }
.featured-image figcaption { padding: 10px 16px; background: #fff; color: var(--lbds-muted); font-size: .85rem; }

.content-wrap { display: grid; grid-template-columns: minmax(0, 660px) 280px; justify-content: space-between; gap: 56px; padding: 56px 0 72px; }
.content-wrap--narrow { grid-template-columns: minmax(0, 720px); justify-content: center; }
.article-main, .sidebar { min-width: 0; }

.reading-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border: 1px solid #BFD0DB; border-radius: 8px;
  background: #fff; color: var(--lbds-navy); font-size: .88rem; font-weight: 600; line-height: 1.3;
  cursor: pointer;
}
.tool-btn:hover { background: var(--lbds-tint); color: var(--lbds-navy); }
.tool-btn[hidden] { display: none; }
.tool-icon { width: 17px; height: 17px; flex: none; }
.reading-status, .content-updated { font-size: .88rem; color: #465D6C; }
.content-updated { margin: 0 0 20px; }

/* Contenu rédactionnel */
.article-content { font-size: 1.125rem; line-height: 1.7; overflow-wrap: break-word; }
.article-content > * { margin-top: 0; margin-bottom: 1.25em; }
.article-content :is(h2, h3, h4) { letter-spacing: -.025em; line-height: 1.18; scroll-margin-top: calc(var(--lbds-header-h) + 24px); }
.article-content h2 { margin-top: 2.2em; margin-bottom: .6em; font-size: 1.85rem; }
.article-content h3 { margin-top: 1.8em; margin-bottom: .5em; font-size: 1.4rem; }
.article-content h4 { margin-top: 1.6em; margin-bottom: .4em; font-size: 1.15rem; }
.article-content :is(ul, ol) { padding-left: 1.3em; }
.article-content li + li { margin-top: .3em; }
.article-content :where(p, li, td, th, figcaption, blockquote, dd) a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.article-content blockquote { margin: 2rem 0; padding: 18px 22px; border-left: 4px solid var(--lbds-blue); border-radius: 0 10px 10px 0; background: var(--lbds-tint); }
.article-content blockquote > :last-child { margin-bottom: 0; }
.article-content blockquote cite { display: block; margin-top: .6em; font-size: .9rem; font-style: normal; color: var(--lbds-muted); }
.article-content hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--lbds-line); }
.article-content :not(pre) > code { padding: .12em .35em; border-radius: 4px; background: #EEF2F5; font-family: var(--lbds-font-mono); font-size: .88em; }
.article-content pre {
  overflow-x: auto; padding: 16px 18px;
  border: 1px solid #DCE5EB; border-radius: var(--lbds-radius-sm);
  background: #F1F5F8; color: var(--lbds-navy);
  font-family: var(--lbds-font-mono); font-size: .86rem; line-height: 1.6;
  white-space: pre; overflow-wrap: normal; tab-size: 4;
}
.article-content pre code { padding: 0; background: none; font: inherit; white-space: inherit; overflow-wrap: inherit; }
.article-content figure { margin-inline: 0; }
.article-content img { height: auto; border-radius: 8px; }
.article-content :is(figcaption, .wp-caption-text, .wp-element-caption) { margin-top: .6em; color: var(--lbds-muted); font-size: .88rem; text-align: center; }
.article-content iframe { max-width: 100%; }

/* Tableaux : défilement horizontal sur petit écran plutôt que des mots coupés */
.article-content .wp-block-table, .article-content > table { display: block; max-width: 100%; overflow-x: auto; }
.article-content table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.article-content .wp-block-table table { display: table; }
.article-content .wp-block-table .has-fixed-layout { min-width: 560px; }
.article-content :is(th, td) { padding: 10px 12px; border: 1px solid #D5DEE5; text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; }
.article-content thead th, .article-content tr > th:only-child { background: #EEF3F6; color: var(--lbds-navy); }
.article-content .wp-block-table thead { border-bottom: 2px solid var(--lbds-navy); }
.article-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: #F5F8FA; }

/* Alignements */
.article-content .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.article-content .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.article-content .aligncenter { margin-left: auto; margin-right: auto; }
.article-content .aligncenter > img { margin-inline: auto; }
.article-content::after { content: ""; display: table; clear: both; }
/* Article avec barre latérale : les blocs larges restent dans la colonne. */
.content-wrap:not(.content-wrap--narrow) .article-content :is(.alignwide, .alignfull) { width: auto; max-width: 100%; margin-left: 0; margin-right: 0; }
/* Page sur une colonne centrée : les blocs larges débordent symétriquement. */
.content-wrap--narrow .article-content > .alignwide { width: auto; max-width: none; margin-inline: calc((100% - min(1100px, 100vw - 2 * var(--lbds-gutter))) / 2); }
.content-wrap--narrow .article-content > .alignfull { width: auto; max-width: none; margin-inline: calc(50% - 50vw); border-radius: 0; }

.page-links { display: flex; gap: 8px; margin: 2rem 0; font-weight: 700; }

/* ==========================================================================
   9. Blocs du thème
   ========================================================================== */
.lbds-callout { margin: 28px 0; padding: 18px 20px; border: 1px solid #D5E5ED; border-left-width: 5px; border-radius: var(--lbds-radius-sm); background: #F2F8FB; }
.lbds-callout > strong { display: block; margin-bottom: 5px; color: var(--lbds-navy); }
.lbds-callout-content > :last-child { margin-bottom: 0; }
.lbds-callout.retenir { border-left-color: var(--lbds-blue); }
.lbds-callout.technique { border-left-color: var(--lbds-steel); }
.lbds-callout.terrain { border-left-color: var(--lbds-success); background: #EFF9F6; }
.lbds-callout.attention { border-left-color: var(--lbds-amber); background: #FFF7EB; }
.lbds-callout.referentiel { border-left-color: var(--lbds-ref); background: #F2F6FD; }

.lbds-diagram { display: flex; align-items: stretch; gap: 22px; margin: 28px 0; padding: 18px; background: #F4F8FA; border: 1px solid #DCE6EC; border-radius: 12px; }
.lbds-diagram-node { position: relative; flex: 1; min-width: 0; padding: 14px 10px; border: 1px solid #CFDCE3; border-radius: 9px; background: #fff; color: var(--lbds-navy); font-size: .95rem; font-weight: 700; line-height: 1.3; text-align: center; overflow-wrap: break-word; hyphens: auto; }
.lbds-diagram-node:not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: -18px; transform: translateY(-50%); color: var(--lbds-blue-dark); font-weight: 400; }

/* ==========================================================================
   10. Fin d'article : sources, auteur, contenus liés, commentaires
   ========================================================================== */
.lbds-sources { margin-top: 48px; padding-top: 22px; border-top: 1px solid #DFE7EC; }
.lbds-sources h2, .lbds-related h2, .comments-title { margin: 0 0 14px; font-size: 1.45rem; }
.lbds-sources ol { margin: 0; padding-left: 1.3em; color: var(--lbds-muted); font-size: .92rem; }
.lbds-sources li + li { margin-top: .55rem; }
.lbds-sources a { text-decoration: underline; text-underline-offset: .18em; }

.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 44px; padding: 22px; border: 1px solid var(--lbds-line); border-radius: var(--lbds-radius); background: #fff; }
.author-avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; }
.author-initials { display: grid; place-items: center; background: var(--lbds-navy); color: #fff; font-family: var(--lbds-font-heading); font-size: 1.5rem; font-weight: 800; }
.author-box-eyebrow { margin: 0; font-family: var(--lbds-font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--lbds-blue-dark); }
.author-box-name { margin: .2rem 0 .4rem; font-size: 1.25rem; }
.author-box-name a { color: var(--lbds-navy); }
.author-box-bio { margin: 0 0 .5rem; color: var(--lbds-ink); }
.author-box-links { margin: 0; font-size: .9rem; color: var(--lbds-muted); }
.author-box-links a { font-weight: 700; }

.lbds-related { margin-top: 44px; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.related-grid > li { display: flex; }
.related-card { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid #DFE7EC; border-radius: var(--lbds-radius-sm); background: #fff; transition: box-shadow .2s ease, transform .2s ease; }
.related-card:hover { transform: translateY(-1px); box-shadow: var(--lbds-shadow); }
.related-kicker { font-family: var(--lbds-font-mono); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lbds-blue-dark); }
.related-card strong { color: var(--lbds-navy); line-height: 1.3; }
.related-card:hover strong { color: var(--lbds-blue-dark); }
.related-meta { margin-top: auto; padding-top: 4px; color: var(--lbds-muted); font-size: .82rem; }

.comments-area { margin-top: 48px; padding-top: 24px; border-top: 1px solid #DFE7EC; }
.comment-list, .comment-list .children { margin: 0; padding: 0; list-style: none; }
.comment-list .children { margin-left: 24px; }
.comment-body { margin-bottom: 16px; padding: 16px 18px; border: 1px solid var(--lbds-line); border-radius: var(--lbds-radius-sm); background: #fff; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; font-size: .88rem; }
.comment-author { font-weight: 700; color: var(--lbds-navy); }
.comment-date { color: var(--lbds-muted); }
.comment-content > :last-child { margin-bottom: 0; }
.comment-reply a { font-size: .88rem; font-weight: 700; }
.comment-awaiting { color: var(--lbds-muted); font-style: italic; }
.comment-respond { margin-top: 24px; }
.comment-reply-title { font-size: 1.2rem; }
.comment-form { display: grid; gap: 14px; }
.comment-form > p { margin: 0; }
.comment-form label { display: block; margin-bottom: 4px; font-weight: 700; font-size: .9rem; }
.comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea) { width: 100%; padding: 10px 12px; border: 1px solid var(--lbds-line-strong); border-radius: 8px; background: #fff; }
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--lbds-muted); }

/* ==========================================================================
   11. Barre latérale
   ========================================================================== */
.sidebar-card { margin-bottom: 20px; padding: 20px; background: #fff; border: 1px solid var(--lbds-line); border-radius: 12px; }
.sidebar-title, .sidebar-card :is(h2, .wp-block-heading) { margin: 0 0 12px; font-size: 1.1rem; }
.sidebar-card ul { margin: 0; padding: 0; list-style: none; }
.sidebar-card > ul li + li, .sidebar-card .wp-block-latest-posts li + li { border-top: 1px solid #EDF1F4; }
.sidebar-card :is(.wp-block-latest-posts, .wp-block-categories, .wp-block-archives, .menu) a { display: block; padding: 10px 0; color: var(--lbds-navy); font-weight: 700; font-size: .92rem; }
.sidebar .wp-block-search__inside-wrapper { flex-wrap: wrap; gap: 8px; }
.sidebar .wp-block-search__input { min-width: 0; flex: 1 1 140px; height: 44px; padding: 0 12px; border: 1px solid var(--lbds-line-strong); border-radius: 8px; }
.sidebar .wp-block-search__button { margin: 0; min-height: 44px; border: 0; border-radius: 8px; background: var(--lbds-blue-dark); color: #fff; font-weight: 700; }
.sidebar .search-form { flex-wrap: wrap; }
.chips-label { margin: 0 0 8px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lbds-muted); }
.chips-label:not(:first-of-type) { margin-top: 14px; }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sidebar-card .term-chips li + li { border: 0; }
.term-chips a { display: inline-block; padding: 5px 12px; border: 1px solid #D6E2E9; border-radius: 999px; background: var(--lbds-off); color: var(--lbds-navy); font-size: .86rem; font-weight: 700; }
.term-chips a:hover { border-color: var(--lbds-blue-dark); color: var(--lbds-blue-dark); }

/* ==========================================================================
   12. Pied de page
   ========================================================================== */
.site-footer { padding: 58px 0 25px; background: var(--lbds-deep); color: #C7D9E2; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 36px; }
.footer-grid > * { flex: 1 1 170px; }
.footer-brand { flex: 1.6 1 280px; }
.footer-brand p { max-width: 380px; }
.site-footer .brand-link { color: #fff; }
.site-footer .brand-mark .bm-outer, .site-footer .brand-mark .bm-axis { stroke: var(--lbds-cyan); }
.site-footer .brand-mark .bm-inner { stroke: #fff; }
.site-footer .brand-name .accent { color: var(--lbds-cyan); }
.footer-title { margin: 0 0 14px; font-size: 1rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 7px 0; }
.site-footer a { color: #C7D9E2; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: .18em; }
.footer-bottom { display: flex; justify-content: space-between; gap: 8px 20px; margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .82rem; }

/* ==========================================================================
   13. Tablette (≤ 980 px)
   ========================================================================== */
@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; }
  .header-cta { display: none; }
  .js .menu-toggle { display: inline-grid; }
  .primary-nav { order: 10; width: 100%; padding: 4px 0 16px; }
  .js .primary-nav:not(.is-open) { display: none; }
  .js .primary-nav.is-open { max-height: calc(100vh - var(--lbds-header-h)); max-height: calc(100dvh - var(--lbds-header-h)); overflow-y: auto; }
  .primary-menu { display: grid; gap: 0; }
  .primary-menu a { padding: 12px 0; font-size: 1rem; }
  .primary-menu > li + li { border-top: 1px solid #EDF1F4; }
  .primary-menu .sub-menu { display: block; position: static; min-width: 0; padding: 0 0 8px 18px; border: 0; box-shadow: none; }
  .primary-menu .sub-menu a { padding: 9px 0; }
  .nav-cta { display: flex; margin-top: 12px; }

  .topic-grid { grid-template-columns: repeat(3, 1fr); }
  .topic-grid > li { border-bottom: 1px solid #E7EDF1; }
  .topic-grid > li:nth-child(3n + 1) { border-left: 1px solid #E7EDF1; }
  .featured-grid, .content-wrap { grid-template-columns: minmax(0, 1fr); }
  .content-wrap { gap: 40px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-bar { grid-template-columns: 1fr 1fr; }
  .value-bar h2 { grid-column: 1 / -1; }
}

/* ==========================================================================
   14. Mobile (≤ 640 px)
   ========================================================================== */
@media (max-width: 640px) {
  :root { --lbds-gutter: 12px; --lbds-header-h: 68px; }
  .header-inner { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1.05rem; }
  .hero { padding: 62px 0; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-grid > li:nth-child(3n + 1) { border-left: 0; }
  .topic-grid > li:nth-child(2n + 1) { border-left: 1px solid #E7EDF1; }
  .topic-card { padding: 20px 10px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 46px 0; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .article-header { padding-top: 40px; }
  .article-content { font-size: 1.0625rem; }
  .article-content h2 { font-size: 1.55rem; }
  .article-content :is(.alignleft, .alignright) { float: none; max-width: 100%; margin: 1em 0; }
  .lbds-diagram { flex-direction: column; gap: 26px; }
  .lbds-diagram-node:not(:last-child)::after { content: "↓"; top: auto; right: 50%; bottom: -24px; transform: translateX(50%); }
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .author-box { flex-direction: column; }
  .search-form { flex-wrap: wrap; }
  .search-submit { flex: 1 1 100%; }
  .filter-actions { flex: 1 1 100%; }
  .filter-actions .btn { flex: 1; }
  .value-bar { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .breadcrumbs [aria-current="page"] { max-width: 220px; }
}

/* ==========================================================================
   15. Préférences et impression
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .sidebar, .reading-tools, .lbds-related, .comments-area, .author-box, .breadcrumbs, .skip-link { display: none !important; }
  body, #content { background: #fff !important; color: #000 !important; }
  .container { width: 100%; max-width: none; padding: 0; }
  .content-wrap { display: block; padding: 0; }
  .article-header { padding: 0; background: #fff; border: 0; }
  .article-content { font-size: 11pt; line-height: 1.5; }
  .article-content a { color: #000; }
  .article-content :where(p, li) a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; word-break: break-all; }
  .lbds-callout, .lbds-diagram, pre, table, figure { break-inside: avoid; box-shadow: none; }
  .article-content pre { white-space: pre-wrap; }
  h1, h2, h3 { break-after: avoid; }
  img { max-height: 16cm; object-fit: contain; }
}
