/* Fiches action — carnet de terrain : papier clair, cartes blanches, photo en tête. */
:root {
  --sable: #e8d5b2;
  --terre: #b45c20;
  --ocre: #de9e49;
  --olive: #4f502b;
  --brun: #25201d;
  --papier: #fbf9f4;
  --blanc: #ffffff;
  --trait: #ebe3d3;
  --doux: #645b4f;
  --sable-clair: #f5ecdc;
  --olive-clair: #eeeee2;
  --terre-clair: #f8e9de;
  --ombre: 0 1px 2px rgba(37, 32, 29, .06), 0 4px 14px rgba(37, 32, 29, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--brun);
  font-family: Verdana, Arial, Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  word-spacing: 0.08em;
  text-align: left;
}
.page { max-width: 640px; margin: 0 auto; padding: 0 16px 56px; }
.page.large { max-width: 1040px; }
h1 { font-size: 1.5rem; line-height: 1.3; margin: 8px 0 12px; color: var(--olive); letter-spacing: 0; }
h2 { font-size: 1.15rem; line-height: 1.35; margin: 36px 0 12px; color: var(--olive); letter-spacing: 0; }
h3 { font-size: 1rem; line-height: 1.4; margin: 0 0 6px; }
p { margin: 0 0 14px; max-width: 34em; }
em, i { font-style: normal; }
a { color: var(--terre); }
.doux { color: var(--doux); font-size: 0.92rem; }

/* En-tête */
.bandeau {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 14px 0; margin-bottom: 18px; border-bottom: 1px solid var(--trait);
}
.bandeau > span:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.marque { display: flex; align-items: center; gap: 10px; font-weight: bold; color: var(--olive); font-size: 0.95rem; }
img.logo { width: 28px; height: auto; display: block; }

/* Blocs */
.carte {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: 16px;
  box-shadow: var(--ombre);
  padding: 18px;
  margin: 0 0 16px;
  overflow: hidden;
}
.carte > img.photo:first-child { width: calc(100% + 36px); margin: -18px -18px 16px; border-radius: 0; }
.carte.doux { background: var(--sable-clair); border-color: transparent; box-shadow: none; }

/* Boutons */
button, .bouton {
  font: inherit; letter-spacing: inherit;
  display: inline-block; text-decoration: none; text-align: center;
  border: 2px solid var(--terre); border-radius: 999px;
  background: var(--terre); color: #fff;
  padding: 11px 24px; min-height: 48px; cursor: pointer;
}
button:hover, .bouton:hover { background: #9c4e1a; border-color: #9c4e1a; }
button.clair, .bouton.clair { background: var(--blanc); color: var(--brun); border: 1.5px solid #cfc4b0; }
button.clair:hover, .bouton.clair:hover { border-color: var(--olive); background: var(--blanc); }
button.petit, .bouton.petit { padding: 5px 14px; min-height: 38px; font-size: 0.88rem; }
button.lien { background: none; border: none; color: var(--terre); text-decoration: underline; padding: 6px 0; min-height: 0; border-radius: 0; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, .bouton:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--ocre); outline-offset: 2px;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.actions .pousse { margin-left: auto; }

/* Champs */
label { display: block; font-weight: bold; margin: 18px 0 6px; }
label .aide { display: block; font-weight: normal; color: var(--doux); font-size: 0.92rem; }
input[type=text], input[type=password], input[type=date], textarea, select {
  font: inherit; letter-spacing: inherit; color: var(--brun);
  width: 100%; padding: 12px 14px; min-height: 48px;
  background: var(--blanc); border: 1.5px solid #d9cfbd; border-radius: 12px;
}
input:focus, textarea:focus, select:focus { border-color: var(--olive); }
textarea { min-height: 110px; resize: vertical; }
.erreur { color: #8a2c0d; font-weight: bold; margin: 10px 0; }

/* Progression */
.progression { height: 6px; background: var(--trait); border-radius: 6px; overflow: hidden; margin: -6px 0 18px; }
.progression > div { height: 100%; background: var(--ocre); border-radius: 6px; transition: width .3s; }
.bandeau + .progression { margin-top: -12px; }
.etape { color: var(--doux); font-size: 0.88rem; margin-bottom: 14px; }

/* Choix */
.choix { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.choix.une { grid-template-columns: 1fr; }
.choix button {
  background: var(--blanc); color: var(--brun);
  border: 1.5px solid var(--trait); border-radius: 16px; box-shadow: var(--ombre);
  text-align: left; padding: 16px; width: 100%; overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.choix button:hover { border-color: var(--ocre); background: var(--blanc); transform: translateY(-1px); }
.choix button img.photo { width: calc(100% + 32px); margin: -16px -16px 14px; border-radius: 0; }
.choix button .emoji {
  font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%; background: var(--sable-clair); margin-bottom: 10px;
}
.choix button strong { display: block; font-size: 1.02rem; }
.choix button .doux { display: block; }
.choix button .encart strong { display: inline; font-size: inherit; }
.choix button.niveau { display: flex; gap: 14px; align-items: flex-start; }
.pastille {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--olive-clair); color: var(--olive); font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.reperes { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 0.92rem; }
.reperes dt { color: var(--doux); }
.reperes dd { margin: 0; }
.chemin { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.chemin li { background: var(--sable-clair); border-radius: 999px; padding: 3px 12px; font-size: 0.86rem; color: var(--olive); }

/* Encarts */
.encart {
  background: var(--sable-clair); border-radius: 12px;
  padding: 10px 14px; margin: 12px 0 0; font-size: 0.92rem; text-align: left;
}
.encart.alerte { background: var(--terre-clair); color: #6d3510; }
.encart.ok { background: var(--olive-clair); }

/* Fiche et liste d'actions */
.action { border-top: 1px solid var(--trait); padding: 14px 0; }
.action:first-child { border-top: none; padding-top: 0; }
.etiquette {
  display: inline-block; background: var(--olive-clair); color: var(--olive);
  border-radius: 999px; padding: 1px 10px; font-size: 0.8rem; margin: 0 6px 6px 0;
}
.etiquette.bonus { background: var(--terre-clair); color: #8a4313; }
.fete { font-size: 3rem; line-height: 1.2; margin: 24px 0 8px; }

/* Tableau de bord */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 8px; }
.tuile { background: var(--blanc); border: 1px solid var(--trait); border-radius: 16px; box-shadow: var(--ombre); padding: 16px; }
.tuile .nombre { font-size: 2rem; font-weight: bold; color: var(--olive); line-height: 1.2; }
.tuile .libelle { color: var(--doux); font-size: 0.9rem; }
.tuile .progression { margin: 8px 0 0; }
.barres { display: grid; grid-template-columns: minmax(110px, auto) 1fr auto; gap: 10px 12px; align-items: center; }
.barres .piste { height: 12px; background: var(--papier); border-radius: 6px; }
.barres .barre { height: 12px; min-width: 2px; background: var(--olive); border-radius: 6px; }
.barres .valeur { font-weight: bold; }
.grille2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--trait); }
th { border-top: none; color: var(--doux); font-size: 0.86rem; font-weight: normal; }
.defile { overflow-x: auto; }
select.statut { width: auto; min-height: 40px; padding: 6px 12px; border-radius: 999px; }
.qr { background: #fff; padding: 12px; display: inline-block; border-radius: 12px; border: 1px solid var(--trait); }
.qr svg { display: block; width: 220px; height: 220px; }
code.cle { background: var(--sable-clair); border-radius: 8px; padding: 2px 10px; font-family: Verdana, Arial, sans-serif; font-weight: bold; letter-spacing: 0.12em; }
.lienlong { word-break: break-all; font-size: 0.9rem; }

img.photo { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; margin: 0 0 12px; background: var(--sable-clair); }

@media (max-width: 420px) {
  .choix { grid-template-columns: 1fr; }
}
@media print {
  body { background: #fff; font-size: 12pt; }
  .carte, .tuile { background: #fff; box-shadow: none; break-inside: avoid; }
  .sans-impression, button, .bouton { display: none !important; }
  .barres .barre { background: #fff; border: 1.5px solid var(--olive); }
  .encart, .etiquette, .chemin li { background: #fff; border: 1px solid var(--trait); }
  img.photo { display: none; }
  select.statut { border: none; padding: 0; appearance: none; }
}

/* Choix avec pictogramme : sur une ligne, plus compact sur téléphone */
.choix button:has(> .emoji) { display: flex; align-items: center; gap: 14px; }
.choix button:has(> .emoji) .emoji { margin-bottom: 0; flex: none; }
.choix button:has(> .emoji) .doux { margin-top: 2px; }
.tuiles { margin-bottom: 16px; }

/* Logo de l'entreprise */
img.logo-entreprise { display: block; height: 36px; width: auto; max-width: 140px; object-fit: contain; }
img.logo-entreprise.grand { height: 64px; max-width: 220px; }
input[type=file] { font: inherit; font-size: 0.9rem; max-width: 100%; }

.surtitre { margin: 8px 0 0; color: var(--terre); font-weight: bold; font-size: 0.92rem; }
.surtitre + h1 { margin-top: 2px; }
.carte > label:first-child { margin-top: 0; }
