/* ============================================================
   code sante publique — custom theme CSS
   Design System: Organique Mousse Verte (organic-moss-06)
   Fonts: Eczar (headings) + Karla (body)
   ============================================================ */

:root {
  --b51-primary:   #3A4A2C;
  --b51-accent:    #7A8F58;
  --b51-text:      #1F2A14;
  --b51-text-soft: #5A6A48;
  --b51-bg:        #EDEBE0;
  --b51-surface:   #F5F2E5;
  --b51-line:      #CDD0BB;
  --b51-white:     #FFFFFF;

  --b51-font-headings: "Eczar", Georgia, serif;
  --b51-font-body:     "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;

  --b51-radius-sm: 6px;
  --b51-radius-md: 10px;
  --b51-radius-lg: 16px;

  --b51-shadow-sm: 0 2px 8px rgba(31, 42, 20, 0.06);
  --b51-shadow-md: 0 8px 24px rgba(31, 42, 20, 0.10);
  --b51-shadow-lg: 0 16px 48px rgba(31, 42, 20, 0.18);

  --b51-container: 1180px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.b51-body {
  margin: 0;
  font-family: var(--b51-font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--b51-text);
  background: var(--b51-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--b51-font-headings);
  color: var(--b51-primary);
  line-height: 1.22;
  margin: 0 0 .8rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

a { color: var(--b51-primary); text-decoration: none; }
a:hover { color: var(--b51-accent); }

img { max-width: 100%; height: auto; display: block; }

.b51-container {
  max-width: var(--b51-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main, .b51-main { padding-top: 0 !important; margin-top: 0 !important; }

.b51-skip-link {
  position: absolute; left: -9999px; top: -9999px;
  background: var(--b51-primary); color: #fff; padding: .6rem 1rem;
  z-index: 99999;
}
.b51-skip-link:focus { left: .5rem; top: .5rem; }

/* ===== HEADER ===== */
.b51-header {
  background: var(--b51-surface);
  border-bottom: 1px solid var(--b51-line);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--b51-shadow-sm);
}
.b51-header-inner {
  max-width: var(--b51-container);
  margin: 0 auto;
  padding: .85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.b51-brand-link {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; color: var(--b51-primary);
  flex-shrink: 0;
}
.b51-brand-logo {
  width: auto; height: 44px;
  display: block;
}
.b51-brand-name {
  font-family: var(--b51-font-headings);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0;
  color: var(--b51-primary);
  white-space: nowrap;
}

.b51-nav-desktop { display: none; }
.b51-nav-desktop-list {
  display: flex; gap: 1.4rem; list-style: none;
  margin: 0; padding: 0; align-items: center;
}
.b51-nav-desktop-list a {
  color: var(--b51-text); text-decoration: none;
  font-weight: 500; font-size: .94rem;
  padding: .35rem .15rem;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.b51-nav-desktop-list a:hover {
  border-bottom-color: var(--b51-accent);
  color: var(--b51-primary);
}

.b51-burger {
  background: transparent; border: 0; padding: .5rem; cursor: pointer;
  width: 44px; height: 44px;
  display: flex; flex-direction: column; gap: 5px; justify-content: center; align-items: center;
}
.b51-burger span {
  display: block; width: 24px; height: 2px;
  background: var(--b51-primary); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

@media (min-width: 1024px) {
  .b51-nav-desktop { display: flex; flex: 1; justify-content: center; margin: 0 1rem; }
  .b51-burger { display: none !important; }
}

/* Mobile drawer */
.b51-nav-mobile { display: none; }
.b51-nav-overlay {
  position: fixed; inset: 0;
  background: rgba(31, 42, 20, 0.55);
  z-index: 998; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.b51-nav-overlay.is-visible { opacity: 1; pointer-events: auto; }

@media (max-width: 1023px) {
  .b51-nav-mobile {
    display: flex; flex-direction: column;
    position: fixed; top: 0; right: -100%;
    width: 86%; max-width: 380px;
    height: 100vh;
    background: #ffffff;
    padding: 4.5rem 1.5rem 2rem;
    z-index: 9999; overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0,0,0,0.25);
    transition: right .35s cubic-bezier(.16,1,.3,1);
  }
  .b51-nav-mobile.is-open { right: 0; }
  .b51-nav-mobile-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column;
  }
  .b51-nav-mobile-list li { border-bottom: 1px solid #e5e5e5; }
  .b51-nav-mobile-list a {
    display: block; padding: 1rem 0;
    color: #0a0a0a; text-decoration: none;
    font-size: 1.05rem; font-weight: 500;
  }
  .b51-nav-mobile-list a:hover { color: var(--b51-accent); }
  .b51-nav-mobile-close {
    position: absolute; top: 1rem; right: 1.25rem;
    background: transparent; border: 0; cursor: pointer;
    font-size: 2rem; line-height: 1; color: var(--b51-primary);
    padding: .2rem .5rem;
  }
}

/* ===== BUTTONS ===== */
.b51-btn {
  display: inline-block;
  padding: .85rem 1.6rem;
  font-family: var(--b51-font-body);
  font-weight: 700; font-size: 1rem;
  text-decoration: none;
  border-radius: var(--b51-radius-md);
  cursor: pointer; border: 2px solid transparent;
  transition: background .25s, color .25s, border-color .25s, transform .15s;
  letter-spacing: 0.01em;
}
.b51-btn--cta {
  background: var(--b51-primary); color: #fff;
  border-color: var(--b51-primary);
  position: relative; overflow: hidden;
}
.b51-btn--cta:hover {
  background: var(--b51-accent); color: #fff;
  border-color: var(--b51-accent);
}
.b51-btn--cta::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transform: translate(-50%, -50%);
  transition: width .55s ease-out, height .55s ease-out, opacity .55s ease-out;
  opacity: 1; pointer-events: none;
}
.b51-btn--cta:active::after { width: 320px; height: 320px; opacity: 0; }
.b51-btn--ghost {
  background: transparent; color: var(--b51-primary);
  border-color: var(--b51-primary);
}
.b51-btn--ghost:hover {
  background: var(--b51-primary); color: #fff;
}

/* ===== HERO (zoom-on-scroll) ===== */
.b51-hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  display: flex; align-items: center;
  background: var(--b51-primary);
}
.b51-hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  transform: scale(1.0);
  transform-origin: center center;
  transition: transform .12s linear;
  will-change: transform;
}
.b51-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(31,42,20,0.45) 0%, rgba(31,42,20,0.75) 100%);
}
.b51-hero-inner {
  position: relative; z-index: 3;
  max-width: var(--b51-container);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  width: 100%;
  color: #fff;
}
.b51-hero-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  font-size: .82rem;
  letter-spacing: .12em;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  padding: .35rem .85rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.b51-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.08;
  color: #fff;
  margin: 0 0 1.25rem;
  max-width: 16ch;
  text-shadow: 0 2px 14px rgba(0,0,0,0.4);
}
.b51-hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
  max-width: 56ch;
  margin: 0 0 2rem;
}
.b51-hero-cta {
  display: flex; gap: 1rem; flex-wrap: wrap;
}
.b51-hero-cta .b51-btn--ghost {
  color: #fff; border-color: rgba(255,255,255,0.85);
}
.b51-hero-cta .b51-btn--ghost:hover {
  background: #fff; color: var(--b51-primary);
}

/* Zoom-on-scroll JS hook */
.b51-hero[data-scroll-zoom] .b51-hero-bg {
  transform: scale(var(--b51-zoom, 1));
}

/* ===== EDITORIAL INTRO (after-hero bloc 400-700 mots) ===== */
.b51-editorial-intro {
  padding: 4.5rem 0 3.5rem;
  background: var(--b51-bg);
}
.b51-editorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 900px) {
  .b51-editorial-grid {
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
  }
}
.b51-editorial-main h2.b51-editorial-h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1.25rem;
  color: var(--b51-primary);
}
.b51-editorial-main h3.b51-editorial-h3 {
  font-size: 1.45rem;
  margin: 1.75rem 0 .75rem;
  color: var(--b51-primary);
}
.b51-editorial-main p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--b51-text);
  margin: 0 0 1.1rem;
}
.b51-editorial-main p a {
  color: var(--b51-primary);
  text-decoration: underline;
  text-decoration-color: var(--b51-accent);
  text-underline-offset: 3px;
  font-weight: 600;
}
.b51-editorial-aside {
  background: var(--b51-surface);
  border: 1px solid var(--b51-line);
  border-radius: var(--b51-radius-lg);
  padding: 1.75rem;
  align-self: start;
  box-shadow: var(--b51-shadow-sm);
}
.b51-editorial-aside h4 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--b51-primary);
}
.b51-editorial-aside ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .85rem;
}
.b51-editorial-aside li {
  font-size: .98rem;
  line-height: 1.55;
  padding-left: 1.2rem;
  position: relative;
  color: var(--b51-text);
}
.b51-editorial-aside li::before {
  content: '◆'; position: absolute; left: 0; top: .15rem;
  color: var(--b51-accent); font-size: .85rem;
}

/* ===== CATEGORIES GRID ===== */
.b51-categories {
  padding: 4rem 0;
  background: var(--b51-surface);
}
.b51-section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  text-align: center;
  margin: 0 0 .5rem;
}
.b51-section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--b51-text-soft);
  margin: 0 0 2.5rem;
}
.b51-categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 600px) {
  .b51-categories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .b51-categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  .b51-categories-grid { grid-template-columns: repeat(4, 1fr); }
}

.b51-cat-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--b51-line);
  border-radius: var(--b51-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
}
.b51-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--b51-shadow-md);
}
.b51-cat-card-img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.b51-cat-card--no-img .b51-cat-card-img-fallback {
  display: block; width: 100%; height: 180px;
  background: linear-gradient(135deg, var(--b51-primary), var(--b51-accent));
}
.b51-cat-card-body {
  padding: 1.25rem 1.25rem 1.4rem;
  flex-grow: 1;
  display: flex; flex-direction: column;
}
.b51-cat-card-title {
  font-size: 1.3rem;
  margin: 0 0 .5rem;
  color: var(--b51-primary);
}
.b51-cat-card-desc {
  margin: 0 0 1rem;
  font-size: .95rem;
  color: var(--b51-text-soft);
  line-height: 1.55;
  flex-grow: 1;
}
.b51-cat-card-arrow {
  font-weight: 700;
  color: var(--b51-accent);
  font-size: .95rem;
}
.b51-cat-card:hover .b51-cat-card-arrow {
  color: var(--b51-primary);
}

/* ===== BY-CATEGORY BLOCKS (home article layout) ===== */
.b51-by-cat {
  padding: 4rem 0;
  background: var(--b51-bg);
}
.b51-by-cat-block {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--b51-line);
}
.b51-by-cat-block:last-child {
  border-bottom: 0; margin-bottom: 0;
}
.b51-by-cat-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: .85rem;
  border-bottom: 2px solid var(--b51-primary);
}
.b51-by-cat-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0;
}
.b51-by-cat-title a {
  color: var(--b51-primary);
  text-decoration: none;
}
.b51-by-cat-title a:hover { color: var(--b51-accent); }
.b51-by-cat-link {
  color: var(--b51-accent);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
}
.b51-by-cat-link:hover { color: var(--b51-primary); text-decoration: underline; }

.b51-by-cat-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 700px) {
  .b51-by-cat-list { grid-template-columns: repeat(2, 1fr); }
}

.b51-by-cat-item {
  background: #fff;
  border: 1px solid var(--b51-line);
  border-radius: var(--b51-radius-md);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.b51-by-cat-item:hover { transform: translateY(-2px); box-shadow: var(--b51-shadow-md); }
.b51-by-cat-item-link {
  display: block;
  color: inherit; text-decoration: none;
}
.b51-by-cat-item-img img {
  width: 100%; height: 220px; object-fit: cover; display: block;
}
.b51-by-cat-item-body {
  padding: 1.1rem 1.25rem 1.25rem;
}
.b51-by-cat-item-title {
  font-size: 1.15rem;
  margin: 0 0 .5rem;
  color: var(--b51-primary);
  line-height: 1.3;
}
.b51-by-cat-item-date {
  font-size: .85rem;
  color: var(--b51-text-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.b51-by-cat-empty {
  background: var(--b51-surface);
  border: 1px dashed var(--b51-line);
  border-radius: var(--b51-radius-md);
  padding: 1.5rem;
  text-align: center;
}
.b51-by-cat-empty p { margin: 0; color: var(--b51-text-soft); }
.b51-by-cat-empty a { font-weight: 700; }

/* ===== ABOUT TEASER ===== */
.b51-about-teaser {
  padding: 4rem 0;
  background: var(--b51-surface);
}
.b51-about-teaser-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 800px) {
  .b51-about-teaser-inner {
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
  }
}
.b51-about-teaser-img img {
  border-radius: var(--b51-radius-lg);
  width: 100%;
  height: auto;
  box-shadow: var(--b51-shadow-md);
}
.b51-about-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  font-size: .82rem;
  letter-spacing: .12em;
  color: var(--b51-accent);
  font-weight: 700;
  margin-bottom: .75rem;
}
.b51-about-teaser-body h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 1rem;
}
.b51-about-teaser-body p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--b51-text);
  margin: 0 0 1.5rem;
}

/* ===== CONTENT (single, page, category) ===== */
.b51-content {
  padding: 3rem 0;
  background: var(--b51-bg);
}
.b51-content .b51-container {
  max-width: 780px;
}
.b51-content h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 1.25rem;
}
.b51-content h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
  color: var(--b51-primary);
}
.b51-content h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 .75rem;
}
.b51-content p {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  line-height: 1.75;
}
.b51-content a {
  color: var(--b51-primary);
  text-decoration: underline;
  text-decoration-color: var(--b51-accent);
  text-underline-offset: 3px;
}
.b51-persona-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  float: right;
  margin: 0 0 1rem 1.5rem;
  box-shadow: var(--b51-shadow-md);
}
@media (max-width: 600px) {
  .b51-persona-photo {
    float: none;
    margin: 0 auto 1.5rem;
    width: 180px; height: 180px;
    display: block;
  }
}

/* ===== CONTACT FORM WRAPPER ===== */
.b51-contact-form {
  margin: 2rem 0;
  background: var(--b51-surface);
  border-radius: var(--b51-radius-lg);
  padding: 1rem;
  border: 1px solid var(--b51-line);
}
.b51-contact-form iframe {
  border-radius: var(--b51-radius-md);
  display: block;
}

/* ===== CTR Hover reveal card animation hook ===== */
.b51-card {
  position: relative; overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.b51-card .b51-card-reveal {
  position: absolute; left: 0; right: 0; bottom: -100%;
  background: linear-gradient(180deg, transparent 0%, rgba(58,74,44,0.92) 40%);
  color: #fff; padding: 1.25rem;
  transition: bottom .45s cubic-bezier(.16,1,.3,1);
}
.b51-card:hover { transform: translateY(-4px); box-shadow: var(--b51-shadow-md); }
.b51-card:hover .b51-card-reveal { bottom: 0; }

/* ===== CTO calendar booking embed style ===== */
.b51-cto {
  background: var(--b51-surface);
  border: 1px solid var(--b51-line);
  border-radius: var(--b51-radius-lg);
  padding: 1.5rem;
  max-width: 520px;
  animation: b51-cto-enter .55s cubic-bezier(.16,1,.3,1) both;
}
.b51-cto-day {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  margin: .2rem;
  background: #fff; border: 1px solid var(--b51-line);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.b51-cto-day:hover { background: var(--b51-accent); border-color: var(--b51-accent); color: #fff; }
@keyframes b51-cto-enter {
  0% { opacity: 0; transform: translateY(14px) scale(.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== FOOTER ===== */
.b51-footer {
  background: #1F2A14;
  color: #EDEBE0;
  padding: 3.5rem 0 0;
  margin-top: 0;
}
.b51-footer-inner {
  max-width: var(--b51-container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 700px) {
  .b51-footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .b51-footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
  }
}
.b51-footer-title {
  font-family: var(--b51-font-headings);
  color: #F5F2E5;
  font-size: 1.15rem;
  margin: 0 0 1rem;
  font-weight: 700;
}
.b51-footer-logo {
  filter: brightness(0) invert(1);
  opacity: 0.95;
  height: 56px !important;
  width: auto;
}
.b51-footer-brand-pitch {
  font-size: .98rem;
  line-height: 1.6;
  color: #E0DDD0;
  margin: 0 0 1.25rem;
}
.b51-footer-brand-cta {
  display: inline-block;
  color: #F5F2E5;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--b51-accent);
  text-underline-offset: 4px;
  font-size: .98rem;
}
.b51-footer-brand-cta:hover { color: var(--b51-accent); }

.b51-footer-links {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .55rem;
}
.b51-footer-links a {
  color: #E0DDD0;
  text-decoration: underline;
  text-decoration-color: rgba(122, 143, 88, 0.4);
  text-underline-offset: 3px;
  font-size: .95rem;
  transition: color .2s;
}
.b51-footer-links a:hover {
  color: #F5F2E5;
  text-decoration-color: var(--b51-accent);
}

.b51-footer-bottom {
  border-top: 1px solid rgba(205, 208, 187, 0.18);
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.b51-footer-bottom p {
  margin: 0;
  font-size: .9rem;
  color: #B8BFA8;
}

/* ===== CATEGORY ARCHIVE (tldr-detailed layout) ===== */
.b51-cat-hero {
  position: relative;
  height: 320px;
  max-height: 350px;
  overflow: hidden;
  background: var(--b51-primary);
}
.b51-cat-hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.b51-cat-hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, transparent 30%, rgba(31, 42, 20, 0.85) 100%);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1.5rem;
}
.b51-cat-hero-title {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
  max-width: var(--b51-container);
  margin-left: auto; margin-right: auto;
  width: 100%;
  text-shadow: 0 2px 14px rgba(0,0,0,0.6);
}
.b51-cat-intro {
  padding: 2.5rem 0;
  background: var(--b51-surface);
}
.b51-cat-intro .b51-container { max-width: 820px; }
.b51-cat-intro p {
  font-size: 1.08rem;
  line-height: 1.7;
}

/* ===== UTILITIES ===== */
.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;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 600px) {
  .b51-hero-inner { padding: 3rem 1.5rem; }
  .b51-hero-cta { flex-direction: column; }
  .b51-hero-cta .b51-btn { width: 100%; text-align: center; }
  .b51-editorial-intro { padding: 3rem 0 2.5rem; }
  .b51-categories, .b51-by-cat, .b51-about-teaser { padding: 3rem 0; }
}

/* Validator: cap hauteur hero cat v2 */
body section[class*="cat-hero"], body div[class*="cat-hero"], body section[class*="category-hero"], body div[class*="category-hero"] { position: relative !important; height: 320px !important; max-height: 320px !important; min-height: 200px !important; padding: 0 !important; overflow: hidden !important; display: flex !important; align-items: center !important; border: none !important; box-shadow: none !important; }
body [class*="cat-hero"] > img, body [class*="cat-hero-bg"], body [class*="cat-hero"] img, body [class*="category-hero"] img { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-height: 320px !important; object-fit: cover !important; z-index: 0 !important; border: none !important; }
body [class*="cat-hero"] > [class*="container"], body [class*="cat-hero"] > [class*="wrap"], body [class*="cat-hero"] > [class*="inner"], body [class*="cat-hero"] > div { position: relative !important; z-index: 2 !important; max-width: 900px !important; margin: 0 auto !important; padding: 1.5rem 2rem !important; background: transparent !important; }
body [class*="cat-hero"] h1, body [class*="category-hero"] h1 { color: #ffffff !important; font-size: clamp(2rem, 5vw, 3.5rem) !important; margin: 0 !important; font-weight: 800 !important; text-shadow: 0 3px 12px rgba(0,0,0,.85), 0 0 30px rgba(0,0,0,.5) !important; }
body [class*="cat-hero"][style*="background-image"] { background-size: cover !important; background-position: center !important; }
body [class*="cat-hero"] [class*="breadcrumb"], body [class*="cat-hero"] nav[aria-label*="riane"], body [class*="cat-hero"] nav[aria-label*="readcrumb"] { display: none !important; }

/* Validator: nav-mobile drawer hidden by default v2 */
/* Drawer/burger menu mobile : hidden par defaut, visible mobile+is-open */
[class*="-nav-mobile"]:not(.is-open), [id*="-nav-mobile"]:not(.is-open), [class*="-drawer"]:not(.is-open), [class*="-burger-menu"]:not(.is-open), [class*="-mobile-menu"]:not(.is-open) { display: none !important; }
@media (max-width: 980px) {
  [class*="-nav-mobile"].is-open, [id*="-nav-mobile"].is-open, [class*="-drawer"].is-open, [class*="-burger-menu"].is-open, [class*="-mobile-menu"].is-open { display: flex !important; flex-direction: column !important; position: fixed !important; top: 0 !important; right: 0 !important; bottom: 0 !important; width: 86% !important; max-width: 380px !important; background: #fff !important; padding: 4.5rem 1.5rem 2rem !important; z-index: 9999 !important; overflow-y: auto !important; box-shadow: -10px 0 30px rgba(0,0,0,0.3) !important; }
}

/* Validator: drawer-mobile height fix v1 */
/* Force height:100vh sur le drawer ouvert : top:0;bottom:0 sans !important peut etre overrides par Claude → on impose 100vh. */
@media (max-width: 980px) {
  [class*="-nav-mobile"].is-open, [id*="-nav-mobile"].is-open, [class*="-drawer"].is-open, [class*="-burger-menu"].is-open, [class*="-mobile-menu"].is-open { height: 100vh !important; min-height: 100vh !important; max-height: 100vh !important; }
}

/* Validator: footer logo no-filter v1 */
footer img, [class*="-footer"] img, [role="contentinfo"] img, footer [class*="logo"], [class*="-footer"] [class*="logo"] { filter: none !important; mix-blend-mode: normal !important; opacity: 1 !important; }
footer[class*="dark"] img, footer[class*="black"] img, [class*="-footer"][class*="dark"] img, [class*="-footer"][class*="black"] img { filter: brightness(0) invert(1) !important; }

/* Validator: header-hero gap fix v1 */
/* Bug recurrent : <main class="X-main"> a padding-top:30px qui creait un
 * gap entre header sticky et hero/cat-hero. Force padding-top:0 sur le
 * wrapper <main> + margin-top:0 sur le 1er hero enfant. */
body > main, body > [role="main"], main[class*="-main"], [id="main"] { padding-top: 0 !important; }
main > [class*="-hero"]:first-child, main > [class*="-cat-hero"]:first-child, main > [class*="-category-hero"]:first-child { margin-top: 0 !important; }
/* Fallback : si sibling direct du header */
header + section, header + [class*="-hero"], header + [class*="-cat-hero"], header + [class*="-category-hero"], [class*="-header"] + section, [class*="-header"] + [class*="-hero"], [class*="-header"] + [class*="-cat-hero"], [class*="-header"] + [class*="-category-hero"] { margin-top: 0 !important; padding-top: 0 !important; }
section[class*="-hero"]:first-of-type, section[class*="-cat-hero"]:first-of-type, section[class*="-category-hero"]:first-of-type { margin-top: 0 !important; }

/* Validator: contraste lisible header+menu-mobile+footer v2 */
[class*="-nav-mobile"], [id*="-nav-mobile"], [class*="-drawer"], [class*="-burger-menu"], [class*="-mobile-menu"], [class*="-side-nav"] { background: #ffffff !important; }
[class*="-nav-mobile"] *, [id*="-nav-mobile"] *, [class*="-drawer"] *, [class*="-burger-menu"] *, [class*="-mobile-menu"] *, [class*="-side-nav"] * { color: #0a0a0a !important; }
[class*="-nav-mobile"] a, [id*="-nav-mobile"] a, [class*="-drawer"] a, [class*="-burger-menu"] a, [class*="-mobile-menu"] a { color: #0a0a0a !important; font-weight: 600 !important; }
[class*="-nav-mobile"] a:hover, [class*="-drawer"] a:hover, [class*="-burger-menu"] a:hover, [class*="-mobile-menu"] a:hover { color: #000 !important; opacity: 0.7 !important; }
footer *, [class*="-footer"] *, [role="contentinfo"] * { color: #1a1a1a !important; }
footer a, [class*="-footer"] a, [role="contentinfo"] a { color: #1a1a1a !important; text-decoration: underline !important; text-decoration-color: currentColor !important; text-underline-offset: 3px !important; font-weight: 600 !important; }
footer a:hover, [class*="-footer"] a:hover, [role="contentinfo"] a:hover { color: #000 !important; opacity: 1 !important; }
footer h1, footer h2, footer h3, footer h4, footer h5, [class*="-footer"] h1, [class*="-footer"] h2, [class*="-footer"] h3, [class*="-footer"] h4, [class*="-footer"] h5 { color: #0a0a0a !important; font-weight: 700 !important; }
footer p, footer span, footer li, [class*="-footer"] p, [class*="-footer"] span, [class*="-footer"] li { color: #2a2a2a !important; }
footer[class*="dark"] *, footer[class*="black"] *, [class*="-footer"][class*="dark"] *, [class*="-footer"][class*="black"] *, footer[style*="background:#0"] *, footer[style*="background: #0"] *, footer[style*="background:#1"] *, footer[style*="background: #1"] *, footer[style*="background:#2"] *, footer[style*="background: #2"] * { color: #f5f5f5 !important; }
footer[class*="dark"] a, [class*="-footer"][class*="dark"] a, footer[style*="background:#0"] a, footer[style*="background:#1"] a { color: #ffffff !important; }
header a, [class*="-header"] a, [role="banner"] a { text-shadow: none !important; }
header a:hover, [class*="-header"] a:hover { opacity: 0.7 !important; }
[class*="-nav-mobile"] [class*="-btn"], [class*="-footer"] [class*="-btn"] { border: 1.5px solid currentColor !important; }

/* Validator: burger button always visible+clickable v2 */
/* === Burger button : VISIBLE + CLIQUABLE garanti === */
[class*="-burger"], [class*="burger-menu"], [class*="menu-toggle"], button[aria-controls*="nav"], button[aria-label*="menu" i] { color: #1a1a1a !important; pointer-events: auto !important; cursor: pointer !important; z-index: 100 !important; position: relative !important; user-select: none !important; -webkit-tap-highlight-color: transparent !important; background: rgba(255,255,255,0.92) !important; border-radius: 8px !important; border: 1.5px solid rgba(0,0,0,0.15) !important; box-shadow: 0 1px 3px rgba(0,0,0,0.12) !important; padding: 8px !important; }
[class*="-burger"] svg, [class*="burger-menu"] svg, [class*="menu-toggle"] svg, button[aria-controls*="nav"] svg { stroke: #1a1a1a !important; fill: none !important; pointer-events: none !important; stroke-width: 2.5 !important; width: 22px !important; height: 22px !important; }
[class*="-burger"] svg path, [class*="-burger"] svg line, [class*="-burger"] svg rect, [class*="-burger"] svg polyline { stroke: #1a1a1a !important; stroke-width: 2.5 !important; fill: none !important; }
[class*="-burger"]:hover, [class*="-burger"]:focus { background: rgba(255,255,255,1) !important; border-color: rgba(0,0,0,0.3) !important; outline: 2px solid rgba(0,0,0,0.15) !important; outline-offset: 1px !important; }
/* Si le header est sombre : inverse en clair (detection elargie) */
[class*="-header"][style*="background:#0"] [class*="-burger"], [class*="-header"][style*="background:#1"] [class*="-burger"], [class*="-header"][style*="background:#2"] [class*="-burger"], [class*="-header"][style*="background-color:#0"] [class*="-burger"], [class*="-header"][style*="background-color:#1"] [class*="-burger"], [class*="-header"][style*="background-color:#2"] [class*="-burger"], [class*="-header"][class*="dark"] [class*="-burger"], [class*="-header"][class*="black"] [class*="-burger"], [class*="-header"][class*="--dark"] [class*="-burger"], [class*="-header"][class*="-night"] [class*="-burger"] { color: #f5f5f5 !important; background: rgba(0,0,0,0.55) !important; border-color: rgba(255,255,255,0.4) !important; box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important; }
[class*="-header"][style*="background:#0"] [class*="-burger"] svg, [class*="-header"][style*="background:#1"] [class*="-burger"] svg, [class*="-header"][class*="dark"] [class*="-burger"] svg, [class*="-header"][class*="black"] [class*="-burger"] svg { stroke: #f5f5f5 !important; }
@media (max-width: 1023px) {
  [class*="-burger"], button[aria-controls*="nav"] { display: inline-flex !important; align-items: center !important; justify-content: center !important; min-width: 44px !important; min-height: 44px !important; }
}
@media (min-width: 1024px) {
  [class*="-burger"], button[aria-controls*="nav"] { display: none !important; }
}

/* Validator: nav-mobile-list visible inside open drawer v1 */
/* Burger drawer ouvert : la UL des liens DOIT etre visible. */
[class*="-nav-mobile"].is-open ul, [id*="-nav-mobile"].is-open ul, [class*="-nav-mobile"].is-open [class*="-nav-mobile-list"], [class*="-drawer"].is-open ul, [class*="-burger-menu"].is-open ul { display: block !important; visibility: visible !important; height: auto !important; max-height: none !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; list-style: none !important; }
[class*="-nav-mobile"].is-open ul li, [id*="-nav-mobile"].is-open ul li, [class*="-drawer"].is-open ul li, [class*="-burger-menu"].is-open ul li { display: list-item !important; height: auto !important; padding: 0 !important; margin: 0 !important; list-style: none !important; }
[class*="-nav-mobile"].is-open ul li a, [id*="-nav-mobile"].is-open ul li a, [class*="-drawer"].is-open ul li a, [class*="-burger-menu"].is-open ul li a { display: block !important; padding: 0.9rem 0 !important; text-decoration: none !important; border-bottom: 1px solid rgba(0,0,0,0.08) !important; font-size: 1rem !important; }
