/* Espace administrateur */
body.admin { background: var(--beige); min-height: 100vh; }
.admin-entete { background: #fff; border-bottom: 1px solid var(--bord); }
.admin-entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; flex-wrap: wrap; }
.admin-entete .logo-nom { font-size: 1.7rem; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions[hidden] { display: none; }
.btn-petit { padding: 8px 14px; font-size: .74rem; }
.admin-main { padding: 40px 0 80px; }

.admin-carte { background: #fff; border: 1px solid var(--bord); padding: 32px; }
.admin-connexion { max-width: 460px; margin: 40px auto; }
.admin-connexion h1, .admin-titre h1 { font-family: var(--police-titre); font-weight: 400; margin: 0 0 6px; font-size: 2rem; }
.admin-connexion p { color: var(--gris); }
.admin-connexion textarea { font-family: monospace; font-size: .85rem; }

.admin-titre { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

.onglets { display: flex; gap: 0; border-bottom: 1px solid var(--beige-fonce); margin-bottom: 18px; overflow-x: auto; }
.onglets button {
  font: inherit; background: none; border: 0; padding: 12px 20px; cursor: pointer; color: var(--gris);
  text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; border-bottom: 2px solid transparent; white-space: nowrap;
}
.onglets button.actif { color: var(--rouge); border-bottom-color: var(--rouge); }
.compte { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: var(--beige-fonce); color: var(--noir); font-size: .75rem; margin-left: 6px; padding: 0 6px; }
.onglets button.actif .compte { background: var(--rouge); color: #fff; }
.admin-outils { margin-bottom: 16px; max-width: 420px; }

.demande { background: #fff; border: 1px solid var(--bord); padding: 22px 24px; margin-bottom: 14px; display: grid; grid-template-columns: 1fr auto; gap: 18px; }
.demande h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 500; }
.demande .sous { color: var(--gris); font-size: .9rem; margin: 0 0 10px; }
.demande dl { display: grid; grid-template-columns: 150px 1fr; gap: 4px 14px; margin: 0; font-size: .93rem; }
.demande dt { color: var(--gris); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding-top: 3px; }
.demande dd { margin: 0; word-break: break-word; }
.demande .desc { white-space: pre-line; }
.demande .note { background: var(--beige); padding: 4px 8px; }
.demande-actions { display: flex; flex-direction: column; gap: 8px; min-width: 170px; }
.btn-valider { background: var(--vert); border-color: var(--vert); }
.btn-valider:hover { background: #2e6147; border-color: #2e6147; }
.btn-lien { background: none; border: 0; color: var(--gris); font: inherit; font-size: .82rem; cursor: pointer; text-decoration: underline; padding: 4px; }
.btn-lien:hover { color: var(--rouge); }
.alerte-geo { color: var(--rouge); font-size: .85rem; }

.admin-dialog { border: 0; padding: 0; width: min(780px, 100% - 24px); max-height: 92vh; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.admin-dialog.petit { width: min(480px, 100% - 24px); }
.admin-dialog::backdrop { background: rgba(27, 27, 27, .45); }
.admin-dialog form { display: flex; flex-direction: column; max-height: 92vh; }
.dialog-entete { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--bord); }
.dialog-entete h2 { margin: 0; font-family: var(--police-titre); font-weight: 400; font-size: 1.5rem; }
.fermer { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--gris); }
.dialog-corps { padding: 20px 24px; overflow-y: auto; }
.dialog-pied { padding: 14px 24px; border-top: 1px solid var(--bord); display: flex; justify-content: flex-end; gap: 10px; background: #fcfaf7; }
.aide-inline { text-transform: none; letter-spacing: 0; color: var(--gris); font-weight: 300; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 40px); opacity: 0;
  background: var(--noir); color: #fff; padding: 12px 22px; transition: all .25s; z-index: 3000; pointer-events: none;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.erreur-toast { background: var(--rouge); }

@media (max-width: 760px) {
  .demande { grid-template-columns: 1fr; }
  .demande dl { grid-template-columns: 1fr; }
  .demande dt { padding-top: 8px; }
  .demande-actions { flex-direction: row; flex-wrap: wrap; }
  .admin-carte { padding: 22px 18px; }
}
