/* Panel fondateur (/admin) : mêmes couleurs que le site ; s'appuie sur espace.css (cartes, messages, chargement). */
.adm-entete {
	position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px;
	padding: 14px max(16px, calc((100% - 1180px) / 2));
	background: rgba(0, 0, 0, 0.8); border-bottom: 1px solid var(--ligne);
	backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.adm-separateur { width: 1px; height: 22px; background: var(--ligne-forte); }
.adm-rubrique { color: var(--texte-2); font-size: 14.5px; font-weight: 500; }
.adm-compte { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.adm-compte[hidden] { display: none; }
.adm-avatar { border-radius: 50%; background: #1a1a1d; }
.adm-pseudo { font-weight: 600; }
.adm-lien { background: none; border: 0; padding: 6px 8px; color: var(--texte-3); font: inherit; cursor: pointer; border-radius: 8px; transition: color 0.2s ease, background 0.2s ease; }
.adm-lien:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.adm-main { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 40px 0 90px; }
.page-admin .esp-connexion { margin-top: 8vh; }

/* Menu des rubriques + contenu */
.adm-tableau { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.adm-menu { position: sticky; top: 90px; display: grid; gap: 4px; }
.adm-menu button {
	display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 12px; border: 0;
	background: none; text-align: left; color: var(--texte-2); font: 500 15px/1.2 var(--corps); cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.adm-menu button:hover { color: #fff; }
.adm-menu .actif { background: rgba(255, 255, 255, 0.09); color: #fff; }
.adm-menu img { opacity: 0.85; }
.adm-panneau { display: none; }
.adm-panneau.actif { display: block; animation: esp-arrive 0.35s var(--douce); }
.adm-titre { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.adm-titre h1 { font-size: clamp(26px, 3vw, 34px); }
.adm-titre-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Chiffres */
.adm-chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 0; }
.adm-chiffre { padding: 20px; border-radius: 18px; background: linear-gradient(180deg, var(--carte-haut), var(--carte)); border: 1px solid var(--ligne); }
.adm-chiffre dt { color: var(--texte-3); font-size: 13.5px; font-weight: 500; }
.adm-chiffre dd { margin: 10px 0 0; font: 800 34px/1 var(--titres); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.adm-chiffre small { display: block; color: var(--texte-3); font-size: 12.5px; margin-top: 10px; }
.adm-chiffre.vedette { background: #fff; color: #000; border-color: #fff; }
.adm-chiffre.vedette dt, .adm-chiffre.vedette small { color: #55555b; }
.adm-note { color: var(--texte-3); font-size: 13.5px; margin-top: 16px; }
.adm-note.alerte { color: #ffc9cb; }

/* Tableaux */
.adm-table-zone { overflow-x: auto; border-radius: 16px; border: 1px solid var(--ligne); background: #08080a; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table[hidden] { display: none; }
.adm-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--texte-3); letter-spacing: 0.02em; padding: 12px 14px; border-bottom: 1px solid var(--ligne); white-space: nowrap; }
.adm-table td { padding: 12px 14px; border-bottom: 1px solid var(--ligne); color: var(--texte-2); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table code { font: 500 13px/1 var(--mono); color: #fff; white-space: nowrap; }
.adm-table .vide td { text-align: center; color: var(--texte-3); padding: 28px; }
.adm-table .nombre { font-variant-numeric: tabular-nums; color: #fff; }
.adm-qui { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 500; }
.adm-qui img { border-radius: 50%; flex: none; background: #1a1a1d; }
.adm-qui small, .adm-detail { display: block; color: var(--texte-3); font-weight: 400; font-size: 12px; margin-top: 3px; }
.adm-pastille { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: rgba(255, 255, 255, 0.06); color: var(--texte-2); }
.adm-pastille.vert { color: #b9f2cf; background: rgba(35, 165, 90, 0.12); }
.adm-pastille.rouge { color: #ffc9cb; background: rgba(218, 55, 60, 0.12); }
.adm-pastille.jaune { color: #ffd59e; background: rgba(240, 178, 50, 0.1); }
.adm-pastille.blanc { color: #000; background: #fff; }
.adm-pastilles { display: flex; flex-wrap: wrap; gap: 4px; }
.adm-couper {
	background: none; border: 1px solid rgba(218, 55, 60, 0.45); color: #ffc9cb; font: 600 13px/1 var(--corps);
	padding: 8px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease;
}
.adm-couper:hover, .adm-couper.confirmer { background: #da373c; color: #fff; border-color: #da373c; }
.adm-couper:disabled { opacity: 0.5; cursor: wait; }

/* Générateur de clés */
.adm-generateur {
	display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 20px; border-radius: 18px;
	background: linear-gradient(180deg, var(--carte-haut), var(--carte)); border: 1px solid var(--ligne);
}
.adm-champs { display: flex; flex-wrap: wrap; gap: 12px; flex: 1; }
.adm-champ { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--texte-2); min-width: 160px; }
.adm-champ[hidden] { display: none; }
.adm-champ-court { min-width: 90px; max-width: 110px; }
.adm-champ-large { flex: 1; min-width: 200px; }
.adm-champ input, .adm-champ select {
	background: #08080a; border: 1px solid var(--ligne-forte); border-radius: 12px; color: #fff;
	font: 500 15px/1.3 var(--corps); padding: 11px 12px; outline: 0; width: 100%;
}
.adm-champ select option { background: #111; }
.adm-champ input:focus, .adm-champ select:focus { border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.07); }

.adm-nouvelles { margin-top: 16px; padding: 18px 20px; border-radius: 18px; border: 1px solid rgba(35, 165, 90, 0.45); background: rgba(35, 165, 90, 0.08); }
.adm-nouvelles[hidden] { display: none; }
.adm-nouvelles-titre { font-weight: 600; color: #b9f2cf; font-size: 14.5px; }
.adm-nouvelles ul { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.adm-nouvelles li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-nouvelles code {
	font: 600 16px/1 var(--mono); color: #fff; letter-spacing: 0.04em; padding: 10px 12px; border-radius: 10px;
	background: #08080a; border: 1px solid var(--ligne-forte); user-select: all; overflow-wrap: anywhere;
}
.adm-copier { background: rgba(255, 255, 255, 0.08); border: 0; color: #fff; font: 600 13px/1 var(--corps); padding: 9px 12px; border-radius: 999px; cursor: pointer; }
.adm-copier:hover { background: rgba(255, 255, 255, 0.16); }

.adm-filtres { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 12px; }
.adm-filtres button { background: none; border: 1px solid var(--ligne-forte); color: var(--texte-2); font: 500 14px/1 var(--corps); padding: 9px 14px; border-radius: 999px; cursor: pointer; }
.adm-filtres button:hover { color: #fff; }
.adm-filtres .actif { background: #fff; color: #000; border-color: #fff; }

/* Bots : cartes de la liste */
.adm-bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.adm-bot {
	display: grid; gap: 14px; padding: 18px; border-radius: 18px; text-align: left; cursor: pointer; color: #fff; font: inherit;
	background: linear-gradient(180deg, var(--carte-haut), var(--carte)); border: 1px solid var(--ligne);
	transition: transform 0.25s var(--douce), border-color 0.2s ease, box-shadow 0.25s ease;
}
.adm-bot:hover { transform: translateY(-3px); border-color: var(--ligne-forte); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
.adm-bot-tete { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-bot-tete img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #1a1a1d; flex: none; }
.adm-bot-tete div { min-width: 0; }
.adm-bot-nom { font: 700 17px/1.2 var(--titres); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bot-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.adm-bot-chiffres span { display: grid; gap: 2px; font-size: 12px; color: var(--texte-3); }
.adm-bot-chiffres strong { font: 700 17px/1.1 var(--titres); color: #fff; font-variant-numeric: tabular-nums; }
.adm-bot-client { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texte-2); min-width: 0; }
.adm-bot-client img { width: 20px; height: 20px; border-radius: 50%; flex: none; background: #1a1a1d; }
.adm-bot-client span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bots : fiche */
.adm-fiche[hidden], .adm-purge[hidden] { display: none; }
.adm-retour { background: none; border: 0; color: var(--texte-2); font: 500 14.5px/1 var(--corps); cursor: pointer; padding: 6px 0; margin-bottom: 14px; }
.adm-retour:hover { color: #fff; }
.adm-fiche-tete {
	display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 24px; border-radius: 22px;
	background: linear-gradient(180deg, var(--carte-haut), var(--carte)); border: 1px solid var(--ligne);
}
.adm-fiche-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #1a1a1d; flex: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06); }
.adm-fiche-identite { flex: 1; min-width: 220px; }
.adm-fiche-identite h1 { font-size: clamp(24px, 3vw, 32px); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; overflow-wrap: anywhere; }
.adm-fiche-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.adm-fiche-ligne code { font: 500 12.5px/1 var(--mono); color: var(--texte-3); }
.adm-fiche-bio { color: var(--texte-2); font-size: 14.5px; margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-fiche-bio:empty { display: none; }
.adm-fiche-boutons { display: flex; flex-direction: column; gap: 8px; }
.adm-infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 14px 0 0; }
.adm-infos > div { padding: 16px; border-radius: 16px; background: #08080a; border: 1px solid var(--ligne); min-width: 0; }
.adm-infos dt { color: var(--texte-3); font-size: 12.5px; font-weight: 500; }
.adm-infos dd { margin: 8px 0 0; font: 700 18px/1.25 var(--titres); overflow-wrap: anywhere; }
.adm-infos dd small { display: block; font: 400 12.5px/1.3 var(--corps); color: var(--texte-3); margin-top: 4px; }
.adm-fiche-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.adm-carte { padding: 20px; border-radius: 18px; background: linear-gradient(180deg, var(--carte-haut), var(--carte)); border: 1px solid var(--ligne); min-width: 0; }
.adm-carte-large { grid-column: 1 / -1; }
.adm-carte h2 { font-size: 19px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 8px; }
.adm-carte h2 small { font: 400 13px/1 var(--corps); color: var(--texte-3); }
.adm-ligne-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--ligne); font-weight: 600; font-size: 14.5px; }
.adm-ligne-action:first-of-type { border-top: 0; padding-top: 0; }
.adm-ligne-action small { display: block; font-weight: 400; color: var(--texte-3); font-size: 12.5px; margin-top: 2px; }
.adm-temps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-temps input, .adm-ajout input {
	background: #08080a; border: 1px solid var(--ligne-forte); border-radius: 12px; color: #fff; font: 500 14.5px/1.3 var(--corps);
	padding: 9px 12px; outline: 0; min-width: 0;
}
.adm-temps input[type="number"] { width: 96px; }
.adm-purge .adm-temps input { width: min(280px, 100%); }
.adm-temps span { color: var(--texte-3); font-size: 13.5px; font-weight: 500; }
.adm-temps input:focus, .adm-ajout input:focus { border-color: rgba(255, 255, 255, 0.5); }
.adm-sous-titre { margin-top: 14px; color: var(--texte-3); font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; }
.adm-suivi { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.adm-suivi li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; color: var(--texte-2); padding: 10px 12px; border-radius: 10px; background: #08080a; border: 1px solid var(--ligne); }
.adm-suivi li strong { color: #fff; font-weight: 600; }
.adm-suivi li time { margin-left: auto; color: var(--texte-3); font-size: 12px; }
.adm-suivi .vide { color: var(--texte-3); }
.adm-personnes, .adm-serveurs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.adm-personnes li, .adm-serveurs li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: #08080a; border: 1px solid var(--ligne); min-width: 0; }
.adm-personnes img, .adm-serveurs img, .adm-initiale { width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: cover; background: #1e1f22; }
.adm-serveurs img, .adm-serveurs .adm-initiale { border-radius: 10px; }
.adm-initiale { display: grid; place-items: center; font: 700 12px/1 var(--titres); color: #fff; }
.adm-personnes .qui, .adm-serveurs .qui { flex: 1; min-width: 0; }
.adm-personnes .qui strong, .adm-serveurs .qui strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-personnes .qui small, .adm-serveurs .qui small { display: block; font-size: 12px; color: var(--texte-3); }
.adm-personnes .vide, .adm-serveurs .vide { justify-content: center; color: var(--texte-3); font-size: 13.5px; }
/* Serveurs d'un bot : propriétaire (petite photo) et lien d'invitation. */
.adm-serveurs li { flex-wrap: wrap; }
.adm-serveurs .qui .adm-proprio { display: flex; align-items: center; gap: 6px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-serveurs .adm-proprio img { width: 16px; height: 16px; border-radius: 50%; }
.adm-serveur-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-ajout { display: flex; gap: 8px; margin-top: 12px; }
.adm-ajout input { flex: 1; }

/* Journal */
.adm-journal { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.adm-journal li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; border-radius: 12px; background: #08080a; border: 1px solid var(--ligne); font-size: 14px; color: var(--texte-2); }
.adm-journal strong { color: #fff; font-weight: 600; }
.adm-journal time { margin-left: auto; color: var(--texte-3); font-size: 12.5px; }
.adm-journal .vide { justify-content: center; color: var(--texte-3); }

@media (max-width: 900px) {
	.adm-tableau { grid-template-columns: minmax(0, 1fr); }
	.adm-fiche-grille { grid-template-columns: minmax(0, 1fr); }
	.adm-fiche-boutons { flex-direction: row; flex-wrap: wrap; }
	.adm-menu { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 6px; scrollbar-width: none; }
	.adm-menu button { width: auto; white-space: nowrap; }
}
@media (max-width: 600px) {
	.adm-rubrique, .adm-separateur, .adm-pseudo, .adm-entete .marque span { display: none; }
	.adm-lien { white-space: nowrap; padding: 6px; }
	.adm-main { padding-top: 24px; }
	.adm-generateur { padding: 16px; }
	.adm-generateur .btn { width: 100%; }
	.adm-champ, .adm-champ-court { min-width: 0; flex: 1 1 100%; max-width: none; }
	.adm-chiffre dd { font-size: 30px; }
}
