/* Émargement – interface lisible : police sans empattement, texte aéré, aligné à gauche, sans italique. */
:root {
  --fond: #f5ecdc;      /* sable #e8d5b2 éclairci */
  --carte: #fffcf6;
  --texte: #25201d;
  --olive: #4f502b;
  --rouille: #b45c20;
  --ocre: #de9e49;
  --sable: #e8d5b2;
  --filet: #cdb98f;
}
* { box-sizing: border-box; }
html { font-size: 112.5%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: Verdana, Tahoma, Arial, sans-serif; font-style: normal;
  line-height: 1.6; letter-spacing: 0.02em; word-spacing: 0.12em; text-align: left;
}
em, i, cite { font-style: normal; font-weight: bold; }
main { max-width: 1100px; margin: 0 auto; padding: 16px 16px 48px; }
h1 { font-size: 1.5rem; line-height: 1.35; margin: 0.4em 0 0.3em; }
h2 { font-size: 1.15rem; margin: 0 0 0.6em; }
h3 { font-size: 1.05rem; margin: 0.8em 0 0.4em; }
p { max-width: 68ch; margin: 0 0 0.8em; }
a { color: var(--olive); }
code { font-size: 0.8rem; word-break: break-all; }

.barre { background: var(--carte); border-bottom: 2px solid var(--filet); padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.barre .marque { font-weight: bold; color: var(--rouille); text-decoration: none; }
.barre nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.barre form { margin: 0; }

.carte { background: var(--carte); border: 1px solid var(--filet); border-radius: 10px; padding: 18px 20px; margin: 0 0 18px; }
.etroite { max-width: 560px; margin: 24px auto; }
.fil { margin: 0 0 4px; }
.sous-titre { font-weight: bold; }
.discret { color: #5b5249; font-size: 0.92rem; }
.aide { display: block; font-weight: normal; color: #5b5249; font-size: 0.9rem; }
.mention { font-size: 0.9rem; color: #5b5249; margin-top: 1em; }

label { display: block; font-weight: bold; margin: 0 0 14px; }
input, textarea, select {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; letter-spacing: inherit;
  color: var(--texte); background: #fff; border: 1px solid var(--filet); border-radius: 6px;
}
textarea { min-height: 5em; }
input:focus, textarea:focus, a:focus, button:focus, summary:focus { outline: 3px solid var(--ocre); outline-offset: 2px; }
fieldset { border: 1px solid var(--filet); border-radius: 6px; margin: 0 0 14px; padding: 8px 14px; }
legend { font-weight: bold; padding: 0 6px; }
label.choix { display: inline-flex; gap: 8px; align-items: center; margin: 4px 24px 4px 0; font-weight: normal; }
label.choix input { width: 22px; height: 22px; margin: 0; flex: none; }
.deux, .quatre { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .quatre { grid-template-columns: repeat(4, 1fr); } }
form.ligne { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 6px 0; }
form.ligne label { flex: 1 1 220px; margin: 0; }

.bouton {
  display: inline-block; padding: 12px 20px; font: inherit; font-weight: bold; letter-spacing: inherit;
  color: #fff; background: var(--olive); border: 2px solid var(--olive); border-radius: 8px;
  text-decoration: none; cursor: pointer; min-height: 48px;
}
.bouton.secondaire { color: var(--olive); background: transparent; }
.bouton:disabled { opacity: 0.45; cursor: not-allowed; }
.lien { font: inherit; background: none; border: 0; padding: 0; color: var(--olive); text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 8px 0; }
.actions form { margin: 0; }

.flash { padding: 10px 14px; border-radius: 8px; border: 2px solid var(--olive); background: var(--carte); font-weight: bold; }
.flash-erreur, .erreur { color: var(--rouille); border-color: var(--rouille); }
p.erreur { font-weight: bold; }
.ok { color: var(--olive); }

.liste { list-style: none; padding: 0; margin: 0 0 12px; }
.liste > li { padding: 12px 0; border-bottom: 1px solid var(--sable); }
.liste > li:last-child { border-bottom: 0; }
.liste a { text-decoration: none; display: block; }
.ligne-stagiaire { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ligne-stagiaire form { margin: 0; }
.jour { border-top: 1px solid var(--sable); padding-top: 4px; }
.jour:first-of-type { border-top: 0; }
.creneau { padding: 6px 0 6px 14px; border-left: 3px solid var(--sable); margin: 6px 0; }
details summary { cursor: pointer; color: var(--olive); font-weight: bold; margin: 6px 0; }

.pastille { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; border: 2px solid currentColor; font-size: 0.85rem; font-weight: bold; white-space: nowrap; }
.statut-prevu { color: #5b5249; }
.statut-ouvert, .etat-a_signer { color: #8a5a12; }
.statut-clos, .etat-signe { color: var(--olive); }
.etat-absent { color: var(--rouille); }

/* Écran d'émargement (tablette) */
.emargement-grille { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .emargement-grille { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.noms { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.noms .nom {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; min-height: 56px; border: 2px solid var(--filet); border-radius: 10px;
  background: #fff; color: var(--texte); text-decoration: none; font-size: 1.1rem; font-weight: bold;
}
a.nom:hover, a.nom:active { border-color: var(--olive); }
.nom.fait { background: transparent; font-weight: normal; }
.qr-carte { text-align: left; }
.qr { width: 100%; max-width: 320px; background: #fff; border: 1px solid var(--filet); border-radius: 8px; padding: 6px; }
.qr svg { display: block; width: 100%; height: auto; }
.gestion { margin-top: 18px; }

/* Signature */
.cadre-signature { border: 2px dashed var(--olive); border-radius: 10px; background: #fff; margin: 10px 0; }
#pad { display: block; width: 100%; height: 42vh; min-height: 200px; max-height: 340px; touch-action: none; }

.tableau { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--sable); }
th { border-bottom: 2px solid var(--filet); }

select { appearance: auto; }
input.case { display: inline-block; width: 24px; height: 24px; margin: 0; }
.liste label.choix { margin: 0; flex-wrap: wrap; }
.apercu { background: #fff; border: 1px solid var(--filet); border-radius: 8px; padding: 14px 16px; margin: 0 0 10px; }
.apercu .corps { max-width: 70ch; }

/* Questionnaire de positionnement */
.questionnaire fieldset.question { border: 1px solid var(--filet); border-radius: 8px; padding: 14px 16px 8px; margin: 0 0 18px; background: #fff; }
.questionnaire legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; font-weight: bold; }
.questionnaire legend + * { clear: both; }
.questionnaire fieldset.en-erreur { border: 2px solid var(--rouille); }
label.option { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 10px; font-weight: normal; }
label.option input { margin-top: 3px; }
ol.questions { padding-left: 1.4em; margin: 0; }
ol.questions > li { padding: 8px 0; border-bottom: 1px solid var(--sable); }
.stats progress { display: block; width: 100%; max-width: 420px; height: 14px; accent-color: var(--olive); }

[hidden] { display: none !important; }
