/* /var/www/dynascrib.com/frontend/static/css/style.css */
/* Styles principaux DynaScrib - Version finale complète */

:root {
    --primary-color: #5B7FFF;
    --secondary-color: #FF6B9D;
    --success-color: #6BCF7F;
    --warning-color: #FFD93D;
    --error-color: #FF5757;
    --dark-color: #2D3748;
    --light-color: #F7FAFC;
    --text-color: #4A5568;
    --border-color: #E2E8F0;
    
    --font-family: 'Fredoka', sans-serif;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 6px 10px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--dark-color);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7B9FFF 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(91, 127, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 127, 255, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #FF8BB3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container,
.navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    transition: var(--transition);
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    width: 45px;
    height: 45px;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(10deg) scale(1.1);
}

/* Animation au chargement */
@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    50% {
        opacity: 1;
        transform: rotate(10deg) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

.logo-icon {
    animation: logoEntrance 0.8s ease-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-large {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    font-weight: 500;
}

/* Dashboard Logo & User */
.dashboard-logo {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.dashboard-logo span {
    font-size: 1.25rem;
    font-weight: 600;
}

.dashboard-user {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-user-info {
    margin-bottom: 1rem;
	text-align: center;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: white;
}

.user-name:hover {
    color: white;
}

.user-role {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.nav-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Mobile Menu Toggle Buttons */
.mobile-menu-toggle,
.dashboard-mobile-toggle,
.admin-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.mobile-menu-toggle:hover,
.dashboard-mobile-toggle:hover,
.admin-mobile-toggle:hover {
    background: var(--primary-color);
}

.mobile-menu-toggle span,
.dashboard-mobile-toggle span,
.admin-mobile-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover span,
.dashboard-mobile-toggle:hover span,
.admin-mobile-toggle:hover span {
    background: white;
}

/* Animation du hamburger */
.mobile-menu-toggle.active span:nth-child(1),
.dashboard-mobile-toggle.active span:nth-child(1),
.admin-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2),
.dashboard-mobile-toggle.active span:nth-child(2),
.admin-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3),
.dashboard-mobile-toggle.active span:nth-child(3),
.admin-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Dashboard & Admin specific toggle styles */
.dashboard-mobile-toggle,
.admin-mobile-toggle {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.dashboard-mobile-toggle span,
.admin-mobile-toggle span {
    background: white;
}

/* User avatar large */
.user-avatar-large {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.user-profile-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.user-avatar-emoji {
    font-size: 1.5rem;
}

/* Responsive - Show toggles on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .dashboard-mobile-toggle,
    .admin-mobile-toggle {
        display: flex;
    }
    
    /* Adjust main content padding for hamburger */
    .dashboard-main,
    .admin-main {
        padding-top: 60px; /* Space for fixed hamburger */
    }
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    animation: slideInLeft 0.8s ease-out 0.2s backwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: slideInLeft 0.8s ease-out 0.4s backwards;
}

.hero-image {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

/* Floating Cards */
.floating-card {
    position: absolute;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.floating-card:hover {
    transform: translateY(-10px) rotateY(5deg) scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.floating-card.card-1 {
    top: 20px;
    right: 100px;
    animation-delay: 0s;
}

.floating-card.card-2 {
    bottom: 80px;
    right: 200px;
    animation-delay: 2s;
}

.floating-card.card-3 {
    top: 150px;
    right: 50px;
    animation-delay: 4s;
}

/* Couche de surbrillance */
.floating-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0); /* Transparent par défaut */
    pointer-events: none; /* Ne bloque pas les clics */
    transition: background 0.4s ease;
    z-index: 1; /* Au-dessus du fond mais sous le contenu */
}

.floating-card:hover::after {
    background: rgba(248,249,250, 0.1); /* Voile blanc translucide */
}

/* Ajustement pour que le contenu reste au-dessus du voile */
.floating-card > * {
    position: relative;
    z-index: 2;
}


.correction-bubble {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6BCF7F 0%, #4CAF50 100%);
    color: white;
    border-radius: 20px;
    font-weight: 500;
}

/* Carte de correction */
.card-correction {
    top: 20%;
    left: 10%;
    animation: float1 6s ease-in-out infinite;
    transform: rotate(-5deg);
    min-width: 280px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light-color);
}

.card-icon {
    font-size: 1.25rem;
}

.card-title {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.correction-example {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    margin: 1rem 0;
}

.wrong-word {
    color: var(--error-color);
    text-decoration: line-through;
    text-decoration-style: wavy;
    text-decoration-thickness: 2px;
}

.arrow {
    color: var(--primary-color);
    font-weight: bold;
    animation: pulse 2s ease-in-out infinite;
}

.correct-word {
    color: var(--success-color);
    font-weight: 600;
    position: relative;
}

.correct-word::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--success-color), transparent);
    border-radius: 2px;
}

.check-mark {
    color: var(--success-color);
    font-size: 1.5rem;
    animation: checkBounce 0.6s ease-in-out;
    animation-delay: 1s;
    animation-fill-mode: both;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--light-color);
}

.improvement {
    display: inline-block;
    background: linear-gradient(135deg, var(--success-color), #4ade80);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Carte pictogramme */
.card-pictogram {
    top: 50%;
    right: 15%;
    transform: translateY(-50%) rotate(3deg);
    animation: float2 8s ease-in-out infinite;
    min-width: 200px;
}

.pictogram-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#elephant-svg {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.card-pictogram:hover #elephant-svg {
    transform: scale(1.1) rotate(5deg);
    animation: wiggle 0.5s ease-in-out;
}

.word-label {
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Carte de score */
.card-score {
    bottom: -10% !important;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    animation: float3 7s ease-in-out infinite;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    min-width: 220px;
}

.score-content {
    text-align: center;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.star {
    font-size: 1.5rem;
    animation: starPulse 1s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.2s);
}

.star:nth-child(1) { --i: 0; }
.star:nth-child(2) { --i: 1; }
.star:nth-child(3) { --i: 2; }

.points-earned {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.points-number {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.points-label {
    font-size: 1rem;
    opacity: 0.9;
}

.achievement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 0 -0.5rem -0.5rem;
}

.achievement-badge {
    font-size: 1.25rem;
}

.achievement-text {
    font-weight: 600;
    font-size: 0.875rem;
}

/* Particules d'arrière-plan */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: particleFloat 15s ease-in-out infinite;
}

.particle:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    top: 30%;
    right: 25%;
    animation-delay: 2s;
    animation-duration: 14s;
}

.particle:nth-child(3) {
    bottom: 30%;
    left: 30%;
    animation-delay: 4s;
    animation-duration: 16s;
}

.particle:nth-child(4) {
    top: 60%;
    right: 40%;
    animation-delay: 1s;
    animation-duration: 13s;
}

.particle:nth-child(5) {
    bottom: 20%;
    right: 20%;
    animation-delay: 3s;
    animation-duration: 15s;
}

.joy-particle {
    position: fixed;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 9999;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-label-optional {
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 400;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-family);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 127, 255, 0.1);
}

.form-input.error {
    border-color: var(--error-color);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-color);
    margin-top: 0.25rem;
}

.form-error, .form-success {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.form-error {
    background: rgba(255, 87, 87, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.form-success {
    background: rgba(107, 207, 127, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    max-width: 900px;
    width: 100%;
    min-height: 500px;
}

.auth-left {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-right {
    flex: 1;
    background: linear-gradient(135deg, #5B7FFF 0%, #FF6B9D 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-color);
    margin-bottom: 2rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Password Strength Indicator */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    height: 4px;
}

.strength-bar {
    flex: 1;
    background: var(--border-color);
    border-radius: 2px;
    transition: background 0.3s;
}

.strength-bar.active {
    background: var(--success-color);
}

.strength-bar.weak {
    background: var(--error-color);
}

.strength-bar.medium {
    background: var(--warning-color);
}

/* Character Selection */
.character-select {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.character-option {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.character-option:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.character-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--light-color);
}

.features-section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-radius: 50%;
    color: white;
}

/* Dashboard */
.dashboard-page {
    background: var(--light-color);
    min-height: 100vh;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Dashboard & Admin Sidebars */
.dashboard-sidebar,
.admin-sidebar {
    width: 260px;
    background: var(--dark-color);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.dashboard-sidebar.mobile-hidden {
    transform: translateX(-100%);
}

.dashboard-mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.dashboard-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.dashboard-sidebar-overlay.show {
    display: block;
}

.dashboard-nav {
    flex: 1;
    padding: 1rem 0;
}

.dashboard-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.dashboard-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dashboard-nav-item.active {
    background: rgba(91, 127, 255, 0.2);
    color: white;
}

.dashboard-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
}

/* Mobile behavior */
@media (max-width: 768px) {
    /* Sidebars cachées par défaut sur mobile */
    .dashboard-sidebar,
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    /* Sidebars visibles quand mobile-show est ajouté */
    .dashboard-sidebar.mobile-show,
    .admin-sidebar.mobile-show {
        transform: translateX(0);
    }
    
    /* Main content sans marge sur mobile */
    .dashboard-main,
    .admin-main {
        margin-left: 0;
    }
    
    /* Boutons hamburger visibles */
    .dashboard-mobile-toggle,
    .admin-mobile-toggle {
        display: flex;
    }
}

/* Desktop behavior */
@media (min-width: 769px) {
    /* Sidebars toujours visibles sur desktop */
    .dashboard-sidebar,
    .admin-sidebar {
        transform: translateX(0);
    }
    
    /* Main content avec marge pour la sidebar */
    .dashboard-main,
    .admin-main {
        margin-left: 260px;
    }
    
    /* Boutons hamburger cachés */
    .dashboard-mobile-toggle,
    .admin-mobile-toggle {
        display: none !important;
    }
}

/* Sidebar overlay */
.dashboard-sidebar-overlay,
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.dashboard-sidebar-overlay.show,
.admin-sidebar-overlay.show {
    display: block;
}

/* Dashboard Main Content */
.dashboard-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dashboard-welcome {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.welcome-text h1 {
    font-size: 1.75rem;
    margin: 0;
}

.welcome-text p {
    color: var(--text-color);
    margin: 0;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-content {
    padding: 2rem;
    flex: 1;
}

/* Dashboard Stats Grid */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: var(--transition);
}

.dashboard-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-color), #7C93FF);
}

.stat-icon.secondary {
    background: linear-gradient(135deg, var(--secondary-color), #FF89B5);
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success-color), #85DF9B);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning-color), #FFE458);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-color);
    margin-top: 0.25rem;
}

.stat-meta {
    font-size: 0.75rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2,
.card-header h3 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.card-header a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.card-header a:hover {
    text-decoration: underline;
}

/* Text List */
.text-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-item {
    padding: 1rem;
    background: var(--light-color);
    border-radius: 10px;
    border: 2px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.text-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.text-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.text-item-title {
    font-weight: 600;
    color: var(--dark-color);
}

.text-item-date {
    font-size: 0.75rem;
    color: var(--text-color);
}

.text-item-preview {
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-item-footer {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-color);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.action-btn {
    padding: 1rem;
    background: linear-gradient(135deg, var(--light-color) 0%, white 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    font-size: 2rem;
}

.action-text {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Progress Section */
.progress-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.progress-item {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.progress-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.progress-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.progress-label {
    font-size: 0.875rem;
    color: var(--text-color);
}

/* Tips Card */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tip {
    padding: 0.75rem;
    background: var(--light-color);
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Editor Page */
.editor-page {
    background: var(--light-color);
}

.navbar-editor {
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--primary-color);
}

.editor-title {
    flex: 1;
    margin: 0 2rem;
}

.title-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 1.125rem;
    font-weight: 500;
    border: none;
    background: transparent;
    outline: none;
}

.title-input:focus {
    background: var(--light-color);
    border-radius: 8px;
}

.stats-mini {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

/* Editor Main */
.editor-main {
    padding: 2rem 0;
    min-height: calc(100vh - 70px);
}

.editor-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.editor-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-color);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.toolbar-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

.correction-stats {
    margin-left: auto;
    display: flex;
    gap: 1rem;
}

.stat-item.errors-found {
    color: var(--warning-color);
}

.stat-item.errors-corrected {
    color: var(--success-color);
}

/* Editor Area */
.editor-area {
    position: relative;
    height: 600px;
}

.editor-content {
    position: relative;
    min-height: 400px;
}

.editor-text {
    width: 100%;
    min-height: 400px;
    padding: 2rem;
    font-family: var(--font-family);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--dark-color);
    border: none;
    outline: none;
    resize: vertical;
}

.editor-text::placeholder {
    color: rgba(74, 85, 104, 0.5);
}

.editor-textarea {
    width: 100%;
    height: 100%;
    padding: 2rem;
    font-family: var(--font-family);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--dark-color);
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    z-index: 2;
    position: relative;
}

.editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    pointer-events: none;
    font-family: var(--font-family);
    font-size: 1.125rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: transparent;
    overflow: hidden;
    z-index: 1;
}

.error-highlight {
    display: inline;
    position: relative;
    border-bottom: 2px dashed var(--error-color);
    background: rgba(255, 87, 87, 0.1);
    pointer-events: auto;
    cursor: pointer;
    transition: var(--transition);
}

.error-highlight:hover {
    background: rgba(255, 87, 87, 0.2);
}

/* Suggestion Box */
.suggestion-box {
    position: absolute;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    min-width: 200px;
    max-width: 300px;
    display: none;
}

.suggestion-box.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.suggestion-header {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--dark-color);
}

.suggestion-error {
    font-weight: 600;
    color: var(--error-color);
}

.suggestion-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.suggestion-message {
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.suggestion-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.suggestion-item {
    padding: 0.5rem;
    background: var(--light-color);
    border: 2px solid transparent;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-item:hover {
    background: var(--primary-color);
    color: white;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.sidebar-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Pictogram Container */
.pictogram-container {
    position: absolute;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    display: none;
    text-align: center;
    min-width: 200px;
}

.pictogram-container.show {
    display: block;
    animation: bounceIn 0.5s ease;
}

.pictogram-word {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pictogram-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
}

.pictogram-placeholder {
    text-align: center;
    color: var(--text-color);
    opacity: 0.6;
}

.pictogram-loading {
    text-align: center;
}

/* Fix pictogram size */
.pictogram-display img,
#pictogram-example {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.progress-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--light-color);
    border-radius: 8px;
}

.progress-item span:last-child {
    font-weight: 600;
    color: var(--primary-color);
}

.tips-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tip {
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(91, 127, 255, 0.1) 0%, rgba(255, 107, 157, 0.1) 100%);
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
}

.toast.show {
    transform: translateX(0);
}

.toast.success,
.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast.error,
.toast-error {
    border-left: 4px solid var(--error-color);
}

.toast.warning,
.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast.info,
.toast-info {
    border-left: 4px solid var(--primary-color);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-color);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--dark-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid white;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success Animation */
.success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 9999;
    animation: successPop 0.6s ease;
}

.success-icon {
    font-size: 5rem;
    animation: rotate 0.5s ease-out;
    margin-bottom: 1rem;
}

.success-text {
    font-size: 2rem;
    font-weight: 600;
    color: var(--success-color);
}

/* Stats Section */
.stats-section {
    padding: 60px 0;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius);
    color: white;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Fix Chart.js container */
.chart-container {
    position: relative;
    height: 300px !important;
    width: 100%;
}

.chart-container canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important; 
    height: 100% !important;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: white;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
}

.cta-card h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-card p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer-logo {
    height: 80px;
    margin-bottom: 2rem;
    margin-left: 3.1em;
}

/* Animations */
@keyframes float1 {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-20px) rotate(-3deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateY(-50%) rotate(3deg);
    }
    50% {
        transform: translateY(calc(-50% - 15px)) rotate(5deg);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translateX(-50%) translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateX(-50%) translateY(-25px) rotate(-1deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

@keyframes checkBounce {
    0% {
        transform: scale(0) rotate(0);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(3deg);
    }
    75% {
        transform: rotate(-3deg);
    }
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.2);
        filter: brightness(1.5);
    }
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translate(100px, -100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes successPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Navigation responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
        align-items: flex-start;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        display: block;
    }
    
    .user-menu {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        margin-top: auto;
        padding-top: 2rem;
        border-top: 2px solid var(--border-color);
    }
    
    .user-profile-link {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Desktop - sidebars toujours visibles */
@media (min-width: 769px) {
    .dashboard-sidebar,
    .admin-sidebar {
        transform: translateX(0);
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .editor-wrapper {
        grid-template-columns: 1fr;
    }
    
    .editor-sidebar {
        position: fixed;
        right: -350px;
        top: 0;
        bottom: 0;
        width: 350px;
        background: white;
        box-shadow: var(--shadow-xl);
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .editor-sidebar.show {
        right: 0;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 15px;
    }
    
    /* Show mobile toggles */
    .dashboard-mobile-toggle,
    .admin-mobile-toggle {
        display: block;
    }
    
    /* Dashboard & Admin Sidebar Mobile */
    .dashboard-sidebar,
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .dashboard-sidebar.mobile-show,
    .admin-sidebar.mobile-show {
        transform: translateX(0);
    }
    
    /* Adjust main content */
    .dashboard-main,
    .admin-main {
        margin-left: 0;
    }
    
    /* Dashboard header mobile */
    .dashboard-header,
    .admin-header {
        padding: 1rem;
        padding-left: 4rem; /* Space for hamburger menu */
    }
    
    .dashboard-header h1,
    .admin-header h1 {
        font-size: 1.25rem;
    }
    
    .dashboard-header-actions,
    .admin-header-actions {
        display: none; /* Hide actions on mobile */
    }
    
    /* Content mobile */
    .dashboard-content,
    .admin-content {
        padding: 1rem;
    }
    
    /* Stats grid mobile */
    .dashboard-stats-grid,
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stat-card,
    .admin-stat-card {
        padding: 1rem;
    }
    
    /* Logo Mobile */
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .logo span {
        font-size: 1.25rem;
    }
    
    /* Hero Mobile */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-image {
        height: 400px;
        margin-top: 2rem;
    }
    
    .floating-card {
        transform: scale(0.8);
    }
    
    .card-correction {
        left: 5%;
        top: 10%;
        min-width: 220px;
    }
    
    .card-pictogram {
        right: 5%;
        min-width: 160px;
    }
    
    .card-score {
        bottom: -10% !important;
        min-width: 180px;
    }
    
    #elephant-svg {
        width: 80px;
        height: 80px;
    }
    
    .points-number {
        font-size: 2rem;
    }
    
    .particle {
        font-size: 1rem;
    }
    
    /* Auth Pages Mobile */
    .auth-container {
        flex-direction: column;
        max-width: 100%;
    }
    
    .auth-left,
    .auth-right {
        padding: 2rem;
    }
    
    .auth-right {
        min-height: 200px;
    }
    
    /* Forms Mobile */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Dashboard Mobile */
    .dashboard-welcome {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Quick Actions Mobile */
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.75rem;
    }
    
    .action-icon {
        font-size: 1.5rem;
    }
    
    .progress-section {
        grid-template-columns: 1fr;
    }
    
    /* Features Grid Mobile */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Editor Mobile */
    .navbar-left {
        flex-wrap: wrap;
    }
    
    .editor-title {
        width: 100%;
        margin: 1rem 0;
        order: 3;
    }
    
    .stats-mini {
        display: none;
    }
    
    .editor-toolbar {
        flex-wrap: wrap;
    }
    
    .editor-text,
    .editor-textarea {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .editor-overlay {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    /* Character Selection Mobile */
    .character-select {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Toast Mobile */
    .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* Responsive - Extra Small */
@media (max-width: 480px) {
    /* Hero Extra Small */
    .hero-image {
        height: 350px;
    }
    
    .floating-card {
        transform: scale(0.7);
        padding: 1rem;
    }
    
    .correction-example {
        font-size: 0.875rem;
    }
    
    .card-correction {
        min-width: 200px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    /* Dashboard */
    .dashboard-card {
        padding: 1rem;
    }
    
    .text-item {
        padding: 0.75rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .navbar-editor,
    .editor-toolbar,
    .editor-sidebar,
    .sidebar,
    .btn,
    .toast-container,
    .loading-overlay,
    .success-animation,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .editor-text,
    .editor-textarea {
        border: none;
        padding: 0;
    }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .floating-card {
        background: rgba(255, 255, 255, 0.95);
    }
}