/*
Theme Name:   RasRobot Child
Theme URI:    https://rasrobot.davlyrs.com
Description:  Child theme pour RasRobot - Hub francophone des makers Raspberry Pi & DIY
Author:       DavLyrs
Author URI:   https://davlyrs.com
Template:     rasmedia
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:  rasrobot-child
*/

/* ================================================
   RASROBOT CUSTOM STYLES
   Maker-friendly design with Raspberry Pi Red,
   Circuit Green & Solder Blue
   ================================================ */

/* === COLOR VARIABLES === */
:root {
    /* Brand Colors */
    --rasrobot-primary: #C7053D;      /* Raspberry Pi Red */
    --rasrobot-secondary: #10B981;    /* Circuit Green */
    --rasrobot-accent: #3B82F6;       /* Solder Blue */
    --rasrobot-warning: #FCD34D;      /* Electric Yellow */
    
    /* Backgrounds */
    --rasrobot-bg: #FAF9F6;           /* Off-white lab notebook feel */
    --rasrobot-dark-bg: #0F172A;      /* Slate 900 for dark mode */
    
    /* Text */
    --rasrobot-text: #2D3748;         /* Charcoal */
    --rasrobot-text-light: #718096;   /* Gray for secondary text */
}

/* === TYPOGRAPHY === */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--rasrobot-text);
    background-color: var(--rasrobot-bg);
    font-size: 16px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    color: var(--rasrobot-text);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

code, pre {
    font-family: 'Fira Code', 'Courier New', monospace;
    background-color: #1E293B;
    color: #E2E8F0;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* === MAKER AESTHETICS === */
.circuit-pattern {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="M10 10h80v80H10z" fill="none" stroke="%2310B981" stroke-width="0.5" opacity="0.1"/><circle cx="10" cy="10" r="2" fill="%2310B981" opacity="0.2"/><circle cx="90" cy="10" r="2" fill="%2310B981" opacity="0.2"/><circle cx="10" cy="90" r="2" fill="%2310B981" opacity="0.2"/><circle cx="90" cy="90" r="2" fill="%2310B981" opacity="0.2"/></svg>');
    background-repeat: repeat;
}

/* === PRIMARY ELEMENTS === */
.site-header {
    background-color: var(--rasrobot-dark-bg);
    border-bottom: 3px solid var(--rasrobot-primary);
}

.site-title a {
    color: #fff;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    text-decoration: none;
}

.site-title a:hover {
    color: var(--rasrobot-primary);
}

/* === BUTTONS & LINKS === */
.btn-primary,
button.primary,
.wp-block-button__link {
    background-color: var(--rasrobot-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover,
button.primary:hover,
.wp-block-button__link:hover {
    background-color: #A00431;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 5, 61, 0.3);
}

.btn-secondary {
    background-color: var(--rasrobot-accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #2563EB;
}

a {
    color: var(--rasrobot-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--rasrobot-primary);
}

/* === PROJECT CARDS === */
.project-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(199, 5, 61, 0.15);
    border-color: var(--rasrobot-primary);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-difficulty {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.difficulty-easy { 
    background-color: #D1FAE5; 
    color: #065F46; 
}

.difficulty-medium { 
    background-color: #FEF3C7; 
    color: #92400E; 
}

.difficulty-hard { 
    background-color: #FEE2E2; 
    color: #991B1B; 
}

/* === CATEGORY BADGES === */
.category-badge {
    display: inline-block;
    background-color: var(--rasrobot-secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
}

/* === WARNINGS & ALERTS === */
.warning-box {
    background-color: #FEF3C7;
    border-left: 4px solid var(--rasrobot-warning);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.warning-box strong {
    color: #92400E;
    display: block;
    margin-bottom: 0.5rem;
}

.success-box {
    background-color: #D1FAE5;
    border-left: 4px solid var(--rasrobot-secondary);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

/* === HERO SECTION === */
.hero-section {
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, var(--rasrobot-dark-bg) 0%, #1E293B 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><circle cx="20" cy="20" r="3" fill="%2310B981"/><circle cx="180" cy="180" r="3" fill="%233B82F6"/><path d="M20 20L180 180" stroke="%2310B981" stroke-width="1"/></svg>');
}

.hero-section h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-section .subtitle {
    font-size: 1.25rem;
    color: #CBD5E1;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* === STEP-BY-STEP TUTORIALS === */
.tutorial-step {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    border-left: 4px solid var(--rasrobot-accent);
}

.step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background-color: var(--rasrobot-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

/* === FOOTER === */
.site-footer {
    background-color: var(--rasrobot-dark-bg);
    color: #CBD5E1;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.site-footer a {
    color: #CBD5E1;
}

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

.footer-tagline {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #334155;
    margin-top: 2rem;
    color: #94A3B8;
    font-size: 0.875rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .hero-section h1 { font-size: 2rem; }
    
    .tutorial-step {
        flex-direction: column;
    }
    
    .project-card img {
        height: 150px;
    }
}

/* === UTILITY CLASSES === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
