/* ════ Espace École — bleu nuit, mise en page éditoriale (inspirée du site Withcam) ════ */
:root {
  --bg: #060a14; --bg-2: #0a1020; --surface: rgba(140,170,230,.045); --surface-2: rgba(140,170,230,.08);
  --line: rgba(150,175,230,.13); --line-2: rgba(150,175,230,.22);
  --text: #eef2fb; --text-2: #a3b0cc; --muted: #6f7d9c;
  --accent: #4da3ff; --accent-2: #2b8cf0; --accent-soft: rgba(77,163,255,.14);
  --green: #3ddc84; --amber: #f5c04a; --red: #ff6b5e;
  --text-secondary: var(--text-2); --card-border: var(--line); --card-bg: var(--surface);
  --ease: cubic-bezier(.22,1,.36,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Roboto, Arial, sans-serif;
  min-height: 100vh; -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.5; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 70% 45% at 15% -5%, rgba(77,163,255,.13), transparent 60%), radial-gradient(ellipse 50% 40% at 100% 0%, rgba(110,90,255,.08), transparent 60%); }
::selection { background: rgba(77,163,255,.35); }

/* ── Barre du haut ── */
nav { position: sticky; top: 0; z-index: 100; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(6,10,20,.78); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
nav .brand { flex: 1; } nav .brand img { height: 20px; display: block; }
nav .nav-pill { display: none; }
nav .nav-right { display: flex; gap: 8px; align-items: center; }
.who { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); padding: 4px 4px 4px 12px; border-radius: var(--wc-r-pilule); border: 1px solid var(--line); background: var(--surface); }
.who:empty { display: none; }
.who button { border: 0; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 12px; padding: 4px 11px; border-radius: var(--wc-r-pilule); cursor: pointer; transition: color .2s, background .2s; }
.who button:hover { color: var(--text); background: rgba(140,170,230,.16); }

/* ── Mise en page ── */
.wrap { max-width: 1120px; margin: 0 auto; padding: clamp(36px, 7vw, 76px) clamp(16px, 4vw, 40px) 110px; }
.hero { margin-bottom: clamp(28px, 5vw, 48px); }
.hero::before { content: 'Espace École'; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.hero h1 { font-size: clamp(36px, 6.2vw, 64px); font-weight: 700; letter-spacing: -.04em; line-height: 1.02; }
.hero p { color: var(--text-2); font-size: clamp(15px, 1.6vw, 18px); margin-top: 14px; max-width: 60ch; white-space: pre-wrap; line-height: 1.6; }

/* ── Onglets : texte et trait, sans boîtes ── */
.tabs { display: flex; gap: clamp(16px, 3vw, 30px); margin-bottom: 30px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; flex: none; padding: 0 0 14px; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; transition: color .25s; }
.tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; transform: scaleX(0); transition: transform .4s var(--ease); }
.tab:hover { color: var(--text-2); }
.tab.on { color: var(--text); } .tab.on::after { transform: scaleX(1); }
.tab .nb { font-size: 11px; font-weight: 700; background: rgba(245,192,74,.16); color: var(--amber); border-radius: var(--wc-r-pilule); padding: 2px 8px; margin-left: 6px; vertical-align: 1px; }
.pane { display: none; }
.pane.on { display: block; }
.pane.on > * { animation: none; }
@keyframes monte { from { transform: translateY(10px); } }   /* sans opacité : un contenu ne peut jamais rester invisible */

/* ── Boutons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: var(--wc-r-m); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; color: var(--text); background: none; white-space: nowrap; text-decoration: none; transition: background .2s, border-color .2s, transform .15s, box-shadow .25s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #031122; box-shadow: 0 6px 20px rgba(77,163,255,.22); }
.btn-primary:hover { background: #6db4ff; box-shadow: 0 8px 26px rgba(77,163,255,.32); }
.btn-secondary { border-color: var(--line-2); background: var(--surface); }
.btn-secondary:hover { border-color: rgba(150,175,230,.38); background: var(--surface-2); }
.btn-danger { color: var(--red); border-color: rgba(255,107,94,.28); }
.btn-danger:hover { background: rgba(255,107,94,.1); }
.btn-ok { color: var(--green); border-color: rgba(61,220,132,.3); }
.btn-ok:hover { background: rgba(61,220,132,.1); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: var(--wc-r-s); }
.btn:disabled { opacity: .4; cursor: default; }
.barre-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.barre-actions .aide-txt { font-size: 13.5px; color: var(--muted); }

/* ── Informations : blocs éditoriaux, séparés par des filets ── */
.card { padding: 26px 0; border-top: 1px solid var(--line); }
.card:last-child { border-bottom: 1px solid var(--line); }
.card h3 { font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card .body { font-size: 15.5px; color: var(--text-2); white-space: pre-wrap; line-height: 1.7; max-width: 72ch; }
.card .meta { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.card .meta a { text-decoration: none; }
.pin { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); background: rgba(245,192,74,.12); padding: 3px 8px; border-radius: var(--wc-r-s); }
.auteur { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: var(--wc-r-pilule); border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; letter-spacing: 0; }
.auteur.ecole { border-color: rgba(77,163,255,.35); color: #8cc4ff; }
.auteur.moi { border-color: rgba(61,220,132,.35); color: var(--green); }

/* ── Lignes (documents, liens) ── */
.row { display: flex; align-items: center; gap: 14px; padding: 16px 6px; border-top: 1px solid var(--line); border-radius: 0; transition: background .2s; }
.row:last-child { border-bottom: 1px solid var(--line); }
.row:hover { background: rgba(140,170,230,.035); }
.row .ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--wc-r-m); display: grid; place-items: center; font-size: 17px; background: var(--accent-soft); }
.row .grow { flex: 1; min-width: 0; }
.row .nm { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.row .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.row .act { display: flex; gap: 8px; flex: 0 0 auto; align-items: center; }
.row a.nm { color: var(--text); text-decoration: none; } .row a.nm:hover { color: var(--accent); }

.empty { text-align: center; padding: 64px 20px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.empty .big { font-size: 38px; margin-bottom: 14px; opacity: .55; }

/* ── Matériel ── */
.grid-inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.it { position: relative; border-radius: var(--wc-r-l); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .35s var(--ease), border-color .25s, box-shadow .35s; }
.it:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 16px 34px rgba(0,0,0,.35); }
.it img { width: 100%; height: 130px; object-fit: contain; background: radial-gradient(circle at 50% 40%, #121b33, #0a1022); display: block; padding: 10px; }
.it .in { padding: 12px 14px 14px; }
.it .n { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it .b { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it .plus { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(10,16,32,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--text); font-size: 19px; line-height: 1; cursor: pointer; transition: background .2s, transform .2s, border-color .2s; }
.it .plus:hover { background: var(--accent); color: #031122; border-color: var(--accent); transform: scale(1.06); }
.it .etat-it { position: absolute; top: 12px; left: 12px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: var(--wc-r-s); }
.catbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip { padding: 7px 14px; border-radius: var(--wc-r-pilule); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: none; border: 1px solid var(--line-2); color: var(--text-2); transition: all .2s; }
.chip:hover { color: var(--text); border-color: rgba(150,175,230,.4); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ── Listes ── */
.liste { border: 1px solid var(--line); border-radius: var(--wc-r-xl); margin-bottom: 14px; overflow: hidden; background: var(--surface); transition: border-color .25s; }
.liste:hover { border-color: var(--line-2); }
.liste .tete { display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; flex-wrap: wrap; }
.liste .tete .grow { flex: 1; min-width: 180px; }
.liste .tete .nm { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.liste .tete .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.liste .corps { display: none; padding: 0 20px 20px; border-top: 1px solid var(--line); }
.liste.ouverte .corps { display: block; animation: monte .4s var(--ease) both; }
.liste .lignes { margin: 14px 0 16px; display: flex; flex-direction: column; }
.liste .ligne { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.liste .ligne img { width: 46px; height: 34px; object-fit: contain; background: #0c1428; border-radius: var(--wc-r-s); }
.liste .ligne .grow { flex: 1; min-width: 0; }
.liste .ligne .conf { font-size: 12px; color: var(--red); margin-top: 2px; }
.statut { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--wc-r-pilule); letter-spacing: .02em; white-space: nowrap; text-transform: none; }
.st-pending { background: rgba(245,192,74,.12); color: var(--amber); }
.st-approved { background: rgba(61,220,132,.12); color: var(--green); }
.st-rejected { background: rgba(255,107,94,.12); color: var(--red); }

/* ── Choix du matériel ── */
.choix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; max-height: 54vh; overflow: auto; padding: 3px; margin-top: 14px; }
.choix { position: relative; border: 1.5px solid var(--line); border-radius: var(--wc-r-l); overflow: hidden; cursor: pointer; background: var(--surface); transition: border-color .2s, background .2s, transform .2s; }
.choix:hover { border-color: var(--line-2); }
.choix img { width: 100%; height: 88px; object-fit: contain; background: #0c1428; display: block; padding: 6px; }
.choix .n { font-size: 13px; font-weight: 600; padding: 8px 10px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choix .d { font-size: 11.5px; padding: 0 10px 9px; color: var(--muted); }
.choix.sel { border-color: var(--accent); background: rgba(77,163,255,.09); }
.choix.sel::after { content: '✓'; position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #031122; font-size: 13px; display: grid; place-items: center; font-weight: 800; animation: pop .3s var(--ease); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.choix.indispo { opacity: .4; cursor: not-allowed; }
.choix .d.rouge { color: var(--red); } .choix .d.orange { color: var(--amber); }

/* ── Planning : frise ── */
.bk { display: flex; align-items: center; gap: 18px; padding: 18px 4px; border-top: 1px solid var(--line); }
.bk:last-child { border-bottom: 1px solid var(--line); }
.bk.autre { opacity: .6; }
.bk .dt { flex: 0 0 110px; font-size: 13px; font-weight: 700; color: var(--accent); line-height: 1.4; }
.bk.autre .dt { color: var(--muted); }
.bk .grow { flex: 1; min-width: 0; } .bk .nm { font-size: 15px; font-weight: 600; } .bk .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ── Champs ── */
input[type=text], input[type=password], input[type=url], input[type=date], input[type=search], input[type=tel], input[type=number], input[type=time], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: var(--wc-r-m); border: 1px solid var(--line-2); background: rgba(140,170,230,.05); color: var(--text); font: inherit; font-size: 15px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { border-color: rgba(77,163,255,.6); background: rgba(140,170,230,.08); box-shadow: 0 0 0 4px rgba(77,163,255,.12); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type=date], input[type=time] { color-scheme: dark; }
select { -webkit-appearance: none; appearance: none; background-color: #0d1528; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 17px) 54%, calc(100% - 12px) 54%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: #0d1528; color: var(--text); }
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
label.f { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin: 16px 0 7px; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Fenêtres ── */
.modal-bd { position: fixed; inset: 0; background: rgba(3,6,14,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 200; display: none; }
.modal-bd.open { display: block; animation: fondu .3s ease both; }
@keyframes fondu { from { opacity: 0; } }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 201; background: linear-gradient(180deg, #0e1730, #0a1124); border: 1px solid var(--line-2); border-radius: var(--wc-r-xl); padding: 28px;
  width: min(560px, calc(100vw - 28px)); max-height: 88vh; overflow: auto; display: none; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.modal.large { width: min(880px, calc(100vw - 28px)); }
.modal.open { display: block; animation: entree .45s var(--ease) both; }
@keyframes entree { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(.98); } }
.modal h2 { font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 6px; }
.modal .intro-m { font-size: 14px; color: var(--text-2); margin-bottom: 8px; line-height: 1.6; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; align-items: center; flex-wrap: wrap; }
.modal .foot .sp { flex: 1; font-size: 13px; color: var(--muted); }
.err { color: var(--red); font-size: 13px; margin-top: 10px; white-space: pre-wrap; }
.err:empty { display: none; }

/* ── Entrée : choix de l'élève ── */
.eleves { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; margin-top: 16px; padding: 2px; }
.eleve-btn { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--wc-r-l); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 15.5px; cursor: pointer; text-align: left;
  transition: border-color .2s, background .2s, transform .2s var(--ease); }
.eleve-btn:hover { border-color: rgba(77,163,255,.5); background: rgba(77,163,255,.08); transform: translateX(3px); }
.eleve-btn:disabled { opacity: .5; cursor: default; transform: none; }
.eleve-btn .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none;
  background: linear-gradient(135deg, rgba(77,163,255,.32), rgba(110,90,255,.28)); color: #dbeaff; }
.eleve-btn b { font-weight: 700; }
.confirme { text-align: center; padding: 14px 0 4px; }
.confirme .av { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 700; margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(77,163,255,.4), rgba(110,90,255,.34)); color: #fff; box-shadow: 0 10px 30px rgba(77,163,255,.25); animation: pop .45s var(--ease); }
.confirme .qui { font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; }

/* ── Gestion des élèves ── */
.el-ligne { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.el-ligne .grow { flex: 1; }
.el-ligne.inactif .grow { opacity: .4; text-decoration: line-through; }

/* ── Barre admin ── */
.adminbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 30px; border-radius: var(--wc-r-l); font-size: 13.5px; color: var(--text-2);
  background: linear-gradient(90deg, rgba(77,163,255,.1), rgba(77,163,255,.03)); border: 1px solid rgba(77,163,255,.22); }
.adminbar .sp { flex: 1; }
.hide { display: none !important; }

/* ── Tutoriel ── */
.tuto-voile { position: fixed; inset: 0; z-index: 400; display: none; }
.tuto-voile.on { display: block; }
.tuto-trou { position: fixed; border-radius: var(--wc-r-l); box-shadow: 0 0 0 9999px rgba(3,6,14,.74); transition: all .45s var(--ease); pointer-events: none; outline: 2px solid var(--accent); outline-offset: 3px; }
.tuto-carte { position: fixed; z-index: 401; width: min(370px, calc(100vw - 32px)); background: linear-gradient(180deg, #0f1932, #0a1124); border: 1px solid rgba(77,163,255,.35); border-radius: var(--wc-r-xl); padding: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6); transition: top .45s var(--ease), left .45s var(--ease); }
.tuto-carte .etape { font-size: 12px; font-weight: 600; color: var(--accent); }
.tuto-carte h3 { font-size: 21px; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 10px; }
.tuto-carte p { font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.tuto-carte .pts { display: flex; gap: 6px; margin-top: 16px; }
.tuto-carte .pts i { width: 18px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); transition: background .3s; }
.tuto-carte .pts i.on { background: var(--accent); }
.tuto-carte .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; align-items: center; }
.tuto-carte .foot .sp { flex: 1; }
.lien-discret { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.lien-discret:hover { color: var(--text); }

@media (max-width: 640px) {
  .wrap { padding-top: 30px; }
  .deux { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; } .row .act { width: 100%; justify-content: flex-end; }
  .grid-inv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .it img { height: 104px; }
  .bk .dt { flex-basis: 84px; }
  .modal { padding: 22px; border-radius: var(--wc-r-xl); }
  .liste .tete { padding: 16px; } .liste .corps { padding: 0 16px 16px; }
}

/* ════ Version « appli » ════════════════════════════════════════════════ */
body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.app-tete { position: sticky; top: 0; z-index: 100; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 58px; padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0px); background: rgba(6,10,20,.82); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.app-tete .logo img { height: 17px; display: block; }
.app-titre { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.avatar { justify-self: end; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #4da3ff, #6e5aff); box-shadow: 0 4px 14px rgba(77,163,255,.3); }
.avatar:empty { visibility: hidden; }
.app { max-width: 720px; margin: 0 auto; padding: 22px 16px 30px; }
.pane.on > * { animation: none; }

/* Barre du bas */
.barre-bas { position: fixed; z-index: 120; left: 0; right: 0; top: auto; bottom: 0; height: auto; gap: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(8,13,26,.92); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px); border-top: 1px solid var(--line); }
.barre-bas .tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .2s; }
.barre-bas .tab::after { display: none; }
.barre-bas .tab svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.barre-bas .tab[data-p="plus"] svg { fill: currentColor; stroke: none; }
.barre-bas .tab.on { color: var(--accent); }
.barre-bas .tab.on svg { transform: translateY(-1px) scale(1.06); }
.barre-bas .tab:active svg { transform: scale(.9); }
.barre-bas .nb { position: absolute; top: 3px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--wc-r-s); background: var(--red); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; display: grid; place-items: center; }
@media (min-width: 760px) { .barre-bas { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); width: 440px; border-radius: var(--wc-r-xl); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0,0,0,.45); padding-bottom: 6px; } }

/* Accueil */
.salut { margin: 6px 0 22px; }
.surt { font-size: 13px; color: var(--muted); text-transform: capitalize; }
.salut h1 { font-size: clamp(32px, 9vw, 44px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; margin-top: 4px; }
.intro-txt { color: var(--text-2); font-size: 15px; margin-top: 8px; line-height: 1.55; white-space: pre-wrap; }
.intro-txt:empty { display: none; }
.gros-cta { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; border: 0; border-radius: var(--wc-r-xl); cursor: pointer; text-align: left; color: #fff; font: inherit;
  background: linear-gradient(135deg, #2f8bf0, #5b5cf0); box-shadow: 0 14px 34px rgba(60,120,255,.32); margin-bottom: 18px; transition: transform .2s var(--ease), box-shadow .25s; -webkit-tap-highlight-color: transparent; }
.gros-cta:active { transform: scale(.98); }
.gros-cta .ic { width: 50px; height: 50px; flex: none; border-radius: var(--wc-r-l); background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 24px; font-weight: 300; }
.gros-cta .tx { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.gros-cta b { font-size: 18px; letter-spacing: -.01em; } .gros-cta small { font-size: 13px; opacity: .85; line-height: 1.35; }
.gros-cta .fl { font-size: 28px; opacity: .7; }
.gros-cta.petit { padding: 14px 16px; } .gros-cta.petit .ic { width: 42px; height: 42px; font-size: 26px; } .gros-cta.petit b { font-size: 16px; }
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 26px; }
.tuile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: var(--wc-r-xl); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background .2s, transform .2s var(--ease); -webkit-tap-highlight-color: transparent; }
.tuile:active { transform: scale(.97); }
.tuile .em { font-size: 22px; }
.tuile b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.tuile span { font-size: 13px; color: var(--text-2); }
.tuile .pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--wc-r-pilule); margin-top: 4px; }
.sec-t { display: flex; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 10px; }
.sec-t .voir { margin-left: auto; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; cursor: pointer; }
.prochaine { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--wc-r-xl); border: 1px solid var(--line); background: var(--surface); margin-bottom: 26px; cursor: pointer; }
.prochaine .cal { width: 58px; flex: none; border-radius: var(--wc-r-l); overflow: hidden; text-align: center; background: #0d1730; border: 1px solid var(--line-2); }
.prochaine .cal small { display: block; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 0; text-transform: uppercase; }
.prochaine .cal b { display: block; font-size: 24px; font-weight: 800; padding: 4px 0 6px; }
.prochaine .grow { flex: 1; min-width: 0; } .prochaine .nm { font-size: 16px; font-weight: 700; } .prochaine .sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.vide-carte { padding: 18px; border-radius: var(--wc-r-xl); border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; text-align: center; margin-bottom: 26px; line-height: 1.5; }
.mini-info { padding: 14px 16px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; }
.mini-info b { display: block; font-size: 15px; } .mini-info p { font-size: 13.5px; color: var(--text-2); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adminbar { padding: 0; background: none; border: 0; margin: -6px 0 18px; gap: 8px; }

/* Matériel */
.recherche { border-radius: var(--wc-r-l) !important; padding: 13px 16px !important; margin-bottom: 12px; }
.catbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
.catbar::-webkit-scrollbar { display: none; }
.chip { flex: none; }
.astuce { font-size: 13px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.grid-inv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .grid-inv { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.it { border-radius: var(--wc-r-xl); }
.it .plus { width: 38px; height: 38px; font-size: 22px; background: var(--accent); color: #031122; border: 0; box-shadow: 0 4px 12px rgba(0,0,0,.4); }

/* Listes */
.liste { border-radius: var(--wc-r-xl); }
.liste .tete .nm { font-size: 17px; }

/* Plus */
.profil { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--wc-r-xl); background: var(--surface); border: 1px solid var(--line); margin-bottom: 18px; }
.profil .av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #4da3ff, #6e5aff); flex: none; }
.profil b { display: block; font-size: 19px; letter-spacing: -.02em; } .profil small { color: var(--muted); font-size: 13px; }
.menu { border-radius: var(--wc-r-xl); border: 1px solid var(--line); background: var(--surface); overflow: hidden; margin-bottom: 16px; }
.menu button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: 16px; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.menu button:last-child { border-bottom: 0; }
.menu button:active { background: var(--surface-2); }
.menu .mi { width: 34px; height: 34px; border-radius: var(--wc-r-m); display: grid; place-items: center; background: var(--surface-2); font-size: 17px; }
.menu .fl, .gros-cta .fl { margin-left: auto; }
.menu .fl { color: var(--muted); font-size: 22px; }
.retour { border: 0; background: none; color: var(--accent); font: inherit; font-size: 16px; font-weight: 600; padding: 0 0 14px; cursor: pointer; }

/* Fenêtres : feuilles qui montent du bas sur mobile */
@media (max-width: 640px) {
  .modal, .modal.large { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: 92vh; border-radius: var(--wc-r-xl) var(--wc-r-xl) 0 0; padding: 26px 18px calc(22px + env(safe-area-inset-bottom, 0px)); border-left: 0; border-right: 0; border-bottom: 0; }
  .modal.open { animation: feuille .42s var(--ease) both; }
  .modal::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.2); margin: -12px auto 16px; }
  .modal .foot .btn { flex: 1; padding: 14px; font-size: 15px; }
  .tuto-carte { left: 12px !important; right: 12px; width: auto; }
}
@keyframes feuille { from { transform: translateY(100%); } }
.btn { min-height: 44px; }
.btn-sm { min-height: 36px; }

/* ════ Réservations (mobile d'abord) ════ */
.liste .tete { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; padding: 16px 18px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lt-haut { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lt-haut .chev { margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; transition: transform .3s var(--ease); }
.liste.ouverte .chev { transform: rotate(180deg); }
.liste .tete .nm { font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; }
.liste .tete .sub { font-size: 13.5px; color: var(--muted); margin: 0; }
.liste .corps { padding: 0 18px 18px; }
.note-statut { margin: 14px 0 4px; padding: 10px 12px; border-radius: var(--wc-r-m); font-size: 13.5px; line-height: 1.45; }
.liste .lignes { margin: 10px 0 14px; }
.liste .ligne { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.liste .ligne:last-child { border-bottom: 0; }
.liste .ligne img, .liste .ligne .img-vide { width: 52px; height: 40px; flex: none; object-fit: contain; background: #0c1428; border-radius: var(--wc-r-s); }
.liste .ligne .grow { flex: 1; min-width: 0; }
.liste .ligne .lnom { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.liste .ligne .conf { font-size: 12.5px; color: var(--red); margin-top: 3px; line-height: 1.35; }
.liste .ligne.conflit .lnom { color: #ffd2cd; }
.liste .ligne .x { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--text-2); font-size: 14px; cursor: pointer; }
.liste .ligne .x:active { background: rgba(255,107,94,.15); color: var(--red); }
.vide-liste { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line-2); border-radius: var(--wc-r-m); }
.btn.plein { width: 100%; padding: 14px; font-size: 15.5px; }
.deux-btn { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.deux-btn:empty { display: none; }
.deux-btn .btn { width: 100%; }
/* fenêtre de choix : en-tête, grille qui défile, pied toujours visible */
#m-choix.open { display: flex; flex-direction: column; padding-bottom: 0; }
#m-choix .choix-tete { flex: none; }
#m-choix h2 { font-size: 22px; overflow-wrap: anywhere; }
#m-choix #choix-recherche { margin-top: 6px; }
.choix-cats { margin: 12px -28px 4px; padding: 0 28px; }
.choix-grid { flex: 1; min-height: 0; max-height: none; margin-top: 8px; grid-auto-rows: max-content; align-content: start; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding-bottom: 12px; }
.choix-pied { flex: none; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 14px 0 calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: inherit; }
.choix-pied .btn { padding: 14px; font-size: 15.5px; }
#m-choix { height: min(760px, 88vh); }
@media (max-width: 640px) {
  #m-choix { height: 92vh; }
  .choix-cats { margin: 12px -18px 4px; padding: 0 18px; }
  .choix-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .choix img { height: 80px; }
}

/* Barre d'onglets plus grande (plus facile à toucher) */
body { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
.barre-bas { padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); background: #080d1a !important; }
.barre-bas .tab { gap: 5px; padding: 10px 0 6px; font-size: 12.5px; border-radius: var(--wc-r-l); }
.barre-bas .tab svg { width: 30px; height: 30px; }
.barre-bas .tab.on { background: rgba(77,163,255,.12); }
.barre-bas .nb { top: 4px; left: calc(50% + 10px); }
@media (min-width: 760px) { .barre-bas { width: 500px; padding: 8px 10px; } }

/* ════ Planning en calendrier ════ */
.cal-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-titre { flex: 1; text-align: center; } .cal-titre b { display: block; font-size: 20px; letter-spacing: -.02em; text-transform: capitalize; } .cal-titre small { color: var(--muted); font-size: 13px; }
.cal-fl { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }
.cal-fl:active { background: var(--surface-2); }
.cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px; border-radius: var(--wc-r-xl); background: var(--surface); border: 1px solid var(--line); }
.cal-grille .js { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0 6px; }
.cj { aspect-ratio: 1 / 1.05; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding-top: 7px; border-radius: var(--wc-r-m); border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cj.vide { pointer-events: none; }
.cj .num { font-size: 15px; font-weight: 600; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.cj.passe .num { color: var(--muted); }
.cj.auj .num { background: var(--red); color: #fff; }
.cj.sel { background: rgba(77,163,255,.16); }
.cj.sel:not(.auj) .num { color: var(--accent); }
.cj .pts { display: flex; gap: 3px; align-items: center; height: 7px; }
.pt { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pt-moi, .pt-eleve { background: var(--accent); } .pt-ecole { background: var(--green); } .pt-autre { background: #8a96b3; }
.pt.attente { background: none; box-shadow: inset 0 0 0 1.5px var(--amber); }
.plus-pts { font-size: 9px; color: var(--muted); }
.cal-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 4px 22px; font-size: 12.5px; color: var(--muted); }
.cal-legende span { display: inline-flex; align-items: center; gap: 6px; }
.cal-jour h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.cal-ent { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; }
.cal-ent.t-autre { cursor: default; opacity: .7; }
.cal-ent .barre { width: 4px; align-self: stretch; border-radius: 2px; background: var(--accent); }
.cal-ent.t-ecole .barre { background: var(--green); } .cal-ent.t-autre .barre { background: #8a96b3; }
.cal-ent .grow { flex: 1; min-width: 0; } .cal-ent b { display: block; font-size: 15px; overflow-wrap: anywhere; } .cal-ent small { color: var(--muted); font-size: 12.5px; }
.app-titre { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
@media (max-width: 380px) { .app-tete .logo img { height: 14px; } .app-titre { font-size: 15px; } }

/* ════ Groupe d'une liste ════ */
.groupe-choisis { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.groupe-choisis:empty { display: none; }
.membre { display: inline-flex; align-items: center; gap: 7px; padding: 4px 4px 4px 4px; border-radius: var(--wc-r-pilule); background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13.5px; }
.membre .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: linear-gradient(135deg, rgba(77,163,255,.4), rgba(110,90,255,.34)); color: #fff; }
.membre button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; }
.groupe-propos { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.groupe-propos .eleve-btn { padding: 9px 12px; font-size: 14.5px; }
.groupe-propos .eleve-btn .av { width: 30px; height: 30px; font-size: 11px; }
.grp { font-size: 13px; color: #8cc4ff; line-height: 1.35; overflow-wrap: anywhere; }

/* ════ Correctifs Safari iPhone ════ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }   /* Safari grossissait certains textes de lui-même */
.deux > * { min-width: 0; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 48px; text-align: left; line-height: 1.2; }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8); }
.modal input, .modal select, .modal textarea { max-width: 100%; }
label.f { font-size: 13px !important; line-height: 1.4; }

/* ════ Téléphone au zoom normal : plus compact ════ */
@media (max-width: 520px) {
  body { font-size: 14px; }
  .app-tete { height: 52px; }
  .app-tete .logo img { height: 14px; }
  .app-titre { font-size: 15px; }
  .avatar { width: 32px; height: 32px; font-size: 12px; }
  .app { padding: 14px 14px 24px; }
  .salut { margin: 2px 0 14px; }
  .surt { font-size: 12px; }
  .salut h1 { font-size: 27px; }
  .gros-cta { padding: 12px 14px; gap: 12px; border-radius: var(--wc-r-l); margin-bottom: 12px; }
  .gros-cta .ic { width: 40px; height: 40px; border-radius: var(--wc-r-m); font-size: 19px; }
  .gros-cta b { font-size: 15.5px; } .gros-cta small { font-size: 12px; } .gros-cta .fl { font-size: 22px; }
  .tuiles { gap: 8px; margin-bottom: 18px; }
  .tuile { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 11px 12px; border-radius: var(--wc-r-l); }
  .tuile .em { font-size: 17px; }
  .tuile b { font-size: 19px; margin: 0; }
  .tuile span:not(.em):not(.pill) { width: 100%; font-size: 12px; }
  .tuile .pill { margin: 0; }
  .sec-t { font-size: 11.5px; margin-bottom: 8px; }
  .prochaine, .vide-carte { margin-bottom: 18px; padding: 12px 14px; border-radius: var(--wc-r-l); font-size: 13px; }
  .prochaine .cal { width: 48px; } .prochaine .cal b { font-size: 20px; }
  .mini-info { padding: 11px 13px; border-radius: var(--wc-r-m); }
  .mini-info b { font-size: 14px; } .mini-info p { font-size: 12.5px; }
  .liste .tete { padding: 13px 14px; } .liste .tete .nm { font-size: 16px; } .liste .corps { padding: 0 14px 14px; }
  .liste .ligne .lnom { font-size: 14px; }
  .it .in { padding: 9px 10px 11px; } .it .n { font-size: 13px; } .it img { height: 92px; }
  .profil { padding: 14px; } .profil .av { width: 46px; height: 46px; font-size: 17px; } .profil b { font-size: 16.5px; }
  .menu button { padding: 12px 14px; font-size: 15px; } .menu .mi { width: 30px; height: 30px; font-size: 15px; }
  .cal-titre b { font-size: 17px; } .cal-fl { width: 38px; height: 38px; font-size: 20px; }
  .cj .num { font-size: 13.5px; width: 25px; height: 25px; }
  .modal h2 { font-size: 20px; }
  input[type=text], input[type=password], input[type=search], input[type=date], input[type=number], input[type=time], textarea, select { padding: 10px 12px; font-size: 16px; }
  input[type=date], input[type=time] { min-height: 44px; }
  .btn { min-height: 42px; font-size: 14px; }
  .barre-bas { padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .barre-bas .tab { padding: 7px 0 5px; gap: 3px; font-size: 11.5px; border-radius: var(--wc-r-l); }
  .barre-bas .tab svg { width: 26px; height: 26px; }
  body { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}
.pane.entre { animation: page-in .24s ease-out; }
@keyframes page-in { from { transform: translateY(8px); } }

/* ════ Tutoriel (version appli) ════ */
.tuto-voile { cursor: pointer; }
.tuto-trou { transition: none !important; border-radius: var(--wc-r-l); outline: none; box-shadow: 0 0 0 9999px rgba(3,6,14,.78), 0 0 0 3px var(--accent); }
.tuto-trou::after { content: ''; position: absolute; inset: -3px; border-radius: inherit; box-shadow: 0 0 0 0 rgba(77,163,255,.6); animation: halo 1.6s ease-out infinite; }
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(77,163,255,.55); } 100% { box-shadow: 0 0 0 16px rgba(77,163,255,0); } }
.tuto-carte { padding: 0 18px 16px; overflow: hidden; border-radius: var(--wc-r-xl); }
.tuto-carte.anime { animation: tc-in .3s var(--ease); }
@keyframes tc-in { from { transform: translateY(8px) scale(.97); } }
.tc-barre { height: 4px; margin: 0 -18px 14px; background: rgba(255,255,255,.08); }
.tc-barre i { display: block; height: 100%; background: linear-gradient(90deg, #4da3ff, #6e5aff); transition: width .4s var(--ease); }
.tc-haut { display: flex; align-items: center; }
.tc-haut .etape { font-size: 12px; font-weight: 700; color: var(--accent); }
.tc-x { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-2); cursor: pointer; font-size: 13px; }
.tuto-carte h3 { font-size: 19px; margin: 4px 0 6px; }
.tuto-carte p { font-size: 14.5px; }
.tuto-carte .foot { margin-top: 14px; }

.tuto-ecran { position: fixed; inset: 0; z-index: 450; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(77,163,255,.22), transparent 60%), rgba(4,7,15,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.te-carte { width: min(420px, 100%); text-align: center; }
.te-carte.anime { animation: tc-in .45s var(--ease); }
.te-emoji { font-size: 64px; line-height: 1; margin-bottom: 18px; display: inline-block; animation: balance 2.4s ease-in-out infinite; }
@keyframes balance { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg) scale(1.05); } }
.te-carte h2 { font-size: clamp(28px, 8vw, 36px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.te-carte p { color: var(--text-2); font-size: 15.5px; line-height: 1.55; margin: 12px auto 0; max-width: 34ch; }
.te-points { list-style: none; margin: 22px 0 6px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.te-points li { display: flex; align-items: center; gap: 14px; padding: 13px 15px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.te-points li span { font-size: 22px; }
.te-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.te-btns .btn { width: 100%; padding: 15px; font-size: 16px; border-radius: var(--wc-r-l); }
.te-btns .lien-discret { padding: 8px; font-size: 14px; }

/* ════ Appli : notifications et installation ════ */
.app-tete { padding-top: env(safe-area-inset-top, 0px); height: calc(52px + env(safe-area-inset-top, 0px)); }
.carte-notif { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--wc-r-l); margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(77,163,255,.14), rgba(110,90,255,.1)); border: 1px solid rgba(77,163,255,.3); }
.cn-ic { font-size: 22px; } .cn-tx { flex: 1; min-width: 0; } .cn-tx b { display: block; font-size: 14.5px; } .cn-tx small { display: block; font-size: 12.5px; color: var(--text-2); line-height: 1.35; margin-top: 2px; }
.cn-x { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; }
.menu-etat { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.etapes-inst { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 16px 0 12px; }
.etapes-inst li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; }
.etapes-inst .n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #031122; font-weight: 800; font-size: 13px; }
.ic-partage { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#toast-ecole { pointer-events: none; }
/* ════ Tutos simplifiés + labo interactif ════ */
.tuto-lead { font-size: 18px; line-height: 1.5; color: var(--text); margin: 8px 0 16px; font-weight: 500; }
.retenir { margin: 16px 0; padding: 14px 16px; border-radius: var(--wc-r-l); background: rgba(77,163,255,.08); border: 1px solid rgba(77,163,255,.25); }
.retenir > b { display: block; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.retenir ul { margin: 0; padding-left: 20px; } .retenir li { font-size: 15.5px; line-height: 1.5; margin: 6px 0; color: var(--text); }
.tuto-detail { margin: 14px 0; border-radius: var(--wc-r-l); border: 1px solid var(--line); background: var(--surface); }
.tuto-detail summary { cursor: pointer; padding: 13px 16px; font-weight: 600; font-size: 15px; color: var(--text-2); list-style: none; }
.tuto-detail summary::-webkit-details-marker { display: none; }
.tuto-detail summary::after { content: '⌄'; float: right; color: var(--muted); }
.tuto-detail[open] summary::after { content: '⌃'; }
.tuto-detail .tuto-texte { padding: 0 16px 10px; margin: 0; }
.labo { margin: 4px 0 16px; padding: 14px; border-radius: var(--wc-r-xl); background: linear-gradient(180deg, #101b36, #0b1328); border: 1px solid var(--line-2); }
.labo-tete { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.sc { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--wc-r-l); overflow: hidden; background: #0a1022; isolation: isolate; }
.sc-cadre { position: absolute; inset: 0; transform-origin: 50% 41%; transition: transform .25s ease, filter .25s ease; }
.sc-l { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sc-l svg { display: block; width: 100%; height: 100%; }
.sc-decor, .sc-ombre, .sc-ciel, .sc-sujet, .sc-avant { transition: filter .2s ease; }
.sc-teinte { opacity: 0; transition: background .2s; }
.sc { transition: filter .2s; }
.expo-v { font-size: 12px; color: var(--muted); text-align: center; margin-top: -2px; }
.sc-grain { opacity: 0; mix-blend-mode: overlay; image-rendering: pixelated; }
.sc-badge, .ips-b { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: var(--wc-r-pilule); background: rgba(4,8,18,.72); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.sc-cadre.scintille { animation: scintille .23s steps(2) infinite; }
@keyframes scintille { 50% { opacity: .8; } }
.labo-ctrl { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.labo-ctrl > label { font-size: 13.5px; color: var(--text-2); margin-top: 4px; } .labo-ctrl > label b { color: var(--text); }
.labo input[type=range] { width: 100%; height: 30px; accent-color: var(--accent); margin: 0; }
.labo-legende { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; min-width: 0; padding: 9px 10px; border-radius: var(--wc-r-m); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
[data-seg="v"] button { flex-basis: 30%; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: #04111f; }
.labo-msg { font-size: 14.5px; line-height: 1.5; padding: 10px 12px; border-radius: var(--wc-r-m); background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.labo-msg:empty { display: none; }
.labo-msg.ok { border-color: rgba(61,220,132,.4); background: rgba(61,220,132,.08); }
.labo-msg.warn { border-color: rgba(255,184,0,.4); background: rgba(255,184,0,.08); }
.labo-msg.ko { border-color: rgba(255,90,90,.45); background: rgba(255,90,90,.08); }
.labo-cons { font-size: 14px; color: var(--text-2); margin: 2px 0; }
.labo-h { font-size: 15px; margin: 16px 0 6px; } .labo-h:first-child { margin-top: 0; }
.expo { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.expo-barre { position: relative; flex: 1; height: 8px; border-radius: var(--wc-r-xs); background: linear-gradient(90deg, #111, #3d4a66 35%, #3ddc84 45%, #3ddc84 55%, #c9c9c9 70%, #fff); }
.expo-barre i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 2px #0b1328; transition: left .2s; }
.reso { position: relative; width: 100%; aspect-ratio: 4096 / 2160; margin-bottom: 8px; }
.reso-r { position: absolute; left: 0; bottom: 0; border: 2px solid; border-radius: var(--wc-r-xs); display: flex; align-items: flex-start; justify-content: flex-end; }
.reso-r span { font-size: 11px; font-weight: 700; padding: 3px 5px; text-align: right; line-height: 1.2; } .reso-r small { display: block; font-weight: 500; opacity: .8; }
.reso-r.r0 { border-color: #8e7cff; background: rgba(142,124,255,.08); color: #b9adff; }
.reso-r.r1 { justify-content: flex-start; } .reso-r.r1 span { text-align: left; }
.reso-r.r1 { border-color: #4da3ff; background: rgba(77,163,255,.1); color: #9ccbff; }
.reso-r.r2 { border-color: #3ddc84; background: rgba(61,220,132,.1); color: #8ef0b8; }
.reso-r.r3 { border-color: #ffb800; background: rgba(255,184,0,.12); color: #ffd36b; }
.ordre-l { display: flex; flex-direction: column; gap: 6px; }
.ordre-l button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--wc-r-m); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ordre-l .num { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ordre-l button.bon { border-color: rgba(61,220,132,.45); color: var(--text-2); }
.ordre-l button.bon .num { background: var(--green); border-color: var(--green); color: #031122; }
.ordre-l button.faux { animation: secoue .35s; border-color: rgba(255,90,90,.6); }
@keyframes secoue { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ordre .labo-msg, .quiz .labo-msg { margin-top: 8px; } .ordre .b-rejouer { margin-top: 8px; }
.quiz-q p { font-size: 15.5px; margin: 4px 0 10px; } .quiz-r { display: grid; gap: 6px; }
.quiz-r button { padding: 12px; border-radius: var(--wc-r-m); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.quiz-r button.bon { background: rgba(61,220,132,.15); border-color: var(--green); } .quiz-r button.faux { background: rgba(255,90,90,.12); border-color: #ff5a5a; }
.quiz-fin { font-size: 17px; font-weight: 700; }
.sd-zone { display: flex; gap: 14px; align-items: center; } .sd { width: 96px; flex: none; cursor: pointer; } .sd-l { transition: y .2s; }
.sd-zone > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

body.verrou { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.modal { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@supports (height: 1dvh) { .modal { max-height: 88dvh; } @media (max-width: 640px) { .modal, .modal.large { max-height: 90dvh; } } }
.ck-liste { max-height: none; overflow: visible; }
#tuto-page { padding: 4px 2px 8px; }
.tuto-h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 6px 0 4px; }
#tuto-page .tuto-texte { font-size: 16px; }
#tuto-page .plein { width: 100%; margin-top: 10px; }
.tuto-admin { margin: 18px 0 4px; }
/* ════ Labo (2) : son, cadrage, lumière, matériel ════ */
.onde-z { position: relative; height: 110px; border-radius: var(--wc-r-l); background: #0a1022; border: 1px solid var(--line); overflow: hidden; }
.onde-z.petit { height: 64px; margin-top: 8px; }
.onde-z canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.clip { position: absolute; right: 8px; top: 8px; padding: 2px 8px; border-radius: var(--wc-r-s); font-size: 11px; font-weight: 800; background: #2a1414; color: #6b3a3a; letter-spacing: .05em; }
.clip.on { background: #ff3b3b; color: #fff; }
.vu-l { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.vu { position: relative; flex: 1; height: 14px; border-radius: var(--wc-r-s); background: #0a1022; border: 1px solid var(--line-2); overflow: hidden; }
.vu i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #3ddc84; transition: width .06s linear; }
.vu-cible { position: absolute; left: 80%; width: 10%; top: 0; bottom: 0; border-left: 2px solid #fff; border-right: 2px solid #fff; opacity: .55; }
.vu-l b { width: 58px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.vu-ech { display: flex; justify-content: space-between; position: relative; margin: 2px 68px 0 0; font-size: 10px; color: var(--muted); }
.vu-ech span:nth-child(2) { position: absolute; left: 60%; transform: translateX(-50%); } .vu-ech span:nth-child(3) { position: absolute; left: 80%; transform: translateX(-50%); } .vu-ech span:nth-child(4) { position: absolute; left: 90%; transform: translateX(-50%); }
.sn { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.sn-b { height: 10px; border-radius: var(--wc-r-xs); background: #0a1022; border: 1px solid var(--line); overflow: hidden; }
.sn-b i { display: block; height: 100%; background: var(--accent); transition: width .2s; } .sn-n { background: #ff8a5a !important; }
.synchro { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--wc-r-l); background: #0a1022; border: 1px solid var(--line); }
.sy-piste { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.sy-images { display: grid; grid-template-columns: repeat(15, 1fr); gap: 1px; } .sy-images svg { width: 100%; display: block; border-radius: 2px; }
.sy-images svg.clac { outline: 2px solid #ffb800; outline-offset: -1px; }
.sy-son { height: 44px; } .sy-son canvas { width: 100%; height: 100%; display: block; }
.sc.glisse { touch-action: none; cursor: grab; } .sc.glisse:active { cursor: grabbing; }
.sc-sujet { transition: none; }
.grille-tiers { background: linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.75) calc(33.33% - .5px), rgba(255,255,255,.75) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.75) calc(66.66% - .5px), rgba(255,255,255,.75) calc(66.66% + .5px), transparent calc(66.66% + .5px)), linear-gradient(180deg, transparent calc(33.33% - .5px), rgba(255,255,255,.75) calc(33.33% - .5px), rgba(255,255,255,.75) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.75) calc(66.66% - .5px), rgba(255,255,255,.75) calc(66.66% + .5px), transparent calc(66.66% + .5px)); transition: opacity .2s; }
.axe-z { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; align-items: center; }
.axe-vue { width: 100%; border-radius: var(--wc-r-l); display: block; }
.axe-plans { display: flex; flex-direction: column; gap: 8px; } .axe-plans small { font-size: 11px; color: var(--muted); } .axe-plans svg { width: 100%; display: block; border-radius: var(--wc-r-s); }
@media (max-width: 420px) { .axe-z { grid-template-columns: 1fr; } .axe-plans { flex-direction: row; } .axe-plans > div { flex: 1; } }
.portrait-sc svg { display: block; width: 100%; height: 100%; }
.interrupteurs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.interrupteurs button { padding: 10px 6px; border-radius: var(--wc-r-m); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.interrupteurs button.on { background: #ffd36b; border-color: #ffd36b; color: #2a1d00; }
.btn.on { background: var(--accent); border-color: var(--accent); color: #04111f; }
.niv-z { position: relative; } .bulle { position: absolute; right: 10px; bottom: 10px; width: 64px; height: 64px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.bulle .bl { transition: cx .25s, cy .25s; }
.moniteur { padding: 10px 10px 6px; border-radius: var(--wc-r-l); background: #05070d; border: 1px solid #2a2f3a; box-shadow: inset 0 0 0 3px #11151e; }
.moni-bas { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .08em; color: #6e7891; padding: 6px 2px 0; } .moni-etat { color: #ffb800; }
.zebra { pointer-events: none; } .zebra g { transition: opacity .2s; }
.micro-z { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: center; }
.polaire { width: 100%; display: block; }
.micro-src { display: flex; flex-direction: column; gap: 10px; } .ms { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 8px; font-size: 13px; }
/* ════ Labo (3) ════ */
.pdc-sch { display: block; width: 100%; margin-top: 10px; }
.pdc-v { text-align: center; font-size: 13.5px; color: var(--text-2); margin-top: 2px; } .pdc-v b { color: var(--text); }
.debit { display: flex; flex-direction: column; gap: 8px; } .debit > label { font-size: 13.5px; color: var(--text-2); }
.debit select { width: 100%; }
.debit-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.debit-res > div { padding: 12px 8px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.debit-res b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; } .debit-res small { font-size: 11.5px; color: var(--muted); }
.degrade { display: block; width: 100%; height: 70px; border-radius: var(--wc-r-m); }
.onde-z.rt { height: 96px; } .rt-tete { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.7); pointer-events: none; }

/* ════ Générateur DaVinci ════ */
.dv-intro { margin-bottom: 6px; }
.dv-form { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--wc-r-xl); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.dv-form .f { margin-top: 8px; }
.dv-nb { gap: 10px; }
.pas { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--wc-r-m); overflow: hidden; }
.pas button { width: 44px; border: 0; background: var(--surface-2); color: var(--text); font-size: 20px; cursor: pointer; }
.pas input { flex: 1; min-width: 0; padding: 10px 4px; border: 0 !important; border-radius: 0 !important; background: #0a1022 !important; color: var(--text) !important; -webkit-appearance: none; appearance: none; text-align: center; font-size: 17px; font-weight: 700; -moz-appearance: textfield; }
.pas input::-webkit-inner-spin-button, .pas input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dv-details { margin: 6px 0 0; } .dv-details > div { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.dv-ligne { display: flex; align-items: center; gap: 8px; } .dv-ligne span { width: 22px; text-align: right; font-size: 13px; color: var(--muted); } .dv-ligne input { flex: 1; min-width: 0; }
#dv-res button { display: flex; flex-direction: column; align-items: center; gap: 2px; } #dv-res small { font-size: 10.5px; font-weight: 500; opacity: .75; }
#dv-res button { flex: 1 1 40%; }
#dv-conseil { margin-top: 4px; }
/* ════ Tournage : découpage, rapport, feuille de service, outils, tableau de bord, export ════ */
.page-tete { margin-bottom: 12px; } .etat-sauv { font-size: 12px; color: var(--green); margin-left: 6px; }
.dec-seq { padding: 12px; border-radius: var(--wc-r-xl); background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.dec-seq-tete { display: flex; align-items: center; gap: 8px; } .dec-seq-tete input { flex: 1; min-width: 0; font-weight: 700; }
.dec-num { flex: none; padding: 6px 9px; border-radius: var(--wc-r-s); background: var(--accent); color: #04111f; font-weight: 800; font-size: 13px; }
.dec-plan { padding: 10px; border-radius: var(--wc-r-l); background: #0b1328; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.dec-plan-tete { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-2); }
.dec-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .dec-champs .deux { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dec-champs select:first-child { grid-column: 1 / -1; }
.dec-plan textarea { min-height: 54px; }
.dec-seq .x, .dec-plan .x, .rap-prise .x { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--text-2); cursor: pointer; }
.dec-actions { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.rap-jours { margin-bottom: 12px; }
.rap-ajout { padding: 14px; border-radius: var(--wc-r-xl); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rap-boutons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 6px; }
.rap-b { padding: 14px 6px; border-radius: var(--wc-r-m); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.rap-b.bonne { background: rgba(61,220,132,.16); border-color: rgba(61,220,132,.5); } .rap-b.moyenne { background: rgba(255,184,0,.12); border-color: rgba(255,184,0,.45); } .rap-b.jeter { background: rgba(255,90,90,.12); border-color: rgba(255,90,90,.45); }
.rap-liste { display: flex; flex-direction: column; gap: 6px; }
.rap-prise { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); }
.rap-prise .grow { flex: 1; min-width: 0; } .rap-prise b { display: block; font-size: 14.5px; } .rap-prise small { display: block; font-size: 12px; color: var(--muted); }
.rap-etat { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; font-weight: 900; font-size: 16px; cursor: pointer; }
.rap-prise.bonne .rap-etat { background: var(--green); color: #031122; } .rap-prise.moyenne .rap-etat { background: #ffb800; color: #2a1d00; } .rap-prise.jeter .rap-etat { background: #ff5a5a; color: #fff; }
.rap-prise.jeter b { text-decoration: line-through; opacity: .7; }
.feuille-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.feuille { background: #fff; color: #111; border-radius: var(--wc-r-s); padding: 26px 22px; font-size: 13.5px; line-height: 1.5; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.feuille h1 { font-size: 24px; margin: 2px 0 0; letter-spacing: -.02em; } .feuille h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #1f4e9c; border-bottom: 2px solid #1f4e9c; padding-bottom: 3px; margin: 18px 0 8px; }
.fs-tete { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; border-bottom: 3px solid #111; padding-bottom: 10px; } .fs-tete small { font-size: 11px; letter-spacing: .12em; color: #555; } .fs-date { text-align: right; font-weight: 700; white-space: nowrap; }
.fs-infos { width: 100%; border-collapse: collapse; margin-top: 10px; } .fs-infos th { text-align: left; width: 38%; color: #555; font-weight: 600; padding: 3px 8px 3px 0; vertical-align: top; } .fs-infos td { padding: 3px 0; font-weight: 600; }
.fs-tab { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.fs-plans th:nth-child(1) { width: 13%; } .fs-plans th:nth-child(2), .fs-plans th:nth-child(3) { width: 19%; } .fs-plans th:nth-child(4) { width: 14%; }
@media (max-width: 520px) { .feuille { padding: 18px 14px; font-size: 12.5px; } .fs-tab { font-size: 11px; } .fs-tab th, .fs-tab td { padding: 3px 4px; } .fs-check { columns: 1; } } .fs-tab th, .fs-tab td { border: 1px solid #ccc; padding: 4px 6px; text-align: left; vertical-align: top; } .fs-tab th { background: #eef2f8; }
.fs-seq td { background: #f6f6f6; font-weight: 700; }
.fs-pre { white-space: pre-wrap; } .fs-mat, .fs-check { margin: 0; padding-left: 18px; } .fs-check { list-style: none; padding-left: 0; columns: 2; }
@media (max-width: 520px) { .feuille .fs-check { columns: 1; } }
.fs-pied { margin-top: 22px; font-size: 10.5px; color: #888; text-align: right; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; padding: 0 !important; } body::before { display: none !important; }
  .app-tete, .barre-bas, .retour, .feuille-actions, #toast-ecole, .modal, .modal-bd, .tuto-voile, #tuto, .pane:not(#p-feuille) { display: none !important; }
  .app { max-width: none !important; padding: 0 !important; } .feuille { box-shadow: none; border-radius: 0; padding: 0; }
  .fs-tab tr { break-inside: avoid; }
}
.calc-res { margin: 12px 0; } .calc-res b { font-size: 26px; } .calc-res small { line-height: 1.35; display: block; margin-top: 4px; }
.bord-cta { margin-bottom: 14px; background: linear-gradient(135deg, #1b2b52, #142041); border: 1px solid var(--line-2); }
.bord-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.bord-kpi > div { padding: 12px 6px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.bord-kpi b { display: block; font-size: 24px; font-weight: 800; } .bord-kpi small { font-size: 11.5px; color: var(--muted); }
.bord-kpi .chaud { border-color: rgba(255,184,0,.5); } .bord-kpi .chaud b { color: #ffb800; } .bord-kpi .alerte { border-color: rgba(255,90,90,.55); } .bord-kpi .alerte b { color: #ff7a7a; }
.bord-l { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; margin-bottom: 6px; border-radius: var(--wc-r-l); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bord-l .grow { flex: 1; min-width: 0; } .bord-l b { display: block; font-size: 15px; } .bord-l small { display: block; font-size: 12.5px; color: var(--muted); } .bord-l .fl { color: var(--muted); font-size: 20px; }
.bord-valid { padding: 8px; border-radius: var(--wc-r-l); border: 1px solid rgba(255,184,0,.35); margin-bottom: 8px; } .bord-valid .bord-l { margin-bottom: 6px; }
.bord-h { font-size: 13px; color: var(--text-2); margin: 10px 0 6px; }
.bord-creneaux { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; } .bord-creneaux > div { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); }
.bord-creneaux .cr-h { font-weight: 800; color: var(--accent); min-width: 54px; } .bord-creneaux small { display: block; font-size: 12px; color: var(--muted); }
.ex-dest button { flex: 1 1 45%; } .ex-carte { margin: 12px 0; padding: 16px; border-radius: var(--wc-r-xl); background: var(--surface); border: 1px solid var(--line); } .ex-carte h2 { font-size: 19px; margin: 0 0 2px; }
.ex-tab { width: 100%; border-collapse: collapse; margin-top: 8px; } .ex-tab th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px 8px 0; vertical-align: top; width: 34%; border-top: 1px solid var(--line); } .ex-tab td { padding: 8px 0; font-size: 14px; border-top: 1px solid var(--line); }
.ex-poids { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; color: var(--text-2); } .ex-poids input { width: 70px; display: inline-block; padding: 6px 8px; } .ex-poids b { color: var(--text); }

/* ════ Hors ligne, historique, statistiques ════ */
.bandeau-hl { position: sticky; top: 0; z-index: 110; margin: 0; padding: 9px 16px; font-size: 13.5px; line-height: 1.4; background: #3a2a05; color: #ffe2a3; border-bottom: 1px solid rgba(255,184,0,.4); text-align: center; }
.histo-sig { display: block; margin: 12px 0 4px; font-size: 13px; }
.art-resa small { display: block; font-size: 12px; color: var(--muted); }
.stats-per { margin-bottom: 12px; }
.st-mois { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 10px 10px 0; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); }
.st-mois > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.st-mois i { display: block; width: 100%; max-width: 34px; min-height: 2px; border-radius: var(--wc-r-s) var(--wc-r-s) 0 0; background: linear-gradient(180deg, #4da3ff, #2a6fd6); }
.st-mois small { font-size: 10.5px; color: var(--muted); padding-bottom: 6px; } .st-mois .st-v { font-size: 11px; font-weight: 700; }
.st-ligne { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; margin-bottom: 6px; border-radius: var(--wc-r-l); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.st-nom { font-size: 14.5px; font-weight: 600; min-width: 0; } .st-nom small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.st-barre { height: 8px; border-radius: var(--wc-r-xs); background: #0a1022; overflow: hidden; } .st-barre i { display: block; height: 100%; background: var(--accent); }
.st-ligne > b { font-size: 13.5px; }
.st-cat td { text-align: right; }
/* ════ Sur le tournage : Jour J, dépannage, tutos filtrés, plein soleil ════ */
.jourj { margin: 0 0 14px; padding: 16px; border-radius: var(--wc-r-xl); background: linear-gradient(145deg, #13305f, #0e1d3d); border: 1px solid rgba(77,163,255,.45); box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.jourj.retour { background: linear-gradient(145deg, #3a2a08, #21180a); border-color: rgba(255,184,0,.45); }
.jourj.demain { background: var(--surface); border-color: var(--line-2); box-shadow: none; }
.jj-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.jj-pastille { font-size: 12.5px; font-weight: 800; letter-spacing: .02em; padding: 5px 10px; border-radius: var(--wc-r-pilule); background: rgba(255,255,255,.12); }
.jj-soleil { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(0,0,0,.2); font-size: 18px; cursor: pointer; }
.jourj h2 { font-size: 22px; margin: 10px 0 2px; letter-spacing: -.02em; } .jj-infos { font-size: 14px; color: var(--text-2); margin: 0; }
.jj-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.jourj.demain .jj-grille { grid-template-columns: repeat(2, 1fr); }
.jj-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 8px 4px; border-radius: var(--wc-r-l); border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.2; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.jj-b span { font-size: 24px; } .jj-b:active { transform: scale(.97); }
.jj-b.fait { border-color: rgba(61,220,132,.6); } .jj-b.fait::after { content: '✓ fait'; font-size: 10.5px; color: var(--green); }
.jj-b.sos { border-color: rgba(255,90,90,.55); background: rgba(255,90,90,.12); }
.jj-appel { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 13px; border-radius: var(--wc-r-l); background: var(--green); color: #031122; font-weight: 800; font-size: 15.5px; text-decoration: none; }
.jj-appel small { font-weight: 600; opacity: .8; }
.jj-hl { margin-top: 10px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); } .jj-hl.ok { color: #8ef0b8; } .jj-hl.ko { color: #ffd36b; }
.jj-hl:empty { display: none; }
body.jour-j #carte-notif { display: none !important; }
.retrait-lien { display: block; margin: 4px 0 10px auto; font-size: 13px; }
.sos { margin-bottom: 8px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); }
.sos summary { display: flex; align-items: center; gap: 12px; padding: 14px; font-weight: 700; font-size: 15.5px; cursor: pointer; list-style: none; }
.sos summary::-webkit-details-marker { display: none; } .sos summary::after { content: '⌄'; margin-left: auto; color: var(--muted); }
.sos[open] summary::after { content: '⌃'; } .sos[open] { border-color: rgba(255,90,90,.45); }
.sos-ic { font-size: 22px; width: 30px; text-align: center; }
.sos ol { margin: 0 14px 10px 32px; padding: 0; } .sos li { font-size: 14.5px; line-height: 1.5; margin: 6px 0; }
.sos .btn { margin: 0 14px 14px; }
.sos-fin { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: 14px; border-radius: var(--wc-r-l); border: 1px dashed var(--line-2); }
.tuto-filtres { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tuto-themes { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; } .tuto-themes button { flex: none; }
/* Mode plein soleil : l'interface sombre est inversée (clair, fort contraste) ; photos, scènes et feuille gardent leurs vraies couleurs */
html.soleil body { background: #eef1f6 !important; } html.soleil body::before { display: none; }
html.soleil :is(.app-tete, .bandeau-hl, main.app, .barre-bas, .modal, #toast-ecole, .tuto-carte, .tuto-ecran) { filter: invert(1) hue-rotate(180deg) contrast(1.08); }
html.soleil :is(main.app, .modal) :is(img, video, canvas, .sc, .portrait-sc, .feuille, .degrade, .moniteur) { filter: invert(1) hue-rotate(180deg); }
html.soleil .sc :is(canvas, img), html.soleil .moniteur .sc { filter: none !important; }   /* déjà dans un bloc ré-inversé */
html.soleil .modal-bd { background: rgba(255,255,255,.55); }
.art-desc p { color: var(--text); font-size: 15px; } .art-desc ul { margin: 8px 0 0; padding-left: 18px; } .art-desc li { font-size: 14px; line-height: 1.5; margin: 5px 0; color: var(--text-2); } .art-desc li b { display: inline; margin: 0; font-size: inherit; color: var(--text); }
.poussieres { opacity: 0; mix-blend-mode: multiply; transition: opacity .25s, filter .25s; pointer-events: none; }
.ronin-etapes { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.ronin-etapes span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; border: 2px solid var(--line-2); color: var(--muted); }
.ronin-etapes span.en-cours { border-color: var(--accent); color: var(--accent); } .ronin-etapes span.fait { background: var(--green); border-color: var(--green); color: #031122; }
.ronin-sc svg { display: block; width: 100%; height: 100%; }
/* ════ Fiche article, signalements, outils de liste, tutos, créneaux ════ */
.it { cursor: pointer; }
.art-photo { margin: -4px 0 14px; border-radius: var(--wc-r-l); overflow: hidden; background: radial-gradient(circle at 50% 40%, #16213d, #0a1022); }
.art-photo img { width: 100%; height: 190px; object-fit: contain; display: block; padding: 12px; }
.art-bloc { margin-top: 14px; padding: 12px 14px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); }
.art-bloc > b { display: block; font-size: 13px; margin-bottom: 8px; }
.art-bloc p { font-size: 14px; color: var(--text-2); white-space: pre-wrap; line-height: 1.55; }
.art-resa { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.art-resa:last-child { border-bottom: 0; }
.puces-choix { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow: auto; }
.puces-choix .chip { font-size: 12.5px; padding: 6px 11px; }
.ligne-lien { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.ligne-lien:last-child { border-bottom: 0; } .ligne-lien span { color: var(--muted); }
.modal .foot.col { flex-direction: column; align-items: stretch; } .modal .foot.col .btn { width: 100%; }
.photo-btn { display: block; } .photo-btn input { display: none; }
.photo-btn span { display: flex; align-items: center; justify-content: center; padding: 13px; border-radius: var(--wc-r-m); border: 1px dashed var(--line-2); color: var(--text-2); cursor: pointer; }
.signal { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--wc-r-l); background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; flex-wrap: wrap; }
.signal.traite { opacity: .55; }
.signal img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--wc-r-m); cursor: zoom-in; }
.signal .grow { flex: 1; min-width: 160px; } .signal b { font-size: 15px; } .signal p { font-size: 14px; color: var(--text-2); margin: 3px 0; } .signal small { font-size: 12px; color: var(--muted); }
.sig-act { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.outils { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0 12px; }
.outil { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; padding: 10px 11px; border-radius: var(--wc-r-m); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.outil:disabled, .outil:not([onclick]) { cursor: default; }
.outil span { grid-row: 1 / 3; font-size: 20px; } .outil b { font-size: 13px; } .outil small { font-size: 11.5px; color: var(--muted); }
.outil.fait { border-color: rgba(61,220,132,.4); } .outil.fait small { color: var(--green); }
.ck-barre { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 6px 0 14px; }
.ck-barre i { display: block; height: 100%; background: var(--green); transition: width .3s var(--ease); }
.ck-liste { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; }
.ck { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--wc-r-m); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ck .bx { width: 26px; height: 26px; flex: none; border-radius: var(--wc-r-s); border: 2px solid var(--line-2); display: grid; place-items: center; font-weight: 800; color: #031122; }
.ck.on { border-color: rgba(61,220,132,.35); } .ck.on .bx { background: var(--green); border-color: var(--green); } .ck.on { color: var(--text-2); }
.role-ligne, .ce-ligne { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.role-ligne .rl-qui { flex: 1.2; } .role-ligne .rl-role { flex: 1; }
.role-ligne .x, .ce-ligne .x { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--text-2); cursor: pointer; }
.ce-ligne select { flex: 1; min-width: 0; padding-left: 10px; padding-right: 6px; } .ce-ligne .ce-a { color: var(--muted); flex: none; } .ce-ligne .ce-jour { flex: .9; } .ce-ligne .ce-places { flex: .9; }
.cr-jour { margin: 12px 0; } .cr-jour > b { display: block; font-size: 14px; margin-bottom: 6px; text-transform: capitalize; }
.cr-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { display: flex; flex-direction: column; align-items: center; padding: 9px 14px; border-radius: var(--wc-r-m); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.slot small { font-size: 11px; font-weight: 500; color: var(--muted); }
.slot.on { border-color: var(--accent); background: rgba(77,163,255,.14); } .slot:disabled { opacity: .4; cursor: default; }
.tuto-carte-l { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; margin-bottom: 8px; border-radius: var(--wc-r-l); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tuto-carte-l .te { font-size: 26px; } .tuto-carte-l .grow { flex: 1; min-width: 0; } .tuto-carte-l b { display: block; font-size: 15.5px; } .tuto-carte-l small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tuto-carte-l .fl { color: var(--muted); font-size: 22px; }
.te-grand { font-size: 44px; } .tuto-texte { font-size: 15px; line-height: 1.6; color: var(--text-2); margin: 6px 0 16px; }
.tuto-texte h4 { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin: 18px 0 6px; }
.tuto-texte h4:first-child { margin-top: 4px; } .tuto-texte p { margin: 0 0 6px; } .tuto-texte p.puce { padding-left: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
a.ligne-lien { text-decoration: none; }

/* Feuilles (fiche d'un objet…) : défilement vertical seulement, pas de zoom accidentel.
   overflow-x caché + mots longs (liens) coupés : plus de glissement latéral ; touch-action pan-y : un geste
   dans la feuille ne peut que la faire défiler (ni pincement, ni double-toucher qui zoome). */
.modal { overflow-x: hidden; overflow-y: auto; overflow-wrap: anywhere; touch-action: pan-y; }
.modal img { max-width: 100%; }
.modal-bd { touch-action: none; }
html, body { touch-action: manipulation; }   /* pas de zoom au double-toucher sur la page */
