/* assets/style.css - V3.0 (unifie avec report-style.php — systeme --rm-*) */
:root {
    /* Couleurs — fusion RoastMyUrl + Kachouri */
    --rm-bg: #000000;
    --rm-surface: #0a0a0a;
    --rm-surface-light: #131313;
    --rm-surface-soft: #0d0d0d;
    --rm-border: #222222;
    --rm-border-soft: rgba(255,255,255,0.05);
    --rm-red: #FF2020;
    --rm-green: #2ea043;
    --rm-yellow: #d29922;
    --rm-blue: #3b82f6;
    --rm-white: #ffffff;
    --rm-text: #e6e6e6;
    --rm-text-muted: #888888;
    --rm-text-soft: #999999;
    --rm-radius: 4px;
    --rm-radius-sm: 2px;
    --rm-cta-bg: linear-gradient(to right, #FF2020, #cc1a1a);
    --rm-cta-border: #a01515;
    --rm-cta-hover: #b81818;
    --rm-glow-red: 0 0 20px rgba(255,32,32,0.12);
    --rm-glow-green: 0 0 15px rgba(46,160,67,0.12);
    --rm-border-hard: #333333;
    --rm-font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --rm-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --rm-font-sans: var(--rm-font-ui);
    --rm-wrap: 1100px;

    /* Aliases pour compatibilite (ancien systeme, a supprimer progressivement) */
    --bg-body: var(--rm-bg);
    --bg-card: var(--rm-surface);
    --text-main: var(--rm-text);
    --text-muted: var(--rm-text-muted);
    --roast-red: var(--rm-red);
    --neon-green: var(--rm-green);
    --neon-orange: var(--rm-yellow);
    --border: var(--rm-border);
    --font-sans: var(--rm-font-ui);
    --font-mono: var(--rm-font-mono);
}

/* ----- LIGHT MODE ----- */
:root[data-theme="light"] {
    --rm-bg: #fafafa;
    --rm-surface: #f0f0f0;
    --rm-surface-light: #e8e8e8;
    --rm-surface-soft: #eeeeee;
    --rm-border: #d0d0d0;
    --rm-border-soft: rgba(0,0,0,0.06);
    --rm-text: #111111;
    --rm-text-muted: #555555;
    --rm-text-soft: #666666;
    --rm-white: #ffffff;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --rm-bg: #ffffff;
        --rm-surface: #f6f8fa;
        --rm-surface-light: #eef1f5;
        --rm-surface-soft: #f0f3f6;
        --rm-border: #d0d7de;
        --rm-border-soft: rgba(0,0,0,0.06);
        --rm-text: #1f2328;
        --rm-text-muted: #656d76;
        --rm-text-soft: #6e7781;
    }
}

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

body {
    background-color: var(--rm-bg);
    color: var(--rm-text);
    font-family: var(--rm-font-ui);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    padding-bottom: 0;
}

/* === TERMINAL ATMOSPHERE === */

/* 1. Noise grain — texture subtile sur tout le body */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* 2. CRT scanlines — lignes horizontales statiques tres subtiles */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.08),
        rgba(0, 0, 0, 0.08) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 0;
}

/* 3. Scanline mobile — barre qui descend doucement (element HTML) */
.rm-scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,32,32,0.06), transparent);
    z-index: 0;
    animation: rm-scanline 8s linear infinite;
    pointer-events: none;
}

@keyframes rm-scanline {
    0% { top: -1px; }
    100% { top: 100%; }
}

/* 4. Terminal font variable */
:root {
    --rm-font-terminal: 'VT323', 'Courier New', monospace;
}

/* 5. Terminal background animé — deux colonnes gauche/droite */
.rm-terminal-bg {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    font-family: var(--rm-font-terminal, 'VT323', monospace);
    font-size: 1.05rem;
    line-height: 2;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.04);
    width: 350px;
    height: 100vh;
    padding: 20px;
    filter: blur(0.6px);
}

/* Gauche : part du bas, texte vert glow */
.rm-terminal-left {
    left: 20px;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: rgba(46, 160, 67, 0.18);
    text-shadow: 0 0 15px rgba(46, 160, 67, 0.3), 0 0 30px rgba(46, 160, 67, 0.12);
    mask-image: linear-gradient(to top, black 15%, transparent 80%);
    -webkit-mask-image: linear-gradient(to top, black 15%, transparent 80%);
}

/* Droite : part du haut, texte rouge glow */
.rm-terminal-right {
    right: 20px;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: right;
    color: rgba(255, 32, 32, 0.15);
    text-shadow: 0 0 15px rgba(255, 32, 32, 0.25), 0 0 30px rgba(255, 32, 32, 0.1);
    mask-image: linear-gradient(to bottom, black 15%, transparent 80%);
    -webkit-mask-image: linear-gradient(to bottom, black 15%, transparent 80%);
}

:root[data-theme="light"] .rm-terminal-left {
    color: rgba(46, 160, 67, 0.14);
    text-shadow: 0 0 12px rgba(46, 160, 67, 0.18);
}
:root[data-theme="light"] .rm-terminal-right {
    color: rgba(255, 32, 32, 0.12);
    text-shadow: 0 0 12px rgba(255, 32, 32, 0.15);
}

/* Responsive : reduire puis masquer */
@media (max-width: 1200px) {
    .rm-terminal-bg { width: 200px; font-size: 0.8rem; }
}
@media (max-width: 900px) {
    .rm-terminal-bg { display: none; }
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; padding-top: 160px; position: relative; z-index: 1; }

/* --- HEADER / NAV --- */
/* Ancien nav generique supprime — le header pill est dans header.php <style nonce> */

/* --- HERO SECTION --- */
.tf-header { text-align: center; padding: 60px 0 40px; }
.header-badge {
    display: inline-block; background: var(--rm-surface-light); color: var(--rm-green);
    font-family: var(--rm-font-mono); font-size: 0.75rem; padding: 4px 8px;
    border-radius: 4px; margin-bottom: 15px; border: 1px solid rgba(34, 197, 94, 0.2);
}
h1 { font-size: 3.5rem; line-height: 1.1; font-weight: 900; letter-spacing: -1px; margin-bottom: 10px; }
.text-gradient {
    background: linear-gradient(135deg, #ef4444, #f97316);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.tf-subtitle { color: var(--rm-text-muted); font-size: 1.2rem; }

/* --- NOUVEAU STYLE FORMULAIRE (BOX) --- */
.scan-hero-box {
    background: var(--rm-surface);
    border: 1px solid var(--rm-border);
    border-top: 1px solid var(--rm-border-soft);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    padding: 30px;
    border-radius: 16px;
    max-width: 650px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; gap: 15px;
}

.scan-hero-box::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 200px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--rm-red), transparent);
    box-shadow: 0 0 15px var(--rm-red);
}

.input-wrapper { position: relative; }
.input-icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: var(--rm-text-muted); font-size: 1.2rem;
}

input[type="text"] {
    width: 100%;
    padding: 16px 16px 16px 45px;
    background: var(--rm-surface-light);
    border: 1px solid var(--rm-border);
    color: var(--rm-text);
    border-radius: 8px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.2s;
}
input[type="text"]:focus {
    border-color: var(--rm-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.btn-main {
    background: var(--rm-cta-bg, linear-gradient(to right, #FF2020, #cc1a1a)); color: #fff; border: 1px solid var(--rm-cta-border, #a01515); padding: 15px;
    border-radius: 8px; font-weight: 800; font-size: 1rem; cursor: pointer;
    font-family: var(--rm-font-mono); letter-spacing: 1px;
    transition: transform 0.1s, box-shadow 0.2s;
}
.btn-main:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(255, 32, 32, 0.4); background: var(--rm-cta-hover, #b81818); }
.checkbox-group { text-align: center; font-size: 0.8rem; color: var(--rm-text-muted); }

/* --- GRID RESULTATS --- */
.tf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 50px; }
@media (max-width: 768px) { 
    .tf-grid { grid-template-columns: 1fr; } 
    h1 { font-size: 2.5rem; }
}

.column-title {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 2px solid var(--rm-border); padding-bottom: 10px; margin-bottom: 10px;
}
.col-top .column-title { border-color: var(--rm-green); }
.col-flop .column-title { border-color: var(--rm-red); border-bottom-style: dashed; }

.count-badge { 
    background: var(--rm-border); padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; font-family: var(--rm-font-mono); 
}
.col-desc { font-size: 0.9rem; color: var(--rm-text-muted); margin-bottom: 20px; }

/* CARTES */
.site-card {
    background: var(--rm-surface); border: 1px solid var(--rm-border);
    padding: 12px 15px; margin-bottom: 10px; border-radius: 6px;
    display: flex; justify-content: space-between; align-items: center;
    position: relative; overflow: hidden;
}
.site-card:hover { border-color: var(--rm-text-muted); }
.site-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.site-card.is-top::before { background: var(--rm-green); }
.site-card.is-flop::before { background: var(--rm-red); }

.site-info h3 { font-size: 1rem; margin: 0; font-weight: 600; }
.site-date { font-size: 0.75rem; color: var(--rm-text-muted); font-family: var(--rm-font-mono); }
.score-pill { font-family: var(--rm-font-mono); font-weight: bold; font-size: 1rem; }
.is-top .score-pill { color: var(--rm-green); }
.is-flop .score-pill { color: var(--rm-red); }

/* --- PAGE RAPPORT (Header & Score) --- */
.report-header {
    background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 70%);
    padding: 60px 0;
    border-bottom: 1px solid var(--rm-border);
    text-align: center;
    margin-bottom: 40px;
}

.score-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; margin-top: 30px;
}

.big-score {
    width: 140px; height: 140px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem; font-weight: 800; font-family: var(--rm-font-mono);
    border: 8px solid currentColor;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 30px currentColor;
    position: relative;
}

.verdict-box {
    text-align: center; max-width: 700px; margin: 0 auto; padding: 20px;
    background: rgba(255,255,255,0.02); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05);
}

/* --- MEGA FOOTER --- */
.mega-footer {
    border-top: 1px solid var(--rm-border); margin-top: 80px; padding-top: 60px; padding-bottom: 40px;
    background: var(--rm-bg);
}
.eco-intro { margin-bottom: 40px; max-width: 600px; }
.eco-intro h4 { font-size: 1.2rem; color: var(--rm-text); margin-bottom: 10px; }
.eco-intro p { color: var(--rm-text-muted); font-size: 0.95rem; }

.eco-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.eco-col h5 {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--rm-text-muted); margin-bottom: 20px; border-bottom: 1px solid var(--rm-border);
    padding-bottom: 10px;
}
.eco-col ul li { margin-bottom: 12px; }
.eco-col a { display: block; line-height: 1.3; }
.eco-col a strong { color: var(--rm-text); font-size: 0.95rem; display: block; }
.eco-col a span { color: var(--rm-text-muted); font-size: 0.8rem; transition: color 0.2s; }
.eco-col a:hover span { color: var(--rm-red); }

.footer-bottom {
    margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--rm-border);
    display: flex; justify-content: space-between; color: var(--rm-text-muted); font-size: 0.85rem;
}
.legal-links a:hover { color: var(--rm-text); }

/* KPI Grid & Cards Report */
.kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px;
}
.kpi-card { background: var(--rm-surface); border: 1px solid var(--rm-border); padding: 20px; border-radius: 8px; text-align: center; }
.kpi-card .label { display: block; color: var(--rm-text-muted); font-size: 0.9rem; margin-bottom: 5px; text-transform: uppercase; }
.kpi-card .value { font-size: 1.5rem; font-weight: bold; color: var(--rm-text); }

.report-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
@media (max-width: 900px) { .report-grid { grid-template-columns: 1fr; } }
.card { background: var(--rm-surface); border: 1px solid var(--rm-border); border-radius: 8px; padding: 25px; margin-bottom: 30px; }
.card h2 { margin-bottom: 20px; border-bottom: 1px solid var(--rm-border); padding-bottom: 10px; font-size: 1.3rem; }

/* UTILS */
.btn-outline {
    background: transparent; border: 1px solid var(--rm-border); color: var(--rm-text);
    padding: 8px 16px; border-radius: 6px; cursor: pointer; margin: 0 5px; transition: 0.2s;
}
.btn-outline:hover { border-color: var(--rm-red); color: var(--rm-red); }
.audit-row { display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }
.badge.critical { background: rgba(248,81,73,0.2); color: var(--rm-red); }
.badge.high { background: rgba(210,153,34,0.2); color: var(--rm-yellow); }
.badge.warning { background: rgba(219,171,9,0.2); color: var(--rm-yellow); }

/* AJOUTS POUR LISTE IMPACT PROPRE */
.impact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.impact-list li {
    display: flex;
    align-items: flex-start; /* Important: aligne en haut si 2 lignes */
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    line-height: 1.4;
}

.impact-list li span:last-child {
    margin-top: 3px; /* Petit ajustement pour centrer avec le badge visuellement */
    font-size: 0.95rem;
    color: var(--rm-text);
}

/* Badge plus compact */
.badge { 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    font-weight: 800; 
    text-transform: uppercase;
    white-space: nowrap; /* Empêche le badge de se casser */
    flex-shrink: 0; /* Empêche le badge de rétrécir */
}

/* .nav-content supprime — ancien header */

/* --- Bloc Final Path (Redirection Stratégique) --- */
.rm-final-path {
    margin-top: 60px;
    padding: 0 15px 40px;
}

.rm-final-path .rm-card-xl {
    background: var(--rm-surface);
    border: 2px solid var(--rm-border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

/* Grille Mobile-First : 1 colonne par défaut, 2 colonnes sur tablette */
.rm-path-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 30px;
}

@media (min-width: 500px) {
    .rm-path-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
    .rm-path-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

.path-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--rm-surface);
    border: 1px solid var(--rm-border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
}

.path-item .path-icon { font-size: 1.8rem; }

.path-item strong {
    display: block;
    color: var(--rm-text);
    font-size: 1rem;
    margin-bottom: 2px;
}

.path-item span {
    color: var(--rm-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Effets de survol */
.path-item:hover {
    border-color: var(--brand-green, #00ff88);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.1);
}

.path-item.special-contact { border-color: var(--rm-red); }
.path-item.special-contact:hover { box-shadow: 0 10px 20px rgba(255, 77, 77, 0.1); }