:root {
  --vert: #8ab81e;
  --vert-fonce: #5d7d10;
  --vert-pale: #f3f8e6;
  --orange: #ec6c00;
  --encre: #1f2421;
  --texte-2: #5b615d;
  --bord: #e2e5df;
  --fond: #f6f7f4;
  --carte: #ffffff;
  --rouge: #b42318;
  --rouge-pale: #fef0ee;
  --rayon: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fond);
  color: var(--encre);
  font: 16px/1.6 "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: var(--vert-fonce); }
code { font-size: .9em; background: var(--fond); padding: 1px 6px; border-radius: 4px; }

/* Barre du haut */
.barre {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 24px; background: var(--carte); border-bottom: 1px solid var(--bord);
}
.marque img { display: block; height: 46px; width: auto; }
.barre-titre { font-weight: 600; color: var(--texte-2); padding-left: 16px; border-left: 1px solid var(--bord); }
.barre-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.barre-actions form { margin: 0; }
.qui { font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { width: 100%; margin: 32px auto; padding: 0 16px; flex: 1; }
main.etroit { max-width: 780px; }
main.large { max-width: 1100px; }

.carte {
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 32px; margin-bottom: 24px;
}
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 24px 0 4px; color: var(--vert-fonce); }
p { margin: 0 0 12px; }
.intro { color: var(--texte-2); }
.note { color: var(--texte-2); font-size: .9rem; margin-top: 12px; }

/* Connexion */
.connexion { max-width: 440px; margin: 40px auto; }
.pile { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; }
.pile label { font-weight: 600; font-size: .95rem; margin-top: 8px; }
input[type=text], input[type=password] {
  font: inherit; padding: 11px 12px; border: 1px solid #c9cec5; border-radius: 8px; background: #fff; color: var(--encre);
}
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--vert) 55%, transparent); outline-offset: 2px;
}

/* Boutons */
.bouton, .bouton-secondaire, .bouton-discret {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border-radius: 8px; padding: 11px 20px; border: 1px solid transparent; transition: background .15s, opacity .15s;
}
.bouton { background: var(--vert-fonce); color: #fff; }
.bouton:hover { background: #4b6a08; }
.bouton[disabled] { opacity: .45; cursor: not-allowed; }
.pile .bouton { margin-top: 18px; }
.bouton-secondaire { background: #fff; color: var(--encre); border-color: #c9cec5; }
.bouton-secondaire:hover { background: var(--fond); }
.bouton-discret { background: none; color: var(--texte-2); padding: 6px 10px; font-weight: 500; }
.bouton-discret:hover { color: var(--encre); background: var(--fond); }
.lien { font-weight: 600; text-decoration: none; }
.lien:hover { text-decoration: underline; }

/* Alertes */
.alerte { background: var(--rouge-pale); color: var(--rouge); border-radius: 8px; padding: 10px 14px; font-weight: 600; }
.alerte.info { background: #fff5e6; color: #8a4100; }

/* Document */

.surtitre { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--texte-2); margin: 0; }
.identite { font-size: 1.15rem; font-weight: 600; margin: 0 0 20px; padding-bottom: 20px; border-bottom: 1px solid var(--bord); }
.identite span { display: block; font-size: .9rem; font-weight: 400; color: var(--texte-2); }

.validation { margin-top: 28px; padding: 20px; border: 2px solid var(--vert); background: var(--vert-pale); border-radius: 10px; }
.coche { display: flex; gap: 14px; align-items: flex-start; font-weight: 600; cursor: pointer; line-height: 1.45; }
.coche input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--vert-fonce); cursor: pointer; }
.validation .bouton { margin-top: 18px; width: 100%; font-size: 1.05rem; padding: 14px 20px; }
.bouton-refus {
  display: flex; width: 100%; margin-top: 10px; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; font-size: 1.05rem; cursor: pointer;
  padding: 13px 20px; border-radius: 8px; border: 1px solid var(--rouge); background: var(--rouge); color: #fff;
  transition: background .15s, opacity .15s;
}
.bouton-refus:hover { background: #912018; }
.bouton-refus[disabled] { opacity: .45; cursor: not-allowed; }

/* Confirmation */
.confirmation { display: flex; gap: 20px; align-items: flex-start; border-color: var(--vert); background: var(--vert-pale); }
.confirmation h1 { font-size: 1.3rem; }
.confirmation .actions { margin-top: 4px; }
.confirmation.refus { border-color: #e7a59f; background: var(--rouge-pale); }
.confirmation.refus .pastille { background: var(--rouge); }
.pastille {
  flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--vert-fonce); color: #fff;
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 700;
}

/* Administration */
.entete-admin { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tableau-conteneur { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-2); background: #fafbf8; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcf9; }
.fort { font-weight: 600; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85rem; color: var(--texte-2); }
.etiquette { font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #fff5e6; color: #8a4100; white-space: nowrap; }
.etiquette.ok { background: var(--vert-pale); color: var(--vert-fonce); }
.etiquette.refus { background: var(--rouge-pale); color: var(--rouge); }
.etiquette.neutre { background: var(--fond); color: var(--texte-2); }
tr.remplacee td { color: var(--texte-2); }
tr.remplacee .fort { font-weight: 400; }
.vide { text-align: center; color: var(--texte-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.pied { text-align: center; font-size: .8rem; color: var(--texte-2); padding: 20px 16px 28px; }

@media (max-width: 640px) {
  .barre { padding: 10px 16px; gap: 10px; }
  .barre-titre { display: none; }
  .barre-actions { gap: 8px; }
  .qui { max-width: 140px; }
  .carte { padding: 20px; }
  main { margin: 16px auto; }
  h1 { font-size: 1.35rem; }

  .confirmation { flex-direction: column; }
}
