/*
Theme Name: BTS Assurance
Theme URI: https://bts-assurance.fr
Author: BTS Assurance
Author URI: https://bts-assurance.fr
Description: Thème custom pour le site BTS Assurance — design éducatif professionnel bleu/blanc, optimisé SEO.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.7
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: bts-assurance
Tags: education, blog, two-columns, responsive-layout, custom-menu, featured-images, translation-ready
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
  --color-primary:       #1a4f8b;
  --color-primary-dark:  #0f3460;
  --color-primary-light: #2d6db4;
  --color-accent:        #e8a020;
  --color-accent-light:  #f5c55a;
  --color-text:          #1c1c1e;
  --color-text-muted:    #5a6475;
  --color-bg:            #f8f9fc;
  --color-bg-white:      #ffffff;
  --color-border:        #dde3ef;
  --color-hero-bg:       #0f3460;
  --font-sans:           'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base:      1rem;
  --font-size-sm:        0.875rem;
  --font-size-lg:        1.125rem;
  --font-size-xl:        1.375rem;
  --font-size-2xl:       1.75rem;
  --font-size-3xl:       2.25rem;
  --font-size-4xl:       3rem;
  --line-height:         1.7;
  --radius-sm:           4px;
  --radius-md:           8px;
  --radius-lg:           16px;
  --shadow-sm:           0 1px 3px rgba(0,0,0,.08);
  --shadow-md:           0 4px 16px rgba(26,79,139,.12);
  --shadow-lg:           0 8px 32px rgba(26,79,139,.18);
  --max-width:           1200px;
  --container-padding:   clamp(1rem, 4vw, 2rem);
  --header-height:       68px;
  --transition:          0.2s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: var(--radius-sm); }

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: .35rem; }

/* =============================================
   LAYOUT HELPERS
   ============================================= */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--color-primary-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.site-branding { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }

.site-branding .logo-icon {
  width: 38px; height: 38px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; color: var(--color-primary-dark);
  letter-spacing: -1px;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.site-title span { display: block; font-size: .7rem; font-weight: 400; color: rgba(255,255,255,.65); letter-spacing: .05em; text-transform: uppercase; }
.site-title a { color: inherit; }
.site-title a:hover { color: var(--color-accent-light); }

/* ---- NAV ---- */
.main-navigation { display: flex; align-items: center; }

.main-navigation ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; gap: .1rem;
  flex-wrap: nowrap;
}

.main-navigation ul li a {
  display: block;
  color: rgba(255,255,255,.85);
  font-size: .78rem;
  font-weight: 500;
  padding: .35rem .55rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.main-navigation ul li.current-menu-item > a { color: var(--color-accent-light); }

/* sub-menu */
.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-primary-dark);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  padding: .5rem 0;
  flex-direction: column;
  gap: 0;
}
.main-navigation li { position: relative; }
.main-navigation li:hover > .sub-menu { display: flex; }
.main-navigation .sub-menu li a { padding: .55rem 1rem; border-radius: 0; font-size: .85rem; }

/* hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: .4rem .6rem;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

/* =============================================
   HERO (front-page)
   ============================================= */
.hero {
  background: linear-gradient(135deg, var(--color-hero-bg) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  color: #fff;
  padding: clamp(3rem, 8vw, 6rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero .container { position: relative; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--color-accent-light);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, var(--font-size-4xl));
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
  max-width: 780px;
  margin-inline: auto;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, var(--font-size-lg));
  color: rgba(255,255,255,.85);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .95rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: pointer; border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-color: var(--color-accent);
}
.btn-primary:hover { background: var(--color-accent-light); border-color: var(--color-accent-light); color: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }

.hero-stats {
  display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.15);
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--color-accent-light); }
.hero-stat span { font-size: .8rem; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .05em; }

/* =============================================
   SECTION HEADINGS
   ============================================= */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
  display: inline-block; font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-primary); background: rgba(26,79,139,.08);
  padding: .3rem .9rem; border-radius: 20px; margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.4rem, 3vw, var(--font-size-3xl));
  font-weight: 800; color: var(--color-primary-dark);
  line-height: 1.25; margin-bottom: .75rem;
}
.section-subtitle { color: var(--color-text-muted); font-size: var(--font-size-lg); max-width: 580px; margin-inline: auto; }

/* =============================================
   MODULES GRID (front-page)
   ============================================= */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: #eef2f9; }

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.module-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: .75rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none; color: inherit;
}
.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
  color: inherit;
}
.module-card-icon {
  width: 52px; height: 52px;
  background: rgba(26,79,139,.08);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.module-card-meta { font-size: .75rem; font-weight: 600; color: var(--color-primary); text-transform: uppercase; letter-spacing: .07em; }
.module-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--color-primary-dark); line-height: 1.3; }
.module-card p { font-size: .88rem; color: var(--color-text-muted); flex: 1; line-height: 1.5; }
.module-card-arrow { align-self: flex-start; font-size: .85rem; color: var(--color-primary); font-weight: 600; margin-top: auto; }
.module-card:hover .module-card-arrow { color: var(--color-accent); }

/* =============================================
   WHY SECTION
   ============================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-item {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  border: 1px solid var(--color-border);
}
.feature-icon {
  font-size: 2rem; margin-bottom: .75rem;
  display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px;
  background: rgba(26,79,139,.07);
  border-radius: 50%;
  margin-inline: auto; margin-bottom: 1rem;
}
.feature-item h3 { font-size: 1rem; font-weight: 700; color: var(--color-primary-dark); margin-bottom: .5rem; }
.feature-item p { font-size: .88rem; color: var(--color-text-muted); line-height: 1.5; }

/* =============================================
   PAGE HERO (page.php)
   ============================================= */
.page-hero {
  background: linear-gradient(135deg, var(--color-hero-bg) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 4rem) 0;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.page-hero .container { position: relative; }

.page-hero .page-breadcrumb {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 1.5rem;
}
.page-hero .page-breadcrumb a { color: rgba(255,255,255,.7); }
.page-hero .page-breadcrumb a:hover { color: var(--color-accent-light); }
.page-hero .page-breadcrumb span[aria-hidden] { color: rgba(255,255,255,.35); margin: 0 .3rem; }

.page-hero__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.page-hero__layout--no-image { grid-template-columns: 1fr; max-width: 720px; }

.page-hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--color-accent-light);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.page-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.page-hero__desc {
  font-size: clamp(.9rem, 1.5vw, 1rem);
  color: rgba(255,255,255,.82);
  line-height: 1.7;
  margin-bottom: 1.75rem;
  max-width: 520px;
}

.page-hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.page-hero__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
  aspect-ratio: 16/9;
}
.page-hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* =============================================
   E-E-A-T BAND
   ============================================= */
.eeat-band {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.eeat-signals {
  display: flex;
  align-items: stretch;
}
.eeat-signal {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
  padding: 1.1rem 1.25rem;
  border-right: 1px solid var(--color-border);
  min-width: 0;
}
.eeat-signal:last-child { border-right: none; }
.eeat-signal__icon { font-size: 1.4rem; flex-shrink: 0; }
.eeat-signal > div { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.eeat-signal strong { font-size: .82rem; font-weight: 700; color: var(--color-primary-dark); white-space: nowrap; }
.eeat-signal span, .eeat-signal time { font-size: .75rem; color: var(--color-text-muted); }

/* =============================================
   PAGE BODY
   ============================================= */
.page-body { padding: 0 0 2rem; }

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 2.5rem 0 3.5rem;
  align-items: start;
}
.content-wrapper.no-sidebar { grid-template-columns: 1fr; max-width: 860px; margin-inline: auto; }

/* =============================================
   EXPERT WIDGET (sidebar)
   ============================================= */
.widget-expert { background: linear-gradient(135deg, rgba(26,79,139,.06) 0%, rgba(26,79,139,.02) 100%); border-color: rgba(26,79,139,.2); }
.expert-badge { display: flex; gap: .9rem; align-items: flex-start; }
.expert-badge__avatar {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.expert-badge__body { display: flex; flex-direction: column; gap: .3rem; }
.expert-badge__body strong { font-size: .88rem; font-weight: 700; color: var(--color-primary-dark); }
.expert-badge__body p { font-size: .78rem; color: var(--color-text-muted); line-height: 1.5; margin: 0; }
.expert-badge__tag {
  display: inline-block; font-size: .7rem; font-weight: 700;
  color: #16a34a; background: #dcfce7;
  padding: .15rem .5rem; border-radius: 10px;
  align-self: flex-start;
}

.widget-modules-nav .is-current { font-weight: 700; color: var(--color-primary); }

/* =============================================
   SOURCES BOX (fin d'article)
   ============================================= */
.eeat-sources-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(26,79,139,.04);
  border: 1px solid rgba(26,79,139,.15);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin-top: 3rem;
}
.eeat-sources-box__icon { font-size: 1.5rem; flex-shrink: 0; margin-top: .15rem; }
.eeat-sources-box h3 {
  font-size: .82rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .6rem;
  margin-top: 0;
  border: none;
  padding: 0;
}
.eeat-sources-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.eeat-sources-box ul li {
  font-size: .8rem;
  color: var(--color-text-muted);
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0;
}
.eeat-sources-box ul li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--color-primary);
  font-weight: 700;
  font-size: .7rem;
}

/* =============================================
   READING PROGRESS BAR
   ============================================= */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  z-index: 10001;
  transition: width .08s linear;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
}

/* =============================================
   ENTRY CONTENT — conteneur transparent
   ============================================= */
.entry-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  min-width: 0;
}

/* ---- Bloc intro (avant le 1er H2) ---- */
.entry-intro {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}
.entry-intro > * + * { margin-top: 1.1rem; }
.entry-intro > p:first-of-type {
  font-size: 1.03rem;
  line-height: 1.85;
  color: var(--color-text);
  padding-left: 1rem;
  border-left: 3px solid var(--color-accent);
}

/* ---- Cartes de section (1 par H2) ---- */
.content-section-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.section-card-header {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(to right, rgba(26,79,139,.08) 0%, rgba(26,79,139,.02) 100%);
  border-bottom: 1px solid var(--color-border);
}
.section-card-number {
  flex-shrink: 0;
  width: 34px; height: 34px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 800;
  letter-spacing: .05em;
}
.section-card-header h2 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 800;
  color: var(--color-primary-dark);
  margin: 0; padding: 0;
  border: none; background: none;
  line-height: 1.3;
}
.section-card-header h2::before { display: none; }

.section-card-body {
  padding: 1.5rem 1.75rem;
}
.section-card-body > * + * { margin-top: 1.1rem; }

/* H3 dans les sections */
.section-card-body h3 {
  font-size: .98rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 1.75rem;
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-card-body h3::before {
  content: '';
  display: inline-block; flex-shrink: 0;
  width: 10px; height: 10px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* Typo commune entry-content + section-card-body */
.entry-content p,
.section-card-body p,
.entry-intro p { color: var(--color-text); line-height: 1.75; }

.entry-content strong,
.section-card-body strong { color: var(--color-primary-dark); font-weight: 700; }

/* Listes */
.entry-content ul, .section-card-body ul, .entry-intro ul { list-style: none; padding-left: 0; }
.entry-content ul li, .section-card-body ul li, .entry-intro ul li {
  padding-left: 1.6rem; position: relative;
  margin-bottom: .55rem; line-height: 1.6;
}
.entry-content ul li::before,
.section-card-body ul li::before,
.entry-intro ul li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--color-primary); font-weight: 700; font-size: .85rem;
}
.entry-content ol, .section-card-body ol { padding-left: 1.5rem; }
.entry-content ol li, .section-card-body ol li { margin-bottom: .55rem; line-height: 1.6; }

/* Callouts emoji auto */
.entry-content p.callout,
.section-card-body p.callout,
.entry-intro p.callout {
  padding: .85rem 1.1rem; border-left-width: 4px; border-left-style: solid;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: .92rem; line-height: 1.65;
}
.callout-tip  { background: #fef9ec; border-left-color: #f59e0b; }
.callout-warn { background: #fff7ed; border-left-color: #ea580c; }
.callout-ok   { background: #f0fdf4; border-left-color: #16a34a; }
.callout-info { background: rgba(26,79,139,.05); border-left-color: var(--color-primary); }

/* Blockquote */
.entry-content blockquote,
.section-card-body blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1.1rem 1.5rem;
  background: linear-gradient(to right, rgba(232,160,32,.07), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic; color: var(--color-text); font-size: 1rem; line-height: 1.7;
}

/* Liens */
.entry-content a, .section-card-body a, .entry-intro a {
  text-decoration: underline; text-underline-offset: 3px;
}
.entry-content a:hover, .section-card-body a:hover { color: var(--color-primary-dark); }

/* ---- KEY POINTS BOX (auto-JS) ---- */
.key-points-box {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0 2rem;
  color: #fff;
}
.key-points-box__header {
  display: flex; align-items: center; gap: .5rem;
  font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--color-accent-light);
  margin-bottom: .75rem;
}
.key-points-box h3 {
  font-size: 1rem; font-weight: 800; color: #fff;
  margin: 0 0 1rem; padding: 0; border: none;
  display: block;
}
.key-points-box h3::before { display: none; }
.key-points-box ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.key-points-box ul li {
  font-size: .88rem; color: rgba(255,255,255,.9); line-height: 1.5;
  padding-left: 1.5rem; position: relative;
}
.key-points-box ul li::before { content: '✓'; color: var(--color-accent-light); font-weight: 800; font-size: .9rem; }

/* ---- FAQ ACCORDION ---- */
.faq-accordion { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; list-style: none; padding: 0; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item::before { display: none; }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: var(--color-bg-white);
  font-weight: 700; font-size: .88rem;
  color: var(--color-primary-dark);
  transition: background var(--transition);
  user-select: none;
}
.faq-question:hover { background: rgba(26,79,139,.04); }
.faq-question.is-open { background: rgba(26,79,139,.06); color: var(--color-primary); border-bottom: 1px solid var(--color-border); }
.faq-toggle {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 300; line-height: 1;
  transition: transform var(--transition), background var(--transition);
}
.faq-question.is-open .faq-toggle { transform: rotate(45deg); background: var(--color-accent); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .25s ease;
  font-size: .88rem; color: var(--color-text-muted); line-height: 1.7;
  padding: 0 1.25rem;
}
.faq-answer.is-open { max-height: 600px; padding: .9rem 1.25rem 1.25rem; }

/* tables (toutes les zones) */
.section-card-body table,
.entry-intro table,
.entry-content table,
.wp-block-table table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.section-card-body th,
.entry-content th, .wp-block-table th {
  background: var(--color-primary-dark); color: #fff;
  font-weight: 700; text-align: left;
  padding: .7rem 1rem; font-size: .8rem;
}
.section-card-body td,
.entry-content td, .wp-block-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.section-card-body tr:last-child td,
.entry-content tr:last-child td, .wp-block-table tr:last-child td { border-bottom: none; }
.section-card-body tr:nth-child(even) td,
.entry-content tr:nth-child(even) td, .wp-block-table tr:nth-child(even) td { background: #f4f7fb; }
.section-card-body .wp-block-table,
.entry-content .wp-block-table { overflow-x: auto; margin: 1.25rem 0; }

/* images */
.section-card-body .wp-block-image,
.entry-content .wp-block-image { margin: 1.5rem 0; }
.section-card-body .wp-block-image img,
.entry-content .wp-block-image img { border-radius: var(--radius-md); box-shadow: var(--shadow-md); width: 100%; }
.section-card-body .wp-block-image figcaption,
.entry-content .wp-block-image figcaption { text-align: center; font-size: .78rem; color: var(--color-text-muted); margin-top: .5rem; font-style: italic; }

/* embeds vidéo */
.section-card-body .wp-block-embed,
.entry-content .wp-block-embed { margin: 1.5rem 0; }
.section-card-body .wp-block-embed__wrapper,
.entry-content .wp-block-embed__wrapper {
  position: relative; padding-top: 56.25%; border-radius: var(--radius-md); overflow: hidden;
}
.section-card-body .wp-block-embed__wrapper iframe,
.entry-content .wp-block-embed__wrapper iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* Sources box dans la nouvelle structure */
.section-card-body .eeat-sources-box { margin-top: 1.5rem; }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.widget {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.widget-title {
  font-size: .95rem; font-weight: 800;
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--color-primary);
  text-transform: uppercase; letter-spacing: .04em;
}
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: .4rem 0; border-bottom: 1px solid var(--color-border); font-size: .88rem; }
.widget ul li:last-child { border-bottom: none; }
.widget-modules-nav a {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--color-text); font-size: .88rem; padding: .5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.widget-modules-nav a:last-child { border-bottom: none; }
.widget-modules-nav a:hover { color: var(--color-primary); }
.widget-modules-nav a::after { content: '→'; color: var(--color-primary); font-size: .8rem; }

/* toc widget */
.toc-list { list-style: none; padding: 0; counter-reset: toc; }
.toc-list li { counter-increment: toc; padding: .45rem 0; border-bottom: 1px solid var(--color-border); font-size: .85rem; }
.toc-list li:last-child { border-bottom: none; }
.toc-list li::before { content: counter(toc)". "; color: var(--color-primary); font-weight: 700; }
.toc-list a { color: var(--color-text-muted); }
.toc-list a:hover { color: var(--color-primary); }

/* =============================================
   ARTICLE CARDS (archive / blog)
   ============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.post-card-image { height: 180px; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-card-image-placeholder { height: 100%; background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }

.post-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: .6rem; }
.post-card-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.post-card-cat {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--color-primary);
  background: rgba(26,79,139,.08);
  padding: .2rem .6rem; border-radius: 20px;
}
.post-card-date { font-size: .75rem; color: var(--color-text-muted); }
.post-card h2 { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.post-card h2 a { color: var(--color-primary-dark); }
.post-card h2 a:hover { color: var(--color-primary); text-decoration: none; }
.post-card-excerpt { font-size: .85rem; color: var(--color-text-muted); line-height: 1.5; flex: 1; }
.post-card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--color-border); }
.read-more {
  font-size: .85rem; font-weight: 600; color: var(--color-primary);
  display: flex; align-items: center; gap: .3rem;
}
.read-more:hover { color: var(--color-accent); }
.read-more::after { content: '→'; transition: transform var(--transition); }
.read-more:hover::after { transform: translateX(3px); }

/* pagination */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem;
  border-radius: var(--radius-md); font-size: .9rem; font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-bg-white); color: var(--color-text);
  transition: all var(--transition);
}
.pagination a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* =============================================
   404 PAGE
   ============================================= */
.error-page { text-align: center; padding: 5rem 0; }
.error-404-code { font-size: clamp(5rem, 15vw, 10rem); font-weight: 900; color: var(--color-primary); line-height: 1; opacity: .12; margin-bottom: -1.5rem; }
.error-page h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800; color: var(--color-primary-dark); margin-bottom: 1rem; }
.error-page p { color: var(--color-text-muted); font-size: var(--font-size-lg); max-width: 480px; margin-inline: auto; margin-bottom: 2rem; }
.search-form-404 { display: flex; max-width: 420px; margin-inline: auto; gap: .5rem; }
.search-form-404 input[type="search"] {
  flex: 1; padding: .75rem 1rem; border: 1px solid var(--color-border);
  border-radius: var(--radius-md); font-size: 1rem; font-family: var(--font-sans);
}
.search-form-404 input[type="search"]:focus { outline: 2px solid var(--color-primary); }
.search-form-404 button {
  background: var(--color-primary); color: #fff;
  border: none; border-radius: var(--radius-md);
  padding: .75rem 1.25rem; font-size: 1rem; cursor: pointer;
  transition: background var(--transition);
}
.search-form-404 button:hover { background: var(--color-primary-dark); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,.75);
  margin-top: auto;
}
.footer-main {
  padding: 3rem 0 2rem;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
}
.footer-brand { display: flex; flex-direction: column; gap: .75rem; }
.footer-brand .logo-icon { width: 42px; height: 42px; background: var(--color-accent); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800; color: var(--color-primary-dark); }
.footer-brand-name { font-size: 1.1rem; font-weight: 700; color: #fff; }
.footer-brand p { font-size: .85rem; line-height: 1.6; max-width: 280px; }
.footer-col h4 { font-size: .85rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.footer-col ul li a { font-size: .85rem; color: rgba(255,255,255,.65); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--color-accent-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.5); }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { font-size: .8rem; color: rgba(255,255,255,.5); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.8); }

/* =============================================
   COOKIE / SKIP LINK
   ============================================= */
#skip-link { position: absolute; top: -100px; left: 1rem; z-index: 9999; background: var(--color-accent); color: var(--color-primary-dark); padding: .5rem 1rem; border-radius: var(--radius-md); font-weight: 700; transition: top var(--transition); }
#skip-link:focus { top: 1rem; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .page-hero__layout { grid-template-columns: 1fr; }
  .page-hero__image { display: none; }
  .eeat-signals { flex-wrap: wrap; }
  .eeat-signal { flex: 1 1 40%; border-bottom: 1px solid var(--color-border); }
  .eeat-signal:nth-child(2n) { border-right: none; }
  .eeat-signal:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 1100px) {
  :root { --header-height: 62px; }

  .main-navigation { display: none; position: fixed; top: var(--header-height); left: 0; right: 0; bottom: 0; background: var(--color-primary-dark); flex-direction: column; align-items: flex-start; padding: 1rem; overflow-y: auto; z-index: 999; }
  .main-navigation.is-open { display: flex; }
  .main-navigation ul { flex-direction: column; width: 100%; gap: 0; flex-wrap: wrap; }
  .main-navigation ul li a { padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,.07); }
  .main-navigation .sub-menu { position: static; box-shadow: none; border-radius: 0; padding-left: 1rem; }
  .nav-toggle { display: flex; }

  .footer-main { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-col { display: none; } /* simplify footer on mobile */
  .footer-brand { display: flex; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .hero-stats { gap: 1.5rem; }
  .modules-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.65rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
  .site-header, .site-footer, .sidebar, .hero-cta, .nav-toggle { display: none; }
  body { font-size: 12pt; }
  .entry-content { border: none; padding: 0; }
}

/* =============================================
   WP CORE BLOCKS
   ============================================= */
.wp-block-table { overflow-x: auto; }
.wp-block-table figure { margin: 1.5rem 0; }
.aligncenter { text-align: center; margin-inline: auto; }
.alignwide { max-width: 100%; }
.has-text-align-center { text-align: center; }

/* =============================================
   UTILITY
   ============================================= */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0 !important; }
