/*
TTP-Lab Dashboard Stylesheet
Copyright © 2025 Mohammed Bencheikh - Be One And Move Academy
EDUCATIONAL USE ONLY
*/

:root {
    /* Palette de couleurs Be One And Move */
    --gold: #FFD700;
    --gold-dark: #FFC700;
    --gold-light: #FFE44D;
    --dark-bg: #1E1E1E;
    --dark-secondary: #2A2A2A;
    --dark-tertiary: #2D2D2D;
    --text-primary: #EAEAEA;
    --text-secondary: #AAAAAA;
    --text-muted: #666666;
    --accent-red: #FF3B30;
    --success-green: #4CAF50;
    --warning-orange: #FF9800;
    
    /* Typographie */
    --font-main: 'Calibri', 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-tertiary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== HEADER ===== */
.main-header {
    background: linear-gradient(90deg, var(--dark-secondary) 0%, #1a1a1a 100%);
    border-bottom: 3px solid var(--gold);
    padding: 20px 40px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo-container {
    flex-shrink: 0;
}

.academy-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    transition: transform 0.3s ease;
}

.academy-logo:hover {
    transform: scale(1.05);
}

.header-title {
    flex-grow: 1;
}

.header-title h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1.1em;
    color: var(--text-secondary);
    font-weight: 300;
}

.header-badge {
    flex-shrink: 0;
}

.badge-text {
    background: var(--accent-red);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(255, 59, 48, 0.3);
}

/* ===== WARNING BANNER ===== */
.warning-banner {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 152, 0, 0.1) 100%);
    border-left: 4px solid var(--warning-orange);
    padding: 15px 40px;
}

.warning-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.warning-icon {
    font-size: 1.5em;
}

.warning-text {
    font-size: 0.95em;
    color: var(--text-primary);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== SECTIONS ===== */
section {
    background: var(--dark-secondary);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.section-title {
    font-size: 2em;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 10px;
}

.title-icon {
    font-size: 1.2em;
}

/* ===== CONFIGURATION ===== */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.config-card {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
}

.config-card:hover {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.config-card label {
    display: block;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-card input {
    width: 100%;
    padding: 12px;
    background: var(--dark-tertiary);
    border: 2px solid rgba(255, 215, 0, 0.3);
    color: var(--text-primary);
    border-radius: 5px;
    font-size: 1em;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

.config-card input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ===== BUTTONS ===== */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--dark-bg);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.btn-execute {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-execute:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.btn-secondary {
    background: var(--dark-tertiary);
    color: var(--gold);
    border: 2px solid var(--gold);
}

.btn-secondary:hover {
    background: var(--gold);
    color: var(--dark-bg);
}

.btn-link {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 8px 15px;
    font-size: 0.9em;
}

.btn-link:hover {
    background: rgba(255, 215, 0, 0.1);
}

/* ===== ATTACK CHAIN VISUAL ===== */
.attack-chain-visual {
    margin-bottom: 30px;
    text-align: center;
}

.chain-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* ===== PHASES GRID ===== */
.phases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.phase-card {
    background: var(--dark-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.1);
}

.phase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
    border-color: var(--gold);
}

.phase-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 215, 0, 0.05);
}

.phase-icon {
    font-size: 2em;
}

.phase-info {
    flex-grow: 1;
}

.phase-name {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 5px;
}

.phase-tactic {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.phase-status {
    flex-shrink: 0;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: rgba(170, 170, 170, 0.2);
    color: var(--text-secondary);
}

.status-badge.running {
    background: rgba(255, 152, 0, 0.2);
    color: var(--warning-orange);
    animation: pulse 1.5s infinite;
}

.status-badge.success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-green);
}

.status-badge.error {
    background: rgba(255, 59, 48, 0.2);
    color: var(--accent-red);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.phase-body {
    padding: 20px;
}

.mitre-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.mitre-badge {
    background: var(--gold);
    color: var(--dark-bg);
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.85em;
}

.technique-name {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.phase-description {
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.phase-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== RESULTS ===== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.result-panel {
    background: var(--dark-bg);
    border-radius: 8px;
    padding: 20px;
    border: 2px solid rgba(255, 215, 0, 0.2);
}

.panel-title {
    color: var(--gold);
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

.console-output {
    background: #0a0a0a;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 5px;
    padding: 15px;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #00ff00;
    line-height: 1.5;
    margin-bottom: 15px;
}

.console-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.console-output::-webkit-scrollbar {
    width: 8px;
}

.console-output::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.console-output::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

/* ===== TIMELINE ===== */
.timeline-container {
    background: var(--dark-bg);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--gold);
}

.timeline-placeholder {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 40px;
}

.timeline-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    margin-bottom: 15px;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-time {
    color: var(--gold);
    font-size: 0.85em;
    font-weight: 600;
}

.timeline-phase {
    color: var(--text-primary);
    font-weight: 700;
    margin: 5px 0;
}

.timeline-technique {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* ===== MITRE MATRIX ===== */
.mitre-matrix {
    background: var(--dark-bg);
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
}

/* ===== FOOTER ===== */
.main-footer {
    background: var(--dark-secondary);
    border-top: 3px solid var(--gold);
    padding: 30px 40px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.footer-text {
    flex-grow: 1;
}

.footer-text p {
    margin: 5px 0;
    color: var(--text-secondary);
}

.footer-text strong {
    color: var(--gold);
}

.footer-disclaimer {
    font-size: 0.85em;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-title h1 {
        font-size: 1.8em;
    }
    
    .phases-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}


/* ===== BOUTON RAPPORT ===== */
.btn-report {
    background: var(--dark-tertiary);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 8px 15px;
    font-size: 0.9em;
}

.btn-report:hover {
    background: var(--gold);
    color: var(--dark-bg);
}

/* ===== JOURNAL CENTRAL / IOC / MITRE ===== */
.panel-help {
    color: var(--text-secondary);
    font-size: 0.92em;
    margin: -5px 0 12px;
}

.log-legend,
.log-actions,
.log-summary-chips,
.log-meta,
.log-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.log-legend {
    margin-bottom: 12px;
}

.log-actions {
    margin-top: 10px;
}

.btn-export {
    background: rgba(78, 205, 196, 0.12);
    color: #4ECDC4;
    border: 2px solid #4ECDC4;
}

.btn-export:hover {
    background: #4ECDC4;
    color: var(--dark-bg);
}

.log-summary {
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 0.86em;
}

.log-summary:empty {
    display: none;
}

.log-summary strong {
    color: var(--gold);
    display: block;
    margin-bottom: 8px;
}

.central-log-output {
    color: var(--text-primary);
    min-height: 420px;
    max-height: 650px;
}

.log-entry {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 9px 0 11px;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-meta {
    margin-bottom: 5px;
    font-size: 0.78em;
}

.log-timestamp {
    color: var(--text-muted);
}

.log-source,
.log-phase,
.mitre-chip,
.tactic-chip,
.indicator-chip {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 700;
    line-height: 1.5;
}

.log-source {
    background: rgba(255,255,255,0.09);
    color: #DADADA;
}

.source-victim {
    background: rgba(76, 175, 80, 0.16);
    color: #86E08C;
}

.source-attacker,
.source-attacker-error {
    background: rgba(255, 107, 107, 0.16);
    color: #FF8B8B;
}

.source-dashboard {
    background: rgba(78, 205, 196, 0.16);
    color: #72DED7;
}

.log-phase {
    background: rgba(170, 150, 218, 0.18);
    color: #C8B5F4;
}

.mitre-chip {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold);
    border: 1px solid rgba(255, 215, 0, 0.35);
}

.tactic-chip {
    background: rgba(255, 152, 0, 0.12);
    color: #FFB74D;
}

.log-message {
    white-space: pre-wrap;
    word-break: break-word;
    color: #D8FFD8;
}

.log-indicators {
    margin-top: 6px;
}

.indicator-chip {
    font-size: 0.75em;
    border: 1px solid rgba(255,255,255,0.13);
    max-width: 100%;
    word-break: break-all;
}

.indicator-ip {
    background: rgba(33, 150, 243, 0.14);
    color: #64B5F6;
}

.indicator-file {
    background: rgba(255, 193, 7, 0.14);
    color: #FFD54F;
}

.indicator-command {
    background: rgba(239, 83, 80, 0.14);
    color: #EF9A9A;
}

.indicator-process {
    background: rgba(171, 71, 188, 0.14);
    color: #CE93D8;
}

.indicator-user,
.indicator-ioc {
    background: rgba(38, 198, 218, 0.14);
    color: #80DEEA;
}

.log-highlight-ip {
    color: #90CAF9;
    font-weight: 800;
    background: rgba(33, 150, 243, 0.12);
    padding: 0 2px;
    border-radius: 3px;
}

.log-highlight-file {
    color: #FFE082;
    font-weight: 800;
    background: rgba(255, 193, 7, 0.10);
    padding: 0 2px;
    border-radius: 3px;
}

.log-highlight-mitre {
    color: var(--gold);
    font-weight: 900;
}
