/**
 * Fichier CSS principal pour AlgoCodeBF
 * Design moderne, responsive et professionnel
 */

/* ========================================
   Variables et Reset - Palette Burkinabè Tech 🇧🇫
   ======================================== */
:root {
    /* Couleurs patriotiques burkinabè (inspirées du drapeau) */
    --primary-color: #C8102E;        /* Rouge foncé - énergie & action */
    --secondary-color: #006A4E;      /* Vert forêt - croissance & innovation */
    --accent-color: #FFD100;         /* Jaune or - optimisme & créativité */
    
    /* Couleurs modernes tech/startup */
    --tech-blue: #007BFF;            /* Bleu électrique - digital & confiance */
    --tech-purple: #6C63FF;          /* Violet tech - créativité & intelligence */
    
    /* Couleurs fonctionnelles */
    --danger-color: #C8102E;         /* Rouge burkinabè */
    --warning-color: #FFD100;        /* Jaune or */
    --success-color: #006A4E;        /* Vert burkinabè */
    
    /* Neutres & backgrounds */
    --dark-color: #2E2E2E;           /* Gris foncé tech - texte principal */
    --light-color: #F5F5F5;          /* Blanc cassé - background */
    --gray-color: #E0E0E0;           /* Gris clair - séparateurs */
    --white-color: #ffffff;
    
    /* Dégradés patriotiques */
    --gradient-burkinabe: linear-gradient(135deg, #C8102E 0%, #FFD100 50%, #006A4E 100%);
    --gradient-action: linear-gradient(135deg, #C8102E 0%, #FF4655 100%);
    --gradient-innovation: linear-gradient(135deg, #006A4E 0%, #00A86B 100%);
    --gradient-tech: linear-gradient(135deg, #007BFF 0%, #6C63FF 100%);
    
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --box-shadow: 0 4px 20px rgba(200, 16, 46, 0.15);
}

/* ========================================
   Variables Admin (couleurs originales préservées)
   ======================================== */
.admin-dashboard-ultra,
.admin-container,
.admin-panel {
    /* Restaurer les couleurs originales pour l'admin */
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --success-color: #27ae60;
    
    /* Restaurer le box-shadow original */
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    padding-top: 70px; /* Compenser le header fixe */
}

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

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

ul {
    list-style: none;
}

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

/* ========================================
   Container & Grid
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid transparent;
    border-image: var(--gradient-burkinabe) 1;
}

.section-header h2 {
    font-size: 28px;
    color: var(--dark-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    background: var(--gradient-burkinabe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    background-color: var(--white-color);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    transition: top 0.3s ease, box-shadow 0.3s ease;
}

/* Sur desktop uniquement, utiliser transform */
@media (min-width: 769px) {
    .navbar {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        transform: translateY(0);
    }
    
    .navbar.hidden {
        transform: translateY(-100%);
    }
}

/* Sur mobile, utiliser top au lieu de transform pour éviter le conflit avec position: fixed */
@media (max-width: 768px) {
    .navbar {
        top: 0;
        transform: none !important;
    }
    
    .navbar.hidden {
        top: -70px;
        transform: none !important;
    }
}

/* Header visible lors du scroll vers le haut */
.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 30px;
    min-height: 70px;
    position: relative;
}

/* Section des actions (recherche + boutons) */
.navbar .container > .search-toggle {
    margin-left: auto;
}

/* Logo */
.nav-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-brand a {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-brand .logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    transition: var(--transition);
    background: var(--gradient-burkinabe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    display: flex;
    align-items: center;
}

.nav-brand .logo:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Toggle button mobile - Style iOS minimaliste */
.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    padding: 10px;
    width: 46px;
    height: 46px;
    position: relative;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.nav-toggle:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.nav-toggle:active {
    transform: scale(0.95);
}

/* Conteneur des lignes du hamburger */
.hamburger-box {
    width: 20px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #000;
    border-radius: 2px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Animation du hamburger vers X style iOS */
.nav-toggle.active {
    background: rgba(255, 255, 255, 0.95);
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* Menu navigation - Desktop : dans le header */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    height: 100%;
}

/* Forcer le positionnement sur desktop */
@media (min-width: 769px) {
    .nav-menu {
        position: relative !important;
        bottom: auto !important;
    }
}

.nav-menu li {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-menu > li > a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Cacher les icônes et labels sur desktop */
.nav-menu > li > a i,
.nav-menu > li > a .dock-label {
    display: none;
}

/* Afficher le texte sur desktop avec les data-label */
.nav-menu > li > a::before {
    content: attr(data-label);
}

.nav-menu > li > a:hover {
    background-color: rgba(200, 16, 46, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Effet underline animé */
.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: var(--primary-color);
    transition: transform 0.3s ease;
}

.nav-menu > li > a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Boutons connexion/inscription - Version compacte */
.btn-login {
    padding: 10px 20px !important;
    background: var(--gradient-action);
    color: white !important;
    border-radius: 22px !important;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(200, 16, 46, 0.3);
    white-space: nowrap;
    height: 44px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 16, 46, 0.5);
    background: linear-gradient(135deg, #FF4655 0%, #C8102E 100%);
}

.btn-login i {
    font-size: 14px;
    line-height: 1;
}

.btn-register {
    padding: 0 !important;
    background: var(--gradient-innovation);
    color: white !important;
    border-radius: 50% !important;
    font-weight: 600;
    font-size: 17px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 106, 78, 0.3);
    position: relative;
}

.btn-register:hover {
    transform: translateY(-2px) rotate(360deg);
    box-shadow: 0 5px 15px rgba(0, 106, 78, 0.5);
    background: linear-gradient(135deg, #00A86B 0%, #006A4E 100%);
}

.btn-register i {
    line-height: 1;
}

.btn-register::after {
    content: 'Inscription';
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--dark-color);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    font-weight: 500;
}

.btn-register:hover::after {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    bottom: -32px;
}

/* Dropdown menu */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.dropdown-toggle i {
    line-height: 1;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 9px;
    transition: transform 0.3s ease;
    line-height: 1;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--white-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background-color: rgba(52, 152, 219, 0.08);
    color: var(--primary-color);
    padding-left: 24px;
}

.dropdown-menu a i {
    width: 18px;
    text-align: center;
    color: var(--primary-color);
}

.dropdown-menu hr {
    margin: 8px 15px;
    border: none;
    border-top: 1px solid rgba(0,0,0,0.08);
}

/* Icône de recherche */
.search-toggle {
    background: rgba(52, 152, 219, 0.08);
    border: 1px solid rgba(52, 152, 219, 0.2);
    font-size: 18px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    border-radius: 10px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.search-toggle:hover {
    background-color: rgba(52, 152, 219, 0.15);
    color: var(--primary-color);
    transform: scale(1.08);
    border-color: rgba(52, 152, 219, 0.4);
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.2);
}

.search-toggle i {
    line-height: 1;
    display: block;
}

/* Overlay de recherche */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    transform: translateY(-50px);
    transition: transform 0.4s ease;
}

.search-overlay.active .search-overlay-content {
    transform: translateY(0);
}

.search-form-overlay {
    display: flex;
    gap: 15px;
    background: var(--white-color);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-form-overlay input {
    flex: 1;
    padding: 18px 30px;
    border: none;
    background: transparent;
    font-size: 18px;
    outline: none;
    color: var(--dark-color);
}

.search-form-overlay input::placeholder {
    color: var(--gray-color);
}

.search-form-overlay button {
    padding: 15px 35px;
    background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
    color: var(--white-color);
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-form-overlay button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

.search-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ========================================
   Alerts
   ======================================== */
.alert {
    padding: 15px 0;
    margin-bottom: 0;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

/* Forcer la visibilité du texte */
.btn,
a.btn,
button.btn {
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
}

.btn-primary {
    background: var(--gradient-action);
    color: white !important;
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(200, 16, 46, 0.4);
    color: white !important;
}

.btn-secondary {
    background: var(--gradient-innovation);
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 106, 78, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 106, 78, 0.4);
    color: white !important;
}

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

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

.btn-lg {
    padding: 15px 35px;
    font-size: 18px;
}

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
    color: var(--white-color);
    padding: 80px 0;
    text-align: center;
}

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

.hero-subtitle {
    font-size: 22px;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

/* ========================================
   Stats Section - Ultra Modern & Mobile First
   ======================================== */
.stats-section {
    padding: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
    margin-top: -40px;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(52, 152, 219, 0.3) 25%, 
        rgba(46, 204, 113, 0.3) 75%, 
        transparent 100%);
}

.stats-section .container {
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 40px 0;
}

.stat-card {
    position: relative;
    text-align: center;
    padding: 32px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.08) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.stat-card:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(52, 152, 219, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(52, 152, 219, 0.3);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 
        0 8px 24px rgba(52, 152, 219, 0.25),
        inset 0 -2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.stat-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.4s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 12px 32px rgba(52, 152, 219, 0.35),
        inset 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.stat-card:hover .stat-icon::before {
    opacity: 0.6;
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
    position: relative;
    display: inline-block;
}

.stat-number::after {
    content: '+';
    font-size: 24px;
    margin-left: 4px;
    opacity: 0.7;
}

.stat-label {
    font-size: 15px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animation de compteur au chargement */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: countUp 0.6s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   Content Sections
   ======================================== */
.content-section {
    padding: 60px 0;
}

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

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.posts-grid > p,
.tutorials-grid > p,
.blog-grid > p {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(46, 204, 113, 0.05) 100%);
    border-radius: 12px;
    border: 2px dashed rgba(52, 152, 219, 0.2);
    color: var(--gray-color);
    font-size: 16px;
    font-weight: 500;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ========================================
   Cards
   ======================================== */
.post-card {
    background-color: var(--white-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: rgba(52, 152, 219, 0.2);
}

.post-card:hover::before {
    opacity: 1;
}

.tutorial-card,
.blog-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.tutorial-card {
    display: flex;
    flex-direction: column;
}

.tutorial-card:hover,
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.btn-view-tutorial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    margin-top: auto;
    align-self: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    width: fit-content;
}

.btn-view-tutorial:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.5);
    color: white;
}

.btn-view-tutorial i {
    transition: transform 0.3s ease;
}

.btn-view-tutorial:hover i {
    transform: translateX(4px);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.post-author {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.post-author > div {
    min-width: 0;
    flex: 1;
}

.post-author strong {
    display: block;
    color: var(--dark-color);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-date {
    font-size: 12px;
    color: var(--gray-color);
    display: block;
    margin-top: 2px;
}

.post-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.post-card h3 a {
    color: var(--dark-color);
    transition: color 0.2s ease;
}

.post-card h3 a:hover {
    color: var(--primary-color);
}

.post-card p {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 16px;
}

.tutorial-card h3,
.blog-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.tutorial-card h3 a,
.blog-card h3 a {
    color: var(--dark-color);
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    color: var(--gray-color);
    font-size: 13px;
}

.post-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.post-footer span:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.post-footer span i {
    font-size: 12px;
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--light-color);
    color: var(--gray-color);
    font-size: 14px;
}

.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-xs {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder-xs {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

/* ========================================
   Badges
   ======================================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

.badge-secondary {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #2ecc71 0%, #3498db 100%);
    color: var(--white-color);
    text-align: center;
}

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

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

/* ========================================
   Forms
   ======================================== */
.auth-section {
    padding: 60px 0;
    min-height: calc(100vh - 400px);
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    max-width: 450px;
    width: 100%;
}

.auth-card-large {
    max-width: 700px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--gray-color);
}

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

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-color);
    border-radius: var(--border-radius);
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    display: flex;
}

.input-group-text {
    padding: 12px 15px;
    background-color: var(--light-color);
    border: 1px solid var(--light-color);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group .form-control {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--light-color);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 60px 0 30px;
    margin-top: 60px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
}

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

.footer-section a {
    color: var(--light-color);
}

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
}

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

/* Cacher le lien mobile-only sur desktop */
.mobile-only-link {
    display: none;
}

/* Icônes desktop auth - Cachées sur mobile */
.desktop-auth-icons {
    display: none;
}

@media (min-width: 769px) {
    .desktop-auth-icons {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    
    .desktop-auth-icons a {
        font-size: 24px;
        color: var(--dark-color);
        padding: 10px;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
    }
    
    .desktop-auth-icons a:hover {
        color: var(--primary-color);
        transform: translateY(-2px);
    }
}

/* Cacher le menu burger sur desktop */
.burger-menu {
    display: none;
}

/* ========================================
   Ajustements pour grands écrans
   ======================================== */
@media (min-width: 1200px) {
    .navbar .container {
        max-width: 1400px;
        padding: 18px 40px;
    }
    
    .nav-menu {
        gap: 12px;
    }
    
    .nav-menu > li > a {
        padding: 10px 18px;
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: nowrap;
        padding: 12px 20px;
        min-height: 60px;
        gap: 15px;
        justify-content: space-between;
    }
    
    .nav-toggle {
        display: flex;
        order: 3;
        z-index: 99999 !important;
    }
    
    .nav-brand {
        order: 1;
        flex: 1;
    }
    
    .nav-brand .logo {
        font-size: 22px;
    }
    
    .search-toggle {
        order: 2;
        margin-left: auto;
        margin-right: 10px;
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        font-size: 17px;
        background: rgba(52, 152, 219, 0.12);
        border: 1px solid rgba(52, 152, 219, 0.25);
    }
    
    .search-form-overlay {
        flex-direction: column;
        border-radius: 20px;
        padding: 20px;
    }
    
    .search-form-overlay input {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .search-form-overlay button {
        width: 100%;
        padding: 15px 20px;
    }
    
    .search-close {
        top: -70px;
        right: 10px;
    }
    
    /* Dock Style iOS - Menu flottant en bas */
    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) !important;
        gap: 4px !important;
        justify-content: space-around !important;
        align-items: center !important;
        height: auto !important;
        
        /* Background solide pour performance */
        background: rgba(255, 255, 255, 0.98) !important;
        
        /* Ombre style iOS */
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08) !important;
        border-top: 0.5px solid rgba(0, 0, 0, 0.1) !important;
        
        z-index: 9999 !important;
        
        /* Isolation GPU complète */
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
        will-change: contents !important;
    }
    
    /* Items du Dock */
    .nav-menu > li {
        position: relative;
        display: flex !important;
        flex: 1;
        max-width: 72px;
        height: auto;
    }
    
    /* Cacher les liens secondaires - ils sont dans le burger */
    .nav-menu > li.secondary-link {
        display: none !important;
    }
    
    /* Le dropdown est caché sur mobile, on affiche le lien direct à la place */
    .nav-menu > li.dropdown {
        display: none !important;
    }
    
    .nav-menu > li.mobile-only-link {
        display: flex !important;
    }
    
    
    /* Liens du Dock - Icône + texte */
    .nav-menu > li > a {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 4px 2px;
        border-radius: 10px;
        background: transparent;
        font-size: 10px;
        font-weight: 600;
        color: #8E8E93;
        text-align: center;
        gap: 0px;
        height: auto;
    }
    
    /* Désactiver le pseudo-element ::before sur mobile */
    .nav-menu > li > a::before {
        content: none;
    }
    
    /* Icônes Font Awesome - Afficher sur mobile */
    .nav-menu > li > a i {
        display: block !important;
        font-size: 24px;
        color: #8E8E93;
        line-height: 0.9;
        margin-bottom: 0;
    }
    
    /* Afficher le texte directement dans le HTML, pas en CSS */
    .nav-menu > li > a::after {
        display: none;
    }
    
    /* Le texte est maintenant directement dans le HTML */
    .nav-menu > li > a {
        font-size: 10px !important;
        font-weight: 600 !important;
        color: #8E8E93 !important;
        text-align: center !important;
        line-height: 1 !important;
    }
    
    /* Supprimer tout espace entre l'icône et le label */
    .nav-menu > li > a > * {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .dock-label {
        display: none;
    }
    
    @media (max-width: 768px) {
        .dock-label {
            display: block !important;
            font-size: 10px !important;
            font-weight: 600 !important;
            color: #8E8E93 !important;
            margin-top: 0px !important;
            line-height: 1.1 !important;
        }
    }
    
    /* Style des icônes */
    .nav-menu > li > a i {
        display: block !important;
        margin-bottom: 0px !important;
        line-height: 1 !important;
    }
    
    /* Effet au tap */
    .nav-menu > li > a:active {
        transform: scale(0.88);
        opacity: 0.6;
    }
    
    /* Page active */
    .nav-menu > li > a.active {
        color: #007AFF;
    }
    
    .nav-menu > li > a.active i {
        color: #007AFF;
    }
    
    /* Boutons Login/Register - même style que les autres liens du Dock */
    .btn-login,
    .btn-register {
        width: 100% !important;
        height: auto !important;
        min-width: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 4px 2px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        justify-content: center;
        border-radius: 10px !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        gap: 2px !important;
        background: transparent !important;
        border: none !important;
        color: #8E8E93 !important;
        transition: all 0.15s ease !important;
        box-shadow: none !important;
    }
    
    .btn-login:hover,
    .btn-register:hover {
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    
    .btn-login:active,
    .btn-register:active {
        transform: scale(0.88) !important;
        opacity: 0.6 !important;
    }
    
    .btn-login i {
        font-size: 24px !important;
        color: #8E8E93 !important;
        line-height: 1 !important;
    }
    
    .btn-register i {
        font-size: 24px !important;
        color: #8E8E93 !important;
        line-height: 1 !important;
    }
    
    .btn-login::after {
        content: attr(data-label) !important;
        display: block !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        color: currentColor !important;
        white-space: nowrap !important;
        margin-top: 2px !important;
        line-height: 1 !important;
        position: static !important;
        opacity: 1 !important;
        transform: none !important;
        background: transparent !important;
        padding: 0 !important;
    }
    
    .btn-register::after {
        content: attr(data-label) !important;
        display: block !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        color: currentColor !important;
        white-space: nowrap !important;
        margin-top: 2px !important;
        line-height: 1 !important;
        position: static !important;
        opacity: 1 !important;
        transform: none !important;
        background: transparent !important;
        padding: 0 !important;
    }
    
    /* Menu burger pour les liens secondaires - UNIQUEMENT SUR MOBILE */
    .burger-menu {
        display: block;
        position: fixed;
        top: 60px;
        right: 0;
        width: 280px;
        max-height: calc(100vh - 140px);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        box-shadow: -4px 4px 24px rgba(0, 0, 0, 0.15);
        border-radius: 20px 0 0 20px;
        padding: 20px 0;
        z-index: 99998 !important;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), top 0.3s ease;
    }
    
    /* Ajuster la position du burger menu quand le header est caché */
    .navbar.hidden ~ * .burger-menu {
        top: 0;
    }
    
    .burger-menu.active {
        transform: translateX(0);
    }
    
    .burger-menu a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 20px;
        color: #000;
        font-size: 15px;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .burger-menu a:active {
        background: rgba(0, 0, 0, 0.05);
    }
    
    .burger-menu a i {
        width: 24px;
        text-align: center;
        color: #007AFF;
        font-size: 18px;
    }
    
    .burger-menu hr {
        margin: 12px 20px;
        border: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    /* Le dropdown devient visible dans le burger menu */
    .dropdown-menu {
        display: none !important;
    }
    
    .dropdown:hover .dropdown-menu {
        display: none !important;
    }
    
    .dropdown.active .dropdown-menu {
        display: none !important;
    }
    
    /* L'icône du dropdown est cachée du Dock */
    .dropdown {
        display: none !important;
    }
    
    /* Ajouter un padding pour éviter que le contenu soit caché */
    body {
        padding-top: 60px !important; /* Compenser le header mobile en haut */
        padding-bottom: 80px !important; /* Compenser le dock en bas */
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 4px;
    }
    
    .tutorials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card {
        padding: 16px;
        border-radius: 10px;
    }
    
    .btn-view-tutorial {
        padding: 8px 16px;
        font-size: 0.85rem;
        margin-top: 12px;
    }
    
    .btn-view-tutorial i {
        font-size: 0.8rem;
    }
    
    .post-card h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .post-card p {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .post-header {
        margin-bottom: 12px;
        gap: 8px;
    }
    
    .post-author {
        gap: 10px;
    }
    
    .post-author strong {
        font-size: 13px;
    }
    
    .post-date {
        font-size: 11px;
    }
    
    .post-footer {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .post-footer span {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    .section-header {
        margin-bottom: 24px;
        padding-bottom: 12px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .section-header h2 {
        font-size: 22px;
        gap: 10px;
    }
    
    .section-header h2 i {
        font-size: 20px;
    }
    
    .section-header .btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .content-section {
        padding: 40px 0;
    }
    
    .posts-grid > p,
    .tutorials-grid > p,
    .blog-grid > p {
        padding: 40px 16px;
        font-size: 14px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Stats Section - Mobile First Ultra Pro */
    .stats-section {
        margin-top: -30px;
        padding: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 30px 0;
    }
    
    .stat-card {
        padding: 24px 16px;
        border-radius: 14px;
    }
    
    .stat-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
    
    .stat-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
        border-radius: 14px;
        margin-bottom: 10px;
    }
    
    .stat-card:hover .stat-icon {
        transform: scale(1.08) rotate(3deg);
    }
    
    .stat-number {
        font-size: 32px;
        margin-bottom: 6px;
    }
    
    .stat-number::after {
        font-size: 18px;
        margin-left: 2px;
    }
    
    .stat-label {
        font-size: 12px;
        letter-spacing: 0.3px;
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
}

/* Tablettes - 2 colonnes pour tutoriels */
@media (min-width: 769px) and (max-width: 1024px) {
    .tutorials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Très petits écrans - Stats en colonne unique */
@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 28px 20px;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .stat-label {
        font-size: 13px;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.main-content {
    min-height: calc(100vh - 500px);
}

/* ========================================
   Hero Carousel Section
   ======================================== */
.hero-carousel {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    padding: 0;
    margin: 0;
    z-index: 10;
}

.carousel-container {
    position: relative;
    width: 100%;
    min-height: 600px;
    height: auto;
    overflow: visible;
    z-index: 10;
    padding-bottom: 20px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 600px;
    height: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow: visible;
    visibility: hidden;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    position: relative;
    overflow: visible;
}

.slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    min-height: 600px;
    height: auto;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    align-items: center;
    overflow: visible;
}

/* Compartiment Gauche - Contenu */
.slide-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 40px;
    z-index: 2;
    overflow: visible;
    min-height: auto;
}

.slide-text {
    animation: slideInLeft 0.8s ease-out;
    overflow: visible;
    width: 100%;
}

.slide-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.slide-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.slide-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.slide-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    overflow: visible;
    z-index: 10;
}

.slide-buttons .btn {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
    position: relative;
    white-space: nowrap;
}

.slide-buttons .btn-primary {
    background: white;
    color: var(--primary-color) !important;
}

.slide-buttons .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    background: var(--light-color);
    color: var(--primary-color) !important;
}

.slide-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.slide-buttons .btn-secondary:hover {
    background: white;
    color: var(--primary-color) !important;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.slide-stats {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.slide-stats .stat-item {
    display: flex;
    flex-direction: column;
}

.slide-stats .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.slide-stats .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

/* Compartiment Droit - Image */
.slide-right {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.slide-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-image img {
    width: 100%;
    max-width: 550px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* Navigation du Carousel */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    font-size: 1.2rem;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* Indicateurs */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

@media (max-width: 768px) {
    .carousel-indicators {
        bottom: 10px;
    }
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    width: 40px;
    border-radius: 10px;
    background: white;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Pas d'animations pour éviter les repaints */

/* Responsive Design */
@media (max-width: 768px) {
    .hero-carousel {
        overflow: visible;
        padding: 0;
        min-height: auto;
    }
    
    .carousel-container {
        height: auto;
        min-height: auto;
        overflow: visible;
        padding-bottom: 60px;
        display: flex;
        flex-direction: column;
    }
    
    .carousel-slide {
        height: auto;
        min-height: auto;
        overflow: visible;
        position: static !important;
        display: none;
    }
    
    .carousel-slide.active {
        position: static !important;
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .slide-content {
        display: flex;
        flex-direction: column;
        padding: 25px 20px 20px;
        gap: 20px;
        overflow: visible;
        height: auto;
        min-height: auto;
    }
    
    .slide-left {
        padding-right: 0;
        order: 2;
        overflow: visible;
        width: 100%;
    }
    
    .slide-right {
        order: 1;
        overflow: visible;
        max-height: 280px;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .slide-badge {
        margin-bottom: 12px;
        padding: 6px 16px;
        font-size: 0.8rem;
    }
    
    .slide-title {
        font-size: 1.75rem;
        word-wrap: break-word;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .slide-description {
        font-size: 0.95rem;
        word-wrap: break-word;
        margin-bottom: 20px;
        line-height: 1.6;
    }
    
    .slide-buttons {
        flex-direction: row;
        overflow: visible;
        gap: 10px;
        margin-bottom: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .slide-buttons .btn {
        width: auto;
        max-width: 215px;
        justify-content: center;
        white-space: nowrap;
        text-align: center;
        padding: 12px 30px;
        font-size: 0.94rem;
    }
    
    .slide-stats {
        gap: 15px;
        flex-wrap: wrap;
        margin-top: 15px;
        justify-content: space-around;
    }
    
    .slide-stats .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .slide-stats .stat-number {
        font-size: 1.5rem;
        margin-bottom: 2px;
    }
    
    .slide-stats .stat-label {
        font-size: 0.85rem;
    }
    
    .slide-image {
        max-height: 280px;
        overflow: hidden;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .slide-image img {
        max-width: 95%;
        max-height: 260px;
        object-fit: contain;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
}

/* Très petits écrans - Encore plus compact */
@media (max-width: 480px) {
    .carousel-container {
        padding-bottom: 50px !important;
    }
    
    .slide-content {
        padding: 20px 15px 15px !important;
        gap: 15px !important;
    }
    
    .slide-badge {
        font-size: 0.75rem;
        padding: 5px 14px;
        margin-bottom: 10px;
    }
    
    .slide-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .slide-description {
        font-size: 0.9rem;
        margin-bottom: 15px;
        line-height: 1.5;
    }
    
    .slide-buttons {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .slide-buttons .btn {
        padding: 10px 22px;
        font-size: 0.88rem;
        max-width: 180px;
    }
    
    .slide-stats {
        gap: 10px;
        margin-top: 10px;
    }
    
    .slide-stats .stat-number {
        font-size: 1.3rem;
    }
    
    .slide-stats .stat-label {
        font-size: 0.8rem;
    }
    
    .slide-right {
        max-height: 220px;
    }
    
    .slide-image {
        max-height: 220px;
    }
    
    .slide-image img {
        max-height: 200px;
        max-width: 90%;
    }
    
    .carousel-indicators {
        bottom: 5px;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* ========================================
   AVATAR STYLES
   ======================================== */
.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.avatar-xs {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary-color);
}

.avatar-placeholder-xs {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    border: 1px solid var(--primary-color);
}

/* ========================================
   POST CARD STYLES
   ======================================== */
.post-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-color);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(200, 16, 46, 0.2);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}


.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.post-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.post-author strong {
    color: var(--dark-color);
    font-size: 0.95rem;
}

.post-date {
    color: #666;
    font-size: 0.8rem;
}

.post-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

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

.post-card h3 a:hover {
    color: var(--primary-color);
}

.post-card p {
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.post-stats {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #666;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-actions {
    display: flex;
    gap: 10px;
}

.btn-reply {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-reply:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.badge-secondary {
    background: var(--gray-color);
    color: var(--dark-color);
}

/* ========================================
   BLOG CARD STYLES
   ======================================== */
.blog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-color);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(200, 16, 46, 0.2);
}

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

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.blog-content {
    padding: 20px;
}

.blog-content h3 {
    margin: 10px 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

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

.blog-content h3 a:hover {
    color: var(--primary-color);
}

.blog-content p {
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.blog-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-read-more:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
    color: white;
}

.btn-read-more i {
    font-size: 0.7rem;
}

/* ========================================
   TUTORIAL CARD STYLES
   ======================================== */
.tutorial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-color);
    position: relative;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(200, 16, 46, 0.2);
}

.tutorial-type {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.tutorial-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

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

.tutorial-card h3 a:hover {
    color: var(--primary-color);
}

.tutorial-card p {
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tutorial-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
}

.tutorial-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
}

.tutorial-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-view-tutorial {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-view-tutorial:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
}

/* ========================================
   GRID LAYOUTS
   ======================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .posts-grid,
    .tutorials-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .posts-grid,
    .tutorials-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .post-card,
    .tutorial-card,
    .blog-card {
        padding: 15px;
    }
    
    .avatar-sm {
        width: 35px;
        height: 35px;
    }
    
    .avatar-placeholder {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

