/*
Theme Name: TutoSSS Child
Theme URI: https://tutosss.davlyrs.com
Description: Child theme pour TutoSSS - Tutoriels de programmation ultra-pratiques. Design dev-friendly avec Terminal Green, VSCode Blue et Git Orange.
Author: David Lyrs
Author URI: https://davlyrs.com
Template: tutmedia
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tutosss-child
*/

/* ============================================
   TUTOSSS BRANDING - Dev-Friendly Identity
   ============================================ */

:root {
    /* Primary Colors */
    --terminal-green: #00FF41;
    --vscode-blue: #007ACC;
    --git-orange: #F05032;
    
    /* Backgrounds */
    --bg-dark: #1E1E1E;
    --bg-light: #F3F4F6;
    --bg-code: #282C34;
    
    /* Text */
    --text-dark: #D4D4D4;
    --text-light: #1F2937;
    
    /* Status Colors */
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    
    /* Neutral */
    --gray-100: #F7FAFC;
    --gray-200: #EDF2F7;
    --gray-300: #E2E8F0;
    --gray-700: #2D3748;
    --gray-800: #1A202C;
    --gray-900: #171923;
}

/* ============================================
   TYPOGRAPHY - Developer Aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Fira+Code:wght@400;500&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

code, pre, .code-font {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-feature-settings: "liga" 1, "calt" 1; /* Enable ligatures */
}

/* ============================================
   COLORS & ACCENTS
   ============================================ */

/* Primary Action Elements */
.btn-primary,
.primary-button,
a.cta-primary {
    background: var(--terminal-green);
    color: #000;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #00DD38;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 65, 0.3);
}

/* Secondary Actions */
.btn-secondary,
a.cta-secondary {
    background: var(--vscode-blue);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #0062A3;
}

/* Accent Elements */
.accent,
.highlight,
.badge-trending {
    color: var(--git-orange);
}

/* Links */
a {
    color: var(--vscode-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--terminal-green);
}

/* ============================================
   CODE BLOCKS - VSCode Inspired
   ============================================ */

pre {
    background: var(--bg-code);
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-x: auto;
    border-left: 4px solid var(--terminal-green);
    position: relative;
}

code {
    background: var(--gray-200);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    color: var(--git-orange);
}

pre code {
    background: transparent;
    padding: 0;
    color: var(--text-dark);
}

/* Copy Button for Code Blocks */
.code-block-wrapper {
    position: relative;
}

.copy-code-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--gray-700);
    color: var(--text-dark);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.copy-code-btn:hover {
    background: var(--terminal-green);
    color: #000;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--gray-800) 100%);
    color: var(--text-dark);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="20" fill="%2300FF41" opacity="0.05" font-family="monospace">&lt;/&gt;</text></svg>');
    opacity: 0.1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: white;
    position: relative;
    z-index: 1;
}

.hero-title .accent {
    color: var(--terminal-green);
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-300);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   SEARCH BAR
   ============================================ */

.search-bar-wrapper {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border: 2px solid var(--gray-300);
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

.search-bar:focus {
    border-color: var(--terminal-green);
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.1);
}

.search-bar::placeholder {
    color: var(--gray-700);
    opacity: 0.6;
}

/* ============================================
   CARDS & GRIDS
   ============================================ */

.card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--gray-300);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--terminal-green);
}

.language-card {
    text-align: center;
    cursor: pointer;
}

.language-card img,
.language-card .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
}

.language-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.language-card .tuto-count {
    color: var(--gray-700);
    font-size: 0.875rem;
}

/* ============================================
   BADGES & TAGS
   ============================================ */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-beginner {
    background: var(--success);
    color: white;
}

.badge-intermediate {
    background: var(--vscode-blue);
    color: white;
}

.badge-advanced {
    background: var(--git-orange);
    color: white;
}

.badge-trending {
    background: var(--git-orange);
    color: white;
}

.tag {
    display: inline-block;
    background: var(--gray-200);
    color: var(--gray-800);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag:hover {
    background: var(--terminal-green);
    color: #000;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    body {
        background: var(--bg-dark);
        color: var(--text-dark);
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: white;
    }
    
    .card {
        background: var(--gray-800);
        border-color: var(--gray-700);
    }
    
    .search-bar {
        background: var(--gray-800);
        color: var(--text-dark);
        border-color: var(--gray-700);
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.terminal-cursor::after {
    content: '▊';
    animation: blink 1s infinite;
    color: var(--terminal-green);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.text-terminal {
    color: var(--terminal-green);
}

.text-vscode {
    color: var(--vscode-blue);
}

.text-git {
    color: var(--git-orange);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}
