/*
Theme Name: Savoir+
Theme URI: https://savoirplus.academy
Author: Savoir+
Author URI: https://savoirplus.academy
Description: Thème WordPress custom pour Savoir+, plateforme d'enseignement technique en ligne. Compatible Tutor LMS.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: savoirplus
Tags: education, lms, custom, french
*/

/* ==========================================================================
   VARIABLES CSS — CHARTE GRAPHIQUE SAVOIR+
   ========================================================================== */
:root {
    /* Couleurs principales */
    --sp-primary: #1A3A6B;
    --sp-primary-dark: #0F2A52;
    --sp-primary-light: #2A4E8A;
    --sp-secondary: #FF6B2B;
    --sp-secondary-dark: #E5551A;
    --sp-secondary-light: #FF8552;

    /* Neutres */
    --sp-white: #FFFFFF;
    --sp-bg-soft: #F4F4F4;
    --sp-bg-blue-soft: #EEF2FA;
    --sp-border: #E5E7EB;
    --sp-border-strong: #D1D5DB;

    /* Textes */
    --sp-text: #1A1A1A;
    --sp-text-muted: #6B7280;
    --sp-text-light: #9CA3AF;

    /* Statuts */
    --sp-success: #10B981;
    --sp-success-bg: rgba(16, 185, 129, 0.1);
    --sp-warning: #F59E0B;
    --sp-warning-bg: rgba(245, 158, 11, 0.1);
    --sp-danger: #EF4444;
    --sp-danger-bg: rgba(239, 68, 68, 0.1);
    --sp-info: #3B82F6;
    --sp-info-bg: rgba(59, 130, 246, 0.1);

    /* Typographie */
    --sp-font-serif: Georgia, "Times New Roman", serif;
    --sp-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Espacements */
    --sp-radius-sm: 4px;
    --sp-radius: 8px;
    --sp-radius-md: 10px;
    --sp-radius-lg: 12px;
    --sp-radius-xl: 16px;
    --sp-radius-full: 999px;

    /* Ombres */
    --sp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --sp-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --sp-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --sp-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    /* Container */
    --sp-container: 1200px;
    --sp-container-narrow: 900px;

    /* Transitions */
    --sp-transition: all 0.2s ease;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--sp-font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--sp-text);
    background: var(--sp-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--sp-font-serif);
    font-weight: 700;
    color: var(--sp-text);
    line-height: 1.3;
    margin: 0 0 0.5em;
}

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

p { margin: 0 0 1em; }

a {
    color: var(--sp-primary);
    text-decoration: none;
    transition: var(--sp-transition);
}
a:hover { color: var(--sp-secondary); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1em; padding-left: 1.5em; }

button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* ==========================================================================
   LAYOUT — CONTAINERS
   ========================================================================== */
.sp-container {
    max-width: var(--sp-container);
    margin: 0 auto;
    padding: 0 20px;
}

.sp-container-narrow {
    max-width: var(--sp-container-narrow);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.sp-font-serif { font-family: var(--sp-font-serif); }
.sp-text-center { text-align: center; }
.sp-text-right { text-align: right; }
.sp-text-primary { color: var(--sp-primary); }
.sp-text-secondary { color: var(--sp-secondary); }
.sp-text-muted { color: var(--sp-text-muted); }
.sp-text-success { color: var(--sp-success); }
.sp-text-danger { color: var(--sp-danger); }
.sp-bg-primary { background: var(--sp-primary); }
.sp-bg-secondary { background: var(--sp-secondary); }
.sp-bg-soft { background: var(--sp-bg-soft); }
.sp-bg-blue-soft { background: var(--sp-bg-blue-soft); }

.sp-mt-0 { margin-top: 0; }
.sp-mt-1 { margin-top: 0.5rem; }
.sp-mt-2 { margin-top: 1rem; }
.sp-mt-3 { margin-top: 1.5rem; }
.sp-mt-4 { margin-top: 2rem; }
.sp-mt-5 { margin-top: 3rem; }
.sp-mb-0 { margin-bottom: 0; }
.sp-mb-1 { margin-bottom: 0.5rem; }
.sp-mb-2 { margin-bottom: 1rem; }
.sp-mb-3 { margin-bottom: 1.5rem; }
.sp-mb-4 { margin-bottom: 2rem; }
.sp-mb-5 { margin-bottom: 3rem; }

.sp-flex { display: flex; }
.sp-flex-col { flex-direction: column; }
.sp-items-center { align-items: center; }
.sp-items-start { align-items: flex-start; }
.sp-justify-between { justify-content: space-between; }
.sp-justify-center { justify-content: center; }
.sp-gap-1 { gap: 0.5rem; }
.sp-gap-2 { gap: 1rem; }
.sp-gap-3 { gap: 1.5rem; }
.sp-gap-4 { gap: 2rem; }
.sp-flex-1 { flex: 1; }
.sp-flex-wrap { flex-wrap: wrap; }

.sp-hidden { display: none !important; }

@media (min-width: 768px) {
    .sp-md-flex { display: flex; }
    .sp-md-hidden { display: none !important; }
}

@media (max-width: 767px) {
    .sp-mobile-hidden { display: none !important; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

/* Screen reader only */
.sp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
