:root {
  --orange: #ef6c00;
  --orange-clair: #fdf0e6;
  --bleu: #24465c;
  --bleu-clair: #e9eef1;
  --menthe: #4db6ac;
  --menthe-clair: #e6f5f3;
  --texte: #1f2a33;
  --gris: #5f6b74;
  --trait: #dfe5e9;
  --fond: #f4f6f7;
  --carte: #ffffff;
  --ombre: 0 1px 2px rgba(36, 70, 92, .06), 0 4px 16px rgba(36, 70, 92, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Mulish', Calibri, Arial, sans-serif;
  color: var(--texte);
  background: var(--fond);
}
/* ------- Mise en page : une colonne, pensée pour le téléphone ------- */
.telephone { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--fond); }
@media (min-width: 560px) { body { background: #dfe6ea; } .telephone { box-shadow: 0 0 40px rgba(36,70,92,.12); } }
.bandeau-maquette { display: none; }
.entete {
  background: var(--bleu);
  color: #fff;
  padding: 18px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.entete .retour { background: none; border: 0; color: #fff; font-size: 22px; padding: 0 4px 0 0; cursor: pointer; }
.entete h1 { font-size: 18px; margin: 0; font-weight: 800; letter-spacing: .2px; }
.entete small { display: block; font-size: 12px; opacity: .8; font-weight: 600; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--orange); display: grid; place-items: center; flex: none; }
.contenu { flex: 1; overflow-y: auto; padding: 18px 16px 24px; }
.nav {
  position: sticky; bottom: 0;
  display: flex;
  border-top: 1px solid var(--trait);
  background: var(--carte);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav[hidden] { display: none; }
.nav a, .nav button {
  text-decoration: none;
  flex: 1; background: none; border: 0; padding: 10px 4px 12px; font: inherit; font-size: 12px; font-weight: 700;
  color: var(--gris); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
}
.nav a.actif, .nav button.actif { color: var(--orange); }
.nav svg { width: 22px; height: 22px; }

/* ------- Éléments ------- */
h2 { font-size: 20px; margin: 4px 0 6px; color: var(--bleu); font-weight: 800; }
h3 { font-size: 15px; margin: 0 0 8px; color: var(--bleu); font-weight: 800; }
p { line-height: 1.5; margin: 0 0 12px; }
.discret { color: var(--gris); font-size: 14px; }
.carte { background: var(--carte); border-radius: 16px; box-shadow: var(--ombre); padding: 16px; margin-bottom: 14px; }
.carte.accent { border-left: 5px solid var(--orange); }
.carte.menthe { border-left: 5px solid var(--menthe); }
.bouton {
  display: block; width: 100%; border: 0; border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 16px; font-weight: 800;
  cursor: pointer; text-align: center; text-decoration: none; margin-top: 10px;
}
.bouton.principal { background: var(--orange); color: #fff; }
.bouton.principal:disabled { background: #f3b98a; cursor: not-allowed; }
.bouton.secondaire { background: var(--bleu-clair); color: var(--bleu); }
.bouton.discret { background: none; color: var(--gris); font-weight: 700; font-size: 15px; padding: 10px; }
.bouton.danger { background: none; color: #b3261e; border: 2px solid #f1c7c4; }
.lien { background: none; border: 0; color: var(--bleu); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; }
label.champ { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; color: var(--bleu); }
input[type=text], input[type=tel] {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 2px solid var(--trait); border-radius: 12px; background: #fff; color: var(--texte);
}
input:focus { outline: none; border-color: var(--menthe); }
.case { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--carte); border-radius: 14px; box-shadow: var(--ombre); cursor: pointer; }
.case input { width: 22px; height: 22px; accent-color: var(--orange); flex: none; margin-top: 1px; }
.segments { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bleu-clair); border-radius: 12px; padding: 4px; gap: 4px; }
.segments button { border: 0; background: none; border-radius: 9px; padding: 10px 4px; font: inherit; font-weight: 700; font-size: 14px; color: var(--bleu); cursor: pointer; }
.segments button.choisi { background: #fff; color: var(--orange); box-shadow: 0 1px 4px rgba(36,70,92,.15); }
.compteur { display: flex; align-items: center; gap: 14px; }
.compteur button { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--trait); background: #fff; font-size: 22px; font-weight: 800; color: var(--bleu); cursor: pointer; }
.compteur output { font-size: 22px; font-weight: 800; min-width: 24px; text-align: center; }
.pastille { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--menthe-clair); color: #1f6f67; }
.pastille.orange { background: var(--orange-clair); color: #a64b00; }
.pastille.gris { background: var(--bleu-clair); color: var(--gris); }
.ligne { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.ligne + .ligne { border-top: 1px solid var(--trait); }
.ligne .icone { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--bleu-clair); font-size: 18px; }
.ligne b { color: var(--bleu); }
.heure { font-size: 22px; font-weight: 800; color: var(--bleu); }
.trois-boutons .bouton { margin-top: 8px; }
.conseil { background: var(--menthe-clair); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.45; margin: 12px 0; }
.conseil b { color: #1f6f67; }
.jour { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.jour + .jour { border-top: 1px solid var(--trait); }
.jour .date { width: 48px; text-align: center; flex: none; }
.jour .date b { display: block; font-size: 20px; color: var(--bleu); line-height: 1; }
.jour .date span { font-size: 12px; text-transform: uppercase; color: var(--gris); font-weight: 800; }
.jour .infos { flex: 1; font-size: 14px; }
.jour .infos b { display: block; font-size: 15px; }
.jour.pause .infos, .jour.pause .date { opacity: .45; }
.interrupteur { display: block; position: relative; width: 50px; height: 30px; flex: none; }
.interrupteur input { opacity: 0; width: 0; height: 0; }
.interrupteur span { position: absolute; inset: 0; background: #c8d1d7; border-radius: 30px; transition: .2s; cursor: pointer; }
.interrupteur span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.interrupteur input:checked + span { background: var(--menthe); }
.interrupteur input:checked + span::before { transform: translateX(20px); }
#carte { height: 260px; border-radius: 14px; overflow: hidden; margin-top: 10px; background: var(--bleu-clair); }
.suggestions { list-style: none; margin: 6px 0 0; padding: 0; background: #fff; border-radius: 12px; box-shadow: var(--ombre); overflow: hidden; }
.suggestions li { padding: 11px 14px; font-size: 14px; cursor: pointer; }
.suggestions li + li { border-top: 1px solid var(--trait); }
.suggestions li:hover { background: var(--fond); }
.personne { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--menthe); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; }
.personne a { margin-left: auto; color: var(--orange); font-weight: 800; text-decoration: none; font-size: 14px; }
.grand-symbole { font-size: 44px; text-align: center; margin: 8px 0 4px; }
.centre { text-align: center; }
.etapes { display: flex; gap: 6px; margin-bottom: 14px; }
.etapes i { flex: 1; height: 5px; border-radius: 5px; background: var(--trait); }
.etapes i.fait { background: var(--orange); }
dl.donnees { margin: 0; }
dl.donnees div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
dl.donnees div + div { border-top: 1px solid var(--trait); }
dl.donnees dt { color: var(--gris); }
dl.donnees dd { margin: 0; font-weight: 700; text-align: right; }
.note-bas { font-size: 12px; color: var(--gris); text-align: center; margin-top: 18px; line-height: 1.5; }
.feuille { position: absolute; inset: 0; background: rgba(20,35,45,.45); display: flex; align-items: flex-end; z-index: 1000; }
.feuille .tiroir { background: var(--fond); width: 100%; border-radius: 22px 22px 0 0; padding: 18px 16px 22px; max-height: 85%; overflow-y: auto; }
.feuille .poignee { width: 42px; height: 5px; border-radius: 5px; background: #c8d1d7; margin: 0 auto 14px; }
textarea { width: 100%; min-height: 110px; font: inherit; font-size: 15px; padding: 12px; border: 2px solid var(--trait); border-radius: 12px; resize: vertical; }


/* ------- Compléments de l'application ------- */
form.en-ligne { display: inline; }
.flash { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.flash.info { background: var(--menthe-clair); color: #1f6f67; }
.flash.erreur { background: #fdecea; color: #8c1d18; }
select, input[type=date], input[type=number] { width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border: 2px solid var(--trait); border-radius: 12px; background: #fff; color: var(--texte); }
.segments input { position: absolute; opacity: 0; pointer-events: none; }
.segments label { border-radius: 9px; padding: 10px 4px; font-weight: 700; font-size: 14px; color: var(--bleu); cursor: pointer; text-align: center; }
.segments input:checked + label { background: #fff; color: var(--orange); box-shadow: 0 1px 4px rgba(36,70,92,.15); }
.segments.deux { grid-template-columns: repeat(2, 1fr); }
details.reglage-jour summary { list-style: none; cursor: pointer; color: var(--bleu); font-weight: 700; font-size: 13px; text-decoration: underline; }
details.reglage-jour summary::-webkit-details-marker { display: none; }
details.reglage-jour[open] { background: var(--fond); border-radius: 12px; padding: 10px; margin-top: 6px; }
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin th { text-align: left; color: var(--gris); font-weight: 700; padding: 8px 6px; border-bottom: 2px solid var(--trait); }
table.admin td { padding: 8px 6px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.chiffres { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.chiffres div { background: var(--carte); border-radius: 14px; box-shadow: var(--ombre); padding: 14px; }
.chiffres b { display: block; font-size: 26px; color: var(--bleu); }
.chiffres span { font-size: 13px; color: var(--gris); }
.texte-signalement { white-space: pre-wrap; background: var(--fond); border-radius: 10px; padding: 10px; font-size: 14px; }
.jour > form { flex: none; }
