/* Barre d'accessibilite et preferences visuelles. */

@font-face {
    font-family: 'OpenDyslexic';
    src: url('../font/opendyslexic/OpenDyslexic-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'OpenDyslexic';
    src: url('../font/opendyslexic/OpenDyslexic-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'OpenDyslexic';
    src: url('../font/opendyslexic/OpenDyslexic-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'OpenDyslexic';
    src: url('../font/opendyslexic/OpenDyslexic-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Barre d'accessibilite sous le menu. */
.accessibility-toolbar{
    background-color: #ffffff;
    border-top: 1px solid #e9eef6;
}
.accessibility-controls{
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}
.accessibility-group{ display:flex; gap:8px; align-items:center; }
.label-toolbar{ font-size:13px; font-weight:800; color:#233242; margin-right:6px; }
.toolbar-btn{ background:#f5f7fb; border:1px solid #dde6f3; padding:8px 10px; border-radius:8px; cursor:pointer; font-weight:800; color:#102a45; display:inline-flex; align-items:center; gap:8px; }
.toolbar-btn:hover{ background:#e9f0ff; }

/* Icones des commandes. */
.text-size-decrease::before{ content: 'A'; font-weight:900; font-size:0.95rem; }
.text-size-increase::before{ content: 'A+'; font-weight:900; font-size:0.95rem; }
.dyslexic-toggle::before{ content: '🅓'; }
.theme-toggle::before{ content: '🌙'; }
.reset::before{ content: '↺'; }

/* Preferences activees par accessibilite.js. */
body.dyslexic{ font-family: 'OpenDyslexic', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body.dark-mode {
    color-scheme: dark;
    background: #101820;
    color: #e8eef5;
}
body.dark-mode a{ color:#9ec5ff; }
body.dark-mode .entete-site,
body.dark-mode .accessibility-toolbar,
body.dark-mode .navigation-site,
body.dark-mode footer,
body.dark-mode .site-footer {
    background-color: #17232e;
    color: #e8eef5;
}
body.dark-mode .titre-site,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode strong,
body.dark-mode .label-toolbar {
    color: #f4f7fb;
}
body.dark-mode .description-site,
body.dark-mode p,
body.dark-mode li,
body.dark-mode label,
body.dark-mode small,
body.dark-mode figcaption {
    color: #c2cfdb;
}
body.dark-mode article,
body.dark-mode section:not(.section-hero-location),
body.dark-mode .card,
body.dark-mode [class*="-card"],
body.dark-mode .bloc,
body.dark-mode .contenu-bloc {
    background-color: #1b2a36;
    border-color: #304454;
    color: #e8eef5;
}
body.dark-mode #primary-menu>li>a,
body.dark-mode .bouton-menu {
    color: #e8eef5;
}
body.dark-mode #primary-menu>li>a:hover,
body.dark-mode #primary-menu>li>a:focus {
    color: #b8d3ff;
    background-color: #243a4d;
}
body.dark-mode .toolbar-btn {
    background: #243442;
    border-color: #41586b;
    color: #f4f7fb;
}
body.dark-mode .toolbar-btn:hover,
body.dark-mode .toolbar-btn[aria-pressed="true"] {
    background: #31516b;
}
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background-color: #14212b;
    border-color: #41586b;
    color: #f4f7fb;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #91a4b5;
}
body.dark-mode th {
    background-color: #243a4d;
    color: #f4f7fb;
}
body.dark-mode td {
    border-color: #304454;
    color: #c2cfdb;
}
body.dark-mode .section-presentation-association,
body.dark-mode .section-presentation-final {
    background: #1b2a36;
}
body.dark-mode .section-presentation-highlight {
    background: #1b2a36;
    border-color: #304454;
}
body.dark-mode .no-posts,
body.dark-mode .article-page,
body.dark-mode .documents-contact-card,
body.dark-mode .documents-card,
body.dark-mode .contact-card,
body.dark-mode .contact-form-card,
body.dark-mode .contact-map-card,
body.dark-mode .carte-presidents,
body.dark-mode .carte-president {
    background: #1b2a36;
    border-color: #304454;
    color: #e8eef5;
}
body.dark-mode .contact-card-item {
    background: #14212b;
    border-color: #304454;
}
body.dark-mode .document-icon {
    background: #29445c;
    color: #c7dcff;
}
body.dark-mode .item-document:hover .document-icon {
    background: #31516b;
    color: #f4f7fb;
}
body.dark-mode .article-page .titre-page,
body.dark-mode .titre-section,
body.dark-mode .nom-president,
body.dark-mode .no-posts h2,
body.dark-mode .contact-card-text,
body.dark-mode .contact-form-content .wpcf7-form label {
    color: #f4f7fb;
}
body.dark-mode .article-page,
body.dark-mode .contact-form-content,
body.dark-mode .contact-form-placeholder,
body.dark-mode .equipement-desc,
body.dark-mode .no-posts p {
    color: #c2cfdb;
}
body.dark-mode .contact-form-content .wpcf7-form input[type="text"],
body.dark-mode .contact-form-content .wpcf7-form input[type="email"],
body.dark-mode .contact-form-content .wpcf7-form input[type="tel"],
body.dark-mode .contact-form-content .wpcf7-form textarea {
    background: #14212b;
    border-color: #41586b;
    color: #f4f7fb;
}
body.dark-mode .section-documents,
body.dark-mode .section-contact,
body.dark-mode .section-activites {
    background: transparent;
}
body.dark-mode .carte-activite,
body.dark-mode .contenu-historique,
body.dark-mode .single-activite-chip,
body.dark-mode .single-activite-detail-card,
body.dark-mode .single-activite-documents-list li,
body.dark-mode .single-activite-flyer-card {
    background: #1b2a36;
    border-color: #304454;
    color: #e8eef5;
}
body.dark-mode .contenu-historique {
    background: #1b2a36;
    border: 1px solid #304454;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}
body.dark-mode .point-historique,
body.dark-mode .texte-historique {
    color: #c2cfdb;
}
body.dark-mode .annee-historique {
    color: #f4f7fb;
}
body.dark-mode .point-historique::before {
    color: #8bb8e8;
}
body.dark-mode .single-activite-hero-image--placeholder {
    background: repeating-linear-gradient(135deg, #1b2a36 0 24px, #243442 24px 48px);
    border-color: #41586b;
    color: #c2cfdb;
}
body.dark-mode .single-activite-hero-image-icon {
    background: #243442;
}
body.dark-mode .single-activite-documents-list li strong {
    color: #f4f7fb;
}
body.dark-mode .single-activite-documents-list li span {
    color: #c2cfdb;
}
body.dark-mode .hero-title-card,
body.dark-mode .hero-intro-card,
body.dark-mode .hero-title-icon,
body.dark-mode .sous-titre-location,
body.dark-mode .carte-salle,
body.dark-mode .equipement-item,
body.dark-mode .item-document {
    background: #1b2a36;
    border-color: #304454;
    color: #e8eef5;
}
body.dark-mode .titre-location,
body.dark-mode .nom-salle,
body.dark-mode .equipement-title {
    color: #f4f7fb;
}
body.dark-mode .sous-titre-location,
body.dark-mode .intro-location,
body.dark-mode .description-salle,
body.dark-mode .equipement-note,
body.dark-mode .badge-pmr {
    color: #c2cfdb;
}
body.dark-mode .badge-association {
    background: #243f55;
    border: 1px solid #45637b;
    color: #e6f1fb;
}
body.dark-mode .section-equipements {
    background: #17232e;
}
body.dark-mode .equipement-icon {
    background: #243f55;
}
body.dark-mode .item-document {
    background: linear-gradient(180deg, #1b2a36 0%, #17232e 100%);
}
body.dark-mode .item-document .document-icon {
    background: #29445c;
}
body.dark-mode .contact-line,
body.dark-mode .salle-contact-group,
body.dark-mode .salle-info-extra,
body.dark-mode .salle-info-row,
body.dark-mode .salle-info-item,
body.dark-mode .shared-equipment-item {
    background: #1b2a36 !important;
    border-color: #304454 !important;
    color: #e8eef5 !important;
}
body.dark-mode .contact-line p,
body.dark-mode .salle-contact-item,
body.dark-mode .salle-contact-link,
body.dark-mode .salle-info-association,
body.dark-mode .salle-info-row strong,
body.dark-mode .salle-info-row p {
    color: #e8eef5 !important;
}
body.dark-mode .contact-line a,
body.dark-mode .salle-contact-link {
    color: #9ec5ff !important;
}
body.dark-mode .salle-contact-label,
body.dark-mode .salle-info-row span,
body.dark-mode .salle-info-card h2 {
    color: #c2cfdb !important;
}
body.dark-mode .button-secondary {
    background: #243442 !important;
    color: #e8eef5 !important;
    border-color: #7da9df !important;
}
body.dark-mode .page-manifestation .bouton-voir-plus {
    background: transparent !important;
    color: #ffffff !important;
}
body.dark-mode .page-manifestation .carte-activite:hover .bouton-voir-plus {
    background: transparent !important;
    color: #ffffff !important;
}

@media (max-width:760px){
    .accessibility-controls{ flex-wrap:wrap; gap:8px; padding:12px; }
    .label-toolbar{ display:block; width:100%; text-align:center; }
}

@media (max-width:480px){
    .accessibility-controls{
        display:grid;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:8px;
        padding:10px 12px;
    }

    .accessibility-group{
        min-width:0;
        justify-content:center;
    }

    .accessibility-group:first-child{
        grid-column:1 / -1;
    }

    .label-toolbar{
        width:auto;
        margin-right:4px;
        font-size:11px;
    }

    .toolbar-btn{
        min-width:0;
        padding:7px 8px;
        font-size:11px;
        overflow-wrap:anywhere;
    }
}

/* Filet de securite pour les composants qui utilisent encore les couleurs claires du theme. */
body.dark-mode main > section:not(.section-hero-location):not(.section-hero-activite) {
    background-color: #101820 !important;
    color: #e8eef5 !important;
}
body.dark-mode main article,
body.dark-mode main [class*="card"],
body.dark-mode main [class*="panel"],
body.dark-mode main [class*="bloc"],
body.dark-mode main [class*="item"] {
    background-color: #1b2a36 !important;
    border-color: #304454 !important;
    color: #e8eef5 !important;
}
body.dark-mode main h1,
body.dark-mode main h2,
body.dark-mode main h3,
body.dark-mode main h4,
body.dark-mode main h5,
body.dark-mode main h6,
body.dark-mode main p,
body.dark-mode main li,
body.dark-mode main label,
body.dark-mode main dt,
body.dark-mode main dd,
body.dark-mode main th,
body.dark-mode main td,
body.dark-mode main figcaption {
    color: #e8eef5 !important;
}
body.dark-mode main a {
    color: #9ec5ff !important;
}
body.dark-mode main .bouton-details:hover,
body.dark-mode main .presentation-highlight-cta,
body.dark-mode main .contact-map-button,
body.dark-mode main .item-document:hover {
    background: #2d6cdf !important;
    color: #ffffff !important;
    border-color: #2d6cdf !important;
}
body.dark-mode main input,
body.dark-mode main textarea,
body.dark-mode main select {
    background-color: #14212b !important;
    border-color: #41586b !important;
    color: #f4f7fb !important;
}
body.dark-mode main img,
body.dark-mode main svg,
body.dark-mode main video,
body.dark-mode .section-hero-location,
body.dark-mode .section-hero-activite {
    background-color: transparent;
}
body.dark-mode main .single-activite-detail-card-title,
body.dark-mode main .single-activite-content-header h3,
body.dark-mode main .single-manifestation-event-text strong,
body.dark-mode main .single-manifestation-event-text > span:last-child,
body.dark-mode main .single-manifestation-contact-item strong {
    color: #f4f7fb !important;
}
body.dark-mode main .single-activite-detail-content,
body.dark-mode main .single-activite-content-item > div:last-child p,
body.dark-mode main .single-manifestation-event-label,
body.dark-mode main .single-manifestation-contact-description,
body.dark-mode main .single-manifestation-contact-label,
body.dark-mode main .single-manifestation-contact-hours {
    color: #c2cfdb !important;
}
body.dark-mode main .single-manifestation-event-icon,
body.dark-mode main .single-manifestation-contact-method-icon,
body.dark-mode main .single-activite-item-icon {
    color: #b8d3ff !important;
}
body.dark-mode main .single-activite-detail-card--content-items > .single-activite-content-item {
    background: #243442 !important;
    border-color: #41586b !important;
}
body.dark-mode main .single-manifestation-contact-link,
body.dark-mode main .single-manifestation-contact-link:hover {
    background: #2d6cdf !important;
    color: #ffffff !important;
    border-color: #2d6cdf !important;
}
