/**
 * FICHIER: account-ui.css
 * 
 * Styles Mobile-First pour les Interfaces Utilisateurs EGM
 * Conforme à responsive.jpg et GUIDE.md
 * 
 * @package EGM_StyleKit
 * @since 2.0.0
 * 
 * BREAKPOINTS:
 * - Mobile petit: 320-375px
 * - Mobile grand: 390-430px
 * - Tablette: 768-1024px
 * - Desktop: ≥1200px
 * - Desktop large: ≥1440px
 */

/* ========================================
   RESET ET VARIABLES DE BASE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs principales */
    --primary-color: #4A90E2;
    --secondary-color: #7B68EE;
    --success-color: #52C41A;
    --warning-color: #FAAD14;
    --danger-color: #F5222D;
    --info-color: #1890FF;
    
    /* Couleurs de rôles */
    --teacher-color: #4A90E2;
    --parent-color: #52C41A;
    --student-color: #F59E0B;
    --observer-color: #8C8C8C;
    --admin-color: #7B68EE;
    
    /* Couleurs de fond */
    --bg-primary: #F0F2F5;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #FAFAFA;
    --bg-dark: #1A1A2E;
    
    /* Couleurs de texte */
    --text-primary: #262626;
    --text-secondary: #8C8C8C;
    --text-light: #FFFFFF;
    --text-muted: #BFBFBF;
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.18);
    
    /* Bordures */
    --border-color: #E5E5E5;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index */
    --z-toast: 10000;
    --z-modal: 9999;
    --z-sidebar: 1000;
    --z-header: 999;
    --z-overlay: 998;
    --z-dropdown: 900;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LAYOUT PRINCIPAL - MOBILE FIRST
   ======================================== */

.egm-account-dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ========================================
   HEADER MOBILE
   ======================================== */

.egm-mobile-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    height: 60px;
}

.egm-menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.egm-menu-toggle:hover {
    color: var(--primary-color);
}

.egm-page-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.egm-page-title .role-icon {
    font-size: 1.25rem;
}

.egm-notifications-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--danger-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */

.egm-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-sidebar);
    overflow-y: auto;
    transition: left var(--transition-base);
    display: flex;
    flex-direction: column;
}

.egm-sidebar.active {
    left: 0;
}

/* Overlay pour fermer sidebar mobile */
.egm-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-sidebar) - 1);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.egm-sidebar.active + .egm-sidebar-overlay {
    opacity: 1;
    pointer-events: all;
}

/* Profile Section dans Sidebar */
.sidebar-profile {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
}

/* Navigation Menu */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.nav-link.active {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.nav-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.nav-label {
    flex: 1;
}

.nav-badge {
    background: var(--danger-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Subscription Widget dans Sidebar */
.sidebar-subscription {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.subscription-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    color: white;
}

.subscription-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.subscription-info {
    font-size: 0.75rem;
    opacity: 0.9;
}

.features-mini {
    list-style: none;
    margin-top: 0.5rem;
}

.features-mini li {
    margin-bottom: 0.25rem;
}

.btn-manage-sub {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-sm);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-manage-sub:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-sm);
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.egm-main-content {
    flex: 1;
    padding: 1rem;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* ========================================
   STATS CARDS - RESPONSIVE GRID
   ======================================== */

.egm-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.egm-stat-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-base);
    border-left: 4px solid var(--card-color, var(--primary-color));
}

.egm-stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--card-color, var(--primary-color));
    margin-bottom: 0.25rem;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-top: 0.5rem;
}

.stat-trend.up {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.stat-trend.down {
    background: rgba(245, 34, 45, 0.1);
    color: var(--danger-color);
}

/* ========================================
   QUICK ACTIONS
   ======================================== */

.egm-quick-actions {
    margin-bottom: 2rem;
}

.egm-quick-actions h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.egm-quick-action-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
}

.egm-quick-action-btn:hover {
    border-color: var(--action-color, var(--primary-color));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 2rem;
}

.action-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ========================================
   CHILDREN GRID (PARENT)
   ======================================== */

.egm-children-grid h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.children-cards {
    display: grid;
    gap: 1rem;
}

.child-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.child-card:hover {
    box-shadow: var(--shadow-md);
}

.child-avatar {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.child-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.child-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width var(--transition-slow);
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.child-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-icon {
    flex: 1;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.625rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

/* ========================================
   ACTIVITY TIMELINE
   ======================================== */

.egm-recent-activity {
    margin-top: 2rem;
}

.egm-recent-activity h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.activity-timeline {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activity-icon.success {
    background: rgba(82, 196, 26, 0.1);
}

.activity-icon.badge {
    background: rgba(245, 158, 11, 0.1);
}

.activity-icon.warning {
    background: rgba(250, 173, 20, 0.1);
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ========================================
   CLASSES OVERVIEW (TEACHER)
   ======================================== */

.egm-classes-overview h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.classes-grid {
    display: grid;
    gap: 1rem;
}

.class-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--class-color, var(--primary-color));
    transition: var(--transition-base);
}

.class-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.class-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.class-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.student-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.class-progress {
    margin-bottom: 1rem;
}

.class-progress span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    display: block;
}

.class-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    flex: 1;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-sm:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========================================
   STUDENTS ATTENTION (TEACHER)
   ======================================== */

.egm-students-attention {
    margin-top: 2rem;
}

.egm-students-attention h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.attention-list {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.attention-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attention-item:last-child {
    border-bottom: none;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-avatar {
    font-size: 2rem;
}

.class-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-top: 0.25rem;
}

.attention-reason {
    flex: 1;
}

.reason-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.reason-tag.danger {
    background: rgba(245, 34, 45, 0.1);
    color: var(--danger-color);
}

.reason-tag.warning {
    background: rgba(250, 173, 20, 0.1);
    color: var(--warning-color);
}

.attention-reason p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-action {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-action:hover {
    background: #3a7bc8;
}

/* ========================================
   HOMEWORK SECTION (STUDENT)
   ======================================== */

.egm-today-homework h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.homework-list {
    display: grid;
    gap: 1rem;
}

.homework-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: var(--transition-base);
}

.homework-card:hover {
    box-shadow: var(--shadow-md);
}

.homework-card.pending {
    border-left: 4px solid var(--warning-color);
}

.homework-card.in-progress {
    border-left: 4px solid var(--info-color);
}

.homework-card.completed {
    border-left: 4px solid var(--success-color);
}

.homework-icon {
    font-size: 2.5rem;
}

.homework-info {
    flex: 1;
}

.homework-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.homework-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.homework-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.difficulty {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.difficulty.easy {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.progress-bar-mini {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
}

.stars {
    font-size: 1rem;
}

.btn-play,
.btn-view {
    padding: 0.625rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-play:hover,
.btn-view:hover {
    background: #3a7bc8;
    transform: scale(1.02);
}

/* ========================================
   RECOMMENDED GAMES (STUDENT)
   ======================================== */

.egm-recommended-games {
    margin-top: 2rem;
}

.egm-recommended-games h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.games-carousel {
    display: grid;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.game-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    min-width: 280px;
}

.game-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.game-thumbnail {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.game-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.rating {
    font-size: 0.75rem;
    color: var(--warning-color);
}

.btn-play-game {
    width: 100%;
    padding: 0.625rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-play-game:hover {
    background: #3a7bc8;
}

/* ========================================
   BADGES SECTION (STUDENT)
   ======================================== */

.egm-recent-badges {
    margin-top: 2rem;
}

.egm-recent-badges h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.badge-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition-base);
}

.badge-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.badge-item.shine {
    animation: shine 2s infinite;
}

@keyframes shine {
    0%, 100% { box-shadow: var(--shadow-sm); }
    50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.4); }
}

.badge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.badge-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.badge-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ========================================
   OBSERVED CHILDREN (OBSERVER)
   ======================================== */

.egm-observed-children h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.observed-children-grid {
    display: grid;
    gap: 1rem;
}

.observed-child-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.observed-child-card:hover {
    box-shadow: var(--shadow-md);
}

.child-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.child-avatar-large {
    font-size: 3.5rem;
}

.child-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.relation-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    color: var(--text-secondary);
}

.child-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-item .stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-view-details {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-view-details:hover {
    background: #3a7bc8;
}

/* ========================================
   OBSERVER NOTICE
   ======================================== */

.egm-observer-notice {
    margin: 2rem 0;
}

.notice-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.notice-card.info {
    border-left: 4px solid var(--info-color);
    background: rgba(24, 144, 255, 0.05);
}

.notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notice-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.notice-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   MILESTONES TIMELINE (OBSERVER)
   ======================================== */

.egm-recent-milestones {
    margin-top: 2rem;
}

.egm-recent-milestones h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.milestones-timeline {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.milestone-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.milestone-item:last-child {
    border-bottom: none;
}

.milestone-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50px;
    bottom: -10px;
    width: 2px;
    background: var(--border-color);
}

.milestone-item:last-child::before {
    display: none;
}

.milestone-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(82, 196, 26, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.milestone-item.achieved .milestone-icon {
    background: rgba(82, 196, 26, 0.2);
    box-shadow: 0 0 0 4px rgba(82, 196, 26, 0.1);
}

.milestone-content {
    flex: 1;
}

.milestone-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.milestone-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.milestone-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   BOTTOM NAVIGATION (MOBILE)
   ======================================== */

.egm-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: var(--z-header);
    padding: 0.5rem 0;
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
}

.bottom-nav-item {
    flex: 1;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.bottom-nav-link.active {
    color: var(--primary-color);
}

.bottom-nav-icon {
    font-size: 1.5rem;
    position: relative;
}

.bottom-nav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.bottom-nav-label {
    font-size: 0.625rem;
    font-weight: 500;
}

/* ========================================
   MODAL COMPONENT
   ======================================== */

.egm-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.egm-modal.active {
    display: flex;
}

.egm-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.egm-modal-container {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.egm-modal[data-size="small"] .egm-modal-container {
    max-width: 400px;
}

.egm-modal[data-size="large"] .egm-modal-container {
    max-width: 700px;
}

.egm-modal[data-size="fullscreen"] .egm-modal-container {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
}

.egm-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.egm-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.egm-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    line-height: 1;
    transition: var(--transition-fast);
}

.egm-modal-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.egm-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.egm-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */

.egm-toast {
    position: fixed;
    z-index: var(--z-toast);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 400px;
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.egm-toast[data-position="top-right"] {
    top: 1rem;
    right: 1rem;
}

.egm-toast[data-position="top-left"] {
    top: 1rem;
    left: 1rem;
}

.egm-toast[data-position="bottom-right"] {
    bottom: 1rem;
    right: 1rem;
}

.egm-toast[data-position="bottom-left"] {
    bottom: 1rem;
    left: 1rem;
}

.egm-toast[data-position="top-center"] {
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
}

.egm-toast-success {
    border-left: 4px solid var(--success-color);
}

.egm-toast-error {
    border-left: 4px solid var(--danger-color);
}

.egm-toast-warning {
    border-left: 4px solid var(--warning-color);
}

.egm-toast-info {
    border-left: 4px solid var(--info-color);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    line-height: 1;
    transition: var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   PROGRESS BAR COMPONENT
   ======================================== */

.egm-progress-bar {
    width: 100%;
}

.egm-progress-small .progress-track {
    height: 4px;
}

.egm-progress-medium .progress-track {
    height: 8px;
}

.egm-progress-large .progress-track {
    height: 12px;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.progress-percentage {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

.progress-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width var(--transition-slow);
}

.progress-fill.animated {
    position: relative;
    overflow: hidden;
}

.progress-fill.animated::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========================================
   CARD COMPONENT
   ======================================== */

.egm-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition-base);
}

.egm-card:hover {
    box-shadow: var(--shadow-md);
}

.egm-card-clickable {
    cursor: pointer;
}

.egm-card-clickable:hover {
    transform: translateY(-2px);
}

.egm-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-icon {
    font-size: 1.5rem;
}

.egm-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.egm-card-body {
    padding: 1.25rem;
}

.egm-card-footer {
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

/* ========================================
   RESPONSIVE - TABLETTE (≥768px)
   ======================================== */

@media (min-width: 768px) {
    /* Header disparaît sur tablette+ */
    .egm-mobile-header {
        display: none;
    }
    
    /* Sidebar permanente */
    .egm-sidebar {
        left: 0;
        width: 260px;
    }
    
    .egm-sidebar-overlay {
        display: none;
    }
    
    /* Main content décalé */
    .egm-account-dashboard {
        flex-direction: row;
    }
    
    .egm-main-content {
        margin-left: 260px;
        padding: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Bottom nav disparaît */
    .egm-bottom-nav {
        display: none;
    }
    
    /* Stats grid 2 colonnes */
    .egm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Quick actions 2 colonnes */
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Children grid 2 colonnes */
    .children-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Classes grid 2 colonnes */
    .classes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Attention items en ligne */
    .attention-item {
        flex-direction: row;
        align-items: center;
    }
    
    /* Games carousel grille */
    .games-carousel {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-card {
        min-width: auto;
    }
    
    /* Observed children 2 colonnes */
    .observed-children-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   RESPONSIVE - DESKTOP (≥1200px)
   ======================================== */

@media (min-width: 1200px) {
    /* Sidebar plus large */
    .egm-sidebar {
        width: 280px;
    }
    
    .egm-main-content {
        margin-left: 280px;
        padding: 2.5rem;
        max-width: 1600px;
    }
    
    /* Stats grid 4 colonnes */
    .egm-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Quick actions 4 colonnes */
    .quick-actions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Children grid 3 colonnes */
    .children-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Classes grid 3 colonnes */
    .classes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Games carousel 3 colonnes */
    .games-carousel {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Badges grid plus large */
    .badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* ========================================
   RESPONSIVE - GRAND ÉCRAN (≥1440px)
   ======================================== */

@media (min-width: 1440px) {
    .egm-main-content {
        padding: 3rem;
    }
    
    /* Stats cards plus spacieuses */
    .egm-stat-card {
        padding: 1.5rem;
    }
    
    /* Classes grid 4 colonnes sur très grand écran */
    .classes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Games carousel 4 colonnes */
    .games-carousel {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus visible pour navigation clavier */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 100;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    .egm-card,
    .egm-stat-card,
    .child-card,
    .class-card {
        border: 2px solid var(--border-color);
    }
}

/* Dark mode (préparation future) */
@media (prefers-color-scheme: dark) {
    /* Variables dark mode à implémenter */
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .egm-sidebar,
    .egm-mobile-header,
    .egm-bottom-nav,
    .egm-notifications-btn,
    .egm-menu-toggle,
    .egm-modal,
    .egm-toast {
        display: none !important;
    }
    
    .egm-main-content {
        margin-left: 0;
    }
    
    .egm-account-dashboard {
        background: white;
    }
}

/* ========================================
   FIN DU FICHIER account-ui.css
   ======================================== */