/**
 * FITPRO - Feuille de styles principale
 * Design inspiré Basic Fit : Orange / Noir / Blanc
 * Responsive Mobile-first
 */

/* =====================================================
   VARIABLES CSS
   ===================================================== */
:root {
    /* Couleurs principales */
    --primary-color: #FF6900;
    --primary-dark: #E55D00;
    --primary-light: #FF8533;
    --secondary-color: #1A1A1A;
    --secondary-light: #2D2D2D;
    
    /* Couleurs utilitaires */
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    
    /* Textes */
    --text-dark: #1A1A1A;
    --text-light: #6B7280;
    --text-white: #FFFFFF;
    
    /* Backgrounds */
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-dark: #1A1A1A;
    
    /* Bordures */
    --border-color: #E5E7EB;
    --border-radius: 12px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

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

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

/* =====================================================
   CONTAINER & LAYOUT
   ===================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================================================
   HEADER & NAVIGATION
   ===================================================== */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 700;
}

.logo a {
    color: inherit;
}

.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Dashboard Navigation */
.dashboard-nav {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--text-white);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.dashboard-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-brand h2 {
    color: var(--text-white);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-white);
    border-bottom-color: var(--primary-color);
}

.nav-user {
    color: var(--text-white);
}

.user-name {
    font-weight: 600;
}

/* =====================================================
   BOUTONS
   ===================================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-light);
    color: var(--text-white);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--text-white);
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--text-white);
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* =====================================================
   SECTIONS
   ===================================================== */
.features,
.objectives,
.cta {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

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

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
}

/* Objectives Grid */
.objectives {
    background: var(--bg-white);
}

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

.objective-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.objective-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.objective-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.objective-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.objective-card p {
    color: rgba(255, 255, 255, 0.9);
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    text-align: center;
    padding: 4rem 2rem;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* =====================================================
   FORMULAIRES
   ===================================================== */
.auth-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.auth-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.auth-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.1);
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.password-strength {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.password-strength.weak {
    color: var(--danger-color);
}

.password-strength.medium {
    color: var(--warning-color);
}

.password-strength.strong {
    color: var(--success-color);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-light);
}

/* =====================================================
   ALERTES
   ===================================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-error {
    background: #FEF2F2;
    border-left-color: var(--danger-color);
    color: #991B1B;
}

.alert-success {
    background: #F0FDF4;
    border-left-color: var(--success-color);
    color: #166534;
}

.alert-info {
    background: #EFF6FF;
    border-left-color: var(--info-color);
    color: #1E40AF;
}

.alert-warning {
    background: #FFFBEB;
    border-left-color: var(--warning-color);
    color: #92400E;
}

/* =====================================================
   ONBOARDING
   ===================================================== */
.onboarding-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.onboarding-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    transition: var(--transition);
}

.progress-step.active .step-number {
    background: var(--primary-color);
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: var(--success-color);
}

.step-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.progress-line.completed {
    background: var(--success-color);
}

.onboarding-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.onboarding-card h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.level-card {
    position: relative;
    cursor: pointer;
}

.level-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.level-content {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-align: center;
}

.level-card input[type="radio"]:checked + .level-content {
    border-color: var(--primary-color);
    background: rgba(255, 105, 0, 0.05);
}

.level-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.level-content h3 {
    margin-bottom: 0.75rem;
}

.level-content ul {
    list-style: none;
    text-align: left;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.level-content li {
    margin-bottom: 0.25rem;
}

.level-content li:before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: bold;
}

.onboarding-form .form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.onboarding-form .form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

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

.recommendations {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.recommendations ul {
    list-style: none;
}

.recommendations li {
    padding: 0.5rem 0;
}

/* =====================================================
   DASHBOARD
   ===================================================== */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 2rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-banner h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.dashboard-container {
    padding: 2rem 0 4rem;
}

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

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.quick-actions {
    margin-bottom: 3rem;
}

.quick-actions h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

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

.action-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    color: inherit;
}

.action-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.action-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.action-card p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.programs-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
}

.programs-grid {
    display: grid;
    gap: 1.5rem;
}

.program-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--border-color);
}

.program-card.active {
    border-left-color: var(--primary-color);
}

.program-card:hover {
    box-shadow: var(--shadow-md);
}

.program-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.program-header h3 {
    flex: 1;
    font-size: 1.25rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-auto {
    background: #E0E7FF;
    color: #3730A3;
}

.badge-active {
    background: #D1FAE5;
    color: #065F46;
}

.program-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item .label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.info-item .value {
    font-weight: 600;
    color: var(--text-dark);
}

.program-description {
    color: var(--text-light);
    margin: 1rem 0;
    font-size: 0.875rem;
}

.program-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.close {
    float: right;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    color: var(--text-light);
}

.close:hover {
    color: var(--text-dark);
}

.warning-text {
    color: var(--warning-color);
    font-weight: 600;
}

/* =====================================================
   COOKIE BANNER
   ===================================================== */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--secondary-color);
    color: var(--text-white);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text h3 {
    margin-bottom: 0.5rem;
}

.cookie-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-settings {
    margin: 1.5rem 0;
}

.cookie-option {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.cookie-option label {
    display: flex;
    gap: 1rem;
    cursor: pointer;
}

.cookie-option input[type="checkbox"] {
    margin-top: 0.25rem;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--secondary-color);
    color: var(--text-white);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

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

.footer-col h4 {
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-col a:hover {
    color: var(--text-white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .dashboard-nav .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-line {
        width: 3px;
        height: 30px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .program-actions {
        flex-direction: column;
    }
    
    .program-actions .btn {
        width: 100%;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .header,
    .dashboard-nav,
    .footer,
    .btn,
    .cookie-banner {
        display: none !important;
    }
}
