/* ============================================================================
   MONTLAO — visionneuse.css
   (c) 2026 MontLao Sole Co., Ltd

   Le panneau recouvre le bureau sans le remplacer : on le ferme, on est
   revenu là où l'on était. Aucune navigation, aucune page perdue.
   ========================================================================== */

.vs-panneau {
  position: fixed;
  inset: 0;
  z-index: 400;                 /* au-dessus du bandeau des cours */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 40px);
}

.vs-fond {
  position: absolute;
  inset: 0;
  background: rgba(3, 18, 11, .82);
  backdrop-filter: blur(3px);
}

.vs-boite {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  height: min(860px, 100%);
  background: var(--nuit, #062B1C);
  border: 1px solid rgba(201, 162, 39, .42);
  border-radius: 6px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  overflow: hidden;
}

/* ---------- barre de titre ---------- */

.vs-barre {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, .3);
  border-bottom: 1px solid rgba(201, 162, 39, .26);
}
.vs-qui { min-width: 0 }
.vs-qui b {
  display: block;
  font-family: var(--serif, Georgia, serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--or-pale, #F4E3B0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vs-qui span {
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: rgba(243, 238, 226, .48);
}
.vs-actions { display: flex; gap: 8px; flex: none; align-items: center }

.vs-bouton {
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 9px 15px;
  border-radius: 3px;
  border: 1px solid var(--or, #C9A227);
  background: var(--or, #C9A227);
  color: #062B1C;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
}
.vs-bouton:hover { background: #E9C86A; border-color: #E9C86A }
.vs-bouton.sobre { background: none; color: #F0C75A }
.vs-bouton.sobre:hover { background: rgba(201, 162, 39, .14) }
.vs-bouton:focus-visible { outline: 2px solid #F0C75A; outline-offset: 2px }

/* ---------- le cadre ---------- */

.vs-corps { position: relative; flex: 1; min-height: 0; background: #fff }
.vs-cadre { width: 100%; height: 100%; border: 0; display: block }

.vs-attente {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: var(--nuit-2, #0A3D28);
  color: rgba(243, 238, 226, .8);
  transition: opacity .25s;
}
/* Chargé : on s'efface. Lent : on prévient au lieu de laisser attendre. */
.vs-attente.charge { opacity: 0; pointer-events: none }
.vs-attente.charge.lent { opacity: 0 }
.vs-attente .vs-min { display: none }
.vs-attente.lent:not(.charge) .vs-min { display: block }

.vs-min {
  font-size: 12.5px;
  color: rgba(243, 238, 226, .5);
  max-width: 46ch;
  line-height: 1.55;
}

/* ---------- repli : le site refuse ---------- */

.vs-fiche {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(18px, 3vw, 30px);
  color: var(--ivoire, #F3EEE2);
}
.vs-note, .vs-alerte {
  border-left: 3px solid var(--or, #C9A227);
  background: rgba(201, 162, 39, .09);
  padding: 14px 18px;
  border-radius: 0 4px 4px 0;
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.vs-alerte { border-left-color: var(--terre, #C4632F); background: rgba(196, 99, 47, .11) }
.vs-note b, .vs-alerte b { color: var(--or-pale, #F4E3B0) }

.vs-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(243, 238, 226, .82);
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.vs-detail {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0 0 20px;
  font-size: 14px;
}
.vs-detail dt {
  font-family: var(--mono, monospace);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--or, #C9A227);
  padding-top: 3px;
}
.vs-detail dd { margin: 0; overflow-wrap: anywhere; color: rgba(243, 238, 226, .84) }
@media (max-width: 620px) { .vs-detail { grid-template-columns: minmax(0, 1fr); gap: 2px 0 } }

/* ---------- pied ---------- */

.vs-pied {
  flex: none;
  padding: 10px 16px;
  border-top: 1px solid rgba(201, 162, 39, .2);
  background: rgba(0, 0, 0, .26);
  font-size: 12px;
  line-height: 1.5;
  color: rgba(243, 238, 226, .55);
}

@media (max-width: 640px) {
  .vs-panneau { padding: 0 }
  .vs-boite { height: 100%; border-radius: 0; border: 0 }
  .vs-barre { flex-wrap: wrap }
}

/* Le lien « Site » d'une fiche est un bouton : il ouvre la visionneuse
   au lieu de naviguer. Il doit néanmoins se lire comme un lien. */
button.fr-site {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: #F0C75A;
  text-decoration: underline;
  text-decoration-color: rgba(240, 199, 90, .55);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-align: left;
  overflow-wrap: anywhere;
}
button.fr-site:hover { color: #FFF0C0; text-decoration-color: #FFF0C0 }
button.fr-site:focus-visible { outline: 2px solid #F0C75A; outline-offset: 2px; border-radius: 2px }
button.fr-site::after { content: " ⧉"; font-size: .82em; opacity: .7 }
