@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; }
:root { --fond: #f3f1ec; --carte: #fff; --texte: #1c1d21; --texte-2: #5d5f66; --accent: #d9a530; --trait: #d8d4cc; --ok: #2f7d4f; --mal: #b8402f; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 15px/1.5 "Inter", system-ui, sans-serif; }
h1, h2 { font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.15rem; margin-bottom: .7rem; display: flex; align-items: center; gap: .5rem; }
h2 span { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--texte); color: #fff; font-size: .85rem; }
[hidden] { display: none !important; }
.entete { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; padding: 22px 24px 8px; max-width: 1240px; margin: 0 auto; }
.surtitre { margin: 0 0 4px; color: var(--texte-2); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.confid { margin: 0; color: var(--ok); font-size: .85rem; }
.grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; max-width: 1240px; margin: 0 auto; padding: 12px 24px 48px; }
@media (max-width: 900px) { .grille { grid-template-columns: 1fr; } .apercu-col { order: -1; } }
.etape { background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
label { display: block; margin: 10px 0 4px; font-weight: 600; font-size: .9rem; }
input[type=text], input:not([type]), input[type=url], input[type=number], select, textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--trait); border-radius: 8px; font: inherit; background: #fff; }
input[type=number] { width: 6rem; }
input[type=range] { width: 100%; accent-color: var(--texte); }
.case { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.case input { margin-top: .3rem; }
.aide { color: var(--texte-2); font-size: .85rem; margin: 6px 0 0; }
.aide.mal { color: var(--mal); } .aide.ok { color: var(--ok); }
.centre { text-align: center; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.depot { border: 2px dashed var(--trait); border-radius: 10px; padding: 18px; text-align: center; cursor: pointer; font-weight: 400; background: #faf9f6; }
.depot.survol { border-color: var(--texte); background: #fff; }
.depot { position: relative; }
.depot input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.depot:focus-visible, .depot:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.depot.inactif { opacity: .5; pointer-events: none; }
.liste { list-style: none; padding: 0; margin: 10px 0 0; font-size: .88rem; }
.liste li { display: flex; gap: .5rem; padding: 4px 0; border-bottom: 1px solid #eee; }
.liste .etiquette { flex: none; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 4px; background: #eee; }
.liste .autre { background: #f6d9d4; }
.sous { margin-top: 12px; }
.choix label { display: grid; grid-template-columns: auto 1fr; column-gap: .5rem; font-weight: 400; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 8px; margin: 6px 0; cursor: pointer; }
.choix label small { grid-column: 2; color: var(--texte-2); }
.choix label:has(input:checked) { border-color: var(--texte); background: #faf7ef; }
.recadrage { position: relative; display: inline-block; max-width: 100%; user-select: none; touch-action: none; overflow: hidden; border-radius: 6px; }
.recadrage canvas { display: block; max-width: 100%; max-height: 300px; border-radius: 6px; }
#recadrage-cadre { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; }
#video-source { width: 100%; margin-top: 8px; border-radius: 8px; background: #000; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.4rem; border: 0; border-radius: 999px; background: var(--texte); color: #fff; font: 600 1rem "Inter", sans-serif; cursor: pointer; width: 100%; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-petit { border: 1px solid var(--trait); background: #fff; border-radius: 999px; padding: 6px 14px; font: 600 .85rem "Inter", sans-serif; cursor: pointer; }
.btn-petit.actif { background: var(--texte); color: #fff; border-color: var(--texte); }
.rangee { display: flex; gap: 8px; justify-content: center; }
.apercu-col { position: sticky; top: 12px; align-self: start; }
.apercu-boite { background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 12px; }
.apercu { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: #8f8b84; }
.apercu canvas { display: block; width: 100% !important; height: 100% !important; }
.carte-vue { display: block; margin: 12px auto 0; max-width: 60%; border-radius: 6px; }
.publier { margin-top: 12px; padding: 10px 14px; background: #eef6f0; border-radius: 8px; }
.publier ol { margin: 4px 0 0; padding-left: 1.2rem; }
code { background: #eee; padding: 0 4px; border-radius: 4px; }

/* 2026-11-08 */
.champs { border: 0; padding: 0; margin: 0; min-width: 0; }
.champs:disabled .depot, .champs:disabled .etape { opacity: .7; }
.liste li { align-items: center; }
.liste .nom { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.liste .principal { background: var(--texte); color: #fff; }
.liste .note-liste { color: var(--texte-2); font-size: .8rem; border: 0; }
#recadrage-cadre:focus-visible { outline: 3px solid var(--accent); }
.alerte { max-width: 1240px; margin: 12px auto 0; padding: 10px 14px; border: 2px solid var(--mal); border-radius: 10px; background: #fbeae7; color: var(--mal); }
.alerte p { margin: 4px 0; } .alerte-titre { font-weight: 600; }
.diagnostic { max-width: 1240px; margin: 12px auto 32px; padding: 0 24px; font-size: .85rem; }
.diagnostic summary { cursor: pointer; font-weight: 600; }
.diagnostic table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.diagnostic td { border-bottom: 1px solid var(--trait); padding: 3px 6px; vertical-align: top; overflow-wrap: anywhere; }
.diagnostic .mal { color: var(--mal); font-weight: 600; } .diagnostic .att { color: #9a6a00; font-weight: 600; } .diagnostic .ok { color: var(--ok); } .diagnostic .info { color: var(--texte-2); }
.apercu canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* Onglets : un projet / toute une classe */
.onglets { display: flex; gap: 6px; max-width: 1240px; margin: 4px auto 0; padding: 0 24px; }
.onglets button { border: 1px solid var(--trait); background: #fff; border-radius: 999px; padding: 8px 16px; font: 600 .9rem "Inter", sans-serif; cursor: pointer; }
.onglets button[aria-selected="true"] { background: var(--texte); color: #fff; border-color: var(--texte); }
.choix-mini label { padding: 6px 10px; margin: 4px 0; }
/* Tableau de la classe */
.tableau-classe { overflow-x: auto; margin-top: 10px; }
#table-classe { width: 100%; border-collapse: collapse; font-size: .85rem; }
#table-classe th { text-align: left; font-weight: 600; color: var(--texte-2); padding: 4px; border-bottom: 1px solid var(--trait); }
#table-classe td { padding: 4px; border-bottom: 1px solid #eee; vertical-align: middle; }
#table-classe input, #table-classe select { padding: 5px 6px; font-size: .85rem; }
#table-classe img, #table-classe canvas { width: 56px; height: 40px; object-fit: cover; border-radius: 4px; display: block; background: #ddd; }
#table-classe tr.choisie { background: #faf7ef; }
#table-classe tr { cursor: pointer; }
.etat-ligne { white-space: nowrap; font-size: .78rem; color: var(--texte-2); }
.etat-ligne.ok { color: var(--ok); } .etat-ligne.mal { color: var(--mal); }
#table-classe input.manque { border-color: var(--mal); background: #fbeae7; }

/* Œuvres publiées */
.gestion-fenetre { border: 1px solid var(--trait); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.gestion-fenetre h3 { margin: 0 0 6px; font: 700 1rem "Space Grotesk", sans-serif; display: flex; align-items: center; gap: .5rem; }
.gestion-fenetre h3 i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.gestion-oeuvre { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid #eee; }
.gestion-oeuvre img { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; background: #ddd; }
.gestion-oeuvre .champs-o { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gestion-oeuvre .champs-o input, .gestion-oeuvre .champs-o textarea { padding: 6px 8px; font-size: .85rem; }
.gestion-oeuvre details { grid-column: 1 / -1; font-size: .85rem; }
.gestion-oeuvre details .champs-o { margin-top: 6px; }
.gestion-oeuvre .actions-o { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 210px; }
.gestion-oeuvre .actions-o select { width: auto; padding: 4px 6px; font-size: .8rem; }
.gestion-oeuvre.modifiee { background: #fffbea; }
.liste-gestion { list-style: none; padding: 0; margin: 6px 0 0; font-size: .88rem; }
.liste-gestion li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid #eee; flex-wrap: wrap; }
.liste-gestion li span { flex: 1; min-width: 12rem; }
.liste-gestion select { width: auto; padding: 4px 6px; font-size: .85rem; }

.onglets { flex-wrap: wrap; align-items: center; }
.lien-aide { margin-left: auto; font-weight: 600; font-size: .9rem; color: var(--texte); }
/* Fenêtres */
.fenetre-carte { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eee; }
.fenetre-carte img { width: 64px; height: 74px; object-fit: cover; border-radius: 4px; border: 3px solid var(--c, #999); }
.fenetre-carte b { font-family: "Space Grotesk", sans-serif; }
.fenetre-carte .liens { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.fenetre-carte .liens a { font-size: .82rem; }
.progression { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progression i { display: block; height: 100%; background: var(--texte); width: 0; transition: width .2s; }
/* Réglages */
.reglage { padding: 8px 0; border-bottom: 1px solid #eee; }
.reglage h3 { margin: 10px 0 4px; font: 700 .95rem "Space Grotesk", sans-serif; }
.reglage label { margin: 0; }
.reglage .ligne { display: flex; gap: 10px; align-items: center; }
.reglage .ligne input[type=range] { flex: 1; }
.reglage .ligne output { min-width: 4.2em; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.reglage .defaut { font-size: .78rem; color: var(--texte-2); }
.reglage.change { background: #fffbea; }
.groupe-reglages { margin: 14px 0 0; font: 700 .8rem "Inter", sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-2); }
.essai { display: flex; gap: 14px; align-items: center; }
.essai a { font-size: .8rem; overflow-wrap: anywhere; }

/* Espace prof : connexion et état de la publication */
.espace-barre { max-width: 1240px; margin: 6px auto 0; padding: 8px 24px; font-size: .85rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--ok); }
.espace-barre span { flex: 1; min-width: 14rem; }
.espace-barre.hors-ligne { color: var(--texte-2); }
.porte { position: fixed; inset: 0; z-index: 100; background: rgba(28, 29, 33, .55); display: grid; place-items: center; padding: 16px; }
.porte-carte { background: var(--carte); border-radius: 14px; padding: 22px 24px; width: min(420px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.porte-carte h2 { margin: 4px 0 6px; font-size: 1.4rem; }
.porte-carte .btn { margin-top: 12px; }
body.porte-ouverte { overflow: hidden; }

/* ---------- Assistant de mise en route ---------- */
.mer { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; border: 0; border-radius: 16px; padding: 0; background: var(--carte); color: var(--texte); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.mer::backdrop { background: rgba(28,29,33,.55); }
.mer-tete { padding: 22px 26px 6px; }
.mer-tete h2 { margin: 0; font: 700 1.6rem "Space Grotesk", "Inter", sans-serif; }
.mer-liste { list-style: none; margin: 0; padding: 6px 26px 4px; }
.mer-etape { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--trait); }
.mer-etape h3 { margin: 4px 0 2px; font: 600 1rem "Inter", sans-serif; }
.mer-etape p, .mer-etape ol { margin: 6px 0; font-size: .92rem; }
.mer-etape ol { padding-left: 1.2rem; }
.mer-pastille { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--texte); font: 700 .9rem "Inter", sans-serif; }
.mer-etape.ok .mer-pastille { background: var(--ok); border-color: var(--ok); color: #fff; }
.mer-etape.ok h3 { color: var(--texte-2); }
.mer-etape.afaire .mer-pastille { background: var(--accent); border-color: var(--accent); color: #fff; }
.mer-etape.vous .mer-pastille { border-style: dashed; }
.mer-fait { font: 600 .72rem "Inter", sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--ok); margin-left: 6px; }
.mer-etape .btn { width: auto; }
.mer-pdf { margin: 6px 0; padding-left: 1.1rem; font-size: .92rem; }
.mer-essai { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mer-qr { width: 132px; flex: none; background: #fff; border: 1px solid var(--trait); border-radius: 8px; padding: 4px; }
.mer-qr svg { display: block; width: 100%; height: auto; }
.mer-essai > div:last-child { flex: 1 1 260px; }
.mer-pied { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 26px 18px; background: var(--carte); border-top: 1px solid var(--trait); }
.mer-bilan { margin: 0; flex: 1 1 260px; font-size: .9rem; color: var(--texte-2); }
.mer-bilan.ok { color: var(--ok); font-weight: 600; }
.mer-pied .lien-aide { margin-left: 0; }
@media (max-width: 560px) { .mer-tete, .mer-liste, .mer-pied { padding-left: 16px; padding-right: 16px; } }

.porte-sans { display: block; margin: 10px 0 0; }
.espace-barre .en-attente { flex-basis: 100%; color: var(--accent-fonce, #8a5a00); }
.dialogue-mdp { border: 0; border-radius: 14px; padding: 22px 24px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dialogue-mdp::backdrop { background: rgba(28,29,33,.55); }
.dialogue-mdp label { display: block; margin-top: 10px; }
.dialogue-mdp .actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* boîte d'erreur : toujours visible (collée en haut) et refermable */
.alerte { position: sticky; top: 8px; z-index: 60; }
.alerte-fermer { float: right; margin-left: 10px; }
