:root {
  --green: #94502f;
  --green-dark: #1d3247;
  --green-soft: #f3e8da;
  --gold: #b9854a;
  --gold-soft: #f8eedc;
  --bg: #faf5ec;
  --card: #fffdf9;
  --text: #1d3247;
  --muted: #6f6a63;
  --line: #eadfcc;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 40, 30, .06), 0 6px 18px rgba(20, 40, 30, .06);
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; font-size: 15px; line-height: 1.5; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
.ar { font-family: 'Amiri', serif; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff;
  padding: 9px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; text-decoration: none; min-height: 40px; transition: .15s; }
.btn:hover { border-color: var(--green); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.sm { padding: 5px 10px; min-height: 32px; font-size: .85rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* formulaires */
label.f { display: block; margin-bottom: 12px; font-weight: 600; font-size: .88rem; }
label.f > span { display: block; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=time], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
textarea { min-height: 80px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; } .row > * { flex: 1 1 160px; }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.checklist { max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; background: #fff; }
.field-title { font-weight: 700; font-size: .88rem; margin: 14px 0 6px; }

/* cartes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stack > * + * { margin-top: 14px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--green-soft); color: var(--green); }
.tag.gold { background: var(--gold-soft); color: #7a5524; }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.gray { background: #efe7da; color: var(--muted); }

/* connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 20% 10%, #2f4c69 0, transparent 40%), linear-gradient(160deg, var(--green-dark), var(--green)); }
.login .card { width: 100%; max-width: 400px; padding: 28px; }
.brand { text-align: center; margin-bottom: 18px; }
.brand .ar { font-size: 2rem; color: var(--green); line-height: 1.2; }
.brand h1 { font-size: 1.15rem; }
.err { background: var(--danger-soft); color: var(--danger); padding: 9px 12px; border-radius: 10px; margin-bottom: 12px; font-size: .9rem; }

/* mise en page */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--green-dark); color: #efe6da; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .logo { padding: 4px 10px 18px; }
.side .logo .ar { font-size: 1.6rem; color: var(--gold); line-height: 1.1; }
.side .logo div:last-child { font-size: .8rem; opacity: .8; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 500; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.side .me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; }
.side .me .btn { width: 100%; margin-top: 8px; background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.main { padding: 26px clamp(16px, 3vw, 36px) 60px; max-width: 1100px; width: 100%; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar > input[type=search] { flex: 2 1 220px; } .toolbar > select { flex: 1 1 150px; }

/* stats */
.stat { text-align: left; } .stat b { font-size: 1.9rem; display: block; color: var(--green); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }

/* tableaux */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f5ecdf; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }

/* ressources */
.res { display: flex; flex-direction: column; gap: 8px; }
.res .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: var(--green-soft); }
.res .ico.audio { background: #e8eefb; } .res .ico.video { background: #fbe8ef; } .res .ico.pdf { background: #fdeee0; }
.res .top { display: flex; gap: 12px; align-items: flex-start; }
.res h3 { line-height: 1.25; }
.res .foot { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* planning */
.day { margin-bottom: 18px; }
.day h3 { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.day.today h3 span.tag { background: var(--gold); color: #fff; }
.slot { display: flex; gap: 14px; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.slot .time { font-weight: 700; min-width: 108px; color: var(--green); font-variant-numeric: tabular-nums; }
.slot .what { flex: 1 1 200px; }

/* fenêtre modale */
.overlay { position: fixed; inset: 0; background: rgba(10, 30, 22, .55); display: grid; place-items: center; padding: 16px; z-index: 50; overflow: auto; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 860px; }
.modal .mh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.modal .mh button.x { border: 0; background: none; font-size: 1.6rem; cursor: pointer; line-height: 1; color: var(--muted); }
.modal .mf { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.player audio, .player video { width: 100%; border-radius: 12px; background: #000; }
.player audio { background: none; }
.player iframe { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 12px; }
.player img { max-width: 100%; border-radius: 12px; display: block; margin: auto; }
.progress { height: 8px; background: var(--green-soft); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 2.4rem; }
.pw { font-family: ui-monospace, Menlo, monospace; font-size: 1.15rem; background: var(--gold-soft); padding: 10px 14px; border-radius: 10px; letter-spacing: .04em; user-select: all; display: inline-block; }

#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 99; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--green-dark); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; }
.toast.err { background: var(--danger); }

/* mobile */
.topbar { display: none; }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--green-dark); color: #fff; position: sticky; top: 0; z-index: 30; }
  .topbar button { background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }
  .topbar .ar { color: var(--gold); font-size: 1.3rem; }
  .main { padding-top: 18px; }
}

/* ---- administration simplifiée */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 20px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; cursor: pointer; box-shadow: var(--shadow); transition: .15s; }
.tile:hover { border-color: var(--green); transform: translateY(-2px); }
.tile .ti { font-size: 1.9rem; margin-bottom: 6px; }
.tile b { font-size: 1.05rem; }
.tile small { color: var(--muted); font-size: .85rem; }
.steps { margin-top: 20px; display: grid; gap: 4px; }
.step { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 4px; cursor: pointer; text-align: left; font-weight: 500; border-radius: 8px; }
.step:hover { background: var(--green-soft); }
.step .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .75rem; color: #fff; flex: none; }
.step.done { color: var(--muted); text-decoration: line-through; }
.step.done .dot { background: var(--green); border-color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-weight: 500; font-size: .9rem; transition: .12s; }
.chip:hover span { border-color: var(--green); }
.chip input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.items { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.item:hover { border-color: var(--green); }
.item .grow { flex: 1; min-width: 0; }
.item .grow .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 45%; }
.item .chev { color: var(--muted); font-size: 1.4rem; }
.av { width: 42px; height: 42px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 1rem; }
@media (max-width: 560px) { .item .tags { display: none; } }
.drop { border: 2px dashed var(--line); border-radius: 16px; padding: 22px 14px; text-align: center; cursor: pointer; background: #fcfaf5; transition: .15s; }
.drop:hover, .drop.over, .drop:focus-visible { border-color: var(--green); background: var(--green-soft); outline: none; }
.drop .big { font-size: 1.8rem; }
details.more { border-top: 1px solid var(--line); padding-top: 10px; }
details.more > summary { cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--green); list-style: none; padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '＋ '; }
details.more[open] > summary::before { content: '－ '; }
.morebody { display: grid; gap: 12px; margin-top: 10px; }

/* ---- identité visuelle de l'académie : serif élégant, navy, terracotta, crème */
body { background: var(--bg); }
h1, h2, h3 { font-family: var(--serif); color: var(--text); letter-spacing: 0; }
h1 { font-size: 2.3rem; font-weight: 600; line-height: 1.1; }
h2 { font-size: 1.6rem; font-weight: 600; line-height: 1.15; }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.modal h2 { font-size: 1.7rem; }
.brand h1 { font-size: 1.7rem; }
.brand .muted { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; color: var(--green); font-weight: 600; margin-top: 4px; }
.field-title, label.f > span, th { letter-spacing: .02em; }
.tag { text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; padding: 3px 10px; }
.btn { border-radius: 99px; padding: 9px 18px; }
.btn.sm { padding: 5px 14px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=time], input[type=search], select, textarea { background: #fffdf9; border-radius: 10px; }
.card, .item, .slot, .tile, .modal, .drop { border-color: var(--line); }
.card { background: var(--card); box-shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 8px 24px rgba(60, 40, 20, .05); }
.side { background: var(--green-dark); }
.side .logo .ar { color: #e2b98a; font-size: 1.9rem; }
.nav a { border-radius: 12px; }
.nav a .ic { flex: none; opacity: .9; }
.nav a.on { background: rgba(255, 255, 255, .12); }
.toast { background: var(--green-dark); }
.res .ico { background: var(--green-soft); color: var(--green); }
.res .ico.audio, .res .ico.video, .res .ico.pdf { background: var(--green-soft); }
.res { gap: 10px; }
.play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: grid; place-items: center; cursor: pointer; padding-left: 2px; transition: .15s; flex: none; }
.play:hover { background: var(--green-dark); transform: scale(1.05); }
.play:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.slot { border-left: 4px solid var(--green); border-radius: 14px; }
.slot .time { color: var(--green); font-family: var(--serif); font-size: 1.25rem; font-weight: 700; min-width: 120px; }
.day h3 { font-size: 1.5rem; }
.tile .ti { color: var(--green); }
.tile b { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.av { background: var(--green-soft); color: var(--green); font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.empty .big { color: var(--green); opacity: .8; margin-bottom: 6px; }
.drop .big { color: var(--green); }
.stat b { font-family: var(--serif); }
.yes { color: #3f7d4f; font-weight: 700; } .no { color: var(--danger); font-weight: 700; }
.login { background: radial-gradient(circle at 15% 10%, #3a5a78 0, transparent 45%), linear-gradient(160deg, #162739, var(--green-dark)); }
.topbar .ar { color: #e2b98a; }
details.more > summary { color: var(--green); }
.chip input:checked + span { background: var(--green); border-color: var(--green); }
.pw { background: var(--gold-soft); }
.ic { display: block; }
.nav a .ic, .tile .ti .ic, .av .ic { display: inline-block; }
@media (max-width: 560px) { h1 { font-size: 2rem; } }

/* ---- inscription en ligne, navigation mobile, cartes de zone (comme la plateforme de référence) */
.eyebrow { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--green); }
.pcards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pcard { --c: #e2b9a2; --cs: #f8e9df; --ct: var(--green); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; text-decoration: none;
  color: var(--text); background: #fff; border: 2px solid var(--c); border-radius: 26px; padding: 20px; cursor: pointer; font: inherit; transition: .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.pcard.navy { --c: #a9bccd; --cs: #e5edf4; --ct: var(--green-dark); }
.pcard.gold { --c: #ecd29f; --cs: #f8efd9; --ct: #8a6024; }
.pcard .eyebrow { color: var(--ct); }
.pcard h3 { font-size: 1.7rem; }
.pcard p { margin: 0; font-size: .93rem; }
.pico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--cs, var(--green-soft)); border: 1px solid var(--c, var(--line)); color: var(--ct, var(--green)); flex: none; margin-bottom: 4px; }
.pico.sm { width: 44px; height: 44px; border-radius: 14px; margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { display: inline-block; padding: 5px 12px; border: 1px solid var(--c, var(--line)); background: var(--cs, var(--green-soft)); border-radius: 99px; font-size: .8rem; font-weight: 600; color: var(--ct, var(--green-dark)); }
.cta { margin-top: 8px; display: inline-flex; padding: 10px 20px; border-radius: 99px; background: var(--ct); color: #fff; font-weight: 700; font-size: .92rem; }
.alertcard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid #ecd29f; background: var(--gold-soft); border-radius: 22px; text-decoration: none; color: var(--text); margin-bottom: 20px; }
.alertcard .pico { --c: #ecd29f; --cs: #fff; --ct: #8a6024; }
.alertcard .chev { margin-left: auto; font-size: 1.6rem; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick .btn .ic { display: inline-block; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 99px; width: fit-content; max-width: 100%; }
.segbtn { border: 0; background: none; padding: 8px 16px; border-radius: 99px; font-weight: 600; cursor: pointer; color: var(--muted); font-size: .9rem; }
.segbtn.on { background: var(--green-dark); color: #fff; }
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 14px 16px; position: relative; }
.switch input { position: absolute; opacity: 0; }
.knob { flex: none; width: 46px; height: 26px; border-radius: 99px; background: #d8cfbf; position: relative; transition: .2s; }
.knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + .knob { background: var(--green); }
.switch input:checked + .knob::after { transform: translateX(20px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--gold); outline-offset: 2px; }
.swl small { display: block; color: var(--muted); }
.rtop { display: flex; align-items: center; gap: 12px; }
.rtop .grow { flex: 1; min-width: 0; }
.ractions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.quote { border-left: 3px solid var(--line); padding-left: 10px; margin: 10px 0 0; color: var(--muted); }
.selectable { user-select: all; word-break: break-all; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--green); color: #fff; font-size: .68rem; font-style: normal; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.tico { position: relative; }
.tico .badge { position: absolute; top: -4px; right: -6px; }
.nav a .badge { margin-left: auto; background: #e9b36b; color: #1d3247; }
.ngroup { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .6; margin: 16px 12px 6px; font-weight: 700; }
.eyebrow-s { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.muted-s { opacity: .7; }
.mylink { color: #fff; opacity: .8; display: block; margin-top: 6px; font-size: .88rem; }
.sclose, .scrim, .tabbar { display: none; }

/* pages publiques */
.pub { min-height: 100vh; background: var(--bg); }
.pubhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px max(16px, calc((100% - 980px) / 2)); background: #fffaf2; border-bottom: 1px solid var(--line); }
.plogo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.plogo .ar { font-size: 1.7rem; color: var(--green); line-height: 1; }
.pname { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.pubhead nav { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: .9rem; }
.pubhead nav a:not(.btn) { color: var(--text); text-decoration: none; }
.pubhead nav a.btn.primary { color: #fff; }
.pubmain { max-width: 980px; margin: 0 auto; padding: 26px max(16px, env(safe-area-inset-left, 0px)) 130px; padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.cgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ocard { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.ocard p { margin: 0; }
.otop { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.otop h3 { font-size: 1.25rem; }
.ctabar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; margin-top: 28px; }
.ctabar .btn { box-shadow: 0 6px 18px rgba(60, 40, 20, .2); }
.stepper { list-style: none; display: flex; gap: 14px; padding: 0; margin: 0 0 20px; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.stepper li span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .78rem; background: #fff; }
.stepper li.on { color: var(--text); }
.stepper li.on span { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.stepper li.past span { background: var(--green); border-color: var(--green); color: #fff; }
.courses { display: grid; gap: 10px; }
.course { display: block; cursor: pointer; position: relative; }
.course input { position: absolute; opacity: 0; }
.cbody { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px 14px 52px; background: #fff; border: 2px solid var(--line); border-radius: 20px; transition: .12s; }
.cbody b { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.ctick { position: absolute; left: 16px; top: 16px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.course:hover .cbody { border-color: var(--green); }
.course input:checked + .cbody { border-color: var(--green); background: var(--green-soft); }
.course input:checked + .cbody .ctick { background: var(--green); border-color: var(--green); color: #fff; }
.course input:focus-visible + .cbody { outline: 2px solid var(--gold); outline-offset: 2px; }
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; justify-content: center; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: #fffaf2; border-top: 1px solid var(--line); z-index: 20; }
.stickybar .btn { flex: 1; max-width: 240px; }
.stickybar.inline { position: static; background: none; border: 0; padding: 8px 0 0; }
.consent { align-items: flex-start; font-size: .9rem; line-height: 1.45; }
.consent input { margin-top: 3px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sumcard { padding: 14px 16px; }
.donebox { text-align: center; max-width: 560px; margin: 24px auto 0; display: grid; gap: 10px; justify-items: center; }
.bigcheck { width: 76px; height: 76px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.loginlinks { display: grid; gap: 10px; margin-top: 14px; text-align: center; font-size: .9rem; }
.loginlinks .btn { width: 100%; }

/* mobile : barre du haut + onglets ronds + menu latéral clair */
@media (max-width: 820px) {
  .topbar { background: #fffaf2; color: var(--text); border-bottom: 1px solid var(--line); min-height: 58px; padding: 8px 16px; justify-content: space-between; gap: 12px; }
  .topbar .ar { color: var(--green); font-size: 1.6rem; line-height: 1; }
  .topbar .ptitle { font-family: var(--serif); font-size: 1.45rem; flex: 1; font-weight: 700; }
  .avatar { width: 40px; height: 40px; border-radius: 50%; background: #e9b36b; color: #1d3247; display: grid; place-items: center; font-weight: 700; text-decoration: none; font-size: .9rem; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 6px 8px; background: #fffaf2; border-bottom: 1px solid var(--line); position: sticky; top: calc(58px + env(safe-area-inset-top, 0px)); z-index: 30; }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border: 0; background: none; border-radius: 16px; color: var(--muted); font-size: .72rem; font-weight: 600; text-decoration: none; cursor: pointer; min-width: 0; }
  .tab > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab .tico { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--green-dark); }
  .tab.on { background: var(--green-soft); color: var(--text); }
  .tab.on .tico { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(20, 30, 40, .5); z-index: 39; opacity: 0; pointer-events: none; transition: .2s; }
  .scrim.on { opacity: 1; pointer-events: auto; }
  .side { background: #fffaf2; color: var(--text); width: min(86vw, 330px); overflow-y: auto; padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
  .side.open { box-shadow: 8px 0 30px rgba(0, 0, 0, .2); }
  .side .logo .ar { color: var(--green); }
  .nav a { color: var(--text); padding: 13px 14px; }
  .nav a:hover { background: var(--green-soft); }
  .nav a.on { background: #e9b36b; color: #1d3247; font-weight: 700; }
  .ngroup { opacity: .75; }
  .side .me { border-top: 1px solid var(--line); }
  .side .me .btn { background: #fff; color: #b3475f; border-color: #e3b3bf; padding: 12px; }
  .mylink { color: var(--green); }
  .sclose { display: block; position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 14px; border: 0; background: none; font-size: 1.8rem; color: var(--green-dark); cursor: pointer; line-height: 1; }
  .side { height: 100%; }
  .pname { display: none; }
  .stepper { gap: 8px; } .stepper li { font-size: .78rem; }
}

.plogo .ar { white-space: nowrap; }
.pubhead nav { white-space: nowrap; }
@media (max-width: 520px) { .pubhead nav a:not(.btn) { font-size: .78rem; white-space: normal; text-align: right; max-width: 90px; line-height: 1.2; } }

/* ---- présences, tableaux, import CSV, professeurs */
.sb { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #efe7da; color: var(--muted); }
.sb.present { background: #e3f1e7; color: #2b6b46; }
.sb.late { background: var(--gold-soft); color: #7a5524; }
.sb.absent { background: var(--danger-soft); color: var(--danger); }
.sb.excused { background: #e5edf4; color: var(--green-dark); }
.chips.ro { display: flex; flex-wrap: wrap; gap: 8px; }
.dchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.dchip { flex: none; position: relative; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 14px; font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; text-transform: capitalize; color: var(--text); }
.dchip.on { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.dchip .dot { position: absolute; top: 3px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #2f9d5f; }
.alist { display: grid; gap: 8px; padding-bottom: 76px; }
.arow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.aname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.aname .av { width: 36px; height: 36px; font-size: .85rem; }
.aname b { overflow: hidden; text-overflow: ellipsis; }
.stbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.stbtn { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; min-height: 36px; }
.stbtn.on.present { background: #2f9d5f; border-color: #2f9d5f; color: #fff; }
.stbtn.on.late { background: #c8932f; border-color: #c8932f; color: #fff; }
.stbtn.on.absent { background: var(--danger); border-color: var(--danger); color: #fff; }
.stbtn.on.excused { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.sticky-save { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; margin-top: -60px; pointer-events: none; }
.sticky-save .btn { pointer-events: auto; box-shadow: var(--shadow); padding-inline: 28px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #fbf6ec; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.bad td { background: #fdf1ee; }
.rate { display: inline-block; vertical-align: middle; width: 70px; height: 8px; border-radius: 99px; background: #efe7da; overflow: hidden; margin-right: 8px; }
.rate i { display: block; height: 100%; background: #2f9d5f; }
.ratecell { white-space: nowrap; }
.ratebig { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--green-dark); }
.hrow { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.inl { display: flex; gap: 8px; align-items: center; }
.inl input { flex: 1; min-width: 0; }
.pre { margin: 0 0 8px; padding: 10px; background: #fbf6ec; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; font-size: .8rem; white-space: pre; }
.classcard .rtop { display: flex; align-items: center; gap: 12px; }
@media (max-width: 820px) { .head .quick { margin-top: 8px; } }
.main, .main > * { min-width: 0; }
.toolbar > select { max-width: 100%; min-width: 0; }
@media (max-width: 820px) { .shell { grid-template-columns: minmax(0, 1fr); } }

/* logo */
.logo-img { display: block; width: 170px; max-width: 60%; height: auto; margin: 0 auto 6px; }
.plogo-img { display: block; height: 64px; width: auto; }
.side .logo-badge { background: #fff; border-radius: 14px; padding: 6px 8px; margin-bottom: 8px; }
.side .logo-badge img { display: block; width: 100%; height: auto; max-height: 110px; object-fit: contain; }
@media (max-width: 820px) { .plogo-img { height: 44px; } }

.logo-img, .plogo-img, .top-img { mix-blend-mode: multiply; }
.top-img { height: 38px; width: auto; display: block; }
.top-img { height: 46px; margin: -4px 0; }

/* inscription : présentation + choix de classe (style plateforme d'inscription) */
.hero { text-align: center; padding: 18px 0 8px; }
.hero-logo { display: block; width: 150px; height: auto; margin: 0 auto 8px; mix-blend-mode: multiply; }
.hero h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin: 4px 0 8px; }
.hero .lead { max-width: 560px; margin: 0 auto 16px; color: var(--muted); font-size: 1.05rem; }
.herobtns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.herobtns .btn { flex: 0 1 auto; text-decoration: none; }
.trust { margin: 14px 0 0; font-size: .82rem; color: var(--muted); }
.steplist { list-style: none; counter-reset: s; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding: 0; margin: 22px 0; }
.steplist li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 14px 52px; position: relative; display: grid; gap: 2px; }
.steplist li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--green-dark); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.steplist li span { font-size: .85rem; color: var(--muted); }
.stepper.prog { justify-content: center; margin: 8px 0 22px; position: relative; }
.sech { font-family: var(--serif); font-size: 1.9rem; margin: 6px 0 4px; }
.legend { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 14px; }
.lg { --c: var(--green); --cs: #f8e9df; display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--text); }
.lg i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); flex: none; }
.lg span { color: var(--muted); font-size: .85rem; margin-left: auto; }
.lg.on { border-color: var(--c); background: var(--cs); }
.lg.sec-jeunesse { --c: #3b6b96; --cs: #e5edf4; }
.course.sec-soeurs { --c: var(--green); --cs: #f8e9df; }
.course.sec-jeunesse { --c: #3b6b96; --cs: #e5edf4; }
.course .cbody { border-left: 6px solid var(--c, var(--line)); }
.course input:checked + .cbody { border-color: var(--c, var(--green)); background: var(--cs, var(--green-soft)); }
.course input:checked + .cbody .ctick { background: var(--c, var(--green)); border-color: var(--c, var(--green)); }
.course:hover .cbody { border-color: var(--c, var(--green)); }
.stickybar .btn.primary { max-width: 420px; }
