* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fb;
    color: #1a1a1a;
    line-height: 1.6;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px;
}
.logo { font-size: 1.4rem; font-weight: 800; text-decoration: none; color: #1a1a1a; }
.logo span { color: #6366f1; }
nav { display: flex; align-items: center; gap: 15px; }
nav a { text-decoration: none; color: #555; font-weight: 500; }
nav a:hover { color: #6366f1; }
.user-nav { color: #6366f1; font-weight: 600; }
.btn-pay-nav, .btn-signup {
    background: #6366f1; color: #fff !important;
    padding: 8px 16px; border-radius: 8px;
}
.btn-logout { color: #ef4444 !important; }

.hero { text-align: center; padding: 60px 20px; }
.hero h1 { font-size: 2.5rem; margin-bottom: 15px; line-height: 1.2; }
.hero h1 span { color: #6366f1; }
.hero p { color: #666; font-size: 1.1rem; margin-bottom: 25px; }
.btn-hero { display: inline-block; background: #6366f1; color: #fff; padding: 15px 30px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 1.1rem; }

.formations-grid { padding: 40px 0; }
.formations-grid h2 { text-align: center; margin-bottom: 30px; font-size: 2rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }

.card {
    background: #fff; border-radius: 16px; padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-top: 4px solid var(--accent);
    transition: transform 0.2s;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); }
.card-icon { font-size: 2.5rem; margin-bottom: 15px; }
.card h3 { font-size: 1.5rem; margin-bottom: 12px; color: var(--accent); }
.card p { color: #666; margin-bottom: 15px; flex-grow: 1; }
.card .meta { font-size: 0.9rem; color: #999; margin-bottom: 20px; }

.btn {
    display: inline-block; background: var(--accent, #6366f1); color: #fff;
    padding: 12px 22px; border-radius: 10px; text-decoration: none;
    font-weight: 600; text-align: center; border: none; cursor: pointer; font-size: 1rem;
}
.btn:hover { opacity: 0.9; }
.btn.secondary { background: #e5e7eb; color: #333; }
.btn-success { background: #22c55e; }
.btn-warning { background: #f59e0b; }
.btn-full { width: 100%; }

.auth-box, .pay-box, .success-box, .espace-box {
    max-width: 500px; margin: 40px auto; background: #fff;
    padding: 40px; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
.auth-box h1, .pay-box h1, .success-box h1, .espace-box h1 { margin-bottom: 15px; }
.auth-sub, .pay-sub, .espace-sub { color: #666; margin-bottom: 25px; }
.auth-box label { display: block; margin: 15px 0 5px; font-weight: 600; }
.auth-box input { width: 100%; padding: 12px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 1rem; }
.auth-box input:focus { outline: none; border-color: #6366f1; }
.auth-box button { margin-top: 20px; }
.auth-alt { text-align: center; margin-top: 20px; color: #666; }
.auth-alt a { color: #6366f1; }

.alert { padding: 15px; border-radius: 10px; margin-bottom: 20px; }
.alert-error { background: #fef2f2; color: #b91c1c; border-left: 4px solid #ef4444; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }

.formation-header { padding: 40px; border-radius: 16px; margin: 30px 0; }
.formation-header h1 { font-size: 2.2rem; margin: 10px 0; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.badge { background: #fff; padding: 6px 14px; border-radius: 20px; font-size: 0.9rem; font-weight: 600; }

.modules-list { margin: 30px 0; }
.module { background: #fff; border-radius: 12px; margin-bottom: 15px; padding: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.module-valide { border-left: 4px solid #22c55e; }
.module-header { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; margin-bottom: 15px; }
.module-num { background: #eef2ff; color: #6366f1; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; }
.module-titre { flex-grow: 1; font-size: 1.1rem; font-weight: 600; }
.module-duree { color: #888; font-size: 0.9rem; }
.module-check { color: #22c55e; font-weight: 700; }
.objectif { background: #f9fafb; border-left: 3px solid #6366f1; padding: 12px 15px; border-radius: 6px; margin-bottom: 15px; }

.module-content { background: #fff; padding: 40px; border-radius: 16px; margin: 30px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.06); line-height: 1.8; }
.module-content h3 { margin: 30px 0 15px; color: #1a1a1a; font-size: 1.4rem; }
.module-content p { margin-bottom: 15px; }
.module-content ul, .module-content ol { margin: 15px 0 15px 25px; }
.module-content li { margin-bottom: 8px; }

.module-title-bar { padding: 30px; background: #fff; border-radius: 16px; margin: 20px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.module-title-bar h1 { font-size: 1.8rem; margin: 10px 0; }
.back-link { display: inline-block; color: #6366f1; text-decoration: none; margin-bottom: 15px; font-weight: 600; }

.module-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin: 30px 0; }
.nav-modules { display: flex; gap: 10px; }

.price-tag { text-align: center; margin: 30px 0; }
.price { font-size: 4rem; font-weight: 800; color: #6366f1; }
.price-note { display: block; color: #666; margin-top: 5px; }
.pay-features { background: #f9fafb; padding: 25px; border-radius: 12px; margin-bottom: 25px; }
.pay-features h3 { margin-bottom: 15px; }
.pay-features ul { list-style: none; }
.pay-features li { padding: 8px 0; }
.pay-buttons { display: flex; flex-direction: column; gap: 12px; }
.btn-pay { display: block; padding: 16px; border-radius: 12px; text-decoration: none; font-weight: 700; text-align: center; color: #fff; }
.btn-stripe { background: #635bff; }
.btn-paypal { background: #0070ba; }
.pay-note { text-align: center; margin-top: 20px; color: #666; font-size: 0.9rem; }

.success-icon { font-size: 5rem; text-align: center; margin-bottom: 20px; }

.progression-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 25px; }
.progression-card { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-top: 4px solid var(--accent); }
.progression-card h3 { margin: 10px 0; color: var(--accent); }
.progress-bar { background: #e5e7eb; height: 8px; border-radius: 4px; margin: 15px 0; overflow: hidden; }
.progress-fill { height: 100%; transition: width 0.3s; }

.why-section { padding: 60px 0; }
.why-section h2 { text-align: center; margin-bottom: 40px; font-size: 2rem; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 25px; }
.why-card { background: #fff; padding: 30px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; }
.why-icon { font-size: 2.5rem; margin-bottom: 15px; }
.why-card h3 { margin-bottom: 10px; }
.why-card p { color: #666; }

.main-footer { background: #1a1a1a; color: #aaa; text-align: center; padding: 30px 0; margin-top: 60px; }

@media (max-width: 600px) {
    .hero h1 { font-size: 1.8rem; }
    .header-inner { flex-direction: column; gap: 15px; }
    nav { flex-wrap: wrap; justify-content: center; }
}