:root {
  --brun: #7a3e12; --cuivre: #c27a2c; --creme: #f7efe4; --creme2: #fbf6ef;
  --encre: #2b2118; --gris: #6b5a4a; --vert: #3f7d3a; --rouge: #a8321e;
  --rayon: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--encre); background: var(--creme2); font-size: 17px; line-height: 1.4;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}
.haut { background: var(--brun); color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 5; }
.marque { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
main { max-width: 720px; margin: 0 auto; padding: 14px; outline: none; }
h1 { font-size: 1.4rem; color: var(--brun); margin: 4px 0 12px; }
h2 { font-size: 1.1rem; color: var(--brun); margin: 18px 0 8px; }
p { margin: 6px 0; }
.carte { background: #fff; border-radius: var(--rayon); padding: 14px; margin: 10px 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.carte.cle { border-left: 5px solid var(--cuivre); }
.discret { color: var(--gris); font-size: .9rem; }
.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: 12px 16px; font-size: 1rem;
  background: var(--cuivre); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer; margin: 4px 4px 4px 0;
}
.btn.principal { background: var(--brun); width: 100%; padding: 15px; font-size: 1.08rem; }
.btn.clair { background: var(--creme); color: var(--brun); }
.btn.danger { background: #fff; color: var(--rouge); border: 1px solid var(--rouge); }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; font-size: 1rem; padding: 10px; border: 1px solid #d9c9b4; border-radius: 8px; background: #fff; color: var(--encre);
}
input[type=range] { padding: 0; }
input[type=checkbox] { width: 28px; height: 28px; accent-color: var(--vert); flex: 0 0 28px; margin: 0; }
.choix { display: flex; gap: 8px; flex-wrap: wrap; }
.choix button { flex: 1; min-width: 80px; padding: 12px; border-radius: 10px; border: 2px solid var(--cuivre); background: #fff; color: var(--brun); font-weight: 700; font-size: 1rem; }
.choix button.on { background: var(--cuivre); color: #fff; }
.val { float: right; color: var(--cuivre); font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: 7px 6px; border-bottom: 1px solid #eadfce; text-align: left; vertical-align: top; }
th { background: var(--brun); color: #fff; font-size: .85rem; }
td.n { text-align: right; font-weight: 700; white-space: nowrap; }
.defile { overflow-x: auto; }
.etape { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #eadfce; }
.etape.faite .lib { text-decoration: line-through; color: var(--gris); }
.etape .heure { font-weight: 700; color: var(--cuivre); min-width: 92px; }
.etape.critique .lib { font-weight: 700; }
.etape .corps { flex: 1; }
.etape textarea { margin-top: 6px; min-height: 40px; font-size: .95rem; }
.etape .outils { margin-top: 4px; }
.lien { background: none; border: 0; color: var(--cuivre); font-weight: 600; padding: 4px 0; cursor: pointer; font-size: .95rem; }
.prochaine { background: var(--brun); color: #fff; }
.prochaine h2, .prochaine .discret { color: #f3e1c8; }
.video { position: relative; padding-top: 56.25%; margin: 8px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.pasvideo { background: var(--creme); border-radius: 8px; padding: 12px; color: var(--gris); font-size: .9rem; }
details { background: #fff; border-radius: var(--rayon); margin: 8px 0; padding: 10px 14px; }
details summary { font-weight: 700; color: var(--brun); cursor: pointer; }
.etoiles button { font-size: 1.6rem; background: none; border: 0; cursor: pointer; padding: 0 2px; }
.onglets {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff; border-top: 1px solid #e3d5c2;
  padding-bottom: env(safe-area-inset-bottom); z-index: 5;
}
.onglets a { flex: 1; text-align: center; text-decoration: none; color: var(--gris); font-size: 1.3rem; padding: 6px 0; }
.onglets a span { display: block; font-size: .7rem; }
.onglets a.on { color: var(--brun); font-weight: 700; }
.alerte { background: #fdecea; color: var(--rouge); border-radius: 8px; padding: 10px; }
.ok { background: #e9f3e7; color: var(--vert); border-radius: 8px; padding: 10px; }
