/* Styles partagés — cours Sciences/SVT (6e, 5e, 4e, 3e) */
:root {
  --ink:        #1c1b2e;
  --ink-2:      #3a3856;
  --ink-3:      #6b6896;
  --paper:      #f7f6f2;
  --paper-2:    #eeecea;
  --paper-3:    #e3e0d8;
  --white:      #ffffff;
  --accent:     #1b6e5c;
  --accent-2:   #2f9c82;
  --accent-3:   #6fd9bd;
  --accent-bg:  #dbf5ec;
  --font-d:     'Georgia', 'Times New Roman', serif;
  --font-b:     'Segoe UI', system-ui, -apple-system, sans-serif;
  --r2:         10px;
  --sh:         0 1px 4px rgba(28,27,46,.06), 0 3px 12px rgba(28,27,46,.07);
  --sh2:        0 2px 8px rgba(28,27,46,.08), 0 8px 28px rgba(28,27,46,.10);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: var(--font-b);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: var(--ink);
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 3px solid var(--accent-3);
}
.topbar-brand { font-family: var(--font-d); font-size: 19px; color: #fff; text-decoration: none; }
.topbar-brand span { font-family: var(--font-b); font-size: 10px; opacity: .6; margin-left: 8px; font-weight: 400; }
.topbar-nav { margin-left: auto; display: flex; gap: 16px; font-size: 13px; }
.topbar-nav a { color: rgba(255,255,255,.8); }
.topbar-nav a:hover { color: #fff; }

.wrap { max-width: 980px; margin: 0 auto; padding: 32px 40px 60px; }
@media (max-width: 640px) { .wrap { padding: 20px 16px 40px; } }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-family: var(--font-d); font-size: 27px; letter-spacing: -.3px; margin: 0 0 6px; }
.page-head p { color: var(--ink-3); font-size: 14px; max-width: 680px; margin: 0; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); background: var(--accent-bg); border-radius: 999px; padding: 4px 10px; margin-bottom: 10px; }

/* Progression (liste de chapitres) */
.progression-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.progression-item {
  background: var(--white);
  border: 1px solid var(--paper-3);
  border-radius: var(--r2);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--sh);
}
.progression-num { font-family: var(--font-d); font-size: 20px; color: var(--ink-3); min-width: 28px; }
.progression-body { flex: 1; }
.progression-domaine { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-weight: 700; }
.progression-titre { font-family: var(--font-d); font-size: 16px; margin: 2px 0; }
.progression-theme { font-size: 12px; color: var(--ink-3); }
.progression-statut {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.statut-a-faire { background: var(--paper-2); color: var(--ink-3); }
.statut-en-cours { background: #fff3cd; color: #8a6212; }
.statut-fait { background: var(--accent-bg); color: var(--accent); }
.progression-link {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--paper-2);
  white-space: nowrap;
}
.progression-link.is-disabled { color: var(--ink-3); opacity: .55; pointer-events: none; }

footer.foot { margin-top: 36px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--paper-2); padding-top: 14px; }

/* Lesson (cours) page */
.lesson-head { border-bottom: 2px solid var(--paper-2); padding-bottom: 16px; margin-bottom: 24px; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.lesson-meta strong { color: var(--ink-2); }

.lesson-section { margin-bottom: 28px; }
.lesson-section h2 {
  font-family: var(--font-d);
  font-size: 19px;
  color: var(--accent);
  border-left: 4px solid var(--accent-3);
  padding-left: 10px;
  margin-bottom: 12px;
}
.lesson-section h3 { font-family: var(--font-d); font-size: 16px; margin: 16px 0 8px; }
.lesson-section p, .lesson-section li { font-size: 14.5px; }
.lesson-section ul, .lesson-section ol { margin: 8px 0 8px 22px; }

.objectifs-box, .a-retenir-box, .vocab-box, .activite-box {
  border: 1px solid var(--paper-3);
  border-radius: var(--r2);
  padding: 16px 18px;
  margin: 14px 0;
  background: var(--white);
}
.objectifs-box { border-left: 4px solid var(--ink-3); }
.a-retenir-box { border-left: 4px solid var(--accent); background: var(--accent-bg); }
.vocab-box { border-left: 4px solid #c99a2e; background: #fdf6e3; }
.activite-box { border-left: 4px solid #2f6f9c; background: #e7f1fa; }
.box-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin-bottom: 8px; }

.schema-placeholder {
  border: 2px dashed var(--paper-3);
  border-radius: var(--r2);
  padding: 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  margin: 14px 0;
}

/* Widget progression / Pronote */
.suivi-panel {
  margin-top: 40px;
  border-top: 2px solid var(--paper-2);
  padding-top: 20px;
}
.suivi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .suivi-grid { grid-template-columns: 1fr; } }
.suivi-card {
  background: var(--white);
  border: 1px solid var(--paper-3);
  border-radius: var(--r2);
  padding: 16px 18px;
}
.suivi-card h3 { font-family: var(--font-d); font-size: 15px; margin: 0 0 10px; }
.suivi-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.suivi-row label { font-size: 13px; color: var(--ink-2); }
.suivi-select, .suivi-date {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--paper-3);
  border-radius: 6px;
}
.suivi-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.suivi-btn.secondary { background: var(--white); color: var(--accent); }
.suivi-btn:hover { filter: brightness(1.05); }
.suivi-status-line { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.pronote-textarea {
  width: 100%;
  min-height: 140px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12.5px;
  padding: 10px;
  border: 1px solid var(--paper-3);
  border-radius: 6px;
  resize: vertical;
  background: var(--paper-2);
}
.toast-svt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 999;
}
.toast-svt.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media print {
  .topbar, .suivi-panel, .no-print { display: none !important; }
  body { background: #fff; font-size: 12.5pt; }
  .wrap { max-width: none; padding: 0 20px; }
  .lesson-section { break-inside: avoid; }
  a[href]::after { content: ""; }
}
