:root {
  --fond: #fffaf3;
  --carte: #ffffff;
  --texte: #1f2a2a;
  --doux: #5b6b6b;
  --vert: #2f6f5e;
  --vert-clair: #e3f1ec;
  --orange: #c45a1b;
  --orange-clair: #fdeee3;
  --rouge: #b3261e;
  --bord: #e6ded2;
  --rayon: 14px;
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.45;
  padding-bottom: 84px;
}
a { color: var(--vert); }
h1 { font-size: 1.45rem; margin: .4rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .3rem; }
p { margin: .4rem 0; }
.entete {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 16px; background: var(--vert); color: #fff; position: sticky; top: 0; z-index: 5;
}
.marque { color: #fff; font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.cloche { color: #fff; text-decoration: none; position: relative; font-size: 1.2rem; }
.pastille {
  position: absolute; top: -6px; right: -10px; background: var(--orange); color: #fff;
  border-radius: 999px; font-size: .7rem; padding: 0 .4rem;
}
.page { max-width: 640px; margin: 0 auto; padding: 1rem 16px; }
.barre {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff;
  border-top: 1px solid var(--bord); padding-bottom: env(safe-area-inset-bottom); z-index: 5;
}
.barre a {
  flex: 1; text-align: center; padding: .5rem .2rem; font-size: .75rem; color: var(--doux);
  text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.barre a span { font-size: 1.3rem; }
.barre a.actif { color: var(--vert); font-weight: 700; }
.carte {
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 1rem; margin: .7rem 0;
}
.carte.urgente { border-color: var(--orange); background: var(--orange-clair); }
.carte.info { background: var(--vert-clair); border-color: #c4e0d6; }
.carte.alerte { background: var(--orange-clair); border-color: #f2c6a8; }
.doux { color: var(--doux); font-size: .9rem; }
.etiquette {
  display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 999px;
  background: var(--vert-clair); color: var(--vert); margin-right: .3rem;
}
.etiquette.orange { background: var(--orange-clair); color: var(--orange); }
.etiquette.fictif { background: #fff3c4; color: #7a5b00; }
.bouton, button {
  display: inline-block; border: 0; border-radius: 12px; padding: .8rem 1.1rem; font-size: 1rem;
  background: var(--vert); color: #fff; text-decoration: none; cursor: pointer; font-family: inherit;
  min-height: 48px;
}
.bouton.large, button.large { display: block; width: 100%; text-align: center; margin: .6rem 0; }
.bouton.secondaire, button.secondaire { background: #fff; color: var(--vert); border: 2px solid var(--vert); }
.bouton.danger, button.danger { background: var(--rouge); }
button.lien { background: none; color: var(--doux); padding: .3rem; min-height: 0; text-decoration: underline; font-size: .85rem; }
form p, .champ { margin: .8rem 0; }
label { display: block; font-weight: 600; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=time], input[type=search], select, textarea {
  width: 100%; font-size: 1rem; padding: .7rem; border: 1px solid #cfc6b8; border-radius: 10px; background: #fff;
  font-family: inherit;
}
input[type=checkbox], input[type=radio] { width: 1.3rem; height: 1.3rem; vertical-align: middle; margin-right: .4rem; }
ul.choix, form ul { list-style: none; padding: 0; margin: 0; }
form ul li label, ul.choix label { font-weight: 400; padding: .5rem 0; display: flex; align-items: center; }
.helptext { display: block; color: var(--doux); font-size: .85rem; }
.errorlist { color: var(--rouge); padding: 0; list-style: none; font-size: .9rem; }
.message { padding: .8rem 1rem; border-radius: 10px; background: var(--vert-clair); }
.message.error { background: #fde8e7; color: var(--rouge); }
.message.warning, .message.info { background: var(--orange-clair); }
.photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--vert-clair); }
.photo.grande { width: 140px; height: 140px; }
.ligne { display: flex; gap: .8rem; align-items: center; }
.filtres { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; }
.filtres a { white-space: nowrap; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--bord); text-decoration: none; color: var(--texte); background: #fff; }
.filtres a.actif { background: var(--vert); color: #fff; border-color: var(--vert); }
.fil { max-height: 360px; overflow-y: auto; }
.bulle { background: #f4efe7; border-radius: 12px; padding: .5rem .8rem; margin: .4rem 0; }
.bulle.moi { background: var(--vert-clair); margin-left: 2rem; }
.resultats { border: 1px solid var(--bord); border-radius: 10px; margin-top: .4rem; background: #fff; }
.resultats button { display: block; width: 100%; text-align: left; background: #fff; color: var(--texte); border-bottom: 1px solid var(--bord); border-radius: 0; }
.code { font-family: ui-monospace, monospace; font-size: 1.3rem; letter-spacing: .1em; background: #fff; padding: .2rem .6rem; border-radius: 8px; border: 1px dashed var(--vert); }
.mention { font-size: .85rem; background: #fff3c4; padding: .6rem .8rem; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: .4rem; border-bottom: 1px solid var(--bord); text-align: left; }

/* Autorisation à montrer à l'école */
.autorisation h1 { font-size: 1.6rem; line-height: 1.25; }
@media print {
  .entete, .barre, .page > p { display: none; }
  .autorisation { border: 2px solid #000; }
}

.actions-message form { display: inline; }
.actions-message a, .actions-message button { font-size: .75rem; }
details.gerer form { display: block; }
