/* Fix wpautop inserting empty <p> in CSS grids */
[style*="display:grid"] > p:empty { display:none; }

:root {
  --navy:       #0C1B3A;
  --navy-mid:   #1A2E5A;
  --navy-light: #2A4A8A;
  --cream:      #F7F4EE;
  --cream-dark: #EDE8DC;
  --cream-mid:  #D8D0C0;
  --gold:       #C4983A;
  --gold-light: #E8C96A;
  --triblue:    #002395;
  --trired:     #ED2939;
  --white:      #FFFFFF;
  --text:       #0C1B3A;
  --text-mid:   #3A4A6A;
  --text-light: #7A8AAA;
  --success:    #1A7A4A;
  --success-bg: #EAF5EE;
  --premium:    #C4983A;
  --premium-bg: #FDF7EC;
  --border:     rgba(12,27,58,0.12);
  --border-mid: rgba(12,27,58,0.20);
  --shadow-sm:  0 1px 3px rgba(12,27,58,0.08);
  --shadow-md:  0 4px 16px rgba(12,27,58,0.10);
  --shadow-lg:  0 12px 40px rgba(12,27,58,0.14);
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
}

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

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

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-mid); line-height: 1.75; }
a { color: var(--navy-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }

/* LAYOUT */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* NAV */
.nav {
  background: var(--navy);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  border-top: 3px solid var(--trired);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 600;
  color: var(--cream); letter-spacing: .02em;
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap; flex-shrink: 0;
}
.nav-logo-flag {
  display: flex; height: 16px; width: 24px; border-radius: 2px; overflow: hidden; flex-shrink: 0;
}
.nav-logo-flag span { flex: 1; }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; flex: 1; justify-content: center;
}
.nav-links a {
  color: rgba(247,244,238,.75);
  font-size: .875rem; font-weight: 400;
  padding: 6px 8px; border-radius: var(--r-sm);
  transition: all .2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--cream); background: rgba(255,255,255,.08); }
.nav-links a.active {
  color: var(--cream);
  background: rgba(255,255,255,.14);
  border-radius: var(--r-sm);
  font-weight: 500;
}
.nav-cta {
  background: var(--gold); color: var(--navy) !important;
  font-weight: 500 !important; border-radius: var(--r-sm) !important;
  padding: 7px 14px !important;
  font-size: .825rem !important;
  white-space: nowrap !important;
}
.nav-cta:hover { background: var(--gold-light) !important; color: var(--navy) !important; }

/* Nav sous-menu WP */
.nav-links > li { position: relative; }
.nav-links .sub-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--navy); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-md); min-width: 240px;
  padding: 4px 0; list-style: none; z-index: 200;
  box-shadow: var(--shadow-md);
}
.nav-links .menu-item-has-children:hover > .sub-menu { display: block; }
.nav-links .sub-menu li a {
  display: block; padding: 9px 16px;
  color: rgba(247,244,238,.75); white-space: nowrap;
  border-radius: 0; font-size: .875rem;
}
.nav-links .sub-menu li a:hover { background: rgba(255,255,255,.08); color: var(--cream); }

/* Bouton S'inscrire */
.btn-register {
  background: var(--trired);
  color: #fff !important;
  font-size: .825rem;
  padding: 7px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
  border: none;
  text-decoration: none;
  display: inline-block;
}
.btn-register:hover { background: #c41e2a; color: #fff !important; }
.nav-user {
  display: flex; align-items: center; gap: 14px;
  color: var(--cream); font-size: .875rem;
}
/* Séparateur visuel avant "Déconnexion" */
.nav-user a:last-child {
  padding-left: 14px;
  border-left: 1px solid rgba(247,244,238,.2);
}
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy-light); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 500;
}

/* HERO */
.hero {
  background: var(--navy);
  padding: 80px 24px 72px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 80px,
    rgba(255,255,255,.015) 80px,
    rgba(255,255,255,.015) 81px
  );
  pointer-events: none;
}
.hero-flag {
  display: flex; width: 40px; height: 6px; border-radius: 3px;
  overflow: hidden; margin-bottom: 24px;
}
.hero-flag span { flex: 1; }
.hero h1 { color: var(--cream); max-width: 680px; }
.hero h1 em { font-style: italic; color: var(--gold-light); }
.page-hero { padding: 32px 0 24px; }
.page-hero h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 8px; }
.page-hero p { font-size: .97rem; color: var(--text-mid); margin: 0; }
.hero-sub {
  color: rgba(247,244,238,.7);
  font-size: 1.05rem; margin: 20px 0 36px;
  max-width: 560px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--r-md);
  font-family: 'DM Sans', sans-serif;
  font-size: .925rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
  border: none; text-decoration: none;
}
.btn-primary {
  background: var(--gold); color: var(--navy);
}
.btn-primary:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent; color: var(--cream);
  border: 1px solid rgba(247,244,238,.3);
}
.btn-outline:hover { border-color: var(--cream); background: rgba(255,255,255,.06); color: var(--cream); }

.btn-navy {
  background: var(--navy); color: var(--cream);
}
.btn-navy:hover { background: var(--navy-mid); color: var(--cream); transform: translateY(-1px); }

.btn-ghost {
  background: transparent; color: var(--text-mid);
  border: 1px solid var(--border-mid);
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); background: var(--cream-dark); }

.btn-sm { padding: 7px 16px; font-size: .825rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* CARDS */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-cream { background: var(--cream); }
.card-navy { background: var(--navy); color: var(--cream); }

/* BADGES */
.badge {
  display: inline-flex; align-items: center;
  font-size: .75rem; font-weight: 500;
  padding: 3px 10px; border-radius: 20px;
  letter-spacing: .02em;
}
.badge-free    { background: #EAF5EE; color: #1A7A4A; }
.badge-premium { background: var(--premium-bg); color: var(--premium); }
.badge-new     { background: #FEF3EC; color: #C4601A; }
.badge-level-easy { background: #EAF5EE; color: #1A7A4A; }
.badge-level-mid  { background: #FEF8EC; color: #B07820; }
.badge-level-hard { background: #FEECEC; color: #A32020; }

/* SECTIONS */
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-navy { background: var(--navy); }
.section-cream { background: var(--cream-dark); }
.section-white { background: var(--white); }

.section-label {
  font-size: .75rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.section-title { margin-bottom: 16px; }
.section-desc { color: var(--text-mid); max-width: 560px; }

/* GRID */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

/* DIVIDERS */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.divider-gold { border-top-color: var(--gold); opacity: .4; }

/* FORM ELEMENTS */
.input-group { margin-bottom: 16px; }
.label { display: block; font-size: .85rem; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  font-family: 'DM Sans', sans-serif;
  font-size: .925rem; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(26,46,90,.1);
}

/* QUIZ & EXAM */
.option-btn {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 12px;
  background: var(--white);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  padding: 13px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: .925rem; color: var(--text);
  cursor: pointer; transition: all .15s;
  margin-bottom: 10px;
}
.option-btn:hover:not(:disabled) {
  border-color: var(--navy-light);
  background: rgba(26,46,90,.03);
}
.option-btn.correct {
  background: var(--success-bg); border-color: #1A7A4A; color: #0A4A2A;
}
.option-btn.wrong {
  background: #FEECEC; border-color: #A32020; color: #5A0A0A;
}
.option-btn.reveal {
  background: var(--success-bg); border-color: #1A7A4A; color: #0A4A2A;
}
.option-btn:disabled { cursor: default; }

.option-letter {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 500; color: var(--text-mid);
  transition: all .15s;
}
.option-btn.correct .option-letter { background: #1A7A4A; border-color: #1A7A4A; color: white; }
.option-btn.wrong   .option-letter { background: #A32020; border-color: #A32020; color: white; }
.option-btn.reveal  .option-letter { background: #1A7A4A; border-color: #1A7A4A; color: white; }

.explication {
  background: var(--cream-dark);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 14px 16px;
  font-size: .9rem; color: var(--text-mid);
  line-height: 1.7; margin-top: 12px;
}

.progress-bar {
  height: 4px; background: var(--cream-dark);
  border-radius: 2px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--navy-light);
  border-radius: 2px; transition: width .4s ease;
}

/* SCORE */
.score-ring {
  width: 100px; height: 100px;
  border-radius: 50%; border: 4px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-ring.pass { border-color: var(--success); }
.score-ring.fail { border-color: #A32020; }
.score-num { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 600; }
.score-ring.pass .score-num { color: var(--success); }
.score-ring.fail .score-num { color: #A32020; }

/* CHECKLIST */
.checklist-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { background: var(--cream); }
.checklist-item.checked { background: var(--success-bg); }
.checklist-checkbox {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px;
  border: 2px solid var(--border-mid);
  border-radius: 4px; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.checklist-item.checked .checklist-checkbox {
  background: var(--success); border-color: var(--success);
}
.checklist-item.checked .checklist-checkbox::after {
  content: '✓'; color: white; font-size: 12px; font-weight: 700;
}
.checklist-text { font-size: .9rem; line-height: 1.5; }
.checklist-text strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.checklist-text span { color: var(--text-light); font-size: .82rem; }

/* PREMIUM LOCK */
.premium-lock {
  display: flex; align-items: center; gap: 12px;
  background: var(--premium-bg);
  border: 1px solid rgba(196,152,58,.25);
  border-radius: var(--r-lg); padding: 20px 24px;
  margin: 24px 0;
}
.lock-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.lock-text strong { display: block; font-weight: 500; color: var(--navy); }
.lock-text span { font-size: .875rem; color: var(--text-mid); }

/* TIMER */
.timer {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; font-weight: 600; color: var(--navy);
  min-width: 52px; text-align: center;
}
.timer.warning { color: #A32020; }

/* STAT CARDS */
.stat-card {
  background: var(--cream-dark);
  border-radius: var(--r-md); padding: 16px;
  text-align: center;
}
.stat-card .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem; font-weight: 600; color: var(--navy);
}
.stat-card .lbl {
  font-size: .78rem; color: var(--text-light);
  text-transform: uppercase; letter-spacing: .06em; margin-top: 2px;
}

/* TABS */
.tab-bar {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px; overflow-x: auto;
}
.tab-btn {
  padding: 10px 18px; background: none; border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem; color: var(--text-light);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all .2s; white-space: nowrap;
}
.tab-btn.active { color: var(--navy); border-bottom-color: var(--gold); font-weight: 500; }
.tab-btn:hover:not(.active) { color: var(--text-mid); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ALERT / NOTICE */
.notice {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-md);
  font-size: .9rem; margin-bottom: 16px;
}
.notice-info { background: #EEF3FE; color: #1A3A8A; border: 1px solid rgba(26,58,138,.15); }
.notice-warn { background: #FEF8EC; border: 1px solid rgba(196,152,58,.2); color: #7A5010; }
.notice-success { background: var(--success-bg); border: 1px solid rgba(26,122,74,.15); color: #0A4A2A; }

/* FOOTER */
footer {
  background: var(--navy);
  color: rgba(247,244,238,.82);
  padding: 18px 0 10px;
  font-size: .85rem;
  position: relative;
  z-index: 10;
  isolation: isolate;
}
footer a { color: rgba(247,244,238,.82); }
footer a:hover { color: var(--cream); }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px;
}
.footer-inner > div > p { margin-top: 4px !important; }
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem; color: var(--cream); margin-bottom: 4px;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 5px; }
.footer-inner .rgpd-notice { display: none; }
.footer-inner > div:first-child > div { margin-top: 10px !important; }
.footer-inner > div:first-child > div > p { margin-bottom: 4px !important; }
/* Mon espace — masquer l'en-tête Elementor pour les connectés */
body.logged-in .auth-elementor-header { display: none !important; }

.footer-nl-form { display: flex; gap: 6px; max-width: 280px; }
.footer-nl-form input {
  flex: 1; min-width: 0; font-size: .8rem; padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.15); border-radius: var(--r-sm);
  background: rgba(255,255,255,.07); color: var(--cream); outline: none;
}
.footer-nl-form input::placeholder { color: rgba(247,244,238,.65); }
.footer-nl-form input:focus { border-color: rgba(255,255,255,.35); }
.footer-nl-form button {
  font-size: .8rem; padding: 6px 14px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: var(--cream); cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: background .15s;
}
.footer-nl-form button:hover { background: rgba(255,255,255,.2); }
.footer-nl-msg { font-size: .75rem; }

.footer-bottom {
  max-width: 1100px; margin: 10px auto 0; padding: 8px 24px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; font-size: .78rem;
}
.footer-bottom span, .footer-bottom a { font-size: .78rem; }

/* MOBILE NAV */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--cream); margin: 5px 0; border-radius: 2px;
  transition: all .2s;
}

/* MOBILE NAV — éléments injectés dans le dropdown */
.nav-mobile-separator { display: none; }
.nav-mobile-user-item { display: none; }
.nav-mobile-user-item a {
  color: rgba(247,244,238,.75); font-size: .875rem;
  padding: 8px 12px; border-radius: var(--r-sm); display: block;
}
.nav-mobile-user-item .nav-mobile-logout {
  font-size: .8rem; color: rgba(247,244,238,.45);
}
.nav-mobile-user-item .nav-mobile-audio {
  color: var(--gold); font-weight: 500;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  #nav-toggle { display: block !important; flex-shrink: 0; } /* ID + !important pour forcer l'affichage */
  /* Cacher les éléments de la barre — tout passe dans le dropdown */
  #nav-user-area { display: none !important; }
  .nav-audio-dropdown { display: none !important; }
  .nav-links {
    display: none !important; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navy); flex-direction: column; align-items: stretch;
    padding: 8px 0 16px; border-top: 1px solid rgba(255,255,255,.1); z-index: 9999;
  }
  .nav-links.open { display: flex !important; }
  .nav-links > li > a { padding: 12px 24px; display: block; text-align: left; font-size: .95rem; }
  .nav-links a { padding: 12px 24px; text-align: left; }
  /* Cacher le sous-menu "Articles" sur mobile : trop encombrant */
  .nav-links .sub-menu { display: none !important; }
  /* Afficher les éléments mobiles dans le dropdown */
  .nav-mobile-separator {
    display: block; border-top: 1px solid rgba(255,255,255,.15);
    margin: 8px 0 4px; padding: 0; list-style: none;
  }
  .nav-mobile-user-item { display: flex; flex-direction: column; gap: 0; }
  .nav-mobile-user-item a { padding: 10px 24px; text-align: left; font-size: .9rem; display: block; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero { padding: 56px 24px 48px; }
  .section { padding: 48px 0; }
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease both; }
.fade-up-1 { animation-delay: .1s; }
.fade-up-2 { animation-delay: .2s; }
.fade-up-3 { animation-delay: .3s; }
.fade-up-4 { animation-delay: .4s; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--cream-dark); }
::-webkit-scrollbar-thumb { background: var(--cream-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ─── LANGUAGE SELECTOR (dropdown) ─── */
.lang-selector { display:flex; align-items:center; }

/* Wrapper relatif pour positionner la liste */
.nat-lang-dropdown { position:relative; }

/* Bouton déclencheur */
.nat-lang-trigger {
  display:flex; align-items:center; gap:5px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.25);
  border-radius:var(--r-sm,4px);
  padding:5px 10px;
  color:var(--cream,#f7f4ee);
  font-size:.82rem; font-weight:600;
  cursor:pointer; white-space:nowrap;
  transition:background .15s, border-color .15s;
  line-height:1;
}
.nat-lang-trigger:hover {
  background:rgba(255,255,255,.15);
  border-color:rgba(255,255,255,.45);
}
.nat-lang-flag-icon { font-size:1.1em; line-height:1; }
.nat-lang-code { letter-spacing:.04em; }
.nat-lang-chevron {
  display:block; flex-shrink:0;
  transition:transform .2s;
}
.nat-lang-dropdown.open .nat-lang-chevron { transform:rotate(180deg); }

/* Liste déroulante */
.nat-lang-list {
  display:none;
  position:absolute; top:calc(100% + 6px); right:0;
  list-style:none; margin:0; padding:4px 0;
  background:var(--white,#fff);
  border:1px solid var(--border,#e5e0d8);
  border-radius:var(--r-md,8px);
  box-shadow:0 4px 16px rgba(0,0,0,.14);
  min-width:160px; z-index:200;
}
.nat-lang-dropdown.open .nat-lang-list { display:block; }

/* Items */
.nat-lang-item {
  display:flex; align-items:center; gap:8px;
  padding:8px 14px;
  color:var(--navy,#002395);
  font-size:.875rem; cursor:pointer;
  transition:background .12s;
  white-space:nowrap;
}
.nat-lang-item:hover { background:var(--cream,#f7f4ee); }
.nat-lang-item.active {
  background:var(--cream,#f7f4ee);
  font-weight:700;
}
.nat-lang-item-name { flex:1; }

/* Footer : adapter couleur du trigger */
footer .nat-lang-trigger {
  background:rgba(247,244,238,.08);
  border-color:rgba(247,244,238,.25);
  color:var(--cream,#f7f4ee);
}
footer .nat-lang-trigger:hover {
  background:rgba(247,244,238,.15);
  border-color:rgba(247,244,238,.45);
}

@media (max-width:768px) {
  .nat-lang-trigger { padding:4px 8px; font-size:.78rem; }
  .nat-lang-list { right:auto; left:0; }
}

/* ─── AIDE FLAGS (under question explanation) ─── */
.aide-flags { display:flex; gap:6px; margin-bottom:10px; }
.aide-flag { background:none; border:1px solid var(--border); border-radius:4px; padding:4px 8px; cursor:pointer; font-size:1rem; opacity:.5; transition:all .15s; line-height:1; }
.aide-flag:hover:not([disabled]) { opacity:1; border-color:var(--navy); }
.aide-flag.active { opacity:1; border-color:var(--navy); background:var(--cream); }
.aide-flag[disabled] { opacity:.2; cursor:not-allowed; }



/* ─── RGPD notices & Legal (brief légal 09/04/2026) ─── */
.rgpd-notice {
  font-size: 0.75rem;
  color: var(--text-light, #6b6560);
  line-height: 1.4;
  margin-top: 8px;
}
.rgpd-notice a {
  color: var(--gold);
  text-decoration: underline;
}

/* ─── Retractation consent checkbox (L221-28) ─── */
.retractation-consent {
  font-size: 0.8rem;
  color: var(--text-light, #6b6560);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.retractation-consent input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.retractation-consent a {
  color: var(--navy, #1a2744);
  text-decoration: underline;
}

/* ─── Cookie banner RGPD ─── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy, #1a2744);
  color: var(--cream, #f7f4ee);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 9999;
  font-size: 0.875rem;
  flex-wrap: wrap;
  box-shadow: 0 -2px 12px rgba(0,0,0,.2);
}
.cookie-banner p { margin: 0; flex: 1; }
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-cookie {
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-cookie-accept { background: var(--gold); color: #fff; }
.btn-cookie-refuse { background: transparent; color: var(--cream, #f7f4ee); border: 1px solid rgba(247,244,238,.4); }
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: flex-start; }
  .cookie-actions { width: 100%; }
  .btn-cookie { flex: 1; text-align: center; }
}

/* ─── Chatbot opt-in modal ─── */
#chatbot-optin-modal.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
}
#chatbot-optin-modal .modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
}
#chatbot-optin-modal h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: var(--navy, #1a2744);
}
#chatbot-optin-modal p {
  font-size: .875rem;
  color: #6b6560;
  line-height: 1.6;
  margin-bottom: 14px;
}
#chatbot-optin-modal label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .825rem;
  color: #333;
  cursor: pointer;
  margin: 16px 0;
}
#chatbot-optin-modal label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
#chatbot-consent-btn {
  width: 100%;
  margin-top: 8px;
}

/* ===== Lead magnet livret — encadré formulaire (pilier + 22 articles) — ajouté 2026-08-08 ===== */
.livret-lead-form{background:var(--navy);color:var(--cream);border-radius:12px;padding:22px 20px;margin:28px 0;border:1px solid var(--navy-light);box-shadow:0 4px 14px rgba(12,27,58,.18)}
.livret-lead-form .livret-lead-intro{color:var(--cream);font-size:1rem;margin:0 0 14px;line-height:1.5}
.livret-lead-form .livret-lead-intro strong{color:var(--gold-light)}
.livret-field input[type=email]{width:100%;padding:12px 14px;border-radius:8px;border:1px solid var(--cream-mid);background:var(--white);color:var(--text);font-size:1rem;box-sizing:border-box}
.livret-field input[type=email]:focus{outline:2px solid var(--gold);border-color:var(--gold)}
.livret-consent{display:flex;gap:8px;align-items:flex-start;margin:12px 0;font-size:.8rem;line-height:1.5;color:rgba(247,244,238,.85);cursor:pointer}
.livret-consent input{margin-top:3px;accent-color:var(--gold);flex:0 0 auto}
.livret-consent a{color:var(--gold-light);text-decoration:underline}
#livret-form button[type=submit]{display:block;width:100%;background:var(--gold);color:var(--navy);border:none;border-radius:8px;padding:13px 18px;font-size:1rem;font-weight:700;cursor:pointer;transition:background .2s}
#livret-form button[type=submit]:hover{background:var(--gold-light)}
#livret-form button[type=submit]:disabled{opacity:.6;cursor:wait}
.livret-msg{margin:10px 0 0;font-size:.85rem;min-height:1.2em}
.livret-msg.ok{color:#5DCAA5}
.livret-msg.err{color:#FF8A80}
@media (min-width:640px){.livret-lead-form{padding:26px 28px}}

/* Fix contraste encadré livret (2026-08-09) : le CSS de contenu de page écrase les couleurs — on force */
.livret-lead-form p, .livret-lead-form .livret-lead-intro { color: var(--cream) !important; }
.livret-lead-form .livret-lead-intro strong { color: var(--gold-light) !important; }
.livret-lead-form a { color: var(--gold-light) !important; text-decoration: underline !important; }
.livret-consent, .livret-consent span { color: rgba(247,244,238,.9) !important; }

/* Bouton du formulaire 20 QCM (page 231) — mêmes styles que #livret-form (2026-08-09) */
#qcm-form button[type=submit]{display:block;width:100%;background:var(--gold);color:var(--navy);border:none;border-radius:8px;padding:13px 18px;font-size:1rem;font-weight:700;cursor:pointer;transition:background .2s}
#qcm-form button[type=submit]:hover{background:var(--gold-light)}
#qcm-form button[type=submit]:disabled{opacity:.6;cursor:wait}

/* Fix contraste 2026-08-10 : dans le hero du blog, le titre multilingue (#article-ml-title,
   stylé navy/centré par article-multilang.css pour les pages piliers) reprend le style hero */
.blog-hero h1#article-ml-title{
  color:var(--cream) !important;
  max-width:none;margin:0 0 10px;padding:0;
  border-bottom:none;text-align:left;
}
