:root {
  --sbs-orange: #e8720c;
  --sbs-orange-fonce: #c45f08;
  --sbs-nuit: #1b1f3b;
}

body { background: #f3f4f8; }

.sbs-nav { background: var(--sbs-nuit); }
.sbs-nav .nav-link:hover { color: var(--sbs-orange) !important; }

.btn-sbs { background: var(--sbs-orange); border-color: var(--sbs-orange); color: #fff; }
.btn-sbs:hover, .btn-sbs:focus { background: var(--sbs-orange-fonce); border-color: var(--sbs-orange-fonce); color: #fff; }

.card { border: 0; border-radius: .8rem; box-shadow: 0 1px 6px rgba(0, 0, 0, .07); }
.card-header { background: #fff; border-bottom: 1px solid #eee; font-weight: 600; border-radius: .8rem .8rem 0 0 !important; }

/* Statuts */
.statut { font-weight: 600; }
.statut-a_venir  { background: #e7f0ff; color: #1d4ed8; }
.statut-en_cours { background: #ffedd5; color: #9a3412; }
.statut-en_pause { background: #f1f5f9; color: #475569; }
.statut-termine  { background: #dcfce7; color: #166534; }

/* Liste des chantiers */
.chantier-card { transition: transform .12s, box-shadow .12s; color: inherit; text-decoration: none; display: block; }
.chantier-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .1); color: inherit; }
.chantier-card.urgent { border-left: 5px solid #dc2626; }

/* Galerie */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.galerie .vignette { position: relative; aspect-ratio: 1; border-radius: .5rem; overflow: hidden; background: #e5e7eb; }
.galerie .vignette img { width: 100%; height: 100%; object-fit: cover; }
.galerie .vignette .info { position: absolute; inset: auto 0 0 0; padding: .25rem .4rem; font-size: .72rem;
  color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.galerie .vignette .suppr { position: absolute; top: .3rem; right: .3rem; }
.galerie .vignette.doc { display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; color: #374151; padding: .5rem; text-align: center; font-size: .8rem; }
.galerie .vignette.doc i { font-size: 2.5rem; color: #dc2626; }

.rapport { border-left: 3px solid var(--sbs-orange); padding-left: .9rem; }
.rapport + .rapport { margin-top: 1.25rem; }
.pre-wrap { white-space: pre-wrap; }

/* Visionneuse plein ecran */
.visionneuse { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 2000; display: none;
  align-items: center; justify-content: center; }
.visionneuse.ouverte { display: flex; }
.visionneuse img { max-width: 96vw; max-height: 88vh; object-fit: contain; }
.visionneuse .fermer { position: absolute; top: .75rem; right: 1rem; font-size: 2rem; color: #fff; background: none; border: 0; }
.visionneuse .legende { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; color: #ddd; }

.login-box { max-width: 420px; margin: 8vh auto 0; }
