@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');
/* =================================================================================
 * FICHIER : web/public/css/style.css
 * OBJECTIF : Styles centralisés pour les laboratoires SQLi, XSS et autres.
 * DESIGN : Sombre, Cyber, Sémantique et Glassmorphism.
 * ================================================================================= */

:root {
    --bs-body-bg: #0f172a; 
    --bs-primary-sqli: #3b82f6; /* Bleu pour SQLi */
    --bs-primary-xss: #f59e0b;  /* Orange pour XSS */
    --bs-body-color: #e2e8f0;
    --card-bg: rgba(30, 41, 59, 0.95);
    --terminal-green: #10b981;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* 1. MISE EN PAGE GÉNÉRALE ET SÉMANTIQUE */
body {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--bs-body-bg); 
    color: var(--bs-body-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-image: url('../img/hacker.png');
}

/* Conteneur principal z-index */
main.container {
    position: relative;
    z-index: 10;
}

/* Cas spécifique page d'accueil */
.card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}
.card-link:hover .main-card {
    border-color: var(--bs-primary-sqli);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}
.main-card {
    transition: all 0.3s ease;
    height: 100%;
}
/* Calque général sur l'image de fond */
.overlay {
    background-color: rgba(15, 23, 42, 0.65);
    min-height: 100vh;
    padding: 40px 0;
}

/* 2. EN-TÊTE (HEADER GLASSMORPHISM) */
.header-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    display: inline-block;
    margin-bottom: 3rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Styles typographiques */
.lead {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.6;
}

h1, h2, h3 {
    letter-spacing: -0.025em;
}

/* 3. COMPOSANTS DE CARTES (ARTICLE / SECTION) */
.main-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* 4. STYLES SQL INJECTION */
.sql-box {
    background: #000;
    color: var(--terminal-green);
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    border-left: 4px solid var(--bs-primary-sqli);
    white-space: pre-wrap;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.table-custom {
    --bs-table-bg: transparent;
    --bs-table-color: #e2e8f0;
    --bs-table-border-color: rgba(255, 255, 255, 0.1);
}

.table-custom tbody tr:nth-child(odd) td {
    color: #7f858a;
}

/* 5. STYLES XSS ET COMMENTAIRES */
.comment-item {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--bs-primary-xss);
    transition: all 0.2s ease-in-out;
    border-radius: 0 8px 8px 0;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.vuln-badge {
    font-size: 0.7rem;
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    vertical-align: middle;
    display: inline-block;
}

/* Style pour l'élément <aside> des payloads */
aside.bg-dark {
    background-color: #020617 !important;
}

aside code {
    color: #f472b6; /* Rose pour les codes d'attaque */
    font-size: 0.9em;
}

/* 6. UTILITAIRES ET FOOTER */
.text-terminal {
    color: var(--terminal-green);
}

.italic {
    font-style: italic;
}

footer.small {
    opacity: 0.6;
    letter-spacing: 0.5px;
}

.my-subtitle {
    opacity: 0.60 !important;
}

.form-text {
    color: #E2E8F0;
    opacity: 0.60 !important;
}

/* Brutforce */

.brute-machine {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 40px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    border: 2px solid rgba(16, 185, 129, 0.2);
    margin: 20px 0;
}

.gear-wrapper {
    position: relative;
    width: 80px;
    height: 120px;
    background: #020617;
    border: 3px solid #1e293b;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.gear-wrapper::before, .gear-wrapper::after {
    content: '';
    position: absolute;
    left: 0; right: 0; height: 30%;
    z-index: 2;
    pointer-events: none;
}
.gear-wrapper::before { top: 0; background: linear-gradient(to bottom, #020617, transparent); }
.gear-wrapper::after { bottom: 0; background: linear-gradient(to top, #020617, transparent); }

.character-reel {
    font-family: 'Courier New', monospace;
    font-size: 3rem;
    font-weight: bold;
    color: var(--bs-primary-brute);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.05s linear;
}

.char-unit {
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 60px;
}

#progress {
    height: 5px;
}

/* Adaptation pour mobile */
@media (max-width: 768px) {
    .header-glass {
        padding: 1rem;
        width: 100%;
    }
    .lead {
        font-size: 1.1rem;
    }
}