/* =================================================
   SRIMBA KIDS - UNIFIED STYLESHEET
   =================================================
   Fichier CSS unifié pour tous les pages de Srimba Kids
   Utilisé par: index.php, collection.php, account.php, login.php
   ================================================= */

/* =================================================
   CSS VARIABLES & RESET
   ================================================= */
:root {
    /* Couleurs principales */
    --kid-blue: #00A8E8;
    --kid-yellow: #FFCC00;
    --kid-red: #FF3366;
    --kid-green: #44DD66;
    --kid-purple: #9966FF;
    --kid-orange: #FF9933;
    --kid-pink: #FF69B4;
    --kid-teal: #20B2AA;
    
    /* Couleurs de texte */
    --text-color: #333333;
    --text-light: #666666;
    
    /* Styles généraux */
    --border-radius: 16px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout spécifique pour account.php */
    --sidebar-width: 280px;
}

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

/* =================================================
   BODY STYLES
   ================================================= */

/* Style de base pour toutes les pages */
body {
    font-family: 'Baloo 2', system-ui, sans-serif;
    min-height: 100vh;
    color: var(--text-color);
}

/* Background pour index.php et collection.php */
body.page-index, 
body.page-collection {
    background: linear-gradient(to bottom, #e6f7ff, #fff9e6);
}

/* Background pour login.php */
body.page-login {
    background: linear-gradient(135deg, #e6f7ff 0%, #fff9e6 50%, #f0e6ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: auto;
}

/* Background pour account.php */
body.page-account {
    background: linear-gradient(135deg, #fef3e2 0%, #e6f7ff 25%, #f0e6ff 50%, #e6fff7 75%, #ffe6f3 100%);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Floating background shapes pour account.php */
body.page-account::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 204, 0, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 10%, rgba(0, 168, 232, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 51, 102, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 20% 90%, rgba(153, 102, 255, 0.1) 0%, transparent 40%);
    z-index: -1;
    animation: float-bg 30s ease-in-out infinite;
}

/* =================================================
   COMMON COMPONENTS
   ================================================= */

/* Container commun */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Logo styles */
.logo {
    font-weight: bold;
    color: var(--kid-blue);
    text-decoration: none;
}

/* Logo pour index.php et collection.php */
.page-index .logo,
.page-collection .logo {
    font-size: 1.5rem;
}

/* Logo pour account.php sidebar */
.page-account .sidebar .logo {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s ease-in-out infinite;
}

/* Logo pour login.php */
.page-login .logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.logo-text {
    font-weight: 800;
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

/* Logo text pour account.php */
.page-account .logo-text {
    font-size: 1.5rem;
}

/* Logo text pour login.php */
.page-login .logo-text {
    font-size: 2rem;
}

.logo-subtitle {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

/* Back link commun */
.back-link {
    display: flex;
    align-items: center;
    color: var(--kid-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--kid-purple);
}

/* Back link pour collection.php */
.page-collection .back-link {
    margin-bottom: 2rem;
    font-weight: bold;
}

/* Back link pour login.php */
.page-login .back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 0.9rem;
    background: white;
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    transform: translateY(-2px);
}

.back-icon {
    margin-right: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
}

.page-login .back-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* =================================================
   BUTTON STYLES
   ================================================= */

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: none;
    font-family: 'Baloo 2', system-ui, sans-serif;
    text-decoration: none;
}

.btn:hover {
    transform: scale(1.05);
}

.btn:active {
    transform: scale(0.95);
}

/* Button styles pour index.php */
.page-index .btn {
    padding: 0.5rem 1rem;
}

/* Button styles pour collection.php */
.page-collection .btn {
    padding: 1rem;
    font-size: 1rem;
}

/* Button color variants */
.btn-green {
    background-color: var(--kid-green);
    color: white;
}

.btn-blue {
    background-color: var(--kid-blue);
    color: white;
}

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

.btn-red-outline:hover {
    background-color: #fff5f7;
}

.btn-gray-outline {
    background-color: transparent;
    color: #666;
    border: 2px solid #ddd;
}

.btn-gray-outline:hover {
    background-color: #f9f9f9;
}

.btn-icon {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
}

.page-collection .btn-icon {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
}

/* =================================================
   BADGE STYLES
   ================================================= */

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.page-collection .badge {
    padding: 0.25rem 1rem;
    font-size: 0.875rem;
}

.badge-yellow {
    background-color: var(--kid-yellow);
    color: black;
}

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

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

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

/* =================================================
   FORM STYLES
   ================================================= */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #f8fafc;
}

.form-input:focus {
    outline: none;
    border-color: var(--kid-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
}

.form-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    color: white;
    font-size: 1rem;
}

/* Form button pour login.php */
.page-login .form-btn {
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

/* Form button pour account.php */
.page-account .form-btn {
    padding: 14px;
}

.form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 168, 232, 0.3);
}

/* Login specific form styles */
.page-login .form-btn:active {
    transform: translateY(0);
}

.page-login .form-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.login-btn {
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    color: white;
}

.register-btn {
    background: linear-gradient(135deg, var(--kid-green), var(--kid-blue));
    color: white;
}

/* =================================================
   HEADER NAVIGATION (INDEX.PHP)
   ================================================= */

.header-nav {
    background-color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-nav {
    position: relative;
}

.header-nav::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 11px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    /* Hand-drawn irregular wavy line using inline SVG */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'><path d='M0,40 Q80,15 160,35 Q240,55 320,25 Q400,45 480,20 Q560,50 640,30 Q720,10 800,40 Q880,60 960,25 Q1040,45 1120,35 Q1160,25 1200,40' fill='none' stroke='%234f46e5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='0.8'/><path d='M0,50 Q90,25 180,45 Q270,65 360,35 Q450,55 540,30 Q630,60 720,40 Q810,20 900,50 Q990,70 1080,35 Q1140,45 1200,50' fill='none' stroke='%2306b6d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.6'/><path d='M0,30 Q70,50 140,25 Q210,45 280,15 Q350,35 420,50 Q490,25 560,45 Q630,20 700,35 Q770,55 840,30 Q910,40 980,15 Q1050,35 1120,25 Q1160,45 1200,30' fill='none' stroke='%2310b981' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.4'/></svg>");
    pointer-events: none;
}

.header-nav::before {
    content: '';
    position: absolute;
    display: none;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.parcours-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--kid-blue);
    color: white;
    border: none;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Baloo 2', system-ui, sans-serif;
}

.parcours-btn:hover {
    background-color: var(--kid-purple);
    transform: scale(1.05);
}

.parcours-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s;
}

.parcours-btn.open .parcours-icon {
    transform: rotate(180deg);
}

.parcours-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-top: 0.5rem;
    min-width: 400px;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.parcours-dropdown.open {
    display: grid;
}

.parcours-category h3 {
    font-size: 1.125rem;
    font-weight: bold;
    color: var(--kid-blue);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.parcours-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.parcours-item {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.parcours-item:hover {
    background-color: #f1f5f9;
    color: var(--kid-blue);
}

.account-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--kid-green);
    color: white;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.account-btn:hover {
    background-color: var(--kid-orange);
    transform: scale(1.05);
}

.account-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* =================================================
   TOPBAR (ACCOUNT.PHP)
   ================================================= */

.topbar {
    height: 70px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem 0 calc(var(--sidebar-width) + 2rem);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    backdrop-filter: blur(10px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.breadcrumb-item:not(.active) {
    cursor: pointer;
    color: var(--kid-blue);
}

.breadcrumb-item:not(.active):hover {
    color: var(--kid-purple);
}

.breadcrumb-separator {
    color: #cbd5e1;
    font-size: 0.8rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.08), rgba(153, 102, 255, 0.08));
    border: 1px solid rgba(0, 168, 232, 0.1);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.topbar-user:hover {
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.12), rgba(153, 102, 255, 0.12));
    transform: translateY(-1px);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-item:only-child {
    border-radius: 12px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.08), rgba(255, 102, 153, 0.08));
    color: var(--kid-red);
}

.dropdown-icon {
    font-size: 1.2rem;
    min-width: 20px;
}

.topbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 168, 232, 0.2);
}

.topbar-avatar::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: white;
}

.topbar-avatar-emoji {
    position: relative;
    z-index: 1;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.topbar-username {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
}

.topbar-status {
    font-size: 0.75rem;
    color: var(--kid-green);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kid-green);
    animation: pulse 2s infinite;
}

.quick-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quick-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border: 1px solid rgba(0, 168, 232, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    background: white;
}

.quick-action-btn.notifications {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kid-red), var(--kid-pink));
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* =================================================
   SIDEBAR (ACCOUNT.PHP)
   ================================================= */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    overflow: hidden;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.user-welcome {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 168, 232, 0.3) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 168, 232, 0.3);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 168, 232, 0.5);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    border-radius: 0 25px 25px 0;
    margin: 0.25rem 0;
    margin-right: 1rem;
}

.nav-item:hover {
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.08), rgba(153, 102, 255, 0.08));
    transform: translateX(8px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    color: white;
    box-shadow: 0 8px 24px rgba(0, 168, 232, 0.3);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 12px solid transparent;
    border-left-color: var(--kid-purple);
}

.nav-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    min-width: 24px;
}

/* =================================================
   MAIN CONTENT (ACCOUNT.PHP)
   ================================================= */

.main-content {
    margin-top: 70px;
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    min-height: 100vh;
}

.page-header {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--kid-blue), var(--kid-purple), var(--kid-orange), var(--kid-green));
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Profile Section */
.profile-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.avatar-section {
    margin-bottom: 1.5rem;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 12px 32px rgba(0, 168, 232, 0.3);
    position: relative;
}

.avatar::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-emoji {
    position: relative;
    z-index: 1;
}

.avatar:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 16px 40px rgba(0, 168, 232, 0.4);
}

.username {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.user-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--kid-green), var(--kid-teal));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.user-bio {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.4;
    text-align: center;
    font-style: italic;
    max-width: 250px;
    margin: 0 auto;
    cursor: pointer;
    transition: var(--transition);
}

.user-bio:hover {
    color: var(--text-color);
}

.stats-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.stats-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-color, #f8fafc), white);
    z-index: 0;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.stat-item:nth-child(1) { --bg-color: rgba(0, 168, 232, 0.08); }
.stat-item:nth-child(1) .stat-number { color: var(--kid-blue); }

.stat-item:nth-child(2) { --bg-color: rgba(68, 221, 102, 0.08); }
.stat-item:nth-child(2) .stat-number { color: var(--kid-green); }

.stat-item:nth-child(3) { --bg-color: rgba(255, 153, 51, 0.08); }
.stat-item:nth-child(3) .stat-number { color: var(--kid-orange); }

.stat-item:nth-child(4) { --bg-color: rgba(153, 102, 255, 0.08); }
.stat-item:nth-child(4) .stat-number { color: var(--kid-purple); }

.stat-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Actions Section */
.actions-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.action-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

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

.action-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--accent-color);
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.action-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.action-info p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* =================================================
   LOGIN PAGE STYLES
   ================================================= */

.login-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.form-tabs {
    display: flex;
    background: #f8fafc;
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    color: #666;
}

.tab-btn.active {
    background: white;
    color: var(--kid-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.form-footer {
    text-align: center;
    margin-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}

/* =================================================
   INDEX PAGE STYLES
   ================================================= */

header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.header-decoration {
    position: absolute;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    opacity: 0.2;
    animation: float 4s ease-in-out infinite;
}

.decoration-1 {
    background-color: var(--kid-yellow);
    top: -1rem;
    left: -1rem;
}

.decoration-2 {
    background-color: var(--kid-red);
    top: 2rem;
    right: -0.5rem;
    animation-delay: 1s;
}

h1 {
    font-size: 3rem;
    color: var(--kid-blue);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.star-icon {
    position: absolute;
    right: -2rem;
    top: -1.5rem;
    width: 3rem;
    height: 3rem;
    color: var(--kid-yellow);
    animation: spin-slow 10s linear infinite;
}

header p {
    font-size: 1.25rem;
    color: #666;
}

.section {
    margin-bottom: 3rem;
}

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

h2 {
    font-size: 1.5rem;
    color: var(--kid-blue);
}

.see-all-link {
    color: var(--kid-purple);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.see-all-link:hover {
    color: var(--kid-red);
}

.see-all-icon {
    width: 1rem;
    height: 1rem;
}

.buttons {
    display: flex;
    gap: 0.75rem;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.story-card {
    background-color: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 4px solid white;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.story-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.collection-card {
    border-color: var(--kid-purple);
}

.story-image {
    position: relative;
    height: 12rem;
    overflow: hidden;
}

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

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

body:not(.page-collection) .story-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
    opacity: 0.3;
    z-index: 1;
}

.story-content {
    padding: 1.25rem;
}

.story-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--kid-blue);
    margin-bottom: 0.5rem;
}

.story-description {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.story-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.story-stat {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.875rem;
    font-weight: 500;
}

.story-stat-icon {
    margin-right: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

.story-stat-icon.book {
    color: var(--kid-blue);
}

.story-stat-icon.mic {
    color: var(--kid-red);
}

.story-stat-icon.collection {
    color: var(--kid-purple);
}

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

.how-it-works {
    margin-top: 4rem;
    background-color: white;
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 4px solid var(--kid-yellow);
}

.how-it-works h2 {
    font-size: 1.875rem;
    color: var(--kid-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.how-it-works-icon {
    margin-right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--kid-yellow);
}

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

.step {
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 2px solid;
    transition: transform 0.3s;
}

.step:hover {
    transform: scale(1.05);
}

.step-1 {
    background-color: #e6f7ff;
    border-color: var(--kid-blue);
}

.step-2 {
    background-color: #fffbe6;
    border-color: var(--kid-yellow);
}

.step-3 {
    background-color: #ffe6eb;
    border-color: var(--kid-red);
}

.step-icon-wrapper {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.step-1 .step-icon-wrapper {
    background-color: var(--kid-blue);
}

.step-2 .step-icon-wrapper {
    background-color: var(--kid-yellow);
}

.step-3 .step-icon-wrapper {
    background-color: var(--kid-red);
}

.step-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: white;
}

.step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.step-1 h3 {
    color: var(--kid-blue);
}

.step-2 h3 {
    color: var(--kid-yellow);
}

.step-3 h3 {
    color: var(--kid-red);
}

.step p {
    color: #666;
}

/* =================================================
   COLLECTION PAGE STYLES
   ================================================= */

.collection-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.collection-sidebar {
    display: flex;
    flex-direction: column;
}

.collection-card {
    background-color: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.page-index .collection-card, .page-account .collection-card, .page-school .collection-card {
    padding: 0rem;
}

.page-school .collection-card {
    border-color: white !important;
}

.collections-grid .story-card.collection-card {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 4px solid white;
    border-color: var(--kid-purple);
    padding: 0rem;
}

.collection-cover {
    position: relative;
    height: 16rem;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 4px solid white;
}

.collection-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stories-count-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: var(--kid-purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.collection-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.collection-stats {
    display: flex;
    justify-content: space-between;
    color: #666;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.collection-stat {
    display: flex;
    align-items: center;
}

.collection-stat-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.25rem;
}

.collection-stat-icon.collection {
    color: var(--kid-purple);
}

.collection-stat-icon.time {
    color: var(--kid-green);
}

.collection-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.collection-content {
    background-color: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.collection-title {
    font-size: 1.875rem;
    color: var(--kid-blue);
    margin-bottom: 1rem;
}

.collection-description {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Story cards dans collection */
.page-collection h1.category-title {
    display: block;
}

.page-collection .stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.page-collection .story-card {
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.page-collection .story-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.story-card.selected {
    border-color: var(--kid-yellow);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.2);
}

.story-thumbnail {
    position: relative;
    height: 8rem;
    overflow: hidden;
}

.story-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-age-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--kid-yellow);
    color: black;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.story-info {
    padding: 1rem;
}

.page-collection .story-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--kid-blue);
    margin-bottom: 0.5rem;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #666;
}

.story-duration {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.story-level {
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 500;
}

.level-beginner {
    background-color: var(--kid-green);
    color: white;
}

.level-intermediate {
    background-color: var(--kid-orange);
    color: white;
}


/* Styles spécifiques pour la page école */
.page-school {
    margin: 0;
    padding: 0;
}

.school-banner {
    height: calc(100vh - 60px); /* Hauteur complète moins la topbar */
    background-image: url('<?php echo $school['banner_url']; ?>');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.school-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.school-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.school-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    top: 5px;
}

.school-logo img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
}

.school-name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.school-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.school-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.school-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    min-width: 150px;
}

.school-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.school-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.school-content {
    background: #f8fafc;
    min-height: 100vh;
    position: relative;
}

.school-tabs {
    background: white;
    border-bottom: 2px solid #e0e6ed;
    position: sticky;
    top: 0; /* Hauteur de la topbar */
    z-index: 100;
}

.school-tabs-nav {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.school-tab {
    padding: 1.25rem 2rem;
    background: none;
    border: none;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.school-tab:hover {
    color: var(--kid-blue);
    background: rgba(74, 144, 226, 0.05);
}

.school-tab.active {
    color: var(--kid-blue);
    border-bottom-color: var(--kid-blue);
}

.school-tab-panel {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.school-tab-panel.active {
    display: block;
}

.overview-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.overview-new-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.overview-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.overview-right {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

/* Section À propos */
.about-school-section {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.about-school-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.about-school-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.about-school-text h3 {
    color: var(--kid-blue);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.about-school-text p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.contact-icon {
    font-size: 1rem;
}

.contact-label {
    font-weight: 600;
    color: var(--kid-blue);
    min-width: 80px;
}

.contact-value {
    color: #64748b;
}

/* Collections récentes */
.recent-collections {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Grille de statistiques 2x2 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #e0e6ed;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--kid-blue);
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
}

.overview-main {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.overview-sidebar {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

.overview-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kid-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.collection-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.collection-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.collection-info {
    padding: 1.25rem;
}

.collection-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kid-blue);
    margin-bottom: 0.5rem;
}

.collection-description {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.collection-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #64748b;
}

.teachers-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2.5rem;
}

.teachers-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.teacher-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 1.5rem;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.teacher-header {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(139, 92, 246, 0.05));
    padding: 1.25rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.teacher-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.teacher-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kid-purple), var(--kid-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.teacher-info h3 {
    margin: 0 0 0.25rem 0;
    color: var(--kid-blue);
    font-weight: 700;
    font-size: 1.2rem;
}

.teacher-role {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}

.teacher-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.teacher-stat {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.75rem;
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.teacher-stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--kid-blue);
    display: block;
}

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

.teacher-details {
    padding: 1.5rem 1.75rem;
}

.teacher-detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.teacher-detail-item:last-child {
    margin-bottom: 0;
}

.teacher-detail-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.teacher-detail-content {
    flex: 1;
}

.teacher-detail-label {
    font-weight: 600;
    color: var(--kid-blue);
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.teacher-detail-value {
    color: #64748b;
    font-size: 0.9rem;
}

.teachers-sidebar {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.team-summary {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.team-summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kid-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.summary-stat {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kid-blue);
    display: block;
}

.summary-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

/* Layout des collections avec sidebar */
.collections-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
}

.collections-sidebar {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 1rem;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.sidebar-section {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--kid-blue);
    margin: 0;
    padding: 1rem 1.5rem 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(74, 144, 226, 0.12);
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.filter-list {
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(248, 250, 252, 0.6);
    border: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: 'Baloo 2', sans-serif;
    width: 100%;
    position: relative;
}

.filter-item:hover {
    background: rgba(74, 144, 226, 0.08);
    border-left: 3px solid var(--kid-blue);
    padding-left: calc(1.5rem - 3px);
}

.filter-item.active {
    color: var(--kid-blue);
    border-left: 3px solid var(--kid-blue);
    padding-left: calc(1.5rem - 3px);
    font-weight: 600;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(139, 92, 246, 0.05));
}

.filter-item:first-child {
    border-top: 1px solid rgba(226, 232, 240, 0.4);
}

.filter-item:last-child {
    border-bottom: none;
}

.filter-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.filter-count {
    background: rgba(74, 144, 226, 0.15);
    color: var(--kid-blue);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.filter-item.active .filter-count {
    background: var(--kid-blue);
    color: white;
}

.filter-text {
    flex: 1;
}

.filter-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.filter-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #94a3b8;
    font-style: italic;
}

.filter-empty-text {
    font-size: 0.9rem;
}

.filter-sublabel {
    font-size: 0.75rem;
    opacity: 0.6;
    font-weight: 400;
}

.collections-content {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.collections-actions {
    display: flex;
    gap: 1rem;
}

.btn-create-new {
    position: relative;
    display: inline-block;
}

.btn-create-main {
    background: linear-gradient(135deg, var(--kid-purple), var(--kid-pink));
    color: white;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 0.75rem;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
    border: 1px solid transparent;
}

.btn-create-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.btn-create-main .dropdown-arrow {
    transition: transform 0.3s ease;
}

.btn-create-main.active .dropdown-arrow {
    transform: rotate(180deg);
}

.create-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(226, 232, 240, 0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: #334155;
    text-decoration: none;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(139, 92, 246, 0.05));
    color: var(--kid-blue);
}

.dropdown-item-icon {
    font-size: 1.2rem;
}

.dropdown-item-text {
    flex: 1;
}

.dropdown-item-title {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.dropdown-item-desc {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 500;
}

.class-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--kid-blue);
}

.class-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kid-blue);
    margin-bottom: 0.5rem;
}

.class-level {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.class-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #64748b;
}

.info-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--kid-blue);
    display: block;
    margin-bottom: 0.25rem;
}

.info-value {
    color: #64748b;
}

@media (max-width: 1024px) {
    .collections-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .collections-sidebar {
        position: static;
        order: 2;
        grid-template-columns: 300px;
    }
    
    .collections-content {
        order: 1;
    }
    
    .teachers-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .teachers-sidebar {
        position: static;
        order: 2;
    }
    
    .teachers-main {
        order: 1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .school-name {
        font-size: 2.5rem;
    }
    
    .school-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .school-tabs-nav {
        padding: 0 1rem;
        overflow-x: auto;
    }
    
    .school-tab {
        padding: 1rem 1.5rem;
        white-space: nowrap;
    }
    
    .overview-grid,
    .overview-new-grid {
        grid-template-columns: 1fr;
    }
    
    .about-school-content {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .teachers-grid {
        grid-template-columns: 1fr;
    }
    
    .teachers-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .classes-grid {
        grid-template-columns: 1fr;
    }
    
    .collections-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .filter-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* =================================================
   MODALS
   ================================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 24px;
    /*padding: 2rem;*/
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Story Detail Modal pour collection.php */
.story-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.story-modal.open {
    display: flex;
}

.story-modal .modal-content {
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem 1.5rem 0 0;
}

#story-modal .modal-header {
    height: 12rem;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
}

.modal-close:hover {
    background-color: #f9f9f9;
}

.close-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #666;
}

.modal-body {
    padding: 1.5rem;
}

.modal-story-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--kid-blue);
    margin-bottom: 1rem;
}

.modal-story-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-story-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* =================================================
   NOTIFICATIONS
   ================================================= */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    min-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, var(--kid-green), #22c55e);
}

.notification.error {
    background: linear-gradient(135deg, var(--kid-red), #ef4444);
}

/* =================================================
   UTILITIES
   ================================================= */

.clickable {
    cursor: pointer;
}

.mobile-header {
    display: none;
}

.mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    display: none;
}

.mobile-logo {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =================================================
   ANIMATIONS
   ================================================= */

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(2deg);
    }
    75% {
        transform: translateY(5px) rotate(-2deg);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes float-bg {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* Tablet */
@media (max-width: 1024px) {
    .profile-section {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hidden-on-mobile {
        display: none;
    }

    /* Index.php mobile */
    .nav-container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-center {
        position: relative;
        left: auto;
        transform: none;
        justify-self: center;
    }
    
    .parcours-dropdown {
        min-width: 300px;
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }

    /* Account.php mobile */
    .topbar-left .breadcrumb {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .quick-actions {
        gap: 0.5rem;
    }

    .topbar-user-info {
        display: none;
    }

    .topbar {
        padding: 0 1rem;
    }

    .sidebar {
        height: calc(100vh - 70px);
        top: 70px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-header {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
        margin-top: 70px;
    }

    .page-title {
        font-size: 2rem;
    }

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

    .actions-section {
        grid-template-columns: 1fr;
    }

    /* Collection.php mobile */
    .collection-detail {
        grid-template-columns: 1fr;
    }
    
    .collection-cover {
        height: 12rem;
    }
    
    .page-collection .stories-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .modal-actions {
        flex-direction: column;
    }

    /* Login.php mobile */
    .login-container {
        padding: 2rem;
    }
    
    .page-login .logo-text {
        font-size: 1.5rem;
    }
    
    .page-login body {
        padding: 10px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .avatar {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }

    .page-header, .profile-card, .stats-card, .action-card {
        padding: 1.5rem;
    }
}

/* ================================
   MODALE D'INVITATION D'ENSEIGNANT
   ================================ */

.modal:not(.custom-modal) {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal:not(.custom-modal).show {
    opacity: 1;
    visibility: visible;
}

.modal:not(.custom-modal) .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal:not(.custom-modal) .modal-content {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 2rem auto;
    /*transform: scale(0.8) translateY(2rem);*/
    transition: transform 0.3s ease;
}

.modal:not(.custom-modal).show .modal-content {
    transform: scale(1) translateY(0);
}


.modal:not(.custom-modal) .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.modal:not(.custom-modal) .modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kid-blue);
    margin: 0;
}

.modal:not(.custom-modal) .modal-icon {
    font-size: 2rem;
}

.modal:not(.custom-modal) .modal-close {
    background: none;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.modal:not(.custom-modal) .modal-close:hover {
    background: #f1f5f9;
    color: var(--kid-blue);
    transform: scale(1.1);
}

.modal:not(.custom-modal) .modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.modal:not(.custom-modal) .modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--kid-blue);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-family: 'Baloo 2', sans-serif;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--kid-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    background: #f8fafc;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}

.form-subjects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.subject-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.subject-checkbox:hover {
    background: #e2e8f0;
    border-color: var(--kid-blue);
}

.subject-checkbox input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--kid-blue);
    cursor: pointer;
}

.subject-checkbox label {
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.subject-checkbox:has(input:checked) {
    background: rgba(74, 144, 226, 0.1);
    border-color: var(--kid-blue);
}

.subject-checkbox:has(input:checked) label {
    color: var(--kid-blue);
    font-weight: 600;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.btn-primary:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 1.1em;
}

/* Responsive pour la modale */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .form-subjects {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animation des états de chargement */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================
   INDICATEURS DE STATUT ENSEIGNANTS
   ================================ */

.teacher-card {
    transition: all 0.3s ease;
    position: relative;
}

.teacher-card.pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.02), rgba(245, 158, 11, 0.05));
}

.teacher-card.confirmed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(16, 185, 129, 0.05));
}

.teacher-status {
    margin-left: auto;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    cursor: help;
    transition: all 0.2s;
}

.status-confirmed {
    color: #166534;
}

.status-pending {
    color: #d97706;
    animation: pulse-pending 2s infinite;
}

.status-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes pulse-pending {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Adaptation du header des cartes enseignants */
.teacher-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.teacher-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .teacher-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .teacher-status {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ================================
   GESTION DES CATÉGORIES ET CLASSES
   ================================ */

.categories-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 1.5rem;
}

.categories-main {
    flex: 1;
}

.category-section {
    margin-bottom: 3rem;
}

.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(74, 144, 226, 0.1);
}

.category-section-title {
    color: var(--kid-blue);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(74, 144, 226, 0.2);
}

.category-card.class-card {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02), rgba(99, 102, 241, 0.02));
}

.category-card.content-card {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(5, 150, 105, 0.02));
}

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

.category-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.category-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.category-details h4 {
    color: var(--kid-blue);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.category-code {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
}

.category-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.category-btn.edit {
    background: #f0f9ff;
    color: #3b82f6;
}

.category-btn.edit:hover {
    background: #dbeafe;
    transform: scale(1.1);
}

.category-btn.delete {
    background: #fef2f2;
    color: #ef4444;
}

.category-btn.delete:hover {
    background: #fee2e2;
    transform: scale(1.1);
}

.category-description {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.category-stats {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.category-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
}

.category-stat-icon {
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0.7;
}

.category-stat-value {
    font-weight: 600;
    color: var(--kid-blue);
}

/* Sidebar catégories */
.categories-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-summary {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.category-summary-title {
    color: var(--kid-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Modal pour création/édition de catégories */
.category-modal .modal-content {
    max-width: 500px;
}

.category-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.icon-selector {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
}

.icon-option {
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.icon-option:hover {
    border-color: var(--kid-blue);
    transform: scale(1.1);
}

.icon-option.selected {
    border-color: var(--kid-blue);
    background: var(--kid-blue);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .categories-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .categories-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .form-row-dual {
        grid-template-columns: 1fr;
    }
    
    .icon-selector {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ================================
   STYLES POUR L'ÉDITION DE L'ÉCOLE
   ================================ */

.school-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.edit-school-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
}

.edit-school-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.edit-school-btn:active {
    transform: scale(0.95);
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .school-title-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .edit-school-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ================================
   STYLES POUR L'UPLOAD D'IMAGES
   ================================ */

.image-upload-section {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.current-image {
    flex-shrink: 0;
}

.current-image img {
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.upload-controls {
    flex: 1;
    min-width: 200px;
}

.form-input-file {
    display: none;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--kid-blue), var(--kid-purple));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.9rem;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

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

/* Responsive pour upload d'images */
@media (max-width: 768px) {
    .image-upload-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .upload-controls {
        min-width: auto;
    }
    
    .current-image img {
        max-width: 150px !important;
    }
}