/* Fondation Althéa – Options d'accessibilité (panneau, réglages d'affichage, lecture à voix haute) */

/* Taille du texte (tout le site est en rem : l'ensemble s'agrandit) */
html[data-althea-texte="1"] { font-size: 112.5%; }
html[data-althea-texte="2"] { font-size: 125%; }
html[data-althea-texte="3"] { font-size: 140%; }

/* Contraste renforcé */
.althea-a11y-contraste {
	--texte: #000; --gris: #1F1A1A; --lin: #FFFFFF; --lin-2: #000000; --rouge: #A00000; --rouge-fonce: #7A0000;
	--ombre: 0 0 0 2px #000; --ombre-forte: 0 0 0 2px #000;
}
.althea-a11y-contraste body { color: #000; }
.althea-a11y-contraste a { text-decoration: underline !important; }
.althea-a11y-contraste .althea-hero__tuile::after { background: rgba(0, 0, 0, .78); }
.althea-a11y-contraste .althea-hero__legende { text-shadow: none; }
.althea-a11y-contraste :focus-visible { outline: 4px solid #000 !important; box-shadow: 0 0 0 7px #FFD400 !important; }

/* Mode sombre (photosensibilité, fatigue visuelle) */
.althea-a11y-sombre {
	--blanc: #171313; --texte: #EFE8E5; --gris: #C9BEBA; --noir: #FFFFFF; --lin: #221C1B; --lin-2: #3A3130; --rouge: #FF6B6B; --rouge-fonce: #FF8A8A;
	--ombre: 0 0 0 1px #3A3130; --ombre-forte: 0 0 0 1px #4A3F3E; color-scheme: dark;
}
.althea-a11y-sombre body { background: #171313; color: var(--texte); }
.althea-a11y-sombre .althea-entete-site::before { background: rgba(23, 19, 19, .96); }
.althea-a11y-sombre .althea-logo img, .althea-a11y-sombre .althea-pied__marque img { filter: invert(1) hue-rotate(180deg) saturate(1.4); }
.althea-a11y-sombre :is(.althea-pole__lien, .althea-etab__lien, .althea-annuaire__item, .althea-fiche, .althea-carte-actu, .althea-cartes .wp-block-post, .althea-archive__carte, .althea-offre a, .althea-don, .althea-calcul__resultat, .althea-espace__connexion, .althea-raccourcis a, .althea-partage a, .althea-partage button, .althea-pastille, .althea-a11y__panneau, .wp-block-details, .althea-calcul__profil label, .althea-newsletters li) { background: #221C1B; color: var(--texte); }
.althea-a11y-sombre .althea-pastille[aria-pressed="true"] { background: var(--pole, #FF8A8A); color: #171313; }
.althea-a11y-sombre .althea-bouton { color: #171313; }
.althea-a11y-sombre .althea-bouton--contour { color: var(--rouge-fonce); }
.althea-a11y-sombre .althea-mots-simples { background: #2A2412; border-color: #6B5A2A; color: #F6EEDA; }
.althea-a11y-sombre .althea-mots-simples__titre, .althea-a11y-sombre .althea-ecouter { color: #F2C66D; border-color: #F2C66D; background: transparent; }
.althea-a11y-sombre .althea-mots-simples { box-shadow: none; border-left-color: #F2C66D; }
.althea-a11y-sombre .althea-mots-simples__titre .althea-icone { background: #4A3A16; }
.althea-a11y-contraste .althea-mots-simples { background: #FFFBEF; border: 2px solid #000; border-left-width: 6px; box-shadow: none; }
.althea-a11y-sombre :is(input, select, textarea) { background: #171313 !important; color: #EFE8E5 !important; }
.althea-a11y-sombre .althea-nav .wp-block-navigation__submenu-container, .althea-a11y-sombre .althea-nav .wp-block-navigation__responsive-container.is-menu-open { background: #221C1B !important; }
.althea-a11y-sombre :is(.althea-chiffres-bande, .althea-pied) { background: #1E1817; border-color: #3A3130; }
.althea-a11y-sombre .althea-pied__bas { background: #4A0A0A; }
.althea-a11y-sombre :is(.althea-valeur, .althea-reseau, .althea-partenaire, .althea-partenaires-bande__lien, .althea-veille__item) { background: #221C1B; border-color: #3A3130; color: var(--texte); }
.althea-a11y-sombre .althea-partenaire__logo, .althea-a11y-sombre .althea-partenaires-bande__lien { background: #F4EEEA; }

/* Contraste renforcé : fonds unis blancs et filets noirs */
.althea-a11y-contraste :is(.althea-chiffres-bande, .althea-pied) { background: #fff; border-top: 2px solid #000; }
.althea-a11y-contraste .althea-pied__bas { background: #7A0000; }
.althea-a11y-contraste :is(.althea-chiffres-bande, .althea-bandeau-don, .althea-section--deco)::before { display: none; }
.althea-a11y-contraste .althea-partenaires-bande__lien img, .althea-a11y-contraste .althea-partenaire__logo img { filter: none !important; opacity: 1 !important; }

/* Police très lisible (dyslexie, basse vision) */
.althea-a11y-lecture body, .althea-a11y-lecture :is(h1, h2, h3, h4, h5, h6, button, input, select, textarea, .althea-hero__titre) {
	font-family: "Atkinson Hyperlegible", Verdana, sans-serif !important; letter-spacing: .015em; word-spacing: .06em;
}
.althea-a11y-lecture :is(p, li, dd) { text-align: left !important; hyphens: none; }

/* Interlignage et espacements (critère WCAG 1.4.12) */
.althea-a11y-interligne :is(p, li, dd, blockquote, .althea-intro) { line-height: 2 !important; letter-spacing: .12em; word-spacing: .16em; }
.althea-a11y-interligne p { margin-bottom: 2em !important; }

/* Liens soulignés partout */
.althea-a11y-liens a:not(.althea-bouton):not(.wp-block-button__link) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: .2em; }
.althea-a11y-liens a:not(.althea-bouton):not(.wp-block-button__link):hover { background: #FFF3B0; color: #000 !important; }

/* Aucune animation */
.althea-a11y-animations *, .althea-a11y-animations *::before, .althea-a11y-animations *::after {
	animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

/* Guide de lecture : bande claire, le reste de l'écran est assombri */
.althea-guide { display: none; position: fixed; left: 0; right: 0; top: 0; height: 3.4rem; z-index: 9990; pointer-events: none;
	box-shadow: 0 0 0 100vmax rgba(18, 10, 10, .5); border-block: 2px solid var(--rouge); transform: translateY(40vh); }
.althea-a11y-guide .althea-guide { display: block; }

/* Bloc lu à voix haute */
.althea-lu { background: #FFF3B0 !important; color: #000 !important; outline: 3px solid #E0B800; outline-offset: 4px; border-radius: 4px; }

/* -------- Panneau -------- */
.althea-a11y { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 9999; font-family: "Open Sans", sans-serif; }
.althea-a11y__bouton {
	display: inline-flex; align-items: center; gap: .5rem; min-height: 54px; padding: 0 1.1rem 0 .8rem; border-radius: 999px; border: 2px solid #fff;
	background: var(--noir, #120A0A); color: #fff; font: 700 .95rem "Open Sans", sans-serif; cursor: pointer; box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}
.althea-a11y__bouton .althea-icone { width: 28px; height: 28px; }
.althea-a11y__bouton:hover, .althea-a11y__bouton[aria-expanded="true"] { background: var(--rouge-fonce, #9B0000); }
.althea-a11y-sombre .althea-a11y__bouton { background: #fff; color: #120A0A; }
@media (max-width: 600px) { .althea-a11y__libelle { display: none; } .althea-a11y__bouton { padding: 0; width: 54px; justify-content: center; } }
.althea-a11y__panneau {
	position: absolute; right: 0; bottom: calc(100% + .8rem); width: min(380px, calc(100vw - 2rem)); max-height: calc(100vh - 7rem); overflow: auto;
	background: #fff; color: #120A0A; border-radius: 18px; box-shadow: 0 24px 70px rgba(0, 0, 0, .28); padding: 1.2rem 1.2rem 1rem;
}
.althea-a11y__entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.althea-a11y__entete h2 { margin: 0; font-size: 1.3rem; color: inherit; }
.althea-a11y__fermer { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #F2ECE9; color: inherit; cursor: pointer; display: grid; place-items: center; }
.althea-a11y__voix { width: 100%; display: flex; align-items: center; gap: .8rem; text-align: left; padding: .9rem 1rem; border-radius: 14px; border: 2px solid #9B0000; background: #FDF3F3; color: #120A0A; cursor: pointer; font: inherit; margin-bottom: 1rem; }
.althea-a11y__voix .althea-icone { width: 34px; height: 34px; color: #9B0000; }
.althea-a11y__voix strong { display: block; }
.althea-a11y__voix small { display: block; color: #5C5352; }
.althea-a11y__voix[aria-pressed="true"] { background: #9B0000; color: #fff; }
.althea-a11y__voix[aria-pressed="true"] :is(.althea-icone, small) { color: #fff; }
.althea-a11y__groupe { border: 0; margin: 0 0 .9rem; padding: 0; }
.althea-a11y__groupe legend { font-weight: 700; margin-bottom: .5rem; padding: 0; }
.althea-a11y__tailles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.althea-a11y__tailles button { min-height: 48px; border-radius: 12px; border: 2px solid #E3D9D5; background: #fff; color: #120A0A; font-weight: 700; cursor: pointer; font-family: inherit; }
.althea-a11y__tailles button:nth-child(2) { font-size: 1.05rem; } .althea-a11y__tailles button:nth-child(3) { font-size: 1.15rem; } .althea-a11y__tailles button:nth-child(4) { font-size: 1.25rem; }
.althea-a11y__tailles button[aria-pressed="true"] { background: #120A0A; color: #fff; border-color: #120A0A; }
.althea-a11y__interrupteur { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 48px; padding: .4rem .2rem; border: 0; border-bottom: 1px solid #F0E8E5; background: none; color: inherit; font: 600 .98rem "Open Sans", sans-serif; cursor: pointer; text-align: left; }
.althea-a11y__interrupteur > span:first-child { display: inline-flex; align-items: center; gap: .6rem; }
.althea-a11y__curseur { flex: none; width: 46px; height: 26px; border-radius: 999px; background: #CFC4BF; position: relative; transition: background .2s; }
.althea-a11y__curseur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.althea-a11y__interrupteur[aria-checked="true"] .althea-a11y__curseur { background: #2E7D32; }
.althea-a11y__interrupteur[aria-checked="true"] .althea-a11y__curseur::after { transform: translateX(20px); }
.althea-a11y__pied { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; }
.althea-a11y__reinit { min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 2px solid #120A0A; background: #fff; color: #120A0A; font: 700 .9rem "Open Sans", sans-serif; cursor: pointer; }
.althea-a11y__pied a { color: #9B0000; font-weight: 600; font-size: .92rem; }
.althea-a11y__note { font-size: .8rem; color: #5C5352; margin: .8rem 0 0; }

/* Barre du lecteur vocal */
.althea-lecteur-voix { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 9998; display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem .5rem 1rem; border-radius: 999px; background: #120A0A; color: #fff; box-shadow: 0 12px 34px rgba(0, 0, 0, .3); font: 600 .95rem "Open Sans", sans-serif; }
.althea-lecteur-voix[hidden] { display: none; }
.althea-lecteur-voix button { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .9rem; border-radius: 999px; border: 0; background: #fff; color: #120A0A; font: inherit; cursor: pointer; }
@media (max-width: 600px) { .althea-lecteur-voix { left: 1rem; right: 5rem; transform: none; } .althea-lecteur-voix > span { display: none; } }
