/* ==================================
   FACULTY LIBRARY WEBSITES
   RESPONSIVE GRID
   ================================== */

.faculty-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* Desktop */
  gap: 20px;

  margin-top: 10px;
  padding: 10px;

  box-sizing: border-box;
  overflow-x: hidden;
}

/* Carte faculté */
.fac-item {
  display: flex;
  align-items: center;

  background-color: #ffffff;
  padding: 15px 20px;
  border-radius: 10px;

  box-shadow: 0 4px 8px rgba(11, 11, 11, 0.7);

  width: 100%;
  min-width: 0;              /* 🔴 CRUCIAL */
  box-sizing: border-box;
}

/* Lien */
.fac-item a {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  min-width: 0;              /* 🔴 CRUCIAL */
  text-decoration: none;
  color: inherit;
}

/* Logo */
.fac-item img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* Libellé */
.fac-item .flabel {
  font-size: 22px;
  font-weight: normal;
  color: #2821ed;

  white-space: normal;       /* 🔴 IMPORTANT */
  word-break: break-word;
}

/* Hover uniquement desktop */
@media (hover: hover) {
  .fac-item a:hover img {
    transform: scale(1.3);
  }
}

/* ================================
   BREAKPOINTS
   ================================ */

/* Laptop / écran moyen */
@media (max-width: 1200px) {
  .faculty-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fac-item .flabel {
    font-size: 22px;
  }
}

/* Tablette */
@media (max-width: 768px) {
  .faculty-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fac-item img {
    width: 52px;
    height: 52px;
  }

  .fac-item .flabel {
    font-size: 20px;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .faculty-bar {
    grid-template-columns: 1fr; /* 9 lignes × 1 colonne */
    gap: 15px;
  }

  .fac-item {
    padding: 12px 15px;
  }

  .fac-item img {
    width: 46px;
    height: 46px;
  }

  .fac-item .flabel {
    font-size: 18px;
  }
}
