/* ==========================================================================
   EKILIBRUM — Page rendez-vous (css/rendez-vous.css)
   Complète css/style.css et css/contact.css (hero, champs, bulles d'erreur) :
   mêmes variables, bordures lumineuses, halo pulsé et boutons que le reste du site.
   ========================================================================== */
.rdv-section{ max-width: 1120px; margin: 0 auto clamp(48px, 9vh, 100px); }

.rdv-card{
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  padding: clamp(22px, 3.2vw, 38px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--card-bg);
  animation: pulseGlow 6s ease-in-out infinite;
}
.rdv-card.is-done{ grid-template-columns: minmax(0, 1fr); }

/* ---------- Calendrier ---------- */
.rdv-cal{ min-width: 0; }
.rdv-cal-head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.rdv-month{
  margin: 0; flex: 1; text-align: center;
  font-family: 'Rajdhani', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem); color: var(--white);
}
.rdv-nav{
  width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--cyan); background: transparent; border: 1px solid var(--cyan-soft); border-radius: 10px;
  transition: box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
}
.rdv-nav svg{ width: 20px; height: 20px; }
.rdv-nav:hover:not(:disabled){ border-color: var(--cyan); box-shadow: 0 0 16px rgba(46,230,224,0.35); }
.rdv-nav:disabled{ opacity: 0.3; cursor: not-allowed; }
.rdv-nav:focus-visible, .rdv-cell:focus-visible, .rdv-slot:focus-visible{ outline: 2px solid var(--white); outline-offset: 2px; }

.rdv-dow, .rdv-grid{ display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.rdv-dow{ margin-bottom: 8px; }
.rdv-dow span{
  text-align: center; font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.8rem; color: var(--muted);
}
.rdv-cell{
  aspect-ratio: 1 / 0.92; min-height: 52px; display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--white); cursor: pointer;
  background: rgba(46,230,224,0.04); border: 1px solid rgba(46,230,224,0.22); border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}
.rdv-cell.is-void{ background: transparent; border-color: transparent; cursor: default; }
.rdv-cell:hover:not(:disabled):not(.is-void){ border-color: var(--cyan); box-shadow: 0 0 16px rgba(46,230,224,0.3); transform: translateY(-1px); }
.rdv-cell.is-off{ color: var(--muted-2); background: transparent; border-color: rgba(46,230,224,0.08); cursor: not-allowed; opacity: 0.55; }
.rdv-cell.is-today{ border-color: var(--cyan-soft); }
.rdv-cell.is-selected{ color: #06090b; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 20px rgba(46,230,224,0.5); }

/* ---------- Créneaux + formulaire ---------- */
.rdv-side{ min-width: 0; display: flex; flex-direction: column; }
.rdv-side-title{
  margin: 0 0 16px 0; font-family: 'Rajdhani', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 1.15rem; color: var(--cyan); text-shadow: 0 0 14px rgba(46,230,224,0.45);
}
.rdv-side-empty{ margin: 0; padding: 36px 16px; text-align: center; color: var(--muted); font-size: 0.95rem; line-height: 1.55; border: 1px dashed rgba(46,230,224,0.25); border-radius: 12px; }
.rdv-slots{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding: 2px; }
.rdv-slot{
  height: 42px; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.9rem; color: var(--cyan); cursor: pointer;
  background: transparent; border: 1px solid var(--cyan-soft); border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.rdv-slot:hover:not(:disabled){ border-color: var(--cyan); box-shadow: 0 0 14px rgba(46,230,224,0.35); }
.rdv-slot.is-off{ color: var(--muted-2); border-color: rgba(46,230,224,0.1); cursor: not-allowed; text-decoration: line-through; opacity: 0.5; }
.rdv-slot.is-selected{ color: #06090b; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 18px rgba(46,230,224,0.5); }

.rdv-form{ margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--panel-border); }
.rdv-form[hidden]{ display: none; }
.rdv-recap{ margin: 0 0 16px 0; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--white); }
.rdv-submit{ width: 100%; justify-content: center; margin-top: 4px; }

/* ---------- Confirmation ---------- */
.rdv-done{ text-align: center; padding: clamp(24px, 5vw, 48px) 10px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rdv-done[hidden], .rdv-cal[hidden], .rdv-side[hidden]{ display: none; }
.rdv-done-ico{ width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--cyan); border: 1px solid var(--cyan-soft); box-shadow: 0 0 22px rgba(46,230,224,0.35); }
.rdv-done-ico svg{ width: 30px; height: 30px; }
.rdv-done-title{ margin: 0; font-family: 'Rajdhani', sans-serif; font-weight: 800; text-transform: uppercase; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--white); }
.rdv-done-when{ margin: 0 0 8px 0; color: var(--muted); font-size: 1.05rem; }
.rdv-done-note{ margin: 0 0 18px 0; color: var(--muted-2); font-size: 0.9rem; }
.rdv-done-note:empty{ display: none; }

/* ---------- Tablette / mobile ---------- */
@media (max-width: 980px){
  .rdv-card{ grid-template-columns: minmax(0, 1fr); }
  .rdv-slots{ grid-template-columns: repeat(5, minmax(0, 1fr)); max-height: none; }
}
/* Tablette uniquement : calendrier plus compact */
@media (min-width: 641px) and (max-width: 980px){
  .rdv-card{ width: 100%; max-width: 640px; margin: 0 auto; }
  .rdv-cal, .rdv-side{ width: 100%; max-width: 560px; margin: 0 auto; }
  .rdv-slots{ grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .rdv-slot{ height: 38px; font-size: 0.85rem; }
  .rdv-side-title{ font-size: 1.05rem; }
  .rdv-form .field input{ height: 44px; font-size: 0.95rem; }
  .rdv-dow, .rdv-grid{ gap: 6px; }
  .rdv-cell{ aspect-ratio: auto; height: 48px; min-height: 0; font-size: 0.95rem; border-radius: 10px; }
  .rdv-month{ font-size: 1.25rem; }
  .rdv-nav{ width: 40px; height: 40px; }
}
@media (max-width: 640px){
  .rdv-card{ padding: 18px 14px; }
  .rdv-dow, .rdv-grid{ gap: 5px; }
  .rdv-cell{ min-height: 44px; aspect-ratio: 1 / 1; font-size: 0.95rem; border-radius: 10px; }
  .rdv-slots{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rdv-slot{ height: 46px; font-size: 0.95rem; }
  .rdv-nav{ width: 42px; height: 42px; }
  .field input{ font-size: 16px; } /* évite le zoom automatique à la saisie (iOS) */
}
/* Très petit mobile (≤ 360 px) : cases du calendrier moins larges pour ne plus se toucher */
@media (max-width: 360px){
  .rdv-dow, .rdv-grid{ gap: 4px; }
  .rdv-cell{ aspect-ratio: auto; height: 40px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce){ .rdv-card{ animation: none; } }

/* Mention RGPD sous le formulaire */
.rdv-rgpd-note{ margin: 12px 0 0 0; color: var(--muted-2); font-size: 0.76rem; line-height: 1.5; text-align: center; }
.rdv-rgpd-note a{ color: var(--cyan); text-decoration: none; }
.rdv-rgpd-note a:hover{ text-shadow: 0 0 10px rgba(46,230,224,0.6); }
