/* ═══════════════════════════════════════════════════════════════════════════
   École 6% — Accessibilité WCAG 2.1 AA / RGAA 4.1 — v3.0
   ─────────────────────────────────────────────────────────────────────────
   OBJECTIF v3.0 : 90–95 % WCAG AA
   Nouveautés :
   [N1] Skip links × 3 (contenu / nav / recherche)
   [N2] SVG inline : styles title/desc
   [N3] Carousels / sliders ARIA
   [N4] Tableaux accessibles (caption, scope)
   [N5] Page déclaration RGAA : styles intégrés
   [N6] role="alert" erreurs formulaire
   [N7] Tooltip accessible
   [N8] Pagination accessible
   [FIX] CTA "Toutes les formations" texte invisible (v2.1 repris)
   [FIX] Sélecteur mailto trop large — exceptions étendues
   Conservé de v2.x : focus, contrastes, CTA, footer, jobboard, blog, formations
═══════════════════════════════════════════════════════════════════════════ */

/* ── Variables (surchargées par a11y-dynamic.css) ──────────────────────── */
:root {
  --e6a-focus:      #0ea5e9;
  --e6a-text:       #1e293b;   /* sur blanc = 13.9:1 ✓ AAA */
  --e6a-text-light: #334155;   /* sur blanc =  9.4:1 ✓ AAA */
  --e6a-link:       #0369a1;   /* sur blanc =  7.0:1 ✓ AAA */
  --e6a-primary:    #0f172a;   /* sur blanc = 16.1:1 ✓ AAA */
  --e6a-accent:     #0369a1;
  --e6a-fs-base:    16px;
  --e6a-error:      #991b1b;
  --e6a-error-light:#fee2e2;
  --e6a-success:    #14532d;
  --e6a-success-light:#f0fdf4;
}

/* ══ 1. SKIP LINKS × 3 — WCAG 2.4.1 ═══════════════════════════════════ */
.e6a-skip-links {
  position: absolute;
  top: 0; left: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
}
.e6a-skip-link {
  position: absolute;
  top: -200px;
  left: 16px;
  background: var(--e6a-primary);
  color: #ffffff !important;
  padding: 12px 24px;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none !important;
  transition: top .15s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  white-space: nowrap;
}
.e6a-skip-link:focus {
  top: 0;
  outline: 3px solid var(--e6a-focus) !important;
  outline-offset: 2px;
  position: relative; /* empile les 3 liens quand focus successif */
}

/* ══ 2. FOCUS CLAVIER — WCAG 2.4.7 ════════════════════════════════════ */
:focus-visible {
  outline: 3px solid var(--e6a-focus) !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none !important; box-shadow: none !important; }
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
[role="button"]:focus-visible, [tabindex]:focus-visible,
summary:focus-visible {
  box-shadow: 0 0 0 5px rgba(14,165,233,.25) !important;
}

/* ══ 3. TAILLE ET INTERLIGNE — WCAG 1.4.4 / 1.4.12 ════════════════════ */
body { font-size: max(var(--e6a-fs-base), 16px) !important; line-height: 1.6 !important; }
h1 { font-size: max(2rem,    32px) !important; line-height: 1.2  !important; }
h2 { font-size: max(1.5rem,  24px) !important; line-height: 1.25 !important; }
h3 { font-size: max(1.25rem, 20px) !important; line-height: 1.3  !important; }
h4 { font-size: max(1.125rem,18px) !important; line-height: 1.35 !important; }
p, li { line-height: 1.6 !important; letter-spacing: 0.01em; }
p + p  { margin-top: 1em !important; }

/* ══ 4. LIENS ÉDITORIAUX ═══════════════════════════════════════════════ */
.entry-content a:not([class]),
.post-content  a:not([class]),
.page-content  a:not([class]),
article p > a,
article li > a {
  color: var(--e6a-link) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
.entry-content a:not([class]):hover,
article p > a:hover, article li > a:hover {
  color: var(--e6a-primary) !important;
  text-decoration-thickness: 2px !important;
}

/* ══ 5. CARTES BLOG — reset soulignement ══════════════════════════════ */
.blog-archive a, .blog-grid a, .posts-grid a,
article.post a, article.type-post a,
a:has(img):not(.e6a-skip-link):not(.e6f-logo):not(.e6m-home-link),
a:has(h2):not(.e6a-skip-link):not(.e6f-logo):not(.e6m-home-link),
a:has(h3):not(.e6a-skip-link):not(.e6f-logo):not(.e6m-home-link) {
  color: inherit !important;
  text-decoration: none !important;
}
article.post h2, article.post h3,
.blog-archive h2, .blog-archive h3,
[class*="post-card"] h2, [class*="post-card"] h3 {
  color: var(--e6a-text) !important;
  text-decoration: none !important;
}

/* ══ 6. MÉTA ARTICLES ══════════════════════════════════════════════════ */
.post-meta, .entry-meta, .article-meta,
.wp-block-post-date, time[datetime],
[class*="post-date"], [class*="article-date"],
[class*="read-time"], [class*="reading-time"] {
  color: var(--e6a-text-light) !important;
  font-size: max(0.875rem, 14px) !important;
}

/* ══ 7. BADGES CATÉGORIE ═══════════════════════════════════════════════ */
.category-badge, .post-category, .article-category,
[class*="category-badge"], [class*="post-tag"],
article.post .badge, article.post .category,
.blog-archive .badge, .blog-archive .category {
  font-size: max(0.75rem, 12px) !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}
.category-badge.ia, .cat-ia     { background: #e0f2fe !important; color: #075985 !important; }
.category-badge.rqth, .cat-rqth { background: #dcfce7 !important; color: #14532d !important; }
.category-badge.no-code         { background: #f3e8ff !important; color: #6b21a8 !important; }
.category-badge.carriere        { background: #fff7ed !important; color: #92400e !important; }
.category-badge.reconversion    { background: #e0f2fe !important; color: #075985 !important; }

/* ══ 8. FILTRES BLOG — aria-pressed ════════════════════════════════════ */
.blog-filter, .category-filter, [class*="filter-cat"],
a[href*="?cat="],
a[href*="blog-archive"]:not(.e6f-footer a):not(nav a) {
  display: inline-flex !important; align-items: center !important;
  min-height: 44px !important; padding: 0 16px !important;
  border-radius: 50px !important; font-size: 0.875rem !important;
  font-weight: 500 !important; text-decoration: none !important;
  color: var(--e6a-text-light) !important;
  border: 1.5px solid #cbd5e1 !important; background: transparent !important;
}
.blog-filter:hover, a[href*="?cat="]:hover { background: rgba(3,105,161,.08) !important; color: #0369a1 !important; border-color: #0369a1 !important; }
.blog-filter.active, .blog-filter[aria-pressed="true"], a[href*="?cat="].active, .current-cat a {
  background: #0369a1 !important; color: #ffffff !important; border-color: #0369a1 !important; font-weight: 600 !important;
}

/* ══ 9. CTA RECRUTER / MAILTO ══════════════════════════════════════════
   Sélecteur sur une seule ligne — le saut de ligne créait un sélecteur
   descendant invalide qui faisait rater le ciblage du lien header.
══════════════════════════════════════════════════════════════════════════ */
a[href^="mailto:"]:not(p > a):not(li > a):not(.entry-content a):not(footer a):not(.e6f-footer a):not([class*="footer"] a),
a[href="#contact"]:not(nav a):not(footer a):not(.e6f-footer a),
a[href*="recruter"]:not(nav a):not(footer a):not(.e6f-footer a),
[data-e6a-cta="secondary"] {
  background-image: none !important;
  background:       #0369a1 !important;
  color:            #ffffff !important;
  text-decoration:  none !important;
  border:           none !important;
  min-height:       44px !important;
  display:          inline-flex !important;
  align-items:      center !important;
  justify-content:  center !important;
  padding:          12px 28px !important;
  border-radius:    50px !important;
  font-weight:      700 !important;
  cursor:           pointer !important;
}
a[href^="mailto:"]:not(p > a):not(li > a):not(.entry-content a):not(footer a):not(nav a):hover,
a[href="#contact"]:not(nav a):not(footer a):hover,
[data-e6a-cta="secondary"]:hover { background: #075985 !important; color: #ffffff !important; }
a[href^="mailto:"]:not(p > a):not(.entry-content a):not(footer a):focus-visible,
[data-e6a-cta="secondary"]:focus-visible {
  outline: 3px solid #0f172a !important; outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(3,105,161,.3) !important;
}
/* Liens mailto textuels (paragraphe/footer/nav) */
p > a[href^="mailto:"], li > a[href^="mailto:"],
.entry-content a[href^="mailto:"],
footer a[href^="mailto:"], .e6f-footer a[href^="mailto:"],
[class*="footer"] a[href^="mailto:"],
nav a[href^="mailto:"], header nav a[href^="mailto:"] {
  background: none !important; background-image: none !important;
  color: var(--e6a-link) !important; text-decoration: underline !important;
  min-height: unset !important; padding: 0 !important;
  border-radius: 0 !important; display: inline !important; font-weight: inherit !important;
}

/* ══ 10. CTA POSTULER / CANDIDATER — WCAG 1.4.3 ═══════════════════════ */
a[href*="postuler"]:not(nav a):not(.e6f-footer a):not(footer a),
a[href*="candidature"]:not(nav a):not(.e6f-footer a):not(footer a),
a[href*="candidater"]:not(nav a):not(.e6f-footer a):not(footer a),
a[href^="mailto:"][href*="subject"]:not(nav a):not(footer a):not(.e6f-footer a),
button[class*="postuler"],
[data-e6a-cta="primary"] {
  background-image: none !important;
  background:       #0f172a !important;
  color:            #ffffff !important;
  text-decoration:  none !important;
  border:           none !important;
  min-height:       44px !important;
  display:          inline-flex !important;
  align-items:      center !important;
  justify-content:  center !important;
  padding:          12px 32px !important;
  border-radius:    50px !important;
  font-weight:      700 !important;
  cursor:           pointer !important;
  white-space:      nowrap !important;
}
a[href*="postuler"]:not(nav a):not(.e6f-footer a):not(footer a):hover { background: #1e293b !important; color: #ffffff !important; }
a[href*="postuler"]:not(nav a):not(.e6f-footer a):not(footer a):focus-visible {
  outline: 3px solid #0ea5e9 !important; outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(14,165,233,.25) !important;
}
nav a[href*="postuler"], nav a[href*="candidater"],
.e6f-footer a[href*="postuler"], footer a[href*="postuler"] {
  background: none !important; color: inherit !important;
  min-height: unset !important; padding: 0 !important;
  display: inline !important;
}

/* ══ 11. AUTRES CTA ════════════════════════════════════════════════════ */
a[href*="jobboard"]:not(nav a):not(.e6f-footer a):not(footer a):not(header a)[class],
a[href*="offres"]:not(nav a):not(.e6f-footer a):not(footer a)[class],
a[href*="nos-formations"]:not(nav a):not(.e6f-footer a):not(footer a)[class],
a[href*="blog-archive"]:not(nav a):not(.e6f-footer a):not(footer a)[class],
[class*="btn-primary"]:not(nav *):not(.e6f-footer *):not(footer *),
.wp-block-button__link {
  background-image: none !important; background: #0369a1 !important;
  color: #ffffff !important; text-decoration: none !important; border: none !important;
  min-height: 44px !important; display: inline-flex !important;
  align-items: center !important; justify-content: center !important;
  padding: 12px 24px !important; cursor: pointer !important;
}
[class*="btn-outline"]:not(nav *):not(.e6f-footer *):not(footer *),
[class*="button-outline"]:not(nav *):not(.e6f-footer *):not(footer *) {
  background: transparent !important; border: 2px solid #0369a1 !important;
  color: #0369a1 !important; text-decoration: none !important;
  min-height: 44px !important; display: inline-flex !important; align-items: center !important; padding: 12px 24px !important;
}
[class*="btn-outline"]:hover { background: #0369a1 !important; color: #ffffff !important; }

/* ══ 12. [FIX v2.1] PAGE FORMATIONS — CTA "Toutes les formations" ════
   Bug : color:inherit héritait du fond navy → contraste ~1.1:1.
   Fix : forcer blanc sur fond sombre, texte sombre sur fond clair.
══════════════════════════════════════════════════════════════════════════ */
a[href*="/formations/"]:not(.e6f-footer a):not(nav a):not(footer a) {
  color: inherit !important; text-decoration: none !important;
}
/* Fond sombre (page détail formation, hero) → texte blanc */
[class*="formation-detail"] a[href*="formations"]:not(nav a):not(footer a),
.formation-detail a[href*="formations"]:not(nav a):not(footer a),
[class*="hero"] a[href*="formations"],
[class*="dark"] a[href*="formations"],
[style*="background:#0f"] a[href*="formations"],
[style*="background: #0f"] a[href*="formations"] {
  color: rgba(255,255,255,.85) !important; /* 7.5:1 ✓ AAA */
  text-decoration: none !important;
}
/* Fond blanc (liste formations) → texte sombre */
.nos-formations a[href*="/formations/"],
[class*="formation-list"] a[href*="/formations/"],
.formations-archive a[href*="/formations/"] {
  color: var(--e6a-text) !important;
}
/* Méta formation */
.formation-card .meta, .course-card .meta,
[class*="formation-card"] .meta, [class*="course-card"] .meta {
  font-size: max(0.875rem, 14px) !important;
}
[class*="formation-card"] span, [class*="course-card"] span {
  color: var(--e6a-text-light) !important;
}
a[href*="/formations/"] .badge,
a[href*="/formations/"] [class*="badge"],
.formation-badge, .course-badge {
  background: rgba(0,0,0,.6) !important; color: #ffffff !important;
  font-size: max(0.75rem, 12px) !important; font-weight: 700 !important;
  padding: 3px 10px !important; border-radius: 4px !important; text-transform: uppercase !important;
}
.formations-filter, [class*="formation-tab"], [class*="filter-tab"],
.nos-formations [class*="filter"], [data-filter] {
  display: inline-flex !important; align-items: center !important; gap: 8px !important;
  min-height: 44px !important; padding: 0 20px !important; border-radius: 50px !important;
  border: 2px solid #64748b !important; color: var(--e6a-text) !important;
  background: transparent !important; text-decoration: none !important;
  font-weight: 500 !important; cursor: pointer !important;
}
.formations-filter.active, [class*="formation-tab"].active, [data-filter].active,
.formations-filter[aria-pressed="true"] {
  background: #0369a1 !important; color: #ffffff !important; border-color: #0369a1 !important;
}
.formations-filter:hover { background: rgba(3,105,161,.08) !important; color: #0369a1 !important; }

/* ══ 13. FORMULAIRES — WCAG 1.3.1 / 3.3.1 ════════════════════════════ */
input[type="email"], input[type="text"], input[type="search"],
input[type="tel"], input[type="url"], input[type="password"],
input[type="number"], select, textarea {
  border:        2px solid #94a3b8 !important;
  border-radius: 8px !important;
  font-size:     max(1rem, 16px) !important;
  padding:       10px 14px !important;
  background:    #ffffff !important;
  color:         var(--e6a-text) !important;
  box-shadow:    none !important;
}
/* ── Neutralise UNIQUEMENT le box-shadow natif (cercles rouges du navigateur) ──
   On NE touche PAS à border-color pour ne pas écraser la validation JS du thème
   qui fait f.style.borderColor = '#ef4444' en inline. */
input:invalid, select:invalid, textarea:invalid,
input:-moz-ui-invalid, select:-moz-ui-invalid, textarea:-moz-ui-invalid {
  box-shadow: none !important;
  outline:    none !important;
}
input:focus, select:focus, textarea:focus {
  border-color:   var(--e6a-focus) !important;
  outline:        3px solid var(--e6a-focus) !important;
  outline-offset: 2px !important;
  box-shadow:     0 0 0 4px rgba(14,165,233,.15) !important;
}
input[type="checkbox"], input[type="radio"] {
  width: 20px !important; height: 20px !important; min-height: unset !important;
  min-width: unset !important; padding: 0 !important; accent-color: var(--e6a-focus);
  cursor: pointer; box-shadow: none !important;
}
/* Blocs d'erreur vides → masqués (évite les rectangles roses vides au chargement) */
.e6a-field-error:empty,
[class*="field-error"]:empty,
[class*="form-error"]:empty { display: none !important; }
/* Erreur visible UNIQUEMENT après interaction utilisateur (blur → .e6a-touched) */
input.e6a-touched[aria-invalid="true"],
select.e6a-touched[aria-invalid="true"],
textarea.e6a-touched[aria-invalid="true"] {
  border-color: #dc2626 !important;
  background:   #fef2f2 !important;
  box-shadow:   none !important;
}
/* Messages d'erreur — WCAG 3.3.1 — uniquement quand non vides */
.e6a-field-error:not(:empty),
.wpcf7-not-valid-tip, .wpcf7-response-output,
.gfield_description.validation_message {
  color:         var(--e6a-error) !important;
  background:    var(--e6a-error-light) !important;
  border:        1.5px solid #fca5a5 !important;
  border-radius: 8px !important;
  padding:       10px 14px !important;
  font-size:     max(0.875rem, 14px) !important;
  font-weight:   600 !important;
  margin-top:    6px !important;
  display:       flex !important;
  align-items:   flex-start !important;
  gap:           8px !important;
}
[role="status"].e6a-form-success,
.wpcf7-mail-sent-ok,
.gform_confirmation_message {
  color:         var(--e6a-success) !important;
  background:    var(--e6a-success-light) !important;
  border:        1.5px solid #86efac !important;
  border-radius: 8px !important;
  padding:       12px 16px !important;
  font-weight:   600 !important;
}
/* Indicateur champ requis — PAS de ::after CSS : le HTML contient déjà un *
   On colorie uniquement le * existant dans le label. */
.required-indicator,
label .required, label > abbr[title="required"], label > abbr[title="obligatoire"] {
  color: var(--e6a-error) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
/* Description aide champ */
.e6a-field-hint, [class*="field-hint"], [class*="form-hint"],
.description, .field-description {
  color: var(--e6a-text-light) !important;
  font-size: max(0.85rem, 14px) !important;
  margin-top: 4px !important;
}

/* ══ 14. NEWSLETTER INPUT ══════════════════════════════════════════════ */
.newsletter-consent label, [class*="newsletter"] label {
  font-weight: 400 !important;
  color: var(--e6a-text-light) !important;
  font-size: max(0.85rem, 14px) !important;
}
.newsletter-consent a, [class*="newsletter"] a { color: var(--e6a-link) !important; text-decoration: underline !important; }

/* ══ 15. BARRE PROGRESSION ARTICLE ════════════════════════════════════ */
.reading-progress, [class*="progress-bar"], [class*="reading-progress"],
[class*="article-progress"] { background: var(--e6a-accent) !important; min-height: 4px !important; }
.reading-progress-track, [class*="progress-track"] { background: #e2e8f0 !important; min-height: 4px !important; }

/* ══ 16. JOBBOARD ══════════════════════════════════════════════════════ */
.job-company, .job-meta span, .jb-content p, .jb-content li,
.text-light, [class*="text-light"] { color: #334155 !important; }
.tag-blue   { background: #e0f2fe !important; color: #075985 !important; }
.tag-purple { background: #f3e8ff !important; color: #6b21a8 !important; }
.tag-orange { background: #fff7ed !important; color: #92400e !important; }
.tag-green, .job-new { background: #dcfce7 !important; color: #14532d !important; }
.btn-postuler { background: #075985 !important; color: #ffffff !important; text-decoration: none !important; }
.btn-postuler:focus-visible { outline: 3px solid #ffffff !important; outline-offset: 3px !important; box-shadow: 0 0 0 6px #075985 !important; }
.filter-btn.active { background: #075985 !important; color: #ffffff !important; border-color: #075985 !important; }
.btn-lire { color: #075985 !important; font-weight: 700 !important; text-decoration: underline !important; }
.modal-body input, .modal-body select, .modal-body textarea { border: 2px solid #475569 !important; }

/* ══ 17. FOOTER — WCAG 1.4.3 ══════════════════════════════════════════ */
footer a, .e6f-footer a, [class*="footer"] a,
footer .e6f-nav a, footer li a {
  background: none !important; background-image: none !important;
  color: rgba(255,255,255,.85) !important; /* sur fond navy 7.5:1 ✓ */
  text-decoration: none !important; min-height: unset !important;
  padding: 0 !important; display: inline !important;
  font-weight: normal !important; border-radius: 0 !important; border: none !important;
}
footer a:hover, .e6f-footer a:hover { color: #ffffff !important; text-decoration: underline !important; }
footer a:focus-visible, .e6f-footer a:focus-visible {
  outline: 3px solid var(--e6a-focus) !important; outline-offset: 2px !important; border-radius: 2px !important;
}
footer h2, footer h3, footer h4, .e6f-footer h2, .e6f-footer h3, [class*="footer"] h2, [class*="footer"] h3 {
  color: #ffffff !important; text-transform: uppercase !important;
  font-size: max(0.8rem, 13px) !important; letter-spacing: 0.08em !important;
}

/* ══ 18. PDF / TÉLÉCHARGEMENT ═══════════════════════════════════════════ */
a[href$=".pdf"]:not(nav a):not(footer a):not(.e6f-footer a),
a[href*="telecharger"]:not(nav a):not(footer a):not(.e6f-footer a),
a[href*="download"]:not(nav a):not(footer a):not(.e6f-footer a) {
  background-image: none !important; background-color: #0369a1 !important;
  color: #ffffff !important; text-decoration: none !important;
  display: inline-flex !important; align-items: center !important;
  flex-wrap: wrap !important; gap: 6px !important;
  min-height: 44px !important; padding: 10px 24px !important;
  border-radius: 8px !important; font-weight: 700 !important; border: none !important;
}
a[href$=".pdf"]:not(nav a):not(footer a) *, a[href*="telecharger"]:not(nav a):not(footer a) * { color: #ffffff !important; }
a[href$=".pdf"] .e6a-file-type, a[href*="telecharger"] .e6a-file-type {
  background: rgba(255,255,255,.25) !important; color: #ffffff !important;
  padding: 2px 6px !important; border-radius: 4px !important; font-size: .7em !important; font-weight: 700 !important;
}
a[href$=".pdf"]:not(nav a):not(footer a):hover, a[href*="telecharger"]:not(nav a):not(footer a):hover {
  background-color: #075985 !important; color: #ffffff !important;
}
a[href$=".pdf"]:not(nav a):not(footer a):focus-visible {
  outline: 3px solid #0ea5e9 !important; outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(3,105,161,.3) !important;
}

/* ══ 19. [N3] CAROUSEL / SLIDER — WCAG 4.1.2 / 2.1.1 ═════════════════
   Supporte : Splide, Swiper, Glide, Slick, WP Block Carousel, générique
══════════════════════════════════════════════════════════════════════════ */
/* Conteneur carousel */
[role="region"][aria-roledescription="carousel"],
.splide, .swiper, .glide, .slick-slider,
.wp-block-gallery, [class*="carousel-wrap"] {
  position: relative !important;
}
/* Liste des slides */
[role="list"][aria-label*="slide"],
.splide__list, .swiper-wrapper, .glide__slides, .slick-track {
  padding: 0 !important;
  list-style: none !important;
}
/* Slide individuelle */
[role="listitem"][aria-roledescription="slide"],
.splide__slide, .swiper-slide, .glide__slide, .slick-slide {
  min-height: 0 !important;
}
/* Boutons prev/next (min 44×44 px) */
.splide__arrow, .swiper-button-prev, .swiper-button-next,
.glide__arrow, .slick-prev, .slick-next,
[class*="carousel-prev"], [class*="carousel-next"],
[class*="slider-prev"], [class*="slider-next"] {
  min-width:  44px !important;
  min-height: 44px !important;
  display:    flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  border-radius: 50% !important;
}
.splide__arrow:focus-visible, .swiper-button-prev:focus-visible, .swiper-button-next:focus-visible,
.slick-prev:focus-visible, .slick-next:focus-visible,
[class*="carousel-prev"]:focus-visible, [class*="carousel-next"]:focus-visible {
  outline: 3px solid var(--e6a-focus) !important;
  outline-offset: 3px !important;
}
/* Pause auto-play — WCAG 2.2.2 */
.e6a-carousel-pause {
  position: absolute !important; top: 8px !important; right: 8px !important;
  z-index: 10 !important; background: rgba(0,0,0,.6) !important;
  color: #ffffff !important; border: none !important;
  border-radius: 50% !important; width: 36px !important; height: 36px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  cursor: pointer !important; font-size: 1rem !important;
}
.e6a-carousel-pause:focus-visible { outline: 3px solid #ffffff !important; outline-offset: 2px !important; }

/* Dots / pagination carousel */
.splide__pagination, .swiper-pagination, .slick-dots,
[class*="carousel-dots"], [class*="slider-dots"] {
  display: flex !important; flex-wrap: wrap !important;
  gap: 6px !important; justify-content: center !important;
  padding: 8px 0 !important; list-style: none !important;
}
.splide__pagination__page, .swiper-pagination-bullet,
.slick-dots li button, [class*="carousel-dot"] {
  min-width:  12px !important; min-height: 12px !important;
  border-radius: 50% !important; cursor: pointer !important;
  border: 2px solid #64748b !important; background: transparent !important;
}
.splide__pagination__page.is-active,
.swiper-pagination-bullet-active,
.slick-dots li.slick-active button,
[class*="carousel-dot"].active,
[class*="carousel-dot"][aria-current="true"] {
  background: var(--e6a-accent) !important; border-color: var(--e6a-accent) !important;
}

/* ══ 20. [N2] SVG INLINE — WCAG 1.1.1 ════════════════════════════════
   Titres SVG accessibles + icônes décoratives masquées
══════════════════════════════════════════════════════════════════════════ */
svg:not([aria-hidden="true"]):not([role="presentation"]) {
  overflow: visible;
}
svg title { display: none; } /* invisible visuellement, lu par AT via aria-labelledby */
/* Icônes SVG décoratives dans boutons — masquer du AT */
button > svg:only-child:not([aria-label]):not([title]),
a > svg:only-child:not([aria-label]):not([title]) {
  pointer-events: none;
}
/* Icon font (FontAwesome, Dashicons) — décoratifs masqués */
.fa, .fas, .far, .fab, .fal, .fad,
[class*="dashicons"], [class*="material-icon"] {
  speak: none;
}

/* ══ 21. [N4] TABLEAUX ACCESSIBLES — WCAG 1.3.1 ═════════════════════ */
table {
  border-collapse: collapse !important;
  width: 100% !important;
  font-size: max(0.9rem, 15px) !important;
}
caption {
  caption-side: top !important;
  text-align: left !important;
  font-weight: 700 !important;
  font-size: max(1rem, 16px) !important;
  padding: 0 0 8px !important;
  color: var(--e6a-text) !important;
}
th[scope] {
  background: var(--e6a-primary) !important;
  color: #ffffff !important;
  padding: 12px 16px !important;
  text-align: left !important;
  font-weight: 700 !important;
}
th[scope="col"] { border-bottom: 3px solid #0369a1 !important; }
th[scope="row"] { background: #f1f5f9 !important; color: var(--e6a-text) !important; }
td {
  padding: 10px 16px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: var(--e6a-text) !important;
  vertical-align: top !important;
}
tr:nth-child(even) td { background: #f8fafc !important; }
tr:hover td { background: #f0f9ff !important; }

/* ══ 22. [N7] TOOLTIP ACCESSIBLE — WCAG 1.4.13 ═══════════════════════ */
[data-tooltip], [title]:not(svg):not(a) {
  position: relative !important;
}
.e6a-tooltip {
  position: absolute !important;
  bottom: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-size: max(0.8rem, 13px) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  z-index: 9999 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.25) !important;
  max-width: 280px !important;
  white-space: normal !important;
}
.e6a-tooltip::after {
  content: "" !important;
  position: absolute !important;
  top: 100% !important; left: 50% !important;
  transform: translateX(-50%) !important;
  border: 6px solid transparent !important;
  border-top-color: #0f172a !important;
}

/* ══ 23. [N8] PAGINATION — WCAG 2.4.3 ════════════════════════════════ */
.pagination, .e6a-pagination, nav[aria-label*="pagination"],
nav[aria-label*="Pagination"], .wp-block-query-pagination {
  display: flex !important; flex-wrap: wrap !important;
  gap: 4px !important; align-items: center !important;
  list-style: none !important; padding: 0 !important;
}
.pagination a, .e6a-pagination a,
.wp-block-query-pagination a,
.page-numbers:not(.current) {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  min-width:  44px !important; min-height: 44px !important;
  border: 1.5px solid #cbd5e1 !important; border-radius: 8px !important;
  color: var(--e6a-text) !important; font-weight: 500 !important;
  text-decoration: none !important;
}
.pagination a:hover, .e6a-pagination a:hover,
.page-numbers:not(.current):hover { background: rgba(3,105,161,.08) !important; color: #0369a1 !important; border-color: #0369a1 !important; }
.pagination .current, .e6a-pagination .current,
.page-numbers.current, [aria-current="page"] {
  background: #0369a1 !important; color: #ffffff !important; border-color: #0369a1 !important;
  font-weight: 700 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  min-width: 44px !important; min-height: 44px !important; border-radius: 8px !important;
}
.pagination a:focus-visible, .e6a-pagination a:focus-visible {
  outline: 3px solid var(--e6a-focus) !important; outline-offset: 2px !important;
}

/* ══ 24. PAGE /presse/ ══════════════════════════════════════════════════ */
.press-card, [class*="press-card"], .resource-card { border: 1.5px solid #e2e8f0 !important; }
.press-card .badge, [class*="press-card"] .badge { background: #e0f2fe !important; color: #075985 !important; font-weight: 700 !important; }
.press-card .meta, .press-card time { color: var(--e6a-text-light) !important; font-size: max(0.85rem, 14px) !important; }
a[href^="tel:"]:not(nav a):not(footer a) { color: var(--e6a-link) !important; font-weight: 700 !important; text-decoration: underline !important; }

/* ══ 25. PAGE /affiliation/ ═════════════════════════════════════════════ */
a[href="#formulaire"]:not(nav a):not(footer a),
a[href*="affiliation"][class*="btn"]:not(nav a):not(footer a),
[data-e6a-cta="affiliation"] {
  background: #0f172a !important; color: #ffffff !important;
  min-height: 44px !important; display: inline-flex !important;
  align-items: center !important; justify-content: center !important;
  padding: 12px 32px !important; border-radius: 50px !important; font-weight: 700 !important;
}
.step-number, [class*="step-number"] {
  background: #0369a1 !important; color: #ffffff !important;
  font-weight: 800 !important; border-radius: 50% !important;
  width: 40px !important; height: 40px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
}
.faq-question, [class*="faq-question"], details summary {
  color: var(--e6a-text) !important; font-weight: 700 !important;
  cursor: pointer !important; min-height: 44px !important;
  display: flex !important; align-items: center !important;
}
details summary:focus-visible { outline: 3px solid var(--e6a-focus) !important; outline-offset: 2px !important; }
.faq-answer, details[open] p { color: var(--e6a-text-light) !important; line-height: 1.7 !important; }
[class*="commission"], .commission-card { color: #ffffff !important; }

/* ══ 26. PAGE DÉTAIL FORMATION ══════════════════════════════════════════ */
.breadcrumb, [class*="breadcrumb"] { font-size: max(0.85rem, 14px) !important; color: var(--e6a-text-light) !important; }
.breadcrumb a, [class*="breadcrumb"] a { color: var(--e6a-link) !important; text-decoration: underline !important; text-underline-offset: 2px !important; }
.breadcrumb a:hover { color: var(--e6a-primary) !important; }
.breadcrumb span[aria-hidden], [class*="breadcrumb"] .separator { color: #94a3b8 !important; margin: 0 6px !important; }
.formation-badge-type, .formation-detail .badge { background: #e0f2fe !important; color: #075985 !important; font-weight: 700 !important; }
.program-step, [class*="program-step"], .module-item { border-left: 3px solid #0369a1 !important; padding-left: 16px !important; }
.step-num, [class*="step-num"], .module-num { background: #0369a1 !important; color: #ffffff !important; font-weight: 800 !important; border-radius: 50% !important; width: 32px !important; height: 32px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }

/* ══ 27. SIDEBAR BLOG ══════════════════════════════════════════════════ */
.sidebar-cta, [class*="sidebar-cta"], aside .cta-widget { background: #0f172a !important; border-radius: 12px !important; padding: 20px !important; }
.sidebar-cta h3, aside .cta-widget h3 { color: #ffffff !important; }
.sidebar-cta p, aside .cta-widget p { color: rgba(255,255,255,.8) !important; }
.table-of-contents, [class*="toc"], .article-toc { border-left: 3px solid #e2e8f0 !important; padding-left: 16px !important; }
.table-of-contents a, [class*="toc"] a { color: var(--e6a-text-light) !important; text-decoration: none !important; display: block !important; padding: 3px 0 !important; }
.table-of-contents a:hover { color: var(--e6a-link) !important; text-decoration: underline !important; }

/* ══ 28. HOME — stats + teams ══════════════════════════════════════════ */
.stat-card, [class*="stat-card"] { border: 1.5px solid #e2e8f0 !important; border-radius: 12px !important; }
.stat-card .value, [class*="stat-card"] .value { color: var(--e6a-text) !important; font-weight: 800 !important; font-size: max(1.75rem, 28px) !important; }
.stat-card .label, [class*="stat-card"] .label { color: var(--e6a-text-light) !important; }
.team-card .name, [class*="team-card"] .name { color: var(--e6a-text) !important; font-weight: 700 !important; }
.team-card .role, [class*="team-card"] .role { color: var(--e6a-text-light) !important; }
.partner-logo, [class*="partner-logo"], .logo-grid img { background: #ffffff !important; border-radius: 8px !important; padding: 8px !important; }

/* ══ 29. [N5] PAGE DÉCLARATION ACCESSIBILITÉ — styles ═════════════════ */
.e6a-decl-status {
  display: flex; align-items: flex-start; gap: 16px;
  background: #f0fdf4; border: 1.5px solid #86efac;
  border-radius: 12px; padding: 20px 24px; margin-bottom: 32px;
}
.e6a-decl-status p { margin: 0; }
.e6a-decl-badge {
  display: inline-block; padding: 6px 14px; border-radius: 50px;
  font-weight: 700; font-size: .85rem; white-space: nowrap; flex-shrink: 0;
}
.e6a-decl-badge--partial { background: #fef3c7; color: #92400e; }
.e6a-badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: .8rem; font-weight: 700; }
.e6a-badge--partial { background: #fef3c7; color: #92400e; }
.e6a-decl-toc {
  background: #f8fafc; border-left: 3px solid #0369a1;
  border-radius: 0 8px 8px 0; padding: 16px 20px; margin-bottom: 32px;
}
.e6a-decl-toc ol { margin: 0; padding-left: 20px; }
.e6a-decl-toc li { margin: 6px 0; }
.e6a-decl-toc a { color: #0369a1; font-weight: 500; }
.e6a-decl-table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; }
.e6a-decl-table th, .e6a-decl-table td { padding: 10px 14px; border: 1px solid #e2e8f0; text-align: left; }
.e6a-decl-table th { background: #0f172a; color: #ffffff; font-weight: 700; }
.e6a-decl-table tr:nth-child(even) td { background: #f8fafc; }
.e6a-decl-list { list-style: none; padding-left: 0; }
.e6a-decl-list li { padding: 8px 12px 8px 36px; position: relative; border-bottom: 1px solid #f1f5f9; font-size: .9rem; }
.e6a-decl-list li:last-child { border: none; }
.e6a-decl-list--ok  li::before { content: "✓"; position: absolute; left: 10px; color: #15803d; font-weight: 700; }
.e6a-decl-list--warn li::before { content: "⚠"; position: absolute; left: 10px; }
.e6a-decl-list--ko  li::before { content: "✗"; position: absolute; left: 10px; color: #991b1b; font-weight: 700; }
.e6a-decl-dl dt { font-weight: 700; color: #1e293b; margin-top: 16px; }
.e6a-decl-dl dd { margin-left: 0; color: #334155; }
.e6a-decl-dl ul { margin: 8px 0 0 18px; }
.e6a-decl-contact { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.e6a-decl-contact__item {
  display: inline-flex; align-items: center; gap: 8px;
  background: #0f172a; color: #ffffff !important; text-decoration: none !important;
  padding: 12px 20px; border-radius: 50px; font-weight: 700;
}
.e6a-decl-contact__item:hover { background: #1e293b; }
.e6a-sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ══ 30. IMAGES SANS ALT — alerte visuelle ════════════════════════════ */
img:not([alt]) { outline: 4px solid #ef4444 !important; }

/* ══ 31. PREFERS-REDUCED-MOTION — WCAG 2.3.3 ════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .splide__track, .swiper-wrapper, .slick-track { transition: none !important; }
}

/* ══ 32. CONTRASTE FORCÉ SYSTÈME — WCAG 1.4.11 ══════════════════════ */
@media (forced-colors: active) {
  a[href*="recruter"], a[href*="postuler"], a[href*="jobboard"],
  a[href$=".pdf"]:not(nav a):not(footer a),
  [class*="btn-primary"], .wp-block-button__link,
  .blog-filter.active, .formations-filter.active,
  .e6a-skip-link { forced-color-adjust: none; }
  input, select, textarea { border: 2px solid ButtonText !important; }
}
