/* POSIDIUS CARE - styles communs (espaces Professionnel, Proche, Admin)
   Charte reprise de POSIDIUS PHARMA (vert #0f9d6d) pour la coherence de
   l'ecosysteme POSIDIUS ONE. */

:root {
  --pp-primary: #0f9d6d;
  --pp-primary-dark: #0b7a54;
  --pp-primary-rgb: 15, 157, 109;
  --pp-primary-light: #d7f0e6;

  /* Bootstrap pioche ces variables pour .btn-primary/.bg-primary/.text-primary/
     .border-primary/liens... des qu'elles sont redefinies apres son propre CSS. */
  --bs-primary: var(--pp-primary);
  --bs-primary-rgb: var(--pp-primary-rgb);
  --bs-link-color: var(--pp-primary);
  --bs-link-color-rgb: var(--pp-primary-rgb);
  --bs-link-hover-color: var(--pp-primary-dark);
  --bs-link-hover-color-rgb: 11, 122, 84;
}

body { font-family: "Segoe UI", Roboto, Arial, sans-serif; }

a { color: var(--pp-primary); }
a:hover { color: var(--pp-primary-dark); }

.navbar.bg-primary { background-color: var(--pp-primary) !important; }

.btn-primary {
  --bs-btn-bg: var(--pp-primary);
  --bs-btn-border-color: var(--pp-primary);
  --bs-btn-hover-bg: var(--pp-primary-dark);
  --bs-btn-hover-border-color: var(--pp-primary-dark);
  --bs-btn-active-bg: var(--pp-primary-dark);
  --bs-btn-active-border-color: var(--pp-primary-dark);
  --bs-btn-disabled-bg: var(--pp-primary);
  --bs-btn-disabled-border-color: var(--pp-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--pp-primary);
  --bs-btn-border-color: var(--pp-primary);
  --bs-btn-hover-bg: var(--pp-primary);
  --bs-btn-hover-border-color: var(--pp-primary);
  --bs-btn-active-bg: var(--pp-primary-dark);
  --bs-btn-active-border-color: var(--pp-primary-dark);
}

.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-outline-secondary {
  background-color: var(--pp-primary);
  border-color: var(--pp-primary);
  color: #fff;
}

.bg-primary { background-color: var(--pp-primary) !important; }
.text-primary { color: var(--pp-primary) !important; }
.border-primary { border-color: var(--pp-primary) !important; }
.badge.bg-primary { background-color: var(--pp-primary) !important; }

.nav-tabs .nav-link.active { border-color: var(--pp-primary); color: var(--pp-primary); }
.form-check-input:checked { background-color: var(--pp-primary); border-color: var(--pp-primary); }
.form-control:focus, .form-select:focus { border-color: var(--pp-primary); box-shadow: 0 0 0 .25rem rgba(var(--pp-primary-rgb), .25); }
.alert-primary { background-color: var(--pp-primary-light); border-color: var(--pp-primary); color: var(--pp-primary-dark); }
.spinner-border.text-primary { color: var(--pp-primary) !important; }

.badge-statut-envoyee, .badge-statut-professionnel_trouve { background:#6c757d; }
.badge-statut-acceptee { background:#0d6efd; }
.badge-statut-en_route { background:#fd7e14; }
.badge-statut-arrive { background:#6610f2; }
.badge-statut-en_cours { background:#0dcaf0; color:#000; }
.badge-statut-terminee { background:#198754; }
.badge-statut-annulee, .badge-statut-refusee { background:#dc3545; }

.card-demande { border-left: 4px solid var(--bs-primary); }
.stat-card { border-radius: .75rem; }
.stat-card .display-6 { font-weight: 700; }

#map-suivi { height: 320px; border-radius: .5rem; }

.avatar-circle {
  width: 42px; height: 42px; border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  background:#e9ecef; font-weight:700;
}

/* ---------------------------------------------------------------------
 * Disposition en barre laterale (espaces Professionnel/Proche/Clinique/
 * Admin) — reprise de pharma/assets/css/style.css pour la coherence de
 * l'ecosysteme et pour eviter une barre horizontale surchargee.
 * ------------------------------------------------------------------- */

body { background-color: #f4f7f6; }

.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #0e1f1a;
  color: #dcece6;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 1.1rem 1rem;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #fff;
}

.brand-logo { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }

.sidebar-nav { padding: .75rem .5rem 1.5rem; }

.nav-group-title {
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .05em;
  color: #82a89c;
  padding: .9rem .75rem .25rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #dcece6;
  padding: .5rem .75rem;
  border-radius: .4rem;
  font-size: .92rem;
}

.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--pp-primary); color: #fff; }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  padding: .85rem 1.5rem;
  border-bottom: 1px solid #e3e8e6;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title { font-size: 1.15rem; font-weight: 600; margin: 0; flex: 1; }

.topbar-user-name {
  display: inline-block;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.content { padding: 1.5rem; flex: 1; }

.app-footer {
  padding: 1rem 1.5rem;
  color: #8a938f;
  font-size: .82rem;
  border-top: 1px solid #e3e8e6;
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: -280px;
    z-index: 1050;
    transition: left .2s ease;
  }
  .sidebar.show { left: 0; }
}

/* ---------------------------------------------------------------------
 * Page d'accueil publique (index.php) — meme esprit que pharma/index.php
 * ------------------------------------------------------------------- */

.landing-body { background-color: #f4f7f6; }
.landing-hero { background: linear-gradient(135deg, var(--pp-primary), var(--pp-primary-dark)); }

.landing-card {
  background: #fff;
  border: 1px solid #e3e8e6;
  border-radius: .75rem;
  padding: 1.5rem;
}

.landing-badge {
  background: var(--pp-primary-light);
  color: var(--pp-primary-dark);
  font-weight: 600;
  font-size: .8rem;
  padding: .4rem .8rem;
  border-radius: 2rem;
  display: inline-block;
}

.landing-flow-step {
  background: #f4f7f6;
  border-radius: .5rem;
  padding: .6rem .9rem;
  font-weight: 600;
  font-size: .92rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.landing-flow-step--final { background: var(--pp-primary); color: #fff; }
.landing-flow-arrow { text-align: center; color: #b7c2bd; line-height: 1.2; font-weight: 700; }
