:root {
  /* Jetons de brand.css (Brand Book MiYOSMART), sous les noms employés ici */
  --blue: var(--bleu-tnoptic);
  --action: var(--violet-action);
  --action-dark: var(--violet-fonce);
  --action-tint: var(--violet-pale);
  --ink: var(--encre);
  --muted: var(--gris);
  --line: var(--filet);
  --bg: var(--page);
  --card: var(--surface);
  --err: var(--alerte);
  --err-bg: var(--alerte-bg);
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--font);
}
.card {
  width: 100%; max-width: 440px; background: var(--card); border-radius: 14px;
  padding: 28px; box-shadow: 0 1px 2px rgb(16 24 40 / .06), 0 8px 24px rgb(16 24 40 / .06);
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.brand small { color: var(--muted); }
@media (max-width: 520px) { .brand { flex-wrap: wrap; } .brand-txt { flex-basis: 100%; margin: 4px 0 0; } }
h1 { font-size: 22px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; margin-top: 24px; }
label { display: block; margin: 16px 0 0; font-weight: 600; font-size: 15px; }
input {
  display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 18px; letter-spacing: 1px; border: 1px solid var(--line); border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
input:focus { outline: 3px solid var(--violet-voile); border-color: var(--action); }
button {
  margin-top: 20px; width: 100%; min-height: 48px; border: 0; border-radius: 10px;
  background: var(--action); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
button:disabled { opacity: .6; }
.error:empty { display: none; }
.error, .notice { background: var(--err-bg); color: var(--err); padding: 10px 12px; border-radius: 8px; margin: 16px 0 0; }

[hidden] { display: none !important; }

/* --- Mes formations, quiz --- */
body.page { display: block; }
.card.wide { max-width: 760px; margin: 16px auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  border-radius: 10px; background: var(--action); color: #fff; font-weight: 600; text-decoration: none;
  border: 1px solid var(--action); width: auto; margin: 0;
}
.btn.ghost { background: #fff; color: var(--action); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.welcome { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: var(--sable-clair); border-radius: 12px; padding: 18px 20px; }
.welcome h1 { margin: 0 0 4px; }
.welcome p { margin: 0; color: var(--encre); }
.welcome .btn { margin: 0; width: auto; background: #fff; flex: none; }
.ficon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--violet-pale); color: var(--action); flex: none; }
.btn .ico { margin-right: 6px; }
.fcard { border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-top: 14px; }
.fcard.off { background: #f7f8fa; }
.fcard h2 { font-size: 18px; margin: 0; }
.fcard p { margin: 8px 0 0; }
.fhead { display: flex; gap: 12px; align-items: center; }
.fhead h2 { flex: 1; }
.fquiz { margin-top: 10px; }
.factions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge.good { color: #2E7D5B; background: #e8f3ee; }
.badge.warn { color: #8A6410; background: #f7f0de; }
.badge.bad { color: #8A4B0B; background: #f8ece1; }
.badge.none { color: var(--muted); background: #eef0f4; }
.empty { color: var(--muted); padding: 24px 0; }
a.back { color: var(--action); font-weight: 600; text-decoration: none; }
fieldset.q { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 12px; margin: 14px 0 0; }
fieldset.q legend { font-weight: 600; padding: 0 6px; display: flex; gap: 8px; align-items: baseline; }
.qn { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; background: var(--action-tint); color: var(--action); font-size: 13px; }
label.opt { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 6px 0 0; min-height: 44px; padding: 6px 10px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; }
label.opt:hover { background: #f5f7fa; }
label.opt input { width: 20px; min-height: 20px; height: 20px; margin: 0; flex: none; }
fieldset.q.good { border-color: #2E7D5B; }
fieldset.q.bad { border-color: #8A4B0B; }
.why { margin-top: 8px; font-size: 14px; }
fieldset.good .why { color: #2E7D5B; }
fieldset.bad .why { color: #8A4B0B; }
.result { padding: 12px 14px; border-radius: 10px; margin: 16px 0 0; }
.result b { display: block; font-size: 18px; }
.result.ok { background: #e8f3ee; color: #2E7D5B; }
.result.ko { background: #f8ece1; color: #8A4B0B; }
#q-form .btn { margin-top: 16px; }

/* Code PIN : changement et oubli */
.welcome-acts { display: flex; flex-direction: column; gap: 8px; flex: none; }
.forgot { text-align: center; margin: 14px 0 0; }
button.link { background: none; border: 0; padding: 4px; margin: 0; width: auto; min-height: 0; color: var(--action); font: inherit; text-decoration: underline; cursor: pointer; }
p.ok { background: #e8f3ee; color: #2E7D5B; padding: 10px 12px; border-radius: 8px; margin: 12px 0 0; }
#v-change-pin [data-cancel] { width: 100%; margin-top: 8px; }
.jcount { display: inline-flex; align-items: center; gap: 5px; }
.jcount .ico { width: 16px; height: 16px; }
.fquiz { display: flex; flex-wrap: wrap; gap: 8px; }
.ficon.has-logo { background: #fff; border: 1px solid var(--filet, #DFDEDA); width: auto; min-width: 44px; padding: 4px 8px; }
.ficon.has-logo img { height: 34px; max-width: 170px; object-fit: contain; }

/* Quiz en salle */
.live-banner { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 14px; padding: 14px 18px; border: 0; border-radius: 12px;
  background: var(--salle); color: #fff; font: inherit; font-size: 16px; text-align: left; cursor: pointer; animation: glow 2s infinite; }
.live-banner span { margin-left: auto; font-weight: 700; }
@keyframes glow { 50% { box-shadow: 0 0 0 5px var(--violet); } }
#v-live { min-height: 60vh; }
.lq-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--gris); font-size: 14px; }
.lq-head img { height: 26px; max-width: 120px; object-fit: contain; }
.lq-head b { margin-left: auto; color: var(--encre); font-size: 16px; font-variant-numeric: tabular-nums; }
.lq-theme { display: inline-block; margin: 0 0 6px; padding: 2px 12px; border-radius: 999px; background: var(--violet-pale); color: var(--violet-action); font-size: 14px; font-weight: 600; }
.lq-q { font-size: clamp(20px, 3.4vw, 28px); line-height: 1.3; margin: 4px 0 14px; }
.lq-timer { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.lq-track { flex: 1; height: 10px; border-radius: 5px; background: #E7E6E2; overflow: hidden; }
.lq-track i { display: block; height: 100%; width: 100%; background: var(--violet-action); transition: width .25s linear; }
.lq-timer b { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.lq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lq-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 92px; padding: 14px 16px; border: 0; border-radius: 14px; color: #fff;
  font: inherit; font-size: 18px; font-weight: 600; text-align: left; cursor: pointer; transition: transform .15s, opacity .2s; }
.lq-opt:active { transform: scale(.97); }
.lq-opt.c0 { background: var(--quiz-a); } .lq-opt.c1 { background: var(--quiz-b); } .lq-opt.c2 { background: var(--quiz-c); } .lq-opt.c3 { background: var(--quiz-d); }
.lq-shape { font-size: 24px; flex: none; }
.lq-opt.picked { box-shadow: 0 0 0 4px var(--encre); }
.lq-opt.dim { opacity: .3; }
.lq-opt.good { box-shadow: 0 0 0 4px var(--encre); }
.lq-opt.bad { opacity: .55; text-decoration: line-through; }
.lq-opt[disabled] { cursor: default; opacity: 1; }
.lq-opt.dim[disabled] { opacity: .3; }
.lq-opt.bad[disabled] { opacity: .55; }
.lq-ok { margin-left: auto; font-size: 26px; }
.lq-sent { text-align: center; font-weight: 600; color: var(--violet-action); margin: 16px 0 0; }
.lq-result { margin: 16px 0 0; padding: 16px; border-radius: 12px; text-align: center; font-size: 24px; font-weight: 700; animation: pop .3s ease; }
.lq-result small { display: block; font-size: 15px; font-weight: 500; margin-top: 4px; }
.lq-result.win { background: var(--violet-pale); color: var(--violet-action); }
.lq-result.lose { background: #F4ECE4; color: #8A4B0B; }
.lq-expl { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: #F5F5F5; }
.lq-center { text-align: center; padding: 30px 0 10px; }
.lq-big { font-size: 64px; line-height: 1; margin-bottom: 8px; }
.lq-final { font-size: 48px; font-weight: 700; margin: 6px 0; color: var(--violet-action); }
.lq-foot { text-align: center; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 560px) { .lq-opts { grid-template-columns: 1fr; } .lq-opt { min-height: 68px; } }
@media (prefers-reduced-motion: reduce) { .live-banner, .lq-result { animation: none; } }

/* QR code de présence */
#main:has(#v-checkin:not([hidden])) { max-width: 520px; }
.qr-box { width: min(78vw, 340px); aspect-ratio: 1; margin: 18px auto 6px; padding: 10px; background: #fff; border: 1px solid var(--filet, #DFDEDA); border-radius: 16px; display: grid; place-items: center; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-note { text-align: center; }
.qr-done { margin: 14px 0; padding: 16px; border-radius: 12px; background: var(--violet-pale); color: var(--violet-action); text-align: center; font-size: 22px; font-weight: 700; animation: pop .3s ease; }
.qr-done small { display: block; font-size: 15px; font-weight: 500; }
#v-checkin h1, #v-checkin > p { text-align: center; }

/* Quiz en salle aux couleurs MiYOSMART : texte encre sur l'orange et le bleu-gris */
.lq-opt { border: 2px solid rgba(35,31,32,.08); }
.lq-opt.c1, .lq-opt.c3 { color: var(--encre); }
.live-banner { background: var(--salle); }
.lq-track i { background: var(--quiz-a); }
.lq-theme { background: #E6EEF8; color: var(--quiz-a); }

/* Parcours : modules numérotés dans l'ordre conseillé */
.badge.info { color: var(--quiz-a); background: var(--bleu-pale); }
h2.others { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 26px 0 0; }
/* Module : onglets Cours / Vidéos */
#v-module h1, #v-video h1 { margin: 6px 0 2px; font-size: 22px; }
.mtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 14px 0; }
.mtabs a { text-align: center; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--muted); text-decoration: none; }
.mtabs a[aria-selected="true"] { background: var(--action); color: #fff; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.vcard { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; color: inherit; text-decoration: none; }
.vthumb { position: relative; height: 130px; background: linear-gradient(135deg, var(--salle), var(--quiz-a)); display: grid; place-items: center; }
.vplay { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--quiz-a); display: grid; place-items: center; font-size: 18px; }
.vdur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 5px; }
.vseen { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--sable); }
.vtxt { padding: 10px 12px; display: grid; gap: 2px; }
.vtxt small { color: var(--muted); }
.vgrid.small { grid-template-columns: 1fr; }
.vcard.row { grid-template-columns: 96px 1fr; }
.vcard.row .vthumb { height: 60px; }
.vcard.row .vplay { width: 30px; height: 30px; font-size: 12px; }
/* Lecteur : nom du participant en filigrane, plein écran du navigateur désactivé pour qu'il reste visible */
.vplayer { position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.vplayer video { display: block; width: 100%; max-height: 70vh; background: #000; }
.vwm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: rgba(255, 255, 255, .22);
  font-weight: 700; font-size: clamp(14px, 3.4vw, 22px); text-align: center; transform: rotate(-18deg); padding: 0 10%; }
.vnote { font-size: 14px; color: var(--muted); }
/* Accueil sur téléphone : le bandeau passe en colonne, les boutons en ligne ; texte lisible sur les boutons blancs */
.welcome .btn { color: var(--action); }
@media (max-width: 520px) {
  .welcome { flex-direction: column; }
  .welcome-acts { flex-direction: row; flex-wrap: wrap; }
}
a.link { color: var(--action); font-weight: 600; text-decoration: none; }
.vplayer:fullscreen { display: grid; place-items: center; border-radius: 0; }
.vplayer:fullscreen video { max-height: 100vh; height: 100%; }
/* Séances en présentiel sur la carte d'une formation */
.seances { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.seances li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--sable-clair); font-size: 15px; }
.seances li .ico { flex: 0 0 auto; margin-top: 2px; }
.seances li span { display: grid; }
.seances li small { color: var(--muted); }
.seances li.today { outline: 2px solid var(--action); }
.seances li.past { opacity: .55; }
/* Accueil (22/10) : « Reprenez là où vous en étiez », votre activité, puis les formations en cartes illustrées. */
.card.wide.is-home { max-width: 1040px; }
.sec-h { font-size: 17px; margin: 24px 0 10px; }
.sec-h .muted { font-weight: 400; }
.resume-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; }
.resume-body h3 { margin: 0 0 6px; font-size: 21px; line-height: 1.3; }
.resume-body .btn { width: auto; display: inline-flex; margin-top: 14px; padding: 0 20px; }
.cover { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--salle), var(--quiz-a)); }
.fcard2 .cover { border-radius: 0; aspect-ratio: 16 / 8; }
.cover-logo { background: #fff; border-radius: 12px; padding: 10px 16px; box-shadow: 0 6px 20px rgb(0 0 0 / .18); }
.cover-logo img { display: block; height: 34px; max-width: 200px; object-fit: contain; }
.cover.big .cover-logo img { height: 52px; max-width: 260px; }
.cover-ico { width: 64px; height: 64px; border-radius: 16px; background: rgb(255 255 255 / .16); color: #fff; display: grid; place-items: center; }
.cover-theme { position: absolute; left: 12px; top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: rgb(255 255 255 / .18); padding: 3px 10px; border-radius: 999px; }
.cover-state { position: absolute; right: 12px; top: 12px; }
.cover-mode { position: absolute; left: 12px; bottom: 12px; font-size: 12px; font-weight: 700; background: var(--sable-clair); color: var(--encre);
  padding: 3px 10px; border-radius: 999px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.activity { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: #fff; }
.activity h3 { margin: 0 0 8px; font-size: 16px; }
.activity p { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 600; }
.activity p b { margin-left: auto; font-size: 18px; }
.act-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: var(--page); }
.act-ico.warn { color: var(--attention); background: var(--attention-bg); }
.act-ico.good { color: var(--ok); background: var(--ok-bg); }
.fcard2 { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.fcard2.off { opacity: .75; }
.fbody { padding: 14px 16px 16px; display: grid; gap: 6px; }
.fbody h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.fbody p { margin: 0; }
.fbody .small, .resume-body .small { margin-top: 0; }
.fdesc { font-size: 14px; color: var(--encre); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pbar2 { height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; margin: 4px 0; }
.pbar2 i { display: block; height: 100%; border-radius: 9px; background: var(--action); }
.fbody .factions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.fbody .factions .btn { width: auto; margin: 0; flex: 1 1 auto; }
@media (max-width: 720px) { .resume-card { grid-template-columns: 1fr; gap: 12px; padding: 12px; } }
/* Aperçu de l'administrateur : bandeau, et les commandes personnelles masquées. */
.preview-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px;
  background: var(--bleu-pale); color: var(--encre); font-size: 14px; }
.preview-banner .link { margin-left: auto; }
body.preview .welcome-acts { display: none; }
/* Bandeau d'accueil plus compact : les trois boutons sur une ligne. */
.is-home .welcome { align-items: center; padding: 14px 18px; }
.is-home .welcome-acts { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) { .is-home .welcome-acts { justify-content: flex-start; } }
/* Tablette en portrait : le bonjour garde sa largeur, les boutons passent dessous s'il le faut. */
.is-home .welcome { flex-wrap: wrap; }
.is-home .welcome > div:first-child { flex: 1 1 300px; min-width: 0; }
.is-home .welcome-acts { flex: 0 1 auto; }

/* --- Inscription des opticiens (/inscription) et lien du commercial --- */
select {
  display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
#s-form input:not([data-pin]) { letter-spacing: 0; font-size: 17px; }
input.bad, select.bad { border-color: var(--err); outline: 3px solid rgb(163 45 45 / .18); }
label.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; line-height: 1.45; }
label.consent input { width: 22px; min-height: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--action); }
label.consent input.bad { outline-offset: 2px; }
.refbox { background: var(--sable-clair); padding: 10px 12px; border-radius: 8px; margin: 16px 0 0; }
.invite-qr { display: flex; justify-content: center; margin: 16px 0; }
.invite-qr img, .invite-qr svg { width: 240px; max-width: 70vw; height: auto; image-rendering: pixelated; }
.invite-url { word-break: break-all; text-align: center; font-size: 14px; }
.invite-acts { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.invite-acts .btn { margin-top: 0; }
.btn.wa { background: var(--whatsapp); border-color: var(--whatsapp); color: #fff; }
/* Sur téléphone, le bandeau passe en colonne : la base de 300 px ne doit pas devenir une hauteur. */
@media (max-width: 520px) { .is-home .welcome > div:first-child { flex-basis: auto; } }

/* --- Parcours d'un thème en plusieurs parties (lot 2) --- */
.parcours { margin-top: 8px; }
.psteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; counter-reset: none; }
.psteps li { position: relative; padding: 0 6px; }
.psteps li + li::before { content: ''; position: absolute; top: 19px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.psteps li.done + li::before { background: var(--action); }
.pstep { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; color: var(--encre); text-decoration: none; }
.pdot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-weight: 700; color: var(--gris); }
.pdot .ico { width: 18px; height: 18px; }
.done .pdot { background: var(--action); border-color: var(--action); color: #fff; }
.cur .pdot { border-color: var(--action); color: var(--action); box-shadow: 0 0 0 4px var(--violet-pale); }
.locked .pstep { color: var(--gris); }
.ptxt { font-size: 14px; line-height: 1.3; }
.ptxt small { display: block; color: var(--gris); font-size: 12px; }
.cur .ptxt { font-weight: 600; }
.pdone { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-weight: 600; text-align: center; }
.pnum { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--action); }
.fcard2.locked .pnum { color: var(--gris); }
.lockmsg { display: flex; gap: 8px; align-items: flex-start; color: var(--gris); font-size: 14px; }
@media (max-width: 520px) {
  .psteps { grid-template-columns: 1fr; gap: 10px; }
  .psteps li + li::before { display: none; }
  .pstep { flex-direction: row; text-align: left; }
}
.fcard2 { min-width: 0; }
.fquiz .badge { white-space: normal; }

/* --- Certificat (opticien) et « Mes opticiens » (commercial), lot 3 --- */
.cert-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--ok-bg); border: 1px solid var(--ok); }
.cert-card > div { flex: 1 1 260px; }
.cert-card h2 { margin: 0; font-size: 17px; }
.cert-card p { margin: 4px 0 0; }
.cert-ico { font-size: 34px; }
.cert-card .btn { margin: 0; }
#cert-body { margin: 10px 0; }
.opt-todo { padding: 10px 14px; border-radius: 10px; background: var(--sable-clair); font-weight: 600; }
.opt-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; }
.opt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.opt-head h3 { margin: 0; font-size: 17px; }
.opt-head p { margin: 2px 0 0; }
.opt-head .btn { margin: 0; flex: none; }
.opt-card .pbar2 { margin-top: 10px; }
.opt-cert { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.opt-cert p { margin: 0 0 8px; }
.opt-cert .factions { margin-top: 0; }
.verif { text-align: center; }
.verif-ok { display: inline-block; margin: 18px 0 0; padding: 6px 16px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-weight: 700; }

/* --- Mes progrès : niveau, pièces, missions, trophées, zones (lot 4) --- */
.pstrip { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--encre); text-decoration: none; background: var(--surface); }
.pstrip:hover { border-color: var(--action); }
.pstrip-main { flex: 1; min-width: 0; font-size: 15px; }
.pstrip-main small { display: block; margin-top: 2px; }
.pstrip-go { color: var(--action); font-weight: 600; white-space: nowrap; }
.lvl-badge { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--sable); color: var(--encre); font-weight: 800; font-size: 20px; box-shadow: inset 0 0 0 3px var(--sable-clair); }
.lvl-badge.big { width: 84px; height: 84px; font-size: 38px; }
.lvl-bar { height: 8px; border-radius: 9px; background: var(--line); overflow: hidden; margin: 6px 0 2px; }
.lvl-bar i { display: block; height: 100%; background: var(--action); border-radius: 9px; }
.coins { color: var(--encre); font-weight: 600; white-space: nowrap; }
.coins.big { font-size: 22px; margin: 4px 0 0; }
.lvl-card { display: flex; gap: 18px; align-items: center; padding: 18px 20px; border-radius: 14px; background: var(--sable-clair); }
.lvl-card > div { flex: 1; min-width: 0; }
.lvl-card h2 { margin: 0; font-size: 22px; }
.lvl-card p { margin: 0; }
.missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.missions a, .missions .m-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--encre); text-decoration: none; }
.missions a:hover { border-color: var(--action); }
.missions a span::after { content: ' ›'; color: var(--action); }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.trophy { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 8px; font-size: 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--gris); }
.trophy.got { border-style: solid; border-color: var(--sable); background: var(--sable-clair); color: var(--encre); }
.t-ico { font-size: 30px; filter: grayscale(1); opacity: .5; }
.trophy.got .t-ico { filter: none; opacity: 1; }
.trophy small { font-size: 12px; color: var(--gris); }
.zones { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.zones li { display: grid; grid-template-columns: 34px minmax(80px, 140px) 1fr 70px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.zones li.mine { background: var(--sable-clair); font-weight: 600; }
.z-rank { font-size: 20px; text-align: center; }
.z-bar { height: 10px; border-radius: 9px; background: var(--line); overflow: hidden; }
.z-bar i { display: block; height: 100%; background: var(--action); }
.zones b { text-align: right; white-space: nowrap; }
.bareme { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.bareme summary { cursor: pointer; font-weight: 600; color: var(--action); }
.bareme ul { margin: 10px 0; padding-left: 20px; line-height: 1.7; }
@media (max-width: 520px) {
  .pstrip { flex-wrap: wrap; }
  .pstrip-go { width: 100%; text-align: right; }
  .zones li { grid-template-columns: 30px 1fr 60px; }
  .z-bar { display: none; }
}

/* --- Esprit Canva (25/10) : fond pastel turquoise → violet, titres et barres en dégradé --- */
body, body.page { background: var(--degrade-doux) fixed; }
.welcome { background: var(--degrade-doux); border: 1px solid rgb(125 42 232 / .12); }
.welcome h1, .sec-h, .lvl-card h2 { background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-h .muted { -webkit-text-fill-color: var(--gris); }
.pbar2 i, .lvl-bar i, .z-bar i { background: var(--degrade); }
.lvl-card { background: var(--degrade-doux); }
.btn, button { border-radius: 12px; }
.btn:not(.ghost):not(.wa):hover, button:not(.link):not(.ghost):hover { background: var(--violet-fonce); }

/* --- Nouveautés et challenge des commerciaux (25/10) --- */
.nbadge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--violet-action); color: #fff; font-size: 12px; font-weight: 700; vertical-align: middle; }
.nbadge.warn { background: var(--sable); color: var(--encre); }
.opt-card.is-new { border-color: var(--violet-action); box-shadow: 0 0 0 3px var(--violet-pale); }
.chal { margin: 16px 0 8px; padding: 16px 18px; border-radius: 14px; background: var(--degrade-doux); border: 1px solid rgb(125 42 232 / .12); }
.chal-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chal-h h2 { margin: 0; font-size: 18px; }
.chal-tabs { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 3px; gap: 2px; }
.chal-tabs button { width: auto; min-height: 0; margin: 0; padding: 5px 12px; border-radius: 999px; background: none; color: var(--gris); font-size: 13px; }
.chal-tabs button.on { background: var(--violet-action); color: #fff; }
.chal-me { margin: 10px 0 6px; }
.chal-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.chal-list li { display: grid; grid-template-columns: 34px 1fr auto 70px; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; background: rgb(255 255 255 / .7); }
.chal-list li.me { background: var(--surface); box-shadow: inset 0 0 0 2px var(--violet-action); font-weight: 600; }
.c-rank { font-size: 18px; text-align: center; }
.c-name small { display: block; color: var(--gris); font-size: 12px; font-weight: 400; }
.c-stats { font-size: 13px; color: var(--gris); white-space: nowrap; }
.chal-list b { text-align: right; }
@media (max-width: 520px) { .chal-list li { grid-template-columns: 30px 1fr 62px; } .c-stats { grid-column: 2 / 4; grid-row: 2; } }

/* --- Une seule carte par parcours (26/10) : les parties réunies dans la carte du thème --- */
.fcard2.pcard { grid-column: span 2; }
@media (max-width: 700px) { .fcard2.pcard { grid-column: auto; } }
.fcard2.pcard .cover { aspect-ratio: 16 / 5; }
.plist { list-style: none; margin: 12px 0 4px; padding: 0; display: grid; gap: 8px; }
.plist li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.plist li.cur { border-color: var(--violet-action); box-shadow: 0 0 0 3px var(--violet-pale); }
.plist li.locked { opacity: .7; }
.pl-dot { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); font-weight: 700; color: var(--gris); font-size: 14px; }
.plist li.done .pl-dot { background: var(--violet-action); border-color: var(--violet-action); color: #fff; }
.plist li.cur .pl-dot { border-color: var(--violet-action); color: var(--violet-action); }
.pl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pl-txt b { font-size: 15px; }
.plist .btn { margin: 0; flex: none; }

.pl-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: 0 1 auto; max-width: 55%; }
.pl-txt .badge { white-space: normal; }
.plist li { flex-wrap: wrap; }
@media (max-width: 700px) { .pl-acts { flex: 1 1 100%; max-width: none; padding-left: 44px; justify-content: flex-start; } }
/* Jeu-quiz : les 3 premiers à la fin de la partie (28/10) */
.lq-top { list-style: none; padding: 0; margin: 10px auto; max-width: 320px; text-align: left; display: grid; gap: 6px; }
.lq-top li { padding: 8px 12px; border-radius: 10px; background: var(--violet-pale); font-weight: 600; }

/* Nouveautés (29/10) : nouvelles vidéos et supports mis à jour */
/* Bandeau « nouvelle version de l'application » (09/11). */
.app-up { display: flex; gap: 12px; align-items: flex-start; background: var(--alerte-bg); border: 1px solid var(--alerte); color: var(--encre); border-radius: 16px; padding: 14px 16px; margin: 0 0 16px; }
.app-up-ico { font-size: 28px; line-height: 1; }
.app-up b { color: var(--alerte); }
.app-up p { margin: 4px 0 0; font-size: 14px; }
.nv { background: var(--surface, #fff); border: 1px solid var(--violet-pale); border-radius: 16px; padding: 14px 16px; margin: 0 0 16px; box-shadow: 0 2px 10px rgb(125 42 232 / .08); }
.nv-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nv-h h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.nv-h h2 span { background: #E5484D; color: #fff; border-radius: 999px; min-width: 22px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; font-size: 13px; }
.nv ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.nv-it { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; background: var(--violet-pale); color: inherit; text-decoration: none; }
.nv-it:hover { background: rgb(125 42 232 / .16); }
.nv-ico { font-size: 22px; }
.nv-it > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nv-it small { color: var(--muted, #6B6764); }
.nv-go { font-size: 22px; color: var(--violet-action); }

/* Accueil des commerciaux et technicos (11/11) : deux grands choix, le reste replié dans « Mon compte ». */
.acct { flex: none; position: relative; }
.acct > summary { cursor: pointer; list-style: none; padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--action);
  font-weight: 600; font-size: 14px; border: 1px solid rgb(125 42 232 / .25); }
.acct > summary::-webkit-details-marker { display: none; }
.acct[open] > summary { margin-bottom: 8px; }
.acct.flat > summary { display: none; }
.acct:not(.flat)[open] > summary { margin-bottom: 0; }
.acct:not(.flat) .welcome-acts { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; flex-direction: column; align-items: stretch;
  min-width: 240px; padding: 10px; background: #fff; border-radius: 14px; box-shadow: 0 12px 32px rgb(40 20 90 / .18); }
@media (max-width: 720px) { .acct:not(.flat) .welcome-acts { right: auto; left: 0; } }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }
.choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 190px; padding: 22px 18px;
  border-radius: 18px; border: 1px solid rgb(125 42 232 / .18); background: #fff; cursor: pointer; text-align: center;
  font: inherit; color: var(--encre); box-shadow: 0 6px 22px rgb(60 30 120 / .08); transition: transform .12s, box-shadow .12s; }
.choice:hover, .choice:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 28px rgb(60 30 120 / .14); }
.choice-ico { font-size: 46px; line-height: 1; }
.choice b { font-size: 21px; color: var(--action); }
.choice span:last-child { font-size: 14px; color: var(--muted, #666); }
#pres-go { background: var(--degrade); border: 0; }
#pres-go b, #pres-go span:last-child { color: #fff; }
.home-choose #progress, .home-choose #nv-banner, .home-choose #formations { display: none; }
.learn-back { margin: 10px 0 0; }
body.preview .welcome-acts { display: none; }
body.preview .acct { display: none; }

/* Annuaire de ma zone (TN-Optic Events, 11/11). */
.annuaire { margin-top: 18px; }
.annuaire input[type=search], #pres-q { width: 100%; margin: 6px 0 8px; }
.annu-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow: auto; }
.annu-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.annu-list li > span { display: flex; flex-direction: column; min-width: 0; }
.annu-list .link { white-space: nowrap; }
.annuaire > summary { cursor: pointer; font-weight: 700; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.annuaire[open] > summary { margin-bottom: 8px; }
/* Visite chez le client (11/11). */
.vi-who { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: rgb(125 42 232 / .08); font-size: 15px; }
.vi-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.vi-steps li { display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: #F5F5F5; color: #6B6764; font-size: 13px; font-weight: 600; }
.vi-steps li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; }
.vi-steps li.on { background: var(--degrade); color: #fff; }
.vi-steps li.on span { color: var(--action); }
.vi-steps li.done { color: #2E7D5B; }
.vi-bar { height: 6px; border-radius: 6px; background: #EEE; overflow: hidden; margin: 8px 0 14px; }
.vi-bar span { display: block; height: 100%; background: var(--degrade); transition: width .2s; }
.vi-qn { margin: 0; color: #6B6764; font-weight: 600; font-size: 14px; }
.vi-q { font-size: 22px; line-height: 1.35; margin: 6px 0 16px; }
.vi-opts { display: grid; gap: 10px; }
.vi-opt { display: flex; gap: 12px; align-items: center; text-align: left; padding: 16px 18px; min-height: 60px; border-radius: 14px; border: 2px solid var(--line, #DFDEDA);
  background: #fff; font: inherit; font-size: 17px; color: var(--encre); cursor: pointer; }
.vi-opt b { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: rgb(125 42 232 / .10); color: var(--action); }
.vi-opt.on, .vi-opt:active { border-color: var(--action); background: rgb(125 42 232 / .06); }
.vi-score { font-size: 30px; margin: 4px 0 12px; }
.vi-corr { padding-left: 18px; } .vi-corr li { margin-bottom: 10px; }
.vi-qrbox { max-width: 300px; margin: 14px auto; text-align: center; }
.vi-qrbox svg { width: 100%; height: auto; border-radius: 12px; background: #fff; }
.vi-signed { padding: 10px 14px; border-radius: 10px; background: #E7F4EE; color: #2E7D5B; font-weight: 700; }
.vi-outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.vi-out input { position: absolute; opacity: 0; }
.vi-out span { display: block; padding: 16px; border-radius: 14px; border: 2px solid var(--line, #DFDEDA); background: #fff; font-weight: 600; font-size: 16px; cursor: pointer; }
.vi-out input:checked + span { border-color: var(--action); background: rgb(125 42 232 / .08); color: var(--action); }
.vi-out input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 2px; }
.flash { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 999px;
  background: #231F20; color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgb(0 0 0 / .2); transition: opacity .6s; }
.flash.out { opacity: 0; }
.vi-out { position: relative; display: block; }
#vi-close > label { display: block; margin-bottom: 14px; }
#vi-close textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line, #DFDEDA); font: inherit; }
/* Choix du client au début d'une visite : suggestions de ma zone (11/11). */
.pres-sugg { list-style: none; margin: 4px 0 6px; padding: 0; border: 1px solid var(--line, #DFDEDA); border-radius: 12px; overflow: hidden; background: #fff; }
.pres-sugg:empty { display: none; }
.pres-sugg li + li { border-top: 1px solid var(--line, #DFDEDA); }
.pres-sugg button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 0; padding: 12px 14px; border: 0; border-radius: 0;
  background: #fff; color: var(--encre); font: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.pres-sugg button:hover, .pres-sugg button:focus-visible { background: rgb(125 42 232 / .06); }
.pres-sugg button small { color: #6B6764; font-size: 13px; }
.pres-sugg .pres-add { color: var(--action); font-weight: 700; flex-direction: row; align-items: center; }
.pres-chosen { margin: 6px 0; padding: 12px 14px; border-radius: 12px; background: rgb(125 42 232 / .08); }
.pres-newh { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #F8E9D0; font-size: 14px; }
.pres-ins { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: #E7F4EE; color: #2E7D5B; font-size: 12px; font-weight: 600; }
/* Liste de la zone à faire défiler (12/11). */
.pres-head { margin: 8px 0 4px; color: #8A4B0B; font-size: 14px; line-height: 1.45; }
.pres-head small { color: #6B6764; }
.pres-sugg { max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pres-sugg button { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pres-left { display: flex; flex-direction: column; gap: 3px; flex: 1 1 240px; min-width: 0; }
.pres-l1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pres-tel { color: var(--action) !important; font-weight: 600; white-space: nowrap; }
.pres-vis { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #F5F5F5; color: #6B6764; font-size: 12px; font-weight: 600; }
.pres-vis.on { background: rgb(125 42 232 / .10); color: #6420C7; }
.pres-add-li { position: sticky; top: 0; z-index: 1; }
.pres-add-li button { background: #FBF8FF; }
.pres-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; }
.pres-grid label { margin: 0; }
.pres-grid input, .pres-grid select { width: 100%; box-sizing: border-box; }
@media (max-width: 560px) { .pres-grid { grid-template-columns: 1fr 1fr; } }

.pres-next { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #E8F0FB; color: #0056C4; font-size: 12px; font-weight: 600; }
.pres-next.late { background: #FFF6E5; color: #8A4B0B; }
#vi-close input[type=date] { display: block; margin-top: 6px; }

.vi-given { border: 1px solid var(--line, #DFDEDA); border-radius: 12px; padding: 8px 14px 12px; margin: 0 0 14px; }
.vi-given legend { padding: 0 6px; font-weight: 600; }
#vi-given { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.vi-chk { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; cursor: pointer; }
.vi-chk input { width: 22px; height: 22px; margin: 0; }
.resume-path { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--action); text-transform: none; }
/* Parcours de l'opticien (12/11) : même dessin que la fiche de visite de l'administration (admin.css) */
.jr { margin: 14px 0; padding: 14px 16px 6px; border-radius: 16px; background: linear-gradient(135deg, rgb(0 196 204 / .08), rgb(125 42 232 / .10)); border: 1px solid rgb(125 42 232 / .18); }
.jr.jr-win { background: linear-gradient(135deg, rgb(253 186 77 / .25), rgb(125 42 232 / .12)); }
.jr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.jr-head h3 { margin: 0; }
.jr-lvl { font-size: 14px; } .jr-lvl b { font-size: 18px; color: var(--action); }
.jr-bar { flex: 1 1 140px; height: 10px; border-radius: 6px; background: #fff; overflow: hidden; box-shadow: inset 0 0 0 1px rgb(125 42 232 / .15); }
.jr-bar span, .jr-mini span { display: block; height: 100%; background: var(--degrade); border-radius: 6px; }
.jr-next { flex-basis: 100%; font-size: 14px; }
.jr-path { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 10px; counter-reset: s; }
.jr-path li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 0 4px; }
.jr-path li:not(:last-child)::after { content: ''; position: absolute; top: 28px; left: calc(50% + 32px); width: calc(100% - 54px); border-top: 3px dashed rgb(125 42 232 / .25); }
.jr-path li.jr-done:not(:last-child)::after { border-top-style: solid; border-color: #2E7D5B; }
.jr-stone { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #fff; border: 3px solid #DFDEDA; font-size: 26px; }
.jr-done .jr-stone { border-color: #2E7D5B; background: #E7F4EE; }
.jr-cur .jr-stone { border-color: var(--action); box-shadow: 0 0 0 6px rgb(125 42 232 / .15); animation: jr-pulse 1.6s ease-in-out infinite; }
.jr-todo .jr-stone { filter: grayscale(1); opacity: .55; }
.jr-n { position: absolute; right: -6px; bottom: -4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid currentColor; font-size: 11px; font-weight: 800; color: #6B6764; }
.jr-done .jr-n { color: #2E7D5B; } .jr-cur .jr-n { color: var(--action); }
.jr-path b { font-size: 13px; line-height: 1.25; } .jr-todo b { color: #6B6764; }
.jr-path small { font-size: 11px; color: #6B6764; line-height: 1.3; }
.jr-mini { display: block; width: 80px; height: 6px; border-radius: 4px; background: #fff; overflow: hidden; }
@keyframes jr-pulse { 50% { box-shadow: 0 0 0 11px rgb(125 42 232 / .06); } }
@media (prefers-reduced-motion: reduce) { .jr-cur .jr-stone { animation: none; } }
.jr-mark { width: auto; min-height: 0; margin: 4px 0 0; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--action); background: #fff; color: var(--action); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.jr-done .jr-mark { border-color: #DFDEDA; color: #6B6764; }
.jr-path { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.jr-stone { width: 50px; height: 50px; font-size: 22px; }
.jr-path li:not(:last-child)::after { top: 24px; left: calc(50% + 28px); width: calc(100% - 46px); }
.jr-mark:disabled { opacity: .5; }
#my-journey .jr { margin: 0 0 18px; background-color: #fff; }
/* Résultat de la visite : thèmes présentés et « ou prévu le » */
#vi-topics { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.vi-old { color: #6B6764; } .vi-old small { font-size: 12px; color: #2E7D5B; }
.vi-gi { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.vi-plan { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: #6B6764; }
.vi-plan input { width: auto; min-height: 34px; padding: 2px 8px; font-size: 14px; }
.jr { overflow: hidden; } /* les traits de liaison du bout de rangée ne sortent pas du cadre */
/* Page « Mon parcours » de l'opticien (12/11) */
.pc-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.pc-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pc-list h3 { margin: 0 0 4px; font-size: 16px; }
.pc-list p { margin: 0 0 4px; }
.pc-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; background: #fff; border: 2px solid #DFDEDA; }
.pc-done .pc-ico { border-color: #2E7D5B; background: #E7F4EE; }
.pc-cur { border-color: var(--action); box-shadow: 0 0 0 3px rgb(125 42 232 / .10); }
.pc-cur .pc-ico { border-color: var(--action); }
.pc-todo .pc-ico { filter: grayscale(1); opacity: .6; }
.pc-st { margin-left: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; color: #6B6764; }
.pc-done .pc-st { color: #2E7D5B; } .pc-cur .pc-st { color: var(--action); }
.pc-more { margin-top: 16px; text-align: right; }
/* Inscription par le QR d'une visite (12/11) : informations déjà remplies */
.idcard { margin: 16px 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--sable-clair); }
.idcard h2 { margin: 0 0 8px; font-size: 16px; }
.idcard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 8px; }
.idcard dt { color: #6B6764; font-size: 14px; } .idcard dd { margin: 0; font-weight: 600; }
.idcard .link { font-size: 14px; }
/* Suivi de mes visites (12/11) */
.choice-wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 6px 14px; padding: 16px 20px; text-decoration: none; color: inherit; }
.choice-wide .choice-ico { font-size: 32px; }
.choice-wide b { font-size: 19px; }
.choice-wide span:last-child { flex-basis: 100%; text-align: left; font-size: 15px; }
.vs-warn { color: #8A4B0B; }
.mv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.mv-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.mv-tile b { font-size: 28px; line-height: 1.1; } .mv-tile b span { font-size: 18px; color: #6B6764; }
.mv-tile small { color: #6B6764; }
.mv-main { grid-column: span 2; } @media (max-width: 560px) { .mv-main { grid-column: 1 / -1; } }
.mv-bar { display: block; height: 10px; border-radius: 6px; background: #EEE; overflow: hidden; } .mv-bar i { display: block; height: 100%; background: var(--degrade); }
.mv-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.mv-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.mv-list li.mv-day { border: 0; background: none; padding: 10px 2px 0; font-weight: 700; text-transform: capitalize; color: #6B6764; }
.mv-date { flex: none; min-width: 52px; font-weight: 700; }
.mv-who { flex: 1; min-width: 0; display: flex; flex-direction: column; } .mv-who small { color: #6B6764; }
.mv-st { flex: none; font-size: 13px; font-weight: 600; color: #6B6764; text-align: right; }
.mv-late { border-color: #8A4B0B !important; background: #FBF1E8 !important; } .mv-late .mv-st { color: #8A4B0B; }
.mv-today { border-color: var(--action) !important; } .mv-today .mv-st { color: var(--action); }
.mv-tel { flex: none; text-decoration: none; font-size: 20px; }
.mv-list .btn.small { width: auto; flex: none; }
.mv-tiles { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .mv-main { grid-column: auto; }
@media (max-width: 700px) { .mv-tiles { grid-template-columns: 1fr 1fr; } .mv-main { grid-column: 1 / -1; } }
/* Parcours du client déplié depuis « Suivi de mes visites » (12/11) */
button.mv-who { width: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.mv-more { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--action); white-space: nowrap; }
.mv-list li.mv-on { border-color: var(--action); }
.mv-list li.mv-jr { display: block; padding: 0; border: 0; background: none; }
.mv-list li.mv-jr .jr { margin: 0 0 6px; }
.mv-test { opacity: .55; }
/* Inscription (12/11) : « Déjà inscrit ? » et brouillon remis */
.already { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--action); border-radius: 12px; color: var(--action); text-decoration: none; font-size: 15px; background: rgb(125 42 232 / .06); }
.already b { white-space: nowrap; }
.draft-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #E1F5EE; color: #146346; font-size: 14px; }
.fgrid-opt { grid-template-columns: 1fr; }
#formations + #progress { margin-top: 18px; }

/* Graphique par jour du suivi des visites (16/11) : visites (violet), temps de la journée (turquoise), moyenne par visite (orange). */
.dch { margin: 6px 0 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.dch-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; font-size: 13px; color: #6B6764; }
.dch-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.dch-days { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 2px; }
.dch-day { flex: 1 0 128px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 12px; }
.dch-day > b { font-size: 13px; text-transform: capitalize; white-space: nowrap; }
.dch-today { background: rgb(125 42 232 / .06); }
.dch-empty .dch-p { opacity: .5; }
.dch-bars { display: flex; align-items: flex-end; gap: 4px; min-height: 152px; }
.dch-b { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dch-col { display: block; width: 32px; border-radius: 4px 4px 0 0; }
.dch-c1 { background: var(--action); } .dch-c2 { background: #00A3AA; } .dch-c3 { background: #F7931D; }
.dch-p { position: relative; z-index: 1; padding: 1px 5px; border: 1px solid var(--action); border-radius: 6px; background: #fff; font-weight: 700; font-size: 12px; white-space: nowrap; }
.dch-p2 { border-color: #00A3AA; color: #00686C; } .dch-p3 { border-color: #F7931D; color: #8A4B0B; }
.dch-obj { position: absolute; left: -3px; right: -3px; z-index: 0; border-top: 2px dashed #8A4B0B; opacity: .7; }
.dch-objv { border-color: var(--action-dark, #5B1FA8); }
.dch-day.dch-empty { flex: 0 0 62px; }
.dch-none { color: #B5B0AA; font-weight: 700; padding-bottom: 4px; }

/* Badge « Nouveau » (16/11) : rouge, en bas à droite de la couverture d'une formation. */
.cover-new { position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 5px 12px; border-radius: 999px; background: #E5233A; color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 4px 12px rgb(229 35 58 / .35); animation: cover-new 2.4s ease-in-out infinite; }
@keyframes cover-new { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .cover-new { animation: none; } }

/* Envoi du lien d'inscription depuis l'étape « Formation certifiante » de la visite (16/11). */
.vi-send { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fff); }
.vi-send p { margin: 0 0 8px; }
.vi-send-btns { display: flex; flex-wrap: wrap; gap: 8px; }
#vi-send-wa { background: #25D366; border-color: #25D366; color: #fff; }

/* Fenêtre d'envoi du lien d'inscription, au choix du client (16/11). */
.send-sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; background: rgb(16 35 63 / .45); padding: 16px; }
.send-sheet[hidden] { display: none; }
.send-box { width: 100%; max-width: 560px; background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 20px 50px rgb(16 35 63 / .3); }
.send-box h3 { margin: 0 0 6px; }
.send-wa { background: #25D366 !important; border-color: #25D366 !important; color: #fff !important; }
.pres-sendp { margin: 10px 0 0; }

/* Inscription : « Vous êtes Opticienne / Opticien » (17/11, pour le certificat du magasin). */
fieldset.genre { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin: 4px 0 12px; padding: 0; border: 0; }
fieldset.genre legend { float: left; margin-right: 8px; font-weight: 600; }
fieldset.genre label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
fieldset.genre input { width: auto; margin: 0; }
