/* P212 Space — feuille de style. Auteur : Aziz Mernissi. */
:root {
  --fond: #07080c; --panneau: #0f1119; --panneau2: #151826; --panneau3: #1b1f30; --bord: #232738; --bord2: #2f3449;
  --texte: #e9e7df; --sourd: #9a9bac; --or: #d4af37; --or2: #f1d27a; --or-fond: rgba(212, 175, 55, .12);
  --vert: #2ecc71; --rouge: #e5484d; --bleu: #4ea1ff; --violet: #8b7cf6;
  --rayon: 14px; --ombre: 0 10px 30px rgba(0, 0, 0, .35);
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Arabic", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police); font-size: 15.5px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
body.plein { height: 100dvh; overflow: hidden; }
a { color: var(--or2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; } h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sourd); }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
.sourd { color: var(--sourd); } .petit { font-size: .86rem; } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; word-break: break-all; }
.vide { color: var(--sourd); text-align: center; padding: 2rem; border: 1px dashed var(--bord2); border-radius: var(--rayon); }
.en-ligne { color: var(--vert); font-size: .85rem; }
.etiquette { display: inline-block; font-size: .75rem; padding: .15em .6em; border-radius: 999px; background: var(--panneau3); color: var(--sourd); }
.etiquette.or { background: var(--or-fond); color: var(--or2); }

/* ---------- boutons et formulaires ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .4em; background: linear-gradient(135deg, var(--or2), var(--or)); color: #1a1405; font-weight: 700; border: 0; border-radius: 10px; padding: .6em 1.1em; cursor: pointer; font-size: .95rem; text-decoration: none !important; transition: transform .1s, filter .15s; }
.bouton:hover { filter: brightness(1.07); transform: translateY(-1px); }
.bouton:disabled { opacity: .5; cursor: default; transform: none; }
.bouton.sombre { background: var(--panneau3); color: var(--texte); border: 1px solid var(--bord2); }
.bouton.rouge { background: var(--rouge); color: #fff; }
.bouton.grand { padding: .8em 1.5em; font-size: 1.05rem; }
.bouton.petit { padding: .35em .8em; font-size: .82rem; border-radius: 8px; }
.icone { background: none; border: 0; color: var(--texte); cursor: pointer; font-size: 1.05rem; padding: .3em .45em; border-radius: 8px; line-height: 1; position: relative; text-decoration: none !important; }
.icone:hover { background: var(--panneau3); }
.lien-bouton { background: none; border: 0; color: var(--or2); cursor: pointer; padding: 0; font-size: .85rem; }
input, select, textarea { font: inherit; color: var(--texte); background: var(--panneau2); border: 1px solid var(--bord2); border-radius: 10px; padding: .6em .8em; width: 100%; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--or); box-shadow: 0 0 0 3px var(--or-fond); }
input[type=file] { padding: .4em; }
input.court { width: 6em; }
label { display: flex; flex-direction: column; gap: .3em; font-size: .9rem; color: var(--sourd); }
label > input, label > select, label > textarea { color: var(--texte); }
fieldset { border: 1px solid var(--bord); border-radius: 10px; padding: .6em .9em; } legend { color: var(--sourd); font-size: .85rem; padding: 0 .4em; }
.ligne-form { display: flex; gap: .6em; flex-wrap: wrap; align-items: center; margin-bottom: .8em; }
.ligne-form > input, .ligne-form > select { flex: 1; min-width: 8em; width: auto; }
.en-ligne-form { display: inline-flex; gap: .4em; align-items: center; }
.form-colonne { display: flex; flex-direction: column; gap: .9em; }
.prefixe { display: flex; align-items: center; background: var(--panneau2); border: 1px solid var(--bord2); border-radius: 10px; padding-inline-start: .8em; }
.prefixe span { color: var(--sourd); } .prefixe input { border: 0; background: none; padding-inline-start: .2em; }
.prefixe:focus-within { border-color: var(--or); }
.code-saisie { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-family: ui-monospace, monospace; }
.copier { display: flex; gap: .4em; } .copier input { font-size: .82rem; }
.separateur { display: flex; align-items: center; gap: .8em; color: var(--sourd); font-size: .8rem; margin: 1em 0; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--bord2); }
.avis { margin: .8em auto; max-width: 1100px; padding: .7em 1em; border-radius: 10px; background: var(--or-fond); color: var(--or2); border: 1px solid rgba(212,175,55,.35); }
.avis.erreur { background: rgba(229,72,77,.12); color: #ff8a8e; border-color: rgba(229,72,77,.4); }
.avis.succes { background: rgba(46,204,113,.12); color: #7fe3a8; border-color: rgba(46,204,113,.35); }

/* ---------- en-tête et pied ---------- */
.entete { display: flex; align-items: center; gap: 1.2rem; padding: .7rem 1.2rem; border-bottom: 1px solid var(--bord); background: rgba(12,14,21,.85); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.marque { display: inline-flex; align-items: center; gap: .5em; font-weight: 800; font-size: 1.1rem; color: var(--texte); text-decoration: none !important; letter-spacing: -.01em; }
.marque img { border-radius: 8px; } .marque em { font-style: normal; color: var(--or2); }
.nav { display: flex; gap: .2em; flex: 1; }
.nav a { color: var(--sourd); padding: .4em .7em; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.nav a:hover { color: var(--texte); background: var(--panneau2); text-decoration: none; }
.entete-droite { display: flex; align-items: center; gap: .5em; margin-inline-start: auto; }
.menu-langue { position: relative; } .menu-langue summary { list-style: none; cursor: pointer; color: var(--sourd); font-size: .8rem; font-weight: 700; padding: .4em .6em; border: 1px solid var(--bord2); border-radius: 8px; }
.menu-langue summary::-webkit-details-marker { display: none; }
.menu-langue div { position: absolute; inset-inline-end: 0; top: 110%; background: var(--panneau2); border: 1px solid var(--bord2); border-radius: 10px; padding: .3em; display: flex; flex-direction: column; min-width: 9em; z-index: 30; box-shadow: var(--ombre); }
.menu-langue div a { padding: .4em .8em; border-radius: 6px; color: var(--texte); font-size: .9rem; } .menu-langue div a:hover, .menu-langue div a.actif { background: var(--panneau3); text-decoration: none; }
.cloche { position: relative; font-size: 1.1rem; text-decoration: none !important; }
.cloche b, .icone b { position: absolute; top: -4px; inset-inline-end: -6px; background: var(--rouge); color: #fff; font-size: .65rem; border-radius: 999px; padding: 0 .4em; min-width: 1.4em; text-align: center; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--panneau3), var(--bord2)); color: var(--or2); font-weight: 800; font-size: .95rem; flex: none; }
.avatar.grand { width: 84px; height: 84px; font-size: 2rem; }
.avatar-lien img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; }
.page { width: min(1100px, 100% - 2rem); margin: 1.5rem auto; flex: 1; }
.etroit { width: min(520px, 100%); margin: 2rem auto; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.pied { border-top: 1px solid var(--bord); padding: 1rem 1.2rem; color: var(--sourd); font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5em; }

/* ---------- accueil ---------- */
.heros { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: start; padding: 2rem 0; }
.sur-titre { color: var(--or2); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.heros h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); background: linear-gradient(135deg, #fff, var(--or2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chapo { font-size: 1.12rem; color: #c9c8d2; }
.heros-actions { display: flex; align-items: center; gap: 1em; margin: 1.2em 0 2em; }
.atouts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7em; }
.atouts li { background: var(--panneau); border: 1px solid var(--bord); border-radius: var(--rayon); padding: .9em 1em; display: flex; flex-direction: column; gap: .2em; }
.atouts li span { color: var(--sourd); font-size: .88rem; }
.connexion-carte { background: var(--panneau); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.3rem; box-shadow: var(--ombre); margin-bottom: 1.2rem; }
.cx-boutons { display: flex; flex-direction: column; gap: .6em; }
.cx-boutons .bouton { width: 100%; }
.cx-telegram { display: flex; justify-content: center; min-height: 44px; }
.bloc { margin: 2.5rem 0; }
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9em; }
.carte { display: flex; flex-direction: column; gap: .35em; background: var(--panneau); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1em; color: var(--texte); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.carte:hover { border-color: var(--or); transform: translateY(-2px); }
.carte span { color: var(--sourd); font-size: .9rem; }
.carte.room.en_cours { border-color: rgba(229,72,77,.5); }
.liens-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6em; }
.lien-carte { background: var(--panneau2); border: 1px solid var(--bord); border-radius: 10px; padding: .7em .9em; color: var(--texte); font-weight: 600; font-size: .9rem; text-decoration: none !important; }
.lien-carte:hover { border-color: var(--or); }

/* ---------- l'application (espace) ---------- */
.app { display: grid; grid-template-columns: 270px 1fr 260px; height: 100dvh; overflow: hidden; }
.gauche, .droite { background: var(--panneau); border-inline-end: 1px solid var(--bord); display: flex; flex-direction: column; min-height: 0; }
.droite { border-inline-end: 0; border-inline-start: 1px solid var(--bord); overflow-y: auto; padding: 1rem; gap: 1rem; }
.gauche-haut { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem .5rem; }
.recherche { padding: 0 .8rem .6rem; position: relative; } .recherche input { padding: .5em .8em; font-size: .9rem; border-radius: 10px; }
.resultats { position: absolute; left: .8rem; right: .8rem; top: 100%; background: var(--panneau2); border: 1px solid var(--bord2); border-radius: 10px; z-index: 40; box-shadow: var(--ombre); max-height: 50vh; overflow: auto; }
.resultats a, .mentions button { display: flex; align-items: center; gap: .6em; padding: .5em .8em; color: var(--texte); width: 100%; background: none; border: 0; text-align: start; cursor: pointer; font: inherit; }
.resultats a:hover, .mentions button:hover, .mentions button.actif { background: var(--panneau3); text-decoration: none; }
.liste-salons { flex: 1; overflow-y: auto; padding: .4rem .6rem 1rem; }
.liste-salons h4 { display: flex; align-items: center; justify-content: space-between; margin: 1em .5em .4em; }
.liste-salons ul { list-style: none; margin: 0; padding: 0; }
.liste-salons li a { display: flex; align-items: center; gap: .55em; padding: .45em .6em; border-radius: 9px; color: #cfd0dc; font-weight: 500; font-size: .93rem; text-decoration: none !important; }
.liste-salons li a:hover { background: var(--panneau2); }
.liste-salons li a.actif { background: var(--or-fond); color: var(--or2); }
.liste-salons li a .em { width: 1.4em; text-align: center; flex: none; }
.liste-salons li a .nom { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-salons li a .non-lus { background: var(--or); color: #1a1405; font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 0 .5em; min-width: 1.5em; text-align: center; }
.liste-salons li a.canal .nom { font-weight: 700; }
.liste-salons li a img, .liste-salons li a .avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; font-size: .75rem; }
.liste-salons li a .point { width: 8px; height: 8px; border-radius: 50%; background: var(--bord2); flex: none; } .liste-salons li a .point.on { background: var(--vert); }
.liste-vide { padding: .3em .8em; }
.liens-officiels a { font-size: .86rem !important; color: var(--sourd) !important; }
.gauche-bas { display: flex; align-items: center; gap: .3em; padding: .6rem .8rem; border-top: 1px solid var(--bord); }
.moi { display: flex; align-items: center; gap: .6em; flex: 1; color: var(--texte); text-decoration: none !important; min-width: 0; }
.moi img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.moi span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; } .moi b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .moi small { color: var(--sourd); font-size: .75rem; }
.centre { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--fond); position: relative; }
.salon-entete { display: flex; align-items: center; gap: .8em; padding: .7rem 1rem; border-bottom: 1px solid var(--bord); background: rgba(12,14,21,.85); backdrop-filter: blur(10px); }
.salon-titre { flex: 1; min-width: 0; } .salon-titre h2 { margin: 0; font-size: 1.05rem; } .salon-titre p { margin: 0; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salon-actions { display: flex; align-items: center; gap: .2em; }
.seulement-mobile { display: none; }
.epingles { padding: .5em 1rem; background: var(--or-fond); border-bottom: 1px solid rgba(212,175,55,.25); font-size: .85rem; color: var(--or2); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.messages { flex: 1; overflow-y: auto; padding: .8rem 1rem; scroll-behavior: smooth; overscroll-behavior: contain; }
.charger { text-align: center; padding: .5em; }
.msg { display: flex; gap: .7em; padding: .3em .5em; border-radius: 10px; position: relative; animation: apparait .18s ease-out; }
@keyframes apparait { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.msg:hover { background: var(--panneau); }
.msg.suite { margin-top: -.3em; } .msg.suite .msg-avatar { visibility: hidden; height: 0; } .msg.suite .msg-entete { display: none; }
.msg-avatar img, .msg-avatar .avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.msg-corps { flex: 1; min-width: 0; }
.msg-entete { display: flex; align-items: baseline; gap: .5em; font-size: .9rem; }
.msg-entete b { color: #fff; } .msg-entete b.equipe { color: var(--or2); } .msg-entete small { color: var(--sourd); font-size: .75rem; }
.msg-entete .niveau { font-size: .68rem; background: var(--panneau3); color: var(--sourd); padding: 0 .45em; border-radius: 6px; }
.msg-texte { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-texte a { text-decoration: underline; } .msg-texte code { background: var(--panneau3); padding: .05em .35em; border-radius: 5px; font-size: .9em; }
.msg-texte .mention { color: var(--or2); font-weight: 600; background: var(--or-fond); border-radius: 5px; padding: 0 .25em; }
.msg-image { max-height: 360px; border-radius: 10px; margin-top: .4em; cursor: zoom-in; display: block; }
.msg-reponse { font-size: .8rem; color: var(--sourd); border-inline-start: 3px solid var(--bord2); padding-inline-start: .6em; margin-bottom: .2em; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-reponse b { color: var(--or2); }
.msg.canal { background: var(--panneau); border: 1px solid var(--bord); padding: .9em 1em; margin: .6em 0; }
.msg.canal .msg-titre { font-size: 1.15rem; font-weight: 800; margin: .2em 0 .4em; color: #fff; }
.msg.canal .msg-image { max-height: 480px; width: 100%; object-fit: cover; }
.boutons-liens { display: flex; flex-wrap: wrap; gap: .5em; margin-top: .6em; }
.apercu-lien { display: flex; gap: .8em; margin-top: .5em; border: 1px solid var(--bord2); border-radius: 10px; overflow: hidden; background: var(--panneau2); color: var(--texte); text-decoration: none !important; max-width: 520px; }
.apercu-lien img { width: 110px; height: 90px; object-fit: cover; flex: none; } .apercu-lien div { padding: .5em .7em .5em 0; min-width: 0; }
.apercu-lien b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .apercu-lien span { font-size: .8rem; color: var(--sourd); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .apercu-lien small { color: var(--or2); font-size: .72rem; }
.reactions { display: flex; flex-wrap: wrap; gap: .3em; margin-top: .3em; }
.reactions button { background: var(--panneau2); border: 1px solid var(--bord2); border-radius: 999px; padding: .1em .55em; cursor: pointer; font-size: .85rem; color: var(--texte); }
.reactions button.moi { border-color: var(--or); background: var(--or-fond); }
.msg-outils { position: absolute; top: -12px; inset-inline-end: 10px; display: none; background: var(--panneau2); border: 1px solid var(--bord2); border-radius: 8px; padding: .1em; box-shadow: var(--ombre); z-index: 2; }
.msg:hover .msg-outils, .msg.ouvert .msg-outils { display: flex; }
.msg-outils button { background: none; border: 0; cursor: pointer; padding: .25em .4em; font-size: .9rem; border-radius: 6px; color: var(--texte); } .msg-outils button:hover { background: var(--panneau3); }
.msg.supprime .msg-texte { color: var(--sourd); font-style: italic; }
.msg.cible { background: var(--or-fond); }
.jour { text-align: center; color: var(--sourd); font-size: .75rem; margin: 1em 0 .5em; display: flex; align-items: center; gap: .8em; }
.jour::before, .jour::after { content: ""; flex: 1; height: 1px; background: var(--bord); }
.frappe { height: 1.3em; padding: 0 1rem; font-size: .78rem; }
.nouveaux { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%); z-index: 3; }
.composeur { padding: .5rem .8rem calc(.7rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--bord); background: var(--panneau); position: relative; }
.composeur-ligne { display: flex; align-items: flex-end; gap: .4em; }
.composeur textarea { flex: 1; resize: none; max-height: 160px; border-radius: 14px; padding: .6em .9em; line-height: 1.4; }
.envoyer { border-radius: 50%; width: 40px; height: 40px; padding: 0; font-size: 1.1rem; flex: none; }
.reponse-a, .apercu-image { display: flex; align-items: center; gap: .5em; font-size: .82rem; color: var(--sourd); padding: .3em .6em; }
.reponse-a span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-inline-start: 3px solid var(--or); padding-inline-start: .6em; }
.apercu-image img { height: 60px; border-radius: 8px; }
.emojis { position: absolute; bottom: 100%; inset-inline-end: 1rem; background: var(--panneau2); border: 1px solid var(--bord2); border-radius: 12px; padding: .4em; display: flex; flex-wrap: wrap; gap: .2em; width: 260px; box-shadow: var(--ombre); z-index: 5; }
.emojis button { background: none; border: 0; font-size: 1.4rem; cursor: pointer; padding: .15em; border-radius: 8px; } .emojis button:hover { background: var(--panneau3); }
.mentions { position: absolute; bottom: 100%; inset-inline-start: 1rem; background: var(--panneau2); border: 1px solid var(--bord2); border-radius: 12px; min-width: 240px; box-shadow: var(--ombre); z-index: 5; overflow: hidden; }
.mentions img, .mentions .avatar { width: 26px; height: 26px; border-radius: 50%; font-size: .75rem; }
.lecture-seule { text-align: center; font-size: .85rem; margin: .4em 0 0; }
.droite-section ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2em; }
.membre-ligne { display: flex; align-items: center; gap: .6em; padding: .35em .4em; border-radius: 8px; color: var(--texte); text-decoration: none !important; min-width: 0; }
.membre-ligne:hover { background: var(--panneau2); }
.membre-ligne img, .membre-ligne .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; font-size: .8rem; }
.membre-ligne span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; } .membre-ligne b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .membre-ligne small { color: var(--sourd); font-size: .72rem; }
.notif { display: flex; flex-direction: column; gap: .15em; padding: .5em .6em; border-radius: 8px; color: var(--texte); font-size: .85rem; text-decoration: none !important; border-inline-start: 3px solid transparent; }
.notif:hover { background: var(--panneau2); } .notif.non-lue { border-color: var(--or); background: var(--or-fond); } .notif small { color: var(--sourd); font-size: .72rem; }
.voile { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 45; }
.toasts { position: fixed; top: 1rem; inset-inline-end: 1rem; display: flex; flex-direction: column; gap: .5em; z-index: 100; pointer-events: none; }
.toast { background: var(--panneau2); border: 1px solid var(--bord2); border-inline-start: 3px solid var(--or); border-radius: 10px; padding: .6em .9em; box-shadow: var(--ombre); font-size: .88rem; max-width: 320px; animation: apparait .2s; pointer-events: auto; cursor: pointer; }
.toast.erreur { border-inline-start-color: var(--rouge); }
.modale { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modale-corps { background: var(--panneau); border: 1px solid var(--bord2); border-radius: var(--rayon); max-width: min(900px, 100%); max-height: 100%; overflow: auto; position: relative; padding: 1.2rem; }
.modale-corps .fermer { position: absolute; top: .4em; inset-inline-end: .4em; }
.modale-corps img.pleine { max-height: 85vh; display: block; margin: auto; border-radius: 10px; }

/* ---------- room audio ---------- */
.room-page { display: grid; grid-template-columns: 1fr 340px; height: calc(100dvh - 58px); min-height: 0; }
.room-scene { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 1rem 1.3rem; gap: 1rem; }
.room-entete { display: flex; align-items: center; gap: .8em; } .room-entete h1 { margin: 0; font-size: 1.3rem; } .room-entete div { flex: 1; }
.room-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .8em; }
.orateur { display: flex; flex-direction: column; align-items: center; gap: .4em; background: var(--panneau); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1em .6em; text-align: center; position: relative; }
.orateur img, .orateur .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; font-size: 1.5rem; border: 3px solid transparent; transition: border-color .15s, box-shadow .15s; }
.orateur.parle img, .orateur.parle .avatar { border-color: var(--vert); box-shadow: 0 0 0 4px rgba(46,204,113,.25); }
.orateur b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; } .orateur small { color: var(--sourd); font-size: .72rem; }
.orateur .micro-off { position: absolute; top: .5em; inset-inline-end: .5em; font-size: .8rem; }
.orateur .actions { display: flex; gap: .2em; flex-wrap: wrap; justify-content: center; }
.auditeurs { display: flex; flex-wrap: wrap; gap: .5em; }
.auditeur { display: inline-flex; align-items: center; gap: .4em; background: var(--panneau); border: 1px solid var(--bord); border-radius: 999px; padding: .25em .7em .25em .3em; font-size: .85rem; }
.auditeur img, .auditeur .avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; font-size: .75rem; }
.auditeur.main { border-color: var(--or); background: var(--or-fond); }
.room-controles { display: flex; gap: .6em; flex-wrap: wrap; align-items: center; padding: .6em 0; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--fond) 30%); }
.room-chat { border-inline-start: 1px solid var(--bord); display: flex; flex-direction: column; min-height: 0; background: var(--panneau); }
.room-chat h4 { padding: .8rem 1rem 0; margin: 0; } .room-chat .messages { padding: .5rem .8rem; } .room-chat .msg-avatar img, .room-chat .msg-avatar .avatar { width: 28px; height: 28px; }

/* ---------- classement, profil, airdrop, admin ---------- */
.moi-carte { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1em; background: var(--panneau); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.2rem; margin-bottom: 1rem; }
.moi-carte > div { display: flex; flex-direction: column; } .moi-carte .barre, .moi-carte .badges { grid-column: 1 / -1; }
.grand-chiffre { font-size: 1.8rem; color: var(--or2); }
.barre { position: relative; height: 10px; background: var(--panneau3); border-radius: 999px; overflow: visible; margin: .4em 0 1.2em; }
.barre span { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--or), var(--or2)); border-radius: 999px; } .barre small { position: absolute; top: 14px; inset-inline-start: 0; color: var(--sourd); font-size: .75rem; }
.badges { display: flex; flex-wrap: wrap; gap: .4em; margin: .5em 0; }
.badge { background: var(--or-fond); color: var(--or2); border: 1px solid rgba(212,175,55,.35); border-radius: 999px; padding: .15em .7em; font-size: .78rem; font-weight: 600; }
.onglets { display: flex; gap: .3em; margin: 1em 0; border-bottom: 1px solid var(--bord); }
.onglets button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--sourd); padding: .5em .9em; cursor: pointer; font: inherit; font-weight: 600; }
.onglets button.actif { color: var(--or2); border-bottom-color: var(--or); }
.classement { list-style: none; margin: 0; padding: 0; } .classement li { display: flex; align-items: center; gap: .8em; padding: .4em .6em; border-radius: 10px; }
.classement li:nth-child(odd) { background: var(--panneau); } .classement li.moi { outline: 1px solid var(--or); }
.classement .rang { width: 2em; text-align: center; color: var(--sourd); font-weight: 700; } .classement li:nth-child(1) .rang { color: var(--or2); } .classement .membre-ligne { flex: 1; } .classement .pts { color: var(--or2); }
.tableau { width: 100%; border-collapse: collapse; } .tableau th, .tableau td { text-align: start; padding: .45em .6em; border-bottom: 1px solid var(--bord); vertical-align: top; } .tableau th { color: var(--sourd); font-size: .8rem; font-weight: 600; }
.tableau tr.suspendu td, .tableau tr.exclu td { opacity: .55; } .tableau .pts { color: var(--or2); font-weight: 700; }
.profil-photo { display: flex; align-items: center; gap: 1em; } .profil-photo img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.profil-public { text-align: center; } .profil-public .profil-photo { justify-content: center; } .profil-public .badges { justify-content: center; }
.moyens { list-style: none; margin: 0; padding: 0; } .moyens li { display: flex; align-items: center; gap: .8em; padding: .5em 0; border-bottom: 1px solid var(--bord); flex-wrap: wrap; } .moyens li span:first-child { min-width: 7em; color: var(--sourd); } .moyens li b { flex: 1; font-weight: 500; word-break: break-all; }
.etapes { list-style: none; padding: 0; margin: 0 0 1.5rem; counter-reset: etape; display: flex; flex-direction: column; gap: .8em; }
.etapes li { background: var(--panneau); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1em 1.2em 1em 3.4em; position: relative; }
.etapes li::before { counter-increment: etape; content: counter(etape); position: absolute; inset-inline-start: 1em; top: 1em; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--panneau3); color: var(--sourd); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; }
.etapes li.ok { border-color: rgba(46,204,113,.45); } .etapes li.ok::before { content: "✓"; background: var(--vert); color: #06240f; }
[dir=rtl] .etapes li { padding: 1em 3.4em 1em 1.2em; }
.etat-global { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5em; } .etat-global.ok { border-color: rgba(46,204,113,.5); }
.tranche { padding: .9rem 1.2rem; }
.onglets-admin { display: flex; flex-wrap: wrap; gap: .3em; margin-bottom: 1.2rem; border-bottom: 1px solid var(--bord); padding-bottom: .6em; }
.onglets-admin a { color: var(--sourd); padding: .4em .8em; border-radius: 8px; font-weight: 600; font-size: .9rem; } .onglets-admin a.actif, .onglets-admin a:hover { background: var(--panneau2); color: var(--texte); text-decoration: none; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6em; margin-bottom: 1.2rem; }
.chiffres div { background: var(--panneau); border: 1px solid var(--bord); border-radius: 12px; padding: .8em 1em; display: flex; flex-direction: column; } .chiffres b { font-size: 1.6rem; color: var(--or2); } .chiffres span { color: var(--sourd); font-size: .8rem; }
.mini-graphe { display: flex; align-items: flex-end; gap: 4px; height: 80px; } .mini-graphe span { flex: 1; height: var(--h, 2%); background: linear-gradient(var(--or2), var(--or)); border-radius: 3px 3px 0 0; min-height: 2px; }
.connexion-carte.archive { opacity: .55; }
blockquote { margin: .5em 0; padding: .5em .9em; border-inline-start: 3px solid var(--bord2); color: var(--sourd); background: var(--panneau2); border-radius: 0 8px 8px 0; }
.publication { max-width: 720px; margin: 0 auto 2rem; background: var(--panneau); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.6rem; }
.publication h1 { font-size: 1.7rem; } .publication-image { width: 100%; border-radius: 12px; margin: .6em 0; } .publication-texte { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; }
.publication-pied { display: flex; gap: .8em; align-items: center; margin-top: 1.2em; flex-wrap: wrap; }

/* ---------- mobile ---------- */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .gauche { position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); z-index: 50; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--ombre); }
  [dir=rtl] .gauche { inset: 0 0 0 auto; transform: translateX(105%); }
  .gauche.ouvert { transform: none; }
  .droite { position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); z-index: 50; transform: translateX(105%); transition: transform .2s; display: none; }
  [dir=rtl] .droite { inset: 0 auto 0 0; transform: translateX(-105%); }
  .droite.ouvert { transform: none; display: flex; }
  .seulement-mobile { display: inline-flex; }
  .room-page { grid-template-columns: 1fr; height: auto; } .room-chat { height: 50vh; border-inline-start: 0; border-top: 1px solid var(--bord); }
  .deux-colonnes, .heros { grid-template-columns: 1fr; }
  .nav { display: none; }
  .moi-carte { grid-template-columns: 1fr 1fr; }
  .page { width: min(1100px, 100% - 1.4rem); margin: 1rem auto; }
  .atouts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .messages { scroll-behavior: auto; } }
