/* gestion.css : espace de gestion du site ISTE (couleurs du logo) */
:root {
  --navy: #0b2454; --navy-2: #12336f; --orange: #f2600c; --yellow: #f7d117;
  --ink: #142033; --muted: #5b6678; --line: #e3e7ef; --soft: #f4f6fb;
  --vert: #059669; --rouge: #d93025; --fb: #1877f2;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: 15px; color: var(--ink); background: var(--soft); line-height: 1.5; }
a { color: var(--navy-2); }
img { max-width: 100%; display: block; }

.barre { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.barre .interieur { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.barre .logo { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.barre .titre { display: flex; flex-direction: column; line-height: 1.2; }
.barre small { color: #c9d4ea; font-size: .75rem; }
.barre .voir { margin-left: auto; color: var(--yellow); font-weight: 600; text-decoration: none; font-size: .88rem; }
.barre .sortie { margin: 0; }
.barre .sortie button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 8px; padding: 7px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.barre .sortie button:hover { background: var(--orange); }

main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 48px; }
h1, h2 { color: var(--navy); margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h2 small { color: var(--muted); font-weight: 600; font-size: .85rem; }

.carte { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.carte.etroite { max-width: 420px; margin: 40px auto; }
.colonnes { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.deux, .grille-envoi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grille-envoi { grid-template-columns: 1.4fr 1fr 1.4fr; }

label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; }
input:not([type="checkbox"]), select, textarea {
  font: inherit; font-weight: 500; width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); background: #fff; }
textarea { resize: vertical; }
label.case { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; flex-wrap: wrap; }
label.case input { width: 18px; height: 18px; accent-color: var(--orange); }
label.case small { color: var(--muted); font-weight: 400; }
label.inactif { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--navy); background: var(--navy); color: #fff; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--navy-2); }
.btn.secondaire { background: #fff; color: var(--navy); border-color: var(--line); }
.btn.secondaire:hover { border-color: var(--navy); }
.btn.danger { background: #fff; color: var(--rouge); border-color: #f5c2bd; }
.btn.danger:hover { background: #fdecea; }
.btn.facebook { background: var(--fb); border-color: var(--fb); }
.btn.petit { padding: 5px 10px; font-size: .8rem; border-radius: 8px; }
.btn:disabled { opacity: .6; cursor: wait; }
.actions, .boutons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.boutons form { margin: 0; }

.alerte { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 600; border: 1px solid; }
.alerte.ok { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alerte.erreur { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.aide { color: var(--muted); font-size: .85rem; margin: 0; }
.vide { color: var(--muted); text-align: center; padding: 20px; margin: 0; }

.onglets { display: flex; gap: 4px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.onglets a { padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.onglets a.actif { background: var(--navy); color: #fff; }
.pastille { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pastille.verte { background: #22c55e; }
.pastille.grise { background: #cbd5e1; }

.apercu { max-height: 160px; width: auto; border-radius: 8px; border: 1px solid var(--line); }
.ligne { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ligne:first-of-type { border-top: 0; }
.ligne > img, .sans-image { width: 86px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.sans-image { display: grid; place-items: center; background: var(--navy); color: var(--yellow); font-weight: 800; font-size: .8rem; }
.infos { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.infos small { color: var(--muted); }

.vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.vignette { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.vignette img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: 8px; }
.vignette input[type="text"], .vignette select { padding: 6px 8px; font-size: .82rem; }
.vignette .case { font-size: .82rem; }
.vignette.masquee img { opacity: .4; filter: grayscale(1); }

.etat { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.etat.verte { background: #ecfdf5; color: #065f46; }
.etat.grise { background: var(--soft); color: var(--muted); }
.guide { background: var(--soft); border-radius: 10px; padding: 10px 14px; font-size: .88rem; }
.guide summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.guide li { margin: 6px 0; }
code { background: #e8edf7; padding: 1px 5px; border-radius: 4px; font-size: .82rem; }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
td:first-child { white-space: nowrap; color: var(--muted); }
.badge { background: #e8edf7; color: var(--navy); padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }

@media (max-width: 860px) {
  .colonnes, .grille-envoi { grid-template-columns: 1fr; }
  .barre .titre small { display: none; }
}
@media (max-width: 520px) {
  .deux { grid-template-columns: 1fr; }
  .vignettes { grid-template-columns: 1fr 1fr; }
  table, tbody, tr, td { display: block; }
  tr { border-top: 1px solid var(--line); padding: 6px 0; }
  td { border: 0; padding: 2px 0; }
  .carte .actions .btn { flex: 1; }
}

/* Visites */
.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.chiffre { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.chiffre span { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.chiffre small { font-weight: 700; color: var(--ink); }
.chiffre em { font-style: normal; color: var(--muted); font-size: .82rem; }
.chiffre:first-child { background: var(--navy); border-color: var(--navy); }
.chiffre:first-child span { color: var(--yellow); }
.chiffre:first-child small { color: #fff; }
.chiffre:first-child em { color: #c9d4ea; }
.graphe { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 200px; align-items: end; }
.barre-jour { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.barre-jour .colonne { width: 100%; max-width: 22px; background: #c7d3ea; border-radius: 4px 4px 0 0; }
.barre-jour.auj .colonne { background: var(--orange); }
.barre-jour .valeur { font-size: .66rem; color: var(--muted); font-weight: 700; }
.barre-jour .date { font-size: .66rem; color: var(--muted); margin-top: 3px; }
.colonnes.egales { grid-template-columns: 1fr 1fr; margin-top: 16px; }
.jauge { display: grid; grid-template-columns: 110px 1fr 48px; align-items: center; gap: 10px; font-size: .88rem; }
.jauge .piste { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.jauge .piste div { height: 100%; background: var(--navy-2); border-radius: 999px; }
.jauge strong { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .chiffres { grid-template-columns: 1fr 1fr; }
  .colonnes.egales { grid-template-columns: 1fr; }
  .graphe { gap: 1px; height: 160px; }
  .barre-jour .valeur { display: none; }
  .barre-jour:nth-child(odd) .date { visibility: hidden; }
}


/* Forum et étudiants */
.ligne-etudiant, .ligne-message { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ligne-etudiant .infos, .ligne-message .infos { flex: 1 1 260px; }
.ligne-etudiant .boutons, .ligne-message .boutons { flex: none; }
.ligne-message p { margin: 4px 0 0; overflow-wrap: anywhere; }
.ligne-message.masque { opacity: .55; }
.badge.statut-bloque { background: #fde8e6; color: #b42318; }
.rouge { color: var(--rouge); }
