
/* ========================================
   Portail FSI ThinLinc
   Personnalisation complémentaire à Bulma
   ======================================== */

/* ---------- Fond de page ---------- */

body {
  min-height: 100vh;
  background:
    linear-gradient(
      rgba(255, 255, 255, 0.35),
      rgba(255, 255, 255, 0.35)
    ),
    url("../background.jpg") center / cover fixed no-repeat;
}

/* ---------- Logo ---------- */

.logo-title {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  padding: 5px;
  margin: 0;

  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  line-height: 0;
}

.logo-title img {
  display: block;
  width: auto;
  height: auto;
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
}

/* ---------- Section d'en-tête ---------- */

.portal-header-section {
  padding-top: 1rem;
  padding-bottom: 0;
}

.header-box {
  background-color: rgba(255, 255, 255, 0.75);
}

.header-box .title,
.header-box .subtitle,
.header-box p {
  color: #363636;
}

/* Bouton Documentation */

.documentation-button {
  background-color: #e5e7eb;
  border: 1px solid #cbd0d8;
  color: #333333;
  font-size: 0.85rem;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.documentation-button:hover {
  background-color: #e5e7eb;
  border-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.9);
  color: #333333;
}

/* ---------- Notification de sécurité ---------- */

.notification.is-warning.is-light {
  background-color: rgba(255, 221, 87, 0.45);
  font-size: 0.85rem;
}

.notification.is-warning.is-light .title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* ---------- Panneau des environnements ---------- */

.environments-section {
  padding-top: 0;
}

.environments-panel {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 1.5rem;

  background-color: rgba(25, 25, 25, 0.75);
  border-radius: 12px;
}

.environments-panel .title {
  color: #ffffff;
}

.environments-panel .subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.environment-heading {
  min-height: 5.5rem;
}

/* ---------- Grilles des environnements ---------- */

#virtual-buttons,
#physical-buttons {
  row-gap: 0;
}

#virtual-buttons > .column,
#physical-buttons > .column {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Tuiles des clusters ---------- */

.cluster-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
  outline: none;
}

.cluster-card-link .cluster-card {
  height: 100%;
  min-height: 135px;

  border: 1px solid rgba(120, 160, 200, 0.2);
  border-radius: 12px;
  box-shadow: 0 2px 5px rgb(0 0 0 / 4%);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.cluster-card-link[href]:hover .cluster-card {
  border-color: #ff9f43;
  box-shadow:
    0 0 0 1px rgba(255, 159, 67, 0.4),
    0 0 18px rgba(255, 140, 40, 0.35);
  transform: translateY(-2px);
}

.cluster-card-link[href]:focus-visible .cluster-card {
  border-color: #ff9f43;
  box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.45);
}

.cluster-card-disabled {
  opacity: 0.5;
}

.cluster-card-link-disabled {
  display: block;
  cursor: not-allowed;
}

.cluster-card .card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cluster-card .content {
  overflow-wrap: anywhere;
}

/* ---------- Barres dans les tuiles ---------- */

.room-load-bar {
  margin-top: 0.75rem;
}

.load-bar-background.room-load-bar {
  background-color: #2b2b2b;
  border: none;
}

.load-bar-background.room-load-bar .load-bar-text {
  color: #ffffff;
}

/* ---------- Responsive ---------- */

@media screen and (max-width: 768px) {
  .section {
    padding: 1rem;
  }

  .logo-title {
    position: relative;
    top: auto;
    left: auto;
    margin: 0.75rem auto;
  }

  .header-box .title.is-3 {
    font-size: 1.5rem;
  }
}

/* Séparer clairement l'en-tête du panneau des environnements */
.portal-header-section {
  padding-bottom: 1.5rem;
}

.environments-section {
  padding-top: 0;
}

.environments-panel {
  margin-top: 0;
  padding-bottom: 0.5rem;
}

#load-progress {
  border: 1px solid #cbd0d8;
  border-radius: 12px;
}

/* Réduire l'espace sous la barre de charge des salles physiques */
.cluster-card-link .cluster-card .card-content {
  padding-bottom: 0.6rem;
}

/* Éviter que le logo recouvre l'en-tête sur une fenêtre réduite */
@media screen and (min-width: 769px) and (max-width: 1100px) {
  .logo-title img {
    max-width: 120px;
    max-height: 120px;
  }

  .portal-header-section {
    padding-top: 5rem;
  }
}

/* En mode mobile : panneau environnements pleine largeur */
@media screen and (max-width: 768px) {
  .environments-section {
    padding-left: 0;
    padding-right: 0;
  }

  .environments-section .container.is-fluid {
    padding-left: 0;
    padding-right: 0;
  }

  .environments-panel {
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
  }
}

/* Effet de survol uniquement sur les appareils avec une souris */
@media (hover: hover) and (pointer: fine) {
  .cluster-card-link[href]:hover .cluster-card {
    border-color: #ff9f43;
    box-shadow:
      0 0 0 1px rgba(255, 159, 67, 0.4),
      0 0 18px rgba(255, 140, 40, 0.35);
    transform: translateY(-2px);
  }
}

/* Éviter la bordure persistante au toucher */
@media (hover: none) {
  .cluster-card-link[href]:hover .cluster-card {
    border-color: rgba(120, 160, 200, 0.2);
    box-shadow: 0 2px 5px rgb(0 0 0 / 4%);
    transform: none;
  }
}

/* Texte des barres de charge des salles physiques */
.room-load-bar .load-bar-text {
  color: #888 !important;
}
