/*
Theme Name: Docteurk
Theme URI: https://www.docteurk.org/
Author: École du Soin
Author URI: https://ecole-soin.com/
Description: Thème éditorial du média Docteurk, le média des métiers du soin et de l'accompagnement. Mise en page de presse sobre, gabarits optimisés pour le référencement (articles avec sommaire, rubriques avec introduction et FAQ, fiches métiers), sans dépendance JavaScript. Fonctionne avec l'extension compagnon Docteurk Core.
Version: 1.1.3
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: docteurk
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments
*/

:root {
  --bg: #FFFFFF;
  --bg-warm: #FAF8F6;
  --fg: #2C2825;
  --fg-heading: #1A1714;
  --fg-muted: #6F6A64;
  --fg-light: #757069;
  --accent: #1E73BE;
  --accent-hover: #165D99;
  --accent-pale: #EEF5FB;
  --on-accent: #FFFFFF;
  --surface: #FFFFFF;
  --border: #E7E3DE;
  --border-light: #F0EDE9;
  --band-bg: #1A1714;
  --cat-domicile: #2D7D9A;
  --cat-social: #7B61A8;
  --cat-enfance: #B5573A;
  --cat-sante: #33795F;
  --cat-carriere: #1E73BE;
  --cat-former: #8A6E0F;
  --cat-droit: #8C6D52;
  --cat-actu: #B85450;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Libre Franklin', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131210;
    --bg-warm: #1A1816;
    --fg: #DDD9D4;
    --fg-heading: #F0EDE8;
    --fg-muted: #A39D96;
    --fg-light: #8A847D;
    --accent: #4DA3E8;
    --accent-hover: #6BB5F0;
    --accent-pale: #1A2530;
    --on-accent: #0E1A24;
    --surface: #1E1C1A;
    --border: #2E2B28;
    --border-light: #252220;
    --band-bg: #1E1C1A;
    --cat-domicile: #4AA0BA;
    --cat-social: #9B82C8;
    --cat-enfance: #E09478;
    --cat-sante: #5AAB8E;
    --cat-carriere: #4DA3E8;
    --cat-former: #D4B84F;
    --cat-droit: #AC8D72;
    --cat-actu: #D87470;
    color-scheme: dark;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); }

html { overflow-x: hidden; }

.wrap {
  max-width: 1132px;
  margin: 0 auto;
  min-width: 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ===== TOPBAR ===== */
.topbar {
  background: var(--fg-heading);
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  padding: 6px 0;
  letter-spacing: 0.01em;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: rgba(255,255,255,0.85); }
.topbar a:hover { color: #fff; }
.topbar-right { display: flex; gap: 1.2rem; align-items: center; }
.topbar-date { text-transform: capitalize; }

/* ===== HEADER ===== */
.site-header {
  border-bottom: 2px solid var(--fg-heading);
  background: var(--bg);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 100;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 101;
  background: var(--bg);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--fg-heading);
  letter-spacing: -0.03em;
  line-height: 1;
  cursor: pointer;
}
.logo-k { color: var(--accent); font-weight: 700; }

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-search {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  font-size: 0.85rem;
  transition: border-color 0.15s;
}
.header-search:hover { border-color: var(--accent); color: var(--accent); }

.header-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 0.45rem 1rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
.header-cta:hover { background: var(--accent-hover); }

/* Nav bar */
.nav-bar {
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }

.nav-list {
  display: flex;
  gap: 0;
  list-style: none;
}

.nav-list li a {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.nav-list li a:hover,
.nav-list li a.active {
  color: var(--fg-heading);
  border-bottom-color: var(--accent);
}

@media (max-width: 768px) {
  .nav-list li a { padding: 0.5rem 0.6rem; font-size: 0.75rem; }
  .logo { font-size: 1.5rem; }
}

/* ===== HERO / UNE ===== */
.une {
  padding: 1.5rem 0 0;
  border-bottom: 1px solid var(--border);
}

.une-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 340px);
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .une-grid { grid-template-columns: 1fr; }
  .une-sidebar { border-top: 1px solid var(--border); padding-top: 1rem; border-left: none; padding-left: 0; }
}

@media (max-width: 600px) {
  .une-grid { grid-template-columns: 1fr; }
  .une-sidebar { border-top: 1px solid var(--border); padding-top: 1rem; border-left: none; padding-left: 0; }
}

.une-main {}

.une-featured-img {
  width: 100%;
  aspect-ratio: 2.5/1;
  background: var(--bg-warm);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-light);
  font-size: 0.75rem;
  border: 1px solid var(--border-light);
  max-height: 220px;
}

.une-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  margin-bottom: 0.5rem;
  background: var(--accent-pale);
  color: var(--accent);
}

.une-title {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg-heading);
  margin-bottom: 0.6rem;
  text-wrap: balance;
}

.une-excerpt {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.55;
  margin-bottom: 0.8rem;
  max-width: 620px;
}

.une-meta {
  font-size: 0.75rem;
  color: var(--fg-light);
  padding-bottom: 1.5rem;
}
.une-meta span { margin-right: 1rem; }

/* Sidebar items */
.une-sidebar {
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
  min-width: 0;
}
@media (max-width: 860px) {
  .une-sidebar { border-left: none; padding-left: 0; }
}

.sidebar-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.sidebar-item:first-child { padding-top: 0; }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item:hover .sidebar-title { color: var(--accent); }

.sidebar-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.sidebar-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg-heading);
  transition: color 0.15s;
}

.sidebar-meta {
  font-size: 0.7rem;
  color: var(--fg-light);
  margin-top: 0.2rem;
}

/* ===== SECTION ===== */
.section {
  padding: 2rem 0;
}

.section--warm { background: var(--bg-warm); }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--fg-heading);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg-heading);
}

.section-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}
.section-more:hover { text-decoration: underline; }

/* ===== ARTICLE CARDS ===== */
.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

.card {
  cursor: pointer;
  min-width: 0;
}
.card:hover .card-title { color: var(--accent); }

.card-img {
  width: 100%;
  aspect-ratio: 3/1;
  background: var(--bg-warm);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-light);
  font-size: 0.7rem;
  overflow: hidden;
  max-height: 100px;
}

.card-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.card-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg-heading);
  margin-bottom: 0.3rem;
  transition: color 0.15s;
}

.card-excerpt {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 0.7rem;
  color: var(--fg-light);
  margin-top: 0.4rem;
}

/* ===== CATEGORIES STRIP ===== */
.cat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

@media (max-width: 600px) {
  .cat-strip { grid-template-columns: repeat(2, 1fr); }
}

.cat-block {
  background: var(--surface);
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: background 0.15s;
  min-width: 0;
}
.cat-block:hover { background: var(--bg-warm); }

.cat-block-name {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-heading);
  margin-bottom: 0.15rem;
}

.cat-block-count {
  font-size: 0.72rem;
  color: var(--fg-light);
}

.cat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* ===== METIERS STRIP ===== */
.metier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.metier-chip {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.metier-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-pale);
}

.metier-chip-advf { border-left: 3px solid var(--cat-domicile); }
.metier-chip-deaes { border-left: 3px solid var(--cat-social); }
.metier-chip-iepe { border-left: 3px solid var(--cat-enfance); }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: var(--fg-heading);
  color: #fff;
  padding: 2.5rem 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.25;
  text-wrap: balance;
}

.cta-banner p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.2rem;
  max-width: 520px;
  margin-inline: auto;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg-heading);
  background: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: 3px;
  transition: opacity 0.15s;
}
.cta-btn:hover { opacity: 0.9; color: var(--fg-heading); }


/* ===== FOOTER ===== */
.site-footer {
  border-top: 2px solid var(--fg-heading);
  padding: 2rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}


.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.3rem; }
.footer-col ul li a {
  font-size: 0.85rem;
  color: var(--fg);
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--fg-light);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg-muted);
}


/* ===== CATEGORY PAGE ===== */
.cat-hero {
  padding: 1.5rem 0 0;
  border-bottom: 1px solid var(--border);
}

.cat-heading-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.cat-color-bar {
  width: 5px;
  height: 2.2rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.cat-h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg-heading);
}

.cat-intro {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 680px;
  margin-bottom: 1rem;
}

.cat-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: var(--fg-light);
  padding-bottom: 1.2rem;
  flex-wrap: wrap;
}
.cat-stats strong { color: var(--fg); font-weight: 600; }

/* Sub-topic pills */
.subtopic-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.subtopic-pill {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-warm);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.subtopic-pill:hover, .subtopic-pill.active {
  background: var(--accent-pale);
  border-color: var(--accent);
  color: var(--accent);
}

/* Category layout */
.cat-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  padding: 1.5rem 0 2rem;
}

@media (max-width: 860px) {
  .cat-layout { grid-template-columns: 1fr; }
}

/* Article list items */
.cat-article-list { min-width: 0; }

.cat-article {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  align-items: start;
}
.cat-article:first-child { padding-top: 0; }
.cat-article:hover .cat-article-title { color: var(--accent); }

@media (max-width: 600px) {
  .cat-article { grid-template-columns: 1fr; }
  .cat-article-thumb { display: none; }
}

.cat-article-body { min-width: 0; }

.cat-article-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.cat-article-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg-heading);
  margin-bottom: 0.3rem;
  transition: color 0.15s;
}

.cat-article-excerpt {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-article-meta {
  font-size: 0.7rem;
  color: var(--fg-light);
  margin-top: 0.3rem;
}

.cat-article-thumb {
  width: 140px;
  aspect-ratio: 3/2;
  background: var(--bg-warm);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-light);
  font-size: 0.6rem;
  overflow: hidden;
  flex-shrink: 0;
}

/* Pagination */
.cat-pagination {
  display: flex;
  gap: 0.3rem;
  padding-top: 1.5rem;
  align-items: center;
}

.cat-page-btn {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: none;
  border: 1px solid var(--border);
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
}
.cat-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.cat-page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cat-page-ellipsis {
  font-size: 0.8rem;
  color: var(--fg-light);
  padding: 0 0.3rem;
}

/* Category sidebar */
.cat-sidebar { min-width: 0; }

.cat-aside-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.cat-aside-block:last-child { border-bottom: none; }

.cat-aside-title {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--fg-heading);
}

.cat-aside-formation {
  background: var(--accent-pale);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem;
  margin-bottom: 0.5rem;
}
.cat-aside-formation-name {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fg-heading);
  margin-bottom: 0.1rem;
}
.cat-aside-formation-sub {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-bottom: 0.6rem;
}
.cat-aside-formation-cta {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}
.cat-aside-formation-cta:hover { text-decoration: underline; }

.cat-aside-popular-item {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  align-items: baseline;
}
.cat-aside-popular-item:last-child { border-bottom: none; }
.cat-aside-popular-item:hover .cat-aside-popular-title { color: var(--accent); }

.cat-aside-popular-num {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg-light);
  flex-shrink: 0;
  width: 1.5rem;
}
.cat-aside-popular-title {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg-heading);
  line-height: 1.3;
  transition: color 0.15s;
}

.cat-aside-cats-list { list-style: none; }
.cat-aside-cats-list li { margin-bottom: 0.3rem; }
.cat-aside-cats-list li a {
  font-size: 0.85rem;
  color: var(--fg);
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0;
  transition: color 0.15s;
}
.cat-aside-cats-list li a:hover { color: var(--accent); }
.cat-aside-cats-count {
  font-size: 0.75rem;
  color: var(--fg-light);
}

/* FAQ section */
.cat-faq {
  padding: 2rem 0;
  border-top: 2px solid var(--fg-heading);
}

.cat-faq-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg-heading);
  margin-bottom: 1rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-heading);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.9rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question:hover { color: var(--accent); }

.faq-arrow {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--fg-light);
  transition: transform 0.2s;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-answer {
  display: none;
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--fg-muted);
  padding: 0 0 1rem;
  max-width: 680px;
}
.faq-item.open .faq-answer { display: block; }

/* ===== ARTICLE PAGE: ENHANCED SEO ===== */

/* Table of contents */
.article-toc {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.article-toc-title {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
}
.article-toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
}
.article-toc ol li {
  counter-increment: toc;
  margin-bottom: 0.3rem;
}
.article-toc ol li a {
  font-size: 0.88rem;
  color: var(--fg);
  display: flex;
  gap: 0.5rem;
  transition: color 0.15s;
}
.article-toc ol li a::before {
  content: counter(toc) ".";
  color: var(--fg-light);
  font-weight: 600;
  min-width: 1.2rem;
}
.article-toc ol li a:hover { color: var(--accent); }

/* Author bio */
.author-bio {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-top: 2rem;
  align-items: start;
}
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-light);
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--sans);
}
.author-bio-text { min-width: 0; }
.author-bio-name {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fg-heading);
  margin-bottom: 0.1rem;
}
.author-bio-role {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.author-bio-desc {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* Inline read-also */
.read-also {
  border-left: 3px solid var(--accent);
  background: var(--accent-pale);
  padding: 0.6rem 1rem;
  margin: 1.2rem 0;
  font-size: 0.88rem;
  border-radius: 0 3px 3px 0;
}
.read-also-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.15rem;
}
.read-also a {
  color: var(--fg-heading);
  font-family: var(--serif);
  font-weight: 600;
}
.read-also a:hover { color: var(--accent); }

/* Updated date */
.article-updated {
  font-size: 0.75rem;
  color: var(--fg-light);
  font-style: italic;
  margin-bottom: 1.2rem;
}

/* ===== METIER PAGE ===== */

.metier-hero {
  padding: 1.5rem 0 0;
  border-bottom: 1px solid var(--border);
}

.metier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 0.6rem;
}

.metier-h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg-heading);
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

.metier-subtitle {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--fg-muted);
  line-height: 1.5;
  max-width: 650px;
  margin-bottom: 1rem;
}

/* Quick facts card */
.metier-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.2rem;
}
@media (max-width: 600px) {
  .metier-facts { grid-template-columns: repeat(2, 1fr); }
}

.metier-fact {
  background: var(--surface);
  padding: 0.8rem 1rem;
}
.metier-fact-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-light);
  margin-bottom: 0.15rem;
}
.metier-fact-value {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg-heading);
}
.metier-fact-value small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--fg-muted);
}

/* Metier body layout */
.metier-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  padding: 2rem 0;
}
@media (max-width: 860px) {
  .metier-layout { grid-template-columns: 1fr; }
}

.metier-body { min-width: 0; max-width: 720px; }

.metier-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg-heading);
  margin: 2rem 0 0.7rem;
  padding-top: 0.5rem;
}

.metier-body p {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--fg);
}

.metier-body ul {
  margin: 0 0 1rem 1.2rem;
}
.metier-body ul li {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
  color: var(--fg);
}

/* Salary table */
.salary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
}
.salary-table th {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  text-align: left;
  padding: 0.5rem 0.8rem;
  border-bottom: 2px solid var(--fg-heading);
}
.salary-table td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--fg);
}
.salary-table td:last-child {
  font-weight: 600;
  color: var(--fg-heading);
}

/* Testimonial */
.metier-testimonial {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.metier-testimonial blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.metier-testimonial cite {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-weight: 600;
}

/* Related metiers */
.related-metiers {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.related-metier-chip {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
}
.related-metier-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.article-hero {
  padding: 1.5rem 0 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 0.75rem;
  color: var(--fg-light);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--fg-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 0.4rem; }

.article-header {
  max-width: 720px;
  padding-bottom: 1.5rem;
}

.article-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.article-h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg-heading);
  margin-bottom: 0.6rem;
  text-wrap: balance;
}

.article-standfirst {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.article-byline {
  font-size: 0.8rem;
  color: var(--fg-light);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.article-byline strong { color: var(--fg); font-weight: 600; }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 2rem 0;
}

@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
}

.article-body {
  min-width: 0;
  max-width: 720px;
}

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg-heading);
  margin: 2rem 0 0.8rem;
  padding-top: 0.5rem;
}

.article-body p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
  color: var(--fg);
}

.article-body ul {
  margin: 0 0 1.2rem 1.2rem;
}

.article-body ul li {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.2rem;
  margin: 1.5rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--fg-muted);
}

.article-body .encadre {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.article-body .encadre h3 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.article-body .encadre p { font-size: 0.95rem; }

/* Article sidebar */
.article-sidebar {
  min-width: 0;
}

.aside-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.aside-block:last-child { border-bottom: none; }

.aside-title {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--fg-heading);
}

.aside-cta {
  display: block;
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 1rem;
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  transition: background 0.15s;
}
.aside-cta:hover { background: var(--accent-hover); color: #fff; }

.aside-cta-sub {
  font-size: 0.72rem;
  color: var(--fg-light);
  text-align: center;
}

.aside-related-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.aside-related-item:last-child { border-bottom: none; }
.aside-related-item:hover .aside-related-title { color: var(--accent); }

.aside-related-cat {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.aside-related-title {
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--fg-heading);
  line-height: 1.3;
  transition: color 0.15s;
}

.aside-formation {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem;
  margin-bottom: 0.6rem;
}

.aside-formation-name {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fg-heading);
  margin-bottom: 0.15rem;
}

.aside-formation-details {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.share-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.share-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: 2px;
  cursor: pointer;
  background: none;
  font-family: var(--sans);
  transition: all 0.15s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tag-item {
  font-size: 0.72rem;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

[hidden] { display: none !important; }

/* ==========================================================================
   Intégration WordPress
   ========================================================================== */

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  position: fixed !important;
  top: 8px;
  left: 8px;
  z-index: 1000;
  background: var(--surface);
  color: var(--fg-heading);
  padding: 0.6rem 1rem;
  border: 2px solid var(--accent);
  border-radius: 3px;
  font-weight: 600;
}

/* Bandeaux sombres : couleurs propres, lisibles dans les deux thèmes */
.topbar, .cta-banner { background: var(--band-bg); }
.cta-btn, .cta-btn:hover { color: #1A1714; }

/* Texte posé sur la couleur d'accent */
.header-cta, .aside-cta, .aside-cta:hover, .cat-page-btn.active, .metier-badge { color: var(--on-accent); }
.metier-badge { background: var(--cat-carriere); }

/* Blocs entièrement cliquables : un seul lien, étendu à tout le bloc */
.sidebar-item, .card, .cat-article, .aside-related-item, .cat-aside-popular-item { position: relative; }
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
a.cat-block { display: block; }
.cat-pagination { flex-wrap: wrap; }

/* Logo */
.logo a { color: inherit; display: inline-block; }
.logo .custom-logo { max-height: 44px; width: auto; }

/* Barre d'administration et en-tête fixe */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* Menu : état courant généré par WordPress */
.nav-list li.current-menu-item > a,
.nav-list li.current-menu-parent > a,
.nav-list li.current-menu-ancestor > a,
.nav-list li.current-post-ancestor > a,
.nav-list li.current-cat > a {
  color: var(--fg-heading);
  border-bottom-color: var(--accent);
}

/* Recherche */
.header-search svg { display: block; }
.header-search-panel { padding: 0 0 0.9rem; }
.search-form { display: flex; gap: 0.5rem; max-width: 520px; }
.search-form label { flex: 1; min-width: 0; }
.search-field {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--fg);
}
.search-submit {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 3px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}
.search-submit:hover { background: var(--accent-hover); }

/* Images à la une */
.une-featured-img img,
.card-img img,
.cat-article-thumb img { width: 100%; height: 100%; object-fit: cover; }

.article-figure { margin: 0 0 1.5rem; }
.article-figure img { width: 100%; height: auto; max-height: 320px; object-fit: cover; border-radius: 3px; }

/* Titres ancrés par le sommaire : dégagés de l'en-tête fixe */
.entry-content h2[id], .entry-content h3[id] { scroll-margin-top: 7.5rem; }

/* Contenu rédactionnel */
.entry-content > :first-child { margin-top: 0; }
.entry-content::after { content: ""; display: table; clear: both; }

.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.entry-content a:hover { color: var(--accent-hover); }
.entry-content .read-also a { color: var(--fg-heading); text-decoration: none; }
.entry-content .read-also a:hover { color: var(--accent); }

.entry-content h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--fg-heading);
  margin: 1.5rem 0 0.6rem;
}
.entry-content h4 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg-heading);
  margin: 1.2rem 0 0.5rem;
}
.entry-content ol { margin: 0 0 1.2rem 1.4rem; }
.entry-content ol li {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 0.5rem;
  color: var(--fg);
}
.entry-content li > ul, .entry-content li > ol { margin-top: 0.5rem; margin-bottom: 0; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8rem;
  margin-top: 0.4rem;
}
.entry-content hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.entry-content img { height: auto; border-radius: 3px; }
.entry-content figure { margin: 1.5rem 0; }
.entry-content figcaption,
.wp-caption-text {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--fg-muted);
  margin-top: 0.4rem;
}
.entry-content iframe, .entry-content video { max-width: 100%; }

/* Encadré : classe « encadre » ou style de bloc Groupe « Encadré » */
.entry-content .encadre,
.entry-content .is-style-encadre {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.entry-content .encadre h3,
.entry-content .is-style-encadre h3 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}
.entry-content .encadre p,
.entry-content .is-style-encadre p { font-size: 0.95rem; }
.entry-content .encadre p:last-child,
.entry-content .is-style-encadre p:last-child { margin-bottom: 0; }

/* Tableaux du contenu (grille de salaires, comparatifs) */
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-family: var(--sans);
  font-size: 0.88rem;
}
.entry-content th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  text-align: left;
  padding: 0.5rem 0.8rem;
  border-bottom: 2px solid var(--fg-heading);
}
.entry-content td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--fg);
}

/* Alignements WordPress */
.alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.gallery-caption { font-size: 0.78rem; }
@media (max-width: 600px) {
  .alignleft, .alignright { float: none; margin: 1rem 0; }
}

/* Pages de contenu longues, découpées avec <!--nextpage--> */
.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.page-links a, .page-links > span.current {
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
}
.page-links > span.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Signature auteur */
.author-avatar img { width: 48px; height: 48px; border-radius: 50%; }
.author-bio-name a:hover { color: var(--accent); }

/* Partage */
.share-bar { flex-wrap: wrap; align-items: center; }
.share-label { font-size: 0.75rem; font-weight: 600; color: var(--fg-muted); margin-right: 0.3rem; }
a.tag-item:hover { border-color: var(--accent); color: var(--accent); }

/* FAQ en accordéon natif (details / summary) */
.entry-faq { margin-top: 2rem; padding-top: 1.2rem; border-top: 2px solid var(--fg-heading); }
.entry-faq .cat-faq-title { margin: 0 0 1rem; padding-top: 0; }
summary.faq-question { list-style: none; }
summary.faq-question::-webkit-details-marker { display: none; }
.faq-item[open] .faq-arrow { transform: rotate(180deg); }
.faq-item .faq-answer { display: block; }
.faq-answer a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Ouverture et fermeture en douceur. Sans prise en charge, la réponse s'affiche d'un coup. */
.faq-item::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}
.faq-item:not([open])::details-content { block-size: 0; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item::details-content {
    transition: block-size 0.25s ease-in-out, content-visibility 0.25s ease-in-out, display 0.25s ease-in-out;
    transition-behavior: allow-discrete;
  }
}

/* Témoignage */
.metier-testimonial cite { display: block; }

/* Fiches métiers : en-tête d'archive et puces liées */
a.related-metier-chip, a.metier-chip, a.subtopic-pill { display: inline-block; }
.cat-stats a { color: var(--accent); font-weight: 600; }
.cat-stats a:hover { text-decoration: underline; }

/* Auteur : en-tête d'archive */
.cat-hero .author-bio { margin: 0 0 1.2rem; max-width: 680px; }

/* Page simple, recherche et 404 */
.page-layout { padding: 2rem 0; max-width: 720px; }
.empty-state { padding: 1rem 0 2rem; max-width: 620px; }
.empty-state p { color: var(--fg-muted); margin-bottom: 1rem; }
.empty-state ul { margin: 0 0 1.2rem 1.2rem; }
.empty-state li { margin-bottom: 0.3rem; }
.empty-state a { color: var(--accent); }
.empty-state a:hover { text-decoration: underline; }

/* Pied de page */
.footer-heading {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.6rem;
}

/* Commentaires */
.comments-area { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px solid var(--fg-heading); }
.comments-title, .comment-reply-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg-heading);
  margin-bottom: 1rem;
}
.comment-list, .comment-list .children { list-style: none; }
.comment-list .children { margin-left: 1.5rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.comment-author { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; font-weight: 600; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 0.72rem; color: var(--fg-light); margin: 0.2rem 0 0.6rem; }
.comment-content p { font-family: var(--serif); font-size: 0.98rem; line-height: 1.65; margin-bottom: 0.8rem; }
.comment-content a, .comment-respond a, .reply a { color: var(--accent); }
.reply { font-size: 0.78rem; font-weight: 600; }
.comment-respond { margin-top: 1.5rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--fg);
}
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form .submit {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 3px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
}
.comment-form .submit:hover { background: var(--accent-hover); }
.comment-notes, .logged-in-as { font-size: 0.8rem; color: var(--fg-muted); }
.bypostauthor > .comment-body .comment-author .fn::after { content: " · auteur"; font-weight: 400; color: var(--fg-light); }

.sticky { position: relative; }

/* Compléments de mise en page */
body { font-size: 1rem; }
.une-title a:hover, .article-byline a:hover { color: var(--accent); }
.cat-article--no-thumb { grid-template-columns: 1fr; }
.cat-intro p + p { margin-top: 0.6rem; }
.cat-intro .search-form { font-family: var(--sans); }
.faq-question-text { font: inherit; color: inherit; }
.metier-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.metier-body .related-metiers { margin-top: 0; padding-top: 0; border-top: 0; }
.metier-formation { margin: 1.5rem 0; }
.author-avatar { text-transform: uppercase; overflow: hidden; }
.empty-state .section-title { margin: 1.5rem 0 0.6rem; }

/* Couleurs des rubriques : libellés et pastilles */
.card-cat, .sidebar-cat, .cat-article-tag, .aside-related-cat { color: var(--accent); }
.cat-color-domicile { color: var(--cat-domicile); }
.cat-color-social { color: var(--cat-social); }
.cat-color-enfance { color: var(--cat-enfance); }
.cat-color-sante { color: var(--cat-sante); }
.cat-color-carriere { color: var(--cat-carriere); }
.cat-color-former { color: var(--cat-former); }
.cat-color-droit { color: var(--cat-droit); }
.cat-color-actu { color: var(--cat-actu); }
.cat-dot, .cat-color-bar { background: var(--accent); }
.cat-bg-domicile { background: var(--cat-domicile); }
.cat-bg-social { background: var(--cat-social); }
.cat-bg-enfance { background: var(--cat-enfance); }
.cat-bg-sante { background: var(--cat-sante); }
.cat-bg-carriere { background: var(--cat-carriere); }
.cat-bg-former { background: var(--cat-former); }
.cat-bg-droit { background: var(--cat-droit); }
.cat-bg-actu { background: var(--cat-actu); }
.topbar-date { text-transform: none; }
.topbar-date::first-letter { text-transform: uppercase; }

/* Réglages mobiles et rythme des intertitres */
.article-body h2, .metier-body h2, .entry-content h3 { line-height: 1.3; }
@media (max-width: 600px) {
  .cat-article-thumb { display: none; }
  .topbar-right span { display: none; }
}

/* ===== VERSION MOBILE ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }

/* Barre de progression de lecture */
.read-progress {
  position: fixed;
  inset: env(safe-area-inset-top, 0px) 0 auto;
  height: 3px;
  z-index: 102;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* Progression pilotée par le défilement, sans script. Les navigateurs qui ne
   connaissent pas ces animations gardent le calcul fait dans main.js. */
@supports (animation-timeline: scroll()) {
  @keyframes docteurk-read-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
  .read-progress span {
    animation: docteurk-read-progress auto linear;
    animation-timeline: scroll(root block);
  }
}

/* Bandeau formation des articles, quand la colonne latérale passe sous le texte */
.mobile-cta { display: none; }

.toc-toggle { display: none; }

@media (max-width: 860px) {
  /* L'en-tête se retire quand on descend dans la page et revient dès qu'on remonte. */
  .site-header { transition: transform 0.25s ease; will-change: transform; }
  .site-header.is-hidden { transform: translateY(calc(-100% - env(safe-area-inset-top, 0px))); }

  .mobile-cta:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: fixed;
    inset: auto 0 0;
    z-index: 99;
    padding: 0.6rem 0.5rem calc(0.6rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(110%);
    transition: transform 0.25s ease;
  }
  .mobile-cta.is-visible { transform: none; }
  .mobile-cta-text { flex: 1; min-width: 0; line-height: 1.3; }
  .mobile-cta-text strong { display: block; font-size: 0.88rem; color: var(--fg-heading); }
  .mobile-cta-text span { display: block; font-size: 0.75rem; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-cta-link {
    flex: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--on-accent);
    background: var(--accent);
    padding: 0.65rem 1rem;
    border-radius: 3px;
  }
  .mobile-cta-link:hover { background: var(--accent-hover); color: var(--on-accent); }
  .mobile-cta-close {
    flex: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: var(--fg-muted);
    cursor: pointer;
  }
  /* Le pied de page reste lisible derrière le bandeau. */
  body.has-mobile-cta .site-footer { padding-bottom: 5rem; }
}

@media (max-width: 600px) {
  /* Navigation : défilement horizontal, avec un fondu qui signale la suite. */
  .nav-bar {
    margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
    scroll-snap-type: x proximity;
  }
  .nav-bar.is-end { -webkit-mask-image: none; mask-image: none; }
  .nav-list { padding-right: 2rem; }
  .nav-list li { scroll-snap-align: start; }
  .nav-list li a { padding: 0.75rem 0.7rem; font-size: 0.78rem; }
  .nav-list li:first-child a { padding-left: 0; }

  .header-main { padding: 0.65rem 0; }
  .header-search { width: 40px; height: 40px; }
  .header-cta { padding: 0.6rem 0.9rem; }

  /* Fil d'Ariane : le titre de la page, déjà affiché juste en dessous, est retiré. */
  .breadcrumb { line-height: 1.9; margin-bottom: 0.6rem; }
  .breadcrumb [aria-current="page"],
  .breadcrumb .sep:has(+ [aria-current="page"]) { display: none; }
  .breadcrumb a { padding: 0.35rem 0; }

  /* Sommaire replié : les premières entrées, puis un bouton. */
  .article-toc.is-collapsed ol li:nth-child(n+5) { display: none; }
  .article-toc ol li { margin-bottom: 0; }
  .article-toc ol li a { padding: 0.4rem 0; }
  .toc-toggle {
    display: block;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.7rem 0 0.2rem;
    border: 0;
    border-top: 1px solid var(--border);
    background: none;
    font: 600 0.82rem var(--sans);
    color: var(--accent);
    text-align: left;
    cursor: pointer;
  }

  .article-byline { row-gap: 0.15rem; }

  /* Champs à 16 px : évite le zoom automatique d'iOS à la saisie. */
  input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea, select { font-size: 16px; }

  /* Zones de toucher plus généreuses. */
  .footer-col ul li { margin-bottom: 0; }
  .footer-col ul li a { display: inline-block; padding: 0.55rem 0; }
  .share-btn { min-height: 44px; padding-left: 1rem; padding-right: 1rem; }
  .aside-formation-name a, .aside-related-title a { display: inline-block; padding: 0.3rem 0; }
  .topbar a { display: inline-block; padding: 0.35rem 0; }
  .topbar { padding: 0; }
  .topbar .wrap { min-height: 32px; }

  /* Tableaux : défilement horizontal propre, première colonne lisible. */
  .entry-content .wp-block-table { margin-left: -16px; margin-right: -16px; padding: 0 16px; -webkit-overflow-scrolling: touch; }
  .entry-content .wp-block-table table { min-width: 34rem; font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header, .mobile-cta, .faq-arrow { transition: none; }
}
