/* Ludicademia — espaces enseignant et administrateur : style simple et neutre, pour ordinateur. */
:root { --bleu: #1F2A44; --or: #C8901A; --fond: #F4F5F8; --ligne: #D9DCE3; --texte: #1B2333; --rouge: #A3271B; --vert: #23703A; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--texte); background: var(--fond); line-height: 1.45; }
header.barre { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; background: var(--bleu); color: #fff; }
header.barre h1 { font-size: 1.2rem; margin: 0; }
header.barre h1 span { color: #F2C14E; font-weight: normal; }
header.barre nav { display: flex; gap: 8px; flex-wrap: wrap; }
header.barre button { background: transparent; color: #fff; border: 1px solid #ffffff55; }
header.barre button.actif { background: #ffffff22; border-color: #fff; }
main { max-width: 1100px; margin: 0 auto; padding: 20px; }
.panneau { background: #fff; border: 1px solid var(--ligne); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.connexion { max-width: 420px; margin: 40px auto; }
h2 { margin: 0 0 12px; font-size: 1.35rem; }
h3 { margin: 24px 0 8px; font-size: 1.05rem; }
label { display: block; margin: 10px 0 4px; font-weight: 600; }
input, select, textarea, button { font: inherit; }
input[type=text], input[type=password], input[type=number], input:not([type]), select, textarea { padding: 8px 10px; border: 1px solid #B9BECA; border-radius: 6px; background: #fff; }
.connexion input { width: 100%; }
textarea { width: 100%; resize: vertical; }
button { padding: 8px 14px; border-radius: 6px; border: 1px solid #9AA1B1; background: #fff; cursor: pointer; }
button[type=submit], button.principal { background: var(--bleu); color: #fff; border-color: var(--bleu); }
button.danger { color: var(--rouge); border-color: #E2B3AD; }
button:disabled { opacity: .5; cursor: wait; }
.ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.ligne input:not([type=checkbox]) { flex: 1; min-width: 200px; }
.bloc { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--ligne); }
.tableau { width: 100%; border-collapse: collapse; margin: 10px 0; }
.tableau th, .tableau td { text-align: left; padding: 8px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.tableau th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: #59607A; }
.tableau tr.inactif td, .tableau tr.archivee td { color: #8A8F99; }
.actions { display: flex; flex-wrap: wrap; gap: 4px; }
.actions button { padding: 4px 8px; font-size: .85rem; }
.case { display: inline-flex; align-items: center; gap: 2px; margin: 0 10px 0 0; font-weight: normal; }
.mondes-cases { display: inline-flex; flex-wrap: wrap; gap: 2px 6px; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #E7E9EF; color: #3D4560; font-size: .8rem; font-weight: normal; }
.flash { padding: 10px 12px; border-radius: 6px; margin: 8px 0; }
.flash.ok { background: #E3F2E7; color: var(--vert); }
.flash.erreur { background: #FBE3DF; color: var(--rouge); }
.vide { color: #6B7285; font-style: italic; }
.retour { margin-bottom: 12px; }
.secret { padding: 14px; border: 2px dashed var(--or); border-radius: 8px; background: #FFF8E6; margin: 12px 0; }
.secret code, .nouveaux code { font-size: 1.15rem; font-weight: bold; }
.nouveaux { padding: 12px; border: 1px solid var(--ligne); border-radius: 8px; background: #FAFBFD; margin: 8px 0; }
.avertissement { padding: 12px; border-radius: 8px; background: #FFF1D6; border: 1px solid #F0C36D; }
.petit { font-size: .85rem; color: #59607A; }
.filtres select { max-width: 100%; }
.tableau.mots td:first-child { width: 1%; white-space: nowrap; }
.alerte { color: var(--rouge); }
.groupe td { background: #EEF0F5; font-weight: 700; }
.editeur label { margin-top: 12px; }
.editeur .grille2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.editeur label > input:not([type=checkbox]), .editeur label > select { display: block; width: 100%; margin-top: 4px; }
.editeur textarea { font-family: "Consolas", "Courier New", monospace; font-size: .95rem; min-height: 280px; }
.editeur .options label { display: flex; gap: 8px; align-items: center; font-weight: normal; }
#impression { display: none; }
[hidden] { display: none !important; }

/* Impression : seulement les cartes de codes (ou la fiche d'accès) */
@media print {
  body > *:not(#impression) { display: none !important; }
  #impression { display: block !important; }
  .imp-titre { font-size: 14pt; margin: 0 0 8mm; }
  .cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .carte-code { border: 1px dashed #555; border-radius: 3mm; padding: 5mm; text-align: center; break-inside: avoid; }
  .cc-marque { font-size: 9pt; color: #555; }
  .cc-prenom { font-size: 16pt; font-weight: bold; margin: 2mm 0; }
  .cc-code { font-size: 18pt; font-family: "Courier New", monospace; letter-spacing: .05em; }
  .cc-aide { font-size: 8pt; color: #555; margin-top: 2mm; }
  .fiche-acces { font-size: 12pt; line-height: 1.6; }
}
