/* Dashboard CSS - E-Learning Platform */

:root {
    --primary-color: #0d91c1;
    --primary-color-light: #97bfe4;
    --primary-color-dark: #0a1acf;
    --secondary-purple: #DDD6FE;
    --accent-blue: #3B82F6;
    --accent-green: #10B981;
    --accent-yellow: #F59E0B;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
} 

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 18px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
}

.nav-section {
    margin-bottom: 32px;
}

.nav-section h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: var(--gray-100);
    color: var(--gray-800);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.nav-icon {
    width: 20px;
    height: 20px;
}

.friends-list {
    flex: 1;
    margin-top: 24px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 4px;
    transition: background-color 0.2s ease;
}

.friend-item:hover {
    background-color: var(--gray-100);
}

.friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
}

.friend-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.friend-info p {
    font-size: 12px;
    color: var(--gray-500);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 600px;
    margin: 0 24px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 14px;
    background-color: var(--white);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-400);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-info {
    text-align: right;
}

.profile-greeting {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 2px;
}

.profile-subtitle {
    font-size: 12px;
    color: var(--gray-400);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-light) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 32px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.hero-button {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.hero-button:hover {
    transform: translateY(-2px);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    position: relative;
}

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

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 14px;
    color: var(--gray-500);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.stat-icon.frontend { background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light)); }
.stat-icon.backend { background: linear-gradient(135deg, var(--accent-blue), #60A5FA); }
.stat-icon.design { background: linear-gradient(135deg, var(--accent-green), #34D399); }
.stat-icon.management { background: linear-gradient(135deg, var(--accent-yellow), #FBBF24); }

/* Course Grid */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

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

.course-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.course-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
}

.course-badge {
    position: relative;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.course-content {
    padding: 20px;
}

.course-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
    line-height: 1.4;
}

.course-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.course-avatars {
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
}

.course-count {
    background: var(--primary-color);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

/* Mentor Section */
.mentor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.mentor-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mentor-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mentor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
}

.mentor-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.mentor-details p {
    font-size: 12px;
    color: var(--gray-500);
}

.mentor-course {
    font-size: 14px;
    color: var(--primary-color);
    margin-top: 4px;
}

.follow-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.follow-btn:hover {
    background: var(--primary-color-dark);
}

/* Progress Chart */
.chart-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 32px;
}

.progress-bars {
    display: flex;
    align-items: end;
    gap: 12px;
    height: 120px;
    margin-top: 20px;
}

.progress-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary-color), var(--primary-color-light));
    border-radius: 6px 6px 0 0;
    min-height: 20px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.progress-bar:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
    }
    
    .search-bar {
        margin: 0;
        max-width: none;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-banner {
        padding: 24px;
    }
    
    .hero-title {
        font-size: 24px;
    }
}
.login-body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Cercles animÃ©s en arriÃ¨re-plan */
.login-body::before,
.login-body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
    pointer-events: none;
}

.login-body::before {
    width: 600px;
    height: 600px;
    top: -300px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.login-body::after {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: -150px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

/* ============================================
   CONTENEUR DE CONNEXION
   ============================================ */

.login-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SECTION LOGO
   ============================================ */

.login-logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(13, 145, 193, 0.3);
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 15px;
    color: var(--gray-500);
    margin: 0;
}

/* ============================================
   ALERTES D'ERREUR
   ============================================ */

.login-alert {
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.login-alert-icon {
    width: 20px;
    height: 20px;
    color: #DC2626;
    flex-shrink: 0;
}

.login-alert-text {
    color: #991B1B;
    font-size: 14px;
    margin: 0;
}

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

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-form-label svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
}

.login-form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 15px;
    color: var(--gray-800);
    background: var(--white);
    transition: all 0.3s ease;
}

.login-form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 145, 193, 0.1);
    background: var(--gray-50);
}

.login-form-input::placeholder {
    color: var(--gray-400);
}

/* ============================================
   CHECKBOX "SE SOUVENIR DE MOI"
   ============================================ */

.login-remember-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -8px 0 8px 0;
}

.login-remember-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.login-remember-label {
    font-size: 14px;
    color: var(--gray-600);
    cursor: pointer;
    user-select: none;
}

/* ============================================
   BOUTON DE CONNEXION
   ============================================ */

.login-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(13, 145, 193, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 145, 193, 0.4);
}

.login-submit-btn:active {
    transform: translateY(0);
}

.login-submit-btn svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   FOOTER / LIENS SUPPLÃ‰MENTAIRES
   ============================================ */

.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.login-footer-text {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.login-footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.login-footer-link:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

/* ============================================
   BARRE DE PROGRESSION (INSCRIPTION)
   ============================================ */

.register-progress {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin: 24px 0;
}

.register-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-light));
    transition: width 0.4s ease;
}

/* ============================================
   BOÃŽTES D'INFORMATION
   ============================================ */

.register-info-box {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: var(--border-radius);
    padding: 14px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.register-info-box svg {
    width: 20px;
    height: 20px;
    color: #3B82F6;
    flex-shrink: 0;
}

.register-info-box p {
    color: #1E40AF;
    font-size: 14px;
    margin: 0;
}

.register-success-box {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: var(--border-radius);
    padding: 14px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.register-success-box svg {
    width: 20px;
    height: 20px;
    color: #10B981;
    flex-shrink: 0;
}

.register-success-box p {
    color: #166534;
    font-size: 14px;
    margin: 0;
}
/* ============================================
   INPUT WRAPPER POUR ICÔNES DE PASSWORD
   ============================================ */

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-field {
    padding-right: 48px; /* Espace pour l'icône */
    flex: 1;
}

.toggle-password-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.2s ease;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-icon:hover {
    color: var(--primary-color);
}

.toggle-password-icon svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   CRITÈRES DE VALIDATION DU MOT DE PASSE
   ============================================ */

#criteria {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

#criteria li {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gray-100);
    border-radius: 6px;
    font-size: 13px;
    color: var(--gray-600);
    transition: all 0.3s ease;
}

#criteria li.valid {
    background: #DCFCE7;
    color: #166534;
}

#criteria li.invalid {
    background: #FEE2E2;
    color: #991B1B;
}

.icon-criteria {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
}

.icon-criteria svg {
    width: 14px;
    height: 14px;
}

#criteria li.valid .icon-criteria svg {
    color: #16A34A;
}

#criteria li.invalid .icon-criteria svg {
    color: #DC2626;
}

/* ============================================
   MESSAGE DE CORRESPONDANCE DES MOTS DE PASSE
   ============================================ */

#match {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-top: 6px;
    min-height: 20px;
}

.icon-match {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.icon-match svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   VALIDATION DES INPUTS
   ============================================ */

.input-field.valid {
    border-color: #10B981;
    background-color: #F0FDF4;
}

.input-field.invalid {
    border-color: #EF4444;
    background-color: #FEF2F2;
}

/* ============================================
   RGPD CHECKBOX ET ERREUR
   ============================================ */

.rgpd-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    margin: 16px 0;
}

.rgpd-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.rgpd-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.rgpd-label a:hover {
    text-decoration: underline;
}

#rgpdError {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    border-radius: var(--border-radius);
    color: #991B1B;
    font-size: 14px;
    margin-bottom: 16px;
    animation: shake 0.5s ease-out;
}

#rgpdError.show {
    display: flex;
}

.icon-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.icon-error svg {
    width: 20px;
    height: 20px;
    color: #DC2626;
}

/* ============================================
   TAILLE DES ICÔNES UX-ICONS
   ============================================ */

/* Normalisation de toutes les icônes ux_icon */
twig-template {
    display: inline-flex;
    width: inherit;
    height: inherit;
}

twig-template svg {
    width: inherit;
    height: inherit;
}


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

@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-logo-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .login-body::before,
    .login-body::after {
        display: none; /* Masquer les cercles sur mobile pour Ã©viter le scroll horizontal */
    }
    /* Critères de validation plus compacts sur mobile */
    #criteria {
        gap: 6px;
    }
    
    #criteria li {
        padding: 5px 10px;
        font-size: 12px;
    }
}
/* ============================================
   STYLES DE FORMULAIRES GÉNÉRIQUES
   ============================================ */

/* Conteneur de formulaire */
.form-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.form-container-compact {
    padding: 24px;
}

/* Titre de formulaire */
.form-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.form-description {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Séparation par sections */
.form-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

/* Groupe de champs (label + input) */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group-inline {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Labels */
.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.form-label-required::after {
    content: '*';
    color: #EF4444;
    margin-left: 4px;
}

.form-label-optional {
    font-weight: 400;
    color: var(--gray-400);
    font-size: 13px;
    margin-left: 4px;
}

.form-label svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    flex-shrink: 0;
}

/* Description/Aide pour les champs */
.form-help {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
    margin-top: 2px;
}

.form-help svg {
    width: 14px;
    height: 14px;
    display: inline;
    vertical-align: middle;
    margin-right: 4px;
}

/* ============================================
   INPUTS TEXT, EMAIL, PASSWORD, NUMBER, DATE
   ============================================ */

.form-input,
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 15px;
    color: var(--gray-800);
    background: var(--white);
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.5;
}

.form-input:hover,
.form-control:hover {
    border-color: var(--gray-300);
}

.form-input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 145, 193, 0.1);
    background: var(--gray-50);
}

.form-input::placeholder,
.form-control::placeholder {
    color: var(--gray-400);
}

/* Input avec icône */
.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    pointer-events: none;
}

.form-input-wrapper .form-input {
    padding-left: 48px;
}

.form-input-icon-right {
    left: auto;
    right: 16px;
}

.form-input-wrapper .form-input.has-icon-right {
    padding-right: 48px;
}

/* Tailles d'input */
.form-input-sm {
    padding: 8px 12px;
    font-size: 14px;
}

.form-input-lg {
    padding: 16px 20px;
    font-size: 16px;
}

/* ============================================
   TEXTAREA
   ============================================ */

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 15px;
    color: var(--gray-800);
    background: var(--white);
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
}

.form-textarea:hover {
    border-color: var(--gray-300);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 145, 193, 0.1);
    background: var(--gray-50);
}

.form-textarea::placeholder {
    color: var(--gray-400);
}

/* Compteur de caractères */
.form-textarea-counter {
    text-align: right;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.form-textarea-counter.warning {
    color: var(--accent-yellow);
}

.form-textarea-counter.danger {
    color: #EF4444;
}

/* ============================================
   SELECT / CHOICE
   ============================================ */

.form-select {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 15px;
    color: var(--gray-800);
    background: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 8 10 12 14 8'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-select:hover {
    border-color: var(--gray-300);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 145, 193, 0.1);
    background-color: var(--gray-50);
}

.form-select option {
    padding: 12px;
}

/* Select multiple */
.form-select[multiple] {
    padding: 8px;
    background-image: none;
    min-height: 120px;
}

.form-select[multiple] option {
    padding: 8px 12px;
    border-radius: 6px;
    margin: 2px 0;
}

.form-select[multiple] option:checked {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   CHECKBOX
   ============================================ */

.form-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.form-checkbox-wrapper:hover {
    background-color: var(--gray-50);
}

.form-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.form-checkbox:hover {
    border-color: var(--primary-color);
}

.form-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(13, 145, 193, 0.1);
}

.form-checkbox-label {
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    flex: 1;
}

.form-checkbox-label-description {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
    display: block;
}

/* Checkbox inline */
.form-checkbox-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.form-checkbox-inline .form-checkbox-wrapper {
    padding: 8px 12px;
    flex: 0 0 auto;
}

/* ============================================
   RADIO BUTTONS
   ============================================ */

.form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-radio-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.form-radio-wrapper:hover {
    background-color: var(--gray-50);
}

.form-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.form-radio:hover {
    border-color: var(--primary-color);
}

.form-radio:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-radio:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(13, 145, 193, 0.1);
}

.form-radio-label {
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    flex: 1;
}

.form-radio-label-description {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
    display: block;
}

/* Radio inline */
.form-radio-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.form-radio-inline .form-radio-wrapper {
    padding: 8px 12px;
    flex: 0 0 auto;
}

/* Radio cards (style carte pour les radios) */
.form-radio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-radio-card {
    position: relative;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-radio-card:hover {
    border-color: var(--primary-color);
    background-color: var(--gray-50);
}

.form-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.form-radio-card input[type="radio"]:checked + .form-radio-card-content {
    color: var(--primary-color);
}

.form-radio-card input[type="radio"]:checked ~ .form-radio-card {
    border-color: var(--primary-color);
    background-color: rgba(13, 145, 193, 0.05);
}

.form-radio-card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    color: var(--gray-400);
}

.form-radio-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.form-radio-card-description {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* ============================================
   SWITCH / TOGGLE - VERSION FONCTIONNELLE
   ============================================ */

.form-switch-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
}

.form-switch-wrapper:hover {
    background-color: var(--gray-50);
}

/* Le conteneur du toggle - C'EST UN LABEL pour que tout soit cliquable */
.form-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

/* L'input checkbox - DOIT couvrir toute la zone du switch */
.form-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;        /* ← IMPORTANT : Couvre toute la zone */
    height: 100%;       /* ← IMPORTANT : Couvre toute la zone */
    top: 0;
    left: 0;
    margin: 0;
    cursor: pointer;    /* ← IMPORTANT : Garde le curseur cliquable */
    z-index: 2;         /* ← Au-dessus du slider pour capturer les clics */
}

/* Le slider (fond du toggle) */
.form-switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: all 0.3s ease;
    border-radius: 24px;
    pointer-events: none;  /* ← Laisse l'input gérer les clics */
}

/* Le bouton circulaire du toggle */
.form-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* État checked */
.form-switch input[type="checkbox"]:checked + .form-switch-slider {
    background-color: var(--primary-color);
}

.form-switch input[type="checkbox"]:checked + .form-switch-slider:before {
    transform: translateX(24px);
}

/* État focus (accessibilité) */
.form-switch input[type="checkbox"]:focus + .form-switch-slider {
    box-shadow: 0 0 0 4px rgba(13, 145, 193, 0.1);
    outline: none;
}

/* Hover sur le slider */
.form-switch:hover .form-switch-slider {
    background-color: var(--gray-400);
}

.form-switch input[type="checkbox"]:checked:hover + .form-switch-slider {
    background-color: var(--primary-color-dark, #0a789c);
}

/* État disabled */
.form-switch input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.form-switch input[type="checkbox"]:disabled + .form-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-switch-wrapper:has(input[type="checkbox"]:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-switch-wrapper:has(input[type="checkbox"]:disabled):hover {
    background-color: transparent;
}

/* Labels */
.form-switch-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    margin: 0;
    display: block;
}

.form-switch-label-description {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
    display: block;
    font-weight: 400;
    line-height: 1.4;
}

/* Erreurs de formulaire */
.form-switch-wrapper .invalid-feedback,
.form-switch-wrapper .form-error-message {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--error-color, #dc2626);
}

/* Animation de transition */
@keyframes toggleSlide {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(24px);
    }
}

/* Version compacte (optionnelle) */
.form-switch-wrapper.compact {
    padding: 8px;
}

.form-switch-wrapper.compact .form-switch {
    width: 40px;
    height: 20px;
}

.form-switch-wrapper.compact .form-switch-slider:before {
    height: 14px;
    width: 14px;
}

.form-switch-wrapper.compact .form-switch input[type="checkbox"]:checked + .form-switch-slider:before {
    transform: translateX(20px);
}

/* ============================================
   RESPONSIVE du switch
   ============================================ */
@media (max-width: 768px) {
    .form-switch-wrapper {
        padding: 10px;
    }
    
    .form-switch-label {
        font-size: 13px;
    }
    
    .form-switch-label-description {
        font-size: 12px;
    }
}
/* ============================================
   FILE UPLOAD
   ============================================ */

.form-file-wrapper {
    position: relative;
}

.form-file {
    width: 100%;
    padding: 12px 16px;
    border: 2px dashed var(--gray-200);
    border-radius: var(--border-radius);
    background: var(--gray-50);
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-file:hover {
    border-color: var(--primary-color);
    background: rgba(13, 145, 193, 0.05);
}

.form-file:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 145, 193, 0.1);
}

/* Custom file upload */
.form-file-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    padding: 32px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    background: var(--gray-50);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.form-file-custom:hover {
    border-color: var(--primary-color);
    background: rgba(13, 145, 193, 0.05);
}

.form-file-custom input[type="file"] {
    display: none;
}

.form-file-custom-icon {
    width: 48px;
    height: 48px;
    color: var(--gray-400);
}

.form-file-custom-text {
    font-size: 14px;
    color: var(--gray-700);
}

.form-file-custom-subtext {
    font-size: 13px;
    color: var(--gray-500);
}

.form-file-custom-button {
    padding: 8px 16px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-file-custom-button:hover {
    background: var(--primary-color-dark);
}

/* Liste des fichiers uploadés */
.form-file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

.form-file-item-icon {
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    flex-shrink: 0;
}

.form-file-item-info {
    flex: 1;
    min-width: 0;
}

.form-file-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-file-item-size {
    font-size: 13px;
    color: var(--gray-500);
}

.form-file-item-remove {
    padding: 6px;
    background: transparent;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-file-item-remove:hover {
    background: #FEE2E2;
    color: #DC2626;
}

/* ============================================
   ÉTATS DES CHAMPS (VALIDATION)
   ============================================ */

/* État désactivé */
.form-input:disabled,
.form-control:disabled,
.form-textarea:disabled,
.form-select:disabled {
    background-color: var(--gray-100);
    color: var(--gray-400);
    cursor: not-allowed;
    opacity: 0.6;
}

/* État en erreur / invalide */
.form-input.is-invalid,
.form-control.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
    border-color: #EF4444;
    background-color: #FEF2F2;
}

.form-input.is-invalid:focus,
.form-control.is-invalid:focus,
.form-textarea.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #EF4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-error {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #DC2626;
    margin-top: 6px;
    animation: slideDown 0.3s ease;
}

.form-error svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

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

/* État valide / succès */
.form-input.is-valid,
.form-control.is-valid,
.form-textarea.is-valid,
.form-select.is-valid {
    border-color: var(--accent-green);
    background-color: #F0FDF4;
}

.form-input.is-valid:focus,
.form-control.is-valid:focus,
.form-textarea.is-valid:focus,
.form-select.is-valid:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-success {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #059669;
    margin-top: 6px;
    animation: slideDown 0.3s ease;
}

.form-success svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   BOUTONS DE FORMULAIRE
   ============================================ */

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.form-actions-centered {
    justify-content: center;
}

.form-actions-right {
    justify-content: flex-end;
}

.form-actions-between {
    justify-content: space-between;
}

/* Boutons génériques pour formulaires - Harmonisés avec Dashboard.css */
.btn-primary,
.btn-secondary,
.form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary svg,
.btn-secondary svg,
.form-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

/* Bouton Primary */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(13, 145, 193, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 145, 193, 0.4);
}

.btn-primary:hover svg {
    transform: translateX(2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Bouton Secondary */
.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-secondary:disabled {
    color: var(--gray-400);
    border-color: var(--gray-300);
    cursor: not-allowed;
    background: var(--gray-100);
    transform: none;
}

/* Bouton Danger */
.btn-danger {
    background: #EF4444;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Bouton Success */
.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #059669);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-success:active {
    transform: translateY(0);
}

/* Bouton Warning */
.btn-warning {
    background: var(--accent-yellow);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: #D97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-warning:active {
    transform: translateY(0);
}

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

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

/* Bouton Ghost */
.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: none;
    padding: 8px 16px;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

/* Bouton Link (style lien) */
.btn-link {
    background: transparent;
    color: var(--primary-color);
    border: none;
    padding: 8px 16px;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--primary-color-dark);
    background: transparent;
}

/* Tailles de boutons */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-lg svg {
    width: 20px;
    height: 20px;
}

.btn-block {
    width: 100%;
}

/* Groupe de boutons */
.btn-group {
    display: inline-flex;
    gap: 0;
}

.btn-group .btn-primary,
.btn-group .btn-secondary,
.btn-group .btn-danger,
.btn-group .btn-success {
    border-radius: 0;
    margin-left: -1px;
}

.btn-group .btn-primary:first-child,
.btn-group .btn-secondary:first-child,
.btn-group .btn-danger:first-child,
.btn-group .btn-success:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
    margin-left: 0;
}

.btn-group .btn-primary:last-child,
.btn-group .btn-secondary:last-child,
.btn-group .btn-danger:last-child,
.btn-group .btn-success:last-child {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* ============================================
   LAYOUT DE FORMULAIRE (GRILLE FLEXIBLE)
   ============================================ */

/* Système de grille basique */
.form-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

/* Grilles prédéfinies */
.form-row-1 {
    grid-template-columns: 1fr;
}

.form-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Colonnes personnalisées avec span */
.form-col-1 {
    grid-column: span 1;
}

.form-col-2 {
    grid-column: span 2;
}

.form-col-3 {
    grid-column: span 3;
}

.form-col-4 {
    grid-column: span 4;
}

/* Layout inline (champs côte à côte sur une ligne) */
.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.form-inline .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.form-inline .form-group.form-inline-auto {
    flex: 0 0 auto;
    min-width: auto;
}

/* Layout spécifique : 2 colonnes avec largeurs différentes */
.form-row-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row-split-reverse {
    grid-template-columns: 1fr 2fr;
}

/* Layout spécifique : 3 colonnes avec colonne large au milieu */
.form-row-3-wide-center {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Groupes de champs avec bordure (fieldset style) */
.form-fieldset {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.form-fieldset-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

/* Grille adaptative (auto-fit) */
.form-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Espacements personnalisés */
.form-gap-sm {
    gap: 12px;
}

.form-gap-md {
    gap: 20px;
}

.form-gap-lg {
    gap: 32px;
}

/* Utilitaires de largeur pour les champs individuels */
.w-full {
    width: 100%;
}

.w-1-2 {
    width: 50%;
}

.w-1-3 {
    width: 33.333%;
}

.w-2-3 {
    width: 66.666%;
}

.w-1-4 {
    width: 25%;
}

.w-3-4 {
    width: 75%;
}

/* Alignement vertical des champs dans une ligne */
.form-row-align-start {
    align-items: start;
}

.form-row-align-center {
    align-items: center;
}

.form-row-align-end {
    align-items: end;
}

/* Exemples de layouts complexes */

/* Layout : Label à gauche, input à droite (style horizontal) */
.form-horizontal {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.form-horizontal .form-label {
    margin-bottom: 0;
    text-align: right;
}

.form-horizontal .form-group {
    margin-bottom: 0;
}

/* Layout : Champs compacts (pour filtres, recherche...) */
.form-compact {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-compact .form-group {
    margin-bottom: 0;
}

.form-compact .form-input,
.form-compact .form-select {
    padding: 8px 12px;
}

/* Séparateur visuel entre groupes de champs */
.form-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 32px 0;
}

.form-divider-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0;
    color: var(--gray-500);
    font-size: 14px;
}

.form-divider-text::before,
.form-divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.form-divider-text span {
    padding: 0 16px;
}

/* ============================================
   MESSAGES D'ALERTE DANS LES FORMULAIRES
   ============================================ */

.form-alert {
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

.form-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-alert-content {
    flex: 1;
}

.form-alert-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.form-alert-message {
    font-size: 14px;
    line-height: 1.5;
}

/* Alert info */
.form-alert-info {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
}

.form-alert-info svg {
    color: #3B82F6;
}

/* Alert success */
.form-alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}

.form-alert-success svg {
    color: var(--accent-green);
}

/* Alert warning */
.form-alert-warning {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
}

.form-alert-warning svg {
    color: var(--accent-yellow);
}

/* Alert error */
.form-alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.form-alert-error svg {
    color: #EF4444;
}

/* ============================================
   RESPONSIVE - FORMULAIRES
   ============================================ */

@media (max-width: 768px) {
    .form-container {
        padding: 24px 20px;
    }

    /* Toutes les grilles passent en 1 colonne */
    .form-row-2,
    .form-row-3,
    .form-row-4,
    .form-row-split,
    .form-row-split-reverse,
    .form-row-3-wide-center {
        grid-template-columns: 1fr;
    }

    /* Tous les spans de colonnes deviennent 1 */
    .form-col-1,
    .form-col-2,
    .form-col-3,
    .form-col-4 {
        grid-column: span 1;
    }

    /* Form actions en colonne */
    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-success,
    .form-btn {
        width: 100%;
    }

    /* Radio cards en 1 colonne */
    .form-radio-cards {
        grid-template-columns: 1fr;
    }

    /* Checkboxes et radios inline passent en vertical */
    .form-checkbox-inline,
    .form-radio-inline {
        flex-direction: column;
        gap: 12px;
    }

    /* Form horizontal devient vertical */
    .form-horizontal {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .form-horizontal .form-label {
        text-align: left;
    }

    /* Form inline devient vertical */
    .form-inline {
        flex-direction: column;
    }

    .form-inline .form-group {
        width: 100%;
        min-width: 100%;
    }

    /* Largeurs personnalisées deviennent 100% */
    .w-1-2,
    .w-1-3,
    .w-2-3,
    .w-1-4,
    .w-3-4 {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 20px 16px;
    }

    .form-title {
        font-size: 20px;
    }

    .form-section-title {
        font-size: 16px;
    }

    /* Boutons plus petits sur mobile */
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-success,
    .form-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .btn-sm {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Inputs et selects plus petits */
    .form-input,
    .form-control,
    .form-textarea,
    .form-select {
        padding: 10px 14px;
        font-size: 14px;
    }
}
/* Container de pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid var(--gray-200);
    margin-top: 16px;
}

/* Info de pagination (gauche) */
.pagination-info {
    font-size: 14px;
    color: var(--gray-600);
}

/* Wrapper des boutons (droite) */
.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Navigation de pagination */
.pagination-buttons nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Points de suspension */
.pagination-dots {
    padding: 8px 12px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
}

/* Boutons de pagination - réutilisation des .btn existants */
.pagination-buttons .btn {
    padding: 8px 16px;
    min-width: auto;
}

/* Page courante */
.pagination-buttons .btn-primary {
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .pagination-buttons {
        width: 100%;
        justify-content: center;
    }
}
/* ============================================
   QUESTION DETAIL - Styles spécifiques
   ============================================ */

/* Container principal */
.question-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Sections du formulaire */
.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

/* En-tête de la page question */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
}

.question-actions {
    display: flex;
    gap: 0.75rem;
}

/* Texte de la question avec style distinctif */
.question-text {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.6;
}

/* Réponses - styles pour les items corrects */
.answer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.answer-item.correct {
    background: rgba(16, 185, 129, 0.1) !important;
    border-left-color: var(--accent-green) !important;
}

.answer-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    font-weight: 600;
    flex-shrink: 0;
}

.answer-item.correct .answer-number {
    background: var(--accent-green);
    color: white;
}

.answer-text {
    flex: 1;
    color: var(--gray-700);
}

.answer-item.correct .answer-text {
    font-weight: 600;
    color: var(--gray-900);
}

/* Badge pour les tags (violet) */
.badge-tag {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

/* Container pour les badges (tags) */
.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Message vide */
.empty-message {
    text-align: center;
    padding: 2rem;
    color: var(--gray-400);
    font-style: italic;
}

/* Métadonnées en bas de page */
.meta-info {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   TOASTS / FLASH MESSAGES  (centralisé dans style_base.css)
   ============================================================ */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;           /* le container lui-même ne capte pas les clics */
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--gray-300);
    min-width: 300px;
    max-width: 420px;
    pointer-events: all;
    animation: toastIn 0.3s ease both;
}

.toast-hiding {
    animation: toastOut 0.3s ease forwards;
}

/* Couleurs par type */
.toast-success { border-left-color: var(--accent-green); }
.toast-success .toast-icon { color: var(--accent-green); }

.toast-error,
.toast-danger  { border-left-color: #EF4444; }
.toast-error .toast-icon,
.toast-danger .toast-icon { color: #EF4444; }

.toast-warning { border-left-color: var(--accent-yellow); }
.toast-warning .toast-icon { color: var(--accent-yellow); }

.toast-info    { border-left-color: var(--accent-blue); }
.toast-info .toast-icon { color: var(--accent-blue); }

/* Icône */
.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    font-size: 20px;
}

/* Texte */
.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--gray-800);
    line-height: 1.4;
}

/* Bouton fermer */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.toast-close:hover {
    background-color: var(--gray-100);
    color: var(--gray-600);
}

/* Animations */
@keyframes toastIn {
    from { opacity: 0; transform: translateX(110%); }
    to   { opacity: 1; transform: translateX(0);    }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0);    }
    to   { opacity: 0; transform: translateX(110%); }
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 12px;
        left: 12px;
        right: 12px;
    }
    .toast {
        min-width: 0;
        max-width: 100%;
    }
}