/* ===================================================
   Style principal — Location Salle de Formation Angers
   =================================================== */

:root {
  --primary:        #1e3a5f;
  --primary-light:  #2c5282;
  --primary-dark:   #152a45;
  --accent:         #c9923a;
  --accent-light:   #e5ab5c;
  --accent-dark:    #a8742e;
  --bg:             #f4f6fb;
  --surface:        #ffffff;
  --border:         #dce3f0;
  --text:           #2d3748;
  --text-muted:     #718096;
  --text-light:     #a0aec0;
  --success:        #38a169;
  --success-bg:     #f0fff4;
  --warning:        #d69e2e;
  --warning-bg:     #fffff0;
  --error:          #e53e3e;
  --error-bg:       #fff5f5;

  --slot-avail-bg:   #eef4ff;
  --slot-avail-bdr:  #93b4dc;
  --slot-avail-txt:  #1e3a5f;
  --slot-sel-bg:     #1e3a5f;
  --slot-sel-txt:    #ffffff;
  --slot-unavail-bg: #f0f0f2;
  --slot-unavail-txt:#aaa;

  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 2px 12px rgba(30,58,95,.1);
  --shadow-lg: 0 8px 30px rgba(30,58,95,.15);
  --trans:     .18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* ── Header ──────────────────────────────────────── */
.site-header {
  background: var(--primary);
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  color: #fff; font-weight: 700; font-size: 17px; line-height: 1.2;
}
.logo-icon {
  width: 42px; height: 42px; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.header-contact { color: rgba(255,255,255,.8); font-size: 13px; text-align: right; }
.header-contact a { color: var(--accent-light); }

/* ── Hero ────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white; text-align: center; padding: 48px 20px 36px;
}
.hero h1 { font-size: clamp(22px, 3.5vw, 36px); font-weight: 700; margin-bottom: 10px; }
.hero p  { font-size: 16px; opacity: .85; max-width: 580px; margin: 0 auto 24px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero-badge {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px; padding: 5px 14px; font-size: 13px;
}

/* ── Bande tarifs ────────────────────────────────── */
.pricing-bar {
  background: var(--accent); color: white;
  text-align: center; padding: 12px 20px;
  font-size: 15px; font-weight: 600;
}
.pricing-bar span { opacity: .8; font-weight: 400; margin: 0 8px; }

/* ── Conteneur principal ─────────────────────────── */
.main-container { max-width: 1400px; margin: 0 auto; padding: 28px 16px 60px; }

/* ── Steps indicator ─────────────────────────────── */
.steps-indicator {
  display: flex; justify-content: center; align-items: center;
  gap: 0; margin-bottom: 24px;
}
.step-item {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; transition: var(--trans);
}
.step-item.active .step-num  { background: var(--primary); color: white; }
.step-item.active            { color: var(--primary); font-weight: 600; }
.step-item.completed .step-num { background: var(--success); color: white; }
.step-line { width: 60px; height: 2px; background: var(--border); margin: 0 4px; }
.step-line.done { background: var(--success); }

/* ── Card ────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px;
}
.card-header {
  background: var(--primary); color: white;
  padding: 16px 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
  font-weight: 600; font-size: 16px;
}
.card-header .icon { font-size: 18px; }
.card-body { padding: 20px; }

/* ══════════════════════════════════════════════════
   CALENDRIER PLEINE LARGEUR
══════════════════════════════════════════════════ */

/* Barre de navigation mois */
.cal-nav-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.cal-nav-bar #calMonthTitle {
  font-size: 20px; font-weight: 700; color: var(--primary);
  min-width: 220px; text-align: center; text-transform: capitalize;
}
.btn-nav {
  background: var(--primary); color: white; border: none;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  font-size: 20px; display: flex; align-items: center; justify-content: center;
  transition: var(--trans); flex-shrink: 0; line-height: 1;
  box-shadow: 0 2px 6px rgba(30,58,95,.2);
}
.btn-nav:hover    { background: var(--primary-light); transform: scale(1.08); }
/* Mois précédent désactivé : même apparence, juste légèrement transparent */
.btn-nav:disabled { opacity: .35; cursor: default; transform: none; }

/* Grille pleine largeur : 7 colonnes égales */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 100%;
}

/* En-têtes des jours */
.cal-day-header {
  text-align: center; font-size: 12px; font-weight: 700;
  color: white; background: var(--primary-light);
  padding: 8px 4px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .06em;
}
.cal-day-header.weekend { background: var(--primary-dark); }

/* Cellule d'un jour */
.cal-day {
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); min-height: 120px;
  display: flex; flex-direction: column;
  overflow: hidden; transition: border-color var(--trans);
}
.cal-day:hover:not(.empty):not(.past):not(.too-soon) { border-color: var(--primary-light); }
.cal-day.empty    { background: transparent; border-color: transparent; min-height: 120px; }
.cal-day.past     { background: #fafafa; border-color: #eee; }
.cal-day.too-soon { background: #fafafa; border-color: #eee; }
.cal-day.has-selected { border-color: var(--primary); border-width: 2px; }

/* Numéro du jour */
.day-num {
  font-size: 13px; font-weight: 700; color: var(--text);
  padding: 6px 8px 4px; line-height: 1;
}
.cal-day.past .day-num,
.cal-day.too-soon .day-num { color: #ccc; }
.cal-day.today .day-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; background: var(--accent); color: white;
  border-radius: 50%; font-size: 12px; margin: 5px 7px 3px;
}
.day-num-wrap { padding: 0; }
.cal-day.today .day-num-wrap { display: flex; }

/* Conteneur des créneaux */
.slots {
  display: flex; flex-direction: column; gap: 3px;
  padding: 0 5px 6px; flex: 1;
}

/* Bouton créneau */
.slot-btn {
  display: flex; align-items: center; gap: 4px;
  width: 100%; border-radius: 4px; padding: 5px 6px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all var(--trans); text-align: left; border: 1px solid;
  line-height: 1.2;
}
.slot-btn .slot-icon { font-size: 12px; flex-shrink: 0; }
.slot-btn .slot-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* État : disponible */
.slot-btn.available {
  background: var(--slot-avail-bg); border-color: var(--slot-avail-bdr);
  color: var(--slot-avail-txt);
}
.slot-btn.available:hover {
  background: var(--primary-light); border-color: var(--primary-light);
  color: white; transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(30,58,95,.2);
}

/* État : sélectionné */
.slot-btn.selected {
  background: var(--slot-sel-bg); border-color: var(--primary-dark);
  color: var(--slot-sel-txt); box-shadow: 0 2px 8px rgba(30,58,95,.3);
}
.slot-btn.selected:hover { background: var(--primary-dark); }

/* État : indisponible */
.slot-btn.unavailable {
  background: var(--slot-unavail-bg); border-color: #ddd;
  color: var(--slot-unavail-txt); cursor: not-allowed;
  font-size: 10px;
}
.slot-btn:disabled { cursor: not-allowed; }

/* ── Légende ──────────────────────────────────────── */
.cal-legend {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 14px; font-size: 12px; color: var(--text-muted);
  padding: 0 4px;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 14px; height: 14px; border-radius: 3px; }
.legend-dot.available  { background: var(--slot-avail-bg); border: 1px solid var(--slot-avail-bdr); }
.legend-dot.selected   { background: var(--slot-sel-bg); }
.legend-dot.unavailable{ background: var(--slot-unavail-bg); border: 1px solid #ddd; }

/* ── Message trop tôt ─────────────────────────────── */
.too-soon-msg {
  display: none; background: #fff8e1;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 14px; color: #7d5a1e;
  margin-top: 14px;
}

/* ── Chargement calendrier ────────────────────────── */
.cal-loading {
  grid-column: 1 / -1; text-align: center;
  padding: 60px 20px; color: var(--text-muted);
}

/* ── Barre de résumé (sous le calendrier) ─────────── */
.summary-bar {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.summary-bar-slots { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.summary-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: white;
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.summary-tag .remove-tag {
  background: none; border: none; color: rgba(255,255,255,.7);
  cursor: pointer; padding: 0; font-size: 14px; line-height: 1;
  display: flex; align-items: center;
}
.summary-tag .remove-tag:hover { color: white; }
.summary-empty-msg { color: var(--text-muted); font-size: 14px; font-style: italic; }

.summary-price-zone {
  display: flex; align-items: center; gap: 16px; flex-shrink: 0;
}
.summary-total {
  text-align: right;
}
.summary-total .ht  { font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1; }
.summary-total .ttc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.summary-total .discount { font-size: 12px; color: var(--success); }

/* ── Horaires info ───────────────────────────────── */
.horaires-bar {
  background: var(--primary); color: rgba(255,255,255,.85);
  border-radius: var(--radius-sm); padding: 10px 20px;
  display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px;
  margin-bottom: 16px;
}
.horaires-bar span { display: flex; align-items: center; gap: 6px; }

/* ── Boutons ─────────────────────────────────────── */
.btn-primary {
  background: var(--accent); color: white; border: none;
  border-radius: var(--radius-sm); padding: 12px 28px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: var(--trans); white-space: nowrap;
}
.btn-primary:hover   { background: var(--accent-dark); }
.btn-primary:disabled { background: var(--text-light); cursor: default; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  background: #edf2f7; color: var(--text); border: none;
  border-radius: var(--radius-sm); padding: 10px 20px;
  font-size: 14px; cursor: pointer; transition: var(--trans);
}
.btn-secondary:hover { background: #cbd5e0; }

/* ── Formulaire étape 2 ──────────────────────────── */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 600; color: var(--text); }
label .required { color: var(--error); margin-left: 2px; }
label .optional  { color: var(--text-muted); font-weight: 400; font-size: 12px; margin-left: 4px; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  color: var(--text); background: white; transition: border-color var(--trans); outline: none;
}
input:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,95,.1);
}
input.error, textarea.error { border-color: var(--error); }
.field-error { color: var(--error); font-size: 12px; }
textarea { resize: vertical; min-height: 90px; }

/* ── Code promo ──────────────────────────────────── */
.promo-row { display: flex; gap: 10px; align-items: flex-start; }
.promo-row input { flex: 1; text-transform: uppercase; }
.btn-apply {
  background: var(--primary); color: white; border: none;
  border-radius: var(--radius-sm); padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: var(--trans);
}
.btn-apply:hover { background: var(--primary-light); }
.promo-result { font-size: 13px; margin-top: 6px; padding: 8px 12px; border-radius: var(--radius-sm); }
.promo-result.ok  { background: var(--success-bg); color: var(--success); }
.promo-result.err { background: var(--error-bg); color: var(--error); }

/* ── Récapitulatif ───────────────────────────────── */
.recap-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px;
}
.recap-box h4 { color: var(--primary); font-size: 14px; margin-bottom: 10px; }
.recap-slot-row {
  display: flex; justify-content: space-between;
  padding: 5px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.recap-slot-row:last-child { border-bottom: none; }
.recap-total {
  display: flex; justify-content: space-between;
  font-weight: 700; font-size: 16px; color: var(--primary);
  margin-top: 10px; padding-top: 10px; border-top: 2px solid var(--primary);
}

/* ── Alertes ─────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.alert-warning { background: var(--warning-bg); border-left: 4px solid var(--warning); color: #744210; }
.alert-info    { background: #ebf8ff; border-left: 4px solid #4299e1; color: #2c5282; }

/* ── Confirmation ────────────────────────────────── */
.confirm-box { max-width: 620px; margin: 0 auto; text-align: center; padding: 40px 24px; }
.confirm-icon { font-size: 60px; margin-bottom: 20px; }
.confirm-box h2 { color: var(--primary); font-size: 26px; margin-bottom: 16px; }
.confirm-ref {
  display: inline-block; background: var(--primary); color: white;
  padding: 8px 20px; border-radius: 20px; font-weight: 700; font-size: 15px; margin: 12px 0;
}
.confirm-details {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin: 20px 0; text-align: left;
}

/* ── Spinner ─────────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: white;
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.booking-step { animation: fadeIn .3s ease; }

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark); color: rgba(255,255,255,.7);
  text-align: center; padding: 28px 20px; font-size: 13px;
}
.site-footer a { color: var(--accent-light); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .cal-day { min-height: 100px; }
  .slot-btn { font-size: 10px; padding: 4px 5px; }
  .slot-btn .slot-icon { display: none; }
}
@media (max-width: 640px) {
  .header-contact { display: none; }
  .cal-day { min-height: 80px; }
  .slot-btn { font-size: 9px; padding: 3px 4px; }
  .day-num { font-size: 11px; padding: 4px 5px 2px; }
  .summary-bar { flex-direction: column; align-items: stretch; }
  .summary-price-zone { justify-content: space-between; }
  .horaires-bar { gap: 12px; font-size: 12px; }
}
@media (max-width: 480px) {
  .cal-day-header { font-size: 10px; padding: 6px 2px; }
  .slot-btn .slot-name { display: none; }
  .slot-btn .slot-icon { display: block; font-size: 14px; }
  .slot-btn { justify-content: center; }
}
