/*
Theme Name: LMS Landing
Theme URI: https://eziom.fr
Author: Eziom
Description: Thème sur-mesure pour présenter les formations facilement et de manière esthétique.
Version: 2.0.0
Text Domain: lms-landing
*/

/* ==========================================
   DESIGN TOKENS — Light & Dark Mode
   ========================================== */
:root {
    /* Accent — indigo/violet commun aux deux modes */
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.12);
    --accent-glow: rgba(99, 102, 241, 0.35);

    /* Warm gold for piano touches */
    --gold: #d4a953;
    --gold-soft: rgba(212, 169, 83, 0.12);

    /* Radius & shadows */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Light mode (default) ---------- */
:root {
    --bg: #fafaf9;
    --bg-elevated: #ffffff;
    --bg-subtle: #f5f5f4;
    --bg-hero: linear-gradient(160deg, #1e1b2e 0%, #2d2545 50%, #1a1730 100%);
    --text: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #a8a29e;
    --border: #e7e5e4;
    --border-hover: #d6d3d1;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    --card-shadow-hover: 0 8px 30px rgba(0,0,0,0.08);
    --header-bg: rgba(250, 250, 249, 0.85);
    --header-border: #e7e5e4;
    --footer-bg: #1c1917;
    --footer-text: #a8a29e;
    --footer-text-bright: #e7e5e4;
}

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0e13;
        --bg-elevated: #1a1924;
        --bg-subtle: #16151f;
        --bg-hero: linear-gradient(160deg, #0f0e13 0%, #1a1730 50%, #0f0e13 100%);
        --text: #f5f5f4;
        --text-secondary: #a8a29e;
        --text-muted: #6b6560;
        --border: #2a2836;
        --border-hover: #3d3a4d;
        --card-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.15);
        --card-shadow-hover: 0 8px 40px rgba(0,0,0,0.3);
        --header-bg: rgba(15, 14, 19, 0.85);
        --header-border: #2a2836;
        --footer-bg: #09090b;
        --footer-text: #6b6560;
        --footer-text-bright: #a8a29e;
    }
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

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

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

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   HEADER — glassmorphism sticky
   ========================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--header-border);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 64px;
}

.site-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--text);
    transition: opacity 0.2s;
}
.site-title a:hover { opacity: 0.8; }

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
}
.header-nav a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.header-nav .btn-header-primary {
    background: var(--accent);
    color: #fff;
    padding: 8px 20px;
}
.header-nav .btn-header-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.header-nav .btn-header-logout {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.header-nav .btn-header-logout:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

/* ── Logout modal ── */
#ez-logout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#ez-logout-modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    animation: ezLogoutIn 0.2s ease-out;
}

@keyframes ezLogoutIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#ez-logout-modal p {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 24px;
}

.ez-logout-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

#ez-logout-cancel {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    font-family: inherit;
}
#ez-logout-cancel:hover {
    border-color: var(--border-hover);
    background: var(--bg-subtle);
}

#ez-logout-confirm {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    background: #ef4444;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s var(--ease);
}
#ez-logout-confirm:hover {
    background: #dc2626;
    color: #fff;
    transform: translateY(-1px);
}

/* ==========================================
   HERO — dark gradient (toujours sombre)
   ========================================== */
.hero {
    position: relative;
    background: var(--bg-hero);
    padding: 100px 0 90px;
    text-align: center;
    overflow: hidden;
}

/* Soft radial glow */
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Piano keys decorative line */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--gold) 20%,
        var(--accent) 50%,
        var(--gold) 80%,
        transparent 100%
    );
    opacity: 0.6;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    color: #fff;
    background: linear-gradient(to right, #ffffff 30%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.15;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    text-decoration: none;
}

.btn-primary,
.btn {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover,
.btn:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

/* ==========================================
   TRUST BAR
   ========================================== */
.trust-bar {
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
}

.trust-items {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.trust-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: 10px;
    font-size: 1.2rem;
}

/* ==========================================
   COURSES SECTION
   ========================================== */
.courses-section {
    padding: 80px 0 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* Single course — center when alone */
.course-grid:has(> :only-child) {
    max-width: 420px;
    margin: 0 auto;
}

/* ==========================================
   COURSE CARD
   ========================================== */
.course-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
    box-shadow: var(--card-shadow);
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--border-hover);
}

.course-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--bg-subtle);
}

.course-content {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.course-title a {
    color: var(--text);
    transition: color 0.2s;
}
.course-title a:hover { color: var(--accent); }

.course-excerpt {
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.course-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
}

.course-price.free {
    color: #10b981;
}

.course-meta .btn {
    padding: 10px 20px;
    font-size: 0.875rem;
}

/* ==========================================
   PAGE TEMPLATE (espace-apprenant, etc.)
   ========================================== */
.page-content {
    padding: 60px 0 80px;
    min-height: 60vh;
}

.page-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    text-align: center;
}

.page-body {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==========================================
   HOME CONTENT SECTION (Gutenberg)
   ========================================== */
.home-content {
    padding: 60px 0;
}
.home-content .container {
    color: var(--text-secondary);
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    background: var(--footer-bg);
    padding: 48px 0;
    text-align: center;
    margin-top: 0;
    border-top: none;
}

.site-footer p {
    color: var(--footer-text);
    font-size: 0.875rem;
    margin: 0;
}

.site-footer a {
    color: var(--footer-text-bright);
    font-weight: 500;
}
.site-footer a:hover {
    color: var(--accent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

/* Support both raw <a> and WordPress menu <li><a> */
.footer-links a,
.footer-links li a {
    color: var(--footer-text-bright);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-links a:hover,
.footer-links li a:hover { color: var(--accent); }

.footer-links li {
    list-style: none;
}

/* ── Footer legal links ── */
.footer-legal {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 16px 0 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    list-style: none;
}

.footer-legal a,
.footer-legal li a {
    color: var(--footer-text);
    font-size: 0.8rem;
    font-weight: 400;
    transition: color 0.2s;
}
.footer-legal a:hover,
.footer-legal li a:hover { color: var(--accent); }

.footer-legal li {
    list-style: none;
}

.footer-copy {
    margin-top: 0;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .hero { padding: 70px 0 60px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }

    .course-grid { grid-template-columns: 1fr; }

    .trust-items { gap: 24px; }
    .trust-item { font-size: 0.85rem; }

    .header-nav .nav-text { display: none; }

    .hero-cta-group { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .site-header .container { height: 56px; }
    .site-title { font-size: 1rem; }
    .footer-links { flex-direction: column; gap: 12px; }
    .footer-legal { flex-direction: column; gap: 8px; align-items: center; }
}

/* ====================================================
   FIX CONTRASTE : EZ-LMS PAGES (Course & Apprenant)
   ==================================================== */
body.ez-course-page,
.ez-template-default {
    background-color: #f8fafc;
    color: #334155;
}

@media (prefers-color-scheme: dark) {
    body.ez-course-page,
    .ez-template-default {
        background-color: #0f0e13;
        color: #d6d3d1;
    }
}

body.ez-course-page h1,
body.ez-course-page h2,
body.ez-course-page h3,
body.ez-course-page h4,
body.ez-course-page h5,
body.ez-course-page h6 {
    color: #0f172a;
}

@media (prefers-color-scheme: dark) {
    body.ez-course-page h1,
    body.ez-course-page h2,
    body.ez-course-page h3,
    body.ez-course-page h4,
    body.ez-course-page h5,
    body.ez-course-page h6 {
        color: #f5f5f4;
    }
}

.ez-curriculum-card,
.ez-pricing-card,
.ez-student-area,
.ez-landing-content {
    color: #334155 !important;
}

.ez-card-header h2,
.ez-card-header p,
.ez-lesson-row h3,
.ez-sub-lesson-row {
    color: #334155 !important;
}

.ez-sub-lesson-row a { color: #475569; }
.ez-sub-lesson-row a:hover { color: var(--accent); }
