/* Socle de lisibilite pour les pages publiques et l'espace parent. */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-size: 1rem;
  line-height: 1.4;
}

button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #22d3ee !important;
  outline-offset: 3px !important;
}

/* Accueil : aucune information utile sous 14 px. */
.role-desc,
.login-form label,
.reglages-sous,
.reglages .section-title,
.btn-open-themes-sous,
.demo-chip-wrap .demo-label,
.marketing-panel .marketing-sous,
.marketing-feature .txt span,
.gami-caption,
.gami-xp-txt,
.gami-chip,
.prof-stat span,
.live-stats-badge {
  font-size: 0.875rem !important;
  line-height: 1.45 !important;
}

.demo-chip,
.marketing-feature .txt strong,
.gami-level-badge {
  font-size: 0.9375rem !important;
  line-height: 1.4 !important;
}

/* Les panneaux latéraux sont décoratifs et compacts : on récupère l'espace
   vertical par les marges, jamais en réduisant la taille du texte. */
.marketing-panel {
  padding: 20px 22px !important;
  max-height: calc(100vh - 280px) !important;
  scrollbar-width: none !important;
}
.marketing-panel::-webkit-scrollbar { width: 0; height: 0; }
.marketing-panel .marketing-sous { margin-bottom: 12px !important; }
.marketing-feature { margin-bottom: 10px !important; }
.gami-preview { margin-bottom: 11px !important; padding-bottom: 9px !important; }
.gami-caption { margin-bottom: 6px !important; }

/* Les anneaux animes des cartes de profil restent strictement decoratifs.
   Le texte conserve ainsi un contraste stable pendant toute l'animation. */
.role-card::before,
.role-card::after {
  z-index: 0;
  pointer-events: none;
}

.role-card > .role-icon,
.role-card > .role-name,
.role-card > .role-desc {
  position: relative;
  z-index: 2;
}

/* Espace parent : les anciens libelles compacts restent confortables. */
.sub,
label,
.eleve-classe,
.resume-chiffre .lab,
.comp-row,
.badge,
.corr-titre,
.corr-date,
.corr-comment,
.empty,
.jalon,
.meta-row,
.mention,
.notice,
.echeance-row,
.indic-gami-card .lab,
.indic-stat-card .stitle,
.indic-stat-card .sub,
.indic-chart-title,
.indic-evol-stats .l,
.alert-banner,
.info-tip::after,
.lsu-legende,
.niveau-badge,
.snt-theme-head,
.snt-theme-row,
.snt-theme-val,
.snt-theme-score {
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
}

@media (max-width: 640px) {
  .live-stats-badge {
    font-size: 0.8125rem !important;
  }
}
