/* ============================================
   PANEL EFFECTIF - OUTILS EMS - STYLES
   Même style que la page Inventaire : couleur unie #4a5fc1
   ============================================ */

:root {
    --outils-primary: #4a5fc1;
    --outils-primary-shadow: rgba(74, 95, 193, 0.3);
}

/* Onglets (style inventaire : bloc fond unie) */
.tools-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.tool-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.tool-tab:hover {
    color: white;
    background: var(--outils-primary);
}

.tool-tab.active {
    color: white;
    background: var(--outils-primary);
    box-shadow: 0 4px 15px var(--outils-primary-shadow);
}

.tool-tab i {
    width: 18px;
    height: 18px;
}

/* Contenu des onglets */
.tools-content {
    min-height: 400px;
}

.tool-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tool-content.active {
    display: block;
}

/* Barre de recherche */
.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 18px;
    height: 18px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--outils-primary);
}

.outils-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.outils-search-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-primary);
    padding: 0.75rem;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.outils-search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.outils-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.outils-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: none;
    align-items: center;
    justify-content: center;
}

.outils-search-clear i {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.outils-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.outils-card-actions--code {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.outils-edit-btn,
.outils-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: white;
}

.outils-edit-btn {
    background: var(--primary);
}

.outils-delete-btn {
    background: var(--danger);
}

.outils-edit-btn--block,
.outils-delete-btn--block {
    flex: 1;
    justify-content: center;
}

.outils-empty {
    width: 100%;
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 4rem 2rem;
    margin: 2rem auto;
    max-width: 700px;
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
    border: 2px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.outils-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 2px solid rgba(148, 163, 184, 0.2);
}

.outils-empty--emote .outils-empty-icon {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.1));
    border-color: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.outils-empty--code .outils-empty-icon {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(147, 51, 234, 0.1));
    border-color: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.outils-empty-icon i {
    width: 42px;
    height: 42px;
    opacity: 0.8;
}

.outils-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.outils-empty p {
    font-size: 1rem;
    opacity: 0.7;
    margin: 0;
    line-height: 1.6;
}

/* Grille générale */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Cartes d'outils (style inventaire) */
.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.tool-card:hover {
    border-color: var(--outils-primary);
    box-shadow: 0 4px 15px var(--outils-primary-shadow);
}

/* ÉMOTES - liste de catégories (une catégorie par bloc, bien espacées) */
.emotes-categories-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.emote-category {
    width: 100%;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.emote-category:last-child {
    border-bottom: none;
}

.emote-category h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: var(--outils-primary);
    box-shadow: 0 4px 15px var(--outils-primary-shadow);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

/* Grille d'émotes : remplit la ligne, cartes de taille égale */
.emote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    animation: slideIn 0.3s ease-out;
}

.emote-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.emote-command {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background: var(--outils-primary);
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
}

.emote-name {
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.emote-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    flex: 1;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--outils-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.copy-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 15px var(--outils-primary-shadow);
}

.copy-btn i {
    width: 16px;
    height: 16px;
}

/* CODES RADIO */
.code-card {
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.code-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--outils-primary);
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.code-meaning {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.code-usage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.code-usage i {
    width: 16px;
    height: 16px;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARTE GTA V — embed MapGenie (gta-5-map.com) */
.gta-map-embed-frame {
    width: 100%;
    min-height: 65vh;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0f172a;
}

/* Responsive */
@media (max-width: 768px) {
    .tools-tabs {
        gap: 0.25rem;
    }
    
    .tool-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .tool-tab span {
        display: none;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .emote-grid {
        grid-template-columns: 1fr;
    }

    .gta-map-embed-frame {
        min-height: 55vh;
    }
}
