/*
 * TAGMEMICS V4.24 — pont strict entre la maquette V4.20 et Functional Core 2.7.31.
 * Aucun composant visuel général n’est recréé ici : v4-theme.css demeure la référence.
 */

body.tmforms-final-shell {
  min-width: 320px;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: var(--sans) !important;
}

body.tmforms-final-shell::before,
body.tmforms-final-shell::after {
  display: none !important;
  content: none !important;
}

.tmforms-functional-mount,
.tmforms-functional-mount * {
  box-sizing: border-box;
}

.tmforms-functional-mount {
  min-width: 0;
  width: 100%;
}

.tmforms-functional-mount .tmfc-form[data-tmfc-form] {
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
}

.tmforms-functional-mount .tmfc-form[data-tmfc-form]::before {
  font-family: var(--display) !important;
}

.tmforms-functional-mount .tmfc-form[data-tmfc-form] .tmfc-field :is(input, select, textarea),
.tmforms-functional-mount .tmfc-form[data-tmfc-form] .tmfc-document-field input[type="file"]::file-selector-button {
  font-family: var(--sans) !important;
}

.tmforms-functional-mount .tmfc-form[data-tmfc-form] button.tmfc-submit {
  margin-top: 7px !important;
  padding: 9px 21px !important;
  font: 600 12px/1 var(--sans) !important;
}

.tmforms-functional-mount .tmfc-form[data-tmfc-form] a:focus-visible,
.tmforms-functional-mount .tmfc-form[data-tmfc-form] button:focus-visible,
.tmforms-functional-mount .tmfc-form[data-tmfc-form] input:focus-visible,
.tmforms-functional-mount .tmfc-form[data-tmfc-form] select:focus-visible,
.tmforms-functional-mount .tmfc-form[data-tmfc-form] textarea:focus-visible {
  outline-color: var(--gold-dark) !important;
}

.tmforms-error {
  padding: 24px;
  border: 1px solid #b42318;
  background: #fff4f2;
  color: #7a271a;
}

/* Agenda Interprétation — palette V4.20 et isolation stricte. */
body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar {
  --tmcal-ink: #0f2b3d;
  --tmcal-paper: #fbf8f1;
  --tmcal-white: #fffefb;
  --tmcal-stone: #f1ece4;
  --tmcal-mist: #e8eff1;
  --tmcal-gold: #b58a3b;
  --tmcal-gold-dark: #8b6426;
  --tmcal-sand: #e2d8ca;
  --tmcal-slate: #4d5f6c;
  width: 100% !important;
  max-width: none !important;
  background: var(--tmcal-white) !important;
  background-image: none !important;
  border-color: var(--tmcal-sand) !important;
  color: var(--tmcal-ink) !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-nav {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--tmcal-gold) !important;
  border-radius: 2px !important;
  background: var(--tmcal-white) !important;
  background-image: none !important;
  color: var(--tmcal-ink) !important;
  box-shadow: none !important;
  filter: none !important;
  text-decoration: none !important;
  text-shadow: none !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] a.tmfc-calendar-nav:hover {
  border-color: var(--tmcal-gold-dark) !important;
  background: var(--tmcal-paper) !important;
  color: var(--tmcal-ink) !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] a.tmfc-calendar-nav:focus-visible {
  outline: 3px solid var(--tmcal-gold-dark) !important;
  outline-offset: 3px !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-nav.is-disabled {
  border-color: var(--tmcal-sand) !important;
  background: var(--tmcal-stone) !important;
  color: var(--tmcal-slate) !important;
  opacity: 1 !important;
  pointer-events: none !important;
  cursor: default !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 54px !important;
  display: block !important;
  margin: 0 !important;
  padding: 7px 4px !important;
  border: 1px solid var(--tmcal-gold) !important;
  border-radius: 2px !important;
  background: var(--tmcal-white) !important;
  background-image: none !important;
  color: var(--tmcal-ink) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
  filter: none !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  opacity: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-shadow: none !important;
  text-transform: none !important;
  transform: none !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day::before,
body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day::after,
body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-nav::before,
body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-nav::after {
  display: none !important;
  content: none !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day > span,
body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day > small {
  background: transparent !important;
  color: inherit !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day.is-available {
  border-color: var(--tmcal-gold) !important;
  background: var(--tmcal-white) !important;
  color: var(--tmcal-ink) !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day.is-available:hover:not(:disabled) {
  border-color: var(--tmcal-gold-dark) !important;
  background: var(--tmcal-paper) !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day.is-limited {
  border-color: var(--tmcal-slate) !important;
  background: var(--tmcal-mist) !important;
  color: var(--tmcal-ink) !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day.is-limited:hover:not(:disabled) {
  border-color: var(--tmcal-ink) !important;
  background: var(--tmcal-mist) !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day.is-unavailable,
body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day.is-past {
  border-color: var(--tmcal-sand) !important;
  background: var(--tmcal-stone) !important;
  color: var(--tmcal-slate) !important;
  -webkit-text-fill-color: var(--tmcal-slate) !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  text-decoration: line-through !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day:focus-visible {
  position: relative !important;
  z-index: 2 !important;
  outline: 3px solid var(--tmcal-gold-dark) !important;
  outline-offset: 2px !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day.is-selected,
body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day.is-selected:hover {
  border-color: var(--tmcal-ink) !important;
  background: var(--tmcal-ink) !important;
  color: var(--tmcal-white) !important;
  -webkit-text-fill-color: var(--tmcal-white) !important;
  box-shadow: inset 0 0 0 1px var(--tmcal-ink) !important;
  text-decoration: none !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-legend i.available {
  border-color: var(--tmcal-gold) !important;
  background: var(--tmcal-white) !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-legend i.limited {
  border-color: var(--tmcal-slate) !important;
  background: var(--tmcal-mist) !important;
}

body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-legend i.unavailable {
  border-color: var(--tmcal-sand) !important;
  background: var(--tmcal-stone) !important;
}

@media (max-width: 760px) {
  body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar {
    padding: 12px !important;
    overflow-x: hidden !important;
  }

  body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-head {
    grid-template-columns: 40px minmax(0, 1fr) 40px !important;
    gap: 8px !important;
  }

  body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-head strong {
    min-width: 0;
    font-size: 18px !important;
    line-height: 1.2 !important;
    text-wrap: balance;
  }

  body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-weekdays,
  body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day {
    min-height: 46px !important;
    padding: 4px 2px !important;
  }

  body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] button.tmfc-calendar-day > span {
    font-size: 15px !important;
  }

  body.tmforms-final-page--interpretation .tmfc-form[data-tmfc-form="interpretation"] .tmfc-calendar-legend {
    gap: 8px 12px !important;
  }
}
