/* ========================================================
   THERAFORM — WIDGET RDV — v2
   Direction : "carnet de bien-être" — ruban vert foncé,
   typographie serif chaleureuse, sceau de confirmation.
   Charte couleur officielle 08/2026.
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:ital,wght@0,600;0,700;1,500;1,600&family=IBM+Plex+Mono:wght@500;600&display=swap');

#theraform-widget-rdv {
  /* --- Couleurs (charte officielle) --- */
  --tf-vert-profond: #1C4723;
  --tf-vert-profond-2: #123018;
  --tf-vert-sauge: #7A9C43;
  --tf-vert-sauge-clair: #A5C2A6;
  --tf-beige-sable: #F0EDE3;
  --tf-creme-vanille: #FFF9F2;
  --tf-or-vieilli: #C1A264;
  --tf-orange-marron: #B57D1F;
  --tf-orange-or: #E19314;
  --tf-bleu-gris: #3E4850;
  --tf-blanc-casse: #F7F7F5;

  /* --- Typographie --- */
  --tf-font-display: 'Fraunces', serif;
  --tf-font-body: 'Inter', sans-serif;
  --tf-font-mono: 'IBM Plex Mono', monospace;

  max-width: 540px;
  margin: 30px auto;
  position: relative;
  background: var(--tf-creme-vanille);
  border-radius: 24px;
  padding: 30px 30px 34px;
  color: var(--tf-bleu-gris);
  font-family: var(--tf-font-body);
  box-shadow: 0 24px 60px -24px rgba(28, 71, 35, 0.3), 0 2px 8px rgba(28, 71, 35, 0.06);
  border: 1px solid var(--tf-beige-sable);
  overflow: hidden;
  isolation: isolate;
}

#theraform-widget-rdv * {
  box-sizing: border-box;
}

/* Grain de papier très discret — texture, pas de couleur */
#theraform-widget-rdv::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

#theraform-widget-rdv > * {
  position: relative;
  z-index: 1;
}

/* ========================================================
   RUBAN — indicateur d'étapes (signature du widget)
   Fil doré + perles numérotées sur fond vert profond
   ======================================================== */

.tf-steps-indicator {
  counter-reset: tf-step;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 0 26px;
  padding: 20px 22px;
  background: linear-gradient(150deg, var(--tf-vert-profond), var(--tf-vert-profond-2));
  border-radius: 18px;
  box-shadow: 0 12px 26px -10px rgba(18, 48, 24, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tf-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(247, 247, 245, 0.35);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tf-font-mono);
  font-size: 11px;
  font-weight: 600;
  color: rgba(247, 247, 245, 0.7);
  transition: all 0.35s ease;
  flex-shrink: 0;
}

.tf-step-dot::before {
  counter-increment: tf-step;
  content: counter(tf-step);
}

.tf-step-dot.tf-active {
  background: var(--tf-or-vieilli);
  border-color: var(--tf-or-vieilli);
  color: var(--tf-vert-profond-2);
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(193, 162, 100, 0.22);
}

.tf-step-dot.tf-active::before {
  display: none;
}

.tf-step-dot.tf-active::after {
  content: "✓";
  font-family: var(--tf-font-body);
  font-size: 13px;
  font-weight: 700;
}

.tf-step-line {
  flex: 1;
  height: 1px;
  background: rgba(247, 247, 245, 0.22);
  margin: 0 8px;
  min-width: 18px;
  transition: background 0.4s ease;
}

.tf-step-line.tf-active {
  background: var(--tf-or-vieilli);
  height: 1.5px;
}

/* ========================================================
   TITRES DE SECTION
   ======================================================== */

.tf-creneaux-title {
  font-family: var(--tf-font-display);
  font-style: italic;
  font-size: 19px;
  font-weight: 600;
  color: var(--tf-vert-profond);
  margin: 0 0 16px;
}

/* ========================================================
   THÉRAPEUTES — rangée horizontale
   ======================================================== */

.tf-therapeute-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

.tf-therapeute-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 138px;
  padding: 18px 12px 16px;
  border-radius: 18px;
  border: 1.5px solid var(--tf-beige-sable);
  background: var(--tf-blanc-casse);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--tf-font-body);
  text-align: center;
}

.tf-therapeute-card:hover {
  border-color: var(--tf-or-vieilli);
  background: var(--tf-creme-vanille);
  transform: translateY(-4px);
  box-shadow: 0 14px 26px -12px rgba(193, 162, 100, 0.45);
}

.tf-therapeute-card:focus-visible {
  outline: 2px solid var(--tf-vert-sauge);
  outline-offset: 2px;
}

.tf-therapeute-card:active {
  transform: translateY(-1px) scale(0.98);
}

.tf-therapeute-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--tf-or-vieilli);
  padding: 2px;
  flex-shrink: 0;
}

.tf-therapeute-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--tf-beige-sable);
  border: 2.5px solid var(--tf-or-vieilli);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.tf-therapeute-name {
  font-family: var(--tf-font-display);
  font-weight: 600;
  color: var(--tf-vert-profond);
  font-size: 15px;
  line-height: 1.3;
}

/* ========================================================
   CALENDRIER
   ======================================================== */

.tf-selected-therapist {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 12px 18px;
  background: var(--tf-blanc-casse);
  border-radius: 14px;
  border: 1px solid var(--tf-beige-sable);
}

.tf-selected-therapist span {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tf-bleu-gris);
  opacity: 0.6;
  font-weight: 600;
}

.tf-selected-therapist strong {
  color: var(--tf-vert-profond);
  font-family: var(--tf-font-display);
  font-style: italic;
  font-size: 16px;
  font-weight: 600;
}

#tf-change-therapist {
  background: transparent;
  border: 1.5px solid var(--tf-vert-profond);
  color: var(--tf-vert-profond);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--tf-font-body);
  margin-left: auto;
}

#tf-change-therapist:hover {
  background: var(--tf-vert-profond);
  color: white;
}

#tf-change-therapist:focus-visible,
#tf-prev:focus-visible,
#tf-next:focus-visible {
  outline: 2px solid var(--tf-or-vieilli);
  outline-offset: 2px;
}

.tf-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 0 2px;
}

.tf-calendar-header span {
  font-family: var(--tf-font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  color: var(--tf-vert-profond);
}

.tf-calendar-header button {
  background: var(--tf-blanc-casse);
  border: 1px solid var(--tf-beige-sable);
  font-size: 16px;
  cursor: pointer;
  color: var(--tf-vert-profond);
  padding: 6px 14px;
  border-radius: 10px;
  transition: all 0.2s ease;
  font-weight: 600;
  font-family: var(--tf-font-body);
}

.tf-calendar-header button:hover {
  background: var(--tf-vert-profond);
  color: white;
  border-color: var(--tf-vert-profond);
}

.tf-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.tf-calendar-daylabel {
  font-family: var(--tf-font-mono);
  font-size: 10.5px;
  color: var(--tf-bleu-gris);
  opacity: 0.55;
  padding-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tf-calendar-day {
  padding: 10px 0;
  border-radius: 10px;
  cursor: pointer;
  background: var(--tf-blanc-casse);
  font-weight: 500;
  font-size: 14px;
  font-family: var(--tf-font-body);
  transition: all 0.2s ease;
}

.tf-calendar-day:not(.tf-past):not(.tf-empty):hover {
  background: var(--tf-vert-sauge-clair);
  color: var(--tf-vert-profond);
  transform: scale(1.06);
}

.tf-calendar-day:focus-visible {
  outline: 2px solid var(--tf-vert-sauge);
  outline-offset: 1px;
}

.tf-calendar-day.tf-selected {
  background: var(--tf-vert-profond);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 0 3px var(--tf-or-vieilli), 0 4px 12px rgba(28, 71, 35, 0.3);
}

.tf-calendar-day.tf-empty {
  visibility: hidden;
  pointer-events: none;
}

.tf-calendar-day.tf-past {
  background: transparent;
  color: #c7c7c1;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ========================================================
   CRÉNEAUX
   ======================================================== */

.tf-creneaux-section {
  margin-top: 26px;
  border-top: 1px solid var(--tf-beige-sable);
  padding-top: 22px;
}

.tf-creneaux-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tf-creneau {
  padding: 11px 0;
  border-radius: 30px;
  border: 1.5px solid var(--tf-beige-sable);
  background: var(--tf-blanc-casse);
  cursor: pointer;
  color: var(--tf-bleu-gris);
  font-weight: 600;
  font-size: 13.5px;
  font-family: var(--tf-font-mono);
  transition: all 0.2s ease;
}

.tf-creneau:not(.tf-reserved):not([disabled]):hover {
  background: var(--tf-vert-sauge);
  color: white;
  border-color: var(--tf-vert-sauge);
  transform: scale(1.04);
}

.tf-creneau:focus-visible {
  outline: 2px solid var(--tf-vert-sauge);
  outline-offset: 2px;
}

.tf-creneau.tf-selected {
  background: linear-gradient(to right, var(--tf-vert-sauge), var(--tf-vert-profond));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(28, 71, 35, 0.3);
}

.tf-creneau.tf-reserved,
.tf-creneau[disabled] {
  background: repeating-linear-gradient(45deg, #ececea, #ececea 6px, #f3f3f1 6px, #f3f3f1 12px) !important;
  color: #b3b3ac !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.7 !important;
  border-color: #e2e2dd !important;
}

.tf-no-creneau {
  text-align: center;
  color: var(--tf-bleu-gris);
  opacity: 0.6;
  font-size: 14px;
  padding: 18px 0;
  font-family: var(--tf-font-body);
}

/* ========================================================
   BOUTON SUIVANT — dégradé + reflet au survol
   ======================================================== */

.tf-btn-suivant {
  position: relative;
  overflow: hidden;
  margin-top: 26px;
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(to right, var(--tf-vert-sauge), var(--tf-vert-profond));
  color: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.05em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-family: var(--tf-font-body);
  text-transform: uppercase;
}

.tf-btn-suivant::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.tf-btn-suivant:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(28, 71, 35, 0.28);
}

.tf-btn-suivant:hover::after {
  left: 130%;
}

.tf-btn-suivant:focus-visible {
  outline: 2px solid var(--tf-or-vieilli);
  outline-offset: 3px;
}

.tf-btn-suivant:active {
  transform: scale(0.98);
}

.tf-btn-suivant:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ========================================================
   RÉCAPITULATIF & FORMULAIRE
   ======================================================== */

.tf-recap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--tf-beige-sable);
}

.tf-btn-retour {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--tf-vert-profond);
  cursor: pointer;
  font-size: 12.5px;
  padding: 6px 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  font-family: var(--tf-font-body);
  border-radius: 8px;
}

.tf-btn-retour:hover {
  background: var(--tf-beige-sable);
  color: var(--tf-orange-marron);
}

.tf-btn-retour:focus-visible {
  outline: 2px solid var(--tf-vert-sauge);
}

.tf-recap-text {
  font-size: 15px;
  color: var(--tf-bleu-gris);
  line-height: 1.6;
  background: var(--tf-blanc-casse);
  border-radius: 12px;
  padding: 14px 16px;
}

.tf-recap-text strong {
  color: var(--tf-vert-profond);
  font-family: var(--tf-font-display);
  font-style: italic;
  font-weight: 600;
}

.tf-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tf-form input[type="text"],
.tf-form input[type="email"],
.tf-form input[type="tel"] {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--tf-beige-sable);
  font-family: var(--tf-font-body);
  background: var(--tf-blanc-casse);
  font-size: 14px;
  transition: all 0.2s ease;
  color: var(--tf-bleu-gris);
}

.tf-form input:focus {
  outline: none;
  border-color: var(--tf-vert-sauge);
  background: var(--tf-creme-vanille);
  box-shadow: 0 0 0 3px rgba(122, 156, 67, 0.15);
}

.tf-form input::placeholder {
  color: #b0b0a8;
}

.tf-cgu {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.5;
    cursor: pointer;
    padding: 8px 0;
}

.tf-cgu input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #3498db;
}

.tf-cgu a {
    color: #3498db;
    text-decoration: underline;
}
/* ========================================================
   CONFIRMATION — sceau
   ======================================================== */

.tf-confirmation {
  position: relative;
  text-align: center;
  padding: 96px 10px 4px;
}

.tf-confirmation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2f6238, var(--tf-vert-profond) 70%);
  box-shadow: 0 0 0 4px var(--tf-creme-vanille), 0 0 0 6px var(--tf-or-vieilli), 0 14px 28px rgba(28, 71, 35, 0.35);
}

.tf-confirmation::after {
  content: "✓";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tf-creme-vanille);
  font-size: 28px;
  font-weight: 700;
  font-family: var(--tf-font-body);
}

.tf-confirmation-title {
  font-family: var(--tf-font-display);
  font-style: italic;
  font-size: 24px;
  font-weight: 600;
  color: var(--tf-vert-profond);
  margin-bottom: 14px;
}

.tf-confirmation p {
  font-size: 15.5px;
  color: var(--tf-bleu-gris);
  line-height: 1.7;
  font-family: var(--tf-font-body);
}

.tf-confirmation strong {
  color: var(--tf-vert-profond);
  font-family: var(--tf-font-display);
  font-style: italic;
  font-weight: 600;
}

/* ========================================================
   ÉTATS
   ======================================================== */

.tf-loading {
  text-align: center;
  padding: 34px 20px;
  color: var(--tf-bleu-gris);
  font-size: 14.5px;
  font-family: var(--tf-font-body);
  opacity: 0.7;
}

.tf-error {
  color: #a13a2e;
  font-size: 13.5px;
  padding: 12px 16px;
  background: #fbeee9;
  border-radius: 12px;
  border-left: 3px solid #a13a2e;
  font-family: var(--tf-font-body);
}

#tf-form-error {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  #theraform-widget-rdv * {
    transition: none !important;
    animation: none !important;
  }
  .tf-btn-suivant::after {
    display: none;
  }
}

/* ========================================================
   RESPONSIVE
   ======================================================== */

@media (max-width: 480px) {
  #theraform-widget-rdv {
    padding: 22px 18px 26px;
    margin: 16px 10px;
    border-radius: 20px;
  }

  .tf-steps-indicator {
    padding: 16px 14px;
  }

  .tf-calendar-day {
    padding: 8px 0;
    font-size: 13px;
  }

  .tf-creneaux-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .tf-step-dot {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .tf-therapeute-card {
    width: 108px;
    padding: 14px 8px 12px;
  }

  .tf-therapeute-card img,
  .tf-therapeute-placeholder {
    width: 52px;
    height: 52px;
  }

  .tf-selected-therapist {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #tf-change-therapist {
    margin-left: 0;
    align-self: flex-start;
  }

  .tf-confirmation-title {
    font-size: 21px;
  }
}

@media (max-width: 360px) {
  #theraform-widget-rdv {
    padding: 18px 14px 22px;
  }

  .tf-therapeute-card {
    width: 94px;
  }

  .tf-calendar-grid {
    gap: 2px;
  }

  .tf-calendar-day {
    padding: 6px 0;
    font-size: 12px;
  }

  .tf-creneaux-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .tf-creneau {
    padding: 9px 0;
    font-size: 12px;
  }
}