:root {
  --noir: #1c1c1c;
  --noir-2: #2b2b2b;
  --jaune: #f5c400;
  --jaune-pale: #fff6cc;
  --rouge: #bc0c06;
  --vert: #1f7a3a;
  --vert-pale: #e6f4ea;
  --texte: #1f1f1f;
  --texte-2: #5c5c5c;
  --fond: #f3f2ef;
  --carte: #ffffff;
  --trait: #dedbd3;
  --rayon: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; }
main { width: 100%; max-width: 680px; margin: 0 auto; padding: 20px 16px 32px; flex: 1; }

.barre { background: var(--noir); color: #fff; display: flex; align-items: center; gap: 14px; padding: 8px 16px; }
.marque img { display: block; height: 48px; width: auto; }
.barre-titre { font-size: 15px; color: #d9d9d9; border-left: 1px solid #555; padding-left: 14px; }
.demo { background: var(--jaune); color: var(--noir); text-align: center; font-size: 14px; font-weight: 600; padding: 6px 16px; }

.titre-page { font-size: 24px; margin: 4px 0 16px; }
h1, h2, h3 { line-height: 1.25; }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px; margin-bottom: 16px; }
.carte h2 { font-size: 19px; margin: 0 0 12px; }
.carte h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); margin: 18px 0 8px; }
.carte h3:first-of-type { margin-top: 4px; }

.carte-code { max-width: 420px; margin: 24px auto; }
.carte-code h1 { font-size: 22px; margin: 0 0 4px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type=password], input[type=text], input:not([type]), input[type=date] {
  width: 100%; font: inherit; font-size: 17px; padding: 11px 12px; border: 1px solid #b9b5aa; border-radius: 8px; background: #fff; color: var(--texte);
}
input:focus-visible, button:focus-visible, a:focus-visible, .zone:focus-within { outline: 3px solid var(--jaune); outline-offset: 2px; }

.bouton {
  display: block; width: 100%; margin-top: 16px; padding: 13px 16px; font: inherit; font-weight: 700; font-size: 17px;
  background: var(--noir); color: #fff; border: 0; border-radius: 8px; cursor: pointer;
}
.bouton:hover { background: var(--noir-2); }
.bouton-secondaire { font: inherit; font-weight: 600; padding: 11px 14px; border: 1px solid var(--noir); background: #fff; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.bouton-petit { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid #b9b5aa; background: #fff; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.bouton-petit:hover, .bouton-secondaire:hover { background: #f5f4f0; }

.erreur { color: var(--rouge); font-weight: 600; margin: 10px 0 0; }
.erreur.bloc { background: #fdecea; border: 1px solid #f3c2bf; padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; }
.succes { background: var(--vert-pale); color: var(--vert); border: 1px solid #bfe0c9; padding: 10px 14px; border-radius: 8px; font-weight: 600; margin: 0 0 16px; }
.aide { color: var(--texte-2); font-size: 14px; margin: 12px 0 0; }
.centre { text-align: center; }
.vide { color: var(--texte-2); margin: 0; }

.horaires { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.horaire {
  display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--trait); border-radius: 10px;
  text-decoration: none; background: #fafaf8;
}
.horaire:hover { border-color: #9d988a; }
.horaire.en-cours { border: 2px solid var(--jaune); background: var(--jaune-pale); }
.periode { font-weight: 600; flex: 1; }
.ouvrir { color: var(--texte-2); font-size: 14px; white-space: nowrap; }
.pastille { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--noir); color: #fff; white-space: nowrap; }
.pastille.a-venir { background: #e8e6e0; color: var(--texte); }

.entete-gestion { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lien-discret { font-size: 14px; color: var(--texte-2); }
.choix { border: 0; padding: 0; margin: 0; display: flex; gap: 10px; }
.choix legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.choix label { flex: 1; margin: 0; display: flex; align-items: center; gap: 8px; border: 1px solid #b9b5aa; border-radius: 8px; padding: 11px 12px; font-size: 16px; cursor: pointer; }
.choix label:has(input:checked) { border: 2px solid var(--noir); background: var(--jaune-pale); }
.choix input { accent-color: var(--noir); width: 18px; height: 18px; }
.dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.dates input[type=date] { min-width: 0; padding: 11px 8px; font-size: 16px; }
.zone {
  margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  border: 2px dashed #b9b5aa; border-radius: 10px; padding: 22px 12px; cursor: pointer; font-weight: 400; background: #fafaf8;
}
.zone.survol { border-color: var(--noir); background: var(--jaune-pale); }
.zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.zone-nom { font-weight: 700; color: var(--vert); word-break: break-all; }

.gestion-liste { list-style: none; margin: 0; padding: 0; }
.gestion-liste li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #eceae4; }
.gestion-liste li:first-child { border-top: 0; }
.gestion-liste a { font-weight: 600; }
.gestion-liste small { display: block; color: var(--texte-2); font-size: 13px; }
.gestion-liste .pastille { margin-left: 6px; }
.archives { margin-top: 16px; border-top: 1px solid var(--trait); padding-top: 12px; }
.archives summary { cursor: pointer; font-weight: 600; }
.archive-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; font-size: 15px; }
.ligne-form { display: flex; gap: 8px; }
.ligne-form input { flex: 1; min-width: 0; }
.journal { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.journal li { padding: 6px 0; border-top: 1px solid #eceae4; }
.journal li:first-child { border-top: 0; }
.journal span { color: var(--texte-2); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.pied { text-align: center; color: var(--texte-2); font-size: 13px; padding: 16px; }

@media (max-width: 420px) {
  .barre-titre { display: none; }
  .ligne-form { flex-direction: column; }
}
