/* Déblocage rapide (panneau ouvert depuis « 🌈 Pas compris » dans le lecteur).
   Couleurs fixes, texte sombre sur fond clair : lisible quel que soit le thème. */
.ub-sheet { position: fixed; z-index: 60; right: 1rem; bottom: 1rem; width: min(25rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto;
  background: #fffdf8; color: #1d2433; border: 2px solid #1d2433; border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
  padding: .8rem .9rem 1rem; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.4;
  animation: ub-in .22s ease-out; }
@keyframes ub-in { from { transform: translateY(18px); opacity: 0; } }
.ub-sheet * { color: inherit; font-family: inherit; }
.ub-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: 1.05rem; }
.ub-x { background: none !important; border: 0 !important; font-size: 1.7rem; line-height: 1; padding: 0 .3rem; cursor: pointer; color: #1d2433 !important; min-width: 44px; min-height: 44px; }
.ub-quote { margin: .4rem 0 .7rem; padding: .45rem .7rem; border-left: 5px solid #e879f9; background: #fdf4ff; border-radius: 8px; font-size: .92rem; color: #3b2a45; }
.ub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ub-tile { display: flex; align-items: center; gap: .5rem; text-align: left; padding: .5rem; min-height: 64px; border-radius: 12px; cursor: pointer;
  background: #ffffff !important; color: #1d2433 !important; border: 2px solid #d9d5c9 !important; box-shadow: none !important; font: inherit; }
.ub-tile:hover, .ub-tile:focus-visible { border-color: #1f5f8b !important; background: #f2f8fc !important; }
.ub-tile img { width: 44px; height: 44px; object-fit: contain; flex: none; padding: 5px; border-radius: 12px; background: #1f5f8b; } /* icônes blanches : pastille de couleur */
.ub-tile[data-ub="reformuler"] img { background: linear-gradient(135deg, #c026d3, #7c3aed); }
.ub-tile[data-ub="source"] img { background: #0e7490; }
.ub-tile[data-ub="sens"] img { background: #c2410c; }
.ub-tile[data-ub="visuel"] img { background: #15803d; }
.ub-tile span { display: flex; flex-direction: column; min-width: 0; }
.ub-tile strong { font-size: .95rem; line-height: 1.2; }
.ub-tile small { font-size: .78rem; color: #4a5365; line-height: 1.2; }
.ub-tile[data-ub="reformuler"] { border-color: #e879f9 !important; background: #fdf4ff !important; }
.ub-sub { margin-top: .6rem; display: flex; flex-direction: column; gap: .45rem; }
.ub-sub[hidden] { display: none; }
.ub-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.ub-sheet .btn { background: #ffffff !important; color: #1d2433 !important; border: 1.5px solid #9aa3b2 !important; border-radius: 10px; padding: .45rem .7rem; font-size: .9rem; min-height: 40px; }
.ub-status { margin: .5rem 0 0; font-size: .85rem; color: #4a5365; }
.ub-status:empty { display: none; }
.ub-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.ub-foot a, .ub-foot .link { color: #1f5f8b !important; text-decoration: underline; background: none !important; border: 0 !important; padding: 0; cursor: pointer; font-size: .88rem; }
.uh-pop .uh-unblock { white-space: nowrap; font-weight: 800; }
@media (max-width: 640px) {
  .ub-sheet { left: 0; right: 0; bottom: 0; width: 100%; border-radius: 18px 18px 0 0; border-width: 2px 0 0; max-height: 78vh; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .ub-tile { min-height: 72px; }
}
@media (prefers-reduced-motion: reduce) { .ub-sheet { animation: none; } }
