/* Couleurs officielles de l'EMSI */
:root {
    --primary: #0d813b;
    --secondary: #555555; 
    --dark: #2c3e50;
    --light: #f8fafc;
    --accent: #d35400; 
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background: var(--light); color: var(--dark); scroll-behavior: smooth; overflow-x: hidden; }

/* Navbar & Modern Buttons */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 0.2rem 5%; background: rgb(218, 228, 205); position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.nav-links { display: flex; list-style: none; gap: 10px; align-items: center; }

.nav-btn {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.nav-btn:hover {
    background-color: rgba(13, 129, 59, 0.08);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Style du menu déroulant (Dropdown) */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    visibility: hidden; opacity: 0; position: absolute; background-color: #ffffff;
    min-width: 220px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); border-radius: 15px;
    padding: 15px; z-index: 1000; top: 150%; left: 50%;
    transform: translateX(-50%) translateY(15px); transition: all 0.3s ease; border: 1px solid #e2e8f0;
}
.dropdown:hover .dropdown-content { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }
.dropdown-group { margin-bottom: 12px; }
.dropdown-group:last-child { margin-bottom: 0; border-top: 1px solid #f1f5f9; padding-top: 12px; }
.dropdown-group span { display: block; font-size: 0.75rem; color: #94a3b8; font-weight: bold; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.dropdown-content a { color: var(--dark); padding: 10px 15px; text-decoration: none; display: block; border-radius: 8px; font-weight: 500; font-size: 0.95rem; transition: 0.3s; }
.dropdown-content a:hover { background-color: var(--primary); color: white; padding-left: 20px; }

/* ================= HERO SECTION ================= */
.animated-bg {
    min-height: 90vh; background: linear-gradient(-45deg, #0d813b, #1a252f, #2c3e50, #0a3d1f);
    background-size: 400% 400%; animation: gradientBG 15s ease infinite; position: relative;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.hero-content { text-align: center; color: white; max-width: 900px; z-index: 10; padding: 0 20px; }
.glowing-badge {
    display: inline-block; padding: 8px 25px; background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff;
    border-radius: 30px; font-size: 1rem; font-weight: 500; margin-bottom: 25px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.main-title { font-size: 4rem; font-weight: 800; margin-bottom: 1.5rem; line-height: 1.2; text-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.highlight { color: #a8d5ba; }
.hero-desc { font-size: 1.25rem; margin-bottom: 2.5rem; line-height: 1.6; text-shadow: 0 2px 10px rgba(0,0,0,0.5); opacity: 0.95; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary, .btn-secondary { padding: 12px 30px; text-decoration: none; border-radius: 25px; font-weight: bold; transition: all 0.3s; border: none; cursor: pointer; display: flex; align-items: center; gap: 10px;}
.btn-primary { background-color: var(--primary); color: white; box-shadow: 0 0 20px rgba(13, 129, 59, 0.6); }
.btn-primary:hover { background-color: #0a632d; transform: translateY(-3px); }
.btn-secondary { background-color: rgba(255, 255, 255, 0.1); backdrop-filter: blur(5px); border: 2px solid white; color: white; }
.btn-secondary:hover { background-color: white; color: var(--dark); transform: translateY(-3px); }

.floating-shapes .shape { position: absolute; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(5px); border-radius: 50%; animation: float 6s infinite ease-in-out; }
.shape-1 { width: 150px; height: 150px; top: 10%; left: 10%; animation-delay: 0s; }
.shape-2 { width: 250px; height: 250px; bottom: 20%; right: 5%; animation-delay: 2s; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
.shape-3 { width: 100px; height: 100px; top: 40%; right: 20%; animation-delay: 4s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(10deg); } }

/* Stats Bar */
.floating-stats {
    position: relative; display: flex; justify-content: space-around; padding: 2rem 5%;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); margin-top: -60px;
    width: 80%; margin-left: auto; margin-right: auto; border-radius: 15px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); z-index: 11;
}
.stat-item { text-align: center; }
.stat-item h3 { color: var(--primary); font-size: 2rem; }

/* General Sections */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; color: var(--dark); margin-bottom: 0.5rem; }
.section-header p { color: #64748b; font-size: 1.1rem; }

/* ================= ROADMAP SECTION ================= */
.roadmap-section { padding: 6rem 5%; background: #f8fafc; }
.timeline { position: relative; max-width: 1000px; margin: 0 auto; padding: 40px 0; }
.timeline::after {
    content: ''; position: absolute; width: 4px; background: rgba(13, 129, 59, 0.2);
    top: 0; bottom: 0; left: 50%; margin-left: -2px; border-radius: 2px;
}
.timeline-item {
    padding: 10px 40px; position: relative; background-color: inherit; width: 50%;
    opacity: 0; transform: translateY(30px); transition: all 0.6s ease;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; }

.timeline-dot {
    position: absolute; width: 20px; height: 20px; right: -10px; background-color: white;
    border: 4px solid var(--primary); top: 50%; transform: translateY(-50%); border-radius: 50%; z-index: 1;
}
.timeline-item.right .timeline-dot { left: -10px; }
.dot-active { background-color: var(--accent); border-color: white; box-shadow: 0 0 10px var(--accent); }

.glass-card {
    padding: 25px; background: white; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(13, 129, 59, 0.1); transition: transform 0.3s, box-shadow 0.3s; position: relative;
}
.glass-card:hover { transform: scale(1.05); box-shadow: 0 15px 40px rgba(13, 129, 59, 0.15); border-color: var(--primary); }
.active-card { background: linear-gradient(135deg, rgba(13,129,59,0.05), rgba(13,129,59,0.1)); border: 2px solid var(--primary); }
.icon-glow { font-size: 2.5rem; color: var(--primary); margin-bottom: 10px; filter: drop-shadow(0 0 5px rgba(13,129,59,0.3)); }

/* ================= Nouveaux ajouts de la roadmap (Années et matières) ================= */
.module-list { list-style: none; margin-top: 15px; padding-left: 0; }
.module-list li { font-size: 0.85rem; color: #64748b; padding: 4px 0; border-bottom: 1px dashed rgba(13, 129, 59, 0.1); text-align: inherit; }
.module-list li::before { content: "•"; color: var(--primary); font-weight: bold; display: inline-block; width: 1em; }

.timeline-year { text-align: center; margin: 40px 0; position: relative; z-index: 2; }
.timeline-year span { background: var(--primary); color: white; padding: 8px 25px; border-radius: 30px; font-weight: bold; font-size: 0.9rem; box-shadow: 0 5px 15px rgba(13, 129, 59, 0.3); }
.year-active span { background: var(--accent); box-shadow: 0 5px 15px rgba(211, 84, 0, 0.3); }
/* ========================================================================= */

/* Courses Section */
.courses-section { padding: 5rem 5%; background: white; }
.filters { display: flex; justify-content: center; gap: 10px; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-btn { padding: 8px 18px; border: 2px solid var(--primary); background: transparent; color: var(--primary); border-radius: 20px; cursor: pointer; transition: 0.3s; font-weight: 600; }
.filter-btn.active, .filter-btn:hover { background: var(--primary); color: white; }

.courses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.course-card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: 0.4s ease; position: relative; cursor: pointer; border: 1px solid #e2e8f0;}
.course-card:hover { transform: translateY(-15px); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.course-card img { width: 100%; height: 200px; object-fit: cover; }
.badge-bestseller { position: absolute; top: 15px; right: 15px; background: var(--accent); color: white; padding: 5px 12px; border-radius: 5px; font-weight: bold; font-size: 0.7rem; }
.course-info { padding: 20px; }
.course-info h3 { font-size: 1.2rem; margin-bottom: 5px; color: var(--dark); }
.instructor { color: #64748b; font-size: 0.9rem; margin-bottom: 15px; }
.course-meta { display: flex; justify-content: space-between; color: var(--primary); font-size: 0.95rem; font-weight: 500; border-top: 1px solid #e2e8f0; padding-top: 15px; }

/* Professor Section */
.professor-section { background: var(--dark); color: white; padding: 5rem 5%; text-align: center; }
.prof-container { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; max-width: 800px; margin: 0 auto; }
.prof-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 5px solid white; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.prof-name { color: var(--accent); margin: 0.5rem 0 1rem; font-size: 2rem; }

/* Team Section */
.team-section { padding: 5rem 5%; background: white; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.team-member { background: white; padding: 2rem; border-radius: 20px; text-align: center; transition: 0.3s; border: 1px solid #e2e8f0; }
.member-img { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 1.5rem; overflow: hidden; border: 4px solid var(--primary); padding: 5px; }
.member-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.team-member:hover { background: var(--primary); color: white; }
.team-member:hover .member-img { border-color: white; }
.team-member h3 { margin-bottom: 5px; }
.team-member p { font-size: 0.9rem; opacity: 0.9; }

/* Footer */
.footer { background: var(--dark); color: white; padding: 4rem 5% 2rem; text-align: center; }
.footer-logo { font-size: 1.8rem; font-weight: 800; margin-bottom: 1rem; }
.footer-logo span { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; margin-top: 2rem; font-size: 0.9rem; color: #94a3b8; }

/* Modal Styles */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); backdrop-filter: blur(5px); }
.modal-content { background-color: #fff; margin: 5% auto; padding: 40px; border-radius: 20px; width: 90%; max-width: 600px; position: relative; animation: slideDown 0.4s ease; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.close-modal { position: absolute; right: 25px; top: 20px; font-size: 30px; cursor: pointer; color: #64748b; transition: 0.3s; }
.close-modal:hover { color: #e74c3c; transform: rotate(90deg); }

.modal-header h2 { text-align: left; color: var(--primary); margin-bottom: 5px; font-size: 1.8rem; }
.modal-header p { color: #64748b; font-weight: 500; border-bottom: 2px solid #f1f5f9; padding-bottom: 15px; }
.modal-info { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0; padding: 20px; background: #f8fafc; border-radius: 10px; border: 1px solid #e2e8f0; }

.downloads-container { display: flex; flex-direction: column; gap: 12px; margin-top: 25px; }
.btn-download { display: inline-block; padding: 12px 20px; border-radius: 10px; text-decoration: none; font-weight: 600; text-align: left; transition: all 0.3s ease; border: 1px solid transparent; }
.btn-download.btn-multiple { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.btn-download.btn-multiple i { margin-right: 10px; font-size: 1.2rem; }
.btn-download.btn-multiple:hover { background: #dc2626; color: white; transform: translateX(5px); box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2); }

/* Responsive Design */
@media (max-width: 992px) {
    .nav-links { position: fixed; top: 0; right: -100%; width: 250px; height: 100vh; background: white; flex-direction: column; justify-content: center; align-items: center; padding: 2rem; box-shadow: -5px 0 15px rgba(0,0,0,0.1); z-index: 1000; }
    .nav-links.active { right: 0; }
    .hamburger { display: block; }
    .main-title { font-size: 3rem; }
}

@media (max-width: 768px) {
    .stats-bar { flex-direction: column; gap: 2rem; padding: 2rem; margin-top: -30px; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; text-align: left; }
    .timeline-item.right { left: 0%; }
    .timeline-item.left .timeline-dot, .timeline-item.right .timeline-dot { left: 21px; }
    .main-title { font-size: 2.2rem; }
    .section-header h2 { font-size: 2rem; }
    .modal-content { padding: 25px; margin: 15% auto; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }