/* Bulles de Savoir - Ressources : articles « Questions fréquentes » et « Le lexique de l'EBH » */
.bds-ressource{padding:48px 24px 72px!important}
.bds-ressource > .e-con-inner{max-width:880px!important}

/* ===== Questions fréquentes : titres de parties et accordéons ===== */
.bds-faq-partie .elementor-heading-title{font:700 1.4rem/1.3 'Playfair Display',serif;color:#1a2f70;margin:36px 0 14px}
.bds-faq-partie:first-child .elementor-heading-title{margin-top:0}
.bds-faq .elementor-accordion-item{border:2px solid #ccede1!important;border-radius:18px;margin-bottom:10px;overflow:hidden;background:#fff}
.bds-faq .elementor-accordion-item + .elementor-accordion-item{border-top:2px solid #ccede1!important}
.bds-faq .elementor-tab-title{display:flex!important;align-items:center;gap:14px;padding:16px 20px!important;border:0!important;background:#fff}
.bds-faq .elementor-tab-title.elementor-active{background:#f7fbf9}
.bds-faq .elementor-tab-title a,.bds-faq .elementor-accordion-title{font:800 1rem/1.4 'Nunito',sans-serif!important;color:#1a2f70!important;text-decoration:none!important}
/* Le + / − aligné au milieu de la question (Elementor le fait flotter en haut à gauche) */
.bds-faq .elementor-accordion-icon{float:none!important;flex:0 0 14px;width:14px!important;display:flex!important;align-items:center;justify-content:center;margin:0!important;color:#8ccaae!important;font-size:14px!important;line-height:1!important}
.bds-faq .elementor-accordion-icon > span{display:none;line-height:1}
.bds-faq .elementor-tab-title:not(.elementor-active) .elementor-accordion-icon-closed,.bds-faq .elementor-tab-title.elementor-active .elementor-accordion-icon-opened{display:flex!important}
.bds-faq .elementor-accordion-icon svg{fill:#8ccaae!important;width:14px;height:14px}
.bds-faq .elementor-tab-content{padding:4px 20px 18px!important;border:0!important;font:400 .98rem/1.7 'Nunito',sans-serif;color:#484545;background:#f7fbf9}
.bds-faq .elementor-tab-content p{margin:0 0 10px}
.bds-faq .elementor-tab-content a{color:#1a2f70;font-weight:700;text-decoration:underline;text-underline-offset:3px}

/* ===== Lexique interactif ===== */
/* Couleurs des thèmes : bordure (--t), fond pâle (--tc), texte foncé lisible (--tt) */
.bds-lx{--t1:#8ccaae;--t1c:#e6f5ee;--t1t:#2f7a5c;--t2:#d7947f;--t2c:#fbece6;--t2t:#96492f;--t3:#7fa8d8;--t3c:#e8f0fa;--t3t:#3d6aa3;
  --t4:#e3b04f;--t4c:#fbf3e1;--t4t:#8a6110;--t5:#a58fd6;--t5c:#f1ecfa;--t5t:#6a51a8;--t6:#5fb3a8;--t6c:#e4f4f1;--t6t:#226b62}
.bds-lx button{font-family:'Nunito',sans-serif;cursor:pointer;transition:background .2s,color .2s,border-color .2s,transform .15s}

/* Recherche et mot au hasard */
.bds-lx-outils{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:22px}
.bds-lx-recherche{flex:1 1 260px;border:2px solid #ccede1!important;border-radius:50px!important;background:#f7fbf9!important;padding:12px 20px!important;font:400 .95rem 'Nunito',sans-serif!important;color:#1a2f70!important}
.bds-lx-recherche:focus{border-color:#8ccaae!important;outline:none}
.bds-lx-hasard{border:0;border-radius:50px;background:#1a2f70;color:#fff;font-weight:800;font-size:.92rem;padding:12px 24px}
.bds-lx-hasard:hover{background:#0f1e4a;transform:translateY(-1px)}

/* Thèmes : tuiles colorées avec le nombre de mots */
.bds-lx-themes{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;margin-bottom:18px}
/* Tablette : « Tous les mots » sur toute la largeur, puis les 6 thèmes en 3 colonnes */
@media (max-width:1024px){ .bds-lx-themes{grid-template-columns:repeat(3,1fr)} .bds-lx-themes .bds-lx-puce:first-child{grid-column:1 / -1;min-height:48px} }
.bds-lx-puce{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:68px;padding:10px 8px;border:2px solid transparent;border-radius:18px;background:var(--pc,#f7fbf9);text-align:center}
.bds-lx-puce-nom{font:800 .82rem/1.25 'Nunito',sans-serif;color:var(--pt,#1a2f70)}
.bds-lx-puce-nb{font:700 .72rem 'Nunito',sans-serif;color:var(--pt,#56685f)}
.bds-lx-puce:hover{border-color:var(--pb,#ccede1);transform:translateY(-2px)}
.bds-lx-puce.actif{background:var(--pb,#1a2f70);border-color:var(--pb,#1a2f70)}
.bds-lx-puce.actif .bds-lx-puce-nom,.bds-lx-puce.actif .bds-lx-puce-nb{color:#fff;opacity:1}
.bds-lx-puce:not([class*=" t"]){--pb:#1a2f70;--pt:#1a2f70}
.bds-lx-puce.t1{--pb:var(--t1);--pc:var(--t1c);--pt:var(--t1t)}.bds-lx-puce.t2{--pb:var(--t2);--pc:var(--t2c);--pt:var(--t2t)}.bds-lx-puce.t3{--pb:var(--t3);--pc:var(--t3c);--pt:var(--t3t)}
.bds-lx-puce.t4{--pb:var(--t4);--pc:var(--t4c);--pt:var(--t4t)}.bds-lx-puce.t5{--pb:var(--t5);--pc:var(--t5c);--pt:var(--t5t)}.bds-lx-puce.t6{--pb:var(--t6);--pc:var(--t6c);--pt:var(--t6t)}

/* Alphabet sur une seule ligne */
.bds-lx-lettres{display:flex;flex-wrap:nowrap;justify-content:space-between;gap:2px;margin-bottom:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.bds-lx-lettres::-webkit-scrollbar{display:none}
.bds-lx-lettre{flex:0 0 28px;width:28px;height:28px;border:0;border-radius:50%;background:transparent;color:#1a2f70;font-weight:800;font-size:.8rem;padding:0}
.bds-lx-lettre:hover:not(:disabled),.bds-lx-lettre.actif{background:#8ccaae;color:#fff}
.bds-lx-lettre:disabled{color:#cfd8d4;cursor:default}
.bds-lx-compte{font:700 .85rem 'Nunito',sans-serif;color:#56685f;margin:4px 0 18px;text-align:center}

/* Cartes à retourner */
.bds-lx-grille{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}
.bds-lx-carte{perspective:1100px;height:240px;cursor:pointer;outline:none;transition:transform .2s}
.bds-lx-carte[hidden]{display:none}
.bds-lx-carte:hover{transform:translateY(-4px)}
.bds-lx-interieur{position:relative;width:100%;height:100%;transition:transform .6s cubic-bezier(.4,.2,.2,1);transform-style:preserve-3d}
.bds-lx-carte.retournee .bds-lx-interieur{transform:rotateY(180deg)}
.bds-lx-recto,.bds-lx-verso{position:absolute;inset:0;border-radius:24px;display:flex;flex-direction:column;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden}
.bds-lx-carte.t1{--tb:var(--t1);--tc:var(--t1c);--tt:var(--t1t)}.bds-lx-carte.t2{--tb:var(--t2);--tc:var(--t2c);--tt:var(--t2t)}.bds-lx-carte.t3{--tb:var(--t3);--tc:var(--t3c);--tt:var(--t3t)}
.bds-lx-carte.t4{--tb:var(--t4);--tc:var(--t4c);--tt:var(--t4t)}.bds-lx-carte.t5{--tb:var(--t5);--tc:var(--t5c);--tt:var(--t5t)}.bds-lx-carte.t6{--tb:var(--t6);--tc:var(--t6c);--tt:var(--t6t)}
/* Recto : le mot au centre, bulles décoratives aux couleurs du thème */
.bds-lx-recto{align-items:center;justify-content:center;text-align:center;padding:22px 20px;background:var(--tc);border:2px solid var(--tb)}
.bds-lx-recto::before,.bds-lx-recto::after{content:'';position:absolute;border-radius:50%;background:var(--tb);pointer-events:none}
.bds-lx-recto::before{width:120px;height:120px;right:-40px;top:-46px;opacity:.28}
.bds-lx-recto::after{width:54px;height:54px;left:-16px;bottom:-18px;opacity:.22}
.bds-lx-recto .bds-lx-theme{position:absolute;top:18px;left:0;right:0;font:800 .68rem 'Nunito',sans-serif;letter-spacing:.12em;text-transform:uppercase;color:var(--tt)}
.bds-lx-recto .bds-lx-mot{position:relative;font:700 1.35rem/1.25 'Playfair Display',serif;color:#1a2f70;padding:0 6px}
.bds-lx-indice{position:absolute;bottom:16px;left:0;right:0;font:700 .74rem 'Nunito',sans-serif;color:var(--tt);opacity:.8}
/* Verso : la définition */
.bds-lx-verso{transform:rotateY(180deg);background:#fff;border:2px solid var(--tb);padding:18px 20px;gap:8px;overflow:auto}
.bds-lx-verso .bds-lx-theme{font:800 .66rem 'Nunito',sans-serif;letter-spacing:.12em;text-transform:uppercase;color:var(--tt)}
.bds-lx-verso .bds-lx-mot{font:700 1.05rem/1.25 'Playfair Display',serif;color:#1a2f70;padding-bottom:8px;border-bottom:2px solid var(--tc)}
.bds-lx-def{font:400 .88rem/1.55 'Nunito',sans-serif;color:#484545}
.bds-lx-lien{align-self:flex-start;margin-top:auto;padding:6px 14px;border-radius:50px;background:var(--tc);font:800 .78rem 'Nunito',sans-serif;color:var(--tt)!important;text-decoration:none!important}
.bds-lx-lien:hover{background:var(--tb);color:#fff!important}
.bds-lx-carte:focus-visible .bds-lx-recto,.bds-lx-carte:focus-visible .bds-lx-verso{border-color:#1a2f70}
.bds-lx-carte.choisie .bds-lx-verso{border-color:#1a2f70}

/* Pictos (ceux des fiches du programme) */
.bds-lx-picto{display:block;object-fit:contain;flex:none}
.bds-lx-puce .bds-lx-picto{width:30px;height:30px;margin-bottom:4px}
.bds-lx-puce.actif .bds-lx-picto{filter:brightness(0) invert(1)}
/* Le rond blanc est dessiné derrière le picto (sans découper l'image), pour que rien ne soit rogné */
.bds-lx-recto .bds-lx-picto{position:relative;width:76px;height:76px;margin:6px 0 10px;padding:13px;background:radial-gradient(circle closest-side,#fff 98%,transparent 100%);border-radius:0}
.bds-lx-recto .bds-lx-mot{font-size:1.2rem}

@media (max-width:767px){
  .bds-ressource{padding:32px 16px 48px!important}
  .bds-lx-themes{grid-template-columns:repeat(2,1fr)}
  .bds-lx-themes .bds-lx-puce:first-child{grid-column:1 / -1;min-height:48px}
  .bds-lx-lettres{justify-content:flex-start}
  .bds-lx-grille{grid-template-columns:1fr 1fr;gap:10px}
  .bds-lx-carte{height:250px}
  .bds-lx-recto{padding:18px 12px}
  .bds-lx-recto .bds-lx-mot{font-size:1.02rem}
  .bds-lx-recto .bds-lx-picto{width:60px;height:60px;padding:10px;margin:8px 0 6px}
  .bds-lx-verso{padding:14px}
  .bds-lx-def{font-size:.8rem}
}
@media (max-width:420px){ .bds-lx-grille{grid-template-columns:1fr} .bds-lx-carte{height:220px} }
@media (prefers-reduced-motion:reduce){ .bds-lx-interieur,.bds-lx-carte{transition:none} }

/* FAQ : un picto des fiches devant chaque partie (1 = le programme, 2 = mon compte, 3 = la maladie et les soins) */
.bds-faq-partie .elementor-heading-title{display:flex;align-items:center;gap:14px}
.bds-faq-partie .elementor-heading-title::before{content:'';flex:0 0 48px;height:48px;border-radius:50%;background:#e6f5ee center/30px no-repeat}
.bds-ressource .e-con-inner > .bds-faq-partie:nth-child(1) .elementor-heading-title::before{background-image:url(../pictos/loupe.png)}
.bds-ressource .e-con-inner > .bds-faq-partie:nth-child(3) .elementor-heading-title::before{background-image:url(../pictos/case-cochee.png);background-color:#fbece6}
.bds-ressource .e-con-inner > .bds-faq-partie:nth-child(5) .elementor-heading-title::before{background-image:url(../pictos/stethoscope.png);background-color:#e8f0fa}
/* Cartes : la hauteur s'adapte à la définition la plus longue (plus de barre de défilement au verso) */
.bds-lx-carte{height:auto!important;min-height:240px;display:grid}
.bds-lx-carte[hidden]{display:none}
.bds-lx-interieur{display:grid;height:auto}
.bds-lx-recto,.bds-lx-verso{position:relative;inset:auto;grid-area:1/1}
.bds-lx-verso{overflow:visible}
.bds-lx-verso .bds-lx-lien{margin-top:auto}
@media (max-width:420px){ .bds-lx-carte{min-height:220px} }
.bds-lx-verso .bds-lx-lien{align-self:center}
@media (max-width:1024px){ .bds-lx-lettres{flex-wrap:wrap!important;justify-content:center;overflow:visible!important;row-gap:4px} }
/* Accessibilité : un vrai bouton (invisible) retourne la carte ; le lien « Voir le module » reste cliquable */
.bds-lx-bouton{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;background:transparent;opacity:0;pointer-events:none}
.bds-lx-carte:focus-within{outline:3px solid #1a2f70;outline-offset:3px;border-radius:26px}

/* Lexique : sources, en bas de page, en petit et centré */
.bds-lexique-sources{margin-top:36px}
.bds-lexique-sources p{margin:0;text-align:center;font:400 .8rem/1.6 'Nunito',sans-serif;color:#56685f}
.bds-lexique-sources a{color:#1a2f70;font-weight:700;text-decoration:underline;text-underline-offset:3px}
