body
{
width: 690px;
margin: auto;
padding-top: 5px;
background-image: url("img/background.gif");
}
#haut
{
background-image: url("img/haut.gif");
width: 586px;
height: 80px;
padding-top: 151px;
padding-left: 104px;
vertical-align: middle;
}
#permenuhaux
{
background-image: url("img/haut1ermenu.gif");
width: 213px;
height: 33px;
float:left;
}
#permenumilieu
{
padding: auto;
background-image: url("img/milieumenu.gif");
width: 213px;
min-height : 116px;
clear: left;
	font-family:Verdana, Geneva, sans-serif;

	font-size:10px;
text-align: center;
	font-style:inherit;
	font-weight: bold;

}
#hautmenu
{
background-image: url("img/hautmenu.gif");
width: 213px;
height: 33px;
float:left;
clear: left;
}
#basmenu
{
background-image: url("img/basmenu.gif");
width: 213px;
height: 2px;
float:left;
clear: left;
}
#blablamilieu
{
background-image: url("img/milieublabla.gif");
width: 477px;
float:right;
min-height : 420px;
font-family:Verdana, Geneva, sans-serif;

	font-size:10px;

	font-style:inherit;
	color: white;
	font-weight: bold;


clear: right;
}
#basblabla
{
background-image: url("img/basblabla.gif");
width: 477px;
height: 62px;
float:right;
clear: right;
}

#border
{
min-height : 420px;
padding-right: 15px;
padding-left: 10px;
}

td
{
vertical-align: top;

}

a:link {

	color: #FF9900;

	text-decoration: none;

	font-weight: bold;

	}

a:visited {

	text-decoration: none;

	color: #FF9900;

	font-weight: bold;

}

a:hover {

	text-decoration: underline;

	color: #FF6600;

	font-weight: bold;

}

a:active {

	text-decoration: none;

	color: #FF9900;

	font-weight: bold;

}



/* Si JS activé */
div.secret div.secret1 {
/* Avec JS activé, on masque par défaut */
	display: none;
}

/* JS est désactivé */

body.nojs div.secret div.secret1 {
/* Par défaut, on affiche au cas ou on a pas JS activé */
	display: block;
}

div.secret div.secret1 {
	display: none;
}

/* Dans tous les cas */
div.secretshow div.secret1 {
	display: block;
}

div.secrethide div.secret1 {
	display: none;
}
/**
 * HabboKill - CSS des Améliorations
 * Fichier CSS standalone pour admin, boutique et gangs
 * Version : 2.0
 */

/* ===== VARIABLES GLOBALES ===== */
:root {
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    --color-danger: #f5576c;
    --color-success: #38ef7d;
    --color-warning: #ffc107;
    --color-info: #2196f3;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-danger: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --shadow-light: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-medium: 0 8px 15px rgba(0,0,0,0.2);
    --shadow-heavy: 0 8px 25px rgba(0,0,0,0.15);
    --radius-small: 8px;
    --radius-medium: 10px;
    --radius-large: 15px;
}

/* ===== PANEL ADMINISTRATION ===== */
.admin-panel {
    background: var(--gradient-primary);
    padding: 20px;
    border-radius: var(--radius-large);
    margin: 10px 0;
}

.admin-panel h1 {
    color: white;
    text-align: center;
    margin: 0;
}

.admin-box {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    margin: 15px 0;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
}

.admin-box h3 {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 10px;
    margin-top: 0;
}

.admin-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: var(--radius-small);
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.admin-input, .admin-textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-small);
    font-size: 14px;
    margin: 8px 0;
    box-sizing: border-box;
    font-family: inherit;
}

.admin-input:focus, .admin-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-label {
    display: block;
    font-weight: bold;
    color: #333;
    margin: 10px 0 5px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: var(--gradient-primary);
    color: white;
    padding: 20px;
    border-radius: var(--radius-medium);
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Messages Admin */
.message-success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
    padding: 15px;
    border-radius: var(--radius-small);
    margin: 10px 0;
    font-weight: bold;
}

.message-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
    padding: 15px;
    border-radius: var(--radius-small);
    margin: 10px 0;
    font-weight: bold;
}

.message-warning {
    background: #fff3cd;
    border: 2px solid var(--color-warning);
    color: #856404;
    padding: 15px;
    border-radius: var(--radius-small);
    margin: 10px 0;
    font-weight: bold;
}

/* ===== BOUTIQUE ===== */
.shop-container {
    max-width: 1000px;
    margin: 0 auto;
}

.shop-header {
    background: var(--gradient-primary);
    padding: 30px;
    border-radius: var(--radius-large);
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.shop-header h1 {
    margin: 0 0 10px 0;
}

.shop-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    background: var(--color-secondary);
    transform: translateY(-2px);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shop-item {
    background: white;
    border-radius: var(--radius-large);
    padding: 20px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--color-primary);
}

.item-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 15px;
}

.item-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.item-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 60px;
}

.item-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-primary);
    text-align: center;
    margin: 15px 0;
}

.item-badge {
    display: inline-block;
    padding: 5px 10px;
    background: #ffd700;
    color: #333;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin: 5px;
}

.item-badge.vip-badge {
    background: var(--gradient-danger);
    color: white;
}

.item-badge.promo-badge {
    background: #4CAF50;
    color: white;
}

.buy-btn {
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-small);
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.player-coins {
    background: #fff3cd;
    padding: 15px;
    border-radius: var(--radius-medium);
    text-align: center;
    margin-bottom: 20px;
    border: 2px solid var(--color-warning);
}

.player-coins h2 {
    margin: 0 0 10px 0;
}

.player-coins p {
    margin: 10px 0;
}

/* ===== SYSTÈME GANGS ===== */
.gang-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gang-header {
    background: var(--gradient-danger);
    padding: 30px;
    border-radius: var(--radius-large);
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.gang-header h1 {
    margin: 0 0 10px 0;
}

.gang-card {
    background: white;
    border-radius: var(--radius-large);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.gang-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.gang-badge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--color-danger);
    margin: 0 auto 15px;
    object-fit: cover;
}

.gang-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--radius-medium);
    text-align: center;
}

.stat-box .stat-number {
    font-size: 28px;
    font-weight: bold;
    color: var(--color-danger);
}

.stat-box .stat-label {
    font-size: 14px;
    color: #666;
}

.gang-members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.member-tag {
    background: #e9ecef;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.member-tag.chef {
    background: var(--gradient-danger);
    color: white;
    font-weight: bold;
}

.bonus-list {
    background: #fff3cd;
    border-left: 4px solid var(--color-warning);
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.bonus-item {
    padding: 10px;
    margin: 5px 0;
    background: white;
    border-radius: 5px;
}

/* ===== UTILITAIRES ===== */
.info-box {
    background: #e3f2fd;
    padding: 20px;
    border-radius: var(--radius-medium);
    border-left: 4px solid var(--color-info);
    margin: 20px 0;
}

.info-box h3 {
    margin-top: 0;
}

.info-box ul {
    line-height: 2;
}

/* Tables améliorées */
table.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

table.admin-table th {
    background: var(--color-primary);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

table.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

table.admin-table tr:hover {
    background: #f8f9fa;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid,
    .shop-grid,
    .gang-stats {
        grid-template-columns: 1fr;
    }
    
    .shop-categories {
        flex-direction: column;
    }
    
    .category-btn {
        width: 100%;
    }
    
    .admin-panel,
    .shop-header,
    .gang-header {
        padding: 20px 15px;
    }
    
    .admin-box,
    .gang-card {
        padding: 15px;
    }
}

/* Boutons spéciaux */
.btn-success {
    background: var(--gradient-success) !important;
}

.btn-danger {
    background: var(--gradient-danger) !important;
}

.btn-warning {
    background: var(--color-warning) !important;
    color: #333 !important;
}

/* Badges de notification */
.notification-badge {
    background: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Dark mode (optionnel) */
@media (prefers-color-scheme: dark) {
    .admin-box,
    .shop-item,
    .gang-card {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .admin-input,
    .admin-textarea {
        background: #3d3d3d;
        border-color: #4d4d4d;
        color: #ffffff;
    }
}
<style>
.forum-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.forum-category {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.forum-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.forum-category h3 {
    color: #667eea;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.forum-topic {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.forum-topic:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.forum-topic-new {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.forum-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.forum-stat-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.forum-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.forum-create-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.forum-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.forum-search {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.forum-search input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.forum-search input:focus {
    outline: none;
    border-color: #667eea;
}
</style>
// ========================================
// 5. AMÉLIORATIONS FORUM
// ========================================
?>

<!-- Ajout CSS pour améliorer le forum -->
<style>
.forum-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.forum-category {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.forum-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.forum-category h3 {
    color: #667eea;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.forum-topic {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.forum-topic:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.forum-topic-new {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.forum-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.forum-stat-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.forum-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.forum-create-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.forum-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.forum-search {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.forum-search input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.forum-search input:focus {
    outline: none;
    border-color: #667eea;
}
</style>
// ========================================
// 1. ÉDITEUR WYSIWYG POUR L'ANNONCE
// ========================================
?>

<!-- CSS pour l'éditeur d'annonce -->
<style>
.editor-toolbar {
    background: #f8f9fa;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.editor-btn {
    background: white;
    border: 1px solid #ccc;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.editor-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.editor-btn.active {
    background: #667eea;
    color: white;
}

.editor-content {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 15px;
    min-height: 200px;
    background: white;
    font-family: Verdana, sans-serif;
    font-size: 12px;
}

.editor-content:focus {
    outline: none;
    border-color: #667eea;
}

.color-picker-popup {
    position: absolute;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: inline-block;
    margin: 3px;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-option:hover {
    border-color: #333;
    transform: scale(1.1);
}

.emoji-picker {
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    position: absolute;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.emoji-item {
    font-size: 24px;
    display: inline-block;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji-item:hover {
    transform: scale(1.3);
}

.preview-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}
</style>
<?php
/**
 * AMÉLIORATIONS HABBOKILL
 * Fichier à intégrer dans pageco.php
 * Conserve toute la structure et design existant
 */

// ========================================
// 1. ÉDITEUR WYSIWYG POUR L'ANNONCE
// ========================================
?>

<!-- CSS pour l'éditeur d'annonce -->
<style>
.editor-toolbar {
    background: #f8f9fa;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.editor-btn {
    background: white;
    border: 1px solid #ccc;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.editor-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.editor-btn.active {
    background: #667eea;
    color: white;
}

.editor-content {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 15px;
    min-height: 200px;
    background: white;
    font-family: Verdana, sans-serif;
    font-size: 12px;
}

.editor-content:focus {
    outline: none;
    border-color: #667eea;
}

.color-picker-popup {
    position: absolute;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: inline-block;
    margin: 3px;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-option:hover {
    border-color: #333;
    transform: scale(1.1);
}

.emoji-picker {
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    position: absolute;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.emoji-item {
    font-size: 24px;
    display: inline-block;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji-item:hover {
    transform: scale(1.3);
}

.preview-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}
</style>

<!-- Script de l'éditeur -->
<script>
// Éditeur WYSIWYG
const Editor = {
    init: function() {
        const content = document.getElementById('editor-content');
        if (!content) return;
        
        // Rendre éditable
        content.contentEditable = true;
        
        // Événements des boutons
        document.querySelectorAll('.editor-btn').forEach(btn => {
            btn.addEventListener('click', (e) => {
                e.preventDefault();
                const command = btn.dataset.command;
                const value = btn.dataset.value || null;
                
                if (command === 'insertEmoji') {
                    this.toggleEmojiPicker();
                } else if (command === 'foreColor') {
                    this.toggleColorPicker();
                } else if (command === 'insertIcon') {
                    this.insertIcon(value);
                } else {
                    document.execCommand(command, false, value);
                }
                
                content.focus();
            });
        });
        
        // Mise à jour du textarea caché
        content.addEventListener('input', () => {
            document.getElementById('annonce-hidden').value = content.innerHTML;
        });
    },
    
    toggleColorPicker: function() {
        const picker = document.getElementById('color-picker');
        picker.style.display = picker.style.display === 'none' ? 'block' : 'none';
    },
    
    selectColor: function(color) {
        document.execCommand('foreColor', false, color);
        document.getElementById('color-picker').style.display = 'none';
        document.getElementById('editor-content').focus();
    },
    
    toggleEmojiPicker: function() {
        const picker = document.getElementById('emoji-picker');
        picker.style.display = picker.style.display === 'none' ? 'block' : 'none';
    },
    
    insertEmoji: function(emoji) {
        const content = document.getElementById('editor-content');
        content.focus();
        document.execCommand('insertText', false, emoji);
        document.getElementById('emoji-picker').style.display = 'none';
    },
    
    insertIcon: function(iconClass) {
        const content = document.getElementById('editor-content');
        const icon = document.createElement('span');
        icon.textContent = iconClass;
        icon.style.fontSize = '16px';
        
        const selection = window.getSelection();
        if (selection.rangeCount > 0) {
            const range = selection.getRangeAt(0);
            range.deleteContents();
            range.insertNode(icon);
            range.collapse(false);
        }
        
        content.focus();
    },
    
    updatePreview: function() {
        const content = document.getElementById('editor-content').innerHTML;
        document.getElementById('preview-content').innerHTML = content;
    }
};

// Initialiser au chargement
document.addEventListener('DOMContentLoaded', () => {
    Editor.init();
});
</script>
    <style>
    .assassinat-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 20px;
        border-radius: 10px;
        text-align: center;
        color: white;
        margin-bottom: 20px;
    }
    .filter-bar {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        margin: 15px 0;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
    }
    .filter-btn {
        background: white;
        border: 2px solid #667eea;
        padding: 8px 15px;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s;
        font-weight: bold;
    }
    .filter-btn:hover, .filter-btn.active {
        background: #667eea;
        color: white;
    }
    .kill-card {
        background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
        border-left: 4px solid #667eea;
        padding: 15px;
        margin: 10px 0;
        border-radius: 8px;
        transition: all 0.3s;
    }
    .kill-card:hover {
        transform: translateX(5px);
        box-shadow: 0 4px 12px rgba(102,126,234,0.3);
    }
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin: 20px 0;
    }
    .stat-card {
        background: white;
        padding: 20px;
        border-radius: 10px;
        text-align: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .stat-number {
        font-size: 32px;
        font-weight: bold;
        color: #667eea;
    }
    .search-box {
        width: 100%;
        padding: 12px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 14px;
        transition: border-color 0.3s;
    }
    .search-box:focus {
        outline: none;
        border-color: #667eea;
    }
    </style>