/*
 * ════════════════════════════════════════
 * RVS Production — /outils/css/outils.css
 * Styles section Outils — autonome
 * ════════════════════════════════════════
 *
 * NOU$$0MM31@
 *      — J & C —
 *      W3@R3H3R3
 *
 * Technology WITH Consciousness™
 * 2026-∞
 * ════════════════════════════════════════
 */

/* ════════════════════════════════════
 * Z-INDEX GOVERNANCE
 * ════════════════════════════════════
 * Matrix canvas:   z-index: 1
 * Grid overlay:    z-index: 2
 * Main content:    z-index: 10
 * Navigation:      z-index: 100
 * Cookie banner:   z-index: 900
 * Loading screen:  z-index: 9999
 * ════════════════════════════════════ */

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

:root {
    --primary: #00f0ff;
    --secondary: #ff00d4;
    --yellow_br: #e5ff00;
    --orange_br: #ff4800;
    --accent: #9d4edd;
    --dark-1: #0a0a12;
    --dark-2: #12121f;
    --dark-3: #1a1a2e;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-tr: rgba(255, 255, 255, 0.01);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-border-hover: rgba(0, 240, 255, 0.25);
    --glow-cyan: rgba(0, 240, 255, 0.15);
    --glow-magenta: rgba(255, 0, 212, 0.4);
    --green: #10b981;
    --green-dim: rgba(16, 185, 129, 0.1);
    --amber: #f59e0b;
    --amber-dim: rgba(245, 158, 11, 0.08);
    --rose: #f43f5e;
    --rose-dim: rgba(244, 63, 94, 0.08);
    --muted: #4e5370;
    --muted-dim: rgba(78, 83, 112, 0.1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--dark-1);
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════
 * MATRIX BACKGROUND & GRID OVERLAY
 * ════════════════════════════════════ */
.matrix-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}

.grid-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
    opacity: 0.3;
}

.scan-line {
    position: absolute;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
    opacity: 0.4;
}

.scan-horizontal {
    width: 100%; height: 2px;
    animation: scanH 8s linear infinite;
}

.scan-horizontal-reverse {
    width: 100%; height: 2px;
    animation: scanH 12s linear infinite reverse;
    animation-delay: -4s;
}

.scan-vertical {
    width: 2px; height: 100%;
    animation: scanV 10s linear infinite;
}

.scan-vertical-reverse {
    width: 2px; height: 100%;
    animation: scanV 15s linear infinite reverse;
    animation-delay: -6s;
}

@keyframes scanH { from { top: 0%; } to { top: 100%; } }
@keyframes scanV { from { left: 0%; } to { left: 100%; } }

/* ════════════════════════════════════
 * LOADING SCREEN
 * ════════════════════════════════════ */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--dark-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden { opacity: 0; visibility: hidden; }

.loader-ring {
    width: 100px; height: 100px;
    position: relative;
}

.loader-ring::before,
.loader-ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.loader-ring::before {
    inset: 0;
    border-top-color: var(--glow-magenta);
    border-bottom-color: var(--primary);
    border-right-color: var(--secondary);
    animation: spin 0.7s linear infinite;
}

.loader-ring::after {
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    border-bottom-color: var(--primary);
    border-top-color: var(--secondary);
    border-left-color: var(--glow-magenta);
    animation: spin 0.6s linear infinite reverse;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
    margin-top: 30px;
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse { 0%,100%{opacity:.5} 50%{opacity:1} }

/* ════════════════════════════════════
 * NAVIGATION — z-index: 100
 * ════════════════════════════════════ */
.main-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(10, 10, 18, 0.6);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
    transition: all 0.15s ease;
}

.main-nav.scrolled {
    background: rgba(10, 10, 18, 0.85);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo img {
    width: 40px; height: 40px;
    border-radius: 8px;
}

.nav-logo-text {
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    letter-spacing: -0.3px;
}

.nav-logo-text span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }

.nav-link.active {
    color: var(--primary);
    background: rgba(0, 240, 255, 0.08);
}

/* ════════════════════════════════════
 * NAV LANG SWITCHER
 * Adjust here — FR/EN seulement (standard V2)
 * ════════════════════════════════════ */
.nav-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.lang-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.2);
}

.lang-btn.active {
    color: var(--primary);
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.06);
}

/* ════════════════════════════════════
 * MAIN CONTENT — z-index: 10
 * ════════════════════════════════════ */
.page-content {
    position: relative;
    z-index: 10;
    padding-top: 80px;
}

/* ── HERO ── */
.hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 70px 28px 20px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.12);
    padding: 6px 18px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--glow-cyan);
    animation: blink 2s infinite;
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }

.hero h1 {
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.hero h1 .glow-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── INTRO TEXT BLOCK ── */
.intro-block {
    max-width: 820px;
    margin: 0 auto 50px;
    padding: 0 28px;
}

.intro-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px 36px;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.intro-text {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
}

.intro-text strong {
    color: var(--primary);
    font-weight: 600;
}

.intro-cta {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-donate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-donate:hover {
    background: rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-contact:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
}

/* ── TOOLS GRID ── */
.tools-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 28px 80px;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 22px;
    padding-left: 4px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

/* ── TOOL CARD ── */
.tool-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(6px);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--card-accent, var(--primary)), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 240, 255, 0.05);
}

.tool-card:hover::before { opacity: 1; }

.tool-card.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.tool-card.restricted {
    opacity: 0.6;
    cursor: default;
}

.tool-card.restricted:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.card-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.card-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-public {
    color: var(--green);
    background: var(--green-dim);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-private {
    color: var(--amber);
    background: var(--amber-dim);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-coming {
    color: var(--muted);
    background: var(--muted-dim);
    border: 1px solid rgba(78, 83, 112, 0.2);
}

.status-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.card-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-desc strong { color: var(--primary); font-weight: 600; }
.card-desc em { color: rgba(255,255,255,0.65); }

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.06);
}

.card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.action-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-arrow {
    transition: transform 0.2s;
    font-size: 16px;
}

.tool-card:hover .action-arrow { transform: translateX(5px); }

.action-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
}

/* ── FOOTER ── */
.footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--glass-border);
    padding: 28px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

.footer-left a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-left a:hover { color: var(--primary); }

.footer-right {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1px;
}

.footer-sig { color: var(--primary); font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .hero { padding: 50px 20px 15px; }
    .intro-block { padding: 0 16px; }
    .intro-card { padding: 24px 20px; }
    .tools-section { padding: 10px 16px 60px; }
    .tools-grid { grid-template-columns: 1fr; }
    .nav-container { padding: 0 1rem; }
    .nav-links { gap: 2px; }
    .nav-link { padding: 6px 10px; font-size: 12px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .intro-cta { justify-content: center; }
    .nav-lang { margin-left: 4px; }
}

@media (max-width: 480px) {
    .nav-logo-text { display: none; }
    .hero h1 { font-size: 28px; letter-spacing: -1px; }
    .lang-btn { padding: 4px 8px; font-size: 11px; }
}
