/* ==========================================================================
   École 6% — widget d'accessibilité et modes d'affichage
   Les modes changent les JETONS de couleur du thème (--surface, --encre…)
   plutôt que de forcer des couleurs sur chaque élément : aucun texte ne
   peut se retrouver blanc sur blanc.
   ========================================================================== */

@font-face{font-family:"OpenDyslexic";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/opendyslexic-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"OpenDyslexic";font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/opendyslexic-latin-700-normal.woff2) format("woff2")}

/* ---------- Taille du texte (zoom du contenu, pas du widget) ---------- */
html[data-e6a-zoom="110"] :is(.e6-header,main,.e6-footer){zoom:1.1}
html[data-e6a-zoom="125"] :is(.e6-header,main,.e6-footer){zoom:1.25}
html[data-e6a-zoom="150"] :is(.e6-header,main,.e6-footer){zoom:1.5}
html[data-e6a-zoom="175"] :is(.e6-header,main,.e6-footer){zoom:1.75}
html[data-e6a-zoom="200"] :is(.e6-header,main,.e6-footer){zoom:2}

/* Quand le contenu est agrandi, les requêtes média ne se déclenchent pas : on adopte tout de suite l'en-tête « mobile ». */
html[data-e6a-zoom] .e6-header__barre{gap:10px 16px}
html[data-e6a-zoom] .e6-nav{order:3;flex:1 1 100%;overflow-x:auto}
html[data-e6a-zoom] .e6-header__ctas{margin-left:auto}

/* ---------- Contraste renforcé (noir sur blanc) et inversé (clair sur noir) ---------- */
html.e6a-contraste{
  --papier:#fff; --surface:#fff; --surface-teinte:#fff;
  --encre:#000; --encre-douce:#000;
  --bleu-6:#0000b8; --on-bleu:#fff;
  --signal:#fff; --on-signal:#000;
  --marine:#000; --on-marine:#fff; --on-marine-douce:#fff;
  --trait:#000; --trait-controle:#000;
  --succes:#005a2b; --succes-fond:#fff; --alerte:#a00000; --alerte-fond:#fff;
}
html.e6a-sombre{
  --papier:#000; --surface:#000; --surface-teinte:#000;
  --encre:#fff; --encre-douce:#fff;
  --bleu-6:#ffe600; --on-bleu:#000;
  --signal:#8ff0c8; --on-signal:#000;
  --marine:#000; --on-marine:#fff; --on-marine-douce:#fff;
  --trait:#fff; --trait-controle:#fff;
  --succes:#8ff0c8; --succes-fond:#000; --alerte:#ffb4a8; --alerte-fond:#000;
  color-scheme:dark;
}
html:is(.e6a-contraste,.e6a-sombre) body{background:var(--papier);color:var(--encre)}
html:is(.e6a-contraste,.e6a-sombre) *{text-shadow:none!important}
html:is(.e6a-contraste,.e6a-sombre) :is(.e6-carte,.e6-header,.e6-article-carte,.e6-formation-carte,.e6-bento,.e6-modale,.e6-logos,.e6-etape__carte,.e6-aside-carte,.e6-bloc,.e6-cartouche,.e6-video-carte,.e6-une,.e6-pilier){box-shadow:none!important}
/* Les fonds menthe/teinte disparaissent : on les remplace par une bordure nette. */
html:is(.e6a-contraste,.e6a-sombre) :is(.e6-btn,.e6-tag,.e6-places,.e6-pilier__icone,.e6-cartouche__icone,.e6-bandeau-photo__icone,.e6-social,.e6-etape__carte,.e6-carte,.e6-article-carte,.e6-formation-carte,.e6-aside-carte,.e6-cartouche,.e6-bandeau-photo,.e6-logos,.e6-bento,.e6-video-carte,.e6-une,.e6-recherche input,input,textarea,select){border:2px solid var(--trait)!important}
html:is(.e6a-contraste,.e6a-sombre) .e6-surligne{background:transparent!important;color:inherit!important;text-decoration:underline;text-decoration-thickness:4px;text-underline-offset:6px;padding:0}
html:is(.e6a-contraste,.e6a-sombre) :is(.e6-hero__fond,.e6-etape--fin){background:var(--surface)!important}
html:is(.e6a-contraste,.e6a-sombre) .e6-header{border-bottom:3px solid var(--trait)}
html:is(.e6a-contraste,.e6a-sombre) .e6-nav :is(a:hover,.current-menu-item>a,a[aria-current]){border-bottom-color:var(--encre)}
/* Zones sombres : bordures claires pour rester visibles. */
html:is(.e6a-contraste,.e6a-sombre) :is(.e6-footer,.e6-carte--marine,.e6-bandeau-photo,.e6-aside-carte--marine,.e6-video-carte,.e6-bento){--trait:#fff;--trait-controle:#fff}
html.e6a-contraste :is(.e6-footer,.e6-carte--marine,.e6-bandeau-photo,.e6-aside-carte--marine) :is(.e6-btn--signal,.e6-btn--principal){background:#fff!important;color:#000!important;border-color:#fff!important}
html.e6a-contraste .e6-btn--principal{background:#000;color:#fff;border-color:#000!important}
html.e6a-contraste .e6-btn--secondaire{background:#fff;color:#000}
html.e6a-sombre .e6-btn--secondaire{background:#000;color:#fff}
html:is(.e6a-contraste,.e6a-sombre) a{text-decoration-thickness:2px}
html.e6a-contraste a:not(.e6-btn):not(.e6-social){color:#0000b8}
html.e6a-contraste :is(.e6-footer,.e6-carte--marine,.e6-bandeau-photo) a:not(.e6-btn):not(.e6-social){color:#fff}
html.e6a-sombre a:not(.e6-btn):not(.e6-social){color:#ffe600}
html:is(.e6a-contraste,.e6a-sombre) .e6-social{background:transparent;color:var(--on-marine)}
html:is(.e6a-contraste,.e6a-sombre) :is(.e6-carte--marine,.e6-etape--fin) .e6-tag{background:transparent!important;color:inherit!important}
html:is(.e6a-contraste,.e6a-sombre) img{filter:contrast(1.08)}
html:is(.e6a-contraste,.e6a-sombre) :is(.e6-footer__bas,.e6-footer__legal){color:var(--on-marine)}

/* ---------- Niveaux de gris ---------- */
html.e6a-gris{filter:grayscale(1)}

/* ---------- Police dyslexie ---------- */
html.e6a-dys body,html.e6a-dys :is(h1,h2,h3,h4,h5,h6,p,li,a,span,button,input,textarea,select,label,td,th,summary,blockquote,time,strong,em,.e6-btn){font-family:"OpenDyslexic","Atkinson Hyperlegible",sans-serif!important}
html.e6a-dys body{font-size:16.5px}
html.e6a-dys :is(h1,h2,h3){letter-spacing:0!important;overflow-wrap:break-word}

/* ---------- Espacement des textes (WCAG 1.4.12) ---------- */
html.e6a-espaces :is(body,p,li,a,span,td,th,h1,h2,h3,h4,h5,h6,label,button,input,textarea,blockquote,summary):not(.sr-only):not(.e6-skip):not(.e6a-skip-link):not(.e6a-skip-links *){line-height:1.8!important;letter-spacing:.12em!important;word-spacing:.16em!important}
html.e6a-espaces p{margin-bottom:2em}

/* ---------- Animations ---------- */
html.e6a-sans-anim{scroll-behavior:auto!important}
html.e6a-sans-anim *,html.e6a-sans-anim *::before,html.e6a-sans-anim *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}

/* ---------- Liens soulignés ---------- */
html.e6a-liens a{text-decoration:underline!important;text-decoration-thickness:2px!important;text-underline-offset:4px!important}

/* ---------- Focus renforcé ---------- */
html.e6a-focus :focus-visible{outline:4px solid #000!important;outline-offset:3px!important;box-shadow:0 0 0 8px #ffe600!important;border-radius:4px}
html.e6a-focus.e6a-sombre :focus-visible{outline-color:#fff!important;box-shadow:0 0 0 8px #0000b8!important}

/* ---------- Grand curseur ---------- */
html.e6a-curseur,html.e6a-curseur *{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3v34l9-8 6 14 7-3-6-14h12z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3,auto!important}
html.e6a-curseur :is(a,button,[role=button],[role=switch],summary,label,select,input[type=submit],input[type=checkbox],input[type=radio]),html.e6a-curseur :is(a,button,[role=switch],summary,label) *{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M18 4a4 4 0 0 1 8 0v14l3-1a3 3 0 0 1 4 0l1 1a3 3 0 0 1 4 0c3 0 5 2 5 5v9c0 6-4 11-11 11h-6c-5 0-8-3-11-8l-6-10a3 3 0 0 1 5-3l4 5z' fill='%23fff' stroke='%23000' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 20 4,pointer!important}

/* ---------- Masquer les images ---------- */
html.e6a-sans-images :is(img,picture,video,svg:not([aria-hidden=true])){visibility:hidden!important}
html.e6a-sans-images .e6a-widget :is(img,svg){visibility:visible!important}
html.e6a-sans-images *{background-image:none!important}

/* ---------- Guide de lecture ---------- */
/* Sélecteurs par identifiant : la classe « e6a-guide » est aussi posée sur <html> quand l'option est active. */
#e6a-guide{position:fixed;left:0;right:0;top:40vh;height:84px;z-index:850;pointer-events:none;box-shadow:0 0 0 100vmax rgba(0,0,0,.6);border-top:3px solid #ffe600;border-bottom:3px solid #ffe600}
#e6a-guide[hidden]{display:none!important}

/* ==========================================================================
   Le widget lui-même
   ========================================================================== */
.e6a-widget{position:fixed;left:16px;bottom:16px;z-index:900;font-family:var(--font-texte);font-size:17px;line-height:1.4;color:var(--encre);zoom:1!important}
.e6a-bouton{width:56px;height:56px;border-radius:50%;border:3px solid var(--surface);background:var(--bleu-6);color:var(--on-bleu);display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 10px 26px -8px rgba(13,20,64,.55);padding:0}
.e6a-bouton:hover{background:var(--encre);color:var(--surface)}
.e6a-panneau{position:absolute;left:0;bottom:70px;width:min(390px,calc(100vw - 32px));max-height:min(80vh,760px);display:flex;flex-direction:column;background:var(--surface);color:var(--encre);border:1px solid var(--trait);border-top:5px solid var(--bleu-6);border-radius:22px;box-shadow:0 24px 60px -18px rgba(13,20,64,.5);overflow:hidden}
.e6a-panneau[hidden]{display:none}
.e6a-entete{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px 12px;border-bottom:1px solid var(--trait)}
.e6a-entete h2{margin:0;font-family:var(--font-titre);font-weight:800;font-size:26px;letter-spacing:-.01em;color:var(--encre)}
.e6a-entete h2:focus{outline:none}
.e6a-fermer{width:48px;height:48px;border-radius:50%;border:1px solid var(--trait);background:var(--surface);color:var(--encre);display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.e6a-fermer:hover{background:var(--encre);color:var(--surface)}
.e6a-corps{overflow:auto;padding:4px 20px 8px;overscroll-behavior:contain}
.e6a-liste{list-style:none;margin:0;padding:0}
.e6a-ligne{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid var(--trait)}
.e6a-ligne[hidden]{display:none}
.e6a-liste .e6a-ligne:last-child{border-bottom:0}
.e6a-texte{display:flex;flex-direction:column;gap:2px;min-width:0}
.e6a-nom{font-family:var(--font-titre);font-weight:700;font-size:17px;color:var(--encre)}
.e6a-desc{font-size:14.5px;color:var(--encre-douce)}
.e6a-taille{display:inline-flex;align-items:center;gap:8px}
.e6a-pas{min-width:48px;height:48px;border-radius:999px;border:2px solid var(--trait-controle);background:var(--surface-teinte);color:var(--bleu-6);font-family:var(--font-titre);font-weight:800;font-size:17px;cursor:pointer;padding:0 10px}
.e6a-pas:hover:not(:disabled){background:var(--bleu-6);color:var(--on-bleu)}
.e6a-pas:disabled{opacity:.45;cursor:not-allowed}
.e6a-valeur{min-width:54px;text-align:center;font-family:var(--font-titre);font-weight:700}
.e6a-bascule{flex:0 0 auto;position:relative;width:54px;height:32px;border-radius:999px;border:2px solid var(--trait-controle);background:var(--surface-teinte);cursor:pointer;padding:0}
.e6a-bascule::before{content:"";position:absolute;inset:-9px -4px}
.e6a-bascule::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:var(--surface);border:2px solid var(--trait-controle);transition:transform .15s}
.e6a-bascule[aria-checked="true"]{background:var(--bleu-6);border-color:var(--bleu-6)}
.e6a-bascule[aria-checked="true"]::after{transform:translateX(22px);border-color:var(--on-bleu)}
.e6a-action{flex:0 0 auto;min-height:44px;padding:8px 18px;border-radius:999px;border:2px solid var(--bleu-6);background:var(--bleu-6);color:var(--on-bleu);font:inherit;font-weight:700;cursor:pointer}
.e6a-action[aria-pressed="true"]{background:var(--surface);color:var(--bleu-6)}
.e6a-memo{margin:6px 0 4px;font-size:13.5px;color:var(--encre-douce)}
.e6a-pied{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 20px 18px;border-top:1px solid var(--trait)}
.e6a-reinit{min-height:48px;padding:0 24px;border-radius:999px;border:2px solid var(--encre);background:var(--encre);color:var(--surface);font:inherit;font-weight:800;cursor:pointer}
.e6a-reinit:hover{background:var(--surface);color:var(--encre)}
.e6a-pied a{color:var(--bleu-6);font-weight:700}
.e6a-widget :focus-visible{outline:3px solid var(--encre);outline-offset:2px;box-shadow:0 0 0 6px var(--signal)}
html.e6a-sombre .e6a-widget :focus-visible{outline-color:#fff;box-shadow:0 0 0 6px #0000b8}
@media (max-width:520px){.e6a-widget{left:10px;bottom:10px}.e6a-panneau{bottom:66px}}
@media print{.e6a-widget,#e6a-guide{display:none!important}}
