﻿/* ==========================================================================
   MODULE AIGUILLAGE & ORIENTATION DES PATIENTS - DR FEY
   Design Harmonisé avec la Charte Graphique du Cabinet (Glassmorphism 2.0)
   ========================================================================== */

.aiguillage-section {
  margin: 20px 0 28px 0;
  padding: 0;
}

.aiguillage-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.07), 0 0 0 1px rgba(14, 165, 233, 0.12);
  padding: 20px 24px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.aiguillage-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9 0%, #14b8a6 50%, #8b5cf6 100%);
}

.aiguillage-card:hover {
  box-shadow: 0 16px 40px -8px rgba(14, 165, 233, 0.14), 0 0 0 1px rgba(14, 165, 233, 0.22);
}

/* Ligne supérieure équilibrée */
.aiguillage-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.aiguillage-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aiguillage-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(20, 184, 166, 0.15));
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
  flex-shrink: 0;
}

.aiguillage-title-compact {
  font-size: 18px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.3px;
  margin: 0;
  line-height: 1.2;
}

.aiguillage-subtitle-mini {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  margin-top: 1px;
}

/* Ruban dynamique de statut façon badge moderne */
.aiguillage-status-pill-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 9999px;
  color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.status-dot-mini {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green { background-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
.dot-amber { background-color: #ea580c; box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2); }
.dot-purple { background-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2); }
.dot-gray { background-color: #64748b; }

/* Barre de recherche moderne */
.search-input-wrapper-compact {
  position: relative;
  margin-bottom: 12px;
}

.search-icon-compact {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
  color: #0284c7;
}

.search-input-field-compact {
  width: 100%;
  padding: 13px 18px 13px 48px;
  font-size: 14.5px;
  font-weight: 500;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  outline: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input-field-compact:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15), 0 4px 12px rgba(14, 165, 233, 0.08);
}

.search-input-field-compact::placeholder {
  color: #94a3b8;
  font-weight: 450;
}

/* Boutons de suggestions raffinés (Style Pilules Modernes) */
.quick-choices-bar-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-choices-label-compact {
  font-size: 11.5px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 2px;
}

.quick-chip {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.quick-chip:hover {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.1);
}

.quick-chip.chip-urg {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.quick-chip.chip-urg:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.15);
}

/* Zone de résultat */
.results-wrapper-compact {
  margin-top: 0;
  transition: all 0.3s ease;
}

.results-wrapper-compact:not(:empty) {
  margin-top: 16px;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}

/* Carte de résultat */
.result-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 20px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card.level-danger {
  border: 2px solid #ef4444;
  background: #fff5f5;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.12);
}

.result-card.level-urgence_jour {
  border: 2px solid #f97316;
  background: #fffaf0;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.1);
}

.result-card-header {
  margin-bottom: 6px;
}

.result-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.badge-danger { background: #dc2626; color: white; }
.badge-urgence_jour { background: #ea580c; color: white; }
.badge-admin { background: #8b5cf6; color: white; }
.badge-prevention { background: #0d9488; color: white; }
.badge-suivi_ipa { background: #6366f1; color: white; }
.badge-consultation { background: #0284c7; color: white; }

.result-title {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  color: #0f172a;
}

.result-advice {
  font-size: 14px;
  color: #475569;
  margin: 6px 0 14px 0;
  line-height: 1.5;
}

.result-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.orient-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 750;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.orient-btn .btn-text-main {
  font-size: 14px;
  line-height: 1.3;
}

.orient-btn .btn-text-sub {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.88;
  margin-top: 2px;
}

.btn-urg-samu { background: #dc2626; color: white; text-align: center; align-items: center; }
.btn-urg-samu:hover { background: #b91c1c; transform: translateY(-1px); }

.btn-urg-112 { background: #991b1b; color: white; text-align: center; align-items: center; }
.btn-urg-112:hover { background: #7f1d1d; transform: translateY(-1px); }

.btn-action-primary { background: #0284c7; color: white; }
.btn-action-primary:hover { background: #0369a1; transform: translateY(-1px); }

.btn-action-secondary { background: #8b5cf6; color: white; }
.btn-action-secondary:hover { background: #7c3aed; transform: translateY(-1px); }

.btn-action-phone { background: #0f172a; color: white; }
.btn-action-phone:hover { background: #1e293b; transform: translateY(-1px); }

.btn-action-teal { background: #0d9488; color: white; }
.btn-action-teal:hover { background: #0f766e; transform: translateY(-1px); }

.btn-action-purple { background: #6366f1; color: white; }
.btn-action-purple:hover { background: #4f46e5; transform: translateY(-1px); }

.btn-action-outline { background: white; color: #0f172a; border: 1.5px solid #cbd5e1; }
.btn-action-outline:hover { background: #f8fafc; border-color: #94a3b8; transform: translateY(-1px); }

.result-regulation-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(241, 245, 249, 0.9);
  border-radius: 10px;
  font-size: 12.5px;
  color: #475569;
}

.btn-close-results {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.15s ease;
}
.btn-close-results:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Accordéon discret planning */
.team-schedule-accordion-compact {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.accordion-toggle-btn-compact {
  background: none;
  border: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 750;
  color: #0284c7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.accordion-toggle-btn-compact:hover {
  color: #0369a1;
  text-decoration: underline;
}

.team-schedule-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.team-day-card-compact {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.team-pro-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}

.team-pro-days {
  font-size: 11.5px;
  font-weight: 650;
  color: #0284c7;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .aiguillage-card {
    padding: 16px;
  }
  .aiguillage-header-compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .result-actions-grid {
    grid-template-columns: 1fr;
  }
}
