.cyber-search-wrapper { background: #0d0d0d; border: 1px solid #222; padding: 30px; border-radius: 8px; font-family: 'Share Tech Mono', monospace; margin: 40px 0; box-shadow: 0 10px 40px rgba(0,0,0,0.8); }
.terminal-prefix { color: #888; }
.search-header { color: #D4FF00; font-size: 13px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.search-input-group { display: flex; gap: 10px; border-bottom: 2px solid #333; padding-bottom: 10px; transition: border 0.3s; }
.search-input-group:focus-within { border-bottom-color: #D4FF00; }
#cyber-search-field { flex: 1; background: transparent; border: none; color: #fff; font-size: 20px; font-family: inherit; outline: none; }
#cyber-search-btn { background: #D4FF00; border: none; color: #000; font-weight: bold; padding: 10px 25px; cursor: pointer; transition: 0.3s; font-family: inherit; }
#cyber-search-btn:hover { background: #fff; box-shadow: 0 0 20px #D4FF00; }
#cyber-search-btn:hover:not(:disabled) { background: #fff; box-shadow: 0 0 20px #D4FF00; }

/* NOUVEAU : Style quand le bouton est verrouillé */
#cyber-search-btn:disabled {
    background: #222 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    border: 1px solid #333;
}

.results-container { margin-top: 30px; }
.search-placeholder { color: #666; font-style: italic; text-align: center; padding: 30px; font-size: 13px; }

/* STYLE DES RÉSULTATS NEWS / CVE */
.search-result-item { background: #161616; border-left: 4px solid #444; padding: 20px; margin-bottom: 15px; border-radius: 0 4px 4px 0; }
.search-result-item.Critical { border-left-color: #ff003c; }
.search-result-item.High { border-left-color: #ff8800; }
.res-id { color: #D4FF00; font-weight: bold; background: rgba(212,255,0,0.1); padding: 2px 8px; border-radius: 3px; font-size: 12px; }
.res-title { color: #fff; font-size: 17px; margin: 10px 0; border-bottom: 1px solid #222; padding-bottom: 10px; }

/* BLOC IA DANS LES RÉSULTATS */
.res-ai-box { background: rgba(0,242,255,0.03); border: 1px dashed #333; padding: 12px; margin-top: 10px; border-radius: 4px; }
.ai-lbl { color: #00f2ff; font-size: 9px; text-transform: uppercase; font-weight: bold; display: block; margin-bottom: 5px; }
.ai-val { color: #ccc; font-size: 12px; line-height: 1.4; }

/* STYLE DES RÉSULTATS INTEL (IP/DOMAINE) */
.intel-card { background: #111; border: 1px solid #333; padding: 25px; border-radius: 8px; }
.intel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.intel-ip { font-size: 24px; color: #fff; font-weight: bold; }
.intel-risk-badge { padding: 5px 12px; border-radius: 4px; font-weight: bold; }
.risk-low { background: #d4edda; color: #155724; }
.risk-high { background: #ff003c; color: #fff; box-shadow: 0 0 15px #ff003c; }

.intel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.intel-row { border-bottom: 1px solid #222; padding-bottom: 8px; }
.intel-lbl { color: #666; font-size: 10px; text-transform: uppercase; display: block; }
.intel-val { color: #eee; font-size: 13px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.search-result-item .res-link {
    color: #888;
    text-decoration: none;
    font-size: 11px;
    border: 1px solid #333;
    padding: 5px 12px;
    border-radius: 4px;
    transition: 0.3s;
}
.search-result-item .res-link:hover {
    background: #D4FF00;
    color: #000;
    border-color: #D4FF00;
}

.bl-badge {
    display: inline-block;
    background: #ff003c;
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    margin-right: 8px;
    margin-bottom: 5px;
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.4);
}

.intel-risk-badge { padding: 6px 15px; border-radius: 4px; font-weight: bold; font-size: 13px; text-transform: uppercase; }
.risk-low { background: rgba(0, 255, 65, 0.1); color: #00ff41; border: 1px solid #00ff41; }
.risk-warn { background: #ff8800; color: #000; }
.risk-high { background: #ff003c; color: #fff; box-shadow: 0 0 20px #ff003c; }

/* ================================================== */
/*          CORRÉLATION CVE DANS LE RAPPORT IP         */
/* ================================================== */

.cve-correlation-section {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed #444;
}

.correlation-title {
    color: #00f2ff; /* Bleu cyan "IA" */
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cve-link-item {
    display: block;
    text-decoration: none;
    margin-bottom: 8px;
    background: rgba(0, 242, 255, 0.05); /* Fond très léger cyan */
    border: 1px solid #2a2a2a;
    padding: 12px;
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
}

.cve-link-item:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: #00f2ff;
}

.cve-link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: monospace;
    font-size: 11px;
}

.cve-link-header span:first-child {
    font-weight: bold;
}

.cve-link-header span:last-child {
    color: #666;
}

.cve-link-title {
    color: #aaa;
    font-size: 12px;
    margin-top: 5px;
    line-height: 1.4;
}

/* Bouton Signalement AbuseIPDB */
.uab-btn-report-abuse {
    background: rgba(255, 0, 60, 0.05);
    color: #ff003c;
    border: 1px solid #ff003c;
    padding: 10px 15px;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.uab-btn-report-abuse:hover:not(:disabled) {
    background: #ff003c;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.4);
}

.uab-btn-report-abuse:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}


/* --- SECTION MTR / TRACEROUTE --- */
.mtr-section {
    margin-top: 25px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid #222;
}

.section-title {
    color: #888;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
}

.mtr-path {
    display: flex;
    flex-direction: column;
}

.mtr-hop {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.mtr-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20px;
}

.mtr-node {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    z-index: 2;
}

.mtr-line {
    flex: 1;
    width: 2px;
    background: #222;
    margin: 4px 0;
}

.mtr-details {
    padding-bottom: 15px;
}

.mtr-ip {
    font-family: monospace;
    font-size: 13px;
    font-weight: bold;
}

.mtr-info {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.mitm-banner {
    background: rgba(255, 0, 60, 0.1);
    color: #ff003c;
    border: 1px solid #ff003c;
    padding: 10px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    border-radius: 4px;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { opacity: 0.8; }
    50% { opacity: 1; box-shadow: 0 0 10px rgba(255, 0, 60, 0.2); }
    100% { opacity: 0.8; }
}

.intel-sub {
    color: #666;
    font-family: monospace;
    font-size: 11px;
    margin-top: 2px;
}

/* Terminal de chargement */
.scan-steps-list {
    list-style: none;
    padding: 20px;
    background: #000;
    border: 1px solid #222;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: #666;
    margin-bottom: 20px;
}
.scan-steps-list li { margin-bottom: 8px; animation: fadeIn 0.3s forwards; }


/* Tags de transit */
.hop-tag {
    background: rgba(255, 0, 60, 0.1);
    border: 1px solid #ff003c;
    color: #ff003c;
    padding: 1px 4px;
    font-size: 8px;
    border-radius: 2px;
    text-transform: uppercase;
    font-weight: bold;
}

.port-badge {
    display: inline-block;
    background: rgba(0, 242, 255, 0.1);
    color: #00f2ff;
    border: 1px solid #00f2ff;
    padding: 3px 8px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 0 0 rgba(0, 242, 255, 0);
}

.port-badge:hover {
    background: #00f2ff;
    color: #000;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.8);
    transform: translateY(-2px);
    font-weight: bold;
}

/* Animation de chargement finale */
.finalizing-step { color: #D4FF00; animation: blink-cyan 1.5s infinite; }


/* ================================================== */
/*          EFFET HOVER SUR LES MENACES DÉTECTÉES      */
/* ================================================== */

.tag-risk, .hop-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: help; /* Indique qu'on survole une information technique */
    margin: 2px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

/* Animation de base au survol */
.tag-risk:hover, .hop-tag:hover {
    transform: translateY(-2px) scale(1.08);
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Effet de "balayage" lumineux lors du survol (Glitch subtil) */
.tag-risk:after, .hop-tag:after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.tag-risk:hover:after, .hop-tag:hover:after {
    left: 150%;
}

/* --- VARIANTES DE COULEURS AU SURVOL --- */

/* Hover pour les menaces CRITIQUES (Rouge) */
.tag-risk[style*="#ff003c"]:hover, 
.hop-tag[style*="#ff003c"]:hover {
    background: #ff003c !important; /* Remplissage plein au survol */
    color: #fff !important;
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.8);
    border-color: #fff !important;
}

/* Hover pour les menaces SUSPECTES (Orange) */
.tag-risk[style*="#ff8800"]:hover, 
.hop-tag[style*="#ff8800"]:hover {
    background: #ff8800 !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.8);
    border-color: #fff !important;
}

/* Hover pour les infos INFRA / IA (Cyan) */
.tag-risk[style*="#00f2ff"]:hover, 
.hop-tag[style*="#00f2ff"]:hover {
    background: #00f2ff !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.8);
    border-color: #fff !important;
}

/* Hover pour les infos NEUTRES (Vert Néon) */
.tag-risk[style*="#D4FF00"]:hover, 
.hop-tag[style*="#D4FF00"]:hover {
    background: #D4FF00 !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(212, 255, 0, 0.8);
    border-color: #fff !important;
}

/* --- AJUSTEMENT POUR LE MTR --- */
.mtr-hop:hover .mtr-node {
    transform: scale(1.5);
    box-shadow: 0 0 15px currentColor;
    transition: all 0.2s ease;
}

.fadeIn.error-box {
    animation: fadeIn 0.5s ease-out forwards;
    box-shadow: 0 0 30px rgba(255, 0, 60, 0.2);
}

/* ================================================== */
/*             RESPONSIVE SEARCH & INTEL              */
/* ================================================== */

@media (max-width: 768px) {
    .cyber-search-wrapper {
        padding: 20px;
        margin: 20px 10px;
    }

    /* On passe la grille d'infos IP/Domaine sur une seule colonne */
    .intel-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .intel-ip {
        font-size: 18px;
    }

    .search-result-item {
        padding: 15px;
    }

    .res-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .search-header {
        font-size: 11px;
    }

    .terminal-prefix {
        display: none; /* On cache le préfixe pour gagner de la place */
    }

    /* Le groupe de saisie passe en vertical */
    .search-input-group {
        flex-direction: column;
        border-bottom: none;
    }

    #cyber-search-field {
        font-size: 16px;
        padding: 12px;
        background: #000;
        border-bottom: 2px solid #333;
        margin-bottom: 10px;
    }

    #cyber-search-btn {
        width: 100%;
        padding: 15px;
    }

    /* Ajustement de l'en-tête du rapport d'intelligence */
    .intel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .intel-risk-badge {
        width: 100%;
        text-align: center;
    }

    .intel-card {
        padding: 15px;
    }

    /* Ajustement des badges de Blacklist */
    .bl-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .res-ai-box {
        padding: 10px;
    }

    .ai-val {
        font-size: 11px;
    }
}