/* ==========================================
   VARIABLES ET RÉINITIALISATION
   ========================================== */

:root {
    --color-primary: #007bff;
    --color-secondary: #6c757d;
    --color-light: #f8f9fa;
    --color-dark: #343a40;
    --color-white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* ==========================================
   CONTAINER ET LAYOUT
   ========================================== */

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

/* ==========================================
   NAVIGATION
   ========================================== */

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

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

.logo h1 {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ffd700;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ffd700;
}

.btn-login {
    background: #ff6b6b;
    padding: 8px 20px;
    border-radius: 5px;
    transition: var(--transition);
}

.btn-login:hover {
    background: #ff5252;
    color: white !important;
}

/* ==========================================
   HERO SECTION
   ========================================== */

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

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* ==========================================
   BOUTONS
   ========================================== */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

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

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

/* ==========================================
   STATS SECTION
   ========================================== */

.stats {
    background: white;
    padding: 60px 0;
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.stats .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-card {
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: var(--shadow);
}

.stat-card h3 {
    font-size: 40px;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 16px;
    color: #666;
}

/* ==========================================
   COURSES SECTION
   ========================================== */

.courses {
    padding: 80px 0;
    background: #f5f7fa;
}

.courses h2 {
    text-align: center;
    font-size: 40px;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 18px;
}

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

.course-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 5px solid #667eea;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.course-header {
    font-size: 50px;
    margin-bottom: 20px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
}

.course-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--color-dark);
}

.course-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.course-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #999;
}

/* Couleurs par cours */
.course-card.html5 { border-top-color: #ff9500; }
.course-card.html5 .course-header { background: #ff9500; }

.course-card.css3 { border-top-color: #2196F3; }
.course-card.css3 .course-header { background: #2196F3; }

.course-card.javascript { border-top-color: #ffeb3b; }
.course-card.javascript .course-header { background: #ffeb3b; color: black; }

.course-card.php { border-top-color: #e91e63; }
.course-card.php .course-header { background: #e91e63; }

.course-card.mysql { border-top-color: #4caf50; }
.course-card.mysql .course-header { background: #4caf50; }

.course-card.reseaux { border-top-color: #f44336; }
.course-card.reseaux .course-header { background: #f44336; }

.course-card.linux { border-top-color: #333; }
.course-card.linux .course-header { background: #333; }

.course-card.aws { border-top-color: #ff9900; }
.course-card.aws .course-header { background: #ff9900; }

.course-card.cybersecurity { border-top-color: #9c27b0; }
.course-card.cybersecurity .course-header { background: #9c27b0; }

.course-card.admin-sys { border-top-color: #607d8b; }
.course-card.admin-sys .course-header { background: #607d8b; }

/* ==========================================
   CTA SECTION
   ========================================== */

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

.cta h2 {
    font-size: 40px;
    margin-bottom: 20px;
}

.cta p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: #2c3e50;
    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: 15px;
    font-size: 18px;
}

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

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #bbb;
}

/* ==========================================
   PAGE COURS
   ========================================== */

.course-page {
    min-height: 80vh;
    padding: 60px 0;
}

.course-header-page {
    padding: 60px 0;
    color: white;
    margin-bottom: 40px;
}

.course-header-page h1 {
    font-size: 40px;
    margin-bottom: 20px;
}

.course-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.course-content h2 {
    color: var(--color-primary);
    margin-top: 30px;
    margin-bottom: 15px;
}

.course-content h3 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
}

.course-content ul,
.course-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
    line-height: 1.8;
}

.code-block {
    background: #f5f5f5;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.download-btn {
    display: inline-block;
    background: #4caf50;
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    margin: 20px 0;
    transition: var(--transition);
}

.download-btn:hover {
    background: #45a049;
}

/* ==========================================
   FORMULAIRE CONTACT
   ========================================== */

.contact-page {
    min-height: 80vh;
    padding: 60px 0;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-container h1 {
    text-align: center;
    margin-bottom: 10px;
}

.contact-container p {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* ==========================================
   LOGIN PAGE
   ========================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--color-dark);
}

.login-container .form-group {
    margin-bottom: 20px;
}

.login-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.login-tabs button {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #999;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.login-tabs button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .courses h2 {
        font-size: 32px;
    }

    .cta h2 {
        font-size: 28px;
    }

    .course-header-page h1 {
        font-size: 28px;
    }

    .course-content {
        padding: 20px;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }

    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
