/* ============================
   Bouton flottant accessibilité
   ============================ */

#somoba-access-btn {
    position: fixed;
    bottom: 75px;
    right: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #226699;
    color: #ffffff;
    font-size: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999999999;
    box-shadow: none;
}

#somoba-access-btn .somoba-icon {
    line-height: 1;
}

/* ============================
   Overlay plein écran (lightbox)
   ============================ */

#somoba-access-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999998;
    display: none;               /* caché par défaut */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#somoba-access-overlay.open {
    display: flex;               /* visible quand .open */
}

/* ============================
   Panneau central accessibilité
   ============================ */

#somoba-access-panel {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 18px;
    padding: 24px 20px 22px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    position: relative;
    font-family: inherit;
}

#somoba-access-panel h2 {
    margin: 0 0 18px;
    font-size: 20px;
    text-align: center;
}

/* Bouton de fermeture (croix) */

#somoba-access-close {
position: absolute;
    top: 0px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0;
}

/* ============================
   Grille de gros boutons carrés
   ============================ */

.somoba-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 480px) {
    .somoba-access-grid {
        grid-template-columns: 1fr;
    }
}

/* Carte = gros bouton carré */

.somoba-access-option {
    position: relative;
    background: #f5f7fb;
    border-radius: 14px;
    padding: 14px 10px 12px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;   /* centre aussi le switch */
    justify-content: space-between;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    text-align: center;
}

.somoba-access-option:hover {
    transform: translateY(-1px);
}

/* État actif (quand checkbox cochée) */

.somoba-access-option.active {
    border-color: #226699;
    background: #e6f1ff;
}

/* Contenu (icône + label) */

.somoba-access-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.somoba-access-option .icon {
    font-size: 26px;
}

.somoba-access-option .label {
    font-size: 16px;
    font-weight: 600;
}

/* ===========================================
   Switch ON/OFF gris → vert
   =========================================== */
/* ===========================================
   Switch ON/OFF gris → vert (full !important)
   =========================================== */

.somoba-toggle {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;

    width: 46px !important;
    height: 24px !important;

    background: #cccccc !important;
    border-radius: 20px !important;

    position: relative !important;
    cursor: pointer !important;

    transition: background 0.2s ease !important;

    outline: none !important;
    border: none !important;

    display: block !important;
    margin-top: 10px !important;

    box-sizing: border-box !important;
    padding: 0!important;
}

.somoba-toggle::after {
    content: "" !important;

    position: absolute !important;
    top: 2px !important;
    left: 2px !important;

    width: 20px !important;
    height: 20px !important;

    background: #ffffff !important;
    border-radius: 50% !important;

    transition: transform 0.2s ease !important;
}

/* état ON : fond vert + bouton blanc à droite */
.somoba-toggle:checked {
    background: #2ecc71 !important;
}

.somoba-toggle:checked::after {
    transform: translateX(22px) !important;
}

/* ============================
   Modes d’accessibilité
   ============================ */

/* --- Taille du texte --- */
/* --- Taille du texte (agrandir tout sauf H1 / H2 / H3) --- */
body.somoba-big-text *:not(h1):not(h2):not(h3) {
    font-size: 105% !important;
}


/* --- Texte plus épais --- */
body.somoba-bold-text * {
    font-weight: 700 !important;
}

body.somoba-big-cursor,
body.somoba-big-cursor * {
    cursor: url("somoba-big-cursor.svg") 0 0, auto !important;
}


/* ============================
   Contraste renforcé (version ORIGINALE)
   ============================ */

body.somoba-contrast {
    --contrast-text: #000000; /* noir 100% */
    --contrast-border: #000000;
}

/* 1) Tous les textes gris → noir 100% */
body.somoba-contrast * {
    color: var(--contrast-text) !important;
    border-color: var(--contrast-border) !important;
}

/* 2) Toutes les images classiques : contraste + netteté */
body.somoba-contrast img,
body.somoba-contrast picture img,
body.somoba-contrast figure img,
body.somoba-contrast .wp-block-image img {
    filter: contrast(1.3) saturate(1.1) brightness(1.05) !important;
}
/* ===========================================
   Contraste renforcé GENERIQUE pour Elementor
   (aucune référence numérique, aucune page ID)
   =========================================== */

/* Sections Elementor */
body.somoba-contrast .elementor-section,
body.somoba-contrast .elementor-section > .elementor-motion-effects-container > .elementor-motion-effects-layer {
    filter: contrast(1.3) saturate(1.1) brightness(1.05) !important;
}

/* Colonnes Elementor */
body.somoba-contrast .elementor-column,
body.somoba-contrast .elementor-column > .elementor-motion-effects-container > .elementor-motion-effects-layer {
    filter: contrast(1.3) saturate(1.1) brightness(1.05) !important;
}

/* Widgets Elementor */
body.somoba-contrast .elementor-widget,
body.somoba-contrast .elementor-widget > .elementor-motion-effects-container > .elementor-motion-effects-layer {
    filter: contrast(1.3) saturate(1.1) brightness(1.05) !important;
}



/* 3) Les backgrounds restent comme le thème d’origine 
      → on NE change que les textes + images */
      
/* 4) Liens plus visibles, sans altérer le thème */
body.somoba-contrast a,
body.somoba-contrast a:link,
body.somoba-contrast a:visited {
    color: #1a0dab !important; /* bleu lisible contrasté */
    text-decoration: underline !important;
}

/* 5) Le panneau & bouton ne doivent pas être filtrés */
body.somoba-contrast #somoba-access-panel,
body.somoba-contrast #somoba-access-btn {
    filter: none !important;
    background-color: #ffffff !important;
    color: #000000 !important;
}

