/* LPC Atelier — charte reprise de la maquette validée le 12/06/2026 */
:root {
  --bois: #BA7517; --bois-pale: #FAEEDA; --bois-fonce: #633806;
  --vert: #0F6E56; --vert-pale: #E1F5EE; --vert-fonce: #085041;
  --ardoise: #36608E; --ardoise-pale: #E6F1FB;
  --rouge: #A32D2D; --rouge-pale: #FCEBEB;
  --pfmp: #8A5A9E; --pfmp-pale: #F3EAF8;
  --txt: #2C2C2A; --txt2: #5F5E5A; --bord: #D3D1C7; --fond: #F6F5F1;
  --surface: #fff;        /* fond des cartes / en-tête / fenêtres */
  --saisie: var(--saisie);      /* fond des champs de saisie (crème) */
  --ombre: 0 1px 2px rgba(44,44,42,.04);   /* ombre douce des cartes (thème clair) */
}

/* ===== THÈME SOMBRE & CLASSE (ardoise + accent doré) ===== */
body[data-theme="sombre"] {
  --bois: #E0A84A; --bois-pale: #2E2A20; --bois-fonce: #F2CE86;
  --vert: #34C496; --vert-pale: #173028; --vert-fonce: #86E6C8;
  --ardoise: #6EA8E6; --ardoise-pale: #1B2734;
  --rouge: #E5736F; --rouge-pale: #341F1E;
  --pfmp: #B98FD6; --pfmp-pale: #2A2233;
  --txt: #E8EAED; --txt2: #A6ABB3; --bord: #39414C; --fond: #171A1F;
  --surface: #21262E; --saisie: #2A313A;
  --ombre: 0 1px 3px rgba(0,0,0,.45);
}

/* ===== THÈME MODERNE (clair, frais, accent émeraude) ===== */
body[data-theme="moderne"] {
  --bois: #0E8A6E; --bois-pale: #E2F6F0; --bois-fonce: #0A5C4A;
  --vert: #2563C9; --vert-pale: #E7F0FD; --vert-fonce: #1B4894;
  --ardoise: #4B6A8E; --ardoise-pale: #EAF0F6;
  --rouge: #C0392B; --rouge-pale: #FBEAE8;
  --pfmp: #7C5CC4; --pfmp-pale: #EFEAFA;
  --txt: #1B2430; --txt2: #5A6573; --bord: #DDE3EA; --fond: #F2F5F9;
  --surface: #fff; --saisie: #F8FAFC;
  --ombre: 0 1px 3px rgba(20,30,50,.07);
}

/* En thème SOMBRE, les DOCUMENTS (progression, fiches, déroulement, éval) s'affichent sur fond
   « papier » clair : on rétablit localement la palette claire → matrice et fiches restent lisibles
   (et les images/PDF générés depuis le DOM restent clairs). */
body[data-theme="sombre"] #zone-progression,
body[data-theme="sombre"] #zone-plan,
body[data-theme="sombre"] #plan-print,
body[data-theme="sombre"] .modale-large,
body[data-theme="sombre"] .modale-deroulement {
  --txt: #2C2C2A; --txt2: #5F5E5A; --bord: #D3D1C7; --fond: #F6F5F1; --surface: #fff; --saisie: #FFFDF4;
  --bois: #BA7517; --bois-pale: #FAEEDA; --bois-fonce: #633806;
  --vert: #0F6E56; --vert-pale: #E1F5EE; --vert-fonce: #085041;
  --ardoise: #36608E; --ardoise-pale: #E6F1FB;
  --rouge: #A32D2D; --rouge-pale: #FCEBEB; --pfmp: #8A5A9E; --pfmp-pale: #F3EAF8;
  background: #fff; color: #2C2C2A;
}
body[data-theme="sombre"] #zone-progression { border-radius: 10px; }
* { box-sizing: border-box; margin: 0; }
body { font-family: "Segoe UI", system-ui, sans-serif; background: var(--fond); color: var(--txt); line-height: 1.5; }
.conteneur { max-width: 1460px; margin: 0 auto; padding: 24px 24px 60px; }
/* écran 1 = formulaire : colonne centrée lisible (le reste des écrans utilise toute la largeur) */
#ecran1 { max-width: 1040px; margin: 0 auto; }
header.site { background: var(--surface); border-bottom: 1px solid var(--bord); }
header.site .conteneur { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.logo { font-size: 20px; font-weight: 600; color: var(--bois-fonce); }
.logo span { color: var(--bois); }
.logo small { font-weight: 400; font-size: 12px; color: var(--txt2); }
.badge-proto { font-size: 12px; background: var(--vert-pale); color: var(--vert-fonce); padding: 4px 10px; border-radius: 20px; font-weight: 600; }
.site-droite { display: flex; align-items: center; gap: 14px; }
.theme-select { font-size: 12.5px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--bord); background: var(--surface); color: var(--txt); cursor: pointer; }
.nc-radio { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; cursor: pointer; }
.nc-radio input { width: auto; margin: 0; }
.logo-img { height: 52px; width: auto; display: block; }
/* logo en tête des documents imprimés (aligné à droite) */
.doc-logo { display: block; height: 64px; width: auto; margin: 0 0 6px auto; }
.accroche-sos { background: var(--bois-pale); border-left: 4px solid var(--bois); border-radius: 8px; padding: 10px 14px; margin: 4px 0 18px; font-size: 14px; color: var(--txt); max-width: 760px; }
.accroche-sos b { color: var(--bois-fonce); }
.promo-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.promo-entete .champ { margin: 0; }
.promo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; padding: 10px 14px; margin: 4px 0; }
.promo-bar select { max-width: 320px; }
.promo-bar .promo-info { flex: 1 1 200px; min-width: 150px; max-width: 280px; border: 1px solid var(--bord); background: var(--saisie); border-radius: 6px; padding: 4px 8px; font-size: 13px; font-family: inherit; }
.promo-bar .promo-sel { flex: 1 1 auto; max-width: 640px; }
.promo-bar .promo-mil { font-size: 13px; color: var(--txt2); display: inline-flex; align-items: center; gap: 6px; }
.promo-bar .promo-code { font-size: 13px; color: var(--txt2); margin-left: auto; }
.promo-bar .promo-code b { font-family: ui-monospace, monospace; color: var(--bois-fonce); letter-spacing: .5px; }
.obj-tp { margin-top: 5px; font-size: 12.5px; color: var(--txt2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.obj-tp b { color: var(--txt); font-weight: 600; }
.obj-input { flex: 1 1 260px; min-width: 200px; border: 1px solid var(--bord); background: var(--saisie); border-radius: 5px; padding: 3px 7px; font-size: 12.5px; font-family: inherit; }

/* infobulle d'aide : petite icône ⓘ ; la bulle (.ib-flottante) est posée sur <body> en position:fixed */
.infobulle { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--bois, #8a6d3b); color: #fff; font-size: 11px; font-weight: 700; cursor: help; flex: 0 0 auto; user-select: none; }
.infobulle:hover, .infobulle:focus { outline: none; box-shadow: 0 0 0 2px rgba(138,109,59,.35); }
.ib-flottante { display: none; position: fixed; z-index: 1000; width: 320px; max-width: 90vw; background: var(--surface); color: var(--txt); border: 1px solid var(--bord); border-left: 4px solid var(--bois, #8a6d3b); border-radius: 8px; box-shadow: 0 6px 22px rgba(0,0,0,.18); padding: 10px 12px; font-size: 12.5px; font-weight: 400; line-height: 1.45; text-align: left; }
.ib-flottante b { color: var(--bois-fonce); }
/* puce d'aide pédagogique 💡 (distincte du ⓘ) : survol = explication pour profs débutants */
.aide-puce { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ardoise-pale); border: 1px solid var(--ardoise); font-size: 10px; line-height: 1; cursor: help; user-select: none; vertical-align: middle; margin-left: 5px; flex: 0 0 auto; transition: box-shadow .12s, transform .12s; }
.aide-puce:hover, .aide-puce:focus { outline: none; box-shadow: 0 0 0 3px rgba(54,96,142,.28); transform: scale(1.12); }
/* bouton d'aide générale (en-tête) */
.btn-aide-gen { border: 1px solid var(--ardoise); background: var(--ardoise-pale); color: var(--ardoise); font-weight: 700; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn-aide-gen:hover { background: var(--ardoise); color: #fff; }
/* fenêtre « Comment ça marche ? » — large (.modale.X pour battre .modale max-width:580px) + lecture en 2 colonnes */
.modale.modale-aide { max-width: 1180px; width: 94vw; }
.aide-gen-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--bois); padding-bottom: 10px; margin-bottom: 12px; }
.aide-gen-corps { max-height: 72vh; overflow-y: auto; padding-right: 6px; column-count: 2; column-gap: 30px; }
@media (max-width: 760px) { .aide-gen-corps { column-count: 1; } }
.ag-intro { font-size: 14px; background: var(--ardoise-pale); border-left: 4px solid var(--ardoise); padding: 10px 12px; border-radius: 0 8px 8px 0; margin-bottom: 14px; column-span: all; }
/* écran « Comment ça marche » : fond bleuté + bordure bleue pour le distinguer des autres fenêtres */
.carte.carte-aide { background: var(--ardoise-pale); border: 1px solid var(--ardoise); border-left: 5px solid var(--ardoise); }
.carte.carte-aide .ag-intro { background: var(--surface); }
/* avertissement qualité des référentiels (1re page) */
.avert-ref { background: var(--bois-pale); border-left: 5px solid var(--bois); color: var(--txt); border-radius: 0 8px 8px 0; padding: 10px 14px; margin: 10px 0 14px; font-size: 13.5px; line-height: 1.45; }
.avert-ref a { display: inline-block; margin-top: 4px; color: var(--bois-fonce); font-weight: 700; }
.ag-section { margin-bottom: 13px; break-inside: avoid; }
.ag-section h3 { font-size: 14.5px; color: var(--bois-fonce); margin-bottom: 3px; }
.ag-section > div { font-size: 13px; line-height: 1.5; }
.ag-section ul { margin: 3px 0 0; padding-left: 20px; }
.ag-section li { margin-bottom: 2px; }
/* Mes documents : miniatures cliquables + plein écran */
.docs-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 14px; }
@media (max-width: 640px) { .docs-grille { grid-template-columns: 1fr; } }
.doc-carte { display: flex; flex-direction: column; }
.doc-titre { font-size: 16px; margin-bottom: 2px; }
.doc-sous { font-size: 12.5px; color: var(--txt2); margin-bottom: 10px; }
.doc-vignette { border: 1px solid var(--bord); border-radius: 10px; background: var(--fond); height: 200px; overflow: hidden; cursor: zoom-in; display: flex; align-items: center; justify-content: center; padding: 6px; transition: border-color .12s, box-shadow .12s; }
.doc-vignette:hover { border-color: var(--bois); box-shadow: var(--ombre); }
.doc-vignette img { max-width: 100%; max-height: 100%; }
.doc-vide { color: var(--txt2); font-size: 12.5px; font-style: italic; text-align: center; padding: 16px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hors-ecran { position: absolute; left: -99999px; top: 0; width: 1100px; }
.modale.modale-doc { max-width: 98vw; width: 98vw; }
.doc-modale-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.doc-modale-corps { max-height: 86vh; overflow: auto; background: var(--fond); border-radius: 8px; text-align: center; }
.doc-modale-corps img { width: 100%; height: auto; display: block; margin: 0 auto; }
/* « Générer le PDF du projet » : sélection des documents par TP */
.ecran5-tete { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.pj-haut { display: flex; gap: 8px; margin-bottom: 8px; }
.pj-special .pj-badge { background: var(--bois-pale); color: var(--bois-fonce); }
.pj-liste { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.pj-ouvrage { margin-bottom: 14px; }
.pj-ouvrage h3 { font-size: 15px; color: var(--bois-fonce); border-bottom: 1px solid var(--bord); padding-bottom: 4px; margin-bottom: 8px; }
.pj-tp { margin: 0 0 10px 6px; }
.pj-tpnom { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; color: var(--txt); margin-bottom: 4px; cursor: pointer; }
.pj-tpnom .pj-tp-master { width: 16px; height: 16px; flex-shrink: 0; }
.pj-tpnom.ccf { color: var(--rouge); }
.pj-doc { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border: 1px solid var(--bord); border-radius: 8px; margin-bottom: 5px; cursor: pointer; font-size: 13px; }
.pj-doc:hover { border-color: var(--bois); }
.pj-doc .pj-chk { width: 17px; height: 17px; flex-shrink: 0; }
.pj-badge { font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 9px; white-space: nowrap; flex-shrink: 0; }
.pj-pret .pj-badge { background: var(--vert-pale); color: var(--vert-fonce); }
.pj-vide .pj-badge { background: var(--fond); color: var(--txt2); border: 1px solid var(--bord); }
.pj-vide { opacity: .85; }
.pj-lbl { flex: 1; }

.etapes { display: flex; gap: 8px; margin: 26px 0 22px; }
.etape { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--bord); background: var(--surface); cursor: pointer; font-size: 14px; color: var(--txt2); }
.etape .num { width: 26px; height: 26px; border-radius: 50%; background: var(--fond); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.etape.active { border-color: var(--bois); background: var(--bois-pale); color: var(--bois-fonce); font-weight: 600; }
.etape.active .num { background: var(--bois); color: #fff; }
.etape.faite .num { background: var(--vert); color: #fff; }

.ecran { display: none; }
.ecran.visible { display: block; }
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--ombre); }
/* dynamisme : transitions douces + survol des cartes/boutons (toutes thématiques) */
.btn { transition: filter .12s, transform .08s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.bo-carte, .ouvrage, .etape { transition: border-color .14s, box-shadow .14s, transform .14s, background .14s; }
.bo-carte:hover, .ouvrage:hover { box-shadow: var(--ombre); transform: translateY(-1px); border-color: var(--bois); }
h1 { font-size: 24px; margin-bottom: 4px; }
h2 { font-size: 18px; margin-bottom: 12px; }
.annee-detail { font-size: 13px; font-weight: 400; color: var(--txt2); }
.sous { color: var(--txt2); font-size: 14px; margin-bottom: 18px; }
.pedago { background: var(--ardoise-pale); border-left: 4px solid var(--ardoise); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 13.5px; color: var(--txt); margin: 14px 0; }
.pedago b { display: block; margin-bottom: 2px; color: var(--ardoise); }
.indice { font-size: 12.5px; color: var(--txt2); margin-top: 4px; }

label.champ { display: block; font-size: 13px; font-weight: 600; color: var(--txt2); margin: 14px 0 4px; }
select, input[type=date], input[type=number], input[type=text] { padding: 9px 12px; border: 1px solid var(--bord); border-radius: 8px; font-size: 15px; background: var(--surface); color: var(--txt); }
select { width: 100%; max-width: 460px; }
input[type=date] { max-width: 220px; }
input[type=number] { width: 76px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 9px; border: none; background: var(--bois); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn:hover { background: #9a5f10; }
.btn.secondaire { background: var(--surface); color: var(--txt); border: 1px solid var(--bord); font-weight: 500; }
.btn-mini { padding: 7px 14px; font-size: 13px; margin-top: 8px; }

/* Blocs repliables (vacances, PFMP) */
.repli { border: 1px solid var(--bord); border-radius: 10px; background: var(--surface); margin: 16px 0; padding: 0 14px; max-width: 640px; }
.repli summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--txt); padding: 11px 0; list-style-position: inside; }
.repli[open] summary { border-bottom: 1px solid var(--bord); margin-bottom: 8px; }
.repli > *:last-child { margin-bottom: 12px; }
.resume-repli { font-weight: 400; font-size: 12.5px; color: var(--txt2); margin-left: 6px; }
.ligne-dates { display: flex; align-items: center; gap: 5px 12px; flex-wrap: wrap; padding: 7px 0; font-size: 13px; border-top: 1px dashed var(--bord); }
.ligne-dates:first-child { border-top: none; }
.ligne-dates .nom-vac { flex: 0 0 100%; font-weight: 700; color: var(--txt); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.dd-grp { display: inline-flex; align-items: center; gap: 5px; }
.dd-lab { color: var(--txt2); font-size: 12px; white-space: nowrap; }
.ligne-dates .fleche { color: var(--txt2); font-size: 12px; }
.ligne-dates input[type=date] { max-width: 140px; }
.ligne-dates input[type=number] { width: 52px; }
.ligne-dates button.suppr { border: none; background: none; color: var(--rouge); font-size: 16px; cursor: pointer; padding: 0 4px; }

.deux-col { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .deux-col { grid-template-columns: 1fr; } }

/* Les 3 panneaux du haut (ouvrages / compétences / savoirs) */
.trois-panneaux { display: grid; grid-template-columns: 1fr 1.15fr 1.15fr; gap: 14px; align-items: start; margin-bottom: 16px; }
@media (max-width: 900px) { .trois-panneaux { grid-template-columns: 1fr; } }
/* étape 2 : bandeau ouvrage horizontal + 3 colonnes (définition | compétences | savoirs) */
.bandeau-ouvrage { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; }
.bandeau-ouvrage .bo-lbl { font-weight: 700; color: var(--bois-fonce); font-size: 15px; }
.bandeau-ouvrage select { flex: 0 1 380px; max-width: 460px; font-size: 15px; padding: 8px 12px; }
/* bandeau horizontal défilant de cartes ouvrages (étape 3) */
.bandeau-titre { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--bois-fonce); margin-bottom: 10px; flex-wrap: wrap; }
.bandeau-defilant { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; }
.bo-carte { position: relative; flex: 0 0 230px; max-width: 230px; border: 1px solid var(--bord); border-radius: 10px; padding: 9px 11px; background: var(--surface); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.bo-carte:hover { border-color: var(--bois); }
.bo-carte.choisi { border: 2px solid var(--bois); background: var(--bois-pale); box-shadow: 0 2px 8px rgba(186,117,23,.18); }
.bo-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding-right: 16px; }
.bo-photo { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.bo-noimg { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--fond); border-radius: 6px; font-size: 20px; flex-shrink: 0; }
.bo-nom-bloc { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bo-nom { font-size: 14px; font-weight: 700; color: var(--bois-fonce); line-height: 1.2; }
.bo-etoiles { font-size: 13px; color: var(--bois); letter-spacing: 1px; }

/* filtre par difficulté (étape 4 Mon année) */
.filtre-etoiles { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.fe-chip { border: 1px solid var(--bord); background: var(--surface); border-radius: 14px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; color: var(--txt2); }
.fe-chip:hover { border-color: var(--bois); }
.fe-chip.actif { background: var(--bois-pale); border-color: var(--bois); color: var(--bois-fonce); font-weight: 700; }
.bo-caps { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 5px; }
.bo-cap { font-size: 10px; font-weight: 700; background: var(--ardoise-pale); color: var(--ardoise); border-radius: 4px; padding: 1px 6px; }
.bo-badges { display: flex; flex-wrap: wrap; gap: 3px; max-height: 86px; overflow-y: auto; }
.bo-badges .comp { font-size: 10px; }
.bo-badges .bo-sav { background: var(--ardoise-pale); color: var(--ardoise); }
.bo-tp { font-size: 10px; font-weight: 600; background: var(--fond); border: 1px solid var(--bord); color: var(--txt2); border-radius: 4px; padding: 1px 6px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

.deux-panneaux-ref { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin-bottom: 16px; }
@media (max-width: 760px) { .deux-panneaux-ref { grid-template-columns: 1fr; } }
#def-zone { overflow: visible; }
#def-zone .def-section .ligne-tp { background: var(--surface); }
/* zone TP/TD (étape 3) : les TP/TD en CARTES dans un seul bandeau horizontal chronologique */
.def-tps { align-items: stretch; gap: 10px; }
.def-tps .ligne-tp { position: relative; flex: 0 0 290px; max-width: 290px; margin: 0; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.def-tps .ligne-tp input { background: var(--saisie); color: var(--txt); }   /* champs distincts du fond de carte (clair ET sombre) */
.def-tps .ligne-tp.drag-cible { border-color: var(--bois); box-shadow: -3px 0 0 var(--bois); }
/* barre du haut : poignée, flèches d'ordre, rang, CCF, suppression */
.tp-barre { display: flex; align-items: center; gap: 5px; padding-right: 50px; }   /* place pour les 2 boutons d'angle (dupliquer + supprimer) */
.tp-grip { cursor: grab; color: var(--txt2); font-size: 15px; line-height: 1; padding: 0 2px; user-select: none; }
.tp-grip:active { cursor: grabbing; }
.tp-fleche { border: 1px solid var(--bord); background: var(--surface); color: var(--txt); border-radius: 5px; width: 22px; height: 22px; cursor: pointer; font-size: 11px; padding: 0; line-height: 1; }
.tp-fleche:hover:not(:disabled) { border-color: var(--bois); color: var(--bois-fonce); }
.tp-fleche:disabled { opacity: .35; cursor: default; }
.tp-rang { min-width: 20px; text-align: center; font-weight: 800; font-size: 12px; color: var(--bois-fonce); background: var(--bois-pale); border-radius: 5px; padding: 1px 0; }
.tp-barre .badge-suppr-tp { margin-left: auto; }
/* réglages : durée + rattachement (liste déroulante) */
.tp-reglages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--txt2); }
.tp-reglages .duree-tp input { width: 50px; }
.tp-groupe { display: flex; align-items: center; gap: 4px; }
.tp-groupe select { font-size: 12px; padding: 2px 5px; max-width: 180px; border-radius: 6px; }
.ajout-tp-carte { flex: 0 0 132px; align-self: stretch; border: 1.5px dashed var(--bord); border-radius: 9px; background: transparent; color: var(--txt2); cursor: pointer; font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.ajout-tp-carte:hover { border-color: var(--bois); color: var(--bois-fonce); }
/* aperçu de l'ouvrage dans la vignette « Mes ouvrages » */
.bo-apercu { width: 100%; height: 96px; object-fit: cover; border-radius: 7px; display: block; }

/* 5 onglets : un peu plus serrés */
.etapes-5 .etape { padding: 9px 10px; font-size: 13px; gap: 7px; }
.etapes-5 .etape .num { width: 23px; height: 23px; font-size: 12px; }
.etapes-6 .etape { padding: 8px 8px; font-size: 12px; gap: 6px; line-height: 1.15; min-width: 0; }
.etapes-6 .etape .num { width: 21px; height: 21px; font-size: 11px; }
/* onglet « Comment ça marche » : fond bleu, distinct des étapes numérotées (orange) */
#tab0 { background: var(--ardoise-pale); border-color: var(--ardoise); color: var(--ardoise); font-weight: 600; }
#tab0 .num { background: var(--ardoise); color: #fff; }
#tab0.active { background: var(--ardoise); color: #fff; }
#tab0.active .num { background: #fff; color: var(--ardoise); }

/* Écran 1 « Ma classe » : deux colonnes pour utiliser la largeur et limiter le défilement */
.grille-classe { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 12px; }
.grille-classe .groupe-form { margin-bottom: 0; height: 100%; }
@media (max-width: 900px) { .grille-classe { grid-template-columns: 1fr; } }

/* Écran 2 « Mes ouvrages » : constructeur */
.builder-id { padding: 14px 16px; }
/* croix rouge ronde de suppression — FORMAT PARTAGÉ (vignette ouvrage, carte TP/TD, ruban Mon année, PFMP) */
.croix-suppr { width: 21px; height: 21px; border-radius: 50%; border: 1px solid var(--bord); background: var(--surface);
  color: var(--rouge); font-size: 12px; font-weight: 800; line-height: 1; cursor: pointer; padding: 0; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: background .12s, color .12s, transform .12s; }
.croix-suppr:hover { background: var(--rouge); color: #fff; border-color: var(--rouge); transform: scale(1.1); }
.croix-coin { position: absolute; top: 5px; right: 5px; z-index: 2; }   /* coin haut-droit d'une carte */
.croix-mini { width: 18px; height: 18px; font-size: 11px; box-shadow: none; }   /* version compacte en ligne */
/* bouton « dupliquer » (à gauche de la croix de suppression, ton bois et non rouge) */
.croix-dup { position: absolute; top: 5px; right: 31px; z-index: 2; color: var(--bois-fonce); font-weight: 700; }
.croix-dup:hover { background: var(--bois); color: #fff; border-color: var(--bois); }
.bld-parties { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.bld-partie-chip { background: #FBF6EC; border: 1px solid var(--bois); border-radius: 14px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; color: var(--bois-fonce); }
.bld-partie-chip .chip-input { border: none; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--bois-fonce); width: 130px; padding: 1px 2px; }
.bld-partie-chip .chip-input:focus { outline: 1px solid var(--bois); border-radius: 4px; background: var(--surface); }
.bld-partie-chip i { cursor: pointer; color: var(--rouge); font-style: normal; margin-left: 4px; }
.bld-grille { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .bld-grille { grid-template-columns: 1fr; } }
.bld-souslbl { font-size: 12px; font-weight: 700; color: var(--txt2); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 5px; }
.bld-photos { display: flex; flex-wrap: wrap; gap: 8px; border: 1.5px dashed var(--bord); border-radius: 9px; padding: 8px; min-height: 56px; align-items: center; }
.bld-photos.survol { border-color: var(--bois); background: var(--bois-pale); }
.bld-ajout-photo { width: 46px; height: 46px; border: 1px solid var(--bord); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--txt2); cursor: pointer; background: var(--surface); }
.bld-ajout-photo:hover { border-color: var(--bois); color: var(--bois-fonce); }
.bld-tp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 0; border-top: 1px dashed var(--bord); }
.bld-tp:first-of-type { border-top: none; }
.bld-tp .nom-tp-input { flex: 1; min-width: 150px; border: 1px solid var(--bord); border-radius: 5px; padding: 4px 6px; font-size: 13px; font-weight: 600; }
.bld-col-tp .badge-suppr-tp { font-size: 14px; }
.panneau { padding: 16px 16px 12px; }
.panneau h2 { font-size: 16px; margin-bottom: 10px; }
.panneau-corps { max-height: 430px; overflow-y: auto; padding-right: 4px; }

/* Doubles jauges (vue ≥1 fois / ≥3 fois) */
.jauges-mini { margin-bottom: 10px; }
.jm { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.jm .jm-lab { font-size: 11.5px; font-weight: 600; color: var(--txt2); width: 88px; flex-shrink: 0; }
.jm .jauge-fond { flex: 1; height: 11px; margin: 0; }
.jm .jm-pct { font-size: 12.5px; font-weight: 700; color: var(--vert-fonce); width: 42px; text-align: right; }
.jm.jm3 .jauge-barre { background: var(--bois); }
.jm.jm3 .jm-pct { color: var(--bois-fonce); }
.jm.jmM .jauge-barre { background: #27AE60; }       /* atteint la Maîtrise (cumul) */
.jm.jmM .jm-pct { color: #1E7E45; font-weight: 700; }
.sj-groupe.sj-savoirs .jm.jmM .jauge-barre { background: #27AE60; }

/* Compteur « vu N fois » sur chaque ligne */
.fois { font-size: 10.5px; font-weight: 700; border-radius: 9px; padding: 1px 7px; margin-left: auto; flex-shrink: 0; background: #EFEEE8; color: #9B9A92; }
.fois.f1 { background: var(--bois-pale); color: var(--bois-fonce); }
.fois.f3 { background: var(--vert); color: #fff; }

/* Fenêtre de choix du niveau D·I·A·M */
.popup-niveau { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--bord); border-radius: 11px; box-shadow: 0 8px 28px rgba(44,44,42,.22); padding: 10px; width: 215px; }
.popup-niveau .pn-titre { font-size: 12.5px; font-weight: 700; margin-bottom: 7px; color: var(--txt); }
.popup-niveau button { display: block; width: 100%; text-align: left; margin-bottom: 4px; padding: 7px 10px; border: 1px solid var(--bord); border-radius: 8px; background: var(--surface); font-size: 13px; cursor: pointer; }
.popup-niveau button:hover { background: var(--bois-pale); border-color: var(--bois); }
.popup-niveau button b { display: inline-block; width: 20px; color: var(--bois-fonce); }
.popup-niveau .pn-question { font-size: 11.5px; font-weight: 700; color: var(--txt2); text-transform: uppercase; letter-spacing: .3px; margin: 4px 0 5px; }
.popup-niveau button.pn-tout { background: var(--vert-pale); border-color: var(--vert); }

/* Détail des TP d'une pose */
.ligne-tp { border: 1px solid var(--bord); border-radius: 9px; padding: 8px 11px; margin-bottom: 8px; }
.ligne-tp .nom-tp { font-size: 13.5px; font-weight: 700; color: var(--bois-fonce); margin-bottom: 4px; }
.ligne-tp .duree-tp { font-size: 12px; font-weight: 500; color: var(--txt2); }
.ligne-tp .duree-tp input { width: 52px; padding: 2px 4px; font-size: 12px; }
.ligne-tp .affs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ligne-tp select { font-size: 12px; padding: 3px 6px; max-width: 290px; border-radius: 6px; }
.ligne-tp .aff { font-size: 11px; }
.btn-tp { border: none; background: none; cursor: pointer; font-size: 13px; padding: 0 3px; opacity: .6; flex-shrink: 0; }
.btn-tp:hover { opacity: 1; }

/* Panneau référentiel */
.groupe-ref { border: 1px solid var(--bord); border-radius: 9px; margin-bottom: 8px; padding: 0 10px; background: var(--surface); }
.groupe-ref summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--txt); padding: 8px 0; }
.groupe-ref summary .theme-lib { font-weight: 500; color: var(--txt2); }
.item-ref { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; margin: 0 0 6px; border: 1px solid var(--bord); border-radius: 7px; cursor: grab; background: var(--surface); font-size: 12.5px; }
.item-ref:hover { border-color: var(--bois); }
.item-ref.choisi { border: 2px solid var(--bois); background: var(--bois-pale); }
.item-ref .code-ref { font-weight: 700; flex-shrink: 0; padding: 1px 6px; border-radius: 4px; font-size: 11px; }
.item-ref .code-ref.cr-comp { background: var(--vert-pale); color: var(--vert-fonce); }
.item-ref .code-ref.cr-savoir { background: var(--ardoise-pale); color: var(--ardoise); }
.item-ref .lib-ref { color: var(--txt); line-height: 1.35; }
.titre-section-ref { font-size: 14px; font-weight: 700; color: var(--txt2); margin: 14px 0 8px; text-transform: uppercase; letter-spacing: .4px; }

/* Bibliothèque */
.ouvrage { border: 1px solid var(--bord); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; cursor: grab; background: var(--surface); transition: border-color .12s, opacity .12s; }
.ouvrage:hover { border-color: var(--bois); }
.ouvrage.choisi { border: 2px solid var(--bois); background: var(--bois-pale); }
.ouvrage.en-vol { opacity: .45; }
.ouvrage h3 { font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ouvrage .niveau { font-size: 11.5px; color: var(--txt2); font-weight: 500; text-align: right; }
.ouvrage p { font-size: 12.5px; color: var(--txt2); margin: 3px 0 7px; }
.comps { display: flex; flex-wrap: wrap; gap: 4px; }
.comp { font-size: 11px; font-weight: 600; background: var(--vert-pale); color: var(--vert-fonce); padding: 2px 7px; border-radius: 4px; }
.comp .taxo { opacity: .65; font-weight: 500; }
.comp.manque { background: var(--rouge-pale); color: var(--rouge); }
.biblio-vide { font-size: 13.5px; color: var(--txt2); background: var(--fond); border-radius: 8px; padding: 14px; }

/* Frise horizontale de l'année (partie basse) */
.frise-h { display: flex; align-items: stretch; gap: 5px; overflow-x: auto; padding: 4px 2px 8px; min-height: 130px; }
.legende-frise { font-size: 11.5px; color: var(--txt2); margin-top: 6px; }
.bloc-h { border-radius: 9px; min-height: 120px; flex-shrink: 0; }
.bh-tete { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--txt2); padding: 6px 8px 2px; line-height: 1.25; }
.bh-tete small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; color: #9B9A92; font-size: 10px; }
.bh-cours { border: 1.5px dashed var(--bord); background: var(--surface); flex-grow: 8; flex-basis: 130px; min-width: 124px; padding-bottom: 6px; }
.bh-cours.cible { border-color: var(--bois); background: var(--bois-pale); cursor: pointer; }
.bh-cours.survol { border: 2px solid var(--bois); background: var(--bois-pale); }
.bh-cours .bh-vide { font-size: 11px; color: #B4B2A9; font-style: italic; padding: 4px 8px; }
.bh-vac { background: #ECEBE5; border: 1px solid var(--bord); flex-grow: 2; flex-basis: 46px; min-width: 44px; }
.bh-vac .bh-tete { color: #8B8A82; }
.bh-pfmp { background: var(--pfmp-pale); border: 1px solid var(--pfmp); flex-grow: 3; flex-basis: 56px; min-width: 52px; }
.bh-pfmp .bh-tete { color: var(--pfmp); }
.zone-poses { padding: 0 6px; }
.pose { position: relative; box-sizing: border-box; background: var(--bois-pale); border: 1px solid var(--bois); border-radius: 8px; padding: 4px 14px 6px; margin: 4px 0 0; min-width: 56px; }
.pose.cible-ref { outline: 2px dashed var(--vert); outline-offset: 1px; cursor: copy; }
.pose .entete-pose { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--bois-fonce); line-height: 1.25; }
.pose .entete-pose button { border: none; background: none; color: var(--rouge); font-size: 14px; cursor: pointer; padding: 0 2px; flex-shrink: 0; }
.pose .duree-pose { font-weight: 500; color: var(--txt2); font-size: 10px; white-space: nowrap; }
.pose .affs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
/* poignées d'étirement (pas d'une semaine) */
.poignee { position: absolute; top: 0; bottom: 0; width: 12px; cursor: ew-resize; display: flex; align-items: center; justify-content: center; font-size: 8px; color: var(--bois-fonce); opacity: .35; touch-action: none; user-select: none; }
.poignee:hover { opacity: 1; background: rgba(186, 117, 23, .16); }
.pg-g { left: 0; border-radius: 8px 0 0 8px; }
.pg-d { right: 0; border-radius: 0 8px 8px 0; }
.aff { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; }
.aff.aff-comp { background: var(--vert-pale); color: var(--vert-fonce); }
.aff.aff-savoir { background: var(--ardoise-pale); color: var(--ardoise); }
.aff b { cursor: pointer; font-weight: 600; }
.aff b:hover { text-decoration: underline; }
.aff .taxo { opacity: .65; font-weight: 500; }
.aff i { cursor: pointer; font-style: normal; opacity: .55; padding: 0 1px; }
.aff i:hover { opacity: 1; color: var(--rouge); }

/* Jauge */
.jauge-bloc { position: sticky; top: 10px; z-index: 5; }
.jauge-fond { height: 14px; background: var(--fond); border: 1px solid var(--bord); border-radius: 8px; overflow: hidden; margin-top: 4px; }
.jauge-barre { height: 100%; background: var(--vert); width: 0%; transition: width .3s; }
.gros-pct { font-size: 30px; font-weight: 700; color: var(--vert-fonce); }
.suggestion { background: var(--vert-pale); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--vert-fonce); margin-top: 12px; }

/* Fiche contrat */
table.fiche { width: 100%; border-collapse: collapse; font-size: 13px; }
table.fiche td { border: 1px solid #999; padding: 6px 9px; vertical-align: top; }
table.fiche td.etiq { width: 130px; font-weight: 700; background: #f2f2f2; }
.fiche-titre { text-align: center; font-size: 17px; font-weight: 700; text-decoration: underline; margin-bottom: 10px; }
.modale-large { max-width: 760px; }
table.fiche textarea.champ-fiche { width: 100%; border: none; padding: 0; font-size: 13px; font-family: inherit; background: var(--saisie); resize: vertical; min-height: 54px; }
table.fiche textarea.champ-fiche:focus { outline: 1px dashed var(--bois); }
table.fiche input.pts { width: 50px; padding: 1px 4px; font-size: 12.5px; text-align: right; float: right; background: var(--saisie); }
table.fiche .total-fiche { float: right; border-top: 1px solid #999; padding-top: 2px; font-weight: 700; }
table.fiche .total-fiche.faux { color: var(--rouge); }
#fiche-print { display: none; }

/* grille d'évaluation (On exige) : formative 1→4 à cocher + sommative barème/note */
table.grille-eval { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
table.grille-eval th, table.grille-eval td { border: 1px solid #777; padding: 4px 6px; vertical-align: middle; }
table.grille-eval .ge-tete th { text-align: center; font-weight: 700; background: #f2f2f2; }
table.grille-eval .ge-codecell { width: 86px; text-align: center; font-weight: 700; white-space: nowrap; }
table.grille-eval .ge-critcell { text-align: left; }
table.grille-eval .ge-coche { width: 26px; min-width: 26px; text-align: center; font-weight: 700; }
table.grille-eval .ge-bareme, table.grille-eval .ge-note { width: 42px; text-align: center; }
table.grille-eval .ge-tete .ge-coche { color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
table.grille-eval .ge-total td { font-weight: 700; }
table.grille-eval .ge-totlabel { text-align: right; }
table.grille-eval .ge-suppr { width: 26px; text-align: center; border: none; }
table.grille-eval input.ge-code { width: 78px; text-align: center; font-weight: 700; border: 1px solid var(--bord); background: var(--saisie); padding: 2px; font-size: 12px; }
table.grille-eval input.ge-crit { width: 100%; border: 1px solid var(--bord); background: var(--saisie); padding: 2px 4px; font-size: 12.5px; font-family: inherit; }
table.grille-eval input.ge-pts { width: 38px; text-align: center; border: 1px solid var(--bord); background: var(--saisie); padding: 2px; font-size: 12.5px; }
.mini-x { border: none; background: none; color: var(--rouge); cursor: pointer; font-size: 13px; padding: 0 4px; }
.ge-legende { margin-top: 7px; font-size: 11.5px; color: var(--txt2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.ge-legende b { color: var(--txt); margin-right: 2px; }
.ge-lg { display: inline-flex; align-items: center; white-space: nowrap; }
.ge-lg i { display: inline-block; width: 13px; height: 13px; border-radius: 3px; margin-right: 5px; border: 1px solid rgba(0,0,0,.15); }
.ge-actions { margin-top: 8px; display: flex; align-items: center; gap: 12px; }
.ge-actions .indice { font-size: 12.5px; }
.btn.petit { padding: 4px 10px; font-size: 12.5px; }
/* impression : forcer le rendu des couleurs des cases 1→4 */
table.grille-eval { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* feuille d'évaluation de la classe (grille de notation par TP) */
.ev-reglages { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.ev-reglages label { font-weight: 600; }
.ev-reglages input { width: 56px; text-align: center; padding: 3px 5px; }
.ev-reglages .indice { font-size: 11.5px; flex: 1 1 280px; }
.pj-eleves { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 2px 0 8px; padding: 8px 11px; border: 1px solid var(--bord); border-radius: 8px; background: var(--fond); font-size: 12.5px; }
.pj-eleves .indice { font-size: 11.5px; }
table.grille-eval.eval-classe { margin-top: 10px; }
table.grille-eval.eval-classe .ev-num { width: 34px; text-align: center; font-weight: 700; background: #f7f7f7; }
table.grille-eval.eval-classe .ev-repcell { width: 150px; min-width: 110px; text-align: left; padding-left: 7px; }
table.grille-eval.eval-classe .ev-crit { font-size: 11px; vertical-align: bottom; min-width: 60px; }
table.grille-eval.eval-classe .ev-crit small { color: var(--txt2); font-weight: 400; }
table.grille-eval.eval-classe .ev-case { min-width: 44px; height: 22px; }
table.grille-eval.eval-classe .ev-notecell { width: 56px; background: #f7f7f7; }

/* Bouton ⓘ et fenêtre de détail du référentiel */
.btn-info { border: none; background: none; color: var(--ardoise); font-size: 13px; cursor: pointer; padding: 0 2px; flex-shrink: 0; line-height: 1; }
.btn-info:hover { color: var(--bois-fonce); }
.detail-corps { font-size: 13px; line-height: 1.5; max-height: 55vh; overflow-y: auto; border: 1px solid var(--bord); border-radius: 8px; padding: 10px 14px; background: var(--fond); }
.detail-corps .sc { font-weight: 700; color: var(--vert-fonce); margin-top: 9px; }
.detail-corps div { margin: 1px 0; }

/* Sous-parties d'un ouvrage */
.partie { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; border-top: 1px dashed var(--bord); padding: 5px 2px 4px; margin-top: 5px; font-size: 12.5px; cursor: grab; }
.partie:hover { background: var(--bois-pale); border-radius: 6px; }
.partie.choisi { outline: 2px solid var(--bois); border-radius: 6px; background: var(--bois-pale); }
.partie .nom-partie { font-weight: 600; color: var(--bois-fonce); }

/* Éditeur d'ouvrage */
.modale-fond { position: fixed; inset: 0; background: rgba(44, 44, 42, .45); display: flex; align-items: flex-start; justify-content: center; z-index: 50; padding: 24px 16px; overflow-y: auto; }
.modale { background: var(--surface); border-radius: 14px; padding: 22px 24px 18px; width: 100%; max-width: 580px; }
.modale input[type=text], .modale textarea, .modale select { width: 100%; max-width: none; }
.ligne-niveau { display: flex; gap: 8px; }
textarea { padding: 9px 12px; border: 1px solid var(--bord); border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--txt); resize: vertical; }
.aide-champ { font-weight: 400; }
.vignettes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.vignette { position: relative; width: 92px; height: 68px; border-radius: 8px; overflow: hidden; border: 1px solid var(--bord); }
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--rouge); font-size: 12px; line-height: 1; cursor: pointer; }

/* Ouvrages créés par le prof */
.photo-ouvrage { width: 100%; max-height: 110px; object-fit: cover; border-radius: 7px; margin: 6px 0 4px; display: block; }
.pied-perso { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.badge-perso { font-size: 10.5px; background: var(--bois-pale); color: var(--bois-fonce); border: 1px solid var(--bois); padding: 1px 7px; border-radius: 4px; font-weight: 600; }
.btn-lien { border: none; background: none; color: var(--ardoise); cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0 4px; }
.btn-lien.danger { color: var(--rouge); }

.actions-bas { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
footer { text-align: center; font-size: 12.5px; color: var(--txt2); padding: 20px; }
footer a { color: var(--txt2); }

/* Champs nom / établissement */
.deux-champs { display: flex; gap: 16px; flex-wrap: wrap; max-width: 640px; }
.deux-champs > div { flex: 1; min-width: 240px; }
.deux-champs input { width: 100%; max-width: none; }

/* Document progression annuelle — matrice compétences × semaines (rendu type planning mural) */
.prog-entete { text-align: center; margin-bottom: 10px; }
.prog-entete .prog-titre { font-size: 17px; font-weight: 700; text-decoration: underline; }
.prog-entete .prog-sous { font-size: 13px; color: #333; margin-top: 3px; }
/* synthèse en jauges : compétences à gauche, savoirs à droite */
.stats-jauges { display: flex; gap: 22px; flex-wrap: wrap; justify-content: space-between; margin: 10px 0 14px; }
.sj-groupe { flex: 1; min-width: 290px; border: 1px solid var(--bord); border-radius: 9px; padding: 9px 13px; background: var(--surface); }
.sj-groupe .sj-titre { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--txt2); margin-bottom: 6px; }
.sj-groupe.sj-savoirs .jauge-barre { background: var(--ardoise); }
.sj-groupe.sj-savoirs .jm-pct { color: var(--ardoise); }
.sj-groupe.sj-savoirs .jm.jm3 .jauge-barre { background: #7FA8CE; }

.matrice-wrap { overflow-x: auto; padding-bottom: 6px; }
table.matrice { border-collapse: collapse; font-size: 11px; margin-bottom: 16px; }
table.matrice td { border: 1px solid #A9A8A0; padding: 1px 3px; }
table.matrice td.mx-entete { background: #f2f2f2; font-weight: 700; font-size: 9.5px; text-transform: uppercase; white-space: nowrap; }
table.matrice td.sem { width: 17px; min-width: 17px; max-width: 17px; text-align: center; padding: 1px 0; font-size: 9px; }
table.matrice td.vac { background: #E4E3DD; }      /* vacances : gris */
table.matrice td.pfmp { background: #D9C2E8; }     /* PFMP : violet (distinct du vert DIAM) */
table.matrice td.croix { font-weight: 700; text-align: center; }
/* badge « acquis l'année précédente » (estompé) sur le libellé compétence/savoir */
.acq-n1 { display: inline-block; min-width: 13px; height: 14px; line-height: 13px; text-align: center; border: 1px dashed #9a9a9a; border-radius: 3px; font-size: 9px; font-weight: 700; color: #555; background: #e9e6dd; margin-right: 5px; vertical-align: middle; }
/* rampe de maîtrise DIAM (pâle → vert soutenu) + rouge CCF */
table.matrice td.croix.tx-1 { background: #FBE6B8; color: #6B4E0E; } /* D Découverte */
table.matrice td.croix.tx-2 { background: #CDE7A9; color: #3B5A1E; } /* I Intégration */
table.matrice td.croix.tx-3 { background: #8FC96B; color: #234012; } /* A Approfondissement */
table.matrice td.croix.tx-4 { background: #4E9D43; color: #fff; }    /* M Maîtrise */
table.matrice td.croix.tx-ccf { background: #C0392B; color: #fff; }  /* CCF (prioritaire) */
.lg-croix { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 3px; font-weight: 700; font-size: 10px; margin: 0 1px 0 8px; vertical-align: middle; }
.lg-croix.tx-1 { background: #FBE6B8; color: #6B4E0E; } .lg-croix.tx-2 { background: #CDE7A9; color: #3B5A1E; }
.lg-croix.tx-3 { background: #8FC96B; color: #234012; } .lg-croix.tx-4 { background: #4E9D43; color: #fff; }
.lg-croix.tx-ccf { background: #C0392B; color: #fff; }
table.matrice td.cap { font-weight: 700; font-size: 10px; text-align: center; width: 90px; min-width: 90px; max-width: 90px; }
table.matrice td.libc { max-width: 235px; min-width: 235px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.matrice td.libc.dejavu { font-style: italic; opacity: .8; }          /* compétence déjà travaillée les années précédentes : estompée */
table.matrice td.libc .dv-mq { color: #8a6d3b; font-weight: 700; font-style: normal; }
/* bilan diplôme : table LISIBLE (texte qui revient à la ligne, colonnes larges) */
table.matrice.bilan td.cap { width: 110px; min-width: 110px; max-width: 110px; font-size: 11px; }
table.matrice.bilan td.libc { white-space: normal; overflow: visible; text-overflow: clip; max-width: 360px; min-width: 240px; font-size: 11px; line-height: 1.25; }
table.matrice.bilan td.an-tete { white-space: normal; text-transform: none; min-width: 96px; font-size: 10px; line-height: 1.3; text-align: center; vertical-align: middle; padding: 3px 6px; }
table.matrice.bilan td.sem { width: auto; min-width: 64px; max-width: none; }
table.matrice.bilan td.croix { font-size: 14px; }
table.matrice td.pct { width: 56px; min-width: 56px; padding: 1px 4px; }
table.matrice td.pct .mj { height: 7px; background: #EFEEE8; border: 1px solid #D8D7CF; border-radius: 4px; overflow: hidden; }
table.matrice td.pct .mjb { height: 100%; }
table.matrice td.pct small { font-size: 8.5px; font-weight: 700; color: var(--txt2); display: block; text-align: center; line-height: 1.2; }
.mjb.mj-0 { background: #D86B6B; } .mjb.mj-33 { background: #E8B23D; } .mjb.mj-67 { background: #E8B23D; } .mjb.mj-100 { background: #4E9D43; }
table.matrice td.ep { width: 15px; min-width: 15px; max-width: 15px; text-align: center; font-size: 8px; padding: 0; }
table.matrice td.ep.noir { background: #3A3A3A; }
/* code de l'épreuve (EP1/EP2…) en vertical, dans la ligne « TP / séances », au sommet des colonnes noires */
table.matrice td.ep-tete { vertical-align: bottom; padding: 3px 0; background: #EFEEE8; border-bottom: 2px solid #3A3A3A; }
table.matrice td.ep-tete .ep-vtxt, table.matrice td.acq-tete .ep-vtxt { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 8.5px; font-weight: 700; color: var(--txt2); display: inline-block; }
/* colonne « Acquis N-1 » (niveau atteint l'année précédente) — bordure à gauche pour marquer le début d'année */
table.matrice td.acq-col { width: 17px; min-width: 17px; max-width: 17px; text-align: center; font-size: 9px; padding: 0; border-left: 2px solid #8a6d3b; }
table.matrice td.acq-tete { vertical-align: bottom; padding: 3px 0; background: #EFEEE8; border-bottom: 2px solid #8a6d3b; }
/* ligne « ouvrage » horizontale */
table.matrice td.ouvrage-h { font-size: 9.5px; font-weight: 700; color: var(--bois-fonce); background: var(--bois-pale); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
table.matrice td.ouvrage-h.vac { background: #E4E3DD; color: #6B6A63; font-weight: 600; }
table.matrice td.ouvrage-h.pfmp { background: #D9C2E8; color: #5B2B72; font-weight: 600; }
/* ligne « sous-ensembles » (parties d'ouvrage), sous la ligne ouvrage */
table.matrice td.sousens-h { font-size: 9px; font-weight: 600; color: var(--txt2); background: #FBF6EC; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
table.matrice td.sousens-h.vac { background: #E4E3DD; }
table.matrice td.sousens-h.pfmp { background: #D9C2E8; }
/* ligne « TP / séances » verticale */
table.matrice td.vertical { height: 112px; vertical-align: bottom; padding: 3px 1px; }
table.matrice td.vertical .vtxt { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 8.5px; line-height: 1.1; max-height: 106px; overflow: hidden; display: inline-block; }
h3.prog-section { font-size: 14px; margin: 14px 0 6px; }

/* groupes du formulaire de l'écran 1 */
.groupe-form h2 { font-size: 15.5px; margin-bottom: 4px; color: var(--bois-fonce); }
.groupe-form .champ:first-of-type { margin-top: 8px; }

/* TP en mode CCF (évaluation certificative) */
.badge-ccf { border: 1px solid var(--bord); background: var(--surface); color: var(--txt2); font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 2px 8px; cursor: pointer; margin-left: 6px; vertical-align: 1px; }
.badge-ccf:hover { border-color: var(--rouge); color: var(--rouge); }
.badge-ccf.actif { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.ligne-tp.ccf { border-color: var(--rouge); background: var(--rouge-pale); }
.ligne-tp.ccf .nom-tp a { color: var(--rouge); }
table.matrice td.vertical.col-ccf { background: var(--rouge-pale); }
table.matrice td.vertical.col-ccf .vtxt { color: var(--rouge); font-weight: 700; }

/* cases à cocher des jours de classe */
.jours-classe { display: flex; gap: 5px; flex-wrap: nowrap; }
.jours-classe label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--bord); border-radius: 8px; padding: 6px 9px; background: var(--surface); font-size: 13px; cursor: pointer; white-space: nowrap; }
.jours-classe label.coche { border-color: var(--bois); background: var(--bois-pale); font-weight: 600; color: var(--bois-fonce); }

/* Étape 4 : bandeau ouvrages + année + couverture (empilés) */
#bloc-couverture { padding: 12px 16px; }
#biblio-temps .filtre-etoiles { margin-bottom: 8px; }

/* Timeline « tiroirs » (étape 3) */
.timeline { overflow-x: auto; padding-bottom: 8px; }
.tl-entete { position: relative; height: 58px; margin-bottom: 4px; }
.tl-bandes { position: relative; height: 20px; }
.tl-bande { position: absolute; top: 0; height: 18px; font-size: 10px; font-weight: 700; color: var(--txt2); border-radius: 4px; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-transform: uppercase; letter-spacing: .2px; background: #EFEEE8; border: 1px solid var(--bord); box-sizing: border-box; }
.tl-bande.tl-vac { background: #E4E3DD; color: #6B6A63; }
.tl-bande.tl-pfmp { background: #D9C2E8; color: #5B2B72; }
.tl-sems { position: relative; height: 16px; }
.tl-sem { position: absolute; top: 0; height: 14px; font-size: 9px; font-weight: 700; text-align: center; color: var(--vert-fonce); background: var(--vert-pale); border-left: 1px solid var(--bord); box-sizing: border-box; overflow: hidden; }
.tl-jours { position: relative; height: 18px; }
.tl-jour { position: absolute; top: 0; height: 16px; font-size: 9.5px; font-weight: 600; text-align: center; color: var(--txt2); border-left: 1px solid var(--bord); box-sizing: border-box; }
.tl-rang { position: relative; height: 86px; border-top: 1px dashed var(--bord); padding-top: 4px; }
.tl-ouvrage { position: absolute; top: 4px; height: 24px; background: var(--bois-pale); border: 1px solid var(--bois); border-radius: 7px; box-sizing: border-box; display: flex; align-items: center; gap: 4px; padding: 0 4px; overflow: visible; min-width: 40px; }
.tl-vignette { height: 20px; width: 20px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.tl-onom { font-size: 11.5px; font-weight: 600; color: var(--bois-fonce); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.tl-onom small { font-weight: 500; color: var(--txt2); }
.tl-alerte { color: var(--rouge); font-weight: 700; font-size: 10px; }
.tl-obtns { display: flex; gap: 3px; flex-shrink: 0; align-items: center; }
.tl-obtns .btn-tp { border: 1px solid var(--bord); background: var(--surface); border-radius: 4px; cursor: pointer; font-size: 11px; padding: 0 4px; }
.tl-souslig { position: absolute; top: 31px; left: 0; right: 0; height: 16px; }
.tl-sousens { position: absolute; top: 0; height: 14px; background: #FBF6EC; border: 1px solid var(--bord); border-radius: 4px; font-size: 9.5px; font-weight: 600; color: var(--txt2); padding: 1px 5px; white-space: nowrap; overflow: hidden; box-sizing: border-box; }
.tl-tirlig { position: absolute; top: 49px; left: 0; right: 0; height: 34px; }
.tl-tiroir { position: absolute; top: 0; height: 32px; background: var(--surface); border: 1.5px solid var(--vert); border-radius: 6px; box-sizing: border-box; display: flex; align-items: center; padding: 0 2px 0 5px; overflow: visible; min-width: 24px; }
.tl-tiroir.ccf { border-color: var(--rouge); background: var(--rouge-pale); }
.tl-tnom { font-size: 10.5px; font-weight: 600; color: var(--vert-fonce); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.tl-tiroir.ccf .tl-tnom { color: var(--rouge); }
.tl-tnom small { font-weight: 500; color: var(--txt2); }
.tl-poignee { width: 13px; align-self: stretch; display: flex; align-items: center; justify-content: center; cursor: ew-resize; color: var(--vert-fonce); font-size: 9px; opacity: .5; flex-shrink: 0; touch-action: none; user-select: none; }
.tl-poignee:hover { opacity: 1; background: rgba(15,110,86,.12); border-radius: 4px; }
.tl-poignee.pg-g { color: var(--bois-fonce); cursor: grab; }

/* Étape 2 : zone de définition des TP/TD */
.def-entete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.def-tp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.def-tp .sel-type { font-size: 12px; padding: 2px 4px; border-radius: 5px; border: 1px solid var(--bord); font-weight: 700; background: var(--surface); }
.def-tp .nom-tp-input { flex: 1; min-width: 150px; border: 1px solid var(--bord); border-radius: 5px; padding: 3px 6px; font-size: 13px; font-weight: 600; }
.def-tp .duree-tp input { width: 48px; }
.badge-suppr-tp { border: none; background: none; color: var(--rouge); cursor: pointer; font-size: 14px; padding: 0 2px; }
.def-section { border: 1px solid var(--bord); border-radius: 9px; padding: 8px 10px; margin-bottom: 10px; background: var(--fond); }
.def-sec-titre { font-size: 13px; font-weight: 700; color: var(--bois-fonce); margin-bottom: 6px; }
.badge-exemple { font-size: 10.5px; background: var(--ardoise-pale); color: var(--ardoise); border-radius: 4px; padding: 1px 7px; font-weight: 600; }
.ligne-tp.cible-ref { outline: 2px dashed var(--vert); outline-offset: 1px; }

/* Étape 4 : liste des fiches contrat & déroulements */
.ls-ouvrage { border: 1px solid var(--bord); border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; }
.ls-titre { font-weight: 700; color: var(--bois-fonce); margin-bottom: 4px; }
.ls-tp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 0; border-top: 1px dashed var(--bord); }
.ls-tpnom { font-weight: 600; font-size: 13px; min-width: 220px; }
.ls-tpnom.ccf { color: var(--rouge); }
.ls-tp .btn-lien { font-size: 12.5px; }

/* Bouton « Déroulement » dans la fenêtre 📋 */
.badge-dr { border: 1px solid var(--bord); background: var(--surface); color: var(--ardoise); font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 2px 8px; cursor: pointer; margin-left: 6px; vertical-align: 1px; }
.badge-dr:hover { border-color: var(--ardoise); background: var(--ardoise-pale); }

/* Fiche de déroulement de séance */
.modale-deroulement { max-width: 1120px; width: 96vw; }
.dr-onglets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.dr-onglet { border: 1px solid var(--bord); background: var(--surface); border-radius: 8px 8px 0 0; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--txt2); cursor: pointer; }
.dr-onglet.actif { border-color: var(--bois); border-bottom-color: var(--surface); background: var(--bois-pale); color: var(--bois-fonce); }
.dr-entete-haut { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--txt2); }
.dr-titre-doc { text-align: center; font-weight: 700; font-size: 15px; letter-spacing: .5px; margin: 4px 0 8px; }
table.dr-meta { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 10px; }
table.dr-meta td { border: 1px solid #bbb; padding: 3px 7px; }
table.dr-meta td.k { background: #f2f2f2; font-weight: 700; white-space: nowrap; width: 110px; }
table.dr-meta input { border: 1px solid var(--bord); border-radius: 5px; background: var(--saisie); font-size: 12.5px; padding: 2px 5px; }
.dr-reglages { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; background: var(--bois-pale); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; }
.dr-reglages label { font-weight: 600; color: var(--bois-fonce); }
.dr-reglages input { border: 1px solid var(--bois); border-radius: 5px; padding: 3px 5px; width: 72px; }
.dr-reglages input[type=time] { width: 110px; }
.dr-minutage { font-size: 13.5px; padding: 8px 12px; border-radius: 8px; background: var(--vert-pale); color: var(--vert-fonce); margin-bottom: 10px; }
.dr-minutage.cale { background: var(--vert); color: #fff; }
.dr-minutage.depasse { background: var(--rouge-pale); color: var(--rouge); font-weight: 600; }
.dr-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.dr-toolbar select { font-size: 13px; padding: 5px 8px; border-radius: 7px; border: 1px solid var(--bord); }
.dr-table-wrap { overflow-x: auto; }
table.deroulement { width: 100%; border-collapse: collapse; font-size: 11.5px; }
table.deroulement th { border: 1px solid #999; background: #f2f2f2; padding: 4px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .2px; text-align: left; }
table.deroulement td { border: 1px solid #999; padding: 3px 5px; vertical-align: top; }
table.deroulement tr.ph-continu td { background: #F3EAF8; }
table.deroulement textarea { width: 100%; border: none; background: var(--saisie); font-size: 11.5px; font-family: inherit; resize: vertical; min-height: 42px; }
table.deroulement .dr-phase { width: 155px; }
table.deroulement .dr-num { font-weight: 700; color: var(--bois-fonce); }
table.deroulement input.dr-titre { width: 100%; border: 1px solid var(--bord); border-radius: 4px; background: var(--saisie); font-weight: 600; font-size: 11.5px; margin: 2px 0; padding: 2px 4px; }
.dr-ctrl { display: flex; gap: 2px; }
.dr-ctrl button { border: 1px solid var(--bord); background: var(--surface); border-radius: 4px; cursor: pointer; font-size: 10px; padding: 1px 5px; }
.dr-ctrl button.x { color: var(--rouge); }
.dr-duree { text-align: center; width: 64px; }
.dr-duree input { width: 48px; text-align: center; }
.dr-contchk { display: block; font-size: 9px; color: var(--txt2); margin-top: 3px; }
.dr-cont-lbl { font-size: 10px; font-style: italic; color: var(--pfmp); }
.dr-horaire { font-weight: 600; font-size: 10.5px; color: var(--ardoise); margin-bottom: 2px; }
.dr-obs textarea { min-height: 30px; }
.dr-vide { text-align: center; color: var(--txt2); font-style: italic; padding: 14px; }
table.dr-bas { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; }
table.dr-bas td { border: 1px solid #999; padding: 5px 8px; vertical-align: top; }
table.dr-bas td.k { background: #f2f2f2; font-weight: 700; width: 170px; }
table.dr-bas textarea { width: 100%; border: none; background: var(--saisie); min-height: 42px; font-family: inherit; font-size: 12.5px; resize: vertical; }
#deroulement-print { display: none; }

@media print {
  header.site, .etapes, .actions-bas, .pedago, footer, .no-print { display: none !important; }
  body { background: var(--surface); }
  .ecran { display: none; } .ecran#ecran5 { display: block; }
  .carte { border: none; padding: 0; margin: 0; }
  /* impression d'un seul document à la fois */
  body[data-print="fiche"] .conteneur, body[data-print="fiche"] .ecran,
  body[data-print="fiche"] .modale-fond { display: none !important; }
  body[data-print="fiche"] #fiche-print { display: block !important; }
  /* fiche de déroulement : on masque tout le reste, on n'imprime que #deroulement-print (paysage) */
  body[data-print="deroulement"] .conteneur, body[data-print="deroulement"] .ecran,
  body[data-print="deroulement"] .modale-fond { display: none !important; }
  body[data-print="deroulement"] #deroulement-print { display: block !important; }
  body[data-print="deroulement"] table.deroulement { font-size: 8.5px; }
  body[data-print="deroulement"] table.deroulement th { font-size: 7.5px; }
  /* progression : on imprime une IMAGE pleine page (rendu fidèle, 1 feuille A3) */
  body[data-print="progression"] .conteneur, body[data-print="progression"] .ecran,
  body[data-print="progression"] .modale-fond { display: none !important; }
  body[data-print="progression"] #progression-print { display: block !important; }
  /* feuille d'évaluation de la classe (paysage) */
  body[data-print="eval"] .conteneur, body[data-print="eval"] .ecran,
  body[data-print="eval"] .modale-fond { display: none !important; }
  body[data-print="eval"] #eval-print { display: block !important; }
  /* plan de formation élève : IMAGE pleine page A4 PAYSAGE (1 feuille, sans rognage) */
  body[data-print="plan"] .conteneur, body[data-print="plan"] .ecran,
  body[data-print="plan"] .modale-fond { display: none !important; }
  body[data-print="plan"] #plan-print { display: block !important; }
  body[data-print="eval"] table.fiche { font-size: 10px; }
  body[data-print="eval"] table.eval-classe { font-size: 9px; }
  body[data-print="eval"] table.eval-classe td, body[data-print="eval"] table.eval-classe th { padding: 1.5px 4px; }   /* compact : ~30 élèves sur une page */
  /* ===== PAYSAGE forcé : on pivote la zone de 90° pour remplir la feuille portrait
     (les pilotes type « Microsoft Print to PDF » ignorent souvent l'orientation CSS). ===== */
  body[data-print="deroulement"] #deroulement-print,
  body[data-print="eval"] #eval-print,
  body[data-print="plan"] #plan-print,
  body[data-print="progression"] #progression-print {
    position: fixed; top: 0; left: 0;
    width: 297mm; height: 210mm;                    /* zone = A4 PAYSAGE */
    box-sizing: border-box; padding: 7mm; margin: 0;
    transform-origin: 0 0;
    transform: rotate(90deg) translateY(-210mm);    /* pose le contenu pivoté sur la feuille portrait */
    overflow: hidden;
  }
  body[data-print="progression"] #progression-print { padding: 3mm; }
  body[data-print="progression"] #progression-print img { width: 100%; height: 100%; object-fit: contain; }
  body[data-print="plan"] #plan-print { padding: 4mm; }
  body[data-print="plan"] #plan-print img { width: 100%; height: 100%; object-fit: contain; }
}
#progression-print { display: none; }
#eval-print { display: none; }
#plan-print { display: none; }

/* ===== Plan de formation (document élève) ===== */
.pf-doc { font-family: "Segoe UI", system-ui, sans-serif; color: var(--txt); padding: 4px 6px; }
.pf-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--bois); padding-bottom: 8px; margin-bottom: 14px; }
.pf-titre { font-size: 23px; font-weight: 800; color: var(--bois-fonce); line-height: 1.1; }
.pf-soustitre { font-size: 14.5px; font-weight: 700; color: var(--txt); margin-top: 3px; }
.pf-identite { font-size: 12px; color: var(--txt2); margin-top: 2px; }
.pf-logo { max-height: 52px; max-width: 150px; object-fit: contain; flex-shrink: 0; }

.pf-frise-bloc { margin-bottom: 18px; }
.pf-frise { display: flex; gap: 3px; height: 50px; }
.pf-bloc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 6px; padding: 2px 3px; min-width: 30px; overflow: hidden; border: 1px solid; }
.pf-bloc-txt { font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; }
.pf-bloc-dates { font-size: 8.5px; font-weight: 600; opacity: .8; white-space: nowrap; }
.pf-cours { background: var(--bois-pale); border-color: var(--bois); color: var(--bois-fonce); }
.pf-pfmp { background: var(--vert-pale); border-color: var(--vert); color: var(--vert-fonce); }
.pf-vac { background: var(--ardoise-pale); border-color: var(--ardoise); color: var(--ardoise); }
.pf-legende { display: flex; gap: 18px; margin-top: 7px; font-size: 11.5px; color: var(--txt2); }
.pf-legende i.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid; vertical-align: -1px; margin-right: 4px; }

.pf-h2 { font-size: 16px; color: var(--bois-fonce); margin: 4px 0 11px; }
.pf-galerie { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 13px; margin-bottom: 18px; }
.pf-carte { border: 1px solid var(--bois-pale); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: 0 1px 5px rgba(0,0,0,.08); display: block; break-inside: avoid; }
.pf-carte-img { position: relative; background: var(--fond); text-align: center; }
.pf-photo { display: block; margin: 0 auto; max-width: 100%; max-height: 155px; width: auto; height: auto; }   /* image ENTIÈRE, jamais rognée */
.pf-carte-img.pf-noimg { padding: 26px 0; font-size: 42px; }
.pf-etape { position: absolute; top: 6px; left: 6px; width: 25px; height: 25px; border-radius: 50%; background: var(--bois); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.pf-ccf { position: absolute; top: 7px; right: 7px; background: var(--rouge); color: #fff; font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.pf-carte-nom { font-weight: 800; font-size: 13px; color: var(--bois-fonce); padding: 8px 10px 2px; text-transform: uppercase; line-height: 1.15; }
.pf-carte-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 10px 5px; font-size: 11px; }
.pf-diff { background: var(--bois-pale); color: var(--bois-fonce); border-radius: 8px; padding: 1px 8px; font-weight: 700; }
.pf-dates { color: var(--txt2); }
.pf-puces { margin: 2px 0 9px; padding-left: 22px; font-size: 11.5px; color: var(--txt); }
.pf-puces li { margin-bottom: 2px; }

.pf-boites { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.pf-boite { border: 1px solid var(--bord); border-radius: 10px; padding: 10px 14px; break-inside: avoid; }
.pf-boite-comp { background: var(--bois-pale); border-color: var(--bois); }
.pf-boite-sav { background: var(--vert-pale); border-color: var(--vert); }
.pf-boite h3 { font-size: 14px; margin-bottom: 7px; color: var(--txt); }
.pf-boite ul { list-style: none; columns: 2; column-gap: 18px; font-size: 11.5px; }
.pf-boite li { break-inside: avoid; margin-bottom: 5px; display: flex; gap: 5px; align-items: baseline; }
.pf-lib { flex: 1; }
.pf-pastille { flex-shrink: 0; width: 16px; height: 16px; border-radius: 4px; font-size: 9.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.pf-pastille.tx-1 { background: #FBE6B8; color: #6B4E0E; } .pf-pastille.tx-2 { background: #CDE7A9; color: #3B5A1E; }
.pf-pastille.tx-3 { background: #8FC96B; color: #234012; } .pf-pastille.tx-4 { background: #4E9D43; color: #fff; }
.pf-code { color: var(--txt2); font-size: .8em; flex-shrink: 0; }
.pf-plus { font-size: 11px; color: var(--txt2); font-style: italic; margin-top: 5px; }
.pf-niveaux { font-size: 11.5px; color: var(--txt2); margin-top: 4px; }
.pf-niveaux .pf-pastille { vertical-align: middle; margin: 0 1px 0 8px; }
@media (max-width: 700px) { .pf-boites { grid-template-columns: 1fr; } }

/* Fenêtres légales (mentions / CGU) */
.texte-legal h3 { margin: 16px 0 4px; font-size: 15px; color: var(--txt); }
.texte-legal p { margin: 0 0 8px; }
.texte-legal .bloc-acompleter { background: #fff7d6; border: 1px solid #e6cf6a; color: #6b5800; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }

/* Mur de connexion (compte obligatoire) */
#mur-connexion { position: fixed; inset: 0; z-index: 49; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--fond, #efe9dd); }
body.verrouille { overflow: hidden; }
.mur-carte { background: var(--surface); border: 1px solid var(--bord); border-radius: 16px; box-shadow: 0 12px 44px rgba(0,0,0,.20); padding: 30px 32px; max-width: 460px; width: 100%; text-align: center; }
.mur-logo { height: 70px; width: auto; margin-bottom: 6px; }
.mur-titre { margin: 0; font-size: 30px; font-weight: 800; color: var(--txt); }
.mur-titre span { color: var(--bois, #8a6d3b); }
.mur-tagline { margin: 2px 0 14px; color: var(--txt2); font-style: italic; }
.mur-pitch { margin: 0 0 18px; color: var(--txt); line-height: 1.5; }
.mur-btn { font-size: 16px; padding: 12px 22px; }
.mur-rgpd { margin: 16px 0 0; font-size: 12.5px; color: var(--txt2); }
.mur-legal { margin: 10px 0 0; font-size: 12px; }
