/* ========== VARIABLES ========== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #f093fb;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    --dark: #2d3748;
    --light: #f7fafc;
    --gray: #a0aec0;
    --gray-dark: #4a5568;
    --white: #ffffff;
    --black: #000000;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.1);
    
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

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

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

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

ul, ol {
    list-style: none;
}

/* ========== HEADER STYLES ========== */

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

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

.hero-title .highlight {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 1rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem;
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    margin-bottom: 3rem;
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 0 1rem;
}

.search-input-group i {
    color: var(--gray);
    margin-right: 0.5rem;
}

.search-input-group input {
    flex: 1;
    padding: 0.75rem 0;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-select {
    padding: 0 1rem;
    border: none;
    border-radius: var(--border-radius);
    background: var(--white);
    font-size: 1rem;
    cursor: pointer;
}

/* Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ========== SECTIONS ========== */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    color: var(--gray);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.category-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.category-count {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
}

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

.opportunity-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.opportunity-card.featured {
    border: 2px solid var(--primary);
}

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

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.opportunity-type {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.type-bourse {
    background: #e3f2fd;
    color: #1976d2;
}

.type-formation {
    background: #f3e5f5;
    color: #7b1fa2;
}

.type-emploi {
    background: #e8f5e9;
    color: #388e3c;
}

.type-stage {
    background: #fff3e0;
    color: #f57c00;
}

.opportunity-deadline {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.opportunity-deadline.urgent {
    color: var(--danger);
}

.urgent-text {
    font-weight: 600;
}

.opportunity-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.opportunity-title a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.opportunity-title a:hover {
    color: var(--primary);
}

.opportunity-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.opportunity-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.opportunity-description {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.opportunity-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opportunity-stats {
    display: flex;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.875rem;
}

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

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

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

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.875rem;
}

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

.blog-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.blog-card-image {
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-card-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.blog-card-title a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.blog-card-title a:hover {
    color: var(--primary);
}

.blog-card-excerpt {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
}

.read-more:hover {
    gap: 0.5rem;
}

.blog-card-stats {
    display: flex;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.75rem;
}

/* ========== NEWSLETTER SECTION ========== */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.form-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ========== CTA SECTION ========== */
.cta-section {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

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

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ========== FOOTER STYLES ========== */
.footer {
    background: #1a1f2e;
    color: var(--white);
    position: relative;
    margin-top: 4rem;
}

/* Section principale */
.footer-main {
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, #1a1f2e 0%, #232838 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 2.5rem;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-col h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* Logo footer */
.footer-logo {
    margin-bottom: 1.5rem;
}

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

.footer-about {
    color: #f7f8fa;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Réseaux sociaux footer */
.footer-social {
    margin-top: 1.5rem;
}

.footer-social .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social .social-link {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}

.footer-social .social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Liens footer */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #a0aec0;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.footer-links a i {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-links a:hover i {
    transform: translateX(3px);
    color: var(--primary);
}

/* Contact footer */
.footer-contact {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #a0aec0;
    font-size: 0.95rem;
}

.footer-contact i {
    width: 20px;
    color: var(--primary);
    font-size: 1rem;
}

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

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

/* Newsletter mini */
.footer-newsletter {
    margin-top: 1.5rem;
}

.footer-newsletter p {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter-form-mini .input-group {
    display: flex;
    margin-bottom: 0.75rem;
}

.newsletter-form-mini input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    color: var(--white);
    font-size: 0.95rem;
}

.newsletter-form-mini input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.newsletter-form-mini button {
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form-mini button:hover {
    background: var(--primary-dark);
}

/* Badges footer */
.footer-badges {
    background: #151a26;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.badge-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #a0aec0;
    font-size: 0.9rem;
    transition: var(--transition);
}

.badge-item i {
    font-size: 1.25rem;
    color: var(--primary);
}

.badge-item:hover {
    color: var(--white);
}

/* Liens légaux footer */
.footer-legal {
    background: #151a26;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.legal-links a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.legal-links a:hover {
    color: var(--white);
}

.legal-links .separator {
    color: #4a5568;
}

/* Copyright footer */
.footer-bottom {
    background: #0f1219;
    padding: 1.5rem 0;
}

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

.copyright p {
    color: #a0aec0;
    font-size: 0.9rem;
}

.copyright .creator {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.footer-stats {
    display: flex;
    gap: 1.5rem;
}

.footer-stats span {
    color: #a0aec0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-stats i {
    color: var(--primary);
}

/* ========== BOUTON RETOUR EN HAUT ========== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ========== UTILITIES ========== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--gray);
}

.text-center {
    text-align: center;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .navbar-toggler {
        display: block;
    }
    
    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 0;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
        min-width: auto;
        animation: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .navbar-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }
    
    .notifications-dropdown,
    .user-dropdown {
        width: 100%;
    }
    
    .btn-notification,
    .btn-user {
        width: 100%;
        justify-content: space-between;
    }
    
    .notification-menu,
    .user-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        margin-top: 0;
        display: none;
        animation: none;
    }
    
    .notifications-dropdown.active .notification-menu,
    .user-dropdown.active .user-menu {
        display: block;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .legal-links .separator {
        display: none;
    }
    
    .badges-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer-main {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .notification-menu {
        width: 100%;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .footer-contact li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-form-mini .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-form-mini input[type="email"],
    .newsletter-form-mini button {
        border-radius: var(--border-radius);
    }
    
    .badges-container {
        align-items: center;
    }
    
    .badge-item {
        width: 100%;
        justify-content: center;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .header,
    .footer,
    .scroll-to-top,
    .btn,
    .hero-search {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: none;
        color: black;
    }
}

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #f093fb;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    --dark: #2d3748;
    --light: #f7fafc;
    --gray: #a0aec0;
    --white: #ffffff;
}