/* Espace élèves Skolar Alpha */
:root {
  --e-bg: #f3f6fa;
  --e-surface: #fff;
  --e-border: #dbe3ee;
  --e-text: #10233f;
  --e-muted: #5b6b82;
  --e-brand: #005a9c;
  --e-brand-dark: #004080;
  --e-ok: #0d8a5b;
  --e-radius: 14px;
  --e-font: "Manrope", system-ui, sans-serif;
  --e-display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--e-font);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d7e8f7 0%, transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, var(--e-bg) 40%);
  color: var(--e-text);
  line-height: 1.5;
}

a { color: var(--e-brand); }
.espace-shell { max-width: 960px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.espace-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem;
}
.espace-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; }
.espace-brand img { width: 42px; height: 42px; border-radius: 10px; }
.espace-brand strong { display: block; font-family: var(--e-display); font-size: 1.2rem; }
.espace-brand span { color: var(--e-muted); font-size: 0.85rem; }

.espace-card {
  background: var(--e-surface);
  border: 1px solid var(--e-border);
  border-radius: var(--e-radius);
  padding: 1.35rem 1.4rem;
  box-shadow: 0 10px 30px rgb(16 35 63 / 0.06);
}
.espace-card h1, .espace-card h2 {
  font-family: var(--e-display);
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
}
.espace-lead { color: var(--e-muted); margin: 0 0 1.25rem; }

.form-group { margin-bottom: 0.9rem; }
.form-group label { display: block; font-weight: 650; font-size: 0.9rem; margin-bottom: 0.35rem; }
.input, .select {
  width: 100%;
  border: 1px solid var(--e-border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: #fff;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: none; border-radius: 10px; padding: 0.75rem 1.1rem;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--e-brand); color: #fff; }
.btn-primary:hover { background: var(--e-brand-dark); }
.btn-secondary { background: #eef3f8; color: var(--e-text); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1rem; }
.auth-switch { margin-top: 1rem; color: var(--e-muted); font-size: 0.92rem; }
.error-box {
  display: none; margin-bottom: 0.85rem; padding: 0.75rem 0.9rem;
  border-radius: 10px; background: #fdecea; color: #9b1c1c; font-size: 0.92rem;
}
.error-box.is-visible { display: block; }
.oauth-row { display: grid; gap: 0.55rem; margin: 1rem 0; }
.oauth-row .btn { width: 100%; }
.divider {
  display: flex; align-items: center; gap: 0.75rem; color: var(--e-muted);
  font-size: 0.85rem; margin: 1rem 0;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--e-border);
}

.alert-wait {
  background: #fff8e8; border: 1px solid #f0d9a0; color: #6a4b00;
  border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.child-select { margin-bottom: 1rem; max-width: 320px; }
.folder-grid, .doc-grid { display: grid; gap: 0.65rem; }
.folder-card, .doc-card {
  border: 1px solid var(--e-border); border-radius: 12px; padding: 0.9rem 1rem;
  background: #fbfcfe; display: flex; justify-content: space-between; gap: 0.75rem; align-items: center;
}
.folder-card button, .doc-card .btn { flex-shrink: 0; }
.meta { color: var(--e-muted); font-size: 0.85rem; }
.empty { color: var(--e-muted); padding: 1rem 0; }

@media (min-width: 720px) {
  .auth-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.25rem; align-items: start; }
  .doc-grid { grid-template-columns: 1fr 1fr; }
}
