:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1c2233;
  --muted: #6b7286;
  --border: #e3e6ef;
  /* Alatec palette: deep teal, sky blue, coral. */
  --primary: #254554;
  --primary-dark: #17262d;
  --primary-soft: #e4f1f6;
  --sky: #8cc1d3;
  --accent: #ed7364;
  --success: #1f9d61;
  --danger: #d64545;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .05);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: .2em 0 .5em; }
h2 { font-size: 1.3rem; margin: 1.4em 0 .6em; }
.card h2:first-child { margin-top: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 70vh; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.pre { white-space: pre-line; }

/* Header */
.topbar { background: var(--primary); border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.25rem; color: #fff; display: flex; align-items: center; gap: 8px; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 38px; height: 38px; flex: none; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.logo-accent { color: var(--accent); }
.topbar nav a, .topbar button.link { color: #dbe9ef; }
.topbar nav a.btn { background: #d65a4b; color: #fff; }
.topbar nav a.btn:hover { background: #bf4a3c; text-decoration: none; }
nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--text); font-weight: 500; }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }

/* Buttons & forms */
.btn { display: inline-block; background: var(--primary); color: #fff; border: 0; border-radius: 10px; padding: 11px 20px; font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn-ghost { background: var(--primary-soft); color: var(--primary); }
.btn-ghost:hover { background: #d3e8f0; }
.btn-small { padding: 7px 14px; color: #fff !important; }
.btn-block { display: block; width: 100%; margin-top: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: .95rem; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
legend { font-weight: 600; padding: 0 6px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; border-color: #c9d3f5; }
.empty { text-align: center; color: var(--muted); padding: 36px 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.list { display: flex; flex-direction: column; gap: 12px; }

/* Hero & search */
.hero { text-align: center; padding: 40px 0 24px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 680px; margin: 0 auto 28px; }
.search { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; text-align: left; }
.search label span { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.search-compact { margin-bottom: 12px; }
.search .check { align-self: center; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 36px 0; }
.step { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.step span { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.step h3 { margin: 10px 0 4px; }
.step p { margin: 0; color: var(--muted); }
.cta-teacher { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 40px; background: linear-gradient(120deg, #254554, #35677c); color: #fff; border: 0; flex-wrap: wrap; }
.cta-teacher h2 { margin-top: 0; }
.cta-teacher .btn { background: #fff; color: var(--primary); }

/* Teacher cards */
.teacher-card { display: flex; gap: 16px; align-items: flex-start; }
.teacher-card-body { flex: 1; min-width: 0; }
.teacher-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.teacher-card h3 { margin: 0; font-size: 1.1rem; }
.headline { margin: 4px 0; font-weight: 500; }
.meta { margin: 4px 0 8px; color: var(--muted); font-size: .9rem; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; }
.avatar-lg { width: 84px; height: 84px; font-size: 1.6rem; }
.rate { font-weight: 800; font-size: 1.2rem; white-space: nowrap; }
.rate small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.rate-lg { font-size: 2rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--primary-soft); color: var(--primary); padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 500; }
.verified { font-size: .75rem; color: var(--success); background: #e6f6ee; padding: 2px 8px; border-radius: 999px; font-weight: 600; vertical-align: middle; }
.stars { color: var(--accent); letter-spacing: 1px; }
.stars .off { color: #d9dce5; }

/* Profile */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.profile-main { display: flex; flex-direction: column; gap: 20px; }
.profile-head { display: flex; gap: 20px; align-items: center; }
.profile-head h1 { margin: 0; }
.profile-side { position: sticky; top: 84px; }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 16px 0 0; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; }
.review { border-top: 1px solid var(--border); padding: 12px 0; }
.review:first-of-type { border-top: 0; }
.review p { margin: 4px 0 0; }
blockquote { margin: 16px 0 0; padding: 12px 16px; background: var(--bg); border-left: 3px solid var(--primary); border-radius: 6px; }

/* Auth */
.auth { max-width: 520px; margin: 0 auto; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.tabs a { text-align: center; padding: 8px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs a:hover { text-decoration: none; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { color: var(--muted); }
.stat span { display: block; font-size: 1.8rem; font-weight: 800; color: var(--text); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.request-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge-en_attente { background: #fff3e0; color: #b86200; }
.badge-acceptee { background: #e6f6ee; color: var(--success); }
.badge-refusee, .badge-annulee { background: #fdecec; color: var(--danger); }
.badge-terminee { background: #eef0f5; color: var(--muted); }

/* Messages */
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.msg { max-width: 80%; }
.msg-body { background: var(--bg); padding: 10px 14px; border-radius: 12px; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.mine .msg-body { background: var(--primary); color: #fff; text-align: left; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.flash-success { background: #e6f6ee; color: #146b42; }
.flash-error { background: #fdecec; color: #9b2c2c; }
.flash-warn { background: #fff3e0; color: #8a4b00; }


@media (max-width: 760px) {
  .profile { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .profile-head { flex-direction: column; text-align: center; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  nav { gap: 14px; font-size: .9rem; }
  .nav-wide { display: none; }
  .topbar-inner { gap: 6px 16px; padding-top: 8px; padding-bottom: 8px; }
  .teacher-card-head { flex-direction: column; gap: 2px; }
}

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.card:has(> .table) { overflow-x: auto; }
h3 { font-size: 1.05rem; margin: 18px 0 6px; }

/* Credit & packs */
.credit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.credit div { background: var(--bg); border-radius: 10px; padding: 10px 12px; color: var(--muted); font-size: .85rem; }
.credit span { display: block; font-size: 1.4rem; font-weight: 800; color: var(--text); }
.credit .low span { color: #b86200; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.pack { border: 2px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; gap: 2px; }
.pack input { position: absolute; opacity: 0; width: 0; }
.pack:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pack span { color: var(--muted); font-weight: 500; font-size: .9rem; }
.declare { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 4px; }
.stat-money span { color: var(--success); }
.payout-form { display: flex; gap: 6px; }
.payout-form input { padding: 6px 8px; min-width: 120px; }

.badge-l-declare, .badge-p-en_attente { background: #fff3e0; color: #b86200; }
.badge-l-valide, .badge-p-payee { background: #e6f6ee; color: var(--success); }
.badge-l-conteste, .badge-l-annule, .badge-p-echouee { background: #fdecec; color: var(--danger); }
.btn-small.btn-ghost { color: var(--primary) !important; }

/* Simulated mobile money checkout */
.checkout-brand { font-size: 1.6rem; font-weight: 800; padding: 14px; border-radius: 12px; text-align: center; color: #fff; margin-bottom: 12px; }
.checkout-wave .checkout-brand { background: #1dc3ff; }
.checkout-orange_money .checkout-brand { background: #ff7900; }
.checkout-free_money .checkout-brand { background: #cd1e25; }
.checkout-transfer .checkout-brand { background: linear-gradient(135deg, #254554, #2f6275); font-size: 1.3rem; }

.price-table { margin: 8px 0 4px; }
.price-table td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.grid-table input { min-width: 84px; max-width: 140px; padding: 6px 8px; }
.table-scroll { overflow-x: auto; }
.grid-table td:last-child { font-size: .85rem; white-space: nowrap; }
.grid-table td { font-variant-numeric: tabular-nums; }

/* Recruitment */
.badge-r-candidature, .badge-r-entretien { background: #fff3e0; color: #b86200; }
.badge-r-accepte { background: #e6f6ee; color: var(--success); }
.badge-r-refuse { background: #fdecec; color: var(--danger); }
.checklist { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.checklist li { color: var(--muted); }
.checklist li.ok { color: var(--success); font-weight: 600; }
.upload-form { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 4px; }
.upload-form input[type="file"] { padding: 8px; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.doc { margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg); }
.doc img { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #fff; }
.doc-pdf { display: block; width: 100%; height: 260px; background: #fff; }
.doc figcaption { padding: 8px 10px; font-size: .85rem; overflow-wrap: anywhere; }
.flash-error a, .flash-warn a { font-weight: 600; }

/* Manual Mobile Money payment */
.pay-steps { padding-left: 20px; display: grid; gap: 8px; }
.pay-number { font-size: 1.15rem; letter-spacing: .02em; white-space: nowrap; }

/* Pack discounts */
.pack-off { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--success); background: #e6f6ee; border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.pack small { display: block; font-size: .75rem; }
.pack-discounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 8px; }
.input-suffix { display: flex; align-items: center; gap: 6px; }
.tag-online { background: #e6f6ee; color: var(--success); }

/* Terms */
.terms { max-width: 760px; margin: 0 auto; }
.terms h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.terms p { margin: 0 0 8px; }
.check span a { font-weight: 600; }
.signup-steps { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: .25rem; }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.service { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.service h3 { margin: 0 0 4px; font-size: 1rem; }
.service p { margin: 0; color: var(--muted); font-size: .92rem; }
.service-link { display: block; color: inherit; border-color: var(--sky); }
.service-link:hover { text-decoration: none; border-color: var(--primary); }
.service-link .more { display: block; margin-top: 6px; color: var(--primary); font-weight: 600; }
.diaspora-cases { margin-bottom: 16px; }
.diaspora-cases .card { display: flex; flex-direction: column; align-items: flex-start; }
.diaspora-cases .btn { margin-top: auto; }
.ticks { padding-left: 1.2rem; margin: 0 0 16px; display: grid; gap: 6px; }
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 8px; background: #1f8f4e; color: #fff; padding: 10px 16px 10px 12px; border-radius: 999px; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.wa-float:hover { background: #18773f; text-decoration: none; }
.wa-float svg, .btn-wa svg { width: 22px; height: 22px; flex: none; }
.btn-wa { background: #1f8f4e; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-wa:hover { background: #18773f; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; } .contact-wa { order: -1; } }
.lead-left { color: var(--muted); max-width: 640px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.progress-steps { list-style: none; counter-reset: step; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; flex-wrap: wrap; }
.progress-steps li { counter-increment: step; flex: 1 1 0; min-width: 120px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.progress-steps li::before { content: counter(step) ". "; font-weight: 700; }
.progress-steps li.done { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.progress-steps li.done::before { content: "✔ "; }
.progress-steps li.current { background: var(--primary); color: #fff; border-color: transparent; font-weight: 600; }
.req { color: var(--accent); font-weight: 700; margin-left: 2px; }
.doc-slot { border: 1px dashed var(--border); border-radius: 10px; padding: 12px; display: grid; gap: 6px; }
.doc-slot.doc-sent { border-style: solid; border-color: var(--sky); background: var(--primary-soft); }
.doc-slot-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-slot p { margin: 0; }
.btn-big { padding: 14px 20px; font-size: 1.05rem; }
.travel-fees { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pitch { border-left: 4px solid var(--accent); }
.pitch h2 { margin-top: 0; color: var(--primary); }
.pitch p { margin-bottom: 0; }
.pitch-line { background: var(--primary-soft); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.install-bar { display: flex; align-items: center; gap: 10px; background: var(--primary-soft); border-radius: 10px; padding: 8px 12px; margin: 12px 0; font-size: .92rem; }
.install-bar[hidden] { display: none; }
.install-bar span { flex: 1; }
.install-bar .link { color: var(--muted); font-size: 1rem; }
.topbar nav a.current { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.btn-danger { background: #b83a2c; } .btn-danger:hover { background: #9b2c20; }
.badge-muted { background: #eef0f3; color: #5b6472; }
form:has(input[name=mode][value=en_ligne]:checked) .onsite { display: none; }
[data-toggle-password] { align-self: flex-start; padding: 0; margin-top: 2px; }
.alert-settings { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Footer */
.footer { background: var(--primary-dark); color: #c9dbe2; padding: 36px 0 84px; font-size: .92rem; border-top: 4px solid var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer-brand p { margin: 12px 0 0; max-width: 340px; }
.footer-pay { color: var(--sky); font-weight: 600; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-col h3 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 4px; }
.footer-col a { color: #dbe9ef; width: fit-content; background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 2px no-repeat; transition: background-size .25s, color .25s; }
.footer-col a:hover { color: #fff; text-decoration: none; background-size: 100% 2px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 28px; padding-top: 16px; font-size: .82rem; color: #8fa9b4; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Home hero: gradient band and rotating subject */
.hero-home { background: linear-gradient(135deg, var(--primary) 0%, #2f6f86 55%, var(--sky) 100%); color: #fff; border-radius: 20px; padding: 40px 20px 24px; margin-bottom: 8px; position: relative; overflow: hidden; }
.hero-home::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(237, 115, 100, .25); right: -80px; top: -90px; }
.hero-home h1, .hero-home .lead { position: relative; z-index: 1; color: #fff; }
.hero-home .lead { color: #e4f1f6; }
.hero-home .search { position: relative; z-index: 1; color: var(--text); }
.rotator { display: inline-block; color: #ffd2cb; transition: opacity .35s, transform .35s; }
.rotator.out { opacity: 0; transform: translateY(-10px); }

/* Section titles with a coral underline, coloured icons and steps */
main section > h2 { position: relative; padding-bottom: 8px; }
main section > h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 4px; border-radius: 4px; background: var(--accent); }
.center > h2::after, section.center > h2::after { left: calc(50% - 22px); }
.service .ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-right: 6px; font-size: 1.2rem; vertical-align: middle; }
.services > :nth-child(1) .ico { background: #fde4e0; }
.services > :nth-child(2) .ico { background: #e4f1f6; }
.services > :nth-child(3) .ico { background: #e3f3ea; }
.services > :nth-child(4) .ico { background: #fff1d6; }
.step span { background: var(--accent); color: #fff; }
.steps > :nth-child(2) span { background: var(--sky); color: var(--primary-dark); }
.steps > :nth-child(3) span { background: var(--primary); }
.service, .step, .grid > .card, .pitch, .cta-teacher { transition: transform .25s, box-shadow .25s; }
.service:hover, .step:hover, .grid > .card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 30, 60, .1); }
main :is(p, li, dd) > a:not(.btn) { text-decoration: underline; text-decoration-color: rgba(237, 115, 100, .45); text-underline-offset: 3px; }
main :is(p, li, dd) > a:not(.btn):hover { text-decoration-color: var(--accent); }

/* Reveal on scroll (only when scripts run and motion is welcome) */
.anim .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.anim .reveal.in { opacity: 1; transform: none; }

/* Mobile: "Trouver un prof" stays at hand once the search form has scrolled away */
.mobile-cta { position: fixed; left: 16px; bottom: 16px; z-index: 20; background: var(--accent); color: #fff; font-weight: 700; padding: 11px 16px; border-radius: 999px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.mobile-cta:hover { text-decoration: none; background: #d65a4b; }
@media (min-width: 761px) { .mobile-cta { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .rotator, .service, .step, .grid > .card, .anim .reveal { transition: none !important; }
  .anim .reveal { opacity: 1; transform: none; }
}

/* Inner pages: title band in the brand gradient */
.page-band { background: linear-gradient(135deg, var(--primary) 0%, #2f6f86 60%, var(--sky) 100%); color: #fff; border-radius: 18px; padding: 24px 20px; margin-bottom: 18px; position: relative; overflow: hidden; }
.page-band::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(237, 115, 100, .25); right: -60px; top: -70px; }
.page-band > * { position: relative; z-index: 1; }
.page-band h1 { margin: 0 0 6px; color: #fff; }
.page-band p { margin: 0; color: #e4f1f6; max-width: 640px; }
.page-band .search { margin: 16px 0 0; color: var(--text); }
.page-band-slim { padding: 18px 20px; }

/* Stats with a coloured top edge */
.stats > .stat { border-top: 4px solid var(--accent); }
.stats > .stat:nth-child(2) { border-top-color: var(--sky); }
.stats > .stat:nth-child(3) { border-top-color: var(--success); }
.stats > .stat:nth-child(4) { border-top-color: var(--primary); }

/* Sign-in and form cards: brand strip on top, coral active tab */
.auth.card { position: relative; overflow: hidden; padding-top: 28px; }
.auth.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--primary), var(--sky), var(--accent)); }
.tabs a.active { color: var(--primary); box-shadow: inset 0 -3px 0 var(--accent), var(--shadow); }

/* People: initials on the brand gradient */
.avatar { background: linear-gradient(135deg, var(--primary), #3d8aa3); color: #fff; }
.avatar-lg { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--accent); }
.tag:nth-child(3n+2) { background: #fde4e0; color: #9c3b2f; }
.tag:nth-child(3n) { background: #e3f3ea; color: #1d6b45; }

/* Long texts (terms, privacy): numbered titles with a coral edge */
.terms h2 { border-left: 4px solid var(--accent); padding-left: 10px; color: var(--primary); }
.card h2 { color: var(--primary); }

@media (prefers-reduced-motion: no-preference) {
  .page-band, .hero-home { animation: band-in .6s ease both; }
  @keyframes band-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
}
.cta-teacher h2, .page-band h2 { color: #fff; }
.tag.tag-online { background: #e6f6ee; color: var(--success); }

/* Optional part of the teacher application, folded by default */
.more-details > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.more-details > summary::-webkit-details-marker { display: none; }
.more-details > summary::before { content: '＋'; color: var(--coral, #e8735a); font-weight: 700; }
.more-details[open] > summary::before { content: '－'; }
.more-details[open] > summary { margin-bottom: .6rem; }
.application-form .checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: .2rem .8rem; }

/* Diaspora highlight on the home page */
.diaspora-home { margin: 28px 0; padding: 22px 18px; border-radius: var(--radius); background: linear-gradient(135deg, #254554 0%, #2f6275 60%, #8cc1d3 140%); color: #fff; }
.diaspora-home h2 { color: #fff; margin-top: 0; }
.diaspora-home .lead { color: #e3f0f5; }
.diaspora-cases-home { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.diaspora-home .service-link { border-color: transparent; color: var(--text); }
.doc-list { list-style: none; padding: 0; margin: 0 0 8px; }
.doc-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.doc-list li:last-child { border-bottom: 0; }

/* Admin: first requests of new parents, to call then pass on */
.review-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.review-item p { margin: 0 0 6px; }
.review-contact { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.delete-account { margin-top: 14px; }
.delete-account > summary { cursor: pointer; color: var(--danger); font-size: .88rem; }
.delete-account[open] > summary { margin-bottom: 8px; }

/* Admin backup card */
.backup-card { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; }
.backup-card > div:first-child { flex: 1 1 18rem; }
.backup-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Admin: delete one teacher document */
.doc-delete { margin-top: 6px; }
.doc-delete summary { cursor: pointer; color: var(--danger, #c0392b); font-size: .9rem; }
.doc-delete form { margin-top: 6px; }

/* Admin: district supplement on a request to check */
.area-toggle { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
