* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===================== THÈMES ===================== */
[data-theme="ocean"][data-mode="light"] {
    --primary: #0ea5e9; --primary-hover: #0284c7; --primary-light: #e0f2fe;
    --success: #10b981; --warning: #f59e0b; --danger: #ef4444;
    --bg-main: #ffffff; --bg-secondary: #f8fafc; --bg-tertiary: #e2e8f0;
    --border: #cbd5e1; --text: #0f172a; --text-secondary: #475569; --text-muted: #94a3b8;
    --shadow: 0 1px 3px rgba(0,0,0,0.1); --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

[data-theme="ocean"][data-mode="dark"] {
    /* Couleurs Officielles WhatsApp Dark Mode */
    --primary: #00a884;           /* Vert WhatsApp */
    --primary-hover: #008069;
    --primary-light: #005c4b;
    --success: #25d366;
    --warning: #ffd279;
    --danger: #f15c5c;

    /* Fonds et Textes */
    --bg-main: #111b21;          /* Fond des chats */
    --bg-secondary: #202c33;     /* Fond liste contacts */
    --bg-tertiary: #2a3942;      /* Éléments actifs */
    --border: #3b4a54;
    --text: #e9edef;             /* Texte clair */
    --text-secondary: #8696a0;
    --text-muted: #667781;

    /* Messages */
    --bg-message-sent: #005c4b;
    --bg-message-received: #202c33;

    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}

/* Amélioration visuelle de la liste des contacts */
.contact-item.active {
    background: var(--bg-tertiary) !important; /* Gris plus clair au lieu du bleu */
    border-left: none !important;
}

.contact-name {
    color: var(--text) !important;
    font-size: 16px !important; /* Plus grand comme sur mobile */
}

/* ===================== LAYOUT GÉNÉRAL ===================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text);
}

.workspace { display: flex; flex-direction: column; height: 100vh; }

/* Verrouille la hauteur de toute l'application pour forcer le scroll interne */
.workspace-main {
    height: calc(100vh - 64px) !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: 80px 300px 1fr !important;
}


/* ===================== NAVBAR ===================== */
.navbar {
    height: 64px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.navbar-left, .navbar-center, .navbar-right { display: flex; align-items: center; gap: 16px; }

.app-brand { display: flex; align-items: center; gap: 12px; }

.brand-logo {
    width: 40px; height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.brand-text { font-size: 18px; font-weight: 700; color: var(--text); }

.connection-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--bg-secondary);
    font-size: 13px;
}

.connection-badge.connected { background: #d1fae5; color: #065f46; }
.connection-badge.disconnected { background: #fee2e2; color: #991b1b; }
.connection-badge i { font-size: 8px; }
.badge-detail { font-size: 11px; opacity: 0.7; }

.global-search { position: relative; width: 400px; }
.global-search input {
    width: 100%;
    padding: 10px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 14px;
}
.global-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.nav-icon-btn {
    width: 40px; height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.nav-icon-btn:hover { background: var(--bg-secondary); color: var(--text); }

/* ===================== SIDEBAR CANAUX ===================== */
.channel-sidebar {
    width: 80px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
}

.channel-btn {
    width: 64px; height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11px;
}
.channel-btn:hover { background: var(--bg-tertiary); color: var(--text); }
.channel-btn.active { background: var(--primary); color: white; }
.channel-btn i { font-size: 24px; }

/* ===================== PANEL GAUCHE (CONTACTS) ===================== */
.panel-toolbar {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary); /* Pour bien détacher l'en-tête */
}

.panel-title { font-size: 16px; font-weight: 600; }

/* Style du bouton + à côté de Conversations */
.panel-action-btn {
    padding: 6px 10px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.panel-action-btn:hover {
    background: var(--primary-hover);
}

.panel-action-btn i {
    font-size: 12px;
}


.empty-state-list {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* ===================== CONTACTS COMPACTS ===================== */
/* ========== STYLE DES LIGNES ALTERNÉES (ZÈBRE) ===================== */
.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;                /* Espacement réduit entre l'avatar et le texte */
    padding: 6px 8px;        /* Marge gauche/droite réduite de 12px à 8px */
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border);
    min-height: 52px;
    max-height: 52px;
    position: relative;
}

/* Lignes paires (even) : Fond principal */
.contact-item.even {
    background: var(--bg-main) !important;
}

/* Lignes impaires (odd) : Couleur contrastée bien visible */
.contact-item.odd {
    background: var(--bg-secondary) !important;
}

/* État au survol (hover) */
.contact-item:hover {
    background: var(--primary-light) !important;
}

/* Contact actif (celui sur lequel vous avez cliqué) */
.contact-item.active {
    background: var(--primary) !important;
    border-left: 4px solid var(--success) !important;
}

/* On s'assure que le texte reste blanc sur fond bleu (actif) */
.contact-item.active .contact-name,
.contact-item.active .contact-time,
.contact-item.active .contact-preview {
    color: #ffffff !important;
}

/* Contact non lu */
.contact-item.unread {
    background: #dcf8c6 !important;
    border-left: 3px solid #25d366 !important;
}

.contact-item.unread .contact-name {
    font-weight: 700 !important;
    color: #065f46 !important;
}


/* Container de l'avatar : Carré aux coins arrondis */
/* On force le conteneur en carré arrondi et on coupe tout ce qui dépasse */
.avatar-container {
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 0 !important; /* On supprime la marge car le 'gap' suffit */
}

/* On s'assure que l'image interne suit la même forme */
.avatar-image {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;    /* On enlève l'arrondi de l'image elle-même */
    object-fit: cover;
}

/* Avatar coloré */
.avatar-container {
    width: 45px !important;
    height: 45px !important;
    border-radius: 10px !important; /* Carré arrondi style OCS */
    overflow: hidden !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
}

.avatar-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 0 !important; /* L'image ne doit pas être ronde */
}

/* Info contact */
.contact-info {
    flex: 1;
    min-width: 0;           /* Crucial pour que le texte puisse se tronquer par '...' */
    display: flex;
    flex-direction: column;
    gap: 0px;               /* Colle le message au nom */
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.contact-name {
    font-size: 14px !important;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    line-height: 1.2;
}

.contact-time {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.contact-preview {
    font-size: 12px !important;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.3;
}

/* Badge non lu */
.contact-badge {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: #25d366;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* ===================== PANEL CENTRAL (MESSAGES) ===================== */
.center-panel {
    display: flex;
    flex-direction: column;
    background: #0b141a;
    height: 100%;
    overflow: hidden;
}

.conversation-header {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.conversation-header h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

/* 1. ESPACEMENT GLOBAL ENTRE LES BULLES */
.messages-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 15px;      /* Augmentation du padding pour plus d'air sur les côtés */
    display: flex;
    flex-direction: column;
    gap: 14px !important;    /* Augmenté de 3px à 14px pour laisser place aux émojis */
    background: #0b141a;
}

/* ===================== MESSAGES STYLE WHATSAPP MOBILE ===================== */
/* 2. MARGE INDIVIDUELLE DES MESSAGES */
.message {
    max-width: 65%;
    margin-bottom: 10px !important; /* Augmenté de 2px à 10px */
    position: relative;
    word-wrap: break-word;
    font-size: 14.2px;
    line-height: 19px;
    padding: 8px 10px 10px 12px;  /* Légèrement plus de confort interne */
    border-radius: 7.5px;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13); /* Ajout d'une ombre légère pour la profondeur */
}

.message.sent {
    align-self: flex-end;
    background: #005c4b;
    color: #e9edef;
    border-bottom-right-radius: 0;
}

.message.received {
    align-self: flex-start;
    background: #202c33;
    color: #e9edef;
    border-bottom-left-radius: 0;
}

.message-text {
    word-break: break-word;
    margin-bottom: 2px;
}

.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 4px;
}

.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.message-status {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
}

.message-status i {
    color: #53bdeb;
}

/* Séparateur de date */
.date-separator {
    text-align: center;
    margin: 12px 0;
    position: relative;
    width: 100%;

}

.date-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.date-separator span {
    background: #182229;
    padding: 5px 12px;
    border-radius: 7.5px;
    font-size: 12.5px;
    font-weight: 500;
    color: #8696a0;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

/* Médias dans les messages */
.message-media {
    margin-top: 4px;
}

.message-media img {
    max-width: 280px;
    max-height: 400px;
    border-radius: 8px;
    cursor: pointer;
    display: block;
}

.message-media video {
    max-width: 280px;
    border-radius: 8px;
    display: block;
}

.message-media audio {
    width: 100%;
    max-width: 280px;
}

/* Welcome message */
.welcome-message {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-muted);
}

.welcome-message i {
    font-size: 64px;
    opacity: 0.3;
    margin-bottom: 20px;
}

.welcome-message h3 {
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 300;
}

.welcome-message p {
    font-size: 14px;
    opacity: 0.7;
}

/* ===================== COMPOSER ===================== */
/* ===================== COMPOSER FIXED ===================== */
.composer,
.message-composer {
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.recipient-field {
    display: none;
    padding: 10px;
    background: var(--bg-main);
    border-radius: 8px;
    margin-bottom: 10px;
}

.recipient-field.active {
    display: block;
}

.recipient-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.recipient-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 14px;
}

.recipient-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.composer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.composer-left-actions {
    display: flex;
    gap: 4px;
}

.composer-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s;
    position: relative;
}

.composer-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.composer-textarea {
    width: 100%;
    min-height: 80px;
    max-height: 120px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg-main);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
}

.composer-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.composer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-counter {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-send {
    height: 42px;
    padding: 0 20px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-send:hover {
    background: var(--primary-hover);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-send i {
    font-size: 16px;
}

/* ===================== EMOJI PICKER ===================== */
.emoji-picker {
    display: none;
    position: absolute;
    bottom: 70px;
    left: 20px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 350px;
    z-index: 1000;
}

.emoji-picker.active {
    display: block;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 0;
}

.emoji-btn {
    font-size: 22px;
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
}

.emoji-btn:hover {
    background: var(--bg-secondary);
    transform: scale(1.15);
}

/* ===================== SCROLLBARS ===================== */
.contacts-list::-webkit-scrollbar,
.messages-area::-webkit-scrollbar,
.emoji-grid::-webkit-scrollbar {
    width: 6px;
}

.contacts-list::-webkit-scrollbar-track,
.messages-area::-webkit-scrollbar-track {
    background: transparent;
}

.contacts-list::-webkit-scrollbar-thumb,
.messages-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.contacts-list::-webkit-scrollbar-thumb:hover,
.messages-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .workspace-main {
        grid-template-columns: 60px 1fr;
    }

    .left-panel {
        display: none;
    }

    .contact-item {
        padding: 6px 10px;
        min-height: 56px;
        max-height: 56px;
    }

    .contact-avatar {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}


/* ============= Menu contextuel ============*/
/* Style amélioré pour le menu contextuel */
.context-menu {
    position: fixed;
    background: #233138; /* Fond sombre WhatsApp */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 10000;
    min-width: 220px;
    padding: 5px 0;
    animation: fadeIn 0.1s ease-out;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #e9edef;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: #182229; /* Teinte plus sombre au survol */
}

.context-menu-item i {
    width: 20px;
    color: #8696a0; /* Couleur grise icônes WA */
    font-size: 16px;
}

.context-menu-danger {
    color: #f15c5c !important;
}

.context-menu-danger:hover {
    background: rgba(241, 92, 92, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}



/* ===================== UTILITAIRES ===================== */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

/* Toast notifications */
#toast-container {
position: fixed;
top: 80px;
right: 20px;
z-index: 9999;
}

.toast {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}


/* ==== Style CSS pour la fenêtre Selection des conacts avant fusion ======= */
/* Fenêtre de fusion (Modal) */
.custom-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.modal-content {
    background: #1f2c33; border-radius: 12px; padding: 24px; width: 90%; max-width: 420px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.fusion-list {
    max-height: 350px; overflow-y: auto; border: 1px solid #3b4a54; border-radius: 8px; margin-bottom: 20px;
}
.fusion-option {
    display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #2a3942; cursor: pointer; transition: 0.2s;
}
.fusion-option:hover { background: #2a3942; }
.fusion-info { flex: 1; min-width: 0; margin-left: 10px; }
.fusion-option-name { color: #e9edef; font-weight: 600; font-size: 15px; }
.fusion-option-jid { color: #8696a0; font-size: 12px; }
.btn-cancel {
    width: 100%; padding: 12px; background: transparent; border: 1px solid #ef4444; color: #ef4444; border-radius: 6px; cursor: pointer; font-weight: 600;
}
.btn-cancel:hover { background: rgba(239, 68, 68, 0.1); }



/* Style pour la grille d'avatars dynamique */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes pour voir plus d'icônes */
    gap: 10px;
    margin: 15px 0;
    padding-right: 5px;
}

.avatar-option img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255,255,255,0.05);
}


/* --- ÉTAPE 2 : STRUCTURE ET RECHERCHE --- */
/* 2. Design de la barre de recherche sous Conversations */
.contact-search-container {
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.contact-search-container input {
    width: 100%;
    box-sizing: border-box; /* FORCE l'input à rester DANS son conteneur */
    padding: 10px 12px 10px 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-main);
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.contact-search-container input:focus {
    border-color: var(--primary);
}

.contact-search-container .search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}



/* Scrollbar fine pour la liste de contacts */
.contacts-list::-webkit-scrollbar {
    width: 6px;
}

.contacts-list::-webkit-scrollbar-thumb {
    background: #374045;
    border-radius: 3px;
}

/* BLOC UNIQUE ET PROPRE POUR LE PANEL GAUCHE */
.left-panel {
    width: 300px !important;
    min-width: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 64px) !important;
    overflow: hidden !important;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
}
.contacts-list {
    flex: 1 !important;
    overflow-y: auto !important; /* L'ascenseur est ici */
    overflow-x: hidden !important;
    background: var(--bg-main);
    padding-bottom: 200px !important; /* Pour s'arrêter avant le composer */
}


/* Conteneur du menu de choix d'emoji */
#emoji-picker {
position: fixed; /* Fixed pour éviter les problèmes de scroll */
background: #24272d;
border: 1px solid #4a4d52;
border-radius: 25px;
padding: 6px 12px;
display: none; /* Caché par défaut */
flex-direction: row;
gap: 10px;
box-shadow: 0 4px 15px rgba(0,0,0,0.6);
z-index: 9999;
}

.emoji-option {
    cursor: pointer;
    font-size: 19px;
    transition: transform 0.1s ease;
}

.emoji-option:hover {
    transform: scale(1.4);
}

/* --- GESTION DES RÉACTIONS SUR LES BULLES --- */
.reaction-container {
    position: absolute;
    bottom: -10px;
    right: 10px;
    height: 24px;
    display: flex;
    align-items: center;
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* BLOC UNIQUE : Style et Positionnement du Badge Émoji */
.reaction-badge {
    position: absolute;
    bottom: -14px;           /* Espace augmenté pour éviter les chevauchements */
    right: 8px;
    background: #233138;     /* Gris foncé WhatsApp */
    border: 1px solid #444;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 13px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 10;
    user-select: none;
    cursor: default;
    animation: popIn 0.3s ease-out; /* Animation d'apparition */
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}


/* --- SYSTÈME DE NOTIFICATIONS TOAST --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--bg-main);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    min-width: 250px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.toast.info { border-left-color: #3498db; }
.toast.success { border-left-color: #2ecc71; }
.toast.error { border-left-color: #e74c3c; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


/* PLUS RIEN APRÈS CE CROCHET CI-DESSUS */
