/* =============================================
   MBA Ponts Alumni Morocco — Feuille de styles principale
   Couleurs : Bleu marine #003366 / Or #C9A84C
   ============================================= */

:root {
  --mba-bleu: #003366;
  --mba-bleu-clair: #0055a5;
  --mba-or: #C9A84C;
  --mba-or-clair: #f0d080;
  --mba-gris: #f5f6fa;
}

/* ─── Base ──────────────────────────────────────────────────────── */
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background-color: var(--mba-gris);
  color: #1a1a2e;
}

/* ─── Navbar ────────────────────────────────────────────────────── */
.navbar.bg-primary {
  background-color: var(--mba-bleu) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}

.btn-warning {
  background-color: var(--mba-or);
  border-color: var(--mba-or);
  color: #fff;
  font-weight: 600;
}

.btn-warning:hover {
  background-color: #b8903a;
  border-color: #b8903a;
  color: #fff;
}

/* ─── Cards ─────────────────────────────────────────────────────── */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* ─── Profil — jauge de complétion ──────────────────────────────── */
.completion-gauge .progress {
  height: 10px;
  border-radius: 5px;
}

.completion-gauge .progress-bar {
  background: linear-gradient(90deg, var(--mba-bleu-clair), var(--mba-or));
}

/* ─── Carte de membre numérique ─────────────────────────────────── */
.carte-membre {
  background: linear-gradient(135deg, var(--mba-bleu) 60%, var(--mba-bleu-clair));
  color: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,51,102,0.25);
}

.carte-membre .badge-promo {
  background-color: var(--mba-or);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ─── Annuaire ──────────────────────────────────────────────────── */
.profil-card .avatar {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--mba-or);
}

.badge-disponible {
  background-color: #28a745;
  color: white;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 10px;
}

/* ─── Événements ─────────────────────────────────────────────────── */
.event-card .event-date {
  background-color: var(--mba-bleu);
  color: white;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  min-width: 56px;
}

.event-card .event-date .day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.event-card .event-date .month {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── Messagerie ─────────────────────────────────────────────────── */
.chat-bubble {
  max-width: 70%;
  border-radius: 18px;
  padding: 10px 16px;
  margin-bottom: 8px;
  word-wrap: break-word;
}

.chat-bubble.sent {
  background-color: var(--mba-bleu);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-bubble.received {
  background-color: #e9ecef;
  color: #1a1a2e;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
footer {
  background-color: #0d1b2a !important;
}

/* ─── PWA offline ───────────────────────────────────────────────── */
.offline-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ─── Accessibilité ──────────────────────────────────────────────── */

/* Focus visible pour navigation clavier */
:focus-visible {
  outline: 3px solid var(--mba-or);
  outline-offset: 2px;
}

/* text-muted : assez de contraste sur fond blanc (ratio 4.5:1) */
.text-muted {
  color: #595959 !important;
}

/* Badges bg-light : contraste renforcé */
.badge.bg-light {
  color: #1a1a2e !important;
}

/* Liens dans les cartes */
a.text-dark:hover {
  color: var(--mba-bleu) !important;
}

/* Images lazy loading */
img[loading="lazy"] {
  content-visibility: auto;
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .carte-membre {
    max-width: 100%;
  }

  .chat-bubble {
    max-width: 90%;
  }
}

/* ─── Bottom Navigation Mobile ──────────────────────────────────── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: #fff;
  border-top: 1px solid #e8e8e8;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
  display: flex;
  align-items: stretch;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: #888;
  font-size: 0.62rem;
  font-weight: 500;
  padding: 6px 4px;
  transition: color 0.15s;
  min-width: 0;
}

.bottom-nav-item i {
  font-size: 1.35rem;
  line-height: 1;
}

.bottom-nav-item.active {
  color: var(--mba-bleu);
  font-weight: 700;
}

.bottom-nav-item:active {
  opacity: 0.7;
}

.bottom-nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  font-size: 0.55rem;
  font-weight: 700;
  text-align: center;
  background: #dc3545;
  color: #fff;
  border-radius: 8px;
  padding: 0 3px;
}

/* Espace sous le contenu pour que la bottom nav ne le masque pas */
@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
}

/* ─── Mentorat ──────────────────────────────────────────────────────────────── */
.hover-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
.hover-card:hover {
  box-shadow: 0 4px 16px rgba(0, 51, 102, 0.12);
  transform: translateY(-2px);
}
