/* ============================================================
   CABOT SERVICES — Feuille de styles principale
   Version finale — Avril 2026
   ============================================================ */

/* --- RESET & BASE --- */
*, *::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: #f5f7fa;
  color: #1a1a2e;
  min-height: 100vh;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- VARIABLES --- */
:root {
  --primary: #1a3a6b;
  --primary-light: #2a5298;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --ge-color: #1d4ed8;
  --hors-ge-color: #7c3aed;
  --europe-color: #0891b2;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --bg-card: #ffffff;
  --shadow: 0 2px 16px rgba(26,58,107,0.10);
  --radius: 12px;
}

/* --- BANNIÈRE EUROPE --- */
.banner-europe {
  background: linear-gradient(135deg, #0891b2, #1a3a6b);
  color: white;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.banner-europe a { color: #fde68a; }

/* --- HEADER --- */
header {
  background: linear-gradient(135deg, #1a3a6b 0%, #2a5298 100%);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-logo { height: 56px; width: auto; object-fit: contain; filter: brightness(1.05); }
.header-text h1 { font-size: 1.4rem; font-weight: 700; }
.header-text .subtitle { font-size: 0.85rem; opacity: 0.85; margin-top: 2px; }
.header-right { margin-left: auto; font-size: 0.82rem; opacity: 0.8; text-align: right; }
.header-right a { color: #fde68a; }

/* --- MAIN LAYOUT --- */
main { max-width: 780px; margin: 32px auto; padding: 0 16px 60px; }
.admin-main { max-width: 1100px; }

/* --- STEPPER --- */
.stepper {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}
.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.step-indicator::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step-indicator:last-child::before { display: none; }
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  position: relative; z-index: 1;
  border: 2px solid var(--border);
  transition: all 0.3s;
}
.step-indicator.active .step-dot { background: var(--primary); color: white; border-color: var(--primary); }
.step-indicator.done .step-dot { background: var(--success); color: white; border-color: var(--success); }
.step-label { font-size: 0.75rem; margin-top: 6px; color: var(--text-light); text-align: center; }
.step-indicator.active .step-label { color: var(--primary); font-weight: 600; }

/* --- CARTE / SECTION --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}
.card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; color: var(--primary); }
.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 14px; color: var(--primary); }

/* --- ÉTAPES --- */
.etape-content { display: none; }
.etape-content.active { display: block; }

/* --- FORMULAIRE --- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.93rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="time"], textarea, select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: white;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,82,152,0.1);
}

/* Autocomplétion */
.autocomplete-wrapper { position: relative; }
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: white;
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  display: none;
}
.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}
.suggestion-item:hover { background: #f0f4ff; }
.suggestion-empty, .suggestion-error { color: var(--text-light); cursor: default; }

/* Badges adresse */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 6px;
}
.badge-ge { background: #dbeafe; color: var(--ge-color); }
.badge-hors-ge { background: #ede9fe; color: var(--hors-ge-color); }
.badge-europe { background: #cffafe; color: var(--europe-color); }

/* --- TYPE DE TRAJET --- */
.trajet-options { display: flex; gap: 12px; }
.trajet-option {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.trajet-option input[type="radio"] { display: none; }
.trajet-option:has(input:checked) {
  border-color: var(--primary);
  background: #e8f0fe;
  color: var(--primary);
}
.trajet-option:hover { border-color: var(--primary-light); }

/* --- BLOC RETOUR --- */
#bloc-retour {
  display: none;
  background: #f0f4ff;
  border: 1.5px solid #c7d7fb;
  border-radius: 10px;
  padding: 16px;
  margin-top: 10px;
}

/* --- DISTANCE --- */
#bloc-distance {
  display: none;
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
}
.distance-loading { color: var(--text-light); }
.distance-ge { background: #dbeafe; color: var(--ge-color); border-radius: 8px; padding: 10px 14px; }
.distance-hors-ge { background: #ede9fe; color: var(--hors-ge-color); border-radius: 8px; padding: 10px 14px; }
.distance-hors-ge .distance-km { font-size: 1.1rem; font-weight: 700; }
.distance-europe { background: #cffafe; color: var(--europe-color); border-radius: 8px; padding: 10px 14px; }

/* --- ANIMAUX --- */
.animal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.animal-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}
.animal-card:hover { border-color: var(--primary-light); background: #f0f4ff; }
.animal-card.selected { border-color: var(--primary); background: #e8f0fe; }
.animal-icon { font-size: 2.5rem; margin-bottom: 8px; }
.animal-name { font-weight: 700; font-size: 0.95rem; color: var(--primary); }

/* --- TARIF --- */
#bloc-tarif {
  display: none;
  margin: 14px 0;
}
.tarif-total {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 12px;
  padding: 20px 24px;
  text-align: center;
  margin-bottom: 12px;
}
.tarif-amount { font-size: 2.2rem; font-weight: 800; }
.tarif-label { font-size: 0.9rem; opacity: 0.85; margin-top: 4px; }
.tarif-detail {
  background: #f8f9ff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.9rem;
}
.tarif-ligne { padding: 3px 0; color: #374151; }
.tarif-annulation { margin-top: 10px; padding: 8px 12px; background: #fff7ed; border-radius: 8px; color: #92400e; font-size: 0.85rem; border-left: 3px solid #f59e0b; }
.tarif-devis { background: #cffafe; border-radius: 10px; padding: 16px 20px; color: var(--europe-color); }
.tarif-devis a { color: var(--europe-color); font-weight: 600; }

/* --- RECAP --- */
.recap-section { margin-bottom: 18px; }
.recap-section h4 { font-weight: 700; color: var(--primary); margin-bottom: 8px; border-bottom: 2px solid var(--border); padding-bottom: 6px; }
.recap-section p { margin: 4px 0; font-size: 0.93rem; }
.recap-total { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.recap-annulation { background: #fff7ed; border-left: 3px solid #f59e0b; padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; color: #92400e; margin-top: 8px; }

/* --- ACCORD --- */
.accord-block {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
}
.accord-block label { font-size: 0.92rem; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.accord-block input { flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px; cursor: pointer; }

/* --- CONFIRMATION --- */
.confirmation-box {
  text-align: center;
  padding: 32px;
}
.confirmation-icon { font-size: 4rem; margin-bottom: 16px; }
.confirmation-box h2 { color: var(--success); font-size: 1.5rem; margin-bottom: 12px; }
.confirmation-ref {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 12px 0;
  letter-spacing: 1px;
}
.confirmation-steps { text-align: left; margin: 24px auto; max-width: 460px; }
.confirmation-steps ol { padding-left: 20px; }
.confirmation-steps li { margin-bottom: 10px; font-size: 0.95rem; }

/* --- BOUTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-accent { background: var(--accent); color: #1a1a2e; }
.btn-accent:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-full { width: 100%; justify-content: center; }
.btn-nav-group { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 12px; }

/* --- ERREUR --- */
.erreur-msg {
  display: none;
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.erreur-inline { color: var(--danger); font-size: 0.83rem; margin-top: 4px; }

/* --- FOOTER --- */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 22px 20px;
  font-size: 0.85rem;
  margin-top: 60px;
}
footer a { color: #fde68a; }
.footer-logo { height: 36px; width: auto; margin-bottom: 10px; filter: brightness(0) invert(1) opacity(0.7); }
.footer-auth { margin-top: 8px; font-size: 0.8rem; opacity: 0.7; }

/* ============================================================
   ADMIN
   ============================================================ */
.login-card {
  max-width: 400px;
  margin: 80px auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  text-align: center;
}
.login-card .admin-logo { height: 60px; margin-bottom: 20px; }
.login-card h2 { color: var(--primary); margin-bottom: 24px; }
.login-error { color: var(--danger); font-size: 0.9rem; margin-top: 8px; }

.admin-header {
  background: linear-gradient(135deg, #1a3a6b, #2a5298);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-header h1 { font-size: 1.2rem; font-weight: 700; }
.admin-logo { height: 48px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: white;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-number { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

.filtres-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filtres-bar .btn { padding: 7px 16px; font-size: 0.88rem; background: white; border: 1.5px solid var(--border); color: #374151; border-radius: 20px; }
.filtres-bar .btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.recherche-bar input {
  width: 100%;
  max-width: 360px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.93rem;
  margin-bottom: 20px;
}

.reservation-card {
  background: white;
  border-radius: 10px;
  border-left: 4px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: box-shadow 0.2s;
}
.reservation-card:hover { box-shadow: 0 4px 24px rgba(26,58,107,0.14); }
.statut-attente { border-left-color: var(--warning); }
.statut-validee { border-left-color: var(--success); }
.statut-payee { border-left-color: #3b82f6; }
.statut-refusee { border-left-color: var(--danger); }
.statut-annulee { border-left-color: #9ca3af; }

.reservation-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.reservation-ref { font-weight: 700; font-size: 0.93rem; color: var(--primary); }
.reservation-statut { font-size: 0.82rem; font-weight: 600; padding: 3px 10px; border-radius: 12px; background: #f3f4f6; }
.statut-attente.reservation-statut { background: #fff7ed; color: #92400e; }
.statut-validee.reservation-statut { background: #d1fae5; color: #065f46; }
.statut-payee.reservation-statut { background: #dbeafe; color: #1e40af; }
.statut-refusee.reservation-statut { background: #fee2e2; color: #991b1b; }

.reservation-body { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.reservation-info p { margin: 2px 0; font-size: 0.88rem; }
.reservation-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reservation-actions .btn { padding: 6px 14px; font-size: 0.83rem; }
.btn-valider { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.btn-refuser { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.btn-stripe { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.btn-payer { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.btn-detail { background: #f3f4f6; color: #374151; border: 1px solid var(--border); }
.btn-note { background: var(--primary); color: white; margin-top: 8px; }
.tarif-badge { background: #f0fdf4; color: #166534; border: 1px solid #86efac; border-radius: 20px; padding: 3px 12px; font-size: 0.88rem; font-weight: 700; white-space: nowrap; }
.tarif-badge.tarif-devis { background: #cffafe; color: #0e7490; border-color: #67e8f9; }
.reservation-note { font-size: 0.83rem; color: var(--text-light); margin-top: 6px; background: #fffbeb; padding: 6px 10px; border-radius: 6px; }
.admin-error, .admin-empty { padding: 24px; text-align: center; color: var(--text-light); }

/* --- MODALS --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: white;
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-box h3 { color: var(--primary); font-size: 1.15rem; margin-bottom: 18px; }
.modal-close { float: right; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #9ca3af; }

.stripe-guide {
  background: #f8f9ff;
  border: 1.5px solid #c7d7fb;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  font-size: 0.88rem;
}
.stripe-guide ol { padding-left: 18px; }
.stripe-guide li { margin-bottom: 6px; }
.email-type-bloc { margin-top: 14px; }
.email-type-bloc textarea { width: 100%; height: 180px; font-size: 0.85rem; resize: vertical; }

.detail-section { margin-bottom: 18px; }
.detail-section h4 { font-weight: 700; color: var(--primary); border-bottom: 2px solid var(--border); padding-bottom: 6px; margin-bottom: 8px; }
.detail-section p { margin: 4px 0; font-size: 0.9rem; }

/* --- RESPONSIVE --- */
@media (max-width: 640px) {
  main { padding: 0 12px 60px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .animal-grid { grid-template-columns: repeat(3, 1fr); }
  .trajet-options { flex-direction: column; }
  header { flex-wrap: wrap; gap: 10px; }
  .header-logo { height: 44px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .reservation-body { flex-direction: column; }
}
