/* ===========================
   VARIABLES & RESET
   =========================== */
:root {
    --primary-color: #2F80ED;
    --primary-dark: #1e5bb8;
    --secondary-color: #56CCF2;
    --success-color: #27AE60;
    --warning-color: #F2994A;
    --danger-color: #EB5757;
    
    --apprenant-color: #9B51E0;
    --formateur-color: #2F80ED;
    --tuteur-color: #F2994A;
    --centre-color: #27AE60;
    
    --text-dark: #2D3748;
    --text-light: #718096;
    --bg-light: #F7FAFC;
    --bg-white: #FFFFFF;
    --border-color: #E2E8F0;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* ===========================
   NAVIGATION
   =========================== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 2rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(47, 128, 237, 0.1);
}

.nav-login {
    background-color: var(--primary-color);
    color: white !important;
}

.nav-login:hover {
    background-color: var(--primary-dark);
}

/* User info in navbar when logged in */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background-color: var(--bg-light);
    border-radius: 20px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-role-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.user-role-badge.apprenant { background-color: var(--apprenant-color); }
.user-role-badge.formateur { background-color: var(--formateur-color); }
.user-role-badge.tuteur { background-color: var(--tuteur-color); }
.user-role-badge.admin { background-color: var(--text-dark); }

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-slogan {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-description {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.hero-description strong {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 10px;
}

.hero-benefits {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.benefit i {
    color: var(--success-color);
    font-size: 1.5rem;
}

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

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===========================
   FEATURES PREVIEW
   =========================== */
.features-preview {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-dark);
}

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

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

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.feature-icon.apprenant { background-color: var(--apprenant-color); }
.feature-icon.formateur { background-color: var(--formateur-color); }
.feature-icon.tuteur { background-color: var(--tuteur-color); }
.feature-icon.centre { background-color: var(--centre-color); }

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

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

/* ===========================
   FOOTER
   =========================== */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.footer-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 15px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-section a[href^="mailto"],
.footer-section a[href^="tel"] {
    color: var(--secondary-color);
    text-decoration: none;
}

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

/* ===========================
   MODAL
   =========================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-content h2 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.modal-subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* ===========================
   FORMS
   =========================== */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

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

.demo-info {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
    font-size: 0.9rem;
}

.demo-info strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

.demo-info ul {
    list-style: none;
    padding-left: 0;
}

.demo-info li {
    padding: 5px 0;
    color: var(--text-light);
}

/* ===========================
   DASHBOARD LAYOUT
   =========================== */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.dashboard-section {
    padding: 60px 0;
    min-height: calc(100vh - 70px);
}

.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.card-title {
    font-size: 1.8rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===========================
   PROGRESS BARS
   =========================== */
.progress-bar {
    width: 100%;
    height: 12px;
    background-color: var(--bg-light);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ===========================
   BADGES & PILLS
   =========================== */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success { background-color: var(--success-color); color: white; }
.badge-warning { background-color: var(--warning-color); color: white; }
.badge-info { background-color: var(--secondary-color); color: white; }
.badge-primary { background-color: var(--primary-color); color: white; }

/* ===========================
   TABLE STYLES
   =========================== */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table thead {
    background-color: var(--bg-light);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background-color: var(--bg-light);
}

/* ===========================
   ALERTS
   =========================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-info {
    background-color: rgba(47, 128, 237, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.alert-warning {
    background-color: rgba(242, 153, 74, 0.1);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
        gap: 0;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-slogan {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-benefits {
        flex-direction: column;
        gap: 15px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero-logo {
        font-size: 3rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-cta {
        flex-direction: column;
    }
}
