/* Suivi Concerta : gros caractères, gros boutons, lisible sans lunettes. */
:root {
  color-scheme: light;
  /* gris souris (04.11.2026, avant vert) ; les noms --vert… sont gardés pour ne pas tout réécrire */
  --vert: #5f6368;
  --vert-fonce: #3c4043;
  --vert-clair: #e8eaed;
  --vert-pale: #f4f5f6;
  --texte: #111;
  --gris: #555;
  --trait: #cfd2d6;
  --fond: #fafafa;
  --rouge: #b3261e;
  --rouge-clair: #fbe7e5;
  --jaune: #fff6d6;
  --menu-h: 78px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 20px; line-height: 1.35;
  padding-bottom: calc(var(--menu-h) + env(safe-area-inset-bottom) + 16px);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }

#entete {
  background: var(--vert); color: #fff; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
#titre { font-weight: 700; font-size: 22px; }
#entete .qui { font-size: 16px; opacity: .9; }

main { max-width: 640px; margin: 0 auto; padding: 16px; }
main.large { max-width: 1200px; }
.attente { text-align: center; color: var(--gris); margin-top: 40px; }

h1 { font-size: 26px; margin: 4px 0 14px; }
h2 { font-size: 22px; margin: 26px 0 10px; }
.discret { color: var(--gris); font-size: 17px; }

/* Menu du bas */
#menu {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff; border-top: 2px solid var(--trait);
  padding-bottom: env(safe-area-inset-bottom);
}
#menu button {
  border: 0; background: none; height: var(--menu-h); font-size: 16px; font-weight: 600; color: var(--gris);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.1;
  text-align: center; padding: 0 2px;
}
#menu .ico { font-size: 26px; display: flex; }
#menu button.actif { color: var(--vert); background: var(--vert-pale); box-shadow: inset 0 4px 0 var(--vert); }

/* Sélecteurs date et heure */
.reglette {
  display: grid; grid-template-columns: 72px 1fr 72px; gap: 8px; align-items: stretch; margin-bottom: 12px;
}
.reglette > button {
  border: 2px solid var(--vert); background: #fff; color: var(--vert); border-radius: 14px;
  font-size: 34px; font-weight: 700; min-height: 72px;
}
.reglette .centre {
  position: relative; border: 2px solid var(--trait); border-radius: 14px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4px;
}
.reglette .valeur { font-size: 30px; font-weight: 700; }
.reglette .sous { font-size: 16px; color: var(--gris); }
.reglette .sous.aujourdhui { color: var(--vert); font-weight: 700; }
.reglette .sous.passe { color: #8a5a00; font-weight: 700; }
.reglette input.natif { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; border: 0; cursor: pointer; }

/* Gros boutons de prise */
.medicament { text-align: center; font-size: 18px; color: var(--gris); margin: 18px 0 8px; }
.gros {
  display: block; width: 100%; border: 0; border-radius: 18px; background: var(--vert); color: #fff;
  padding: 22px 12px; margin: 0 0 14px; font-size: 32px; font-weight: 800; line-height: 1.15;
  box-shadow: 0 3px 0 var(--vert-fonce);
}
.gros small { display: block; font-size: 22px; font-weight: 600; opacity: .95; }
.gros:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--vert-fonce); }
.gros.clair { background: #fff; color: var(--vert); border: 3px solid var(--vert); box-shadow: none; }
.gros:disabled { opacity: .5; }

.bouton {
  border: 2px solid var(--vert); background: #fff; color: var(--vert); border-radius: 12px;
  padding: 10px 16px; font-weight: 700; min-height: 52px;
}
.bouton.plein { background: var(--vert); color: #fff; }
.bouton.rouge { border-color: var(--rouge); color: var(--rouge); }
.bouton.petit { min-height: 44px; padding: 6px 12px; font-size: 17px; }
.bouton:disabled { opacity: .45; }
.lien { border: 0; background: none; color: var(--vert); text-decoration: underline; padding: 8px 0; font-size: 18px; }

/* Liste des prises du jour */
.liste { list-style: none; padding: 0; margin: 0; }
.liste li {
  background: #fff; border: 2px solid var(--trait); border-radius: 14px; padding: 12px; margin-bottom: 10px;
}
.liste .ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.liste .quoi { font-size: 22px; font-weight: 700; }
.liste .actions { display: flex; gap: 8px; }
.edition { margin-top: 10px; }
.choix-nb { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.choix-nb button { border: 2px solid var(--trait); background: #fff; border-radius: 12px; min-height: 56px; font-weight: 700; }
.choix-nb button.oui { border-color: var(--vert); background: var(--vert-clair); color: var(--vert-fonce); }
.vide { color: var(--gris); text-align: center; padding: 12px; border: 2px dashed var(--trait); border-radius: 14px; }

/* Notes : un critère à la fois */
.carte { background: #fff; border: 2px solid var(--trait); border-radius: 18px; padding: 18px 16px; text-align: center; }
.carte .rang { color: var(--gris); font-size: 17px; }
.carte .critere { font-size: 27px; font-weight: 800; margin: 8px 0 4px; min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
.carte .deja { font-size: 17px; color: #8a5a00; min-height: 1.4em; }
.compteur { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 10px; align-items: center; margin: 12px 0 6px; }
.compteur button {
  border: 3px solid var(--vert); background: #fff; color: var(--vert); border-radius: 18px;
  font-size: 54px; font-weight: 800; height: 100px; line-height: 1;
}
.compteur .note { font-size: 84px; font-weight: 800; line-height: 1; }
.compteur .note.sans { font-size: 40px; color: var(--gris); }
.echelle { display: flex; justify-content: space-between; font-size: 15px; color: var(--gris); margin-bottom: 12px; }
.points { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 0; }
.points span { width: 14px; height: 14px; border-radius: 50%; background: var(--trait); }
.points span.fait { background: var(--vert); }
.points span.ici { outline: 3px solid var(--vert-fonce); outline-offset: 2px; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
textarea {
  width: 100%; min-height: 160px; border: 2px solid var(--trait); border-radius: 14px; padding: 12px; font-size: 21px; background: #fff;
}
input[type=text], input[type=password], input[type=date] {
  width: 100%; border: 2px solid var(--trait); border-radius: 12px; padding: 12px; font-size: 21px; background: #fff; min-height: 56px;
}
.bascule { text-align: center; margin-top: 14px; }

/* Notes : tous les critères (ordinateur) */
.grille-notes { width: 100%; border-collapse: collapse; background: #fff; }
.grille-notes td { border-bottom: 1px solid var(--trait); padding: 8px 10px; }
.grille-notes td.lib { font-size: 20px; }
.grille-notes td.reg { width: 300px; white-space: nowrap; text-align: right; }
.mini { display: inline-flex; align-items: center; gap: 8px; }
.mini button { width: 52px; height: 48px; border: 2px solid var(--vert); background: #fff; color: var(--vert); border-radius: 10px; font-size: 28px; font-weight: 800; line-height: 1; }
.mini .val { width: 58px; text-align: center; font-size: 30px; font-weight: 800; }
.mini .val.sans { color: var(--gris); font-size: 22px; }
.mini button.efface { width: auto; padding: 0 10px; font-size: 16px; border-color: var(--trait); color: var(--gris); }
.barre-enreg { position: sticky; bottom: calc(var(--menu-h) + env(safe-area-inset-bottom)); background: var(--fond); padding: 12px 0; display: flex; gap: 12px; align-items: center; }
.barre-enreg .etat { color: #8a5a00; font-weight: 700; }

/* Suivi de la semaine */
.nav-semaine { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; align-items: center; margin-bottom: 12px; }
.nav-semaine button { min-height: 60px; border: 2px solid var(--vert); background: #fff; color: var(--vert); border-radius: 12px; font-size: 30px; font-weight: 800; }
.nav-semaine .qui { text-align: center; font-weight: 700; font-size: 20px; }
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 2px solid var(--trait); border-radius: 12px; background: #fff; }
table.semaine { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 17px; }
table.semaine th, table.semaine td { border: 1px solid var(--trait); padding: 6px; text-align: center; vertical-align: middle; }
table.semaine th { background: var(--vert); color: #fff; font-weight: 700; }
table.semaine th button { border: 0; background: none; color: #fff; font-weight: 700; text-decoration: underline; padding: 0; line-height: 1.2; }
table.semaine th.auj { background: var(--vert-fonce); }
table.semaine td.lib, table.semaine th.lib { text-align: left; position: sticky; left: 0; z-index: 1; min-width: 200px; max-width: 260px; }
table.semaine td.lib { background: #fff; }
table.semaine tr.prises td { background: var(--vert-clair); font-size: 16px; line-height: 1.3; }
table.semaine tr.prises td.lib { background: var(--vert-clair); font-weight: 700; }
table.semaine tr.moy td { background: #eef1ec; font-weight: 700; }
table.semaine td.moy { background: #eef1ec; font-weight: 700; }
table.semaine td.n { font-weight: 700; font-size: 19px; }
table.semaine thead th:not(.lib) { width: 9%; }
table.semaine tr.retire td.lib { color: var(--gris); font-style: italic; }
.remarques-semaine { margin-top: 14px; }
.remarques-semaine p { background: #fff; border: 2px solid var(--trait); border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; white-space: pre-wrap; }
.remarques-semaine b { color: var(--vert-fonce); }

/* PDF et réglages */
.bloc { background: #fff; border: 2px solid var(--trait); border-radius: 16px; padding: 14px; margin-bottom: 16px; }
.option { display: flex; align-items: center; gap: 12px; padding: 10px 4px; font-size: 20px; }
.option input[type=radio] { width: 28px; height: 28px; accent-color: var(--vert); flex: none; }
.dates { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 8px 40px; }
.dates > div { min-width: 0; }
.dates input { min-width: 0; }
@media (min-width: 600px) { .dates { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dates label { font-size: 16px; color: var(--gris); }
.rangee { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.rangee > input { flex: 1 1 180px; }
.items { list-style: none; padding: 0; margin: 0 0 10px; }
.items li { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--trait); flex-wrap: wrap; }
.items li .txt { flex: 1 1 200px; }
.items li.off .txt { color: var(--gris); text-decoration: line-through; }
.items li input[type=radio] { width: 26px; height: 26px; accent-color: var(--vert); }
.etiquette { font-size: 14px; background: var(--vert-clair); color: var(--vert-fonce); border-radius: 8px; padding: 2px 8px; font-weight: 700; }

/* Connexion */
.connexion { max-width: 440px; margin: 30px auto; }
.connexion input { margin-bottom: 14px; }
.erreur { background: var(--rouge-clair); color: var(--rouge); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-weight: 700; }

/* Message de confirmation */
#message {
  position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 12px); z-index: 20;
  max-width: 600px; margin: 0 auto; background: var(--vert-fonce); color: #fff; border-radius: 16px;
  padding: 18px; font-size: 24px; font-weight: 800; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
#message.mauvais { background: var(--rouge); }

@media (min-width: 900px) {
  body { font-size: 19px; display: flex; flex-direction: column; min-height: 100vh; }
  #entete { order: 0; }
  #menu { order: 1; }
  main { order: 2; width: 100%; }
  #menu { position: sticky; top: 0; bottom: auto; grid-template-columns: repeat(4, 200px); justify-content: center; border-top: 0; border-bottom: 2px solid var(--trait); }
  #menu button { height: 60px; flex-direction: row; gap: 8px; font-size: 18px; }
  #menu .ico { font-size: 22px; }
  #menu button.actif { box-shadow: inset 0 -4px 0 var(--vert); }
  body { padding-bottom: 24px; }
  .barre-enreg { bottom: 0; }
  #message { top: 80px; }
}
@media print { #menu, #entete { display: none; } }

/* Fenêtre de choix (modifications pas encore enregistrées, 04.11.2026) */
.voile { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.fenetre { background: #fff; border-radius: 18px; padding: 20px; max-width: 460px; width: 100%; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.fenetre h2 { margin: 0 0 8px; }
.fenetre p { margin: 0 0 16px; }
.fenetre .choix { display: grid; gap: 10px; }
.fenetre .choix .bouton { min-height: 58px; font-size: 20px; }
