/* Espace client (/espace) : mêmes couleurs, mêmes polices que le site (style.css). */
.esp-main { width: min(1120px, 100% - 32px); margin: 0 auto; padding: 132px 0 90px; }
.esp-alerte { max-width: 640px; margin: 0 auto 20px; }

/* Écrans : chargement, connexion, espace, installation, bot */
.ecran { display: none; }
.ecran.actif { display: block; animation: esp-arrive 0.5s var(--douce); }
@keyframes esp-arrive { from { opacity: 0; transform: translateY(12px); } }

.esp-chargement { display: grid; justify-items: center; gap: 16px; padding: 12vh 0; color: var(--texte-2); }
.esp-roue { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ligne-forte); border-top-color: #fff; animation: esp-tourne 0.8s linear infinite; }
.esp-roue.petite { display: inline-block; width: 15px; height: 15px; border-width: 2px; vertical-align: -2px; margin-right: 10px; }
@keyframes esp-tourne { to { transform: rotate(360deg); } }

/* Cartes */
.esp-carte {
	background: linear-gradient(180deg, var(--carte-haut), var(--carte));
	border: 1px solid var(--ligne); border-radius: 24px; padding: 36px;
	box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}
.esp-carte + .esp-carte { margin-top: 18px; }
.esp-carte h1 { font-size: clamp(32px, 4vw, 46px); }
.esp-carte h2, .esp-panneau h2 { font-size: clamp(22px, 2.4vw, 28px); }
.esp-carte h3 { font-size: 21px; margin-top: 18px; }
.esp-surtitre { font: 500 13px/1 var(--mono); color: var(--texte-3); letter-spacing: 0.02em; margin-bottom: 10px; }
.esp-intro { color: var(--texte-2); font-size: 16px; margin-top: 12px; }
.esp-intro strong, .esp-liste strong, .esp-aide strong { color: #fff; font-weight: 600; }
.esp-petit { color: var(--texte-3); font-size: 14px; margin-top: 20px; }
.esp-petit a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.esp-petit code { font: 500 13px/1 var(--mono); color: #fff; background: rgba(255, 255, 255, 0.08); padding: 3px 6px; border-radius: 6px; }
.esp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.esp-actions-colonne { flex-direction: column; }
.btn-plein { width: 100%; }
.esp-icone { display: block; margin-bottom: 14px; opacity: 0.9; }
.esp-gros { font: 700 22px/1.3 var(--titres); }
.esp-mono { font-family: var(--mono); font-size: 13px; }
[hidden] { display: none !important; }

/* Connexion */
.esp-connexion { max-width: 520px; margin: 2vh auto 0; text-align: center; display: grid; justify-items: center; }
.esp-galet { margin-bottom: 22px; filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.35)); animation: flotte 6s ease-in-out infinite; }
.esp-connexion .btn { margin-top: 28px; }
.btn-discord { background: var(--blurple); color: #fff; }
.btn-discord:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px rgba(88, 101, 242, 0.18), 0 14px 50px rgba(88, 101, 242, 0.4); }
.esp-garanties { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; color: var(--texte-2); font-size: 14px; }
.esp-garanties li { display: flex; align-items: center; gap: 8px; justify-content: center; }
.esp-garanties img { flex: none; }

/* Bienvenue */
.esp-bienvenue { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.esp-avatar { width: 72px; height: 72px; border-radius: 50%; background: #1a1a1d; object-fit: cover; flex: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06); }
.esp-bienvenue-texte { flex: 1; min-width: 200px; }
.esp-bienvenue h1 { font-size: clamp(28px, 3.4vw, 40px); overflow-wrap: anywhere; }
.esp-pastille {
	display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 12px; border-radius: 999px;
	font-size: 13.5px; font-weight: 500; border: 1px solid var(--ligne-forte); color: var(--texte-2);
}
.esp-pastille::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #80848e; flex: none; }
.esp-pastille.ok { color: #b9f2cf; border-color: rgba(35, 165, 90, 0.45); background: rgba(35, 165, 90, 0.1); }
.esp-pastille.ok::before { background: #23a55a; box-shadow: 0 0 0 3px rgba(35, 165, 90, 0.2); }
.esp-pastille.ko { color: #ffd59e; border-color: rgba(240, 178, 50, 0.45); background: rgba(240, 178, 50, 0.08); }
.esp-pastille.ko::before { background: #f0b232; }
/* Admin : pastille pleine, blanche. */
.esp-pastille.admin { color: #000; font-weight: 700; border-color: #fff; background: #fff; box-shadow: 0 0 24px rgba(255, 255, 255, 0.25); }
.esp-pastille.admin::before { background: #000; }
/* Client : en blanc, comme le reste de la marque. */
.esp-pastille.client { color: #fff; font-weight: 600; border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.1); }
.esp-pastille.client::before { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18), 0 0 12px rgba(255, 255, 255, 0.6); }
.esp-bienvenue-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.esp-rejoindre { border-color: rgba(88, 101, 242, 0.45); }

/* Mes bots */
.esp-tete-section { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.esp-tete-section > div { flex: 1; min-width: 240px; }
.esp-mesbots .esp-message { margin-top: 16px; }
.esp-bots { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.esp-bots:empty { display: none; }
.esp-bot {
	width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; cursor: pointer;
	background: #08080a; border: 1px solid var(--ligne); border-radius: 18px; color: #fff; font: inherit;
	transition: border-color 0.2s ease, transform 0.25s var(--douce), background 0.2s ease;
}
.esp-bot:hover, .esp-bot:focus-visible { border-color: rgba(255, 255, 255, 0.4); background: #0d0d10; transform: translateY(-2px); }
.esp-bot-corps { flex: 1; min-width: 0; display: grid; gap: 3px; }
.esp-bot-corps strong { font: 700 17px/1.2 var(--titres); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esp-bot-corps small { color: var(--texte-3); font-size: 13px; }
.esp-fleche { color: var(--texte-3); font-size: 18px; transition: transform 0.25s var(--douce), color 0.2s ease; }
.esp-bot:hover .esp-fleche { transform: translateX(3px); color: #fff; }
.esp-vide { margin-top: 18px; padding: 22px; border-radius: 16px; border: 1px dashed var(--ligne-forte); color: var(--texte-2); }
.esp-vide .esp-actions { margin-top: 14px; }

/* Points de statut (bot) */
.point-statut { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: #80848e; }
.point-statut.en_ligne, .point-statut.online { background: #23a55a; box-shadow: 0 0 0 3px rgba(35, 165, 90, 0.2); }
.point-statut.idle, .point-statut.pause { background: #f0b232; }
.point-statut.dnd, .point-statut.suspendu, .point-statut.intents, .point-statut.token { background: #f23f43; }
.point-statut.demarrage { background: #80848e; animation: esp-clignote 0.9s steps(1) infinite; }
.point-statut.invisible { background: transparent; border: 2.5px solid #80848e; }
@keyframes esp-clignote { 50% { opacity: 0.3; } }
.esp-bot-etat { display: flex; align-items: center; gap: 8px; color: var(--texte-2); font-size: 14px; margin-top: 4px; flex-wrap: wrap; }

/* Statut Discord sur la photo d'un bot, comme dans Discord : rond vert (en ligne), lune jaune
   (inactif), rouge barré (ne pas déranger), anneau gris (invisible, hors ligne). Le contour prend
   la couleur du fond (--fond-photo), pour l'effet « découpé ». */
.esp-bot { --fond-photo: #08080a; }
.esp-bot:hover, .esp-bot:focus-visible { --fond-photo: #0d0d10; }
.esp-resume { --fond-photo: #101013; }
.esp-photo { position: relative; flex: none; display: inline-flex; }
.esp-presence {
	position: absolute; right: -2px; bottom: -2px; width: 19px; height: 19px; box-sizing: border-box; overflow: hidden;
	border-radius: 50%; border: 3px solid var(--fond-photo, #08080a); background: #80848e; transition: background-color 0.3s ease;
}
.esp-photo-grande .esp-presence { width: 21px; height: 21px; }
.esp-presence::after { content: ''; position: absolute; border-radius: 50%; background: var(--fond-photo, #08080a); }
.esp-presence.online { background: #23a55a; }
.esp-presence.online::after { display: none; }
.esp-presence.idle { background: #f0b232; }
.esp-presence.idle::after { width: 62%; height: 62%; top: -10%; left: -10%; }
.esp-presence.dnd { background: #f23f43; }
.esp-presence.dnd::after { left: 20%; right: 20%; top: 50%; height: 28%; transform: translateY(-50%); border-radius: 99px; }
.esp-presence.offline::after, .esp-presence.invisible::after { inset: 26%; }

/* Activer une licence */
.esp-licence { box-shadow: none; }
.esp-licence-tete { display: flex; gap: 16px; align-items: flex-start; }
.esp-licence-tete .esp-icone { margin: 4px 0 0; flex: none; }
.esp-licence-tete .esp-intro { margin-top: 6px; }
.esp-form-licence { display: flex; gap: 10px; margin-top: 20px; }
.esp-form-licence .esp-champ { flex: 1; min-width: 0; }
.esp-form-licence input, #esp-cle-bot { font: 500 16px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.esp-form-licence input::placeholder, #esp-cle-bot::placeholder { text-transform: none; letter-spacing: 0.02em; color: var(--texte-3); }
.esp-licence .esp-message { margin-top: 14px; }
.esp-licences { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ligne); }
.esp-licences ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.esp-licences li {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 14px; border-radius: 12px;
	background: #08080a; border: 1px solid var(--ligne); font-size: 14px; color: var(--texte-2);
}
.esp-licences code { font: 500 13.5px/1 var(--mono); color: #fff; }
.esp-licences .etat { margin-left: auto; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.esp-licences .etat.libre { color: #000; background: #fff; }
.esp-licences .etat.utilisee { color: var(--texte-2); background: rgba(255, 255, 255, 0.08); }
.esp-licences .etat.reservee { color: #ffd59e; background: rgba(240, 178, 50, 0.12); }
.esp-licences .etat.coupee { color: #ffc9cb; background: rgba(218, 55, 60, 0.12); }
.esp-licences .etat.actif { margin-left: 0; color: #b9f2cf; background: rgba(35, 165, 90, 0.12); }
.esp-licences .etat.inactif { margin-left: 0; color: #ffc9cb; background: rgba(218, 55, 60, 0.12); }
.esp-licence-actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }

/* Champs et messages */
.esp-champ {
	display: flex; align-items: center; gap: 8px;
	background: #08080a; border: 1px solid var(--ligne-forte); border-radius: 14px; padding: 0 14px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.esp-champ:focus-within { border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.07); }
.esp-champ input, .esp-champ textarea, .esp-champ select {
	flex: 1; width: 100%; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff;
	font: 500 15.5px/1.4 var(--corps); padding: 13px 0;
}
.esp-champ textarea { resize: vertical; min-height: 96px; }
.esp-champ select { appearance: none; cursor: pointer; }
.esp-champ select option { background: #111; }
.esp-champ.erreur { border-color: rgba(218, 55, 60, 0.75); animation: esp-secoue 0.4s ease; }
@keyframes esp-secoue { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
/* Token : masqué comme un mot de passe, sans en être un (rien n'est proposé à l'enregistrement). */
.esp-masque { -webkit-text-security: disc; font-family: var(--mono) !important; letter-spacing: 0.06em; }
.esp-masque.esp-visible { -webkit-text-security: none; }
.esp-oeil { background: none; border: 0; color: var(--texte-3); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; flex: none; }
.esp-oeil:hover, .esp-oeil[aria-pressed="true"] { color: #fff; }

.esp-message { font-size: 14.5px; padding: 12px 16px; border-radius: 14px; }
.esp-message.ok { color: #b9f2cf; background: rgba(35, 165, 90, 0.12); border: 1px solid rgba(35, 165, 90, 0.4); }
.esp-message.erreur { color: #ffc9cb; background: rgba(218, 55, 60, 0.12); border: 1px solid rgba(218, 55, 60, 0.4); }
.esp-message.info { color: #fff; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--ligne-forte); }

.esp-formulaire { display: grid; gap: 8px; margin-top: 22px; }
.esp-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 600; margin-top: 8px; }
.esp-compteur { font: 500 12px/1 var(--mono); color: var(--texte-3); }
.esp-aide { color: var(--texte-3); font-size: 13.5px; }
.esp-ligne { display: flex; gap: 10px; }
.esp-ligne .esp-champ { flex: 1; min-width: 0; }
.esp-formulaire .esp-actions { margin-top: 8px; }
.esp-separe { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--ligne); }
.esp-securite { display: flex; gap: 10px; align-items: flex-start; color: var(--texte-2); font-size: 13.5px; margin-top: 4px; }
.esp-securite img { flex: none; margin-top: 2px; }
.esp-lien { background: none; border: 0; padding: 4px 6px; color: var(--texte-3); font: 500 13px/1.2 var(--corps); cursor: pointer; border-radius: 8px; transition: color 0.2s ease, background 0.2s ease; }
.esp-lien:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.esp-lien.danger { color: #ffc9cb; background: rgba(218, 55, 60, 0.15); }

/* « Applications autorisées », dessinées comme dans les paramètres de Discord */
.esp-relie { box-shadow: none; }
.app-autorisee { margin-top: 20px; padding: 16px; border-radius: 14px; background: var(--discord-fond); border: 1px solid rgba(255, 255, 255, 0.06); }
.app-autorisee-chemin { font-size: 12px; font-weight: 700; color: #b5bac1; margin-bottom: 12px; }
.app-autorisee-ligne { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; background: #2b2d31; }
.app-autorisee-ligne img { border-radius: 50%; background: #1a1a1d; flex: none; }
.app-autorisee-ligne > div { flex: 1; min-width: 0; }
.app-autorisee-nom { font-weight: 700; color: #fff; }
.app-autorisee-detail { font-size: 12.5px; color: #b5bac1; }
.app-autorisee-retirer { flex: none; font-size: 12.5px; font-weight: 600; color: #fff; background: #da373c; padding: 6px 10px; border-radius: 4px; }

/* Fil : retour + titre de l'écran */
.esp-fil { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.esp-retour {
	background: none; border: 1px solid var(--ligne-forte); color: var(--texte-2); padding: 9px 14px; border-radius: 999px;
	font: 500 14px/1 var(--corps); cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease;
}
.esp-retour:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.esp-titre-ecran { font-size: clamp(26px, 3vw, 36px); }

/* Installation : progression et étapes */
.esp-progression { list-style: none; padding: 0; margin: 0 auto 28px; max-width: 640px; display: flex; justify-content: space-between; position: relative; }
.esp-progression::before { content: ''; position: absolute; left: 22px; right: 22px; top: 17px; height: 2px; background: var(--ligne-forte); }
.esp-progression::after {
	content: ''; position: absolute; left: 22px; top: 17px; height: 2px; background: #fff;
	width: calc((100% - 44px) * var(--avance, 0)); transition: width 0.6s var(--douce);
}
.esp-progression li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; width: 44px; }
.esp-progression .pastille {
	width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
	font: 600 14px/1 var(--mono); color: var(--texte-3); background: #0b0b0d; border: 2px solid var(--ligne-forte);
	transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--douce);
}
.esp-progression .nom { font-size: 12.5px; color: var(--texte-3); white-space: nowrap; transition: color 0.3s ease; }
.esp-progression .en-cours .pastille { border-color: #fff; color: #fff; transform: scale(1.08); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08); }
.esp-progression .en-cours .nom { color: #fff; font-weight: 600; }
.esp-progression .fait .pastille { background: #fff; border-color: #fff; color: #000; }
.esp-progression .fait .nom { color: var(--texte-2); }
.esp-etape { display: none; }
.esp-etape.actif { display: block; animation: esp-arrive 0.45s var(--douce); }
.esp-etroite { max-width: 600px; margin: 0 auto; }
.esp-deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 44px; align-items: center; }
.esp-liste { padding-left: 20px; margin: 18px 0 0; display: grid; gap: 10px; color: var(--texte-2); }
.esp-trouvee { margin-top: 22px; animation: esp-arrive 0.4s var(--douce); }

/* Le portail développeur de Discord, dessiné */
.portail { margin: 0; }
.portail-fenetre {
	background: #2b2d31; border: 1px solid #1e1f22; border-radius: 14px; padding: 22px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); font-size: 14px; color: #dbdee1;
	transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); animation: flotte 7s ease-in-out infinite;
}
.portail-titre { font: 700 17px/1.2 var(--corps); color: #fff; margin-bottom: 16px; }
.portail-label { display: block; font-size: 11.5px; font-weight: 700; color: #b5bac1; letter-spacing: 0.04em; margin-bottom: 6px; }
.portail-champ { background: #1e1f22; border-radius: 6px; padding: 10px 12px; color: #fff; }
.curseur { display: inline-block; width: 2px; height: 1em; background: #fff; vertical-align: -0.15em; margin-left: 1px; animation: esp-clignote 1s steps(1) infinite; }
.portail-case { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; color: #b5bac1; }
.coche { flex: none; width: 18px; height: 18px; border-radius: 4px; background: var(--blurple); color: #fff; display: grid; place-items: center; font-size: 12px; }
.portail-boutons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.portail-btn { padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 13.5px; color: #fff; }
.portail-btn.gris { background: #4e5058; }
.portail-btn.bleu { background: var(--blurple); }
.portail-btn.vert { background: #248046; }
.pulse { animation: esp-pulse 1.8s var(--douce) infinite; }
@keyframes esp-pulse { 0% { box-shadow: 0 0 0 0 rgba(88, 101, 242, 0.65); } 100% { box-shadow: 0 0 0 12px rgba(88, 101, 242, 0); } }
.portail-option { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid #3f4147; }
.portail-option:first-of-type { border-top: 0; }
.interrupteur { width: 40px; height: 24px; border-radius: 999px; background: #80848e; position: relative; flex: none; }
.interrupteur::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.3s var(--douce); }
.interrupteur.allume { background: #23a55a; }
.interrupteur.allume::after { transform: translateX(16px); }
.portail-aide { font-size: 12.5px; color: #b5bac1; margin: -6px 0 12px; }
.portail-token { font: 500 13px/1 var(--mono); background: #1e1f22; border-radius: 6px; padding: 12px; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.portail figcaption { color: var(--texte-3); font-size: 13px; text-align: center; margin-top: 16px; }

/* Vérifications (options, lancement) */
.esp-verifs { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.esp-verifs li {
	display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
	background: #08080a; border: 1px solid var(--ligne); color: var(--texte-2);
}
.esp-verifs li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.esp-verifs strong { color: #fff; font-weight: 600; }
.esp-verifs small { color: var(--texte-3); font-size: 13px; }
.esp-verifs li.ok { color: #fff; }
.esp-verifs li.ko { color: #fff; border-color: rgba(218, 55, 60, 0.5); background: rgba(218, 55, 60, 0.08); }
.esp-verifs .etat { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 2px solid var(--ligne-forte); }
.esp-verifs .attente .etat { border-top-color: #fff; animation: esp-tourne 0.8s linear infinite; }
.esp-verifs .inconnu .etat { color: var(--texte-2); }
.esp-verifs .ok .etat { background: #23a55a; border-color: #23a55a; color: #fff; animation: esp-pop 0.35s var(--douce); }
.esp-verifs .ko .etat { background: #da373c; border-color: #da373c; color: #fff; animation: esp-pop 0.35s var(--douce); }
@keyframes esp-pop { from { transform: scale(0.4); } }
#esp-options-message { margin-top: 14px; }
.esp-reussite, .esp-echec { margin-top: 22px; animation: esp-arrive 0.5s var(--douce); }
.esp-echec .esp-message { margin-top: 12px; }
.esp-bot-carte { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--discord-fond); border: 1px solid rgba(255, 255, 255, 0.06); }
.esp-bot-avatar { border-radius: 50%; background: #1a1a1d; flex: none; object-fit: cover; }
.esp-bot-nom { font: 700 18px/1.2 var(--titres); display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }

/* Panel d'un bot */
.esp-resume {
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 22px; border-radius: 20px; margin-bottom: 22px;
	background: linear-gradient(180deg, var(--carte-haut), var(--carte)); border: 1px solid var(--ligne);
}
.esp-resume-texte { flex: 1; min-width: 180px; }
.esp-resume-texte .esp-bot-nom { font-size: 22px; }
.esp-resume-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.esp-tableau { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; align-items: start; }
.esp-menu { position: sticky; top: 108px; display: grid; gap: 4px; }
.esp-menu button, .esp-menu a {
	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;
}
.esp-menu button:hover, .esp-menu a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.esp-menu .actif { background: rgba(255, 255, 255, 0.09); color: #fff; }
.esp-menu img { opacity: 0.85; flex: none; }
.esp-panneau { display: none; padding: 30px; border-radius: 22px; background: linear-gradient(180deg, var(--carte-haut), var(--carte)); border: 1px solid var(--ligne); }
.esp-panneau.actif { display: block; animation: esp-arrive 0.35s var(--douce); }
.esp-panneau > .esp-formulaire:first-of-type { margin-top: 18px; }
.esp-maj { text-align: right; margin-top: 12px; }
.esp-grille-profil { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; align-items: start; }
.esp-images { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.esp-images .esp-formulaire { margin-top: 14px; }
.esp-depot {
	display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 12px; border-radius: 14px;
	border: 1px dashed var(--ligne-forte); color: var(--texte-2); font-size: 14px; cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.esp-depot:hover, .esp-depot:focus-within { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.03); color: #fff; }
.esp-depot img { opacity: 0.8; }
.esp-reglages > .esp-aide { margin-top: 8px; }
.esp-choix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.esp-choix label { position: relative; }
.esp-choix input { position: absolute; opacity: 0; pointer-events: none; }
.esp-choix span {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
	border: 1px solid var(--ligne-forte); color: var(--texte-2); font-size: 14.5px; cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.esp-choix input:checked + span { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.06); }
.esp-choix input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

/* Aperçu du profil, comme sur Discord */
.apercu { position: sticky; top: 108px; }
.apercu-carte { margin-top: 10px; border-radius: 16px; overflow: hidden; background: #232428; border: 1px solid #2c2d32; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.apercu-banniere { height: 104px; background: linear-gradient(135deg, #2a2b30, #111113) center / cover no-repeat; }
.apercu-avatar-zone { position: relative; width: 92px; margin: -46px 0 0 16px; }
.apercu-avatar { width: 92px; height: 92px; border-radius: 50%; border: 6px solid #232428; background: #1a1a1d; object-fit: cover; }
.apercu-statut { position: absolute; right: 2px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; border: 5px solid #232428; background: #80848e; }
.apercu-statut.online { background: #23a55a; }
.apercu-statut.idle { background: #f0b232; }
.apercu-statut.dnd { background: #f23f43; }
.apercu-statut.invisible { background: #80848e; }
.apercu-corps { padding: 10px 16px 18px; }
.apercu-nom { font: 700 20px/1.2 var(--titres); display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.apercu-activite { color: #b5bac1; font-size: 13.5px; margin-top: 4px; min-height: 1.4em; overflow-wrap: anywhere; }
.apercu-bloc { margin-top: 14px; padding: 12px; border-radius: 10px; background: #1a1b1e; }
.apercu-titre { font-size: 12px; font-weight: 700; color: #b5bac1; letter-spacing: 0.02em; }
.apercu-desc { font-size: 13.5px; color: #dbdee1; margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.4em; }

/* Owners et whitelist */
.esp-deux-listes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 22px; }
.esp-deux-listes h3 { font-size: 19px; margin-bottom: 12px; }
.esp-personnes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.esp-personnes li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #08080a; border: 1px solid var(--ligne); }
.esp-personnes li.vide { color: var(--texte-3); font-size: 14px; justify-content: center; border-style: dashed; }
.esp-personnes img { border-radius: 50%; background: #1a1a1d; flex: none; object-fit: cover; }
.esp-personnes li > span { flex: 1; min-width: 0; display: grid; }
.esp-personnes strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esp-personnes small { color: var(--texte-3); font: 500 12px/1.4 var(--mono); overflow-wrap: anywhere; }
.esp-ajout { display: flex; gap: 8px; margin-top: 10px; }
.esp-ajout .esp-champ { flex: 1; min-width: 0; }
.esp-ajout input { font-family: var(--mono); }
[data-liste] .esp-message { margin-top: 10px; }
.esp-panneau > .esp-aide { margin-top: 18px; }

/* Abonnement */
.esp-abonnement { display: flex; gap: 28px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.anneau {
	width: 140px; height: 140px; border-radius: 50%; flex: none; display: grid; place-content: center; text-align: center;
	background: radial-gradient(closest-side, #0c0c0e 78%, transparent 79%), conic-gradient(#fff calc(var(--p, 0) * 360deg), rgba(255, 255, 255, 0.1) 0);
}
.anneau span { font: 800 40px/1 var(--titres); }
.anneau small { color: var(--texte-3); font-size: 13px; }
.esp-abonnement > div:last-child { flex: 1; min-width: 220px; }
.esp-licences-bot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.esp-licences-bot:empty { display: none; }

/* Serveurs */
.esp-serveurs { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.esp-serveurs li { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px; border-radius: 14px; background: #08080a; border: 1px solid var(--ligne); }
.esp-serveur-corps { flex: 1; min-width: 0; display: grid; gap: 3px; }
.esp-serveur-proprio { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esp-serveur-proprio img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; flex: none; }
.esp-serveur-corps .esp-message { margin-top: 6px; }
.esp-serveur-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }

/* Statistiques d'un bot : chiffres, courbe des membres (SVG), modération */
.esp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 18px; }
.esp-stat { display: grid; gap: 4px; padding: 16px; border-radius: 14px; background: #08080a; border: 1px solid var(--ligne); }
.esp-stat-nombre { font: 800 28px/1 var(--titres); letter-spacing: -0.02em; }
.esp-stat-nom { color: var(--texte-2); font-size: 13.5px; }
.esp-stat-evolution { font: 500 12.5px/1.2 var(--mono); color: var(--texte-3); }
.esp-stat-evolution.hausse { color: #57d68d; }
.esp-stat-evolution.baisse { color: #ff7a7d; }
.esp-stat-fort { border-color: rgba(255, 255, 255, 0.28); background: linear-gradient(180deg, #121215, #0a0a0c); }
.esp-courbe { margin-top: 14px; padding: 16px 16px 12px; border-radius: 14px; background: #08080a; border: 1px solid var(--ligne); }
.esp-courbe-titre { color: var(--texte-2); font-size: 13.5px; }
.esp-courbe-zone { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; margin-top: 10px; }
.esp-courbe-zone svg { display: block; width: 100%; height: 150px; }
.esp-courbe-aire { fill: rgba(255, 255, 255, 0.07); }
.esp-courbe-ligne { fill: none; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.esp-courbe-axe { display: flex; flex-direction: column; justify-content: space-between; height: 150px; text-align: right; font: 500 11px/1 var(--mono); color: var(--texte-3); padding: 4px 0; }
.esp-courbe-dates { grid-column: 2; display: flex; justify-content: space-between; margin-top: 8px; font: 500 11.5px/1 var(--mono); color: var(--texte-3); }
.esp-stats-titre { margin-top: 26px; font-size: 17px; }
.esp-stats-moderation { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
#esp-mod-aide, #esp-mod-vide { margin-top: 10px; }
.esp-serveurs strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esp-serveurs small { color: var(--texte-3); font-size: 13px; }
.esp-serveur-icone { width: 44px; height: 44px; border-radius: 14px; background: #1e1f22; display: grid; place-items: center; font-weight: 700; flex: none; object-fit: cover; }

/* Petite notification */
.esp-toast {
	position: fixed; left: 50%; bottom: 28px; z-index: 80; translate: -50% 0;
	padding: 12px 18px; border-radius: 14px; background: #fff; color: #000; font-weight: 600; font-size: 14.5px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); animation: esp-toast 0.35s var(--douce);
}
@keyframes esp-toast { from { opacity: 0; transform: translateY(12px); } }

/* Tablette et téléphone */
@media (max-width: 900px) {
	.esp-deux, .esp-grille-profil, .esp-deux-listes { grid-template-columns: minmax(0, 1fr); }
	.portail { order: -1; }
	.portail-fenetre { transform: none; }
	.apercu { position: static; }
	.esp-tableau { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.esp-menu { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 6px; scrollbar-width: none; }
	.esp-menu button, .esp-menu a { width: auto; white-space: nowrap; }
}
@media (max-width: 600px) {
	.esp-main { padding-top: 104px; }
	.esp-carte { padding: 24px 18px; border-radius: 20px; }
	.esp-panneau { padding: 22px 16px; }
	.esp-actions .btn, .esp-bienvenue .btn, .esp-bienvenue-actions { flex: 1 1 100%; }
	.esp-form-licence, .esp-ligne, .esp-ajout { flex-direction: column; }
	.esp-licence-tete .esp-icone { display: none; }
	.esp-progression .nom { display: none; }
	.esp-images { grid-template-columns: minmax(0, 1fr); }
	.app-autorisee-ligne { flex-wrap: wrap; }
	.esp-tete-section .btn { width: 100%; }
	.esp-licences .etat { margin-left: 0; }
	/* Les boutons d'un serveur passent sous son nom, alignés avec le texte. */
	.esp-serveur-actions { flex: 1 1 100%; padding-left: 58px; }
}
