:root {
  --primary-red: #dc2626;
  --primary-green: #16a34a;
  --dark-red: #b91c1c;
  --text-gray: #374151;
  --border: #e5e7eb;
}

body {
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text-gray);
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1 0 auto;
}

/* ---- Navigation ---- */
.bib-nav {
  background: linear-gradient(135deg, #111827, #1c3a2a);
  padding: 14px 0;
  color: #fff;
}
.bib-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #fff;
}
.bib-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.login-logo {
  /* width: 56px; height: 56px; */
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  margin: 0 auto 20px;
}
.bib-brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}
.bib-brand small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.76rem;
}
.bib-navlink {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
}
.bib-navlink:hover {
  color: #fff;
}
.bib-user {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
}

/* ---- Hero ---- */
.bib-hero {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.95),
    rgba(22, 163, 74, 0.88)
  );
  color: #fff;
  padding: 54px 0;
  text-align: center;
}
.bib-hero h1 {
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 10px;
}
.bib-hero p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* ---- Titres de section ---- */
.bib-section-title {
  font-weight: 700;
  color: var(--primary-red);
  font-size: 1.2rem;
  display: inline-block;
  position: relative;
  margin-bottom: 26px;
}
.bib-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60%;
  height: 3px;
  background: var(--primary-green);
}

/* ---- Fil d'Ariane ---- */
.bib-fil {
  font-size: 0.87rem;
  margin-bottom: 22px;
}
.bib-fil a {
  color: var(--primary-red);
  text-decoration: none;
}
.bib-fil a:hover {
  text-decoration: underline;
}
.bib-fil span {
  color: #9ca3af;
  margin: 0 7px;
}

/* ---- Cartes de navigation ---- */
.bib-card {
  display: block;
  height: 100%;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.bib-card:hover,
.bib-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}
.bib-card:focus-visible {
  outline: 3px solid var(--primary-red);
  outline-offset: 3px;
}
.bib-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #fff;
  margin-bottom: 13px;
}
.bib-card h3 {
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text-gray);
  margin-bottom: 5px;
}
.bib-card p {
  font-size: 0.86rem;
  color: #6b7280;
  margin: 0;
}
.bib-card-meta {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 10px;
}

/* ---- Documents ---- */
.bib-doc {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px 17px;
  margin-bottom: 11px;
  transition: box-shadow 0.15s ease;
}
.bib-doc:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.bib-doc-icon {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: #f3f4f6;
  color: #6b7280;
}
.bib-doc-icon.pdf {
  background: #fee2e2;
  color: #b91c1c;
}
.bib-doc-icon.word {
  background: #dbeafe;
  color: #1d4ed8;
}
.bib-doc-icon.excel {
  background: #dcfce7;
  color: #15803d;
}
.bib-doc-icon.ppt {
  background: #ffedd5;
  color: #c2410c;
}
.bib-doc-icon.image {
  background: #f3e8ff;
  color: #7e22ce;
}
.bib-doc-titre {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-gray);
}
.bib-doc-meta {
  font-size: 0.79rem;
  color: #9ca3af;
  margin-top: 2px;
}

.bib-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.bib-tag-cours {
  background: #dbeafe;
  color: #1e40af;
}
.bib-tag-epreuve {
  background: #fee2e2;
  color: #991b1b;
}
.bib-tag-corrige {
  background: #dcfce7;
  color: #166534;
}
.bib-tag-td {
  background: #fef3c7;
  color: #92400e;
}
.bib-tag-autre {
  background: #f3f4f6;
  color: #4b5563;
}

/* ---- Filtres ---- */
.bib-filtre {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-gray);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin: 0 6px 8px 0;
}
.bib-filtre:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
}
.bib-filtre.actif {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #fff;
}

/* ---- Connexion ---- */
.bib-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #111827, #1c3a2a);
  padding: 22px;
}
.bib-login-card {
  background: #fff;
  border-radius: 16px;
  padding: 38px 34px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.bib-login-logo {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: var(--primary-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  font-weight: 800;
  margin: 0 auto 18px;
}

/* ---- États vides ---- */
.bib-vide {
  text-align: center;
  padding: 56px 20px;
  color: #9ca3af;
}
.bib-vide i {
  font-size: 44px;
  margin-bottom: 14px;
  display: block;
  color: #d1d5db;
}

/* ---- Pied de page ---- */
.bib-footer {
  background: #111827;
  color: rgba(255, 255, 255, 0.72);
  padding: 26px 0;
  margin-top: 50px;
  font-size: 0.9rem;
}
.bib-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.bib-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.bib-copy {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  .bib-card {
    transition: none;
  }
  .bib-card:hover {
    transform: none;
  }
}
