:root {
    --bg-deep: #020617;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #10b981; /* Vert Matrix/Cyber */
    --accent-glow: rgba(16, 185, 129, 0.4);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --card-bg: rgba(15, 23, 42, 0.6);
}

* { box-sizing: border-box; }

body { 
    margin: 0; padding: 0; 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-deep); 
    background-image: radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main); 
}

/* SCROLLBAR CUSTOM */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.dashboard-layout { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    top: 0; left: 0;
    z-index: 100;
}

.brand { 
    font-family: 'Fira Code', monospace; 
    color: var(--accent); 
    font-size: 1.4rem; 
    font-weight: bold; 
    margin-bottom: 40px; 
    text-shadow: 0 0 10px var(--accent-glow);
}

.menu-label { 
    font-size: 0.75rem; 
    color: var(--text-dim); 
    margin-top: 25px; 
    margin-bottom: 12px; 
    font-weight: 800; 
    letter-spacing: 1.5px; 
    text-transform: uppercase;
}

.sidebar a {
    display: flex; align-items: center; color: var(--text-main); text-decoration: none; padding: 10px 15px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 5px; transition: all 0.3s ease; border: 1px solid transparent;
}

.sidebar a:hover { background: rgba(16, 185, 129, 0.1); color: var(--accent); border-color: rgba(16, 185, 129, 0.2); transform: translateX(5px); }
.sidebar-footer { margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--glass-border); }

/* CONTENT */
.content { margin-left: 260px; padding: 50px; width: 100%; }
header h1 { font-size: 2.5rem; margin: 0 0 10px 0; background: linear-gradient(to right, #fff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.2; }
header p { color: var(--text-dim); font-size: 1.1rem; max-width: 700px; }

/* TOOLS GRID */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; margin-top: 50px; }

.tool-card {
    background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 25px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.tool-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); border-color: var(--accent); }
.tool-card:hover::before { transform: scaleX(1); }
.tool-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }

h3 { margin: 0 0 10px 0; font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.card-icon { font-size: 1.5rem; }
p { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 20px; line-height: 1.5; flex-grow: 1; }

/* INPUTS & BUTTONS */
.input-group { margin-bottom: 15px; }
input, textarea {
    width: 100%; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--glass-border); color: var(--accent); padding: 12px; border-radius: 8px; font-family: 'Fira Code', monospace; font-size: 0.95rem; transition: 0.2s; margin-bottom: 10px;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); background: rgba(0, 0, 0, 0.5); }

.input-row { display: flex; gap: 10px; }
.input-col { display: flex; flex-direction: column; gap: 10px; }

/* NOUVEAU : Ligne de boutons */
.btn-row { display: flex; gap: 10px; margin-top: auto; }

button {
    width: 100%; background: linear-gradient(135deg, var(--accent) 0%, #059669 100%); color: #fff; border: none; padding: 12px; border-radius: 8px; font-weight: 700; cursor: pointer; transition: all 0.2s; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem;
}
button:hover { filter: brightness(1.1); box-shadow: 0 0 15px var(--accent-glow); }

/* NOUVEAU : Bouton Reset */
.btn-reset {
    background: transparent; border: 1px solid #ef4444; color: #ef4444;
}
.btn-reset:hover { background: rgba(239, 68, 68, 0.1); box-shadow: none; filter: none; }

/* NOUVEAU : Bouton Copier */
.btn-copy {
    position: absolute; top: 0; right: 0; width: auto; padding: 5px 12px; font-size: 0.7em; background: rgba(255,255,255,0.1); border: none; border-bottom-left-radius: 8px; color: var(--accent);
}
.btn-copy:hover { background: var(--accent); color: #000; box-shadow: none; }

/* RESULTS */
.result {
    margin-top: 20px; padding: 15px; border-radius: 8px; font-size: 0.9rem; display: none; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--glass-border); color: var(--accent); animation: fadeIn 0.3s ease; overflow-x: auto;
}
.result.code-look { font-family: 'Fira Code', monospace; word-break: break-all; border-left: 3px solid var(--accent); }
.result.center-img { text-align: center; background: white; padding: 10px; }
.stack { font-family: 'Fira Code', monospace; font-size: 0.75rem; color: var(--text-dim); margin-top: 20px; text-align: right; opacity: 0.6; }

/* RESPONSIVE VIEWER */
.large-card { grid-column: span 1; }
@media (min-width: 1100px) { .large-card { grid-column: span 2; } }
.resp-container { display: flex; gap: 20px; margin-top: 20px; overflow-x: auto; padding-bottom: 10px; }
.device-mockup { background: #111; border: 4px solid #333; border-radius: 12px; flex-shrink: 0; display: flex; flex-direction: column; }
.device-mockup span { text-align: center; color: #888; font-size: 0.7rem; padding: 5px; border-bottom: 1px solid #333; }
.device-mockup iframe { border: none; background: white; }
.device-mockup.mobile iframe { width: 375px; height: 500px; }
.device-mockup.tablet iframe { width: 768px; height: 500px; }

/* FOOTER */
.network-footer { border-top: 1px solid var(--glass-border); padding-top: 30px; margin-top: 60px; text-align: center; font-size: 0.85rem; color: #64748b; }
.network-links a { color: var(--text-dim); text-decoration: none; margin: 0 8px; transition: color 0.2s; }
.network-links a:hover { color: var(--accent); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* MEDIA QUERIES */
@media (max-width: 900px) {
    .dashboard-layout { flex-direction: column; }
    .sidebar { position: relative; width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--glass-border); padding: 15px; overflow-x: auto; display: flex; }
    .sidebar a { margin-right: 10px; white-space: nowrap; margin-bottom: 0; }
    .content { margin-left: 0; padding: 20px; }
    header h1 { font-size: 2rem; }
}