/* DAVBOT — icônes : un seul style (Font Awesome « solid », trait et proportions identiques partout)
   et une seule couleur : celle choisie par l'utilisateur dans Paramètres.
   --dav-accent est mis à jour instantanément par davbot-boot.js / davbot-global.js : toutes les icônes de la page suivent. */
:root { --dav-icon: var(--dav-accent, #2d88ff); }

/* Couleur : toutes les icônes (y compris celles qui avaient une couleur fixe dans leur page).
   « :not(#davIcon) » donne à ces règles la priorité sur tous les styles de page, sans toucher à leur design. */
html body i[class*="fa-"]:not(#davIcon),
html body span.fa-solid:not(#davIcon), html body span.fa-brands:not(#davIcon), html body span.fa-regular:not(#davIcon),
html body .fa-solid:not(#davIcon), html body .fa-brands:not(#davIcon), html body .fa-regular:not(#davIcon),
html body .fas:not(#davIcon), html body .fab:not(#davIcon), html body .far:not(#davIcon) {
  color: var(--dav-icon) !important;
  -webkit-text-fill-color: currentColor !important;
  background-image: none !important;
  filter: none !important;
}

/* Style unique : même graisse « solid » pour toutes les icônes (aucun mélange contour / plein) */
.fa-regular, .far { font-weight: 900 !important; }
i[class*="fa-"].fa-solid, i[class*="fa-"].fa-regular, i.fa-solid, i.fa-regular { font-style: normal; }
i.dav-ico { vertical-align: -0.1em; }

/* Icône posée sur un fond de la couleur du thème (bouton plein) : teinte contrastée choisie automatiquement */
html body i[data-on-accent="dark"]:not(#davIcon), html body span[data-on-accent="dark"]:not(#davIcon) { color: #fff !important; }
html body i[data-on-accent="light"]:not(#davIcon), html body span[data-on-accent="light"]:not(#davIcon) { color: #0b1220 !important; }

/* États « aimé / pas aimé » : l'icône reste du même style, seul le niveau d'opacité change */
.pf-btn:not(.on) i.fa-thumbs-up,
[data-like]:not(.liked):not(.on) i.fa-heart { opacity: .55; }

/* Icônes automatiques des menus / onglets / boutons (davbot-icons.js) */
i.dav-mi { margin-inline-end: .5em; width: 1.15em; text-align: center; flex: none; }
i.dav-mi[data-col] { display: block; margin: 0 auto .3em; width: auto; }

/* Chargement instantané : squelette animé à la place de « Chargement… » (davbot-fast.js).
   Le texte reste dans la page mais invisible ; le squelette disparaît dès que le vrai contenu arrive. */
@keyframes davSkel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
:root { --dav-sk1: rgba(255,255,255,.06); --dav-sk2: rgba(255,255,255,.15); }
html.dav-light { --dav-sk1: rgba(0,0,0,.06); --dav-sk2: rgba(0,0,0,.13); }
html body [data-skel] {
  position: relative !important; overflow: hidden !important; min-height: 56px;
  color: transparent !important; -webkit-text-fill-color: transparent !important; text-shadow: none !important;
  pointer-events: none; user-select: none;
}
html body [data-skel] > * { visibility: hidden !important; }
html body [data-skel]::after {
  content: ""; position: absolute; inset: 8px 0; border-radius: 12px;
  background: linear-gradient(90deg, var(--dav-sk1) 25%, var(--dav-sk2) 50%, var(--dav-sk1) 75%);
  background-size: 200% 100%; animation: davSkel 1.1s linear infinite;
}
html body :is(b, span, small, strong, em, h1, h2, h3, h4)[data-skel] { display: inline-block; min-height: 1.15em; min-width: 8em; }
html body :is(b, span, small, strong, em, h1, h2, h3, h4)[data-skel]::after { inset: .08em 0; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html body [data-skel]::after { animation: none; } }
