/* ============================================================
   Élo Sélo — Centre de soutien scolaire
   Palette tirée du logo
   ============================================================ */
:root {
  --rose: #E5276F;
  --rose-dark: #B8185A;
  --rose-soft: #FDE7EF;
  --teal: #12989A;
  --teal-dark: #0B7577;
  --teal-soft: #DDF4F3;
  --jaune: #F6B42C;
  --jaune-soft: #FEF3D9;
  --violet: #8A4DBE;
  --violet-soft: #F0E7F8;
  --cyan: #27B4D8;
  --cyan-soft: #DFF4FA;
  --navy: #1B2A4A;
  --navy-2: #2A3A5E;
  --muted: #6B7590;
  --line: #EFE6DC;
  --bg: #FFF9F3;
  --white: #fff;
  --grad: linear-gradient(90deg, var(--rose), var(--jaune), var(--cyan), var(--violet));
  --radius: 20px;
  --shadow: 0 1px 0 var(--line), 0 12px 32px -20px rgba(27, 42, 74, .35);
  --accent: var(--rose);
  --accent-soft: var(--rose-soft);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--navy);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .brand, .stat-value { font-family: 'Fredoka', 'Nunito', sans-serif; line-height: 1.15; }
h1, h2, h3 { margin: 0 0 .4em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.rainbow-bar { height: 6px; background: var(--grad); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 700 1rem 'Nunito', sans-serif; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-rose { background: var(--rose); color: #fff; box-shadow: 0 5px 0 var(--rose-dark); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 5px 0 var(--teal-dark); }
.btn-violet { background: var(--violet); color: #fff; box-shadow: 0 5px 0 #6A3698; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.btn-ghost { background: transparent; color: var(--navy); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: #fff; color: var(--rose); border: 2px solid var(--rose-soft); }
.btn-danger:hover { background: var(--rose-soft); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* ---------- En-tête du site ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 249, 243, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 1.45rem; color: var(--navy); }
.brand img { width: 54px; height: 54px; border-radius: 50%; }
.brand .elo { color: var(--rose); }
.brand .selo { color: var(--teal); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-weight: 700; color: var(--navy-2); }
.nav a:hover { color: var(--rose); }

/* ---------- Héros ---------- */
.hero { padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--jaune-soft); color: #9A6A00; font-weight: 800; font-size: .85rem; letter-spacing: .02em;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); margin: 18px 0 14px; font-weight: 600; }
.hero h1 .r { color: var(--rose); }
.hero h1 .t { color: var(--teal); }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 520px; }
.slogan { font-style: italic; font-weight: 700; color: var(--violet); font-size: 1.15rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-art { position: relative; justify-self: center; }
.hero-art img { width: min(420px, 80vw); height: auto; aspect-ratio: 1; border-radius: 50%; filter: drop-shadow(0 22px 30px rgba(27,42,74,.22)); position: relative; z-index: 1; }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .9; }
.blob.b1 { width: 120px; height: 120px; background: var(--jaune); top: -10px; right: -10px; }
.blob.b2 { width: 80px; height: 80px; background: var(--cyan); bottom: 20px; left: -20px; }
.blob.b3 { width: 46px; height: 46px; background: var(--rose); bottom: -6px; right: 60px; }

.pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.pill { padding: 7px 16px; border-radius: 999px; color: #fff; font-weight: 800; font-size: .95rem; }
.pill.primaire { background: var(--rose); }
.pill.cem { background: var(--teal); }
.pill.lycee { background: var(--violet); }

/* ---------- Sections ---------- */
.section-block { padding: 72px 0; }
.section-block.alt { background: #fff; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 600; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.spaces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.space-card {
  background: #fff; border-radius: 26px; padding: 30px; box-shadow: var(--shadow);
  border-top: 8px solid var(--c); display: flex; flex-direction: column;
  transition: transform .2s ease;
}
.space-card:hover { transform: translateY(-6px); }
.space-card .ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; background: var(--cs); margin-bottom: 18px; }
.space-card h3 { font-size: 1.5rem; font-weight: 600; color: var(--c); }
.space-card ul { padding: 0; margin: 0 0 24px; list-style: none; color: var(--navy-2); }
.space-card li { padding: 6px 0 6px 26px; position: relative; }
.space-card li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.space-card .btn { margin-top: auto; align-self: flex-start; }

.subjects { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.subject {
  display: flex; align-items: center; gap: 10px; background: var(--bg); border: 2px solid var(--line);
  padding: 12px 20px; border-radius: 16px; font-weight: 800;
}
.subject .dot { width: 12px; height: 12px; border-radius: 50%; }

.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.level { border-radius: 24px; padding: 28px; color: #fff; }
.level h3 { font-size: 1.7rem; font-weight: 600; }
.level p { opacity: .92; margin: 0; }

.cta-band { background: var(--navy); color: #fff; border-radius: 30px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--grad); }
.cta-band h2 { font-weight: 600; margin: 0 0 6px; }
.cta-band p { margin: 0; color: #C6CFE3; }

.site-footer { padding: 36px 0; color: var(--muted); font-size: .95rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-contact > * { display: inline-flex; align-items: center; gap: 7px; color: var(--navy-2); text-decoration: none; font-weight: 600; }
.footer-contact a:hover { color: var(--rose); }
.footer-contact .icon { width: 17px; height: 17px; color: var(--teal); }

/* ---------- Connexion ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-side::before { content: ""; position: absolute; inset: auto -80px -80px auto; width: 300px; height: 300px; border-radius: 50%; background: var(--rose); opacity: .25; }
.auth-side::after { content: ""; position: absolute; top: 80px; right: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--teal); opacity: .25; }
.auth-side .brand { color: #fff; }
.auth-side h2 { font-size: 2.4rem; font-weight: 600; position: relative; z-index: 1; }
.auth-side p { color: #C6CFE3; position: relative; z-index: 1; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 2rem; font-weight: 600; }
.role-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #fff; padding: 6px; border-radius: 16px; box-shadow: var(--shadow); margin: 22px 0 26px; }
.role-tabs button {
  border: 0; background: none; padding: 12px 6px; border-radius: 12px; cursor: pointer;
  font: 800 .95rem 'Nunito', sans-serif; color: var(--muted);
}
.role-tabs button.active { background: var(--accent); color: #fff; }
.demo-note { background: var(--jaune-soft); border-radius: 14px; padding: 12px 16px; font-size: .92rem; color: #7A5600; margin-top: 18px; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 800; font-size: .92rem; }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; font: 600 1rem 'Nunito', sans-serif; color: var(--navy);
  transition: border-color .15s;
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { min-height: 96px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Tableau de bord ---------- */
body[data-role="etudiant"] { --accent: var(--rose); --accent-soft: var(--rose-soft); }
body[data-role="professeur"] { --accent: var(--teal); --accent-soft: var(--teal-soft); }
body[data-role="admin"] { --accent: var(--violet); --accent-soft: var(--violet-soft); }

.dash { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy); color: #fff; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 22px; overflow-y: auto;
}
.sidebar .brand { color: #fff; font-size: 1.3rem; padding: 0 6px; }
.sidebar .brand img { width: 46px; height: 46px; }
.space-tag { margin: 0 6px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.08); font-weight: 800; font-size: .85rem; display: flex; align-items: center; gap: 8px; }
.space-tag::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px;
  background: none; border: 0; color: #C6CFE3; font: 700 1rem 'Nunito', sans-serif; cursor: pointer; text-align: left;
}
.side-nav button .i { width: 24px; text-align: center; }
.side-nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav button.active { background: var(--accent); color: #fff; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 0 6px 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; flex: none; }
.user-chip small { display: block; color: #9AA6C4; }
.logout { width: 100%; background: rgba(255,255,255,.08); color: #fff; border: 0; padding: 10px; border-radius: 12px; font: 700 .95rem 'Nunito', sans-serif; cursor: pointer; }
.logout:hover { background: var(--rose); }

.main { padding: 28px 36px 60px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.topbar h1 { font-size: 2rem; font-weight: 600; margin: 0; }
.topbar .sub { color: var(--muted); margin: 2px 0 0; }
.menu-toggle { display: none; background: var(--navy); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 12px; font-size: 1.3rem; cursor: pointer; }

.section { display: none; animation: fade .25s ease; }
.section.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-21 { grid-template-columns: 2fr 1fr; }
.mt { margin-top: 20px; }

.stat { position: relative; overflow: hidden; }
.stat .label { color: var(--muted); font-weight: 700; font-size: .92rem; }
.stat-value { font-size: 2.1rem; font-weight: 600; margin-top: 4px; }
.stat .hint { font-size: .85rem; color: var(--muted); }
.stat .ico { position: absolute; right: 16px; top: 16px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; }
.c-rose .ico { background: var(--rose-soft); } .c-rose .stat-value { color: var(--rose); }
.c-teal .ico { background: var(--teal-soft); } .c-teal .stat-value { color: var(--teal); }
.c-jaune .ico { background: var(--jaune-soft); } .c-jaune .stat-value { color: #C98A00; }
.c-violet .ico { background: var(--violet-soft); } .c-violet .stat-value { color: var(--violet); }
.c-cyan .ico { background: var(--cyan-soft); } .c-cyan .stat-value { color: #138BAB; }

.welcome {
  background: var(--navy); color: #fff; border-radius: 24px; padding: 26px 28px; margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; position: relative; overflow: hidden;
}
.welcome::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--grad); }
.welcome h2 { font-weight: 600; margin: 0 0 4px; font-size: 1.7rem; }
.welcome p { margin: 0; color: #C6CFE3; }
.welcome .slogan { color: var(--jaune); }

/* listes */
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.list li:last-child { border-bottom: 0; }
.list .when { min-width: 74px; text-align: center; background: var(--accent-soft); color: var(--accent); border-radius: 12px; padding: 6px 8px; font-weight: 800; font-size: .85rem; line-height: 1.2; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 800; }
.list .meta { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); text-align: center; padding: 22px; font-style: italic; }

/* badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.b-ok { background: var(--teal-soft); color: var(--teal-dark); }
.b-wait { background: var(--jaune-soft); color: #9A6A00; }
.b-late { background: var(--rose-soft); color: var(--rose-dark); }
.b-info { background: var(--cyan-soft); color: #11708A; }
.b-violet { background: var(--violet-soft); color: var(--violet); }

/* tableaux */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FFFBF7; }
.table .input { padding: 8px 10px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { max-width: 280px; }
.toolbar .spacer { flex: 1; }

/* barres de notes */
.bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.subject-row { display: grid; grid-template-columns: 120px 1fr 56px; gap: 14px; align-items: center; padding: 10px 0; }
.subject-row .n { font-weight: 800; text-align: right; font-family: 'Fredoka', sans-serif; font-size: 1.1rem; }

/* emploi du temps */
.timetable { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 12px; overflow-x: auto; }
.day { background: #fff; border-radius: 18px; padding: 12px; box-shadow: var(--shadow); min-height: 180px; }
.day.today { outline: 3px solid var(--accent); }
.day h4 { margin: 0 0 10px; font-size: 1rem; font-weight: 600; display: flex; justify-content: space-between; }
.slot { border-radius: 12px; padding: 10px; margin-bottom: 8px; border-left: 5px solid var(--sc); background: var(--ss); }
.slot .t { font-weight: 800; font-size: .82rem; color: var(--navy-2); }
.slot .m { font-weight: 800; color: var(--sc); }
.slot .r { font-size: .82rem; color: var(--muted); }

/* devoirs */
.homework { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px; border: 2px solid var(--line); margin-bottom: 12px; background: #fff; }
.homework.done { opacity: .6; }
.homework.done .title { text-decoration: line-through; }
.homework input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); margin-top: 2px; flex: none; cursor: pointer; }
.homework .grow { flex: 1; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: .8rem; font-weight: 800; background: var(--ss); color: var(--sc); }

/* annonces */
.announce { padding: 16px 18px; border-radius: 16px; background: var(--bg); border-left: 6px solid var(--jaune); margin-bottom: 12px; }
.announce .title { font-weight: 800; font-size: 1.05rem; }
.announce .meta { color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.announce p { margin: 0; }

/* appel */
.roll { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.roll label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; font-weight: 700; background: #fff; transition: .15s; }
.roll label:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.roll label:not(:has(input:checked)) { border-color: var(--rose-soft); background: #FFF5F8; }
.roll input { width: 20px; height: 20px; accent-color: var(--teal); }
.roll .st { margin-left: auto; font-size: .8rem; }

/* barres verticales admin */
.vbars { display: flex; align-items: flex-end; gap: 18px; height: 180px; padding-top: 10px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.vbar .col { width: 100%; max-width: 64px; border-radius: 12px 12px 6px 6px; transition: height .4s ease; }
.vbar .v { font-weight: 800; font-family: 'Fredoka', sans-serif; }
.vbar .k { font-size: .85rem; color: var(--muted); font-weight: 700; }

.progress-ring { display: flex; align-items: center; gap: 18px; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px);
  background: var(--navy); color: #fff; padding: 14px 22px; border-radius: 14px; font-weight: 700;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.4); transition: transform .3s ease; z-index: 100;
  border-bottom: 4px solid var(--accent);
}
.toast.show { transform: translateX(-50%) translateY(0); }

.overlay { display: none; }

/* ---------- Icônes SVG (assets/icons.svg) ---------- */
.icon {
  width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -4px;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.side-nav button .i { display: grid; place-items: center; }
.side-nav button .icon { width: 19px; height: 19px; opacity: .85; }
.side-nav button.active .icon { opacity: 1; }
.stat .ico .icon { width: 21px; height: 21px; }
.c-rose .ico { color: var(--rose); }
.c-teal .ico { color: var(--teal); }
.c-jaune .ico { color: #C98A00; }
.c-violet .ico { color: var(--violet); }
.c-cyan .ico { color: #138BAB; }
.space-card .ico { color: var(--c); }
.space-card .ico .icon { width: 28px; height: 28px; stroke-width: 1.7; }
.role-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.role-tabs button .icon { width: 17px; height: 17px; }
.menu-toggle .icon { width: 22px; height: 22px; }
.btn .icon { width: 18px; height: 18px; }
.toast { display: flex; align-items: center; gap: 10px; }
.toast .icon { color: var(--teal); }
.toast.error { border-bottom-color: var(--rose); }
.toast.error .icon { color: #FF8FB5; }

/* évite d'afficher l'espace avant la vérification de connexion */
.dash { visibility: hidden; }
body.ready .dash { visibility: visible; }

.demo-banner { background: var(--jaune-soft); color: #7A5600; font-weight: 800; font-size: .9rem; padding: 8px 14px; border-radius: 12px; margin-bottom: 16px; text-align: center; }

/* fenêtre modale (identifiants) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(27,42,74,.55); display: grid; place-items: center; z-index: 90; padding: 20px; }
.modal { background: #fff; border-radius: 24px; padding: 28px; max-width: 460px; width: 100%; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); border-top: 8px solid var(--accent); }
.modal h3 { font-size: 1.4rem; font-weight: 600; }
.cred { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); margin-top: 10px; }
.cred span { color: var(--muted); font-weight: 700; font-size: .9rem; }
.cred strong { font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; user-select: all; }

/* éditeurs de listes (Paramètres) */
.edit-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.edit-row { display: grid; gap: 10px; align-items: center; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.edit-row.niveau { grid-template-columns: 1.2fr 1fr 70px 2fr 40px; }
.edit-row.matiere { grid-template-columns: 1fr 52px 40px; }
.edit-row.salle { grid-template-columns: 1fr 40px; }
.edit-row .input { padding: 9px 11px; }
.edit-row input[type="color"] { width: 46px; height: 40px; padding: 3px; border-radius: 10px; border: 2px solid var(--line); background: #fff; cursor: pointer; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 2px solid var(--rose-soft); background: #fff; color: var(--rose); cursor: pointer; }
.icon-btn:hover { background: var(--rose-soft); }
.list-head { display: grid; gap: 10px; font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 12px; margin-bottom: 6px; }
.list-head.niveau { grid-template-columns: 1.2fr 1fr 70px 2fr 40px; }
.days { display: flex; flex-wrap: wrap; gap: 10px; }
.days label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; font-weight: 700; cursor: pointer; background: #fff; }
.days label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.days input { accent-color: var(--accent); width: 18px; height: 18px; }
.save-bar { position: sticky; bottom: 16px; z-index: 5; margin-top: 20px; background: var(--navy); color: #fff; border-radius: 18px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; box-shadow: 0 16px 40px -16px rgba(0,0,0,.45); }
.save-bar span { color: #C6CFE3; font-weight: 700; }
.save-bar.dirty span { color: var(--jaune); }
.logo-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-edit img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.settings-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.settings-nav a { padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); text-decoration: none; font-weight: 800; font-size: .9rem; color: var(--navy-2); }
.settings-nav a:hover { color: var(--accent); }
@media (max-width: 900px) {
  .edit-row.niveau, .list-head.niveau { grid-template-columns: 1fr 1fr; }
  .list-head.niveau { display: none; }
}

.quick-exports { display: flex; flex-direction: column; gap: 10px; }
.quick-exports .btn { justify-content: flex-start; border-radius: 14px; text-align: left; width: 100%; }

.form-error { background: var(--rose-soft); color: var(--rose-dark); border-radius: 12px; padding: 10px 14px; font-weight: 700; margin-bottom: 14px; display: none; }
.form-error.show { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .timetable { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .hero .container, .auth-page { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { width: min(300px, 70vw); }
  .spaces, .levels { grid-template-columns: 1fr; }
  .nav a:not(.btn) { display: none; }
  .auth-side { display: none; }
  .dash { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .25s ease; }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .overlay { display: block; position: fixed; inset: 0; background: rgba(27,42,74,.45); z-index: 40; }
  .menu-toggle { display: grid; place-items: center; }
  .main { padding: 20px 18px 50px; }
  .g-3, .g-2, .g-21 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .timetable { grid-template-columns: repeat(2, 1fr); }
  .cta-band { padding: 32px; }
}
@media (max-width: 520px) {
  .g-4 { grid-template-columns: 1fr; }
  .timetable { grid-template-columns: 1fr; }
  .welcome { flex-direction: column; align-items: flex-start; }
}
