/* =====================================================================================
   QG Pro · Terrain : planifier une reunion (direction C « Focus », 12 novembre 2026).
   Gabarit : client/templates/maison/rencontres/terrain_planifier.html (classes mm-tpl-*).
   Chargee sur chaque page : tout est prefixe .mm-tpl. Jetons --qgv-* seulement.
   Les heures deja prises sont hachurees et barrees, sans nom de client.
   ===================================================================================== */

.mm-tpl { max-width: 780px; margin: 0 auto; min-width: 0; }
.mm-tpl [hidden] { display: none !important; }

.mm-tpl-sur { margin: 0; overflow-wrap: anywhere; }
.mm-tpl-question {
  margin: var(--qgv-s2) 0 var(--qgv-s6); font-size: clamp(30px, 5vw, 46px); line-height: 1.08;
  letter-spacing: -.02em; color: var(--qgv-text); overflow-wrap: anywhere;
}
.mm-tpl-corps { display: grid; gap: var(--qgv-s6); min-width: 0; }
.mm-tpl-bloc { min-width: 0; }

/* Les pas numerotes : 1 Le jour · 2 L'heure du debut */
.mm-tpl-pas { display: flex; align-items: center; flex-wrap: wrap; gap: var(--qgv-s2) var(--qgv-s3); margin-bottom: var(--qgv-s3); }
.mm-tpl-pas > b {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--qgv-text); color: var(--qgv-surface); font: 500 11px var(--qgv-font-mono);
}
.mm-tpl-pas-titre { font-weight: 600; color: var(--qgv-text); }
.mm-tpl-pris-texte { margin-left: auto; min-width: 0; font-size: var(--qgv-t-sm); color: var(--qgv-text-3); text-align: right; }

/* « Autre date » / « Autre heure » : les vrais champs envoyes, discrets */
.mm-tpl-autre { display: inline-flex; align-items: center; gap: var(--qgv-s2); margin-left: auto; font-size: var(--qgv-t-sm); color: var(--qgv-text-3); }
.mm-tpl-autre > span { white-space: nowrap; }
.mm-tpl-autre .qgv-date-words { display: none; }   /* la phrase finale dit deja la date en mots */
.mm-tpl-autre input {
  flex: none; width: auto; max-width: 100%; min-height: 36px; padding: 0 var(--qgv-s2); border: 1px solid var(--qgv-line); border-radius: var(--qgv-r-sm);
  background: transparent; color: var(--qgv-text); font: inherit; font-family: var(--qgv-font-mono); color-scheme: light dark;
  transition: border-color var(--qgv-dur-fast) var(--qgv-ease);
}
.mm-tpl-autre input:hover, .mm-tpl-autre input:focus { border-color: var(--qgv-text); outline: none; }
.mm-tpl-autre .qgv-tf { flex: 0 0 auto; width: 9.5em; max-width: 100%; }
.mm-tpl-autre .qgv-tf > input { width: 100%; }
.mm-tpl-autre-heure { display: flex; justify-content: flex-end; margin-top: var(--qgv-s3); }

/* 1) Les jours */
.mm-tpl-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--qgv-s2); }
.mm-tpl-jour {
  display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 88px; padding: 10px 6px 9px;
  border: 0; border-radius: var(--qgv-r); background: transparent; color: var(--qgv-text); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--qgv-line); font: inherit;
  transition: transform var(--qgv-dur-fast) var(--qgv-ease), background var(--qgv-dur) var(--qgv-ease), color var(--qgv-dur) var(--qgv-ease), box-shadow var(--qgv-dur) var(--qgv-ease);
}
.mm-tpl-jour:hover { box-shadow: inset 0 0 0 1px var(--qgv-text); }
.mm-tpl-jour:active { transform: scale(.96); }
.mm-tpl-jour:focus-visible { outline: 2px solid var(--qgv-text); outline-offset: 2px; }
.mm-tpl-jour small { font: 500 10.5px var(--qgv-font-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.mm-tpl-jour b { font-size: 21px; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; }
.mm-tpl-jour em { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-style: normal; font-size: 11px; opacity: .7; white-space: nowrap; }
.mm-tpl-jour.is-auj b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.mm-tpl-jour.is-on { background: var(--qgv-text); color: var(--qgv-surface); box-shadow: none; }

/* La petite bande d'un jour, de 8 h a 18 h : hachure = deja pris */
.mm-tpl-bande {
  position: relative; display: block; width: 100%; height: 5px; margin: 3px 0 1px; overflow: hidden;
  border-radius: 2px; background: color-mix(in srgb, currentColor 16%, transparent);
}
.mm-tpl-bande i { position: absolute; top: 0; bottom: 0; left: var(--g); width: var(--l); background: currentColor; opacity: .75; }

/* 2) Les heures */
.mm-tpl-moment { margin: var(--qgv-s3) 0 var(--qgv-s2); }
.mm-tpl-pas + .mm-tpl-moment { margin-top: 0; }
.mm-tpl-heures { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: var(--qgv-s2); }
.mm-tpl-heure {
  min-width: 0; min-height: 46px; padding: 0 4px; border: 0; border-radius: var(--qgv-r-btn); background: transparent; color: var(--qgv-text);
  box-shadow: inset 0 0 0 1px var(--qgv-line); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer;
  transition: transform var(--qgv-dur-fast) var(--qgv-ease), background var(--qgv-dur) var(--qgv-ease), color var(--qgv-dur) var(--qgv-ease), box-shadow var(--qgv-dur) var(--qgv-ease);
}
.mm-tpl-heure:hover { box-shadow: inset 0 0 0 1px var(--qgv-text); }
.mm-tpl-heure:active { transform: scale(.95); }
.mm-tpl-heure:focus-visible { outline: 2px solid var(--qgv-text); outline-offset: 2px; }
.mm-tpl-heure.is-on { background: var(--qgv-text); color: var(--qgv-surface); box-shadow: none; }
.mm-tpl-heure.is-pris, .mm-tpl-heure:disabled {
  color: var(--qgv-text-3); font-weight: 400; text-decoration: line-through; cursor: not-allowed; box-shadow: none;
  background: repeating-linear-gradient(135deg, var(--qgv-surface-2) 0 3px, transparent 3px 7px);
}
.mm-tpl-heure.is-pris:hover { box-shadow: none; }

/* La duree, repliee */
.mm-tpl-plus .qc-repli-corps { display: grid; gap: var(--qgv-s4); }
.mm-tpl-durees .qc-filtre { min-height: 40px; }
.mm-tpl-fin { max-width: 240px; }
.mm-tpl-fin .qgv-field { margin: 0; }
.mm-tpl-qui { margin: 0; font-size: var(--qgv-t-sm); }

/* La phrase finale et le bouton en vedette */
.mm-tpl-fin-bloc { display: grid; gap: var(--qgv-s3); min-width: 0; }
.mm-tpl-fin-bloc .qgv-note { margin: 0; }
[data-mm-tpl-note]:empty { display: none; }
.mm-tpl-vedette { display: flex; align-items: center; flex-wrap: wrap; gap: var(--qgv-s4); margin: 0; }
.mm-tpl-bilan {
  flex: 1 1 260px; min-width: 0; margin: 0; font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em;
  color: var(--qgv-text); overflow-wrap: anywhere;
}
.mm-tpl-bilan span { display: block; margin-top: 3px; font-size: var(--qgv-t-sm); font-weight: 400; letter-spacing: 0; color: var(--qgv-text-3); }
.mm-tpl-vedette .qgv-btn { min-height: 50px; padding: 0 22px; font-size: 15px; }
.mm-tpl-suite { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--qgv-s2); }
.mm-tpl-lien {
  display: inline-flex; align-items: center; min-height: 44px; font-size: var(--qgv-t-sm); color: var(--qgv-text-2); text-decoration: none;
  transition: color var(--qgv-dur-fast) var(--qgv-ease), transform var(--qgv-dur-fast) var(--qgv-ease);
}
.mm-tpl-lien:hover { color: var(--qgv-text); transform: translateX(2px); }

/* Le pied du telephone : cache a l'ordinateur */
.mm-tpl-pied { display: none; }

@media (max-width: 900px) {
  .mm-tpl-pied { display: flex; }
  .mm-tpl-vedette .qgv-btn, .mm-tpl-suite [data-mm-tpl-bureau] { display: none; }
  .mm-tpl-pied-info { font-weight: 600; color: var(--qgv-text); font-size: var(--qgv-t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mm-tpl-pied > .qgv-btn-quiet { flex: 0 0 auto; }
  .mm-tpl-pied > .qgv-btn-primary { flex: 1 1 0; }
}
@media (max-width: 760px) {
  .mm-tpl-question { margin-bottom: var(--qgv-s5); }
  .mm-tpl-corps { gap: var(--qgv-s5); }
  .mm-tpl-jours { gap: 4px; }
  .mm-tpl-jour { min-height: 80px; padding: 9px 2px 8px; }
  .mm-tpl-jour b { font-size: 19px; }
  .mm-tpl-jour em { font-size: 10px; }
  .mm-tpl-heures { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .mm-tpl-pris-texte { flex-basis: 100%; margin-left: 0; text-align: left; }
  .mm-tpl-bilan { font-size: 18px; }
  .mm-tpl-autre input { min-height: 44px; font-size: 16px; }
  .mm-tpl-fin { max-width: none; }
}
@media (max-width: 420px) {
  .mm-tpl-jour small { font-size: 9.5px; letter-spacing: .02em; }
  .mm-tpl-heure { font-size: var(--qgv-t-sm); }
}

@media (prefers-reduced-motion: no-preference) {
  .mm-tpl-bilan { animation: mm-tpl-monte .3s var(--qgv-ease) backwards; }
  .mm-tpl .qgv-note { animation: mm-tpl-monte .3s var(--qgv-ease) backwards; }
}
@keyframes mm-tpl-monte { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
