/*
Theme Name: Black Dog
Theme URI: https://blackdogkungfu.be
Author: Black Dog Kung Fu
Author URI: https://blackdogkungfu.be
Description: Thème custom pour la plateforme e-learning Black Dog Kung Fu. Design dark mode, mobile-first, optimisé pour Tutor LMS.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blackdog
Tags: dark-mode, e-learning, lms, mobile-first, responsive

Black Dog Kung Fu - Plateforme E-Learning
Kung Fu Interne Chinois : Xingyi Quan & Bagua Zhang
*/

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Couleurs principales (CDC Section 5.1) */
    --bg-primary: #0d0b09;
    --bg-card: #1a1816;
    --bg-elevated: #2a2725;
    --border: #3d3a38;
    --border-light: #5c5856;
    
    /* Texte */
    --text-primary: #f5f3f0;
    --text-secondary: #8a8583;
    --text-disabled: #5c5856;
    
    /* Accent - Bordeaux */
    --accent: #9B1B30;
    --accent-hover: #7a1526;
    --accent-light: rgba(155, 27, 48, 0.1);
    
    /* États fonctionnels */
    --success: #16A34A;
    --success-light: rgba(22, 163, 74, 0.1);
    --error: #F87171;
    --error-light: rgba(248, 113, 113, 0.1);
    --warning: #EA580C;
    --warning-light: rgba(234, 88, 12, 0.1);
    --info: #3B82F6;
    --info-light: rgba(59, 130, 246, 0.1);
    
    /* Dimensions */
    --header-height: 75px;
    --border-radius: 6px;
    --border-radius-lg: 10px;
    
    /* Espacements */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    --spacing-2xl: 40px;
}

/* Light mode */
.light-mode {
    --bg-primary: #f5f3f0;
    --bg-card: #ffffff;
    --bg-elevated: #e8e4e1;
    --border: #d4d0cd;
    --border-light: #b8b3b0;
    --text-primary: #1a1816;
    --text-secondary: #5c5856;
    --text-disabled: #8a8583;
}

/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

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

p {
    margin-bottom: 1em;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--accent-hover);
}

/* ==================== UTILITY CLASSES ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-2xl);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 27, 48, 0.3);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-tertiary {
    background: none;
    border: none;
    color: var(--accent);
    padding: 8px 0;
}

.btn-tertiary:hover {
    color: var(--accent-hover);
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    font-size: 0.9rem;
}

.input-underline {
    width: 100%;
    padding: 12px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.input-underline:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

.input-underline::placeholder {
    color: var(--text-disabled);
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    transition: background 0.2s ease;
}

.card:hover {
    background: var(--bg-elevated);
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-accent { background: var(--accent-light); color: var(--accent); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-neutral { background: var(--bg-elevated); color: var(--text-secondary); }

/* ==================== ALERTS ==================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.alert-icon { flex-shrink: 0; font-size: 1.2rem; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; margin-bottom: 2px; }
.alert-message { font-size: 0.9rem; opacity: 0.9; }

.alert-info { background: var(--info-light); border: 1px solid var(--info); color: var(--info); }
.alert-success { background: var(--success-light); border: 1px solid var(--success); color: var(--success); }
.alert-warning { background: var(--warning-light); border: 1px solid var(--warning); color: var(--warning); }
.alert-error { background: var(--error-light); border: 1px solid var(--error); color: var(--error); }

/* ==================== PROGRESS BAR ==================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.success {
    background: var(--success);
}

/* ==================== AVATAR ==================== */
.avatar {
    width: 40px;
    height: 40px;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==================== WORDPRESS OVERRIDES ==================== */
.wp-block-post-content {
    max-width: 100%;
}

.entry-content > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Hide admin bar spacing in frontend */
body.admin-bar {
    margin-top: 0 !important;
}

/* ==================== TUTOR LMS OVERRIDES ==================== */
.tutor-wrap {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.tutor-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--border-radius-lg) !important;
}

.tutor-btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}

.tutor-btn-primary:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
}
