/* Administration d'un salon (Timezia) : barre à gauche sur ordinateur, en bas sur téléphone. */
:root {
  --fond: #FBF7EF; --carte: #FFFFFF; --encre: #2B2721; --doux: #746B5E; --trait: #E9E1D2; --pale: #F7EBD3;
  --accent: #B8741A; --accent-fonce: #8F560C; --vert: #2F7D4F; --vert-pale: #E2F1E7; --rouge: #B3372B; --rouge-pale: #FAE5E2;
  --gris: #8A8479; --gris-pale: #EFEBE4;
  --titre: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font: 600 26px var(--titre); }
h2 { font-size: 17px; }
p { margin: 0 0 10px; }
a { color: var(--accent-fonce); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

.cadre { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
nav { background: var(--carte); border-right: 1px solid var(--trait); padding: 18px 12px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
nav .marque { display: flex; align-items: center; gap: 8px; font: 600 19px var(--titre); padding: 0 10px 16px; }
nav .marque img { width: 30px; height: 30px; }
nav button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none;
  padding: 10px 12px; border-radius: 12px; color: var(--doux); font-weight: 550; }
nav button svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
nav button:hover { background: var(--fond); color: var(--encre); }
nav button.ici { background: var(--pale); color: var(--accent-fonce); }
nav .fin { margin-top: auto; padding-top: 12px; display: grid; gap: 2px; }
nav .fin a { padding: 8px 12px; font-size: 14px; }
main { padding: 26px 28px 60px; min-width: 0; }
.tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 20px; }
.tete h1 { margin-right: auto; }
.sous { color: var(--doux); }

.b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid var(--trait); background: var(--carte); font-weight: 600; white-space: nowrap; }
.b:hover { border-color: var(--accent); }
.b.plein { background: var(--accent); border-color: var(--accent); color: #fff; }
.b.plein:hover { background: var(--accent-fonce); }
.b.rouge { color: var(--rouge); }
.b.rouge.sur { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.b.petit { min-height: 32px; padding: 4px 12px; font-size: 13.5px; }
.b[disabled] { opacity: .5; cursor: default; }
.segments { display: inline-flex; background: var(--gris-pale); border-radius: 999px; padding: 3px; }
.segments button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-weight: 600; color: var(--doux); }
.segments button.ici { background: var(--carte); color: var(--encre); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }

.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: 18px; padding: 18px 20px; margin-bottom: 16px; }
.carte > h2 { margin-bottom: 12px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tuile { background: var(--carte); border: 1px solid var(--trait); border-radius: 18px; padding: 16px 18px; }
.tuile b { display: block; font: 600 28px var(--titre); font-variant-numeric: tabular-nums; }
.tuile span { color: var(--doux); font-size: 14px; }
.alerte { background: var(--rouge-pale); border: 1px solid #EDC2BC; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.liste { list-style: none; margin: 0; padding: 0; }
.ligne { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--trait); width: 100%;
  background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.liste > :first-child .ligne, .liste > .ligne:first-child { border-top: 0; }
button.ligne:hover { background: var(--fond); }
.ligne .quand { flex: none; width: 62px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ligne .quoi { flex: 1; min-width: 0; }
.ligne .quoi b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne .quoi span { color: var(--doux); font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne .droite { flex: none; text-align: right; color: var(--doux); font-size: 13.5px; }
.jour-titre { font: 600 14px/1 inherit; color: var(--doux); text-transform: uppercase; letter-spacing: .05em; padding: 18px 4px 6px; }
.pastille { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.pastille.active { background: var(--vert-pale); color: var(--vert); }
.pastille.cancelled { background: var(--rouge-pale); color: var(--rouge); }
.pastille.noshow { background: var(--gris-pale); color: var(--gris); }
.pastille.off { background: var(--gris-pale); color: var(--gris); }
.vide { color: var(--doux); padding: 18px 4px; }

/* calendrier */
.cal-barre { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-barre h2 { font: 600 19px var(--titre); margin: 0 8px; }
.cal-barre h2::first-letter { text-transform: uppercase; }
.rond { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--trait); background: var(--carte); font-size: 19px; line-height: 1; }
.cal { display: grid; background: var(--carte); border: 1px solid var(--trait); border-radius: 18px; overflow: hidden; }
.cal-tete { display: contents; }
.cal-tete div { padding: 10px 4px; text-align: center; border-bottom: 1px solid var(--trait); font-size: 13.5px; color: var(--doux);
  border-left: 1px solid var(--trait); }
.cal-tete div:first-child { border-left: 0; }
.cal-tete b { display: block; font-size: 18px; color: var(--encre); }
.cal-tete .auj b { color: #fff; background: var(--accent); border-radius: 999px; width: 32px; margin: 0 auto; }
.cal-heures { position: relative; }
.cal-heures span { position: absolute; right: 6px; font-size: 12px; color: var(--doux); transform: translateY(-50%);
  font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--trait); cursor: copy;
  background-image: linear-gradient(var(--trait) 1px, transparent 1px); }
.cal-col.ferme { background-color: var(--gris-pale); }
.cal-hors { position: absolute; left: 0; right: 0; background: var(--gris-pale); opacity: .8; pointer-events: none; }
.cal-rdv { position: absolute; left: 3px; right: 3px; border-radius: 10px; overflow: hidden; border: 0; padding: 0; text-align: left;
  background: repeating-linear-gradient(135deg, #F3E3C2, #F3E3C2 5px, #FBF3E1 5px, #FBF3E1 10px); cursor: pointer; }
.cal-rdv i { position: absolute; top: 0; left: 0; right: 0; background: var(--c, var(--accent)); color: #fff; padding: 4px 7px; font-style: normal; font-size: 12.5px;
  line-height: 1.3; overflow: hidden; border-radius: 10px; }
.cal-rdv i b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-rdv.noshow i { background: var(--gris); }
.cal-bloc { position: absolute; left: 3px; right: 3px; border-radius: 10px; border: 1px dashed var(--gris); padding: 4px 7px;
  background: repeating-linear-gradient(135deg, #E4DFD6, #E4DFD6 5px, #F1EDE6 5px, #F1EDE6 10px); font-size: 12.5px; color: var(--doux);
  text-align: left; overflow: hidden; cursor: pointer; }
.cal-maintenant { position: absolute; left: 0; right: 0; height: 2px; background: var(--rouge); pointer-events: none; z-index: 2; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--doux); font-size: 13.5px; margin-top: 10px; }
.legende i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }

/* formulaires */
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.champ { display: grid; gap: 4px; align-content: start; }
.champ.large { grid-column: 1 / -1; }
.champ label, .champ > span { font-weight: 600; font-size: 13.5px; }
.champ small { color: var(--doux); font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=search],
input[type=password], select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1.5px solid var(--trait);
  border-radius: 12px; background: #fff; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--pale); }
.coche { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.coche input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.actions .pousse { margin-left: auto; }
.erreur { color: var(--rouge); font-weight: 600; margin: 12px 0 0; }
.aide { color: var(--doux); font-size: 13.5px; }
.balises { display: flex; flex-wrap: wrap; gap: 6px; }
.balises code { background: var(--gris-pale); border-radius: 6px; padding: 1px 7px; font-size: 12.5px; }
.heures-ligne { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 10px; align-items: center; padding: 6px 0; }
.couleurs { display: flex; gap: 10px; flex-wrap: wrap; }
.couleurs label { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border: 1.5px solid var(--trait);
  border-radius: 999px; cursor: pointer; font-weight: 600; }
.couleurs input { position: absolute; opacity: 0; }
.couleurs i { width: 24px; height: 24px; border-radius: 50%; }
.couleurs label:has(input:checked) { border-color: var(--accent); background: var(--pale); }

dialog { border: 0; border-radius: 22px; padding: 0; width: min(600px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  box-shadow: 0 24px 60px rgba(40, 30, 10, .3); color: var(--encre); }
dialog::backdrop { background: rgba(40, 32, 20, .45); }
.dlg-corps { padding: 22px 24px 24px; }
.dlg-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.dlg-tete h2 { font: 600 21px var(--titre); margin-right: auto; }
.fermer { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--gris-pale); font-size: 18px; }

.barres { display: grid; gap: 7px; }
.barre { display: grid; grid-template-columns: 200px 1fr 90px; gap: 10px; align-items: center; font-size: 14px; }
.barre .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre .fond { height: 18px; }
.barre .fond i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.barre .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.connexion { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.connexion form { background: var(--carte); border: 1px solid var(--trait); border-radius: 24px; padding: 30px; width: min(380px, 100%);
  display: grid; gap: 14px; text-align: center; }
.connexion img { width: 64px; height: 64px; margin: 0 auto; }
#tip { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--encre); color: #fff; padding: 10px 18px;
  border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; max-width: 90vw; }
#tip.vu { opacity: 1; }

@media (max-width: 860px) {
  .cadre { display: block; }
  nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--trait); z-index: 20; overflow-x: auto; gap: 0; }
  nav .marque, nav .fin { display: none; }
  nav button { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 10px; min-width: 68px; align-items: center; flex: 1; }
  main { padding: 18px 14px 110px; }
  .deux, .champs { grid-template-columns: 1fr; }
  .barre { grid-template-columns: 110px 1fr 70px; }
  .heures-ligne { grid-template-columns: 105px 1fr 1fr; }
  h1 { font-size: 23px; }
}

/* gestion de Timezia (une seule colonne) */
main.seul { margin: 0; }
.tete h1 .logo { width: 34px; height: 34px; vertical-align: -7px; margin-right: 10px; }

/* équipe : pastilles de couleur, choix des personnes au-dessus du calendrier */
.point { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; flex: none; }
.qui-barre { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.qui-barre .pers { display: inline-flex; align-items: center; min-height: 36px; padding: 5px 14px; border-radius: 999px;
  border: 1.5px solid var(--trait); background: var(--carte); font-weight: 600; color: var(--doux); }
.qui-barre .pers.ici { border-color: var(--accent); background: var(--pale); color: var(--encre); }
.cal-tete .pers { font-weight: 650; color: var(--encre); font-size: 14.5px; padding: 14px 4px; }

/* encaissement dans la fenêtre d'un rendez-vous */
.encaisse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: var(--vert-pale); }
.encaisse input { width: 90px; min-height: 36px; }
.encaisse select { width: auto; min-height: 36px; padding: 5px 10px; }
.encaisse .pousse { margin-left: auto; }

.photo-soin { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--trait); }
.photo-soin img { width: 120px; height: 80px; object-fit: cover; border-radius: 12px; flex: none; }

/* petit calendrier de deux mois, à gauche du planning */
.cal-zone { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 18px; align-items: start; }
.mini-cal { background: var(--carte); border: 1px solid var(--trait); border-radius: 18px; padding: 14px 12px; position: sticky; top: 16px; }
.mini + .mini { margin-top: 16px; }
.mini h3 { font: 600 15px var(--titre); text-transform: capitalize; margin: 0 4px 8px; }
.mini-jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-jours small { color: var(--doux); font-size: 11px; text-transform: uppercase; padding-bottom: 2px; }
.mini-jours button { position: relative; aspect-ratio: 1; border: 0; border-radius: 50%; background: none; font-size: 13px; padding: 0;
  font-variant-numeric: tabular-nums; }
.mini-jours button:hover { background: var(--gris-pale); }
.mini-jours button.vu { background: var(--pale); border-radius: 8px; }
.mini-jours button.auj { background: var(--accent); color: #fff; font-weight: 700; border-radius: 50%; }
.mini-jours button.plein::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--accent); }
.mini-jours button.auj.plein::after { background: #fff; }
.mini-cal .aide { margin: 12px 4px 0; font-size: 12.5px; }

/* demandes à valider, avis, questions, cartes */
.pastille.pending { background: #FFF0CC; color: #8A5A00; }
.carte.attente { border-color: #E9C46A; background: #FFFBEF; }
.carte.attente .droite { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cal-rdv.pending i { background: repeating-linear-gradient(135deg, var(--c, var(--accent)), var(--c, var(--accent)) 6px, rgba(255, 255, 255, .25) 6px, rgba(255, 255, 255, .25) 12px), var(--c, var(--accent)); opacity: .75; }
.etoiles { color: #E0A000; letter-spacing: 1px; white-space: nowrap; }
.etoiles i { font-style: normal; color: var(--trait); }
.ligne.avis { align-items: flex-start; }
.ligne.avis .texte { white-space: pre-line; overflow: visible; text-overflow: clip; color: var(--encre); font-size: 14.5px; }
.question { display: grid; grid-template-columns: minmax(0, 2fr) 170px minmax(0, 1.4fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; }
.bloc-bas { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--trait); }
.ligne .droite .pastille { margin-left: 2px; }
#code-bouton { font: 12.5px/1.5 ui-monospace, Menlo, monospace; }
.connexion select { width: 100%; }
@media (max-width: 860px) { .question { grid-template-columns: 1fr; } }
.ligne .quoi .etoiles { display: inline; color: #E0A000; font-size: 15px; }
.ligne .quoi .etoiles i { color: var(--trait); }
.tel-seul { display: none; }
@media (max-width: 860px) { .tel-seul { display: block; } }
