/* DeutschLern — responsive fullstack (chargé hors Vite pour déploiement immédiat) */
[x-cloak]{display:none!important}

/* Sélecteur de langue : contraste forcé */
select.lang-select{color:#0f172a!important;background-color:#fff!important}
aside select.lang-select,
.lang-select[style*="color-scheme:dark"]{color:#f8fafc!important;background-color:#1e293b!important}
select.lang-select option{color:#0f172a!important;background-color:#fff!important}

/* Pied de sidebar sombre : jamais de texte noir */
.sidebar-user-footer,
.sidebar-user-footer *{color:inherit}
.sidebar-user-footer label,
.sidebar-user-footer label span{color:#e2e8f0!important}
.sidebar-user-footer p{color:#e2e8f0!important}
.sidebar-user-footer p+p,
.sidebar-user-footer .text-\[11px\]{color:#cbd5e1!important}
.sidebar-user-footer button[type=submit]{color:#94a3b8!important}
.sidebar-user-footer button[type=submit]:hover{color:#fff!important}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:hidden}
img,video,canvas,svg{max-width:100%;height:auto}
button,a,[type=button],[type=submit]{touch-action:manipulation}

.safe-pb{padding-bottom:max(1rem,env(safe-area-inset-bottom,0px))}
.safe-pt{padding-top:env(safe-area-inset-top,0px)}
.touch-target{min-height:44px;min-width:44px}

.table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  margin-left:-.75rem;
  margin-right:-.75rem;
  padding-left:.75rem;
  padding-right:.75rem;
}
@media (min-width:640px){
  .table-scroll{margin-left:0;margin-right:0;padding-left:0;padding-right:0}
}
.table-scroll table{min-width:640px;width:100%}

.tabs-scroll{
  display:flex;
  flex-wrap:nowrap;
  gap:.25rem;
  overflow-x:auto;
  padding:.25rem;
  background:#f1f5f9;
  border-radius:1rem;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
}
.tabs-scroll>*{flex-shrink:0;min-height:44px}

.lesson-prose{overflow-x:auto;-webkit-overflow-scrolling:touch;overflow-wrap:anywhere;word-wrap:break-word}
.lesson-prose img,.lesson-prose video,.lesson-prose iframe{max-width:100%;height:auto}
.lesson-prose table{
  display:block;width:100%;max-width:100%;overflow-x:auto;
  -webkit-overflow-scrolling:touch;border-collapse:collapse
}
.lesson-prose table th,.lesson-prose table td{
  white-space:nowrap;padding:.5rem .75rem;border:1px solid #e2e8f0;font-size:.875rem
}

.prose{max-width:none;color:#334155;line-height:1.7}
.prose :where(p,ul,ol,table,pre,blockquote){margin:.75em 0}
.prose :where(h2,h3,h4){color:#0f172a;font-weight:700;margin:1.25em 0 .5em;line-height:1.3}
.prose :where(h2){font-size:1.25rem}
.prose :where(h3){font-size:1.1rem}
.prose :where(ul){list-style:disc;padding-inline-start:1.25rem}
.prose :where(ol){list-style:decimal;padding-inline-start:1.25rem}
.prose :where(strong){font-weight:700;color:#0f172a}
.prose :where(a){color:#4f46e5;text-decoration:underline}
.prose-sm{font-size:.875rem;line-height:1.65}

.speak-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:2.5rem;min-height:2.5rem;width:2.5rem;height:2.5rem;
  margin-inline-start:.35rem;border-radius:9999px;
  border:1px solid #c7d2fe;background:#eef2ff;color:#4338ca;
  font-size:.75rem;vertical-align:middle;cursor:pointer;line-height:1;
  touch-action:manipulation
}
.speak-btn:hover,.speak-btn:focus-visible{background:#4f46e5;color:#fff;border-color:#4f46e5;outline:none}

.ad-unit,.ad-custom{max-width:100%;overflow-x:auto}
.pagination-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* Cartes utilisateurs mobile */
@media (max-width:767px){
  .users-table-desktop{display:none!important}
  .users-cards-mobile{display:block!important}
}
@media (min-width:768px){
  .users-table-desktop{display:block}
  .users-cards-mobile{display:none!important}
}
