@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&display=swap');

:root {
  --bg-primary: #0e0f13;
  --bg-secondary: #14151a;
  --bg-tertiary: #1c1d24;
  --bg-hover: #22232c;
  --bg-active: #272830;
  --bg-chat: #0e0f13;
  --accent: #6c63ff;
  --accent-glow: rgba(108, 99, 255, 0.35);
  --accent-muted: rgba(108, 99, 255, 0.15);
  --accent-soft: #8b85ff;
  --teal: #00d4aa;
  --teal-muted: rgba(0, 212, 170, 0.12);
  --danger: #ff4757;
    --module-reseau: #6c63ff;
    --module-presse: #c0973b;
    --module-cites: #22c55e;
    --module-bourse: #06b6d4;
    --module-wiki: #f97316;
    --module-map: #38bdf8;
    --module-admin: #ef4444;
  --success: #2ed573;
  --warning: #ffa502;
  --text-normal: #e4e6f0;
  --text-muted: #5e6278;
  --text-dim: #3a3c4e;
.modal-compact { max-width: 420px; }
.modal-form { max-width: 620px; text-align: left; }
.modal-editorial { max-width: 860px; text-align: left; }
  --dm-color: #9c7bea;
  --dm-muted: rgba(156, 123, 234, 0.15);
  --font-main: 'DM Sans', sans-serif;
  --font-display: 'Syne', sans-serif;
  --border: rgba(255,255,255,0.055);
.cites-header,
.map-header,
.bourse-header,
.wiki-header,
.admin-header,
#reseau-panel-flux .feed-view-header {
        position: relative;
        border-radius: 18px;
        padding: 18px 18px 16px;
        background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
        border: 1px solid rgba(255,255,255,0.05);
}
.cites-header::before,
.map-header::before,
.bourse-header::before,
.wiki-header::before,
.admin-header::before,
#reseau-panel-flux .feed-view-header::before {
        content: '';
        position: absolute;
        left: 18px;
        right: 18px;
        top: 0;
        height: 3px;
        border-radius: 999px;
}
.cites-header::before { background: linear-gradient(90deg, var(--module-cites), transparent); }
.map-header::before { background: linear-gradient(90deg, var(--module-map), transparent); }
.bourse-header::before { background: linear-gradient(90deg, var(--module-bourse), transparent); }
.wiki-header::before { background: linear-gradient(90deg, var(--module-wiki), transparent); }
.admin-header::before { background: linear-gradient(90deg, var(--module-admin), transparent); }
#reseau-panel-flux .feed-view-header::before { background: linear-gradient(90deg, var(--module-reseau), transparent); }
  --border-focus: rgba(108, 99, 255, 0.6);
  --nav-height: 52px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-xl: 16px;
}

* { box-sizing: border-box; }

body { background-color: var(--bg-primary); color: var(--text-normal); font-family: var(--font-main); margin: 0; height: 100dvh; overflow: hidden; overflow-x: hidden; max-width: 100vw; display: flex; flex-direction: column; font-size: 15px; letter-spacing: 0.01em; }
::-webkit-scrollbar { width: 5px; background: transparent; }
.city-link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.city-link-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; transition: transform 0.18s, border-color 0.18s, background 0.18s; }
.city-link-card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.05); border-color: color-mix(in srgb, var(--module-color, var(--accent)) 65%, rgba(255,255,255,0.16)); }
.city-link-card span { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--module-color, var(--accent)) 75%, white 10%); }
.city-link-card strong { color: white; font-size: 0.82rem; line-height: 1.35; }
.city-related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.city-related-card { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.city-related-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.city-related-card-head span { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--module-color, var(--accent)) 75%, white 10%); }
.city-related-card-head strong { color: white; font-family: var(--font-display); font-size: 1rem; }
.city-related-item { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 10px; text-align: left; color: inherit; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.city-related-item span { color: var(--text-muted); font-size: 0.68rem; }
.city-related-item strong { color: white; font-size: 0.78rem; line-height: 1.35; }
.city-related-empty { color: var(--text-muted); font-size: 0.76rem; padding: 8px 2px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }
.hidden { display: none !important; }
.full-width { width: 100%; }

/* TOP NAV */
#top-nav { height: var(--nav-height); background: rgba(14,15,19,0.98); backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border); gap: 2px; flex-shrink: 0; z-index: 420; padding: 0 16px; position: relative; }
#top-nav::after { content:''; position:absolute; bottom:0; left:0; right:0; height:1px; background:linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%); opacity:0.25; pointer-events:none; }
.nav-btn { background: transparent; border: none; color: var(--text-muted); font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 7px 14px; cursor: pointer; border-radius: 8px; transition: color 0.18s, background 0.18s, transform 0.18s; position: relative; overflow: hidden; }
.map-overlay-info-icon { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--module-map); }
.map-overlay-info-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.map-overlay-info-meta { margin-top: 10px; color: var(--text-muted); font-size: 0.74rem; }
.nav-btn::after { content:''; position:absolute; bottom:0; left:50%; transform:translateX(-50%) scaleX(0); width:70%; height:2px; background:var(--accent); border-radius:2px 2px 0 0; transition:transform 0.25s cubic-bezier(0.4,0,0.2,1); }
.nav-btn:hover { color: white; background: rgba(255,255,255,0.07); transform: translateY(-1px); }
.nav-btn:hover i { transform: scale(1.15); }
.nav-btn:hover::after { transform: translateX(-50%) scaleX(0.5); }
.nav-btn.active { color: white; background: rgba(108,99,255,0.16); }
.article-linked-modules { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,0.08); }
.article-linked-title { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--article-muted); margin-bottom: 8px; }
.article-linked-list { display: flex; flex-wrap: wrap; gap: 8px; }
.article-linked-chip { border: 1px solid color-mix(in srgb, var(--module-color, var(--article-accent)) 55%, rgba(0,0,0,0.12)); background: color-mix(in srgb, var(--module-color, var(--article-accent)) 14%, white 86%); color: #20160c; border-radius: 999px; padding: 6px 10px; font-size: 0.74rem; font-weight: 700; cursor: pointer; }
.article-linked-chip:hover { filter: brightness(0.98); transform: translateY(-1px); }
.nav-btn.active::after { transform: translateX(-50%) scaleX(1); }
.nav-btn.active i { color: var(--accent); }
.nav-btn i { margin-right: 6px; font-size: 0.92em; transition: transform 0.18s, color 0.18s; }
        .city-link-grid,
        .city-related-grid { grid-template-columns: 1fr; }
.nav-btn.nav-has-unread { color: white; background: rgba(218,55,60,0.12); box-shadow: inset 0 0 0 1px rgba(218,55,60,0.24); }
.nav-btn.nav-notify { color: var(--danger) !important; animation: notifyPulse 2s infinite; }
@keyframes notifyPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
#notif-badge { position: absolute; top: 4px; right: 8px; background: var(--danger); color: white; font-size: 9px; padding: 1px 5px; border-radius: 20px; font-weight: 700; border: 2px solid var(--bg-primary); }

/* LAYOUT */
#main-view-wrapper { flex: 1; position: relative; overflow: hidden; overflow-x: hidden; max-width: 100vw; padding-bottom: 54px; }
.view-section { width: 100%; height: 100%; position: absolute; top: 0; left: 0; flex-direction: column; }
.view-section.hidden { display: none !important; }
.view-section.active { display: flex; visibility: visible; opacity: 1; z-index: 1; }
#app-container { display: grid; grid-template-columns: 265px minmax(0, 1fr) 210px; width: 100%; height: 100%; overflow: hidden; }
#mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 90; }

/* SIDEBAR */
#sidebar { background: var(--bg-secondary); display: flex; flex-direction: column; overflow-y: auto; border-right: 1px solid var(--border); }
.sidebar-header { padding: 18px 16px 14px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.app-title { margin: 0 0 2px; font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: white; letter-spacing: -0.02em; background: linear-gradient(135deg, #fff 0%, var(--accent-soft) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.btn-close-sidebar { display: none; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.btn-close-sidebar:hover { color: white; background: var(--bg-hover); }
#player-id-display { font-size: 0.72rem; color: var(--accent-soft); font-weight: 600; letter-spacing: 0.05em; margin: 4px 0 10px; }
.btn-login { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-normal); padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-main); font-weight: 600; font-size: 0.8rem; transition: all 0.2s; }
.btn-login:hover { background: var(--bg-hover); }
.btn-logout { background: var(--danger-muted); border: 1px solid rgba(255,71,87,0.25); color: var(--danger); padding: 9px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 700; font-family: var(--font-main); font-size: 0.88rem; width: 100%; transition: all 0.2s; }
.btn-logout:hover { background: rgba(255,71,87,0.25); }
.sidebar-section { padding: 14px 12px; }
.sidebar-section h3 { font-family: var(--font-display); font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px; font-weight: 700; padding: 0 4px; }
.room-item { padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; justify-content: space-between; transition: all 0.15s; font-size: 0.88rem; }
.room-item:hover { background: var(--bg-hover); color: var(--text-normal); }
.room-item.active { background: var(--accent-muted); color: white; box-shadow: inset 0 0 0 1px rgba(108,99,255,0.2); }
.room-item.unread { color: white !important; font-weight: 700; background: rgba(255,100,100,0.08) !important; }
.room-item.unread::after { content: "●"; font-size: 0.6em; margin-left: 5px; color: var(--danger); }
.room-name::before { content: "#"; margin-right: 8px; font-size: 1.1em; color: var(--text-dim); }
.btn-del-room { background: none; border: none; color: transparent; cursor: pointer; font-size: 0.85em; transition: 0.2s; }
.room-item:hover .btn-del-room { color: var(--text-muted); }
.btn-del-room:hover { color: var(--danger) !important; }
.btn-add-room { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.75rem; padding: 2px 4px; border-radius: 4px; transition: 0.2s; }
.btn-add-room:hover { color: var(--accent); }
.dm-item { padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; transition: all 0.15s; margin-bottom: 2px; font-size: 0.88rem; }
.dm-item:hover { background: var(--bg-hover); color: var(--text-normal); }
.dm-item.active { background: var(--dm-muted); color: white; }
.dm-item.unread { color: white; font-weight: 700; }
.dm-item.unread::after { content: "1"; background: var(--danger); color: white; font-size: 0.65em; padding: 1px 5px; border-radius: 20px; margin-left: auto; }
.dm-avatar { width: 26px; height: 26px; border-radius: 50%; margin-right: 10px; object-fit: cover; }

/* CHARACTER CARDS */
.char-item { display: flex; align-items: center; padding: 9px 10px; background: var(--bg-tertiary); border-radius: var(--radius); margin-bottom: 6px; border: 1px solid var(--border); transition: all 0.2s; cursor: default; }
.char-item:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.1); transform: translateX(2px); }
.mini-avatar { width: 38px; height: 38px; border-radius: 50%; margin-right: 10px; object-fit: cover; border: 2px solid var(--border); }
.char-info { flex: 1; min-width: 0; }
.char-name-list { font-weight: 700; font-size: 0.88rem; color: var(--text-normal); }
.char-role-list { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.char-actions { display: flex; gap: 3px; }
.btn-mini-action { background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.9rem; padding: 5px; border-radius: var(--radius-sm); transition: all 0.2s; }
.btn-mini-action:hover { background: var(--bg-hover); color: var(--text-normal); }
.create-form-toggle { color: var(--accent); cursor: pointer; font-size: 0.82rem; margin-top: 8px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; transition: opacity 0.2s; }
.create-form-toggle:hover { opacity: 0.8; }
.create-form { background: var(--bg-primary); padding: 12px; border-radius: var(--radius); margin-top: 10px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); }
.create-form.hidden { display: none; }
.create-form input[type="text"], .create-form textarea { background: var(--bg-tertiary); border: 1px solid var(--border); color: white; padding: 8px 10px; border-radius: var(--radius-sm); font-family: var(--font-main); font-size: 0.88rem; transition: border-color 0.2s; }
.create-form input[type="text"]:focus, .create-form textarea:focus { outline: none; border-color: var(--accent); }
.file-upload-label { background: var(--bg-tertiary); border: 1px dashed rgba(255,255,255,0.1); color: var(--text-muted); padding: 8px; border-radius: var(--radius-sm); font-size: 0.8rem; cursor: pointer; text-align: center; display: block; transition: all 0.2s; }
.file-upload-label:hover { border-color: var(--accent); color: var(--accent); }
.file-upload-label input { display: none; }

/* BUTTONS */
.btn-primary { background: var(--accent); color: white; border: none; padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 600; font-family: var(--font-main); cursor: pointer; font-size: 0.88rem; transition: all 0.2s; letter-spacing: 0.01em; }
.btn-primary:hover { background: var(--accent-soft); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-secondary { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-normal); padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-main); font-size: 0.88rem; transition: all 0.2s; }
.btn-secondary:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.12); }
.btn-warning { background: var(--warning); color: #000; border: none; }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.82); z-index: 200; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); padding: 18px; overscroll-behavior: contain; }
.modal-overlay.hidden { display: none; }
.modal-box { background: radial-gradient(circle at top right, rgba(255,255,255,0.045), transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)), var(--bg-secondary); padding: 28px; border-radius: 22px; width: min(100%, 400px); max-width: 400px; max-height: min(88vh, calc(100dvh - 36px)); border: 1px solid rgba(255,255,255,0.065); box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03), inset 0 1px 0 rgba(255,255,255,0.04); text-align: center; animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); overflow-y: auto; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.92) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-box h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: white; margin: 0 0 20px; letter-spacing: -0.02em; }
.modal-box h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: white; margin: 0; }
.modal-box.modal-compact,
.modal-box.modal-form,
.modal-box.modal-editorial {
    width: min(100%, var(--modal-width, 400px));
    text-align: left;
}
.modal-box.modal-compact { --modal-width: 420px; }
.modal-box.modal-form { --modal-width: 620px; }
.modal-box.modal-editorial { --modal-width: 860px; }
.modal-box.modal-form,
.modal-box.modal-editorial {
    padding: 24px;
}
.modal-input { width: 100%; background: var(--bg-primary); border: 1px solid var(--border); color: white; padding: 11px 14px; border-radius: var(--radius-sm); margin: 8px 0; font-family: var(--font-main); font-size: 0.9rem; transition: border-color 0.2s; }
.modal-input:focus { outline: none; border-color: var(--accent); }

/* NOTIFICATIONS */
.notif-item { width: 100%; padding: 12px 16px; border: 1px solid transparent; display: flex; gap: 12px; align-items: center; transition: background 0.15s, transform 0.18s, border-color 0.18s; cursor: pointer; background: rgba(255,255,255,0.02); border-radius: 16px; text-align: left; font: inherit; color: inherit; }
.notif-item:hover { background: var(--bg-hover); transform: translateX(2px); }
.notif-item.unread { background: linear-gradient(90deg, rgba(108,99,255,0.18), rgba(108,99,255,0.08)); border-left: 3px solid var(--accent); box-shadow: inset 0 0 0 1px rgba(108,99,255,0.12); }
.notif-enter { animation: notifEnter 0.28s ease both; }
@keyframes notifEnter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.notif-pop { animation: notifPulse 0.38s ease; }
@keyframes notifPulse {
    0% { transform: scale(1); }
    35% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.notif-icon { width: 34px; height: 34px; background: var(--bg-tertiary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; font-size: 0.9rem; }
.notif-content { font-size: 0.88rem; color: var(--text-normal); flex: 1; }
.notif-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.notif-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.notif-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.notif-destination-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.notif-destination-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,0.08); color: white; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.notif-priority-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.notif-priority-high { background: rgba(255,71,87,0.16); color: #ff8c97; }
.notif-priority-medium { background: rgba(245,158,11,0.14); color: #fbbf24; }
.notif-priority-low { background: rgba(148,163,184,0.14); color: #cbd5e1; }
.notif-unread-dot { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: rgba(108,99,255,0.18); color: #c6c2ff; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.notif-message { line-height: 1.45; }
.notif-cta-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.notif-cta-label { display: inline-flex; align-items: center; gap: 6px; color: white; font-size: 0.72rem; font-weight: 700; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); }
.notif-summary-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(108,99,255,0.18), rgba(255,255,255,0.03)); border: 1px solid rgba(255,255,255,0.08); }
.notif-summary-main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.notif-summary-main strong { color: white; font-size: 1.25rem; font-family: var(--font-display); }
.notif-summary-main span { color: var(--text-muted); font-size: 0.78rem; }
.notif-summary-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.notif-summary-stats span { display: inline-flex; align-items: center; gap: 6px; color: white; font-size: 0.74rem; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,0.18); }
.notif-summary-stats i { font-size: 0.68rem; color: var(--accent-soft); }
.notif-section { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.notif-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notif-section-title { color: white; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.notif-section-title i { color: var(--accent-soft); }
.notif-section-hint { color: var(--text-muted); font-size: 0.72rem; }
.notif-section-list { display: flex; flex-direction: column; gap: 8px; }
.notif-empty-state { text-align: center; padding: 22px 16px; color: var(--text-muted); border: 1px dashed rgba(255,255,255,0.08); border-radius: 16px; }
.notif-like .notif-icon { background: rgba(218,55,60,0.14); color: #f87171; }
.notif-like .notif-label { color: #f87171; }
.notif-mention .notif-icon { background: rgba(245,158,11,0.14); color: #fbbf24; }
.notif-mention .notif-label { color: #fbbf24; }
.notif-follow .notif-icon { background: rgba(35,165,89,0.14); color: #4ade80; }
.notif-follow .notif-label { color: #4ade80; }
.notif-reply .notif-icon { background: rgba(96,165,250,0.14); color: #60a5fa; }
.notif-reply .notif-label { color: #60a5fa; }
.notif-char-mp .notif-icon { background: rgba(168,85,247,0.16); color: #c084fc; }
.notif-char-mp .notif-label { color: #c084fc; }
.notif-dm .notif-icon { background: rgba(59,130,246,0.14); color: #93c5fd; }
.notif-dm .notif-label { color: #93c5fd; }
.notif-chat .notif-icon { background: rgba(45,212,191,0.14); color: #5eead4; }
.notif-chat .notif-label { color: #5eead4; }
.notif-feed .notif-icon { background: rgba(251,146,60,0.14); color: #fdba74; }
.notif-feed .notif-label { color: #fdba74; }
.notif-profile .notif-icon { background: rgba(148,163,184,0.14); color: #cbd5e1; }
.notif-profile .notif-label { color: #cbd5e1; }
.notif-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); flex-wrap: wrap; }
.notif-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.notif-filter-chip { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--text-muted); border-radius: 999px; padding: 6px 10px; font-size: 0.72rem; font-weight: 700; cursor: pointer; }
.notif-filter-chip span { color: white; margin-left: 4px; }
.notif-filter-chip.active { background: rgba(108,99,255,0.18); border-color: rgba(108,99,255,0.32); color: white; }
.notif-toolbar-actions { display: flex; gap: 8px; margin-left: auto; }

.global-search-box { width: min(92vw, 780px); max-width: 780px; max-height: min(88vh, 760px); display: flex; flex-direction: column; gap: 14px; }
.global-search-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.global-search-title { margin: 0; color: white; font-family: var(--font-display); font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.global-search-subtitle { margin-top: 4px; color: var(--text-muted); font-size: 0.82rem; }
.global-search-input-row { display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,0.09); background: rgba(255,255,255,0.035); border-radius: 18px; padding: 10px 14px; }
.global-search-input-row i { color: var(--text-dim); }
.global-search-input-row input { flex: 1; min-width: 0; background: transparent; border: none; color: white; font-size: 0.98rem; font-family: var(--font-main); }
.global-search-input-row input:focus { outline: none; }
.global-search-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.global-search-chip { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--text-muted); border-radius: 999px; padding: 7px 11px; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.global-search-chip.active { background: rgba(108,99,255,0.18); border-color: rgba(108,99,255,0.32); color: white; }
.global-search-results { min-height: 220px; max-height: min(58vh, 460px); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.global-search-result { display: flex; align-items: stretch; gap: 8px; }
.global-search-result-main { flex: 1; text-align: left; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.global-search-result-main:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
.global-search-result-type { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-soft); }
.global-search-result-main span { color: var(--text-muted); font-size: 0.82rem; }
.global-search-fav-btn { width: 44px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); color: var(--text-dim); cursor: pointer; }
.global-search-fav-btn.active { color: #f7bf5d; border-color: rgba(247,191,93,0.35); background: rgba(247,191,93,0.08); }
.global-search-empty { padding: 26px 18px; text-align: center; color: var(--text-muted); border: 1px dashed rgba(255,255,255,0.08); border-radius: 16px; }

/* ==================== PROFILE PLEIN ÉCRAN [NOUVEAU] ==================== */
#profile-slide-panel { 
    position: fixed; top: 0; left: -100%; width: min(680px, 100%); height: 100vh; 
    background: radial-gradient(circle at top right, rgba(255,255,255,0.045), transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)), var(--bg-secondary); border-right: 1px solid rgba(255,255,255,0.065); 
    z-index: 200; transition: left 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); 
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 20px 0 60px rgba(0,0,0,0.6), inset -1px 0 0 rgba(255,255,255,0.03); 
}
#profile-slide-panel.open { left: 0; animation: panelSlideInLeft 0.34s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes panelSlideInLeft {
    from { opacity: 0.72; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}
.btn-close-profile { position: absolute; top: 14px; right: 14px; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); border: 1px solid var(--border); color: white; width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; z-index: 10; }
.btn-close-profile:hover { background: var(--danger-muted); border-color: var(--danger); transform: rotate(90deg); }

/* Héro */
.profile-hero { position: relative; height: 160px; flex-shrink: 0; overflow: hidden; }
.profile-hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, var(--accent-muted), var(--bg-secondary)); }
.profile-hero-content { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 18px; padding: 0 24px 18px; height: 100%; }
.profile-avatar-large { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg-secondary); box-shadow: 0 0 0 3px var(--accent-muted), 0 8px 24px rgba(0,0,0,0.5); flex-shrink: 0; }
.profile-hero-info h2 { margin: 0 0 4px; color: white; font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.profile-role-tag { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.15); padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; color: rgba(255,255,255,0.8); backdrop-filter: blur(6px); }

/* Stats */
.profile-stats { display: flex; justify-content: space-around; padding: 12px 0; border-bottom: 1px solid var(--border); background: var(--bg-secondary); flex-shrink: 0; position: relative; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; position: relative; }
.stat-value { font-weight: 800; color: white; font-size: 1.2rem; font-family: var(--font-display); }
.stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.admin-stat-edit { position: absolute; top: 0; right: -18px; background: var(--warning); color: #000; font-size: 0.6rem; border: none; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.admin-stat-edit:hover { transform: scale(1.2); }

/* Body scrollable */
.profile-page-body { flex: 1; overflow-y: auto; padding: 0 24px 32px; display: flex; flex-direction: column; gap: 20px; padding-top: 16px; }

/* Row actions */
.profile-action-row { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-action-row .btn-primary, .profile-action-row .btn-secondary { flex: 1; min-width: 100px; font-size: 0.82rem; padding: 8px 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-admin-company { background: linear-gradient(135deg, #f59e0b, #d97706); border: none; color: #000; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 700; font-size: 0.82rem; transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
.btn-admin-company:hover { box-shadow: 0 4px 16px rgba(245,158,11,0.4); transform: translateY(-1px); }

/* Section générique profil */
.profile-section { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 18px 20px; }
.profile-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.profile-section-title { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; margin: 0; display: flex; align-items: center; gap: 8px; }
.profile-section-title i { color: var(--accent); }
.profile-section-meta { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.profile-desc-text { white-space: pre-wrap; line-height: 1.6; color: var(--text-normal); font-size: 0.9rem; margin: 0 0 10px; }
.btn-edit-bio { background: none; border: 1px solid var(--border); color: var(--text-muted); padding: 5px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.78rem; transition: all 0.2s; margin-top: 8px; }
.btn-edit-bio:hover { border-color: var(--accent); color: var(--accent); }

/* [NOUVEAU] Grille Entreprises */
.companies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.company-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 16px 12px; text-align: center; position: relative; transition: all 0.25s; cursor: default;
    box-shadow: 0 0 0 1px transparent; }
.company-card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 20px var(--accent-glow), 0 4px 20px rgba(0,0,0,0.3); transform: translateY(-2px); }
.company-card-logo { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 10px; background: var(--bg-tertiary); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 1.5rem; color: var(--text-muted); }
.company-card-logo img { width: 100%; height: 100%; object-fit: cover; }
.company-card-name { font-weight: 700; font-size: 0.88rem; color: white; font-family: var(--font-display); margin-bottom: 4px; }
.company-card-role { font-size: 0.7rem; color: var(--accent-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.company-card-desc { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }
.company-card-del { position: absolute; top: 8px; right: 8px; background: var(--danger-muted); border: 1px solid rgba(255,71,87,0.3); color: var(--danger); border-radius: 50%; width: 22px; height: 22px; font-size: 0.7rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; opacity: 0; }
.company-card:hover .company-card-del { opacity: 1; }

/* [NOUVEAU] Mini posts activité */
.profile-mini-post { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; transition: background 0.15s, border-color 0.15s, transform 0.15s; cursor: pointer; }
.profile-mini-post:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.12); transform: translateY(-1px); }
.profile-mini-post-content { font-size: 0.9rem; color: var(--text-normal); line-height: 1.6; margin-bottom: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-mini-post-meta { display: flex; align-items: center; gap: 12px; font-size: 0.72rem; color: var(--text-muted); flex-wrap: wrap; }
.profile-mini-post-open { margin-left: auto; color: var(--accent-soft); font-weight: 700; }
.profile-activity-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.profile-activity-page-info { font-size: 0.78rem; color: var(--text-muted); text-align: center; flex: 1; }
.profile-activity-empty { color: var(--text-muted); font-size: 0.85rem; font-style: italic; padding: 10px 0; }
.admin-stat-btn { background: none; border: 1px solid var(--border); color: var(--warning); padding: 2px 8px; border-radius: 4px; cursor: pointer; font-size: 0.72rem; margin-left: auto; transition: all 0.2s; }
.admin-stat-btn:hover { background: rgba(255,165,2,0.1); }

/* [NOUVEAU] DM entre personnages */
.char-dm-msg { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.char-dm-msg.char-dm-self { flex-direction: row-reverse; }
.char-dm-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border); }
.char-dm-bubble { max-width: 75%; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.char-dm-msg.char-dm-self .char-dm-bubble { background: var(--accent-muted); border-color: rgba(108,99,255,0.3); }
.char-dm-sender { font-size: 0.68rem; font-weight: 700; margin-bottom: 2px; }
.char-dm-text { font-size: 0.88rem; color: var(--text-normal); line-height: 1.4; word-break: break-word; }
.char-dm-time { font-size: 0.62rem; color: var(--text-muted); align-self: flex-end; margin-top: 2px; }

/* [NOUVEAU] Article footer signature */
.article-footer-signature { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; padding: 12px 14px; background: rgba(0,0,0,0.06); border-radius: var(--radius); border-left: 3px solid #c0973b; cursor: pointer; transition: background 0.15s; }
.article-footer-signature:hover { background: rgba(0,0,0,0.1); }
.article-sig-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid #d4c9a8; flex-shrink: 0; }
.article-sig-name { font-weight: 700; font-size: 0.88rem; color: #1a1008; font-family: 'Playfair Display', Georgia, serif; }
.article-sig-role { font-size: 0.72rem; color: #6b5c3e; }

/* Profil — Parti tag */
.profile-party-tag { display: inline-flex; align-items: flex-start; gap: 6px; background: var(--accent-muted); border: 1px solid rgba(108,99,255,0.25); padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; color: var(--accent-soft); font-weight: 600; max-width: min(100%, 360px); white-space: normal; line-height: 1.3; }

/* CHAT AREA */
#chat-area { flex: 1; display: flex; flex-direction: column; background: var(--bg-chat); overflow: hidden; min-width: 0; }
.chat-header { height: 52px; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 20px; background: rgba(14,15,19,0.85); backdrop-filter: blur(10px); flex-shrink: 0; }
.header-hash { font-size: 1.3rem; color: var(--text-dim); margin-right: 10px; font-weight: 300; }
#currentRoomName { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: white; margin: 0; letter-spacing: 0.01em; }
.chat-history-toolbar { display: flex; justify-content: center; padding: 10px 20px 0; flex-shrink: 0; }
#messages { flex: 1; overflow-y: auto; padding: 20px 20px 10px; display: flex; flex-direction: column; }

/* MESSAGES */
.message-container { position: relative; margin-top: 16px; padding: 4px 12px 4px 74px; animation: fade 0.2s; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border: 1px solid transparent; transition: background 0.1s; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.message-container:hover { background: rgba(255,255,255,0.022); }
.message-container.dm-message { background: var(--dm-muted); border-left: 3px solid var(--dm-color); }
.message-container.dm-message:hover { background: rgba(156,123,234,0.2); }
.message-container.dm-message { margin-top: 10px; padding: 0; background: transparent; border: none; }
.message-container.dm-message:hover { background: transparent; }
.message-container.dm-message .msg-actions { display: none !important; }
.dm-bubble-row { display: flex; align-items: flex-end; gap: 10px; max-width: min(88%, 980px); }
.dm-bubble-row.dm-self { margin-left: auto; flex-direction: row-reverse; }
.dm-bubble-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.08); }
.dm-bubble-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dm-bubble-row.dm-self .dm-bubble-stack { align-items: flex-end; }
.dm-bubble-meta { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--text-muted); padding: 0 4px; }
.dm-bubble-meta strong { font-family: var(--font-display); font-size: 0.84rem; color: white; }
.dm-bubble-card { background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025)); border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 10px 14px; box-shadow: 0 10px 24px rgba(0,0,0,0.16); min-width: min(220px, 100%); max-width: 100%; }
.dm-bubble-row.dm-self .dm-bubble-card { background: linear-gradient(180deg, rgba(108,99,255,0.2), rgba(108,99,255,0.13)); border-color: rgba(108,99,255,0.32); }
.dm-bubble-card .text-body { margin-top: 0; overflow-wrap: anywhere; word-break: break-word; }
.dm-bubble-card .chat-image,
.dm-bubble-card .video-frame,
.dm-bubble-card .video-direct,
.dm-bubble-card .custom-audio-player { margin-top: 0; }
.message-container.mentioned { background: rgba(255,165,0,0.07); border-left: 3px solid var(--warning); }
.message-container.msg-group-followup { margin-top: 2px !important; padding-top: 2px; padding-bottom: 2px; }
.message-container.msg-group-followup .avatar-img, .message-container.msg-group-followup .char-header { display: none; }
.message-container.msg-group-followup .timestamp { display: none; }
.message-container.msg-group-followup:hover::before { content: attr(data-time-short); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 0.62rem; color: var(--text-muted); }
.msg-actions { position: absolute; top: -14px; right: 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); display: none; z-index: 10; padding: 3px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.message-container:hover .msg-actions { display: flex; }
.action-btn { background: transparent; border: none; padding: 5px 8px; cursor: pointer; font-size: 0.95rem; color: var(--text-muted); border-radius: 4px; transition: all 0.15s; }
.action-btn:hover { background: var(--bg-hover); color: var(--text-normal); }
.avatar-img { position: absolute; left: 12px; top: 4px; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; cursor: pointer; transition: all 0.2s; }
.avatar-img:hover { transform: scale(1.08); box-shadow: 0 0 0 3px var(--accent-muted); }
.char-header { display: flex; align-items: baseline; gap: 8px; }
.char-name { font-weight: 700; font-size: 1.0rem; color: white; cursor: pointer; font-family: var(--font-display); }
.char-name:hover { text-decoration: underline; color: var(--accent-soft); }
.char-role { font-size: 0.68rem; color: var(--text-muted); background: var(--bg-tertiary); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); }
.timestamp { font-size: 0.68rem; color: var(--text-muted); margin-left: auto; }
.edited-tag { font-size: 0.62rem; color: var(--text-muted); margin-left: 4px; font-style: italic; }
.text-body { font-size: 0.98rem; line-height: 1.55; color: var(--text-normal); white-space: pre-wrap; margin-top: 2px; word-wrap: break-word; }
.chat-image { max-width: 100%; max-height: 280px; border-radius: var(--radius); margin-top: 8px; cursor: pointer; display: block; transition: opacity 0.2s; }
.chat-image:hover { opacity: 0.9; }
.video-frame { width: 100%; max-width: 480px; height: 270px; border-radius: var(--radius); margin-top: 8px; border: none; background: #000; }
.video-direct { max-width: 100%; max-height: 280px; border-radius: var(--radius); margin-top: 8px; }

/* AUDIO PLAYER */
.custom-audio-player { display: flex; align-items: center; gap: 10px; background: var(--bg-secondary); border: 1px solid var(--border); padding: 10px 14px; border-radius: var(--radius); width: fit-content; margin-top: 8px; min-width: 260px; }
.audio-btn { background: var(--accent); color: white; border: none; border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.8rem; transition: all 0.2s; }
.audio-btn:hover { background: var(--accent-soft); box-shadow: 0 0 12px var(--accent-glow); }
.audio-progress { flex: 1; height: 3px; background: var(--bg-hover); border-radius: 2px; position: relative; overflow: hidden; cursor: pointer; }
.audio-progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.1s linear; }
.audio-time { font-size: 0.72rem; color: var(--text-muted); font-family: monospace; }

/* REPLY */
.reply-spine { position: absolute; top: 12px; left: 32px; width: 26px; height: 10px; border-top: 2px solid rgba(255,255,255,0.1); border-left: 2px solid rgba(255,255,255,0.1); border-top-left-radius: 5px; opacity: 0.6; }
.reply-context-line { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--text-muted); margin-left: -5px; margin-bottom: 4px; }
.reply-name { font-weight: 600; color: #b0b3c1; }
.reply-text { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.new-msg-separator { display: flex; align-items: center; color: var(--danger); margin: 18px 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.new-msg-separator::before, .new-msg-separator::after { content: ""; flex: 1; height: 1px; background: var(--danger); opacity: 0.3; margin: 0 10px; }

/* INPUT WRAPPER */
#input-wrapper { background: var(--bg-chat); padding: 0 16px 18px; flex-shrink: 0; }
#char-selector-wrapper { background: var(--bg-secondary); border-radius: var(--radius) var(--radius) 0 0; border: 1px solid var(--border); border-bottom: none; overflow: hidden; margin-top: 8px; }
#char-bar-actions { display: flex; justify-content: center; background: var(--bg-primary); border-bottom: 1px solid var(--border); }
#btn-toggle-chars { width: 100%; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 3px; font-size: 0.75rem; transition: color 0.2s; }
#btn-toggle-chars:hover { color: white; }
.char-bar-content { display: flex; gap: 10px; padding: 10px; overflow-x: auto; max-height: 100px; opacity: 1; transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease; }
.char-bar-content.hidden-bar { max-height: 0; opacity: 0; padding: 0 10px; overflow: hidden; }
.char-bar-content::-webkit-scrollbar { height: 4px; }
.avatar-choice { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; opacity: 0.5; transition: all 0.2s; object-fit: cover; }
.avatar-choice:hover { opacity: 0.85; }
.avatar-choice.selected { opacity: 1; border-color: var(--accent); transform: scale(1.1); box-shadow: 0 0 12px var(--accent-glow); }
#context-bar { background: var(--bg-secondary); color: var(--text-muted); padding: 8px 14px; border-radius: var(--radius) var(--radius) 0 0; font-size: 0.82rem; display: none; justify-content: space-between; align-items: center; border: 1px solid var(--border); border-bottom: none; z-index: 2; position: relative; }
#context-bar.dm-context { background: #120f1d; border-color: rgba(156,123,234,0.3); color: #d0bfff; }
.btn-close-reply { background: none; border: none; color: var(--text-muted); cursor: pointer; font-weight: bold; font-size: 1rem; padding: 0 4px; }
.btn-close-reply:hover { color: white; }
#context-bar.visible { display: flex; }
#mention-suggestions { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px; max-height: 150px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.chat-staging { background: var(--bg-secondary); border-radius: var(--radius) var(--radius) 0 0; padding: 10px 14px; border: 1px solid var(--border); border-bottom: none; display: flex; align-items: center; gap: 10px; z-index: 2; position: relative; }
.chat-staging.hidden { display: none; }
.staging-preview { height: 55px; border-radius: var(--radius-sm); object-fit: cover; }
.staging-info { color: var(--text-normal); font-size: 0.88rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-clear-stage { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1.1rem; padding: 4px; border-radius: 50%; }
#emoji-picker { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-wrap: wrap; gap: 4px; max-width: 320px; margin-bottom: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
#emoji-picker span { font-size: 1.3rem; cursor: pointer; padding: 4px; border-radius: 6px; transition: background 0.15s; }
#emoji-picker span:hover { background: var(--bg-hover); }
#input-zone { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px 0 4px; display: flex; align-items: center; min-height: 46px; transition: border-color 0.2s; }
#input-zone:focus-within { border-color: rgba(108,99,255,0.4); }
#txtInput { flex: 1; background: transparent; border: none; color: white; font-family: var(--font-main); font-size: 0.92rem; padding: 12px 14px; height: 100%; }
#txtInput:focus { outline: none; }
#txtInput::placeholder { color: var(--text-muted); }
.btn-icon { background: none; border: none; font-size: 1.15rem; cursor: pointer; padding: 7px; color: var(--text-muted); border-radius: var(--radius-sm); transition: all 0.2s; }
.btn-icon:hover { color: var(--text-normal); background: var(--bg-hover); }
.btn-send { background: var(--accent); color: white; border: none; padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer; margin-left: 4px; transition: all 0.2s; }
.btn-send:hover { background: var(--accent-soft); }
.recording { color: var(--danger) !important; opacity: 1 !important; animation: pulseRed 1s infinite; }
@keyframes pulseRed { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }
#typing-indicator { padding: 0 20px; min-height: 22px; display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
#typing-indicator.hidden { visibility: hidden; }
.typing-dots { display: flex; gap: 3px; }
.dot { width: 5px; height: 5px; background: var(--text-muted); border-radius: 50%; animation: typingBounce 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce { 0%,80%,100% { transform: scale(0); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* RIGHT SIDEBAR */
#users-sidebar { background-color: var(--bg-secondary); display: flex; flex-direction: column; border-left: 1px solid var(--border); overflow-y: auto; overflow-x: hidden; min-height: 0; max-width: 210px; flex-shrink: 0; }
.users-header { padding: 14px 16px; border-bottom: 1px solid var(--border); height: 52px; display: flex; align-items: center; }
.users-header h3 { font-family: var(--font-display); font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; margin: 0; }
#online-users-list { padding: 10px; overflow-y: auto; flex: 1; min-height: 0; }
.online-user { display: flex; align-items: center; padding: 7px 8px; border-radius: var(--radius-sm); color: var(--text-normal); font-weight: 500; font-size: 0.88rem; gap: 10px; cursor: pointer; transition: background 0.15s; }
.online-user:hover { background: var(--bg-hover); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; box-shadow: 0 0 6px rgba(46,213,115,0.5); flex-shrink: 0; }

/* FEED */
.feed-view-header { background: rgba(14,15,19,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 50; height: 60px; }
.feed-view-header h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: white; letter-spacing: -0.01em; margin: 0; }
#view-feed { overflow-y: auto; align-items: center; padding: 0 20px 30px; }
.feed-container { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 20px !important; margin: 20px auto 40px; }
.post-create-box { background: var(--bg-secondary); padding: 18px; border-radius: var(--radius-xl); border: 1px solid var(--border); transition: border-color 0.2s; }
.post-create-box:focus-within { border-color: rgba(108,99,255,0.3); }
#postContent { width: 100%; background: var(--bg-primary); border: 1px solid var(--border); color: white; padding: 12px 14px; border-radius: var(--radius); margin-top: 5px; margin-bottom: 12px; resize: vertical; font-family: var(--font-main); font-size: 0.92rem; line-height: 1.5; transition: border-color 0.2s; }
#postContent:focus { outline: none; border-color: var(--accent); }
#postContent::placeholder { color: var(--text-muted); }
.feed-repost-preview { margin: 4px 0 12px; border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)); padding: 12px; }
.feed-repost-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: var(--text-muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.feed-repost-cancel { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-normal); cursor: pointer; }
.feed-repost-cancel:hover { background: rgba(255,255,255,0.06); }
.post-card { background: var(--bg-secondary); border-radius: var(--radius-xl); border: 1px solid var(--border); padding: 20px !important; animation: fade 0.3s; position: relative; transition: all 0.2s; overflow: hidden; }
.post-card:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.08); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,0.2); }
.post-card.post-highlight { border-color: rgba(255,215,0,0.4) !important; background: rgba(255,215,0,0.04); }
.post-header { display: flex; align-items: center; margin-bottom: 12px; cursor: pointer; }
.post-avatar { width: 46px; height: 46px; border-radius: 50%; margin-right: 12px; object-fit: cover; border: 2px solid var(--border); transition: all 0.2s; flex-shrink: 0; }
.post-avatar:hover { border-color: var(--accent); transform: scale(1.05); box-shadow: 0 0 0 3px var(--accent-muted); }
.post-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.post-author { font-weight: 700; color: white; font-size: 0.95rem; font-family: var(--font-display); }
.post-author:hover { color: var(--accent-soft); text-decoration: underline; cursor: pointer; }
.post-role { font-size: 0.7rem; color: var(--text-muted); background: var(--bg-tertiary); border: 1px solid var(--border); padding: 1px 7px; border-radius: 4px; align-self: flex-start; margin-top: 3px; font-weight: 500; }
.post-date { font-size: 0.72rem; color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.post-content { color: var(--text-normal); font-size: 0.95rem; line-height: 1.65; white-space: pre-wrap; margin-bottom: 14px; cursor: pointer; }
.quoted-post-card { margin: 0 0 14px; padding: 12px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.14); cursor: pointer; transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease; }
.quoted-post-card:hover { border-color: rgba(108,99,255,0.24); background: rgba(108,99,255,0.05); transform: translateY(-1px); }
.quoted-post-card-preview { margin-bottom: 0; }
.quoted-post-card-nested { margin: 10px 0 0; background: rgba(255,255,255,0.025); }
.quoted-post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.quoted-post-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.08); flex-shrink: 0; }
.quoted-post-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.quoted-post-author { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; color: white; min-width: 0; }
.quoted-post-role { font-size: 0.68rem; color: var(--text-muted); }
.quoted-post-date { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.quoted-post-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 8px; }
.quoted-post-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.quoted-post-badge.breaking { background: rgba(255,71,87,0.12); color: #ff8792; }
.quoted-post-badge.sponsored { background: rgba(245,158,11,0.12); color: #f7bf5d; }
.quoted-post-content { font-size: 0.87rem; line-height: 1.6; color: var(--text-normal); white-space: pre-wrap; overflow-wrap: anywhere; }
.quoted-post-media { width: 100%; max-height: 280px; border-radius: 14px; object-fit: cover; margin-top: 10px; display: block; }
.quoted-post-audio { width: 100%; margin-top: 10px; }
.post-media { max-width: 100%; border-radius: var(--radius); margin-top: 8px; max-height: 400px; display: block; cursor: zoom-in; }
.quoted-post-media,
.comment-media,
.post-banner,
.chat-image { cursor: zoom-in; }
.post-actions { border-top: 1px solid var(--border); padding-top: 10px; display: flex; gap: 4px; }
.action-item { display: flex; align-items: center; gap: 5px; color: var(--text-muted); cursor: pointer; font-size: 0.83rem; font-weight: 600; transition: all 0.18s; background: var(--bg-tertiary); border: 1px solid transparent; padding: 5px 12px; border-radius: 20px; font-family: var(--font-main); }
.action-item:hover { color: var(--accent-soft); background: var(--accent-muted); border-color: rgba(108,99,255,0.2); }
.action-item.liked { color: var(--danger); background: var(--danger-muted); border-color: rgba(255,71,87,0.2); }
.action-item.liked:hover { background: rgba(255,71,87,0.18); }
.action-item i { font-size: 1em; }
.comments-section { background: var(--bg-primary); border: 1px solid var(--border); margin-top: 12px; padding: 12px; border-radius: var(--radius); display: none; }
.comment-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; border-bottom: none; padding: 0; }
.comment-author { font-weight: 700; color: var(--accent-soft); font-size: 0.82rem; }
.comment-form { display: flex; gap: 6px; align-items: center; }
.comment-input { flex: 1; background: var(--bg-tertiary); border: 1px solid var(--border); padding: 7px 10px; border-radius: var(--radius-sm); color: white; font-family: var(--font-main); font-size: 0.85rem; transition: border-color 0.2s; }
.comment-input:focus { outline: none; border-color: var(--accent); }

/* PARTIS & POLLS */
.party-badge { display: inline-flex; align-items: flex-start; gap: 4px; background: var(--accent-muted); border: 1px solid rgba(108,99,255,0.2); padding: 2px 7px 2px 4px; border-radius: 12px; font-size: 0.7rem; color: var(--accent-soft); margin-left: 6px; vertical-align: top; white-space: normal; max-width: min(280px, 100%); overflow: visible; text-overflow: clip; line-height: 1.3; word-break: break-word; }
.party-logo { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.1); }
.char-name .party-badge, .char-name + .party-badge { font-size: 0.65rem; padding: 1px 6px 1px 3px; }
.msg-header .party-badge { font-size: 0.65rem; padding: 1px 6px 1px 3px; margin-left: 5px; vertical-align: middle; }

.poll-container { background: var(--bg-primary); border: 1px solid var(--border); padding: 14px; border-radius: var(--radius); margin-top: 12px; }
.poll-question { font-weight: 700; margin-bottom: 12px; color: white; font-size: 0.92rem; }
.poll-option { margin-bottom: 8px; }
.poll-option-btn { width: 100%; padding: 9px 12px; background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-normal); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; text-align: left; font-weight: 500; font-size: 0.88rem; font-family: var(--font-main); }
.poll-option-btn:hover { border-color: var(--accent); background: var(--accent-muted); }
.poll-option-btn.voted { border-color: var(--accent); background: var(--accent-muted); color: white; }
.poll-results { width: 100%; padding: 9px 12px; background: var(--bg-tertiary); border-radius: var(--radius-sm); position: relative; overflow: hidden; border: 1px solid var(--border); }
.poll-results::after { content: ''; position: absolute; top: 0; left: 0; height: 100%; background: rgba(108,99,255,0.25); border-radius: var(--radius-sm); }
.poll-result-text { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 12px; font-size: 0.85rem; color: var(--text-normal); font-weight: 500; pointer-events: none; }
.poll-total { font-size: 0.72rem; color: var(--text-muted); margin-top: 8px; text-align: right; padding-right: 2px; }

/* SONDAGES — BARRES DE PROGRESSION FIXES & ADMIN */
.poll-results-bar { position: relative; width: 100%; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; height: 38px; display: flex; align-items: center; }
.poll-results-bar.poll-voted-bar { border-color: rgba(108,99,255,0.4); }
.poll-bar-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--accent-muted); transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); border-radius: var(--radius-sm); }
.poll-voted-bar .poll-bar-fill { background: linear-gradient(90deg, rgba(108,99,255,0.3), rgba(139,133,255,0.25)); }

.poll-option-wrap { position: relative; }
.poll-admin-popup { display: none; position: absolute; top: 50%; right: -10px; transform: translate(100%, -50%); background: var(--bg-secondary); border: 1px solid rgba(255,71,87,0.35); border-radius: var(--radius); padding: 6px 8px; z-index: 50; flex-direction: column; gap: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); white-space: nowrap; }
.poll-admin-popup::after { content: ''; position: absolute; top: 0; left: -20px; width: 20px; height: 100%; }
.poll-option-wrap:hover .poll-admin-popup { display: flex; }
.poll-admin-popup-btn { background: var(--danger-muted); border: 1px solid rgba(255,71,87,0.3); color: var(--danger); padding: 4px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; cursor: pointer; font-family: var(--font-main); transition: all 0.2s; text-align: center; }
.poll-admin-popup-btn:hover { background: rgba(255,71,87,0.25); border-color: var(--danger); }
.poll-admin-bar { display: none !important; }

/* ANONYMOUS & BREAKING */
.post-anonymous { opacity: 0.88; }
.post-anonymous .post-avatar { opacity: 0.5; filter: grayscale(0.5); }
.post-anonymous .post-author { color: var(--text-muted); font-style: italic; }
.post-anonymous .post-author::before { content: '🕵️ '; }
.post-breaking-news { border: 1px solid rgba(255,71,87,0.4) !important; box-shadow: 0 0 20px rgba(255,71,87,0.15) !important; position: relative; }
.post-breaking-news::before { content: '🚨 URGENT'; position: absolute; top: 0; left: 16px; background: var(--danger); color: white; padding: 3px 10px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; transform: translateY(-50%); border-radius: 4px; }

/* FEED — AVATAR PICKER DROPDOWN */
.feed-char-trigger { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 24px; border: 1px solid var(--border); background: var(--bg-tertiary); transition: all 0.2s; user-select: none; }
.feed-char-trigger:hover { border-color: rgba(255,255,255,0.12); background: var(--bg-hover); }
.feed-char-avatar-btn { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(108,99,255,0.4); display: block; }
.feed-char-chevron { font-size: 0.65rem; color: var(--text-muted); transition: transform 0.2s; }
.feed-char-trigger:hover .feed-char-chevron { color: var(--text-normal); }
.feed-char-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl); min-width: 220px; max-height: min(360px, calc(100dvh - 180px)); box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03); z-index: 200; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; animation: dropdownIn 0.18s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: top right; }
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.feed-char-option { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: background 0.15s; border-bottom: 1px solid var(--border); }
.feed-char-option:last-child { border-bottom: none; }
.feed-char-option:hover { background: var(--bg-hover); }
.feed-char-option.active { background: var(--accent-muted); }
.feed-char-opt-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.feed-char-opt-name { font-weight: 700; font-size: 0.88rem; font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-char-opt-role { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* FEED TYPING INDICATOR */
.feed-typing-indicator { font-size: 0.78rem; color: var(--text-muted); padding: 6px 4px; display: flex; align-items: center; gap: 8px; font-style: italic; transition: opacity 0.3s; margin-bottom: 10px; }
.feed-typing-indicator.hidden { display: none; }
.feed-typing-indicator::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: typingBounce 1.2s infinite; }

/* THÈMES PERSONNALISÉS */
body[data-theme="default"] { }
body[data-theme="matrix"] { --accent: #00d4aa; --accent-glow: rgba(0, 212, 170, 0.35); --accent-muted: rgba(0, 212, 170, 0.15); --accent-soft: #33e8c0; }
body[data-theme="blood"] { --accent: #ff4757; --accent-glow: rgba(255, 71, 87, 0.35); --accent-muted: rgba(255, 71, 87, 0.15); --accent-soft: #ff6b7a; }
body[data-theme="cyber"] { --accent: #f9ca24; --accent-glow: rgba(249, 202, 36, 0.35); --accent-muted: rgba(249, 202, 36, 0.15); --accent-soft: #fbd94a; }

.theme-swatch { background: var(--swatch); border: 2px solid transparent; color: #fff; padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; cursor: pointer; font-family: var(--font-display); transition: all 0.2s; opacity: 0.7; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.theme-swatch:hover { opacity: 1; transform: scale(1.05); }
.theme-swatch.active { opacity: 1; border-color: white; box-shadow: 0 0 12px var(--swatch); }

/* MODE JOURNALISTE (ARTICLE) */
.post-article { padding: 0 !important; overflow: hidden; }
.post-article .post-banner { width: 100%; max-height: 250px; object-fit: cover; display: block; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.post-article .post-article-body { padding: 18px 20px 16px; }
.post-article .post-header { padding: 0; margin-bottom: 12px; }
.post-article .post-article-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; color: white; margin-bottom: 10px; line-height: 1.3; letter-spacing: -0.01em; }
.post-article .post-content { text-align: justify; font-size: 0.95rem; line-height: 1.7; color: var(--text-normal); margin-bottom: 14px; }
.post-article .post-actions { padding: 12px 0 0; margin: 0; }
.post-article .post-media { display: none; }

/* SETTINGS & MOBILE */
.password-wrapper { display: flex; align-items: center; position: relative; }
.password-wrapper input { padding-right: 42px; width: 100%; }
.btn-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--text-muted); transition: color 0.2s; }
.btn-eye:hover { color: white; }
#poll-creation-ui { background: var(--bg-primary); border: 1px solid var(--border); padding: 14px; border-radius: var(--radius); margin-bottom: 12px; }
#poll-creation-ui input[type="text"] { width: 100%; background: var(--bg-tertiary); border: 1px solid var(--border); color: white; padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 10px; font-family: var(--font-main); }
#poll-creation-ui input[type="text"]:focus { outline: none; border-color: var(--accent); }

#menu-toggle-btn { display: none; }
@media (max-width: 768px) {
  #app-container { grid-template-columns: 1fr; }
  #users-sidebar { display: none; }
  #sidebar { position: fixed; left: -100%; top: 0; bottom: 0; width: 270px; z-index: 100; transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); margin-top: var(--nav-height); height: calc(100% - var(--nav-height)); }
  #sidebar.open { left: 0; }
  #mobile-overlay.open { display: block; }
    #menu-toggle-btn { display: none; }
  #top-nav { overflow-x: auto; overflow-y: hidden; justify-content: flex-start; scrollbar-width: none; -ms-overflow-style: none; gap: 2px; padding: 0 4px; }
  #top-nav::-webkit-scrollbar { display: none; }
  .nav-btn { white-space: nowrap; flex-shrink: 0; padding: 7px 10px; font-size: 0.75rem; letter-spacing: 0.03em; }
  .nav-btn i { margin-right: 4px; }
  .btn-close-sidebar { display: block; }
  .feed-container { max-width: 100%; padding: 0; }
  #view-feed { padding: 0 10px 30px; }
  #view-presse { padding: 0 10px 30px; }
  #view-actualites { padding: 0 10px 30px; }
  .presse-container { max-width: 100%; }
  .actu-container { max-width: 100%; }
  .article-body { padding: 16px 14px 14px; }
  .article-title { font-size: 1.2rem; }
  .article-dropcap { font-size: 3rem; line-height: 0.7; }
  .feed-view-header { padding: 10px 14px; }
    .modal-overlay { align-items: flex-end; padding: 12px; }
    .modal-box { width: 100%; max-width: none; padding: 20px 16px; max-height: min(92vh, calc(100dvh - 12px)); border-radius: 22px 22px 16px 16px; }
    .modal-box.modal-form, .modal-box.modal-editorial { padding: 18px 16px; }
  .post-detail-modal .modal-box { max-height: 95vh; }
  .ombra-box { width: 96%; height: 80vh; }
  .actu-form-box { padding: 14px; }
  .actu-form-box > div:first-of-type { grid-template-columns: 1fr 1fr; }
  #profile-slide-panel { width: 100%; left: -100%; }
    .accueil-widget { min-height: 0; border-radius: 18px; }
    .accueil-widget-body { max-height: none; }
    .admin-section, .admin-company-card, .admin-user-row { border-radius: 16px; }
    .feed-char-dropdown { min-width: 190px; max-height: min(52vh, calc(100dvh - 150px)); }
}
@media (max-width: 420px) {
  .nav-btn .nav-label { display: none; }
  .nav-btn i { margin-right: 0; font-size: 1rem; }
  .nav-btn { padding: 8px 10px; }
  .actu-form-box > div:first-of-type { grid-template-columns: 1fr; }
    .modal-overlay { padding: 8px; }
    .modal-box { padding: 16px 12px; border-radius: 18px 18px 14px 14px; }
  .profile-page-body { padding: 0 14px 24px; padding-top: 14px; }
  .char-mp-convo-header { padding: 8px 10px; gap: 8px; }
}
button { transition: all 0.15s; }
input, textarea, select { transition: border-color 0.2s; }

/* THÈME OMBRA */
body[data-theme="ombra"] { --accent: #7c3aed; --accent-glow: rgba(124,58,237,0.35); --accent-muted: rgba(124,58,237,0.15); --accent-soft: #a855f7; --bg-primary: #0a080f; --bg-secondary: #100d18; --bg-tertiary: #18132a; --bg-hover: #1e1735; --bg-chat: #0a080f; --border: rgba(124,58,237,0.12); }

/* OMBRA MODAL */
.ombra-box { width: 90%; max-width: 480px; height: 70vh; background: #0b0815; border: 1px solid rgba(124,58,237,0.3); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 0 60px rgba(80,20,140,0.4), 0 0 0 1px rgba(124,58,237,0.15); animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1); }
.ombra-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #0f0b1c; border-bottom: 1px solid rgba(124,58,237,0.2); flex-shrink: 0; }
.ombra-title { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: #c084fc; letter-spacing: 0.15em; display: flex; align-items: center; gap: 8px; }
.ombra-dot { width: 8px; height: 8px; border-radius: 50%; background: #7c3aed; box-shadow: 0 0 8px #7c3aed; animation: ombraPulse 2s infinite; }
@keyframes ombraPulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
#ombra-messages { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ombra-msg { display: flex; flex-direction: column; max-width: 80%; padding: 8px 12px; background: #18112e; border: 1px solid rgba(124,58,237,0.15); border-radius: 8px; animation: fade 0.2s; }
.ombra-msg.ombra-self { align-self: flex-end; background: rgba(124,58,237,0.18); border-color: rgba(124,58,237,0.3); }
.ombra-alias { font-size: 0.68rem; color: #9b7fc7; font-weight: 700; margin-bottom: 3px; letter-spacing: 0.05em; }
.ombra-msg.ombra-self .ombra-alias { color: #c084fc; }
.ombra-content { font-size: 0.88rem; color: #d8c8f0; line-height: 1.5; word-break: break-word; }
.ombra-time { font-size: 0.62rem; color: #4a3a6a; margin-top: 4px; align-self: flex-end; }
.ombra-input-zone { display: flex; padding: 10px 12px; background: #0f0b1c; border-top: 1px solid rgba(124,58,237,0.2); flex-shrink: 0; gap: 0; }
.ombra-input-zone input { flex: 1; background: #18112e; border: 1px solid rgba(124,58,237,0.25); border-right: none; color: #d8c8f0; padding: 10px 14px; border-radius: 8px 0 0 8px; font-family: var(--font-main); font-size: 0.88rem; }
.ombra-input-zone input:focus { outline: none; border-color: rgba(124,58,237,0.5); }
.ombra-input-zone button { background: #7c3aed; color: white; border: none; padding: 10px 16px; border-radius: 0 8px 8px 0; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; }
.ombra-input-zone button:hover { background: #a855f7; }

/* PRESSE VIEW */
#view-presse { overflow-y: auto; align-items: center; padding: 0 20px 30px; }
.presse-container { width: 100%; max-width: 700px; margin: 20px auto 40px; display: flex; flex-direction: column; gap: 24px; }
.presse-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.presse-search-wrap { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 11px; }
.presse-search-wrap i { color: var(--text-dim); }
.presse-search-wrap input { flex: 1; background: transparent; border: none; color: var(--text-normal); font-family: var(--font-main); font-size: 0.86rem; }
.presse-search-wrap input:focus { outline: none; }
.presse-compose-modal-box { width: min(99vw, 1520px); max-width: min(99vw, 1520px); max-height: 96vh; padding: 0; overflow: hidden; text-align: left; background: transparent; box-shadow: none; }
.presse-write-box { background: linear-gradient(180deg, rgba(20,22,31,0.98), rgba(14,16,24,0.98)); border: 1px solid var(--border); border-radius: 28px; padding: 24px; max-height: 96vh; overflow-y: auto; }
.presse-compose-modal-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.presse-compose-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.95fr); gap: 20px; align-items: start; }
.presse-compose-main { min-width: 0; }
.presse-compose-side { min-width: 0; position: sticky; top: 0; }
.presse-preview-panel { border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)); padding: 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02); }
.presse-preview-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.presse-preview-panel-head strong { display: block; font-family: var(--font-display); font-size: 0.92rem; color: white; }
.presse-preview-kicker { font-size: 0.66rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; margin-bottom: 4px; }
.presse-preview-panel-copy { font-size: 0.68rem; color: var(--accent-soft); font-weight: 700; white-space: nowrap; }
.presse-compose-close { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text-normal); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease; }
.presse-compose-close:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); transform: rotate(90deg); }
.presse-write-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-family: var(--font-display); font-weight: 800; color: white; font-size: 1rem; letter-spacing: 0.03em; }
.presse-write-header i { color: var(--accent); }
.presse-journal-row { display: flex; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.presse-journal-logo-preview { width: 84px; min-width: 84px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-primary); display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 1.25rem; overflow: hidden; }
.presse-journal-logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.presse-ux-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.presse-preset-wrap { min-width: 230px; flex: 1; }
.presse-preset-wrap label { display: block; font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 5px; font-weight: 700; }
.presse-preset-controls { display: flex; gap: 6px; align-items: center; }
.presse-preset-controls .btn-secondary { padding: 8px 10px; font-size: 0.75rem; }
.presse-reading-stats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.presse-reading-stats span { font-size: 0.7rem; color: var(--accent-soft); background: rgba(108,99,255,0.14); border: 1px solid rgba(108,99,255,0.25); border-radius: 999px; padding: 4px 9px; font-weight: 700; }
.presse-theme-panel { margin: 0 0 14px; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)); }
.presse-theme-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: white; font-size: 0.82rem; font-weight: 700; }
.presse-theme-header small { color: var(--text-muted); font-size: 0.7rem; font-weight: 500; }
.presse-theme-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.presse-theme-choice { position: relative; padding: 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); cursor: pointer; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; overflow: hidden; }
.presse-theme-choice:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.18); box-shadow: 0 10px 22px rgba(0,0,0,0.22); }
.presse-theme-choice.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(108,99,255,0.3), 0 12px 24px rgba(0,0,0,0.24); }
.presse-theme-choice-label { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.presse-theme-choice-label strong { font-size: 0.78rem; }
.presse-theme-choice-label span { font-size: 0.68rem; opacity: 0.78; }
.presse-theme-choice-swatches { position: relative; z-index: 1; display: flex; gap: 6px; margin-top: 10px; }
.presse-theme-choice-swatches i { width: 18px; height: 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.28); display: block; }
.presse-format-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.presse-format-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.presse-format-group-label { font-size: 0.64rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; margin-right: 4px; }
.presse-format-toolbar .btn-secondary { font-size: 0.76rem; padding: 7px 11px; font-weight: 700; }
.presse-fontsize-select { background: var(--bg-primary); color: white; border: 1px solid var(--border); border-radius: 12px; padding: 7px 12px; font-family: var(--font-main); font-size: 0.76rem; }
.presse-editor-shell { border: 1px solid var(--border); border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); overflow: hidden; }
.presse-editor-shell .presse-format-toolbar { padding: 12px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.presse-editor-hint { padding: 10px 14px 0; font-size: 0.72rem; color: var(--text-muted); line-height: 1.45; }
.presse-rich-editor { min-height: 58vh; padding: 22px 24px; color: white; font-family: 'Spectral', 'Georgia', serif; font-size: 1.06rem; line-height: 1.9; outline: none; overflow-y: auto; }
.presse-rich-editor:empty::before { content: attr(data-placeholder); color: var(--text-dim); pointer-events: none; }
.presse-rich-editor h2, .presse-rich-editor h3 { margin: 0 0 14px; font-family: 'Playfair Display', Georgia, serif; line-height: 1.14; color: white; letter-spacing: -0.015em; }
.presse-rich-editor h2 { font-size: clamp(2rem, 3vw, 2.85rem); font-weight: 900; }
.presse-rich-editor h3 { font-size: clamp(1.2rem, 1.8vw, 1.55rem); color: #d8ddff; font-weight: 800; }
.presse-rich-editor p { margin: 0 0 16px; max-width: 78ch; }
.presse-rich-editor blockquote { margin: 0 0 18px; padding: 14px 18px; border-left: 3px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.04); border-radius: 0 14px 14px 0; font-style: italic; font-size: 1.02rem; }
.presse-rich-editor ul, .presse-rich-editor ol { margin: 0 0 14px 22px; }
.presse-rich-editor [data-font-size="small"] { font-size: 0.84rem; }
.presse-rich-editor [data-font-size="large"] { font-size: 1.16rem; }
.presse-rich-editor [data-font-size="xlarge"] { font-size: 1.34rem; }
.presse-compose-actions { display:flex; align-items:center; justify-content:space-between; margin-top:12px; flex-wrap:wrap; gap:10px; }
.presse-live-preview { margin-top: 0; border: 1px solid var(--border); border-radius: 20px; background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)); padding: 12px; }
.presse-live-label { font-size: 0.66rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.09em; font-weight: 700; margin-bottom: 8px; }
.presse-live-title { margin: 0 0 6px; font-family: 'Playfair Display', Georgia, serif; font-size: 1.25rem; line-height: 1.22; color: white; }
.presse-live-meta { font-size: 0.68rem; color: var(--text-muted); margin-bottom: 8px; display: flex; gap: 9px; flex-wrap: wrap; }
.presse-live-body { font-size: 0.88rem; color: var(--text-normal); line-height: 1.65; max-height: 68vh; overflow-y: auto; }
.presse-live-empty { font-size: 0.8rem; color: var(--text-dim); font-style: italic; }
.presse-live-card { border-radius: 22px; padding: 22px; background: var(--article-paper, #f5f0e8); color: var(--article-ink, #1a1008); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.presse-live-card .presse-live-title { color: var(--article-ink, #1a1008); }
.presse-live-card .presse-live-meta { color: color-mix(in srgb, var(--article-ink, #1a1008) 56%, transparent); }
.presse-live-card .presse-live-body { color: color-mix(in srgb, var(--article-ink, #1a1008) 90%, transparent); }
.presse-forbidden-hint { margin: 0 0 12px; padding: 10px 12px; border: 1px solid rgba(179,18,23,0.32); border-radius: 12px; background: linear-gradient(180deg, rgba(179,18,23,0.18), rgba(179,18,23,0.08)); color: #f3c7c7; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; }
.presse-write-box.presse-write-box-forbidden .presse-editor-shell { border-color: rgba(179,18,23,0.32); background: linear-gradient(180deg, rgba(179,18,23,0.08), rgba(255,255,255,0.01)); }
.presse-write-box.presse-write-box-forbidden .presse-format-toolbar { background: rgba(179,18,23,0.08); border-bottom-color: rgba(179,18,23,0.24); }
.presse-live-toggle { border: 1px solid rgba(255, 91, 91, 0.45); background: linear-gradient(180deg, rgba(186, 28, 28, 0.95), rgba(127, 29, 29, 0.95)); color: #fff4f4; box-shadow: 0 10px 24px rgba(127, 29, 29, 0.28); }
.presse-live-toggle:hover { background: linear-gradient(180deg, rgba(220, 38, 38, 0.98), rgba(153, 27, 27, 0.98)); }
.presse-live-toggle.active { border-color: rgba(255, 214, 214, 0.7); box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 12px 28px rgba(153, 27, 27, 0.4); }
.presse-live-compose-box { padding: 14px 16px; border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; background: linear-gradient(180deg, rgba(120,16,16,0.16), rgba(255,255,255,0.02)); margin-bottom: 14px; }
.presse-live-compose-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.presse-live-compose-head strong { display: block; color: white; font-family: var(--font-display); }
.presse-live-compose-head span { display: block; margin-top: 3px; font-size: 0.74rem; color: #ffc7c7; }
.presse-live-compose-row { display: flex; gap: 10px; align-items: center; }
.presse-live-news-row { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.presse-live-news-hint { font-size: 0.74rem; color: #ffb4b4; }
.presse-live-news-count { flex-shrink: 0; min-width: 48px; text-align: center; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.08); color: #fff3f3; font-size: 0.76rem; font-weight: 800; }
.presse-live-news-count.is-full { border-color: rgba(255, 138, 138, 0.55); background: rgba(155, 28, 28, 0.28); color: #ffd6d6; }
.presse-live-news-field { margin-top: 10px; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; background: rgba(255,255,255,0.03); }
.presse-live-news-label { display: block; margin-bottom: 8px; font-size: 0.68rem; color: #ffd6d6; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 800; }
.presse-live-news-input { width: 100%; background: rgba(62, 10, 10, 0.4); border: 1px solid rgba(255, 120, 120, 0.22); color: #fff4f4; padding: 11px 13px; border-radius: 12px; font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; }
.presse-live-news-input:focus { outline: none; border-color: rgba(255, 160, 160, 0.62); box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.18); }
.presse-live-news-input::placeholder { color: rgba(255, 220, 220, 0.46); font-weight: 500; }
.presse-live-news-copy { margin-top: 8px; font-size: 0.72rem; color: rgba(255, 210, 210, 0.82); }

.cosmos-tension-widget { position: fixed; left: 16px; bottom: 16px; z-index: 430; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cosmos-tension-fab {
    --tension-glow: rgba(87, 203, 255, 0.25);
    --tension-ink: #eaf7ff;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 8px 14px 8px 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(8,18,34,0.96), rgba(7,12,25,0.96));
    color: var(--tension-ink);
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(0,0,0,0.28);
    overflow: hidden;
}
.cosmos-tension-fab::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 30%), linear-gradient(120deg, rgba(255,255,255,0.08), transparent 46%);
    pointer-events: none;
}
.cosmos-tension-fab.is-low { --tension-glow: rgba(87, 203, 255, 0.22); }
.cosmos-tension-fab.is-guarded { --tension-glow: rgba(250, 204, 21, 0.26); }
.cosmos-tension-fab.is-elevated { --tension-glow: rgba(251, 146, 60, 0.28); }
.cosmos-tension-fab.is-high { --tension-glow: rgba(248, 113, 113, 0.32); }
.cosmos-tension-fab.is-critical { --tension-glow: rgba(239, 68, 68, 0.38); animation: cosmosThreatPulse 1.8s ease-in-out infinite; }
.cosmos-tension-ring {
    position: absolute;
    left: 8px;
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: conic-gradient(from -90deg, rgba(255,255,255,0.92) 0 var(--tension-progress, 0%), rgba(255,255,255,0.08) var(--tension-progress, 0%) 100%);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 0 24px var(--tension-glow);
}
.cosmos-tension-ring::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: rgba(5,10,22,0.92);
}
.cosmos-tension-planet {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 28%, #65dcff 0%, #2d8dd6 28%, #173f8c 58%, #0c1538 100%);
    box-shadow: inset -8px -10px 18px rgba(4, 10, 36, 0.58), inset 6px 6px 10px rgba(255,255,255,0.16), 0 0 24px var(--tension-glow);
    overflow: hidden;
    z-index: 1;
}
.cosmos-tension-planet::before,
.cosmos-tension-planet::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    background: rgba(114, 255, 191, 0.38);
    filter: blur(0.4px);
}
.cosmos-tension-planet::before { width: 18px; height: 10px; top: 11px; left: 8px; transform: rotate(-18deg); }
.cosmos-tension-planet::after { width: 14px; height: 9px; bottom: 10px; right: 8px; transform: rotate(24deg); }
.cosmos-tension-core {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 72% 26%, rgba(255,255,255,0.26), transparent 22%), radial-gradient(circle at 30% 70%, rgba(255,255,255,0.14), transparent 34%);
}
.cosmos-tension-reading { display: flex; flex-direction: column; gap: 2px; min-width: 0; position: relative; z-index: 1; }
.cosmos-tension-label { font-family: var(--font-display); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(226,241,255,0.72); }
.cosmos-tension-value { font-size: 1.05rem; line-height: 1; color: white; }
.cosmos-tension-panel { width: min(360px, calc(100vw - 32px)); border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); background: linear-gradient(180deg, rgba(8,18,34,0.98), rgba(7,12,25,0.98)); box-shadow: 0 24px 44px rgba(0,0,0,0.38); padding: 14px; color: white; }
.cosmos-tension-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cosmos-tension-risk { margin-top: 4px; font-size: 0.74rem; color: rgba(214,232,255,0.74); }
.cosmos-tension-summary { margin: 12px 0 14px; color: rgba(230,240,255,0.82); font-size: 0.82rem; line-height: 1.55; }
.cosmos-tension-factors { display: flex; flex-direction: column; gap: 10px; }
.cosmos-tension-factor { padding: 11px 12px; border-radius: 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); }
.cosmos-tension-factor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.cosmos-tension-factor-name { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(229,239,255,0.86); }
.cosmos-tension-factor-value { font-size: 0.8rem; font-weight: 800; }
.cosmos-tension-factor-value.is-positive { color: #ffd0d0; }
.cosmos-tension-factor-value.is-negative { color: #b4ffdb; }
.cosmos-tension-factor-bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.cosmos-tension-factor-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(112,201,255,0.95), rgba(255,120,120,0.95)); }
.cosmos-tension-factor-detail { margin-top: 7px; font-size: 0.73rem; color: rgba(212,227,245,0.72); line-height: 1.45; }
.cosmos-tension-updated { margin-top: 12px; font-size: 0.7rem; color: rgba(212,227,245,0.58); }

@keyframes cosmosThreatPulse {
    0%, 100% { box-shadow: 0 18px 36px rgba(0,0,0,0.28), 0 0 0 0 rgba(239,68,68,0.12); }
    50% { box-shadow: 0 18px 36px rgba(0,0,0,0.32), 0 0 0 10px rgba(239,68,68,0); }
}

.live-news-widget { position: fixed; right: 16px; bottom: 16px; z-index: 430; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.live-news-fab { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; background: linear-gradient(180deg, rgba(186,28,28,0.98), rgba(127,29,29,0.98)); color: #fff4f4; cursor: pointer; box-shadow: 0 16px 32px rgba(67,9,9,0.35); }
.live-news-fab.is-lit { box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 0 28px rgba(255, 76, 76, 0.48), 0 16px 32px rgba(67,9,9,0.42); }
.live-news-fab-ping { width: 10px; height: 10px; border-radius: 50%; background: #ffd3d3; box-shadow: 0 0 0 0 rgba(255,211,211,0.8); }
.live-news-fab.is-lit .live-news-fab-ping { animation: liveFabPing 1.4s ease-out infinite; }
.live-news-fab-label { font-family: var(--font-display); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.live-news-fab-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: rgba(255,255,255,0.14); display: inline-flex; align-items: center; justify-content: center; font-size: 0.74rem; font-weight: 800; }
.live-news-panel { width: min(360px, calc(100vw - 32px)); max-height: min(58vh, 460px); overflow: hidden; border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); background: linear-gradient(180deg, rgba(27,17,17,0.98), rgba(18,11,11,0.98)); box-shadow: 0 24px 44px rgba(0,0,0,0.38); }
.live-news-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); color: white; }
.live-news-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; max-height: calc(min(58vh, 460px) - 58px); overflow-y: auto; }
.live-news-row { display: flex; gap: 8px; align-items: stretch; }
.live-news-item { display: inline-flex; align-items: center; gap: 10px; padding: 0 14px; height: 36px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.09); color: #fff7f7; cursor: pointer; font-size: 0.86rem; line-height: 1; white-space: nowrap; position: relative; transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.live-news-item::after { content: 'Ouvrir'; display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(255,255,255,0.16); color: #fff; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.live-news-item:hover, .live-news-item:focus-visible { background: rgba(255,255,255,0.17); border-color: rgba(255,255,255,0.28); box-shadow: 0 10px 26px rgba(67, 9, 9, 0.28); transform: translateY(-1px) scale(1.01); }
.live-news-item:focus-visible { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 2px; }
.live-news-item-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; color: #ffd4d4; }
.live-news-item-title { font-weight: 700; max-width: min(72vw, 520px); overflow: hidden; text-overflow: ellipsis; }
.live-news-item-meta { font-size: 0.72rem; color: rgba(255,255,255,0.78); }
.live-news-item-icon { color: #fff4f4; font-size: 0.82rem; animation: liveArrowPulse 1.1s ease-in-out infinite; }
.live-news-item-badge { display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 8px; border-radius: 999px; background: rgba(255, 92, 92, 0.18); border: 1px solid rgba(255, 118, 118, 0.34); color: #ffd9d9; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.live-news-list .live-news-item { flex: 1; width: 100%; justify-content: flex-start; height: auto; min-height: 56px; padding: 12px 14px; white-space: normal; }
.live-news-list .live-news-item::after { content: 'Voir'; margin-left: auto; }
.live-news-item-content { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.live-news-item-meta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.live-news-item-time { font-size: 0.68rem; color: rgba(255,255,255,0.62); }
.live-news-delete-btn { width: 44px; min-width: 44px; border: 1px solid rgba(255, 120, 120, 0.25); border-radius: 14px; background: rgba(118, 18, 18, 0.3); color: #ffd7d7; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease; }
.live-news-delete-btn:hover { background: rgba(160, 24, 24, 0.42); border-color: rgba(255, 140, 140, 0.44); transform: translateY(-1px); }
.live-news-list-empty { padding: 18px 10px; text-align: center; color: var(--text-muted); }

.article-live-toggle-btn { top: 14px; right: 240px; background: linear-gradient(180deg, rgba(122, 10, 10, 0.96), rgba(161, 28, 28, 0.96)); color: #fff2f2; border-color: rgba(255,255,255,0.14); }
.article-live-toggle-btn:hover { background: linear-gradient(180deg, rgba(146, 13, 13, 0.98), rgba(191, 34, 34, 0.98)); }

@keyframes liveArrowPulse {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    50% { transform: translateX(2px); opacity: 1; }
}

@keyframes liveFabPing {
    0% { box-shadow: 0 0 0 0 rgba(255, 211, 211, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 211, 211, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 211, 211, 0); }
}

@media (max-width: 768px) {
    #main-view-wrapper { padding-bottom: 0; }
    .presse-live-compose-row { flex-direction: column; align-items: stretch; }
    .cosmos-tension-widget { left: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 86px); }
    .cosmos-tension-fab { min-height: 52px; padding-right: 12px; }
    .cosmos-tension-label { font-size: 0.62rem; }
    .cosmos-tension-value { font-size: 0.96rem; }
    .cosmos-tension-panel { width: min(320px, calc(100vw - 24px)); }
    .live-news-widget { right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 86px); }
    .live-news-fab { min-height: 44px; padding: 0 12px; }
    .live-news-item-title { max-width: 58vw; }
    .media-lightbox { padding: 10px; }
    .media-lightbox-stage,
    .media-lightbox-image { max-height: calc(100dvh - 20px); }
    .media-lightbox-close { top: 10px; right: 10px; }
}
.presse-write-box.presse-write-box-forbidden .presse-title-input:focus,
.presse-write-box.presse-write-box-forbidden .presse-urgency-select:focus { border-color: rgba(255,120,120,0.68); }
.presse-write-box.presse-write-box-forbidden .presse-live-preview { border-color: rgba(179,18,23,0.24); background: linear-gradient(145deg, rgba(179,18,23,0.08), rgba(255,255,255,0.01)); }
.presse-title-input { width: 100%; background: var(--bg-primary); border: 1px solid var(--border); color: white; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 10px; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.presse-title-input:focus { outline: none; border-color: var(--accent); }
.presse-title-input::placeholder { color: var(--text-dim); font-weight: 400; }
.article-edit-box { width: min(92vw, 760px); max-height: 88vh; overflow-y: auto; text-align: left; }
.article-edit-editor-shell { margin-top: 10px; }
.article-edit-rich-editor { min-height: 320px; }
.presse-notice { background: var(--bg-secondary); border: 1px dashed var(--border); border-radius: var(--radius-xl); padding: 30px 20px; text-align: center; color: var(--text-muted); }
.presse-urgency-select { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-normal); padding: 8px 12px; border-radius: var(--radius-sm); font-family: var(--font-main); font-size: 0.85rem; cursor: pointer; transition: border-color 0.2s; }
.presse-urgency-select:focus { outline: none; border-color: var(--accent); }

/* ARTICLE CARD — papier journal */
.article-card { --article-paper: #f5f0e8; --article-surface: #efe4d1; --article-ink: #1a1008; --article-muted: #6b5c3e; --article-accent: #c0973b; background: radial-gradient(circle at top right, color-mix(in srgb, var(--article-accent) 16%, transparent), transparent 28%), var(--article-paper); border: 1px solid color-mix(in srgb, var(--article-accent) 30%, rgba(0,0,0,0.12)); border-radius: var(--radius-xl); overflow: hidden; transition: all 0.2s; position: relative; animation: fade 0.3s; box-shadow: 0 2px 12px rgba(0,0,0,0.18); cursor: pointer; }
.article-card:hover { border-color: #b8a87a; box-shadow: 0 8px 32px rgba(0,0,0,0.28); transform: translateY(-2px); }
.article-card.article-breaking { border-color: #c0392b !important; box-shadow: 0 0 24px rgba(192,57,43,0.2) !important; }
.article-card.article-headline { border-color: #c0973b !important; box-shadow: 0 0 0 2px #c0973b, 0 0 32px rgba(192,151,59,0.35) !important; animation: headlinePulse 3s infinite; }
.article-card.article-forbidden { background: radial-gradient(circle at top right, rgba(179,18,23,0.24), transparent 30%), linear-gradient(180deg, rgba(255,120,80,0.06), transparent 26%), var(--article-paper); border-color: rgba(179,18,23,0.55); box-shadow: 0 12px 34px rgba(36,0,0,0.34); }
.article-card.article-forbidden:hover { border-color: rgba(236,89,89,0.7); box-shadow: 0 18px 42px rgba(58,0,0,0.42); }
.article-card.article-forbidden::before { content: 'DOSSIER INTERDIT'; position: absolute; top: 18px; left: -38px; transform: rotate(-16deg); background: rgba(179,18,23,0.18); border: 1px solid rgba(255,120,120,0.28); color: rgba(255,190,190,0.62); padding: 6px 52px; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.18em; pointer-events: none; }
@keyframes headlinePulse { 0%,100%{ box-shadow: 0 0 0 2px #c0973b, 0 0 32px rgba(192,151,59,0.35); } 50%{ box-shadow: 0 0 0 3px #e8b84b, 0 0 48px rgba(232,184,75,0.5); } }
.article-banner { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(3, 6, 14, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(10px);
}
.media-lightbox.hidden { display: none !important; }
.media-lightbox-stage {
    max-width: min(96vw, 1500px);
    max-height: calc(100dvh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-lightbox-image {
    max-width: 100%;
    max-height: calc(100dvh - 48px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
    background: rgba(255,255,255,0.04);
}
.media-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.08);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.media-lightbox-close:hover { background: rgba(255,255,255,0.16); }
.article-body { padding: 24px 28px 20px; }

/* Tags urgence */
.article-urgency-tag { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; padding: 3px 12px; border-radius: 4px; margin-bottom: 14px; text-transform: uppercase; font-family: var(--font-display); }
.article-journal-chip { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; background: color-mix(in srgb, var(--article-surface) 86%, transparent); border: 1px solid color-mix(in srgb, var(--article-accent) 34%, rgba(0,0,0,0.08)); border-radius: 999px; padding: 4px 10px 4px 6px; font-size: 0.7rem; font-weight: 700; color: var(--article-muted); }
.article-journal-logo { width: 18px; height: 18px; border-radius: 50%; object-fit: contain; border: 1px solid color-mix(in srgb, var(--article-accent) 34%, rgba(0,0,0,0.08)); background: rgba(255,255,255,0.4); padding: 1px; }
.urgency-urgent   { background: #c0392b; color: #fff; }
.urgency-enquete  { background: #1a6b8a; color: #fff; }
.urgency-officiel { background: #5a3e8c; color: #fff; }
.urgency-economie { background: #2e7d32; color: #fff; }

/* Titre article — Playfair */
.article-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.7rem; font-weight: 900; color: var(--article-ink); margin: 0 0 16px; line-height: 1.2; letter-spacing: -0.01em; }
.article-published-at { font-size: 0.72rem; color: color-mix(in srgb, var(--article-ink) 55%, transparent); margin: -6px 0 12px; display: flex; align-items: center; gap: 6px; }
.article-byline { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; cursor: pointer; padding: 10px; background: rgba(0,0,0,0.05); border-radius: var(--radius); border: 1px solid #d4c9a8; transition: background 0.15s; }
.article-byline:hover { background: rgba(0,0,0,0.09); }
.article-author-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid #d4c9a8; }
.article-author-name { font-weight: 700; font-size: 0.88rem; color: var(--article-ink); font-family: var(--font-display); display: block; }
.article-author-role { font-size: 0.7rem; color: var(--article-muted); }
.article-date { font-size: 0.72rem; color: color-mix(in srgb, var(--article-ink) 52%, transparent); margin-left: auto; white-space: nowrap; }
.article-separator { height: 2px; background: linear-gradient(90deg, var(--article-accent), transparent); margin: 0 0 18px; border-radius: 1px; }

/* Contenu article — Playfair + lettrine */
.article-content { font-family: 'Playfair Display', Georgia, serif; color: color-mix(in srgb, var(--article-ink) 92%, transparent); font-size: 1rem; line-height: 1.85; white-space: pre-wrap; text-align: justify; margin-bottom: 18px; overflow: hidden; }
.article-content-rich { white-space: normal; }
.article-content-rich p { margin: 0 0 14px; }
.article-content-rich p:first-child::first-letter { float: left; font-family: 'Playfair Display', Georgia, serif; font-size: 4.2rem; font-weight: 900; line-height: 0.72; margin-right: 8px; margin-top: 6px; color: var(--article-accent); }
.article-dropcap { float: left; font-family: 'Playfair Display', Georgia, serif; font-size: 4.2rem; font-weight: 900; line-height: 0.72; margin-right: 8px; margin-top: 6px; color: var(--article-accent); }
.article-inline-h1 { margin: 10px 0 10px; font-size: 1.42rem; line-height: 1.2; color: var(--article-ink); font-family: 'Playfair Display', Georgia, serif; }
.article-inline-h2 { margin: 12px 0 8px; font-size: 1.08rem; line-height: 1.3; color: color-mix(in srgb, var(--article-ink) 84%, transparent); font-family: 'Playfair Display', Georgia, serif; }
.article-inline-small { margin: 8px 0; font-size: 0.82rem; color: color-mix(in srgb, var(--article-ink) 58%, transparent); line-height: 1.5; }
.article-inline-quote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--article-accent); background: color-mix(in srgb, var(--article-accent) 12%, transparent); font-style: italic; color: color-mix(in srgb, var(--article-ink) 86%, transparent); border-radius: 6px; }
.article-card.article-forbidden .article-journal-chip { background: rgba(255,255,255,0.03); color: #f0c8c8; border-color: rgba(255,120,120,0.22); }
.article-card.article-forbidden .article-title { text-transform: uppercase; letter-spacing: 0.04em; text-shadow: 0 0 18px rgba(179,18,23,0.18); }
.article-card.article-forbidden .article-published-at,
.article-card.article-forbidden .article-sig-role { color: rgba(243,214,201,0.68); }
.article-card.article-forbidden .article-inline-quote { background: rgba(179,18,23,0.14); border-left-color: rgba(255,120,120,0.72); color: #ffcccc; }
.article-card.article-forbidden .article-content { text-shadow: 0 0 1px rgba(255,220,220,0.06); }
.article-card.article-forbidden .article-separator,
.article-card.article-forbidden .article-actions { border-color: rgba(179,18,23,0.26); }
.article-inline-list { margin: 0 0 14px 20px; }
.article-inline-list li { margin-bottom: 6px; }
.article-font-small { font-size: 0.86rem; }
.article-font-large { font-size: 1.16rem; }
.article-font-xlarge { font-size: 1.3rem; }

.article-actions { border-top: 1px solid color-mix(in srgb, var(--article-accent) 28%, rgba(0,0,0,0.08)); padding-top: 12px; display: flex; gap: 6px; }
.article-actions .action-item { color: var(--article-muted); }
.article-actions .action-item:hover { color: var(--accent); background: rgba(108,99,255,0.08); }
.article-actions .action-item.liked { color: #c0392b; }
.article-footer-signature { background: color-mix(in srgb, var(--article-surface) 72%, transparent); border-left-color: var(--article-accent); }
.article-sig-avatar { border-color: color-mix(in srgb, var(--article-accent) 42%, rgba(0,0,0,0.08)); }
.article-sig-name { color: var(--article-ink); }
.article-sig-role { color: var(--article-muted); }
.article-del-btn { position: absolute; top: 14px; right: 14px; background: rgba(192,57,43,0.12); border: 1px solid rgba(192,57,43,0.3); color: #c0392b; padding: 5px 9px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.8rem; transition: all 0.2s; }
.article-del-btn:hover { background: rgba(192,57,43,0.22); }
.article-edit-btn { position: absolute; top: 14px; right: 54px; background: rgba(108,99,255,0.12); border: 1px solid rgba(108,99,255,0.3); color: var(--accent); padding: 5px 9px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.8rem; transition: all 0.2s; }
.article-edit-btn:hover { background: rgba(108,99,255,0.28); }
.article-headline-btn { position: absolute; top: 14px; right: 102px; background: rgba(192,151,59,0.15); border: 1px solid rgba(192,151,59,0.4); color: #8b6914; padding: 5px 9px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.78rem; font-weight: 700; transition: all 0.2s; white-space: nowrap; }
.article-headline-btn:hover { background: rgba(192,151,59,0.3); }
.article-headline .article-headline-btn { background: rgba(192,151,59,0.3); color: #c0973b; border-color: #c0973b; }

/* ==================== ACTUALITÉS ==================== */
#view-actualites { overflow-y: auto; align-items: center; padding: 0 20px 30px; }
.actu-container { width: 100%; max-width: 660px; margin: 20px auto 40px; display: flex; flex-direction: column; gap: 0; }
.actu-form-box { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 20px; margin-bottom: 24px; }
.actu-date-header { padding: 10px 0 6px; font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; color: var(--accent-soft); text-transform: uppercase; letter-spacing: 0.12em; border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.actu-event-item { display: flex; align-items: stretch; gap: 12px; padding: 10px 0; }
.actu-time { font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; color: var(--text-muted); min-width: 48px; padding-top: 2px; }
.actu-dot-line { display: flex; flex-direction: column; align-items: center; width: 14px; flex-shrink: 0; }
.actu-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); flex-shrink: 0; margin-top: 4px; }
.actu-line { width: 2px; flex: 1; background: var(--border); margin-top: 4px; }
.actu-event-item:last-child .actu-line { display: none; }
.actu-event-body { flex: 1; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; transition: background 0.15s; }
.actu-event-body:hover { background: var(--bg-hover); }
.actu-event-text { font-size: 0.92rem; color: var(--text-normal); line-height: 1.4; }
.actu-del-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px 6px; border-radius: var(--radius-sm); font-size: 0.82rem; transition: all 0.2s; flex-shrink: 0; }
.actu-del-btn:hover { color: var(--danger); background: var(--danger-muted); }
.actu-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.actu-empty i { font-size: 2.5rem; margin-bottom: 12px; display: block; color: var(--text-dim); }


/* ==================== BANDEAU ALERTE GLOBAL [NOUVEAU] ==================== */
.global-alert-banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 20px; font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; flex-shrink: 0; z-index: 200; animation: alertPulse 3s infinite; }
.global-alert-banner.hidden { display: none !important; }
.alert-red    { background: rgba(218,55,60,0.95); color: white; border-bottom: 2px solid #ff4757; }
.alert-orange { background: rgba(245,158,11,0.95); color: white; border-bottom: 2px solid #f59e0b; }
.alert-yellow { background: rgba(234,179,8,0.95); color: #000; border-bottom: 2px solid #eab308; }
.alert-blue   { background: rgba(59,130,246,0.95); color: white; border-bottom: 2px solid #3b82f6; }
@keyframes alertPulse { 0%,100%{opacity:1;} 50%{opacity:0.85;} }
.alert-dismiss-btn { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.25); color: inherit; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; margin-left: 8px; transition: all 0.2s; flex-shrink: 0; }
.alert-dismiss-btn:hover { background: rgba(0,0,0,0.4); }
body[data-alert="red"]    { outline: 3px solid rgba(218,55,60,0.25); outline-offset: -3px; }
body[data-alert="orange"] { outline: 3px solid rgba(245,158,11,0.25); outline-offset: -3px; }
body[data-alert="yellow"] { outline: 3px solid rgba(234,179,8,0.25); outline-offset: -3px; }
body[data-alert="blue"]   { outline: 3px solid rgba(59,130,246,0.25); outline-offset: -3px; }
.alert-color-btn { flex:1; border: 2px solid transparent; color: white; padding: 7px 4px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.72rem; font-weight: 700; font-family: var(--font-main); transition: all 0.2s; }
.alert-color-btn.active-alert-btn { border-color: white; box-shadow: 0 0 10px rgba(255,255,255,0.3); transform: scale(1.05); }

/* ==================== FORMULAIRE CRÉATION PERSO AMÉLIORÉ [NOUVEAU] ==================== */
.char-form-section { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.char-form-section-title { font-family: var(--font-display); font-size: 0.65rem; font-weight: 700; color: var(--accent-soft); text-transform: uppercase; letter-spacing: 0.12em; }
#create-char-form { gap: 8px !important; }
#create-char-form input[type="text"], #create-char-form textarea, #create-char-form input[type="number"] { background: var(--bg-tertiary); border: 1px solid var(--border); color: white; padding: 7px 10px; border-radius: var(--radius-sm); font-family: var(--font-main); font-size: 0.85rem; width: 100%; }
#create-char-form input:focus, #create-char-form textarea:focus { outline: none; border-color: var(--accent); }

/* ==================== CAPITAL BADGE [NOUVEAU] ==================== */
.profile-capital-badge { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(245,158,11,0.08)); border: 1px solid rgba(234,179,8,0.3); padding: 3px 10px; border-radius: 12px; font-size: 0.78rem; color: #fbbf24; font-weight: 700; margin-top: 5px; }

/* ==================== MESSAGES CRYPTÉS [NOUVEAU] ==================== */
.crypto-message { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, rgba(108,99,255,0.08), rgba(139,133,255,0.04)); border: 1px solid rgba(108,99,255,0.2); border-radius: var(--radius); padding: 9px 13px; margin: 2px 0; }
.crypto-icon { color: var(--accent-soft); font-size: 0.95rem; flex-shrink: 0; }
.crypto-glitch { font-family: monospace; font-size: 0.82rem; color: var(--text-muted); letter-spacing: 0.05em; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crypto-unlock-btn { background: var(--accent-muted); border: 1px solid rgba(108,99,255,0.3); color: var(--accent-soft); padding: 4px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.75rem; font-weight: 600; white-space: nowrap; transition: all 0.2s; font-family: var(--font-main); flex-shrink: 0; }
.crypto-unlock-btn:hover { background: rgba(108,99,255,0.25); border-color: var(--accent); color: white; }

/* ==================== MODALE PERSONNAGE — TABS ==================== */
.char-modal-box { background: var(--bg-secondary); border-radius: var(--radius-xl); width: 92%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px var(--border); animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1); overflow: hidden; }
.char-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.char-modal-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: white; letter-spacing: -0.02em; }
.char-modal-close { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-muted); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.char-modal-close:hover { color: white; background: var(--danger-muted); border-color: var(--danger); transform: rotate(90deg); }
.char-modal-body { overflow-y: auto; padding: 20px 22px; flex: 1; display: flex; flex-direction: column; gap: 0; }
.char-modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--border); flex-shrink: 0; }

/* Tabs */
.char-form-tabs { display: flex; gap: 4px; margin-bottom: 18px; background: var(--bg-primary); padding: 4px; border-radius: var(--radius); border: 1px solid var(--border); flex-shrink: 0; }
.char-tab { flex: 1; background: none; border: none; color: var(--text-muted); padding: 7px 6px; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-main); font-size: 0.78rem; font-weight: 600; transition: transform 0.18s, color 0.18s, background 0.18s, box-shadow 0.18s; white-space: nowrap; }
.char-tab:hover { color: var(--text-normal); background: var(--bg-hover); }
.char-tab.active { background: var(--accent-muted); color: white; box-shadow: inset 0 0 0 1px rgba(108,99,255,0.3), 0 8px 18px rgba(108,99,255,0.16); transform: translateY(-1px); }

/* Contenu onglets */
.char-tab-content { display: none; flex-direction: column; gap: 10px; }
.char-tab-content.active-tab { display: flex; }
.char-form-row { display: flex; gap: 10px; }
.char-form-row > div { display: flex; flex-direction: column; gap: 4px; }
.cfl { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.char-input { background: var(--bg-primary); border: 1px solid var(--border); color: white; padding: 9px 12px; border-radius: var(--radius-sm); font-family: var(--font-main); font-size: 0.88rem; width: 100%; transition: border-color 0.2s; }
.char-input:focus { outline: none; border-color: var(--accent); }
.char-input::placeholder { color: var(--text-dim); }

/* Bloc ajout entreprise dans modal */
.char-company-adder { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-top: 8px; }

/* Responsive */
@media (max-width: 520px) {
    .char-form-row { flex-direction: column; }
    .char-modal-box { max-height: 95vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; align-self: flex-end; }
}

/* ==================== MP PERSONNAGES — REFONTE ==================== */
.char-mp-layout { display: flex; width: 100%; height: 100%; overflow: hidden; }

/* ── Sidebar ── */
.char-mp-sidebar { width: 260px; flex-shrink: 0; background: var(--bg-secondary); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.char-mp-sidebar-header { padding: 13px 14px 10px; border-bottom: 1px solid var(--border); font-family: var(--font-display); font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 8px; flex-shrink: 0; background: var(--bg-primary); }
.char-mp-sidebar-header i { color: var(--accent); }
.char-mp-sidebar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 10px 4px; }
.char-mp-new-btn { margin: 0; padding: 8px 12px; background: var(--accent-muted); border: 1px solid rgba(108,99,255,0.3); color: var(--accent-soft); border-radius: var(--radius); cursor: pointer; font-family: var(--font-main); font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.18s; flex-shrink: 0; }
.char-mp-new-btn:hover { background: rgba(108,99,255,0.25); color: white; }
.char-mp-archive-btn { margin: 0; padding: 8px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-normal); border-radius: var(--radius); cursor: pointer; font-family: var(--font-main); font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.18s; }
.char-mp-archive-btn:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.12); color: white; }

/* Liste des convos */
.char-mp-convo-list { flex: 1; overflow-y: auto; padding: 4px 0 12px; }
.char-mp-empty-list { padding: 24px 14px; text-align: center; color: var(--text-muted); font-size: 0.8rem; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.char-mp-empty-list i { font-size: 1.5rem; color: var(--text-dim); }

/* Groupe : mon perso */
.char-mp-group { margin-bottom: 2px; }
.char-mp-group-header { display: flex; align-items: center; gap: 9px; padding: 8px 12px 4px; cursor: default; }
.char-mp-group-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.char-mp-group-info { display: flex; flex-direction: column; min-width: 0; }
.char-mp-group-name { font-size: 0.8rem; font-weight: 800; font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-mp-group-role { font-size: 0.6rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-mp-group-convos { padding: 0 6px 4px 42px; }

/* Item de conversation */
.char-mp-conv-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.14s; margin-bottom: 1px; position: relative; }
.char-mp-conv-item:hover { background: var(--bg-hover); }
.char-mp-conv-item.active { background: var(--accent-muted); box-shadow: inset 0 0 0 1px rgba(108,99,255,0.2); }
.char-mp-conv-item.unread { background: rgba(108,99,255,0.06); }
.char-mp-conv-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.char-mp-conv-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.char-mp-conv-name { font-size: 0.82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-mp-conv-last { font-size: 0.62rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-mp-unread-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 6px var(--accent-glow); }

/* ── Zone principale ── */
.char-mp-main { flex: 1; display: flex; flex-direction: column; background: var(--bg-chat); overflow: hidden; min-width: 0; }
#char-mp-convo,
.char-mp-main,
.char-mp-messages { min-height: 0; }
.char-mp-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; gap: 10px; }
.char-mp-empty i { font-size: 2.5rem; color: var(--text-dim); }
.char-mp-empty p { color: white; font-weight: 700; font-family: var(--font-display); margin: 0; }
.char-mp-empty span { font-size: 0.82rem; color: var(--text-muted); }

/* Header conversation : MON PERSO ↔ CIBLE */
.char-mp-convo-header { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: rgba(14,15,19,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.char-mp-header-mine  { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.char-mp-header-theirs { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; justify-content: flex-end; cursor: pointer; }
.char-mp-header-theirs:hover .char-mp-header-name { text-decoration: underline; }
.char-mp-header-info { display: flex; flex-direction: column; min-width: 0; }
.char-mp-header-name  { font-weight: 800; color: white; font-size: 0.9rem; font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-mp-header-role  { font-size: 0.65rem; color: var(--text-muted); }
.char-mp-header-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.char-mp-avatar-mine   { }
.char-mp-avatar-target { }
.char-mp-header-arrow  { color: var(--text-dim); font-size: 0.9rem; flex-shrink: 0; }

/* Messages */
.char-mp-messages { flex: 1; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 8px; }
.char-mp-typing { font-size: 0.72rem; color: var(--accent-soft); padding: 0 20px 8px; min-height: 20px; }
.char-mp-history-toolbar { display: flex; justify-content: center; padding: 12px 18px 0; flex-shrink: 0; }
.modal-history-toolbar { padding: 10px 16px 0; }
.char-mp-input-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--bg-secondary); flex-shrink: 0; }
.char-mp-input-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.char-mp-header-btn { margin-left: 8px; white-space: nowrap; }

/* ── Blocs de messages groupés ── */
.cmp-block { display: flex; gap: 10px; max-width: min(88%, 960px); align-items: flex-end; }
.cmp-block-other { align-self: flex-start; }
.cmp-block-self { align-self: flex-end; margin-left: auto; }
.cmp-block-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.cmp-block-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cmp-block-self .cmp-block-body { align-items: flex-end; }
.cmp-block-head { font-size: 0.72rem; font-weight: 700; color: var(--sender-color, var(--accent)); padding: 0 4px; }
.cmp-block-self .cmp-block-head { text-align: right; }
.cmp-block-stack { display: flex; flex-direction: column; gap: 4px; }
.cmp-block-text { background: var(--bg-secondary); border: 1px solid var(--border); padding: 10px 14px; border-radius: 18px; font-size: 0.93rem; color: var(--text-normal); line-height: 1.45; word-break: break-word; overflow-wrap: anywhere; box-shadow: 0 10px 24px rgba(0,0,0,0.18); display: flex; flex-direction: column; gap: 2px; max-width: 100%; }
.cmp-block-self .cmp-block-text { background: linear-gradient(180deg, rgba(108,99,255,0.16), rgba(108,99,255,0.12)); border-color: rgba(108,99,255,0.32); }
.cmp-block-line { display: flex; flex-direction: column; gap: 4px; }
.cmp-block-line + .cmp-block-line { padding-top: 0; border-top: none; margin-top: 0; }
.cmp-block-line-text { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.cmp-block-time { font-size: 0.62rem; color: var(--text-dim); align-self: flex-end; padding: 0 2px; }

/* Archives MP perso */
.char-mp-archives { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.char-mp-archives-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); background: rgba(14,15,19,0.88); }
.char-mp-archives-title { font-family: var(--font-display); font-size: 0.92rem; font-weight: 800; color: white; display: flex; align-items: center; gap: 8px; }
.char-mp-archives-title i { color: var(--accent); }
.char-mp-archives-subtitle { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.char-mp-archives-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); flex: 1; min-height: 0; }
.char-mp-archive-sidebar { border-right: 1px solid var(--border); overflow-y: auto; background: var(--bg-secondary); }
.char-mp-archive-list { padding: 8px 0 12px; }
.char-mp-archive-main { min-width: 0; display: flex; flex-direction: column; background: var(--bg-chat); }
.char-mp-archive-thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.char-mp-archive-thread-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: rgba(14,15,19,0.9); }
.char-mp-archive-item { width: 100%; background: transparent; border: none; text-align: left; }
.char-mp-archive-messages { background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent); }

/* Recherche */
.char-mp-select { background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-normal); padding: 5px 8px; border-radius: var(--radius-sm); font-family: var(--font-main); font-size: 0.82rem; width: 100%; }
.char-mp-select:focus { outline: none; border-color: var(--accent); }
.char-mp-search-input { background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-normal); padding: 8px 12px; border-radius: var(--radius-sm); font-family: var(--font-main); font-size: 0.85rem; width: 100%; margin-top: 6px; }
.char-mp-search-input:focus { outline: none; border-color: var(--accent); }
.char-mp-search-results { position: absolute; top: calc(100% + 2px); left: 0; right: 0; background: var(--bg-secondary); border: 1px solid var(--accent); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 300; max-height: 250px; overflow-y: auto; }
.char-mp-search-results { transform-origin: top center; animation: dropdownIn 0.18s cubic-bezier(0.34, 1.56, 0.64, 1); }
.char-mp-search-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; transition: background 0.15s; }
.char-mp-search-item:hover { background: var(--accent-muted); }
.char-mp-search-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.char-mp-mini-label { font-size: 0.65rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; }

/* Badge nav */
.nav-unread-dot { position: absolute; top: 4px; right: 6px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; box-shadow: 0 0 6px rgba(218,55,60,0.7); }
.nav-unread-dot:not(.hidden) { min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--bg-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 800; color: white; box-shadow: 0 0 10px rgba(218,55,60,0.6); }
.nav-char-mp-unread { color: white !important; text-shadow: 0 0 12px var(--accent-glow); }

@media (max-width: 600px) {
    .char-mp-sidebar { width: 60px; }
    .char-mp-group-info, .char-mp-conv-info, .char-mp-group-convos { display: none; }
    .char-mp-new-btn span { display: none; }
    .presse-compose-modal-box { width: min(100vw - 10px, 1520px); max-width: min(100vw - 10px, 1520px); max-height: calc(100vh - 10px); }
    .presse-write-box { max-height: calc(100vh - 10px); padding: 16px; border-radius: 22px; }
    .char-mp-archive-btn { padding-inline: 0; }
    .char-mp-group-header { justify-content: center; }
    .char-mp-conv-item { justify-content: center; }
    .char-mp-archives-layout { grid-template-columns: 1fr; }
    .char-mp-archive-sidebar { max-height: 180px; border-right: none; border-bottom: 1px solid var(--border); }
    .cmp-block { max-width: 100%; }
}

/* ==================== SIDEBAR DROITE — PERSOS PAR JOUEUR ==================== */
.online-owner-header { display: flex; align-items: center; gap: 7px; padding: 10px 10px 5px; margin-top: 6px; }
.online-owner-name { font-size: 0.7rem; font-weight: 800; color: white; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-display); }
.online-chars-block { border: 1px solid rgba(108,99,255,0.18); border-radius: var(--radius); background: rgba(108,99,255,0.04); margin: 0 6px 8px; overflow: hidden; }
.online-char-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; transition: background 0.14s; border-top: 1px solid rgba(255,255,255,0.03); }
.online-char-item:first-child { border-top: none; }
.online-char-item:hover { background: rgba(108,99,255,0.1); }
.online-char-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.online-char-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.online-char-name { font-size: 0.8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.online-char-role { font-size: 0.62rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== OMBRA — BOUTON SUPPRESSION ==================== */
.ombra-msg { position: relative; padding-right: 30px; }
.ombra-del-btn { display: none; position: absolute; top: 50%; right: 0; transform: translateY(-50%); background: rgba(218,55,60,0.12); border: 1px solid rgba(218,55,60,0.2); color: var(--danger); border-radius: var(--radius-sm); width: 24px; height: 24px; cursor: pointer; font-size: 0.62rem; align-items: center; justify-content: center; transition: all 0.18s; }
.ombra-msg:hover .ombra-del-btn { display: flex; }
.ombra-del-btn:hover { background: rgba(218,55,60,0.25); }

/* ==================== IMAGE PREVIEW UPLOAD ==================== */
.img-preview-row { display: flex; align-items: center; gap: 10px; }
.img-preview { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; border: 2px solid var(--accent-muted); flex-shrink: 0; }
.img-preview.hidden { display: none; }

/* Responsive MP */
@media (max-width: 580px) {
    .char-mp-sidebar { width: 68px; }
    .char-mp-new-conv, .char-mp-section-label, .char-mp-contact-info, .char-mp-mini-label { display: none; }
    .char-mp-contact-item { justify-content: center; }
    .char-mp-contact-avatar-wrap { width: 44px; height: 44px; }
    .char-mp-contact-avatar { width: 44px; height: 44px; }
}

/* ==================== [CITÉS] SYSTÈME GÉOPOLITIQUE ==================== */

/* Vue + layout */
#view-cites { display: flex; flex-direction: column; overflow: hidden; position: relative; }
.cites-main { flex: 1; overflow-y: auto; padding: 0 20px 40px; min-width: 0; }
.cites-header { padding: 20px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.cites-title { margin: 0; font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: white; letter-spacing: -0.01em; }
.cites-title i { color: var(--accent); margin-right: 8px; }

/* Sections par archipel */
.cites-section { margin-bottom: 28px; }
.cites-section-title { font-family: var(--font-display); font-size: 0.68rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; padding: 5px 0 8px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }

/* Grille — auto-fill compact pour tenir dans l'écran */
.cites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 14px; }

/* Carte cité */
.city-card { background: radial-gradient(circle at top right, rgba(255,255,255,0.06), transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)), var(--bg-secondary); border: 1px solid rgba(255,255,255,0.06); border-radius: 18px; padding: 14px 14px 12px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, border-color 0.18s, background 0.18s; position: relative; overflow: hidden; min-height: 188px; }
.city-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0,0,0,0.34); border-color: rgba(108,99,255,0.34); }
.city-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.city-card.trend-positive::before { background: linear-gradient(90deg, #23a559, #00d4aa); }
.city-card.trend-negative::before { background: linear-gradient(90deg, #da373c, #f59e0b); }
.city-card.trend-neutral::before  { background: var(--border); }

/* Drapeau sur la carte */
.city-card-flag { width: 100%; height: 62px; object-fit: contain; border-radius: 10px; margin-bottom: 10px; border: 1px solid var(--border); display: block; background: rgba(255,255,255,0.04); padding: 6px; }

.city-card-name { font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: white; margin-bottom: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-card-edc-row { display: flex; align-items: baseline; gap: 5px; margin-bottom: 4px; flex-wrap: wrap; }
.city-card-edc-label { font-size: 0.56rem; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em; flex-shrink: 0; }
.city-card-edc-value { font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: var(--accent-soft); }
.city-card-pop { font-size: 0.68rem; color: var(--text-muted); margin-bottom: 7px; display: flex; align-items: center; gap: 4px; }
.city-card-pop i { font-size: 0.58rem; opacity: 0.6; }
.city-card-trend { font-size: 0.68rem; font-weight: 600; padding: 2px 7px; border-radius: 20px; width: fit-content; white-space: nowrap; }
.city-card-trend.trend-positive { background: rgba(35,165,89,0.15); color: #23a559; }
.city-card-trend.trend-negative { background: rgba(218,55,60,0.15); color: #da373c; }
.city-card-trend.trend-neutral  { background: var(--bg-hover); color: var(--text-muted); }
.city-card-evol { font-size: 0.65rem; font-weight: 700; }
.city-card-evol.evol-pos { color: #23a559; }
.city-card-evol.evol-neg { color: #da373c; }

/* Panneau détail (slide depuis la droite comme profil) */
.city-detail-panel { position: fixed; top: var(--nav-height); right: 0; width: min(460px, 100vw); height: calc(100% - var(--nav-height)); background: radial-gradient(circle at top left, rgba(255,255,255,0.045), transparent 30%), linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)), var(--bg-secondary); border-left: 1px solid rgba(255,255,255,0.065); z-index: 400; transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s; transform: translateX(100%); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; padding-bottom: 40px; box-sizing: border-box; }
.city-detail-panel.open { transform: translateX(0); box-shadow: -20px 0 60px rgba(0,0,0,0.5), inset 1px 0 0 rgba(255,255,255,0.03); }

/* Drapeau dans le panneau */
.city-detail-flag { width: 96px; height: 64px; object-fit: contain; border-radius: 5px; border: 1px solid var(--border); flex-shrink: 0; background: rgba(255,255,255,0.05); }

/* Hero */
.city-hero { padding: 48px 20px 18px; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.city-hero-positive { background: linear-gradient(135deg, rgba(35,165,89,0.18), transparent 70%); }
.city-hero-negative { background: linear-gradient(135deg, rgba(218,55,60,0.18), transparent 70%); }
.city-hero-neutral  { background: linear-gradient(135deg, rgba(108,99,255,0.1), transparent 70%); }
.city-hero-name { font-family: var(--font-display); font-size: 1.7rem; font-weight: 900; color: white; letter-spacing: -0.03em; line-height: 1.1; }
.city-hero-archipel { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }

/* Stats row */
.city-stats-row { display: flex; padding: 0 16px 14px; gap: 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.city-stat-card { flex: 1; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 8px; text-align: center; min-width: 0; }
.city-stat-card.city-stat-edc { flex: 1.4; }
.city-stat-value { font-family: var(--font-display); font-size: 0.85rem; font-weight: 800; color: white; word-break: break-word; line-height: 1.2; }
.city-stat-value.trend-positive { color: #23a559; }
.city-stat-value.trend-negative { color: #da373c; }
.city-stat-value.trend-neutral  { color: var(--text-muted); }
.city-stat-label { font-size: 0.58rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; margin-top: 3px; }
.city-edc-evol { font-size: 0.65rem; font-weight: 700; margin-top: 4px; }
.city-edc-evol.evol-pos { color: #23a559; }
.city-edc-evol.evol-neg { color: #da373c; }
.city-edc-evol.trend-neutral { color: var(--text-muted); }

/* Sections */
.city-section { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.city-section-title { font-family: var(--font-display); font-size: 0.65rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.city-president { font-size: 1rem; font-weight: 700; color: white; font-family: var(--font-display); }
.city-relations-list { display: flex; flex-direction: column; gap: 8px; }
.city-relations-item { display: flex; gap: 10px; align-items: flex-start; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.city-relations-flag { width: 34px; height: 24px; object-fit: contain; border: 1px solid var(--border); border-radius: 3px; background: rgba(255,255,255,0.04); flex-shrink: 0; }
.city-relations-content { min-width: 0; flex: 1; }
.city-relations-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.city-relations-name { font-weight: 700; color: white; font-size: 0.82rem; }
.city-relations-meta { font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; }
.city-relations-desc { font-size: 0.74rem; color: var(--text-muted); line-height: 1.4; margin-top: 5px; }
.city-relations-empty { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }

/* Bar chart historique */
.city-edc-chart { display: flex; align-items: flex-end; gap: 4px; height: 56px; }
.chart-bar-wrap { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; gap: 2px; }
.chart-bar { width: 100%; background: var(--accent-muted); border-radius: 2px 2px 0 0; transition: height 0.4s ease; }
.chart-bar.chart-bar-last { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.chart-bar-label { font-size: 0.5rem; color: var(--text-dim); }

/* Admin panel */
.city-admin-panel { padding: 14px 18px; background: rgba(245,158,11,0.04); border-top: 2px solid rgba(245,158,11,0.2); }
.city-trend-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.city-trend-btn { padding: 9px 6px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; font-family: var(--font-main); font-size: 0.75rem; font-weight: 700; transition: all 0.18s; display: flex; align-items: center; justify-content: center; gap: 4px; }
.city-trend-btn:hover { filter: brightness(1.2); transform: translateY(-1px); }
.city-trend-btn.trend-up2    { background: rgba(35,165,89,0.12);  color: #23a559; border-color: rgba(35,165,89,0.3); }
.city-trend-btn.trend-up1    { background: rgba(0,212,170,0.08);  color: #00d4aa; border-color: rgba(0,212,170,0.25); }
.city-trend-btn.trend-stable { background: var(--bg-hover); color: var(--text-muted); grid-column: 1 / -1; }
.city-trend-btn.trend-down1  { background: rgba(245,158,11,0.1);  color: #f59e0b; border-color: rgba(245,158,11,0.3); }
.city-trend-btn.trend-down2  { background: rgba(218,55,60,0.12); color: #da373c; border-color: rgba(218,55,60,0.3); }

/* Badge président sur le profil perso */
.president-badge { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(234,179,8,0.08)); border: 1px solid rgba(245,158,11,0.3); padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; color: #fbbf24; font-weight: 700; }
.president-badge i { font-size: 0.75rem; }

/* Responsive */
@media (max-width: 640px) {
    .cites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .city-card { min-height: 0; border-radius: 16px; padding: 12px; }
    .city-card-flag { height: 54px; }
    .city-detail-panel { width: 100vw; border-left: none; }
    .city-hero-name { font-size: 1.3rem; }
}
/* ==================== [FIN CITÉS] ==================== */

/* ==================== [MAPS] ==================== */
#view-map { display: flex; flex-direction: column; overflow: hidden; }
.map-main { flex: 1; overflow-y: auto; padding: 0 20px 36px; }
.map-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 20px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.map-subtitle { margin-top: 6px; color: var(--text-muted); font-size: 0.86rem; }
.map-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.map-tab { background: var(--bg-tertiary); color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; transition: transform 0.18s, color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s; }
.map-tab:hover { color: white; border-color: rgba(255,255,255,0.2); }
.map-tab.active { background: rgba(56,189,248,0.14); color: #9bddff; border-color: rgba(56,189,248,0.38); box-shadow: 0 8px 18px rgba(56,189,248,0.14); transform: translateY(-1px); }
.world-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.world-map-column { min-width: 0; }
.map-filters-card { margin-bottom: 12px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.map-filters-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.map-filters-title { font-family: var(--font-display); font-size: 0.92rem; font-weight: 800; color: white; display: flex; align-items: center; gap: 8px; }
.map-filters-copy { margin-top: 6px; color: var(--text-muted); font-size: 0.76rem; line-height: 1.4; }
.map-filter-reset { white-space: nowrap; }
.map-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.map-filter-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-tertiary); color: var(--text-muted); cursor: pointer; transition: all 0.18s ease; }
.map-filter-chip.active { color: white; border-color: rgba(255,255,255,0.24); background: rgba(255,255,255,0.08); }
.map-filter-chip:hover { color: white; transform: translateY(-1px); }
.world-map-stage-wrap { background: radial-gradient(circle at top, rgba(108,99,255,0.1), transparent 30%), linear-gradient(180deg, rgba(11,15,24,0.95), rgba(7,10,17,0.98)); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 12px; overflow: hidden; }
.world-map-stage { position: relative; min-height: 560px; border-radius: var(--radius); background: linear-gradient(180deg, #0d1725, #09111b); overflow: auto; }
.world-map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-weight: 700; z-index: 1; background: rgba(7,10,17,0.55); }
.world-map-region-selection { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 2; background: rgba(7,10,17,0.82); border: 1px solid rgba(250,204,21,0.34); border-radius: 12px; padding: 10px 12px; color: #fef08a; font-size: 0.78rem; }
.world-map-region-selection.hidden { display: none; }
.world-map-canvas { position: relative; min-width: 100%; min-height: 100%; }
.world-map-canvas svg { display: block; width: 100%; height: auto; min-width: 900px; }
.world-map-svg [id^="state"],
.world-map-svg [id^="burgLabel"],
.world-map-svg [id^="stateLabel"] { transition: opacity 0.18s ease, transform 0.18s ease; }
.world-map-city-target { cursor: pointer; }
.world-map-city-target:hover { opacity: 0.82; }
.world-map-city-label { cursor: pointer; }
.world-map-city-label:hover { filter: brightness(1.15); }
.world-map-region-target { transition: opacity 0.18s ease, filter 0.18s ease, stroke 0.18s ease; }
.world-map-region-target:hover { filter: brightness(1.07); }
.world-map-markers { position: absolute; inset: 0; pointer-events: none; }
.world-map-marker { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; border: 2px solid rgba(255,255,255,0.9); background: linear-gradient(180deg, var(--marker-accent, #ff8a5b), rgba(15,23,42,0.92)); box-shadow: 0 8px 18px rgba(0,0,0,0.35); cursor: pointer; }
.world-map-marker:hover { transform: translate(-50%, -100%) scale(1.06); }
.world-map-marker.has-image { width: 42px; height: 42px; padding: 4px; background: #111827; overflow: hidden; }
.world-map-marker img { width: 100%; height: 100%; object-fit: contain; }
.world-map-marker i { color: white; font-size: 0.78rem; }
.world-map-marker.is-breaking-news { animation: mapBreakingPulse 1.15s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(250,204,21,0.7), 0 8px 18px rgba(0,0,0,0.35); }
.world-map-hint { margin-top: 10px; color: var(--text-muted); font-size: 0.78rem; }
.map-marker-info { margin-top: 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.map-marker-info.hidden { display: none; }
.map-marker-info-title { font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: white; margin: 0 0 6px; }
.map-marker-info-meta { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 8px; }
.map-marker-info-body { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.map-marker-info-image { width: 96px; height: 96px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(255,255,255,0.04); padding: 4px; }
.map-marker-info-text { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.map-marker-info-city { display: inline-flex; margin-top: 8px; padding: 5px 10px; border-radius: 999px; background: rgba(108,99,255,0.14); color: var(--accent-soft); font-size: 0.74rem; font-weight: 700; cursor: pointer; border: 1px solid rgba(108,99,255,0.3); }
.map-marker-info-post { margin-left: 8px; background: rgba(250,204,21,0.12); color: #fde68a; border-color: rgba(250,204,21,0.3); }
.map-admin-panel { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 18px; }
.map-admin-panel.hidden { display: none; }
.map-admin-title { font-family: var(--font-display); font-size: 0.95rem; font-weight: 800; color: white; display: flex; align-items: center; gap: 8px; }
.map-admin-copy { font-size: 0.74rem; color: var(--text-muted); line-height: 1.45; }
.map-admin-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent); margin: 4px 0; }
.map-admin-actions-row { display: flex; gap: 8px; }
.map-admin-actions-row > * { flex: 1; }
.map-admin-coords-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map-admin-select { width: 100%; min-width: 0; }
.map-admin-textarea { min-height: 88px; resize: vertical; }
.map-admin-color { padding: 4px; min-height: 42px; }
.map-admin-image-row { display: flex; align-items: center; gap: 8px; }
.map-admin-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.76rem; color: var(--text-muted); }
.map-marker-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.map-marker-list-item { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.map-overlay-list-item-selected { border-color: rgba(250,204,21,0.35); box-shadow: inset 0 0 0 1px rgba(250,204,21,0.16); }
.map-marker-list-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.map-marker-list-name { font-weight: 700; color: white; font-size: 0.8rem; }
.map-marker-list-meta { font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; }
.map-marker-list-actions { display: flex; gap: 6px; margin-top: 8px; }
.map-marker-list-actions button { flex: 1; }
.world-map-danger-blink { animation: mapDangerBlink 1.1s ease-in-out infinite; }
.world-map-region-selected { stroke: #facc15 !important; stroke-width: 3 !important; filter: drop-shadow(0 0 5px rgba(250,204,21,0.6)); }
@keyframes mapDangerBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}
@keyframes mapBreakingPulse {
    0% { box-shadow: 0 0 0 0 rgba(250,204,21,0.62), 0 8px 18px rgba(0,0,0,0.35); }
    70% { box-shadow: 0 0 0 12px rgba(250,204,21,0), 0 8px 18px rgba(0,0,0,0.35); }
    100% { box-shadow: 0 0 0 0 rgba(250,204,21,0), 0 8px 18px rgba(0,0,0,0.35); }
}
@media (max-width: 1080px) {
    .world-map-layout { grid-template-columns: 1fr; }
    .map-admin-panel { position: static; }
}
@media (max-width: 720px) {
    .map-main { padding: 0 12px 28px; }
    .world-map-stage { min-height: 420px; }
    .world-map-canvas svg { min-width: 720px; }
    .map-marker-info-body { grid-template-columns: 1fr; }
    .map-filters-head { flex-direction: column; align-items: stretch; }
    .map-marker-info-post { margin-left: 0; }
    .presse-compose-grid { grid-template-columns: 1fr; }
    .presse-compose-side { position: static; }
    .presse-rich-editor { min-height: 44vh; padding: 18px 16px; }
    .presse-format-group { width: 100%; }
    .presse-theme-choices { grid-template-columns: 1fr; }
    .article-fullscreen-content { padding: 14px; }
    .article-fullscreen-content .article-body { padding: 20px 18px 18px; }
}
/* ==================== [FIN MAPS] ==================== */

/* ==================== [DIPLOMATIE] ==================== */

/* Sous-onglets */
.cites-subtabs { display: flex; gap: 4px; margin-top: 12px; }
.cites-subtab { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 16px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: transform 0.18s, color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s; display: flex; align-items: center; gap: 6px; }
.cites-subtab:hover { color: white; border-color: rgba(255,255,255,0.15); }
.cites-subtab.active { background: rgba(108,99,255,0.15); border-color: var(--accent); color: var(--accent-soft); box-shadow: 0 8px 18px rgba(108,99,255,0.14); transform: translateY(-1px); }

/* Toolbar filtres */
.diplo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 8px; flex-wrap: wrap; }
.diplo-filters { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.diplo-select { background: var(--bg-secondary); border: 1px solid var(--border); color: white; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 0.78rem; cursor: pointer; min-width: 150px; }
.diplo-select:focus { outline: none; border-color: var(--accent); }
.diplo-multiselect { min-height: 180px; padding: 8px 10px; }
.diplo-multiselect option { padding: 6px 8px; border-radius: 6px; }
.diplo-modal-help { margin-top: 8px; font-size: 0.72rem; line-height: 1.45; color: var(--text-muted); }

/* Légende */
.diplo-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; padding: 10px 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); }
.diplo-legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.68rem; color: var(--text-muted); font-weight: 600; }
.diplo-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Couleurs par statut */
.diplo-allie            .diplo-dot, .diplo-badge-allie            { background: #23a559; }
.diplo-pacte_defensif   .diplo-dot, .diplo-badge-pacte_defensif   { background: #2dd4bf; }
.diplo-axe_economique   .diplo-dot, .diplo-badge-axe_economique   { background: #14b8a6; }
.diplo-coalition_gouvernementale .diplo-dot, .diplo-badge-coalition_gouvernementale { background: #3b82f6; }
.diplo-coalition_electorale .diplo-dot, .diplo-badge-coalition_electorale { background: #2563eb; }
.diplo-soutien_strategique .diplo-dot, .diplo-badge-soutien_strategique { background: #6366f1; }
.diplo-pacte_non_agression .diplo-dot, .diplo-badge-pacte_non_agression { background: #00d4aa; }
.diplo-partenariat      .diplo-dot, .diplo-badge-partenariat      { background: #6c63ff; }
.diplo-neutre           .diplo-dot, .diplo-badge-neutre           { background: #6b7280; }
.diplo-observateur      .diplo-dot, .diplo-badge-observateur      { background: #60a5fa; }
.diplo-tension          .diplo-dot, .diplo-badge-tension          { background: #f59e0b; }
.diplo-opposition_parlementaire .diplo-dot, .diplo-badge-opposition_parlementaire { background: #eab308; }
.diplo-rivalite_electorale .diplo-dot, .diplo-badge-rivalite_electorale { background: #f97316; }
.diplo-rivalite_ideologique .diplo-dot, .diplo-badge-rivalite_ideologique { background: #ef4444; }
.diplo-sanction         .diplo-dot, .diplo-badge-sanction         { background: #fb923c; }
.diplo-guerre_commerciale .diplo-dot, .diplo-badge-guerre_commerciale { background: #dc2626; }
.diplo-blocus           .diplo-dot, .diplo-badge-blocus           { background: #f97316; }
.diplo-hostile          .diplo-dot, .diplo-badge-hostile          { background: #ef4444; }
.diplo-contentieux_territorial .diplo-dot, .diplo-badge-contentieux_territorial { background: #b91c1c; }
.diplo-conflit_froid    .diplo-dot, .diplo-badge-conflit_froid    { background: #818cf8; }
.diplo-insurrection_proxy .diplo-dot, .diplo-badge-insurrection_proxy { background: #7f1d1d; }
.diplo-guerre           .diplo-dot, .diplo-badge-guerre           { background: #da373c; }

/* Grille des relations */
.diplo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding-bottom: 40px; }

/* Carte de relation */
.diplo-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; overflow: hidden; transition: all 0.18s; position: relative; }
.diplo-card:hover { border-color: rgba(255,255,255,0.12); box-shadow: 0 4px 18px rgba(0,0,0,0.3); transform: translateY(-1px); }

/* Bannière de couleur en haut de la carte */
.diplo-card-banner { height: 4px; width: 100%; }
.diplo-banner-allie            { background: linear-gradient(90deg, #23a559, #00d4aa); }
.diplo-banner-pacte_defensif   { background: linear-gradient(90deg, #2dd4bf, #14b8a6); }
.diplo-banner-axe_economique   { background: linear-gradient(90deg, #14b8a6, #0f766e); }
.diplo-banner-coalition_gouvernementale { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.diplo-banner-coalition_electorale { background: linear-gradient(90deg, #2563eb, #1d4ed8); }
.diplo-banner-soutien_strategique { background: linear-gradient(90deg, #6366f1, #4338ca); }
.diplo-banner-pacte_non_agression { background: linear-gradient(90deg, #00d4aa, #3b82f6); }
.diplo-banner-partenariat      { background: linear-gradient(90deg, #6c63ff, #818cf8); }
.diplo-banner-neutre           { background: var(--border); }
.diplo-banner-observateur      { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.diplo-banner-tension          { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.diplo-banner-opposition_parlementaire { background: linear-gradient(90deg, #eab308, #f59e0b); }
.diplo-banner-rivalite_electorale { background: linear-gradient(90deg, #f97316, #ea580c); }
.diplo-banner-rivalite_ideologique { background: linear-gradient(90deg, #ef4444, #dc2626); }
.diplo-banner-sanction         { background: linear-gradient(90deg, #fb923c, #f59e0b); }
.diplo-banner-guerre_commerciale { background: linear-gradient(90deg, #dc2626, #991b1b); }
.diplo-banner-blocus           { background: linear-gradient(90deg, #f97316, #ef4444); }
.diplo-banner-hostile          { background: linear-gradient(90deg, #ef4444, #da373c); }
.diplo-banner-contentieux_territorial { background: linear-gradient(90deg, #b91c1c, #7f1d1d); }
.diplo-banner-conflit_froid    { background: linear-gradient(90deg, #818cf8, #6b7280); }
.diplo-banner-insurrection_proxy { background: linear-gradient(90deg, #7f1d1d, #450a0a); }
.diplo-banner-guerre           { background: linear-gradient(90deg, #da373c, #7f1d1d); }

/* Corps de la carte */
.diplo-card-body { padding: 12px 14px 14px; }
.diplo-card-cities { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.diplo-city-flag { width: 36px; height: 24px; object-fit: contain; border: 1px solid var(--border); border-radius: 3px; flex-shrink: 0; background: rgba(255,255,255,0.04); }
.diplo-city-flag-ph { width: 36px; height: 24px; background: var(--bg-tertiary); border-radius: 3px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }
.diplo-city-name { font-family: var(--font-display); font-size: 0.85rem; font-weight: 800; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diplo-vs { font-size: 0.65rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; flex-shrink: 0; padding: 0 2px; }
.diplo-cities-pair { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.diplo-cities-names { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.diplo-card-grouped-alliance .diplo-card-body { display: flex; flex-direction: column; gap: 10px; }
.diplo-alliance-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.diplo-alliance-title { font-family: var(--font-display); font-size: 0.92rem; font-weight: 800; color: white; }
.diplo-alliance-count { font-size: 0.72rem; font-weight: 700; color: var(--accent-soft); background: rgba(35,165,89,0.12); border: 1px solid rgba(35,165,89,0.28); border-radius: 999px; padding: 4px 9px; }
.diplo-alliance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.diplo-alliance-city { display: flex; align-items: center; gap: 8px; min-width: 0; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; }
.diplo-alliance-city .diplo-city-name { font-size: 0.78rem; }
.diplo-alliance-more { align-self: flex-start; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-normal); border-radius: 999px; padding: 6px 10px; font-size: 0.72rem; cursor: pointer; }
.diplo-alliance-more:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18); }
.diplo-scope-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.diplo-card-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Badge statut */
.diplo-status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 8px; color: white; }
.diplo-badge-allie            { background: rgba(35,165,89,0.18); border-color: rgba(35,165,89,0.35); color: #4ade80; }
.diplo-badge-pacte_defensif   { background: rgba(45,212,191,0.14); border-color: rgba(45,212,191,0.28); color: #5eead4; }
.diplo-badge-axe_economique   { background: rgba(20,184,166,0.14); border-color: rgba(20,184,166,0.28); color: #5eead4; }
.diplo-badge-coalition_gouvernementale { background: rgba(59,130,246,0.14); border-color: rgba(59,130,246,0.3); color: #93c5fd; }
.diplo-badge-coalition_electorale { background: rgba(37,99,235,0.16); border-color: rgba(37,99,235,0.3); color: #93c5fd; }
.diplo-badge-soutien_strategique { background: rgba(99,102,241,0.16); border-color: rgba(99,102,241,0.3); color: #c7d2fe; }
.diplo-badge-pacte_non_agression { background: rgba(0,212,170,0.14); border-color: rgba(0,212,170,0.3); color: #34d399; }
.diplo-badge-partenariat      { background: rgba(108,99,255,0.15); border-color: rgba(108,99,255,0.3); color: #a78bfa; }
.diplo-badge-neutre           { background: rgba(107,114,128,0.15); border-color: rgba(107,114,128,0.25); color: #9ca3af; }
.diplo-badge-observateur      { background: rgba(96,165,250,0.15); border-color: rgba(96,165,250,0.3); color: #60a5fa; }
.diplo-badge-tension          { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.3); color: #fbbf24; }
.diplo-badge-opposition_parlementaire { background: rgba(234,179,8,0.15); border-color: rgba(234,179,8,0.3); color: #fde047; }
.diplo-badge-rivalite_electorale { background: rgba(249,115,22,0.16); border-color: rgba(249,115,22,0.3); color: #fdba74; }
.diplo-badge-rivalite_ideologique { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.32); color: #fca5a5; }
.diplo-badge-sanction         { background: rgba(251,146,60,0.15); border-color: rgba(251,146,60,0.3); color: #fb923c; }
.diplo-badge-guerre_commerciale { background: rgba(220,38,38,0.18); border-color: rgba(220,38,38,0.34); color: #fca5a5; }
.diplo-badge-blocus           { background: rgba(249,115,22,0.18); border-color: rgba(249,115,22,0.35); color: #f97316; }
.diplo-badge-hostile          { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: #f87171; }
.diplo-badge-contentieux_territorial { background: rgba(185,28,28,0.18); border-color: rgba(185,28,28,0.34); color: #fca5a5; }
.diplo-badge-conflit_froid    { background: rgba(129,140,248,0.15); border-color: rgba(129,140,248,0.3); color: #818cf8; }
.diplo-badge-insurrection_proxy { background: rgba(127,29,29,0.22); border-color: rgba(127,29,29,0.38); color: #fca5a5; }
.diplo-badge-guerre           { background: rgba(218,55,60,0.2); border-color: rgba(218,55,60,0.4); color: #f87171; }

/* Détails carte */
.diplo-card-meta { font-size: 0.68rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.diplo-card-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.diplo-card-actions { display: flex; gap: 6px; margin-top: 10px; opacity: 0; transition: opacity 0.18s; }
.diplo-card:hover .diplo-card-actions { opacity: 1; }
.diplo-card-btn { padding: 5px 10px; border-radius: var(--radius-sm); font-size: 0.7rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--bg-tertiary); color: var(--text-muted); transition: all 0.15s; }
.diplo-card-btn:hover { color: white; border-color: rgba(255,255,255,0.2); }
.diplo-card-btn.danger:hover { background: rgba(218,55,60,0.15); border-color: rgba(218,55,60,0.4); color: #f87171; }

/* Responsive */
@media (max-width: 640px) {
    .diplo-grid { grid-template-columns: 1fr; }
    .diplo-toolbar { flex-direction: column; align-items: flex-start; }
    .diplo-filters { width: 100%; }
}
/* ==================== [FIN DIPLOMATIE] ==================== */

/* EDC valeur entière dans le panneau détail */
.city-edc-full { font-size: 0.6rem; color: var(--text-muted); font-weight: 400; font-family: var(--font-main); margin-top: 2px; letter-spacing: 0; word-break: break-all; }

/* Variation % personnalisée */
.city-custom-pct-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ==================== [CITÉS] CLASSEMENTS ==================== */
.cites-rankings-wrap { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.cites-rankings { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .cites-rankings { grid-template-columns: 1fr; } }
.cites-rankings-col { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cites-ranking-header { font-family: var(--font-display); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 10px 14px 9px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.rank-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.12s; }
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: var(--bg-hover); }
.rank-num { font-family: var(--font-display); font-size: 0.78rem; font-weight: 800; width: 22px; text-align: center; flex-shrink: 0; }
.rank-n { color: var(--text-muted); }
.rank-n1 { color: #f5c518; text-shadow: 0 0 8px rgba(245,197,24,0.5); }
.rank-n2 { color: #b0b8c1; }
.rank-n3 { color: #c87533; }
.rank-flag { width: 32px; height: 22px; object-fit: contain; border-radius: 2px; border: 1px solid var(--border); flex-shrink: 0; background: rgba(255,255,255,0.04); }
.rank-flag-ph { width: 32px; height: 22px; flex-shrink: 0; }
.rank-name { font-size: 0.82rem; font-weight: 600; color: white; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-value { font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; color: var(--accent-soft); white-space: nowrap; flex-shrink: 0; }
.rank-arrow { font-size: 0.68rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.rank-up { color: #23a559; }
.rank-down { color: #da373c; }
.rank-empty { padding: 14px 12px; font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rankRowIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: translateX(0); } }
@keyframes flashGreen { 0% { background: rgba(35,165,89,0.25); border-radius:4px; } 100% { background: transparent; } }
@keyframes flashRed { 0% { background: rgba(218,55,60,0.25); border-radius:4px; } 100% { background: transparent; } }

.rank-row { animation: rankRowIn 0.3s ease both; }
.rank-arrow.rank-up { animation: flashGreen 0.6s ease; }
.rank-arrow.rank-down { animation: flashRed 0.6s ease; }

/* ==================== CHART BAR TOOLTIP ==================== */
.chart-bar-wrap { position: relative; }
.city-edc-chart { overflow: visible !important; }
.chart-bar-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    border: 1px solid var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.chart-bar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--accent);
}
.chart-bar-wrap:hover .chart-bar-tooltip { display: block; }
.chart-bar-label { font-size: 0.48rem; color: var(--text-dim); text-align: center; margin-top: 2px; white-space: nowrap; overflow: hidden; }

/* ==================== CITY SAVE SUCCESS ==================== */
.city-save-success {
    background: rgba(35,165,89,0.15);
    border: 1px solid rgba(35,165,89,0.4);
    color: #23a559;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 10px;
    animation: fadeInUp 0.3s ease;
}

/* ==================== BOURSE ==================== */
#view-bourse { flex-direction: column; }

.bourse-ticker-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    height: 36px;
    overflow: hidden;
    flex-shrink: 0;
}
.bourse-ticker-label {
    padding: 0 14px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-right: 1px solid var(--border);
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}
.bourse-ticker-scroll-wrap { flex: 1; overflow: hidden; position: relative; }
.bourse-ticker-content {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
    padding: 0 16px;
    animation: tickerScroll 40s linear infinite;
}
.bourse-ticker-content:hover { animation-play-state: paused; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; }
.ticker-logo-wrap { position: relative; display: inline-flex; align-items: center; }
.ticker-logo { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; border: 1px solid rgba(255,255,255,0.12); flex-shrink: 0; }
.ticker-logo-popup { display: none; position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 200; background: var(--bg-primary); border: 2px solid var(--border); border-radius: 10px; padding: 5px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); pointer-events: none; }
.ticker-logo-popup img { width: 90px; height: 90px; object-fit: cover; border-radius: 7px; display: block; }
.ticker-logo-wrap:hover .ticker-logo-popup { display: block; }
.ticker-name { font-weight: 700; color: white; }
.ticker-value { color: var(--text-muted); font-size: 0.72rem; }
.ticker-change { font-weight: 700; font-size: 0.7rem; }
.ticker-sep { color: var(--text-dim); font-size: 0.9rem; opacity: 0.4; }

.bourse-container { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px 24px 40px; }
.bourse-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.bourse-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: white; margin: 0 0 4px; letter-spacing: 0.01em; }
.bourse-subtitle { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.03em; }
.bourse-search-wrap { display: flex; align-items: center; gap: 8px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px; flex: 1; max-width: 340px; transition: border-color 0.18s; }
.bourse-search-wrap:focus-within { border-color: var(--accent); }
.bourse-search-icon { color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0; }
.bourse-search-input { background: none; border: none; outline: none; color: white; font-size: 0.82rem; padding: 9px 0; flex: 1; font-family: var(--font-main); }
.bourse-search-input::placeholder { color: var(--text-dim); }
.bourse-summary-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.bourse-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -4px 0 22px; }
.bourse-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.bourse-toolbar-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bourse-layout-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.bourse-layout-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s;
}
.bourse-layout-btn:hover {
    color: white;
    background: rgba(255,255,255,0.06);
}
.bourse-layout-btn.active {
    background: rgba(108,99,255,0.18);
    color: white;
}
.bourse-sort-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 8px 6px 12px;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
}
.bourse-sort-select {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.76rem;
    font-family: var(--font-main);
    outline: none;
    min-width: 210px;
}
.bourse-sort-select option { color: #111; }
.bourse-filter-btn {
    background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-muted);
    border-radius: 999px; padding: 7px 12px; cursor: pointer; font-weight: 700; font-size: 0.76rem;
    font-family: var(--font-main); transition: all 0.18s;
}
.bourse-filter-btn:hover { color: white; border-color: rgba(255,255,255,0.14); }
.bourse-filter-btn.active { background: rgba(108,99,255,0.18); color: white; border-color: rgba(108,99,255,0.34); }
.bourse-filter-meta { color: var(--text-muted); font-size: 0.78rem; }
.bourse-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -10px 0 18px;
}
.bourse-results-count {
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}
.bourse-summary-card {
    background: radial-gradient(circle at top right, rgba(6,182,212,0.12), transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)), var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 14px 16px;
    flex: 1;
    min-width: 130px;
    min-height: 104px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.bourse-summary-card:hover { border-color: rgba(6,182,212,0.24); box-shadow: 0 18px 34px rgba(0,0,0,0.24); transform: translateY(-2px); }
.bourse-summary-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.bourse-summary-value { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: white; }
.bourse-summary-sub { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }

.bourse-stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.bourse-stocks-grid.compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bourse-market-table {
    position: relative;
}
.bourse-compact-head {
    position: sticky;
    top: 0;
    z-index: 8;
    margin-bottom: 8px;
    padding-top: 2px;
    background: linear-gradient(180deg, rgba(14,15,19,0.96) 0%, rgba(14,15,19,0.88) 100%);
    backdrop-filter: blur(10px);
}
.bourse-empty { text-align: center; padding: 50px 20px; color: var(--text-muted); grid-column: 1 / -1; }
.bourse-empty i { font-size: 2.5rem; display: block; margin-bottom: 14px; opacity: 0.5; }
.bourse-empty p { font-size: 1rem; color: var(--text-normal); margin: 0 0 6px; }
.bourse-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 4px 0 22px;
    flex-wrap: wrap;
}
.bourse-page-btn {
    min-width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}
.bourse-page-btn:hover:not(:disabled) {
    color: white;
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}
.bourse-page-btn.active {
    background: rgba(108,99,255,0.2);
    color: white;
    border-color: rgba(108,99,255,0.38);
}
.bourse-page-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.stock-card {
    background: radial-gradient(circle at top right, rgba(6,182,212,0.09), transparent 30%), linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)), var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-xl);
    padding: 16px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.18s, background 0.18s;
    position: relative;
    animation: fadeInUp 0.35s ease both;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
.stock-card:hover { border-color: rgba(6,182,212,0.24); box-shadow: 0 22px 40px rgba(0,0,0,0.28); transform: translateY(-4px); }
.stock-card.stock-up   { border-left: 3px solid #23a559; }
.stock-card.stock-down { border-left: 3px solid #da373c; }
.stock-card.stock-neutral { border-left: 3px solid var(--text-dim); }

.stock-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) 120px 120px 120px 140px auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 12px 14px;
    transition: all 0.18s;
    animation: fadeInUp 0.28s ease both;
}
.stock-row-header {
    border-radius: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    animation: none;
}
.stock-row-header:hover {
    transform: none;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    border-color: rgba(255,255,255,0.08);
}
.stock-row:hover {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
    transform: translateY(-1px);
}
.stock-row.stock-up { border-left: 3px solid #23a559; }
.stock-row.stock-down { border-left: 3px solid #da373c; }
.stock-row.stock-neutral { border-left: 3px solid var(--text-dim); }
.stock-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.stock-row-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid;
    background: var(--bg-tertiary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    overflow: hidden;
}
.stock-row-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.stock-row-ident {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.stock-row-name {
    color: white;
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stock-row-meta {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stock-row-trend,
.stock-row-value,
.stock-row-revenue,
.stock-row-badge {
    font-size: 0.78rem;
    font-weight: 700;
}
.stock-row-head {
    font-size: 0.67rem;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.stock-row-head-main {
    padding-left: 52px;
}
.stock-row-head-admin {
    text-align: right;
}
.stock-row-trend.is-up { color: #23a559; }
.stock-row-trend.is-down { color: #da373c; }
.stock-row-trend.is-flat { color: var(--text-muted); }
.stock-row-value { color: white; }
.stock-row-revenue { color: var(--text-muted); }
.stock-row-admin-wrap {
    display: flex;
    justify-content: flex-end;
    min-height: 26px;
}
.stock-row-admin-placeholder {
    display: inline-block;
    width: 1px;
    height: 1px;
}
.stock-admin-row-compact {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    justify-content: flex-end;
}
.stock-pct-input-compact {
    width: 60px;
}

.stock-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.stock-logo-wrap {
    width: 46px; height: 46px; border-radius: 10px; border: 2px solid;
    overflow: visible; display: flex; align-items: center; justify-content: center;
    background: var(--bg-tertiary); font-size: 1.1rem; color: var(--text-muted); flex-shrink: 0;
    position: relative;
}
.stock-logo { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.stock-logo-popup { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 200; background: var(--bg-primary); border: 2px solid var(--border); border-radius: 10px; padding: 5px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); pointer-events: none; }
.stock-logo-popup img { width: 100px; height: 100px; object-fit: cover; border-radius: 7px; display: block; }
.stock-logo-wrap:hover .stock-logo-popup { display: block; }
.stock-info { flex: 1; min-width: 0; }
.stock-name { font-weight: 700; font-size: 0.92rem; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.01em; }
.stock-char { font-size: 0.72rem; margin-top: 3px; display: flex; align-items: center; gap: 4px; line-height: 1.4; }
.stock-char i { font-size: 0.6rem; opacity: 0.7; }
.stock-badge { font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.badge-up      { background: rgba(35,165,89,0.2); color: #23a559; }
.badge-down    { background: rgba(218,55,60,0.2); color: #da373c; }
.badge-neutral { background: var(--bg-hover); color: var(--text-muted); }

.stock-value-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.stock-current-value { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: white; letter-spacing: 0.02em; }
.stock-prev-value { font-size: 0.72rem; color: var(--text-muted); }
.stock-chart-container { margin-bottom: 8px; }
.stock-svg-chart { width: 100%; height: 52px; display: block; }
.stock-chart-dot { cursor: pointer; transition: r 0.15s; }
.stock-chart-dot:hover { r: 5; }
.stock-desc { font-size: 0.72rem; color: var(--text-muted); padding: 4px 0 6px; font-style: italic; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.stock-hq { font-size: 0.65rem; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; opacity: 0.75; }
.stock-hq i { font-size: 0.6rem; }
.stock-highlow-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.65rem; margin: 4px 0 6px; padding: 4px 6px; background: var(--bg-tertiary); border-radius: var(--radius-sm); }
.stock-low7 { color: #e06070; font-weight: 700; display: flex; align-items: center; gap: 3px; }
.stock-high7 { color: #4fb875; font-weight: 700; display: flex; align-items: center; gap: 3px; }
.stock-hl-label { color: var(--text-dim); font-size: 0.6rem; }
.stock-trend-badge { font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; width: fit-content; margin-bottom: 8px; }

.stock-admin-row { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; justify-content: flex-start; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.stock-trend-btn {
    background: var(--bg-primary); border: 1px solid var(--border); color: white;
    width: 26px; height: 26px; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 0.72rem; transition: all 0.18s; display: flex; align-items: center; justify-content: center;
}
.stock-trend-btn:hover { transform: scale(1.12); }
.stock-trend-up2   { background: rgba(35,165,89,0.25); color: #23a559; border-color: rgba(35,165,89,0.3); }
.stock-trend-up1   { background: rgba(35,165,89,0.12); color: #4fb875; border-color: rgba(35,165,89,0.2); }
.stock-trend-stable { background: var(--bg-hover); color: var(--text-muted); }
.stock-trend-down1 { background: rgba(218,55,60,0.12); color: #e06070; border-color: rgba(218,55,60,0.2); }
.stock-trend-down2 { background: rgba(218,55,60,0.25); color: #da373c; border-color: rgba(218,55,60,0.3); }
.stock-admin-edit {
    background: rgba(108,99,255,0.2); border: 1px solid rgba(108,99,255,0.3);
    color: var(--accent); width: 26px; height: 26px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 0.72rem; display: flex; align-items: center; justify-content: center;
    transition: all 0.18s;
}
.stock-admin-edit:hover { background: rgba(108,99,255,0.4); }
.stock-admin-reset {
    background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.3); color: #f59e0b;
}
.stock-admin-del {
    background: rgba(218,55,60,0.15); border: 1px solid rgba(218,55,60,0.3);
    color: var(--danger, #da373c); width: 26px; height: 26px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 0.72rem; display: flex; align-items: center; justify-content: center;
    transition: all 0.18s;
}
.stock-admin-del:hover { background: rgba(218,55,60,0.3); }

.bourse-admin-controls {
    background: var(--bg-secondary);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .bourse-stocks-grid { grid-template-columns: 1fr; }
    .bourse-summary-row { grid-template-columns: 1fr 1fr; gap: 10px; }
    .bourse-summary-card { min-width: 100px; min-height: 0; padding: 10px 12px; }
    .bourse-container { padding: 14px 12px 30px; }
    .bourse-toolbar-side { width: 100%; justify-content: space-between; }
    .bourse-sort-wrap { width: 100%; justify-content: space-between; border-radius: var(--radius); }
    .bourse-sort-select { min-width: 0; width: 100%; }
    .bourse-layout-toggle { width: 100%; justify-content: center; border-radius: var(--radius); }
    .bourse-compact-head {
        position: static;
        margin-bottom: 0;
        background: transparent;
        backdrop-filter: none;
    }
    .stock-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
    .stock-row-header {
        display: none;
    }
    .stock-row-trend,
    .stock-row-value,
    .stock-row-revenue,
    .stock-row-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .stock-row-admin-wrap { width: 100%; justify-content: flex-start; }
    .stock-admin-row-compact { justify-content: flex-start; }
}

/* ====== BOURSE — GRAPHIQUE COMPARATIF ====== */
.bourse-comp-chart-wrap {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px 10px;
    margin-bottom: 22px;
}
.bourse-comp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bourse-section-title { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.bourse-comp-svg { width: 100%; height: auto; display: block; }
.bourse-comp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.bourse-comp-legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; color: var(--text-muted); }
.bourse-comp-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ====== PUB BOOST UI ====== */
#feed-pub-stock-wrap, #presse-pub-stock-wrap { padding: 6px 0 2px; }

/* ====== MES PERSONNAGES VIEW ====== */
#view-mes-persos { flex-direction: column; overflow-y: auto; }
.mes-persos-container { flex: 1; min-height: 0; padding: 4px 0 40px; }
.mp-admin-panel { margin: 0 0 16px; background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(20,21,26,0.95)); border: 1px solid rgba(245,158,11,0.32); border-radius: var(--radius-xl); padding: 14px 16px; }
.mp-admin-header { font-family: var(--font-display); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #f9be48; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mp-admin-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.mp-admin-stats span { font-size: 0.72rem; color: #f0d8a3; background: rgba(0,0,0,0.24); border: 1px solid rgba(245,158,11,0.25); border-radius: 999px; padding: 5px 10px; display: inline-flex; align-items: center; gap: 6px; }
.mp-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-admin-actions .btn-secondary { font-size: 0.74rem; padding: 7px 10px; border-color: rgba(245,158,11,0.3); }
.mes-persos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.mp-char-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.mp-char-card:hover { border-color: rgba(255,255,255,0.15); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.mp-char-header {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 16px 12px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}
.mp-char-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid; flex-shrink: 0; }
.mp-char-info { flex: 1; min-width: 0; }
.mp-char-name { font-weight: 800; font-size: 0.95rem; color: white; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-char-role { font-size: 0.72rem; color: var(--text-muted); }
.mp-char-party { font-size: 0.68rem; color: var(--text-dim); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.mp-char-party img { width: 14px; height: 14px; border-radius: 3px; object-fit: contain; }
.mp-char-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
.btn-mini-action {
    background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-muted);
    width: 28px; height: 28px; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 0.72rem; display: flex; align-items: center; justify-content: center;
    transition: all 0.18s;
}
.btn-mini-action:hover { background: var(--bg-hover); color: white; }
.mp-char-stats { display: flex; padding: 10px 16px; gap: 4px; border-bottom: 1px solid var(--border); }
.mp-stat { flex: 1; text-align: center; }
.mp-stat span:first-child { display: block; font-weight: 800; font-size: 0.9rem; color: white; }
.mp-stat span:last-child { display: block; font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.mp-char-desc { font-size: 0.75rem; color: var(--text-muted); padding: 4px 0 0; font-style: italic; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mp-char-companies { padding: 10px 16px 12px; }
.mp-section-title { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.mp-companies-list { display: flex; flex-direction: column; gap: 6px; }
.mp-company-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--bg-tertiary); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.mp-company-logo { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.1); }
.mp-company-name { font-weight: 700; font-size: 0.78rem; color: white; }
.mp-company-role { font-size: 0.65rem; color: var(--text-muted); }
.mp-company-hq { font-size: 0.62rem; color: var(--text-dim); display: flex; align-items: center; gap: 3px; }
.mp-company-revenue { font-size: 0.62rem; color: #f59e0b; display: flex; align-items: center; gap: 3px; }
.mp-companies-more { font-size: 0.7rem; color: var(--accent-soft); padding: 4px 8px 2px; font-style: italic; }
.mp-char-footer { padding: 10px 16px 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.mp-btn-profile { font-size: 0.75rem; padding: 5px 12px; }
.mp-empty { text-align: center; color: var(--text-muted); padding: 40px 20px; font-size: 0.85rem; grid-column: 1/-1; }

@media (max-width: 768px) {
    .mes-persos-grid { grid-template-columns: 1fr; }
}

/* ====== BIO VOIR PLUS ====== */
.bio-voir-plus-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.78rem; font-weight: 600; padding: 0; margin-top: 4px; display: block; transition: color 0.15s; font-family: var(--font-main); }
.bio-voir-plus-btn:hover { color: var(--accent-soft); }

/* ====== ACCUEIL HOME PAGE ====== */
.accueil-container { flex: 1; overflow-y: auto; padding: 0 0 40px; }
.accueil-hero { text-align: center; padding: 32px 20px 22px; margin-bottom: 0; background: linear-gradient(180deg, rgba(108,99,255,0.1) 0%, transparent 100%); border-bottom: 1px solid var(--border); }
.accueil-title { font-family: var(--font-display); font-size: 2rem; font-weight: 900; margin: 0 0 8px; background: linear-gradient(135deg, white 0%, var(--accent-soft) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.accueil-subtitle { color: var(--text-muted); font-size: 0.88rem; margin: 0; }
.accueil-nav-cards { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 24px 4px; justify-content: center; }
.accueil-quick-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 24px 0; justify-content: center; }
.accueil-quick-action { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); color: white; cursor: pointer; font-size: 0.78rem; font-weight: 700; }
.accueil-quick-action i { color: var(--accent-soft); }
.accueil-quick-action.accent { background: rgba(108,99,255,0.2); border-color: rgba(108,99,255,0.35); }
.accueil-nav-card { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 20px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.22s; min-width: 84px; }
.accueil-nav-card:hover { background: rgba(108,99,255,0.1); border-color: rgba(108,99,255,0.45); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.accueil-nav-card i { font-size: 1.3rem; color: var(--accent); transition: transform 0.18s; }
.accueil-nav-card:hover i { transform: scale(1.2); }
.accueil-nav-card span { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.accueil-headline-wrap { margin: 12px 24px 0; border: 1px solid rgba(192,151,59,0.35); border-radius: var(--radius-xl); overflow: hidden; background: linear-gradient(135deg, rgba(192,151,59,0.12) 0%, rgba(28,29,36,0.85) 70%); box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.accueil-headline-title { font-size: 0.72rem; font-weight: 800; color: #d4b261; text-transform: uppercase; letter-spacing: 0.11em; padding: 10px 14px 8px; border-bottom: 1px solid rgba(192,151,59,0.28); display: flex; align-items: center; gap: 8px; }
.accueil-headline-preview { padding: 14px; cursor: pointer; transition: background 0.16s; }
.accueil-headline-preview:hover { background: rgba(255,255,255,0.03); }
.accueil-headline-empty { font-size: 0.82rem; color: var(--text-muted); text-align: center; padding: 10px 0; }
.accueil-headline-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; color: #2a1f0e; background: #d4b261; border-radius: 999px; padding: 3px 9px; margin-bottom: 8px; }
.accueil-headline-item-title { margin: 0 0 8px; font-family: 'Playfair Display', Georgia, serif; font-size: 1.22rem; line-height: 1.2; color: #f8ecd3; font-weight: 800; }
.accueil-headline-item-excerpt { margin: 0; color: #d7d3c7; font-size: 0.9rem; line-height: 1.55; }
.accueil-headline-item-meta { margin-top: 10px; display: flex; gap: 10px; align-items: center; color: var(--text-muted); font-size: 0.7rem; }
.accueil-headline-item-author { color: #e9d7a3; font-weight: 700; }
.accueil-timeline-wrap {
    margin: 16px 24px 0;
    border: 1px solid rgba(108,99,255,0.2);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(108,99,255,0.08), rgba(16,18,24,0.94));
    overflow: hidden;
}
.accueil-timeline-title {
    width: 100%;
    font-size: 0.72rem;
    font-weight: 800;
    color: #cfd2ff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(108,99,255,0.16);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.accueil-timeline-title-main { display: inline-flex; align-items: center; gap: 8px; }
.accueil-timeline-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    text-align: left;
}
.accueil-timeline-toggle:hover { background: rgba(255,255,255,0.025); }
.accueil-timeline-chevron {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.accueil-world-timeline { display: grid; gap: 0; }
.accueil-timeline-wrap.collapsed .accueil-world-timeline { display: none; }
.accueil-timeline-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.accueil-timeline-item:last-child { border-bottom: none; }
.timeline-clickable { cursor: pointer; transition: background 0.18s; }
.timeline-clickable:hover { background: rgba(255,255,255,0.03); }
.accueil-timeline-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    color: var(--accent-soft);
    flex-shrink: 0;
}
.accueil-timeline-alert .accueil-timeline-icon { color: #f59e0b; background: rgba(245,158,11,0.12); }
.accueil-timeline-market .accueil-timeline-icon,
.accueil-timeline-up .accueil-timeline-icon { color: #23a559; background: rgba(35,165,89,0.12); }
.accueil-timeline-down .accueil-timeline-icon,
.accueil-timeline-leak .accueil-timeline-icon { color: #da373c; background: rgba(218,55,60,0.12); }
.accueil-timeline-body { min-width: 0; flex: 1; }
.accueil-timeline-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.accueil-timeline-name { color: white; font-size: 0.84rem; font-weight: 700; }
.accueil-timeline-time { color: var(--text-muted); font-size: 0.7rem; white-space: nowrap; }
.accueil-timeline-text { margin-top: 4px; color: var(--text-muted); font-size: 0.78rem; line-height: 1.5; }
.accueil-content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; padding: 20px 24px 0; }
.accueil-content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; padding: 20px 24px 0; }
.accueil-widget { background: radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)), var(--bg-secondary); border: 1px solid rgba(255,255,255,0.06); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; min-height: 258px; box-shadow: 0 12px 30px rgba(0,0,0,0.18); transition: transform 0.2s, box-shadow 0.2s, border-color 0.18s; }
.accueil-widget:hover { transform: translateY(-3px); box-shadow: 0 22px 40px rgba(0,0,0,0.25); border-color: rgba(255,255,255,0.12); }
.accueil-widget-title { font-size: 0.68rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; padding: 13px 14px 11px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.06); background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); }
.accueil-widget-title i { color: var(--accent); }
.accueil-widget-body { flex: 1; overflow-y: auto; max-height: 280px; padding: 6px; }
.accueil-widget-empty { padding: 20px; text-align: center; color: var(--text-dim); font-size: 0.8rem; }
.accueil-widget-footer { padding: 10px 14px; border-top: 1px solid rgba(255,255,255,0.06); background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01)); }
.accueil-more-btn { background: none; border: none; color: var(--accent-soft); cursor: pointer; font-size: 0.74rem; font-weight: 700; padding: 0; transition: color 0.15s, transform 0.15s; font-family: var(--font-main); }
.accueil-more-btn:hover { color: var(--accent); transform: translateX(2px); }
.accueil-widget:nth-child(1) .accueil-widget-title i,
.accueil-widget:nth-child(5) .accueil-widget-title i { color: var(--module-reseau); }
.accueil-widget:nth-child(2) .accueil-widget-title i { color: #f59e0b; }
.accueil-widget:nth-child(3) .accueil-widget-title i { color: var(--module-bourse); }
.accueil-widget:nth-child(4) .accueil-widget-title i { color: var(--module-cites); }
.accueil-widget:nth-child(6) .accueil-widget-title i { color: #f7bf5d; }
.accueil-post-item { display: flex; align-items: flex-start; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.14s; }
.accueil-post-item:last-child { border-bottom: none; }
.accueil-post-item:hover { background: var(--bg-hover); }
.accueil-post-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.accueil-post-meta { flex: 1; min-width: 0; }
.accueil-post-author { font-weight: 700; font-size: 0.76rem; display: block; }
.accueil-post-content { font-size: 0.73rem; color: var(--text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accueil-post-date { font-size: 0.62rem; color: var(--text-dim); white-space: nowrap; flex-shrink: 0; margin-left: 4px; }
.accueil-event-item { padding: 9px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.14s; }
.accueil-event-item:last-child { border-bottom: none; }
.accueil-event-item:hover { background: var(--bg-hover); }
.accueil-event-date { font-size: 0.62rem; color: var(--accent-soft); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.accueil-event-main { display: flex; gap: 8px; align-items: baseline; }
.accueil-event-time { font-weight: 800; font-size: 0.78rem; color: white; flex-shrink: 0; min-width: 40px; }
.accueil-event-text { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accueil-stock-item { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.14s; }
.accueil-stock-item:last-child { border-bottom: none; }
.accueil-stock-item:hover { background: var(--bg-hover); }
.accueil-stock-logo { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.accueil-stock-icon { width: 28px; height: 28px; border-radius: 6px; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; color: var(--text-dim); flex-shrink: 0; font-size: 0.8rem; }
.accueil-stock-info { flex: 1; min-width: 0; }
.accueil-stock-name { font-weight: 700; font-size: 0.78rem; color: white; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accueil-stock-char { font-size: 0.65rem; color: var(--text-muted); }
.accueil-stock-val-wrap { text-align: right; flex-shrink: 0; }
.accueil-stock-val { display: block; font-weight: 800; font-size: 0.78rem; color: white; }
.accueil-stock-pct { font-size: 0.65rem; font-weight: 700; }
.accueil-char-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.14s; }
.accueil-char-item:last-child { border-bottom: none; }
.accueil-char-item:hover { background: var(--bg-hover); }
.accueil-char-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid; flex-shrink: 0; }
.accueil-char-info { flex: 1; min-width: 0; }
.accueil-char-name { display: block; font-weight: 700; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accueil-char-role { display: block; font-size: 0.65rem; color: var(--text-muted); }
.accueil-char-capital { font-size: 0.7rem; font-weight: 700; color: var(--accent-soft); flex-shrink: 0; }

/* ====== BOUTON PROFIL NAV (haut gauche) ====== */
#btn-nav-account {
    position: absolute;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 13px 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s;
    z-index: 2;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
#btn-nav-account i { font-size: 1rem; flex-shrink: 0; }
#btn-nav-account #nav-account-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#btn-nav-account:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.14); color: white; }
#btn-nav-account.logged-in { border-color: rgba(108,99,255,0.35); color: var(--accent-soft); background: rgba(108,99,255,0.08); }
#btn-nav-account.logged-in i { color: var(--accent); }
#btn-nav-account.logged-in:hover { background: rgba(108,99,255,0.16); color: white; border-color: rgba(108,99,255,0.5); }

/* ====== POST DETAIL MODAL (refonte) ====== */
.post-detail-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 92%;
    max-width: 640px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0,0,0,0.65), 0 0 0 1px var(--border);
    animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.city-detail-panel.open { animation: panelSlideInRight 0.34s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes panelSlideInRight {
    from { opacity: 0.8; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}
.post-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
    flex-shrink: 0;
}
.post-detail-header h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.01em;
}
.post-detail-close {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.post-detail-close:hover { background: var(--danger-muted); border-color: rgba(255,71,87,0.3); color: var(--danger); }
.article-fullscreen-modal { z-index: 520; padding: 0; align-items: stretch; justify-content: stretch; }
.article-fullscreen-shell { width: 100vw; height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(7,10,17,0.98), rgba(12,16,25,0.96)); }
.article-fullscreen-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(10,14,22,0.92); backdrop-filter: blur(14px); }
.article-fullscreen-kicker { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
.article-fullscreen-header h3 { margin: 4px 0 0; color: white; font-size: 1.2rem; }
.article-fullscreen-content { flex: 1; overflow-y: auto; padding: 26px; }
.article-fullscreen-content .article-card { max-width: 1120px; margin: 0 auto; transform: none !important; box-shadow: 0 24px 60px rgba(0,0,0,0.28); cursor: default; }
.article-fullscreen-content .article-card:hover { transform: none !important; }
.article-fullscreen-content .article-body { padding: 34px 38px 28px; }
#live-news-standalone-modal { z-index: 520; }
.live-news-standalone-box { width: min(520px, calc(100vw - 24px)); padding: 0; overflow: hidden; background: linear-gradient(180deg, rgba(28,17,17,0.98), rgba(17,11,11,0.98)); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 24px 48px rgba(0,0,0,0.35); }
.live-news-standalone-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.live-news-standalone-kicker { color: #ffb4b4; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; }
.live-news-standalone-head h3 { margin: 6px 0 0; color: white; font-family: var(--font-display); font-size: 1.24rem; }
.live-news-standalone-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 0; color: var(--text-muted); font-size: 0.74rem; }
.live-news-standalone-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
.live-news-standalone-body { padding: 16px 20px 22px; color: #fff3f3; font-family: var(--font-display); font-size: 1.04rem; line-height: 1.7; }
.live-news-standalone-actions { display: flex; justify-content: flex-end; padding: 0 20px 20px; }
.post-detail-scroll { overflow-y: auto; flex: 1; padding: 20px 22px; }
.post-detail-scroll .post-card { border: none !important; padding: 0 !important; background: transparent !important; transform: none !important; box-shadow: none !important; margin-bottom: 4px; }
.post-detail-scroll .post-card:hover { background: transparent !important; }
.post-detail-comments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 16px 0 10px;
    border-top: 2px solid var(--border);
    margin-top: 6px;
}
.post-detail-comments-header i { color: var(--accent); font-size: 0.85rem; }
.post-detail-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-tertiary);
    flex-shrink: 0;
}
.post-detail-footer .comment-form { display: flex; gap: 6px; align-items: center; }
.comment-input-field {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: white;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.88rem;
    transition: border-color 0.2s;
}
.comment-input-field:focus { outline: none; border-color: var(--accent); }
.comment-input-field::placeholder { color: var(--text-muted); }

/* ====== COMMENTAIRES (refonte) ====== */
.comment-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.comment-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border); cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.comment-avatar:hover { transform: scale(1.08); border-color: var(--accent); }
.comment-bubble { flex: 1; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 9px 12px; }
.comment-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.comment-author { font-weight: 700; font-size: 0.82rem; color: var(--accent-soft); }
.comment-time { font-size: 0.68rem; color: var(--text-dim); }
.comment-text { font-size: 0.85rem; color: var(--text-normal); line-height: 1.5; word-break: break-word; }
.comment-del-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 2px 5px; border-radius: 4px; margin-left: auto; font-size: 0.72rem; transition: color 0.15s; }
.comment-del-btn:hover { color: var(--danger); }
.comment-media { max-width: 220px; border-radius: 8px; margin-top: 7px; display: block; }
.comment-empty { text-align: center; padding: 28px 16px; color: var(--text-dim); font-size: 0.85rem; }
.comment-empty i { font-size: 2rem; display: block; margin-bottom: 8px; opacity: 0.3; color: var(--accent); }
.comment-empty p { margin: 0; }

/* améliorations post-card: ligne décorative hover */
.post-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(108,99,255,0.0)); transition: background 0.3s; border-radius: var(--radius-xl) var(--radius-xl) 0 0; pointer-events: none; }
.post-card:hover::before { background: linear-gradient(90deg, transparent, rgba(108,99,255,0.35), transparent); }

@media (max-width: 768px) {
    .accueil-content-grid { grid-template-columns: 1fr; padding: 14px 12px 0; }
    .accueil-quick-actions { padding: 14px 12px 0; justify-content: stretch; }
    .accueil-quick-action { width: calc(50% - 5px); justify-content: center; }
    .accueil-nav-cards { padding: 14px 12px 4px; gap: 8px; }
    .accueil-nav-card { min-width: 70px; padding: 10px 12px; }
}
@media (max-width: 640px) {
    .accueil-headline-wrap,
    .accueil-timeline-wrap { margin-left: 12px; margin-right: 12px; }
    .accueil-quick-action { width: 100%; }
    .bourse-summary-row { grid-template-columns: 1fr; }
}
/* ==================== NAVIGATION MOBILE ==================== */
.nav-bar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: auto;
    gap: 12px;
}
.nav-hamburger-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-normal);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.nav-hamburger-btn:hover { background: var(--bg-hover); }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; min-width: 0; }
@media (max-width: 768px) {
    #top-nav {
        height: var(--nav-height);
        padding: 0 12px;
        justify-content: space-between;
        align-items: center;
        overflow: visible;
        gap: 12px;
        position: sticky;
        top: 0;
    }
    .nav-bar-row { width: 100%; padding: 0; }
    #btn-nav-account {
        position: static;
        left: auto;
        z-index: auto;
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 56px);
    }
    .nav-hamburger-btn { display: flex; align-items: center; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 8px);
        left: 10px;
        right: 10px;
        width: auto;
        padding: 8px;
        gap: 4px;
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 18px;
        background: rgba(14,15,19,0.98);
        box-shadow: 0 18px 44px rgba(0,0,0,0.38);
        backdrop-filter: blur(18px);
        z-index: 430;
        max-height: calc(100dvh - 88px);
        overflow-y: auto;
    }
    #top-nav.nav-open .nav-links { display: flex; }
    .nav-links .nav-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 14px;
        border-radius: 12px;
    }
    .nav-links .nav-btn .nav-label { display: inline !important; }
}
@media (max-width: 420px) {
  #top-nav:not(.nav-open) .nav-links .nav-btn .nav-label { display: none; }
  #top-nav.nav-open .nav-links .nav-btn .nav-label { display: inline !important; }
}

/* ==================== PARTIS POLITIQUES ==================== */
.partis-container { padding: 20px; max-width: 1200px; margin: 0 auto; flex: 1; overflow-y: auto; }
.partis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.parti-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 3px solid var(--parti-color, var(--accent));
}
.parti-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.parti-admin-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 2;
}
.parti-action-btn {
    background: rgba(0,0,0,0.5);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    transition: all 0.2s;
}
.parti-action-btn:hover { background: var(--bg-hover); color: white; }
.parti-action-btn.danger:hover { background: var(--danger-muted); color: var(--danger); }
.parti-card-top {
    padding: 20px 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(var(--parti-color-rgb, 108,99,255), 0.07) 0%, transparent 100%);
}
.parti-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    background: var(--bg-primary);
    padding: 4px;
}
.parti-logo-placeholder {
    width: 80px;
    height: 80px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--parti-color, var(--accent));
    margin-bottom: 12px;
}
.parti-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-display);
    margin-bottom: 4px;
}
.parti-slogan {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 6px;
}
.parti-ideologie-tag {
    background: rgba(108,99,255,0.12);
    color: var(--accent-soft);
    border: 1px solid rgba(108,99,255,0.25);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 600;
}
.parti-details {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.parti-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}
.parti-detail-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.parti-desc {
    padding: 10px 16px 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    border-top: 1px solid var(--border);
}
@media (max-width: 600px) {
    .partis-grid { grid-template-columns: 1fr; }
}

/* ==================== WIKI ==================== */
.wiki-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.wiki-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 10px 6px;
    min-height: 0;
}
.wiki-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
}
.wiki-category-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}
.wiki-category-btn:hover { background: var(--bg-hover); color: white; }
.wiki-category-btn.active { background: var(--accent-muted); color: var(--accent-soft); }
.wiki-cat-count {
    margin-left: auto;
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.wiki-category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-display);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.wiki-pages-list { display: flex; flex-direction: column; gap: 6px; }
.wiki-page-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.wiki-page-item:hover { background: var(--bg-hover); border-color: rgba(108,99,255,0.3); }
.wiki-page-item-left { display: flex; align-items: center; gap: 10px; color: var(--text-normal); }
.wiki-page-title-text { font-size: 0.92rem; font-weight: 600; }
.wiki-page-item-actions { display: flex; gap: 4px; }
.wiki-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    transition: all 0.2s;
}
.wiki-action-btn:hover { background: var(--bg-hover); color: white; }
.wiki-action-btn.danger:hover { background: var(--danger-muted); color: var(--danger); }

/* Wiki page modal */
.wiki-page-modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 90%;
    max-width: 720px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 28px 32px;
    position: relative;
}
.wiki-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}
.wiki-page-cat-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-soft);
    background: var(--accent-muted);
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 8px;
}
.wiki-page-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    font-family: var(--font-display);
    margin: 0;
    line-height: 1.3;
}
.wiki-page-modal-content {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-normal);
    white-space: pre-wrap;
}
@media (max-width: 600px) {
    .wiki-layout { flex-direction: column; height: auto; }
    .wiki-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 130px; }
    .wiki-page-modal-box { padding: 18px 16px; }
}

/* MENTION @ */
.mention { color: var(--accent-soft); font-weight: 700; background: rgba(108,99,255,0.15); border-radius: 4px; padding: 0 3px; cursor: default; }

/* TOAST ==================== */
.stock-chart-tooltip {
    position: fixed; display: none;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    color: white; padding: 4px 10px; border-radius: 6px;
    font-size: 0.78rem; white-space: nowrap; z-index: 9998;
    pointer-events: none; box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.cosmos-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.cosmos-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== [WIKI] ==================== */
.wiki-container { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }

.wiki-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 28px;
}
.wiki-title { font-size: 1.5rem; font-weight: 700; color: white; margin: 0; }
.wiki-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.wiki-category-section { margin-bottom: 32px; }
.wiki-category-title {
    font-size: 1rem; font-weight: 700; color: var(--accent);
    margin-bottom: 14px; padding-bottom: 6px;
    border-bottom: 2px solid rgba(108,99,255,0.25);
}

.wiki-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.wiki-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    position: relative;
}
.wiki-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }

.wiki-card-cover {
    width: 100%; height: 130px; object-fit: cover; display: block;
}
.wiki-card-cover-placeholder {
    width: 100%; height: 130px;
    background: linear-gradient(135deg, var(--bg-tertiary), rgba(108,99,255,0.15));
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--accent); opacity: 0.5;
}

.wiki-card-body { padding: 10px 12px; }
.wiki-card-title { font-size: 0.9rem; font-weight: 700; color: white; margin-bottom: 4px; }
.wiki-card-meta { font-size: 0.72rem; color: var(--text-muted); }

.wiki-card-admin {
    position: absolute; top: 6px; right: 6px;
    display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s;
}
.wiki-card:hover .wiki-card-admin { opacity: 1; }
.wiki-card-admin button {
    background: rgba(0,0,0,0.65); border: none; color: #ccc;
    width: 26px; height: 26px; border-radius: 50%;
    cursor: pointer; font-size: 0.72rem; display: flex; align-items: center; justify-content: center;
}
.wiki-card-admin button:hover { background: rgba(0,0,0,0.85); color: white; }

/* Page complète */
.wiki-full-cover {
    width: 100%; max-height: 300px; object-fit: cover;
    border-radius: var(--radius-md); margin-bottom: 20px; display: block;
}
.wiki-page-header { margin-bottom: 20px; }
.wiki-page-cat {
    display: inline-block; font-size: 0.75rem; font-weight: 600;
    background: rgba(108,99,255,0.18); color: var(--accent);
    padding: 3px 10px; border-radius: 20px; margin-bottom: 8px;
}
.wiki-page-title { font-size: 1.7rem; font-weight: 800; color: white; margin: 0 0 6px; }
.wiki-page-meta { font-size: 0.78rem; color: var(--text-muted); }
.wiki-page-body {
    color: var(--text-primary); line-height: 1.75; font-size: 0.92rem;
}
.wiki-page-body h1, .wiki-page-body h2, .wiki-page-body h3 {
    color: white; margin: 1.2em 0 0.5em; font-weight: 700;
}
.wiki-page-body h1 { font-size: 1.4rem; }
.wiki-page-body h2 { font-size: 1.15rem; }
.wiki-page-body h3 { font-size: 1rem; }
.wiki-page-body strong { color: white; }

.wiki-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 60px 20px;
    color: var(--text-muted); font-size: 0.9rem; gap: 10px;
}
.wiki-empty i { font-size: 2rem; opacity: 0.4; }
/* ==================== [FIN WIKI] ==================== */

/* ==================== [BOURSE - DÉTAIL ACTION] ==================== */
.stock-detail-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 16px 24px 0; overflow: hidden; }
.stock-detail-logo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.stock-detail-logo-placeholder { width: 60px; height: 60px; border-radius: 50%; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--text-muted); flex-shrink: 0; }
.stock-detail-info { min-width: 0; flex: 1; overflow: hidden; }
.stock-detail-name { font-size: 1.1rem; font-weight: 700; color: white; word-break: break-word; }
.stock-detail-char { font-size: 0.82rem; margin-top: 3px; }
.stock-detail-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.stock-detail-value-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 0 24px; }
.stock-detail-value { font-size: 1.55rem; font-weight: 800; }
.stock-detail-stat { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 10px; padding: 0 24px; display: flex; align-items: center; gap: 6px; }
.stock-detail-stat strong { color: white; }
.stock-detail-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; padding: 0 24px; }
.stock-detail-chart-wrap { width: 100%; height: 80px; padding: 0 8px; box-sizing: border-box; }
.stock-detail-chart-wrap .stock-svg-chart { width: 100%; height: 100%; }
#stock-detail-admin { padding: 0 24px 24px; }
.stock-detail-links { margin-top: 10px; }
.stock-detail-links .btn-secondary { padding: 6px 10px; font-size: 0.74rem; }
.stock-detail-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 0 24px;
    margin-bottom: 14px;
}
.stock-detail-stat-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stock-detail-stat-label { font-size: 0.64rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.stock-detail-stat-card strong { color: white; font-size: 0.92rem; }
.stock-detail-sections {
    display: grid;
    gap: 14px;
    padding: 12px 24px 0;
}
.stock-detail-section {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.stock-detail-section-title { font-size: 0.74rem; font-weight: 800; color: white; display: flex; align-items: center; gap: 7px; text-transform: uppercase; letter-spacing: 0.06em; }
.stock-detail-related-item {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 10px 12px;
    color: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: var(--font-main);
    transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.stock-detail-related-item span { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.stock-detail-related-item strong { color: white; font-size: 0.8rem; line-height: 1.45; }
.stock-detail-related-item:hover { border-color: rgba(108,99,255,0.28); background: rgba(255,255,255,0.05); transform: translateY(-1px); }
.stock-detail-empty { font-size: 0.78rem; color: var(--text-muted); }

/* Inline custom % input in stock admin row */
.stock-pct-input {
    width: 38px; height: 26px; padding: 0 4px;
    background: var(--bg-primary); border: 1px solid var(--border);
    color: white; font-size: 0.72rem; border-radius: var(--radius-sm);
    text-align: center; -moz-appearance: textfield;
}
.stock-pct-input::-webkit-outer-spin-button,
.stock-pct-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stock-pct-input:focus { outline: none; border-color: var(--accent); }

/* ==================== [RÉSEAU] ==================== */
#view-reseau {
    overflow: hidden;
    position: relative;
    --reseau-rail-width: 224px;
    --reseau-mobile-bottom-clearance: 0px;
    padding-left: 0;
}
.reseau-rail-handle {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 34px;
    height: 46px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(20,21,26,0.94);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 72;
    box-shadow: 0 12px 30px rgba(0,0,0,0.24);
    transform: translateY(-50%);
    transition: opacity 0.24s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, box-shadow 0.24s ease;
}
.reseau-rail-handle:hover {
    background: var(--bg-tertiary);
    transform: translateY(-50%) translateX(2px);
}
#view-reseau.reseau-rail-expanded .reseau-rail-handle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-10px);
}
.reseau-tabbar {
    position: absolute;
    top: 50%;
    left: 12px;
    bottom: auto;
    width: var(--reseau-rail-width);
    max-height: min(78vh, 320px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: rgba(20,21,26,0.94);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.28);
    backdrop-filter: blur(14px);
    flex-shrink: 0;
    z-index: 70;
    overflow-y: auto;
    transform: translateY(-50%) translateX(calc(-100% - 28px)) scale(0.985);
    transform-origin: left center;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease;
}
#view-reseau.reseau-rail-expanded .reseau-tabbar {
    transform: translateY(-50%) translateX(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.reseau-panel {
    display: flex;
    flex: 1;
    min-height: 0;
    height: 100%;
}
.reseau-tab {
    display: flex; align-items: center; justify-content: flex-start;
    width: 100%; min-height: 46px;
    background: transparent; border: 1px solid transparent;
    color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
    padding: 10px 12px; border-radius: 14px; cursor: pointer;
    transition: all 0.18s; position: relative; font-family: var(--font-main);
    text-align: left;
}
.reseau-tab-label { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reseau-tab:hover { background: var(--bg-tertiary); color: white; }
.reseau-tab.active { background: rgba(108,99,255,0.18); border-color: rgba(108,99,255,0.4); color: var(--accent); }
.reseau-tab.reseau-tab-alert { color: white; border-color: rgba(218,55,60,0.2); box-shadow: inset 0 0 0 1px rgba(218,55,60,0.16); }
.reseau-tab-toggle {
    margin-bottom: 4px;
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.07);
    color: white;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
}
.reseau-tab-badge {
    position: absolute; top: 4px; right: 4px;
    background: var(--red); color: white; border-radius: 999px;
    min-width: 18px; height: 18px; padding: 0 4px; font-size: 0.6rem;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 0 10px rgba(218,55,60,0.5);
}
.reseau-tab-badge.hidden { display: none !important; }
    transition: transform 0.18s, color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
.reseau-panel.hidden { display: none !important; }
.reseau-panel-enter { animation: reseauPanelEnter 0.24s ease; }
@keyframes reseauPanelEnter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
#reseau-panel-flux {
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 8px 18px rgba(108,99,255,0.14);
    transform: translateY(-1px);
    overflow-y: auto;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(108,99,255,0.12), transparent 26%),
        radial-gradient(circle at top right, rgba(34,197,94,0.08), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0));
}
#reseau-panel-flux .feed-view-header {
    width: 100%;
    flex-shrink: 0;
    padding: 10px 18px;
    background: rgba(10, 12, 18, 0.86);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
#reseau-panel-flux .feed-view-header h3 {
    font-size: 0.96rem !important;
    line-height: 1.2;
}
#reseau-panel-flux .feed-container {
    width: min(100%, 840px);
    max-width: 840px;
    gap: 32px !important;
    margin: 34px auto 72px;
    padding: 0 28px 18px;
}
#reseau-panel-flux #feed-stream {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
#reseau-panel-flux .post-create-box {
    padding: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 22px 50px rgba(0,0,0,0.18);
    backdrop-filter: blur(8px);
}
#reseau-panel-flux .post-card {
    padding: 24px !important;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.018)),
        var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.075);
    box-shadow: 0 22px 48px rgba(0,0,0,0.16);
}
#reseau-panel-flux .post-content {
    font-size: 1rem;
    line-height: 1.75;
}
#reseau-panel-flux .post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 26px 60px rgba(0,0,0,0.22);
}
#reseau-panel-flux .post-header {
    margin-bottom: 16px;
}
#reseau-panel-flux .post-avatar {
    width: 52px;
    height: 52px;
    margin-right: 14px;
}
#reseau-panel-flux .post-role {
    margin-top: 5px;
    padding: 3px 9px;
    border-radius: 999px;
}
.feed-smart-toolbar {
    width: min(920px, calc(100% - 32px));
    margin: 18px auto 0;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(108,99,255,0.06));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.feed-toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feed-toolbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.feed-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-normal);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 0.18s ease;
}
.feed-toolbar-btn:hover { color: white; border-color: rgba(255,255,255,0.16); background: rgba(255,255,255,0.07); }
.feed-toolbar-btn.is-open { background: rgba(108,99,255,0.18); border-color: rgba(108,99,255,0.32); color: white; }
.feed-toolbar-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.feed-toolbar-panel.hidden { display: none !important; }
.feed-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.feed-filter-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    font-family: var(--font-main);
}
.feed-filter-btn:hover { color: white; border-color: rgba(255,255,255,0.16); }
.feed-filter-btn.active { background: rgba(108,99,255,0.18); border-color: rgba(108,99,255,0.32); color: white; }
.feed-filter-meta { color: var(--text-muted); font-size: 0.76rem; }
.feed-toolbar-panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.feed-profile-search-wrap { min-width: 240px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 999px; padding: 7px 12px; }
.feed-profile-search-wrap i { color: var(--text-dim); }
.feed-profile-search-wrap input { flex: 1; background: transparent; border: none; color: var(--text-normal); font-family: var(--font-main); font-size: 0.8rem; min-width: 0; }
.feed-profile-search-wrap input:focus { outline: none; }
.post-smart-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.post-smart-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.post-smart-badge.official { background: rgba(96,165,250,0.12); color: #8cc8ff; }
.post-smart-badge.sponsored { background: rgba(245,158,11,0.12); color: #f7bf5d; }
.post-smart-badge.company { background: rgba(35,165,89,0.12); color: #59c07f; }
#reseau-panel-flux .post-actions {
    gap: 8px;
    padding-top: 14px;
    flex-wrap: wrap;
}
#reseau-panel-flux .action-item {
    padding: 7px 14px;
    background: rgba(255,255,255,0.045);
    border-color: rgba(255,255,255,0.035);
}
#reseau-panel-flux .comments-section {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
}
#reseau-panel-flux #postContent {
    min-height: 124px;
    border-radius: 16px;
}
@media (max-width: 768px) {
    #view-reseau {
        --reseau-rail-width: 188px;
        --reseau-mobile-bottom-clearance: calc(env(safe-area-inset-bottom, 0px) + 92px);
    }
    #view-reseau .reseau-panel,
    #view-reseau #app-container,
    #view-reseau #chat-area,
    #view-reseau .char-mp-layout,
    #view-reseau .char-mp-main,
    #view-reseau #char-mp-convo {
        min-height: 0;
    }
    #view-reseau #reseau-panel-chat,
    #view-reseau #reseau-panel-mp {
        padding-bottom: var(--reseau-mobile-bottom-clearance);
        box-sizing: border-box;
    }
    #view-reseau #app-container,
    #view-reseau .char-mp-layout {
        height: 100%;
    }
    #view-reseau #messages,
    #view-reseau .char-mp-messages,
    #view-reseau .char-mp-convo-list {
        min-height: 0;
        padding-bottom: 18px;
    }
    #view-reseau #input-wrapper,
    #view-reseau .char-mp-input-bar {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    }
    .reseau-rail-handle {
        top: auto;
        left: 50%;
        bottom: 84px;
        width: 42px;
        height: 32px;
        border-radius: 999px;
        transform: translateX(-50%);
    }
    .reseau-tabbar {
        top: auto;
        left: 50%;
        bottom: 12px;
        width: min(520px, calc(100vw - 16px));
        max-height: none;
        padding: 8px;
        border-radius: 20px;
        box-shadow: 0 16px 38px rgba(0,0,0,0.32);
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        transform: translateX(-50%) translateY(calc(100% + 18px));
    }
    #view-reseau.reseau-rail-expanded .reseau-tabbar { transform: translateX(-50%) translateY(0); }
    .reseau-tab {
        min-height: 42px;
        padding: 9px 10px;
        border-radius: 12px;
        font-size: 0.8rem;
        min-width: 110px;
        justify-content: center;
    }
    .reseau-tab-toggle { min-width: 86px; }
    .profile-section-head,
    .profile-activity-pagination {
        flex-direction: column;
        align-items: stretch;
    }
    .profile-section-meta,
    .profile-activity-page-info {
        text-align: left;
        white-space: normal;
    }
    .bourse-toolbar { align-items: stretch; }
    .bourse-filter-meta { width: 100%; }
    .admin-console-grid { grid-template-columns: 1fr; }
    .feed-smart-toolbar {
        width: calc(100% - 28px);
        margin-top: 14px;
        padding: 12px 14px;
    }
    .feed-toolbar-row,
    .feed-toolbar-panel,
    .feed-toolbar-panel-actions,
    .feed-profile-search-wrap {
        width: 100%;
    }
    .feed-toolbar-actions { width: 100%; justify-content: flex-end; }
    .feed-toolbar-btn { flex: 1; justify-content: center; }
    #reseau-panel-flux .feed-view-header {
        padding: 8px 14px;
        height: auto;
        min-height: 60px;
        align-items: flex-start;
        gap: 10px;
        flex-wrap: wrap;
    }
    #reseau-panel-flux .feed-container {
        width: 100%;
        margin: 18px auto 96px;
        padding: 0 14px 12px;
        gap: 22px !important;
    }
    #reseau-panel-flux #feed-stream {
        gap: 20px;
    }
    #reseau-panel-flux .post-create-box,
    #reseau-panel-flux .post-card {
        padding: 18px !important;
    }
    .accueil-timeline-head { flex-direction: column; align-items: flex-start; }
    .stock-detail-metrics { grid-template-columns: 1fr 1fr; }
    .global-search-box { width: calc(100vw - 16px); padding: 18px 14px; }
    .global-search-head { flex-direction: column; }
    .global-search-result { flex-direction: column; }
    .global-search-fav-btn { width: 100%; min-height: 40px; }
}

/* ==================== [WIKI SCROLL FIX + SEARCH] ==================== */
#view-wiki { overflow-y: auto; }
.wiki-search-wrap {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 4px 10px; flex: 1; min-width: 180px; max-width: 340px;
}
.wiki-search-icon { color: var(--text-muted); font-size: 0.82rem; flex-shrink: 0; }
.wiki-search-input {
    flex: 1; background: transparent; border: none; outline: none;
    color: white; font-size: 0.85rem; font-family: var(--font-main); min-width: 0;
}
.wiki-search-input::placeholder { color: var(--text-muted); }
.wiki-format-toolbar {
    display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px;
}
.wiki-format-toolbar button {
    padding: 4px 8px; font-size: 0.75rem;
}
.wiki-live-preview {
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 6px;
    color: var(--text-normal); font-size: 0.85rem; line-height: 1.7;
    min-height: 100px; max-height: 300px; overflow-y: auto;
}
.wiki-live-preview.hidden { display: none !important; }

/* ==================== [BOURSE RANKING] ==================== */
.bourse-ranking-section {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 20px;
}
.bourse-ranking-title {
    font-size: 0.95rem; font-weight: 700; color: white;
    margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.bourse-ranking-title-main { display: inline-flex; align-items: center; gap: 8px; }
.bourse-ranking-title i { color: #f59e0b; }
.bourse-ranking-toggle {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg-tertiary); color: var(--text-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: all 0.18s;
}
.bourse-ranking-toggle i { color: currentColor; }
.bourse-ranking-toggle:hover { color: white; border-color: rgba(255,255,255,0.18); }
.bourse-ranking-list { display: flex; flex-direction: column; gap: 6px; }
.bourse-ranking-section.collapsed .bourse-ranking-list { display: none; }
.bourse-ranking-section.collapsed .bourse-ranking-title { margin-bottom: 0; }
.bourse-ranking-section.ranking-updated { animation: rankingPulse 0.55s ease; }
@keyframes rankingPulse {
    0% { box-shadow: 0 0 0 rgba(108,99,255,0); border-color: var(--border); }
    45% { box-shadow: 0 0 0 3px rgba(108,99,255,0.14); border-color: rgba(108,99,255,0.35); }
    100% { box-shadow: 0 0 0 rgba(108,99,255,0); border-color: var(--border); }
}
.bourse-ranking-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-tertiary); border-radius: var(--radius-sm);
    padding: 8px 12px;
}
.bourse-ranking-medal { font-size: 1rem; min-width: 26px; text-align: center; }
.bourse-ranking-logo {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
    border: 1px solid var(--border); flex-shrink: 0;
}
.bourse-ranking-name { flex: 1; font-size: 0.85rem; font-weight: 600; color: white; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bourse-ranking-rev { font-size: 0.8rem; color: var(--accent); font-weight: 700; white-space: nowrap; }

/* ==================== [ADMIN PANEL] ==================== */
#view-admin { overflow-y: auto; }
.admin-container { max-width: 1000px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 22px; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 4px; }
.admin-title { font-size: 1.5rem; font-weight: 700; color: white; margin: 0; }
.admin-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.admin-tabbar { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tab {
    border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-muted);
    border-radius: 999px; padding: 10px 16px; cursor: pointer; font-weight: 700; font-family: var(--font-main); transition: transform 0.18s, color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.admin-tab.active { background: rgba(108,99,255,0.18); color: white; border-color: rgba(108,99,255,0.4); box-shadow: 0 8px 18px rgba(108,99,255,0.16); transform: translateY(-1px); }
.admin-panel.hidden { display: none !important; }
.admin-section {
    background: radial-gradient(circle at top right, rgba(255,255,255,0.04), transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)), var(--bg-secondary); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px; padding: 18px 20px; box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}
.admin-section-title {
    font-size: 0.92rem; font-weight: 700; color: white;
    margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.admin-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px;
}
.admin-stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02)), var(--bg-tertiary); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px; padding: 14px 12px;
    display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.admin-stat-icon { font-size: 1.2rem; color: var(--accent); margin-bottom: 2px; }
.admin-stat-value { font-size: 1.5rem; font-weight: 800; color: white; }
.admin-stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-stat-online-card { border-color: rgba(35,165,89,0.35); }
.admin-stat-online-val { color: #23a559; }
.online-icon { color: #23a559; font-size: 0.7rem !important; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
.admin-online-list { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-online-chip {
    background: var(--bg-tertiary); border: 1px solid rgba(35,165,89,0.25);
    border-radius: 20px; padding: 3px 10px; font-size: 0.78rem; color: white;
    display: flex; align-items: center; gap: 5px;
}
.admin-console-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.admin-console-section { min-height: 220px; }
.admin-console-list { display: flex; flex-direction: column; gap: 10px; }
.admin-console-item {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    color: inherit;
}
.admin-console-clickable {
    cursor: pointer;
    text-align: left;
    font-family: var(--font-main);
    transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.admin-console-clickable:hover {
    transform: translateY(-1px);
    border-color: rgba(108,99,255,0.26);
    background: rgba(255,255,255,0.045);
}
.admin-console-icon {
    width: 32px; height: 32px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); color: var(--text-muted); flex-shrink: 0;
}
.admin-console-body { min-width: 0; }
.admin-console-text { color: white; font-size: 0.83rem; line-height: 1.45; }
.admin-console-meta { color: var(--text-muted); font-size: 0.73rem; margin-top: 4px; }
.admin-console-badge {
    display: inline-flex; margin-left: 6px; padding: 2px 7px; border-radius: 999px;
    background: rgba(108,99,255,0.16); color: #dfe2ff; font-size: 0.68rem; font-weight: 700;
}
.admin-console-up .admin-console-icon { color: #23a559; background: rgba(35,165,89,0.12); }
.admin-console-down .admin-console-icon { color: #da373c; background: rgba(218,55,60,0.12); }
.admin-console-market .admin-console-icon { color: #23a559; background: rgba(35,165,89,0.12); }
.admin-console-admin .admin-console-icon { color: #c4b5fd; background: rgba(168,85,247,0.12); }
.admin-console-alert .admin-console-icon { color: #f59e0b; background: rgba(245,158,11,0.12); }
.admin-console-user .admin-console-icon { color: var(--accent); background: rgba(108,99,255,0.12); }
.admin-console-event .admin-console-icon { color: #60a5fa; background: rgba(96,165,250,0.12); }
.admin-console-post .admin-console-icon { color: #fb923c; background: rgba(251,146,60,0.12); }
.admin-console-empty { color: var(--text-muted); font-size: 0.8rem; padding: 12px 4px; }
.admin-alert-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-users-list { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; }
.admin-user-row {
    display: flex; flex-direction: column; gap: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)), var(--bg-tertiary); border-radius: 18px; padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.admin-user-row.is-open {
    border-color: rgba(108,99,255,0.26);
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
    box-shadow: 0 14px 30px rgba(0,0,0,0.14);
}
.admin-user-summary {
    width: 100%; background: none; border: none; padding: 0;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    cursor: pointer; text-align: left; font-family: var(--font-main);
}
.admin-user-summary:hover .admin-user-name,
.admin-user-summary:hover .admin-user-chevron { color: white; }
.admin-user-summary.is-open .admin-user-chevron { color: white; transform: rotate(0deg); }
.admin-user-info { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.admin-user-name { font-weight: 700; font-size: 0.88rem; color: white; }
.admin-user-badge {
    font-size: 0.68rem; font-weight: 700; padding: 2px 7px; border-radius: 20px;
    background: var(--bg-2); color: var(--text-muted); border: 1px solid var(--border);
}
.admin-badge-admin { background: rgba(108,99,255,0.18); color: var(--accent); border-color: rgba(108,99,255,0.3); }
.admin-user-since { font-size: 0.72rem; color: var(--text-muted); }
.admin-user-count {
    font-size: 0.72rem; color: #d7dbf3; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border); border-radius: 999px; padding: 3px 8px;
}
.admin-user-details {
    width: 100%;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transform: translateY(-4px);
    transition: grid-template-rows 0.26s ease, opacity 0.2s ease, transform 0.22s ease;
}
.admin-user-row.is-open .admin-user-details {
    grid-template-rows: 1fr;
    opacity: 1;
    transform: translateY(0);
}
.admin-user-details-inner {
    overflow: hidden;
    min-height: 0;
    padding-top: 2px;
}
.admin-user-characters { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 220px; }
.admin-char-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 999px;
    max-width: 100%;
}
.admin-char-chip-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.admin-char-chip-main {
    background: none; border: none; padding: 0; display: inline-flex; align-items: center; gap: 6px;
    cursor: pointer; min-width: 0; font-family: var(--font-main);
}
.admin-char-chip-name { font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.admin-char-chip-role { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; }
.admin-char-chip-action {
    width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border);
    background: rgba(255,255,255,0.04); color: var(--text-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.admin-char-chip-action:hover, .admin-char-chip-main:hover .admin-char-chip-name { color: white; }
.admin-user-nochars { flex: 1; color: var(--text-muted); font-size: 0.75rem; }
.admin-user-actions { display: flex; gap: 6px; align-items: center; }
.admin-user-chevron {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
    display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.22s ease, color 0.18s ease, border-color 0.18s ease;
}
.admin-user-row.is-open .admin-user-chevron {
    transform: rotate(180deg);
    border-color: rgba(108,99,255,0.24);
}
.admin-actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.admin-companies-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.admin-company-editor-wrap { position: sticky; top: 18px; }
.admin-company-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-company-form-span { grid-column: 1 / -1; }
.admin-company-editor-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.admin-editor-hint { margin-top: 12px; color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }
.admin-companies-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-companies-meta { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 12px; }
.admin-companies-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; max-height: 70vh; overflow-y: auto; }
.admin-company-card { background: radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent 32%), linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)), var(--bg-tertiary); border: 1px solid rgba(255,255,255,0.06); border-radius: 18px; padding: 15px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 28px rgba(0,0,0,0.16); transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.admin-company-card:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(0,0,0,0.22); border-color: rgba(255,255,255,0.12); }
.admin-company-head { display: flex; gap: 10px; align-items: center; }
.admin-company-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.admin-company-logo-fallback { background: rgba(108,99,255,0.12); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.admin-company-head-text { min-width: 0; }
.admin-company-name { color: white; font-weight: 800; font-size: 0.95rem; }
.admin-company-owner { color: var(--text-muted); font-size: 0.74rem; margin-top: 2px; }
.admin-company-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-company-pill { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 999px; padding: 4px 9px; font-size: 0.72rem; color: #d7dbf3; display: inline-flex; gap: 6px; align-items: center; }
.admin-company-pill.muted { color: var(--text-muted); }
.admin-company-role { color: white; font-size: 0.82rem; font-weight: 600; }
.admin-company-desc { color: var(--text-muted); font-size: 0.8rem; line-height: 1.55; }
.admin-company-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.admin-danger-btn {
    background: rgba(218,55,60,0.15); color: #da373c; border: 1px solid rgba(218,55,60,0.25);
    border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; font-family: var(--font-main); font-weight: 700;
}
.admin-empty-state { color: var(--text-muted); font-size: 0.82rem; padding: 20px 8px; }
@media (max-width: 900px) {
    .admin-companies-layout { grid-template-columns: 1fr; }
    .admin-company-editor-wrap { position: static; }
}
@media (max-width: 640px) {
    .admin-company-form-grid { grid-template-columns: 1fr; }
    .admin-section { padding: 16px 14px; }
}
