/* Reset simple */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #f0f7ff, #fdfdfd);
  color: #0f172a;
}

/* Bandeau haut */
.topbar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leaf {
  font-size: 28px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.tagline {
  font-size: 13px;
  color: #64748b;
}

/* Contenu général */
.wrap {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 16px 40px;
}

/* Carte principale */
.card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}

.card.big {
  max-width: 520px;
  margin: 0 auto 24px;
}

/* Titres / textes */
h1, h2, h3 {
  margin: 0 0 10px;
}

p {
  margin: 0 0 8px;
}

.muted {
  font-size: 13px;
  color: #6b7280;
}

/* Labels / inputs */
label {
  display: block;
  font-size: 13px;
  margin: 10px 0 4px;
  color: #0f172a;
}

input, select, textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  background: #f8fafc;
  font-size: 14px;
  color: #0f172a;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}

/* Boutons */
button {
  margin-top: 12px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

button.secondary {
  background: #e0f2fe;
  color: #0369a1;
}

button.ghost {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Statuts */
.status {
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
}

.status.ok {
  color: #16a34a;
}

.status.err {
  color: #dc2626;
}

/* Grille dashboard enfant */
.hidden { display: none; }

.grid {
  display: grid;
  grid-template-columns: 2fr 2fr 1.6fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .card.big { max-width: 100%; }
}

/* Liste & items */
.list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item {
  padding: 8px 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.title {
  font-weight: 600;
  font-size: 14px;
}

.meta {
  font-size: 12px;
  color: #6b7280;
}

/* Dash enfant */
.dash {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.dashCard {
  flex: 1;
  background: #eff6ff;
  border-radius: 16px;
  padding: 8px 10px;
}

.dashCard .label {
  font-size: 11px;
  color: #64748b;
}

.dashCard .value {
  font-size: 18px;
  font-weight: 700;
}

/* Badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
}

.badge {
  background: #dcfce7;
  color: #166534;
  border-radius: 999px;
  padding: 3px 7px;
}

/* Dropzone & preview */
.dropzone {
  margin-top: 8px;
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  position: relative;
  background: #f8fafc;
}

.dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dz-title {
  font-size: 14px;
  font-weight: 600;
}

.dz-sub {
  font-size: 12px;
  color: #6b7280;
}

.preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.preview img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
}

/* Fiche & quiz */
.sheet {
  white-space: pre-wrap;
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #e2e8f0;
}

.q {
  margin-top: 8px;
  font-size: 14px;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.choice {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  background: #ffffff;
}

.choice.selected {
  background: #e0f2fe;
  border-color: #3b82f6;
  color: #1d4ed8;
}

/* Deux colonnes login enfant / parent sur grand écran */
.login-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr;
  gap: 20px;
  margin-top: 14px;
}

@media (max-width: 800px) {
  .login-grid { grid-template-columns: 1fr; }
}


.quiz-review{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.quiz-detail{
  padding:8px 10px;
  border-radius:8px;
  background:#f8fafc;
  font-size:0.9rem;
}
.quiz-detail.ok{
  border:1px solid #22c55e55;
}
.quiz-detail.ko{
  border:1px solid #ef444455;
  background:#fef2f2;
}
.quiz-detail .meta{
  margin-top:4px;
  color:#475569;
}
