/* ============================================================
   ARTS TEC — Système RDV — atec-rdv.css — Version 7 (Finale)
   Basé sur l'HTML 4-panels existant dans Divi
   ============================================================ */

/* ── Reset ── */
.atec-rdv * { box-sizing: border-box; }

/* ══════════════════════════════════════════
   STRUCTURE GÉNÉRALE
══════════════════════════════════════════ */
.atec-rdv {
  font-family: 'Lato', 'Segoe UI', Arial, sans-serif;
  max-width: 820px;
  margin: 0 auto;
  color: #333;
}

/* Panels — un seul visible à la fois */
.atec-rdv-panel {
  display: none;
}
.atec-rdv-panel.active {
  display: block;
}

/* Titres panels */
.atec-rdv-title {
  font-family: 'Exo', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 6px;
}
.atec-rdv-sub {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 24px;
}

/* ── Messages ── */
.atec-rdv-msg {
  margin-bottom: 16px;
}
.atec-rdv-msg-inner {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}
.atec-rdv-msg-inner.success {
  background: #e6f4ea;
  border: 1px solid #a8d5b5;
  color: #2e7d4f;
}
.atec-rdv-msg-inner.error {
  background: #fdecea;
  border: 1px solid #f5b7b1;
  color: #c0392b;
}
.atec-rdv-msg-inner.info {
  background: #e8f3f5;
  border: 1px solid #a8cdd3;
  color: #2c6e76;
}

/* ══════════════════════════════════════════
   PANEL 1 — TABLEAU TYPES RDV
══════════════════════════════════════════ */

/* Info tarif */
.atec-rdv-tarif-info {
  background: #f4f9fa;
  border-left: 3px solid #5F98A1;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}
.atec-rdv-tarif-info strong { color: #1a1a1a; }
.atec-rdv-tarif-info .free  { color: #5F98A1; font-weight: 700; }

/* Wrapper table */
.atec-rdv-table-wrap {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border: 1px solid #e8e8e8;
  margin-bottom: 32px;
}

/* Table */
.atec-rdv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  table-layout: fixed;
}
.atec-rdv-table thead tr {
  background: #5F98A1;
}
.atec-rdv-table thead th {
  font-family: 'Exo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  padding: 14px 18px;
  text-align: left;
}
.atec-rdv-table thead th:first-child { width: 200px; }
.atec-rdv-table td {
  padding: 14px 18px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
}
.atec-rdv-table tbody tr:last-child td { border-bottom: none; }
.atec-rdv-table tbody tr:hover { background: #f9f9f9; }

.atec-rdv-cat-label {
  font-family: 'Exo', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Boutons de choix durée */
.atec-rdv-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.atec-rdv-choice-btn {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  background: #fff;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  transition: all 0.2s;
  white-space: nowrap;
}
.atec-rdv-choice-btn:hover {
  border-color: #5F98A1;
  color: #5F98A1;
  background: #f4f9fa;
}
.atec-rdv-choice-btn.selected {
  border-color: #5F98A1;
  background: #5F98A1;
  color: #fff;
}
.atec-rdv-choice-btn.offert {
  border-color: #5F98A1;
  color: #5F98A1;
}
.atec-rdv-choice-btn.offert.selected {
  background: #5F98A1;
  color: #fff;
}
.atec-rdv-offert-tag {
  font-size: 11px;
  color: #5F98A1;
  font-weight: 700;
  margin-left: 4px;
}
.atec-rdv-choice-btn.selected .atec-rdv-offert-tag { color: #fff; }

/* ══════════════════════════════════════════
   PANEL 2 — CALENDRIER
══════════════════════════════════════════ */

.atec-rdv-cal-wrap {
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border: 1px solid #e8e8e8;
}

/* ── Header calendrier — fond vert FORCÉ ── */
#atec-rdv .atec-rdv-cal-header,
.atec-rdv .atec-rdv-cal-header,
.et_pb_section .atec-rdv-cal-header,
.et_pb_row .atec-rdv-cal-header,
.et_pb_column .atec-rdv-cal-header,
.et_pb_text .atec-rdv-cal-header,
.et_pb_text_inner .atec-rdv-cal-header,
div.atec-rdv-cal-header {
  background-color: #5F98A1 !important;
  background:       #5F98A1 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 20px !important;
}

/* Titre mois/année */
#atec-rdv .atec-rdv-cal-header h3,
.atec-rdv .atec-rdv-cal-header h3,
.et_pb_section .atec-rdv-cal-header h3,
.et_pb_row .atec-rdv-cal-header h3,
.et_pb_column .atec-rdv-cal-header h3,
.et_pb_text .atec-rdv-cal-header h3,
.et_pb_text_inner .atec-rdv-cal-header h3,
div.atec-rdv-cal-header h3 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: transparent !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
  font-family: 'Exo', sans-serif !important;
}

/* Boutons flèches nav */
#atec-rdv .atec-rdv-cal-nav,
.et_pb_text_inner .atec-rdv-cal-nav,
div.atec-rdv-cal-header .atec-rdv-cal-nav {
  background: transparent !important;
  border: 2px solid rgba(255,255,255,0.6) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  font-size: 1.2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  transition: background 0.2s !important;
  flex-shrink: 0 !important;
}
#atec-rdv .atec-rdv-cal-nav:hover,
div.atec-rdv-cal-header .atec-rdv-cal-nav:hover {
  background: rgba(255,255,255,0.25) !important;
}

/* Jours de la semaine */
.atec-rdv-cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #e8f3f5;
}
.atec-rdv-cal-day-name {
  text-align: center;
  padding: 8px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #5F98A1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Grille des jours */
.atec-rdv-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #fff;
}
.atec-rdv-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border: 1px solid #f0f0f0;
  cursor: default;
  transition: background 0.15s, color 0.15s;
  min-height: 42px;
}
.atec-rdv-cal-day.empty { background: #fafafa; }
.atec-rdv-cal-day.past  { color: #ccc; background: #fafafa; }
.atec-rdv-cal-day.unavailable { color: #ccc; }
.atec-rdv-cal-day.available {
  background: #e8f4f5;
  color: #2c6e76;
  font-weight: 700;
  cursor: pointer;
  border-color: #c5e0e4;
}
.atec-rdv-cal-day.available:hover {
  background: #5F98A1;
  color: #fff;
}
.atec-rdv-cal-day.selected {
  background: #5F98A1 !important;
  color: #fff !important;
  font-weight: 700;
}
.atec-rdv-cal-day.today {
  font-weight: 800;
  box-shadow: inset 0 0 0 2px #5F98A1;
}
.atec-rdv-cal-day.full {
  background: #fdecea;
  color: #c0392b;
  cursor: not-allowed;
}

/* Légende */
.atec-rdv-cal-legend {
  display: flex;
  gap: 20px;
  padding: 10px 16px;
  background: #fafafa;
  border-top: 1px solid #eee;
  font-size: 0.8rem;
  color: #666;
}
.atec-rdv-cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.atec-rdv-cal-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   PANEL 3 — FORMULAIRE
══════════════════════════════════════════ */

.atec-rdv-lieu-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.atec-rdv-lieu-btn {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  background: #fff;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  transition: all 0.2s;
}
.atec-rdv-lieu-btn:hover {
  border-color: #5F98A1;
  color: #5F98A1;
}
.atec-rdv-lieu-btn.selected {
  border-color: #5F98A1;
  background: #5F98A1;
  color: #fff;
}

.atec-rdv-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.atec-rdv-field { display: flex; flex-direction: column; gap: 5px; }
.atec-rdv-field.full { grid-column: 1 / -1; }
.atec-rdv-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #555;
}
.atec-rdv-field .req { color: #a32d2f; }
.atec-rdv-field input,
.atec-rdv-field textarea {
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  color: #333;
  background: #fff;
  font-family: 'Lato', sans-serif;
  transition: border-color 0.2s;
}
.atec-rdv-field input:focus,
.atec-rdv-field textarea:focus {
  border-color: #5F98A1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(95,152,161,0.15);
}
.atec-rdv-field textarea {
  resize: vertical;
  min-height: 90px;
}

/* ══════════════════════════════════════════
   PANEL 4 — RÉCAPITULATIF
══════════════════════════════════════════ */

.atec-rdv-recap-box {
  background: #f4f9fa;
  border: 1px solid #c5dfe3;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.atec-rdv-recap-box h3 {
  font-family: 'Exo', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 14px 0;
}
.atec-rdv-recap-row {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #e0ecee;
  font-size: 0.9rem;
}
.atec-rdv-recap-row:last-child { border-bottom: none; }
.atec-rdv-recap-row .rl {
  width: 90px;
  flex-shrink: 0;
  font-weight: 700;
  color: #5F98A1;
}
.atec-rdv-recap-row .rv { color: #333; }

/* ══════════════════════════════════════════
   BOUTONS NAVIGATION (Base)
══════════════════════════════════════════ */

.atec-rdv-btn-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}
.atec-rdv-btn {
  border-radius: 8px;
  padding: 12px 28px;
  font-family: 'Exo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Spinner bouton envoi */
.atec-rdv-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: atec-spin 0.7s linear infinite;
}
.atec-rdv-btn.loading .atec-rdv-btn-text { opacity: 0.7; }
.atec-rdv-btn.loading .atec-rdv-loader   { display: inline-block; }

@keyframes atec-spin {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════
   ÉTAPES (steps indicator)
══════════════════════════════════════════ */

.atec-rdv-steps {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d0dfe2;
}
.atec-rdv-step {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Exo', sans-serif;
  color: #999;
  background: #f5f5f5;
  border-right: 1px solid #d0dfe2;
  transition: all 0.2s;
}
.atec-rdv-step:last-child { border-right: none; }
.atec-rdv-step.active {
  background: #5F98A1;
  color: #fff;
}
.atec-rdv-step.done {
  background: #e8f3f5;
  color: #5F98A1;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

@media (max-width: 600px) {
  .atec-rdv-table thead th:first-child { width: 110px; }
  .atec-rdv-table td { padding: 10px; }
  .atec-rdv-choice-btn { padding: 8px 12px; font-size: 13px; }
  .atec-rdv-form-grid { grid-template-columns: 1fr; }
  .atec-rdv-field.full { grid-column: 1; }
  .atec-rdv-btn-row { flex-direction: column; }
  .atec-rdv-btn { width: 100%; justify-content: center; }
  .atec-rdv-cal-day { min-height: 36px; font-size: 0.8rem; }
  .atec-rdv-steps { display: none; }
}

/* ============================================================
   AJUSTEMENTS SUR MESURE (VOS DEMANDES) - CORRECTION
   ============================================================ */

/* 1. BOUTONS D'ACTION (Suivant / Confirmer) -> ROUGE */
body .atec-rdv button.atec-rdv-btn:not(.secondary):not(:disabled) {
    background-color: #a32d2f !important;
    border-color: #a32d2f !important;
    color: #ffffff !important;
    opacity: 1 !important;
}
body .atec-rdv button.atec-rdv-btn:not(.secondary):not(:disabled):hover {
    background-color: #8a2527 !important;
}

/* 2. BOUTONS EN ATTENTE / DÉSACTIVÉS -> GRIS CLAIR */
body .atec-rdv button.atec-rdv-btn:disabled {
    background-color: #f0f0f0 !important;
    border-color: #e0e0e0 !important;
    color: #a0a0a0 !important;
    cursor: not-allowed !important;
}

/* 3. BOUTONS SECONDAIRES (Retour / Modifier) -> BLANC */
body .atec-rdv button.atec-rdv-btn.secondary {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #333333 !important;
}
body .atec-rdv button.atec-rdv-btn.secondary:hover {
    background-color: #f9f9f9 !important;
}

/* 4. BOUTONS HORAIRES : fond blanc et bordure verte */
.atec-rdv-slot-btn {
    background-color: #ffffff !important;
    border: 2px solid #5F98A1 !important;
    color: #5F98A1 !important;
}
.atec-rdv-slot-btn:hover, 
.atec-rdv-slot-btn.selected {
    background-color: #5F98A1 !important;
    color: #ffffff !important;
}
.atec-rdv-slot-btn.taken {
    border-color: #e0a0a0 !important;
    background: #fdecea !important;
    color: #c0392b !important;
}

/* 5. CHAMPS DU FORMULAIRE */
.atec-rdv-panel input[type="text"],
.atec-rdv-panel input[type="email"],
.atec-rdv-panel input[type="tel"],
.atec-rdv-panel textarea {
    padding: 16px 20px !important;
    font-size: 1rem !important;
}

/* 6. CARTE DE VALIDATION FINALE (Succès) */
#atec-rdv-success, 
.atec-rdv-msg-inner.success {
    background-color: #ffffff !important;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
    padding: 40px 20px !important;
    text-align: center;
}

/* Tuer la ligne fine (hr ou bordure résiduelle) */
.atec-rdv-panel hr {
    display: none !important;
}

/* Masquer la coche verte */
#atec-rdv-success .atec-rdv-success-icon,
#atec-rdv-success svg,
.atec-rdv-msg-inner.success .atec-rdv-success-icon {
    display: none !important; 
}

/* Agrandir le titre de confirmation (Style H1/H2) */
#atec-rdv-success h3,
#atec-rdv-success strong,
.atec-rdv-msg-inner.success strong {
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    color: #333333 !important;
    display: block !important;
    margin-bottom: 25px !important;
    line-height: 1.2 !important;
}
