/* -----------------------------------------------------------------------------
 * ASERTASK - THEME BASIQUE & AÉRÉ (CLEAN, WHITE & MINIMALIST WITH GENEROUS SPACING)
 * ----------------------------------------------------------------------------- */

:root {
    /* Color Palette */
    --bg-main: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Typography Colors */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    /* Accent & Interactive Colors */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    --secondary: #0ea5e9;
    --secondary-hover: #0284c7;
    --secondary-light: #f0f9ff;

    /* Semantic Status Colors (Pastel & Clean) */
    --status-todo-bg: #fef3c7;
    --status-todo-text: #92400e;
    --status-todo-border: #fcd34d;

    --status-doing-bg: #e0f2fe;
    --status-doing-text: #0369a1;
    --status-doing-border: #bae6fd;

    --status-done-bg: #d1fae5;
    --status-done-text: #065f46;
    --status-done-border: #a7f3d0;

    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --danger-border: #fecaca;

    /* Font Families */
    --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Radius & Spacing */
    --sidebar-width: 320px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px -3px rgba(0, 0, 0, 0.03), 0 2px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 16px 24px -6px rgba(15, 23, 42, 0.08), 0 6px 12px -4px rgba(15, 23, 42, 0.04);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

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

/* -----------------------------------------------------------------------------
 * APP HEADER (NAVIGATION HAUTE)
 * ----------------------------------------------------------------------------- */
.app-header {
    height: var(--header-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--primary);
}

.logo-text span {
    color: var(--primary);
    font-weight: 400;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.role-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-admin {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-resp {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-volunteer {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.logout-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: var(--transition);
}

.logout-btn:hover {
    color: #ef4444;
    background: #fee2e2;
    border-color: #fca5a5;
    transform: scale(1.05);
}

/* -----------------------------------------------------------------------------
 * CORE DASHBOARD LAYOUT
 * ----------------------------------------------------------------------------- */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.dashboard-container {
    display: flex;
    gap: 2.5rem;
    min-height: calc(100vh - var(--header-height) - 150px);
}

/* -----------------------------------------------------------------------------
 * SIDEBAR DES ÉVÉNEMENTS (SIMPLE CLAIRE ET APPRÊTÉE)
 * ----------------------------------------------------------------------------- */
.events-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.sidebar-header h2 {
    font-size: 1.15rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    max-height: 65vh;
}

.event-item {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: var(--transition);
}

.event-item:hover {
    background: var(--primary-light);
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.event-item.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.event-item-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.event-item.active .event-item-title {
    color: #ffffff;
}

.event-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.event-item.active .event-item-date {
    color: #bfdbfe;
}

.badge-neutral {
    background: #e2e8f0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    align-self: flex-start;
    border: 1px solid var(--border-color);
}

.event-item.active .badge-neutral {
    background: rgba(0, 0, 0, 0.15);
    color: #ffffff;
    border-color: transparent;
}

/* -----------------------------------------------------------------------------
 * ESPACE DE TRAVAIL PRINCIPAL (WORKSPACE)
 * ----------------------------------------------------------------------------- */
.event-workspace {
    flex: 1;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.workspace-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 6rem 2rem;
    color: var(--text-muted);
}

.workspace-empty-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    gap: 1.5rem;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-details h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
}

.event-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.event-metadata span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.event-metadata i {
    color: var(--primary);
}

.event-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

/* -----------------------------------------------------------------------------
 * STATISTIQUES CARDS (KPIs DÉPART)
 * ----------------------------------------------------------------------------- */
.event-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.stat-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.icon-tasks {
    background: #dbeafe;
    color: var(--primary);
    border: 1px solid #bfdbfe;
}

.icon-progress {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.icon-budget {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fcd34d;
}

.icon-files {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.stat-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 0.2rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
    line-height: 1.1;
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 50px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.stat-progress-fill {
    height: 100%;
    background: #10b981;
}

/* -----------------------------------------------------------------------------
 * TABLEAU DES TÂCHES ET DES SOUS-TÂCHES
 * ----------------------------------------------------------------------------- */
.tasks-board h2 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.tasks-tree {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cartes de tâches */
.task-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition);
}

.task-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.main-task {
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.task-card.task-overdue {
    border-color: var(--danger-border);
    background-color: #fffafb;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.05), 0 2px 4px -1px rgba(220, 38, 38, 0.03);
}

.task-card.task-overdue.main-task {
    border-left-color: #dc2626;
}

.task-card.task-overdue:hover {
    border-color: #fca5a5;
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.1), 0 4px 6px -2px rgba(220, 38, 38, 0.05);
}

.badge-overdue-tag {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}


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

.task-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.task-drag-handle {
    color: var(--primary);
    font-size: 1.1rem;
}

.task-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
}

.task-due-date {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.task-due-date.overdue {
    color: var(--danger-text);
    background: var(--danger-bg);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: 1px solid var(--danger-border);
}

.task-assignee {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.task-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--border-color);
}

.task-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-selector-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-select {
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.status-select.status-todo {
    background: var(--status-todo-bg);
    color: var(--status-todo-text);
    border-color: var(--status-todo-border);
}

.status-select.status-doing {
    background: var(--status-doing-bg);
    color: var(--status-doing-text);
    border-color: var(--status-doing-border);
}

.status-select.status-done {
    background: var(--status-done-bg);
    color: var(--status-done-text);
    border-color: var(--status-done-border);
}

/* Fichiers Joints */
.task-attachments {
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
    margin-top: 1.25rem;
}

.task-attachments h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.file-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.file-list li {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.file-link {
    font-weight: 500;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.file-link:hover {
    color: var(--primary);
}

.file-uploader {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* SOUS-TÂCHE (Niveau 2 - Decalage simple) */
.subtasks-container {
    margin-top: 1.25rem;
    border-left: 2px dashed #cbd5e1;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sub-task {
    background: #f8fafc;
    border-left: 4px solid var(--secondary);
    padding: 1.1rem 1.25rem;
}

.sub-task .task-title {
    font-size: 0.95rem;
}

/* -----------------------------------------------------------------------------
 * INTERACTIVE BUTTONS
 * ----------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-secondary {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--border-hover);
}

.btn-icon-only {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    padding: 0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* -----------------------------------------------------------------------------
 * FORMULAIRES
 * ----------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.col-6 {
    flex: 0 0 calc(50% - 0.75rem);
}

.col-12 {
    flex: 0 0 100%;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ZONE DRAG & DROP FICHIER */
.file-drop-zone {
    border: 2px dashed var(--border-color);
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    position: relative;
}

.file-drop-zone.dragover,
.file-drop-zone:hover {
    border-color: var(--primary);
    background: #f0f4ff;
}

.drop-zone-icon {
    font-size: 1.75rem;
    color: var(--primary);
}

.drop-zone-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-selected-info {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.btn-remove-file {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.25rem;
    cursor: pointer;
}

/* PROGRESS BAR POUR UPLOAD DRIVE */
.upload-progress-container {
    margin-top: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
}

/* -----------------------------------------------------------------------------
 * VUE DE CONNEXION (PAGE LOGIN PROPRE & ÉPURÉE)
 * ----------------------------------------------------------------------------- */
/* -----------------------------------------------------------------------------
 * VUE DE CONNEXION (PAGE LOGIN ULTRA-MODERNE & GLOWING GLASSMORPHIC)
 * ----------------------------------------------------------------------------- */
.login-page {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0076ff 0%, #004ecc 100%);
    min-height: 100vh;
    display: flex;
    position: relative;
}

.login-page .main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 2rem 1.25rem;
    z-index: 2;
    position: relative;
}

.login-container {
    width: 100%;
    max-width: 900px;
    padding: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Split Card Layout */
.login-card-split {
    display: flex;
    width: 100%;
    min-height: 540px;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Left Visual Panel */
.login-visual-panel {
    flex: 1.1;
    background: linear-gradient(135deg, #0084ff 0%, #004ecc 100%);
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.visual-content {
    position: relative;
    z-index: 2;
}

.visual-content h1 {
    font-size: 2.85rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    font-family: var(--font-heading);
}

.visual-content h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.visual-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    max-width: 320px;
}

/* Decorative 3D Spheres */
.visual-spheres {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.sphere {
    position: absolute;
    border-radius: 50%;
}

.sphere-1 {
    bottom: -15%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle at 30% 30%, #0099ff 0%, #004acc 70%, #002677 100%);
    box-shadow: -10px -10px 30px rgba(0, 0, 0, 0.15) inset, 
                15px 15px 30px rgba(0, 0, 0, 0.2);
}

.sphere-2 {
    right: -10%;
    top: 10%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at 30% 30%, #00bfff 0%, #005bc4 75%, #00368c 100%);
    box-shadow: -10px -10px 30px rgba(0, 0, 0, 0.15) inset, 
                15px 15px 30px rgba(0, 0, 0, 0.25);
}

.sphere-3 {
    bottom: 8%;
    right: 32%;
    width: 170px;
    height: 170px;
    background: radial-gradient(circle at 30% 30%, #00c3ff 0%, #0054cc 70%, #002d99 100%);
    box-shadow: -10px -10px 25px rgba(0, 0, 0, 0.15) inset, 
                10px 10px 20px rgba(0, 0, 0, 0.2);
}

/* Right Form Panel */
.login-form-panel {
    flex: 1;
    background: #ffffff;
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.login-form-panel h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.login-form-panel p.subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Input Fields Styles */
.login-form-panel .form-group label {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.login-form-panel .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.login-form-panel .input-wrapper .input-icon {
    position: absolute;
    left: 1.25rem;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.3s;
    font-size: 1rem;
}

.login-form-panel input[type="email"],
.login-form-panel input[type="password"] {
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.95rem 1rem 0.95rem 3rem;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    outline: none;
}

.login-form-panel input[type="email"]:focus,
.login-form-panel input[type="password"]:focus {
    background: #ffffff;
    border-color: #0076ff;
    box-shadow: 0 0 0 4px rgba(0, 118, 255, 0.15);
}

.login-form-panel input:focus ~ .input-icon {
    color: #0076ff;
}

/* Password Toggle Visibility Button */
.login-form-panel .password-toggle-btn {
    position: absolute;
    right: 1.25rem;
    background: none;
    border: none;
    color: #0076ff;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-transform: uppercase;
    padding: 0.25rem;
    transition: color 0.2s, transform 0.2s;
    outline: none;
}

.login-form-panel .password-toggle-btn:hover {
    color: #004ecc;
    transform: scale(1.05);
}

/* Form Options: Remember Me & Forgot Password */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 1.75rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    cursor: pointer;
    font-weight: 500;
}

.remember-me input {
    accent-color: #0076ff;
    cursor: pointer;
    width: 15px;
    height: 15px;
}

.forgot-pass-link {
    color: #0076ff;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-pass-link:hover {
    color: #004ecc;
    text-decoration: underline;
}

/* Autofill Success Flash Animation */
@keyframes input-autofill-flash {
    0% {
        border-color: rgba(16, 185, 129, 0.5);
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
        background: rgba(16, 185, 129, 0.05);
    }
    50% {
        border-color: rgba(16, 185, 129, 1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.3);
        background: rgba(16, 185, 129, 0.1);
    }
    100% {
        border-color: transparent;
        box-shadow: none;
        background: #f1f5f9;
    }
}

.autofill-success {
    animation: input-autofill-flash 0.8s ease-in-out;
}

/* Primary Button (Deep Blue) */
.login-form-panel .btn-primary {
    background: #004ecc;
    border: none;
    color: #ffffff;
    font-weight: 700;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 78, 204, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.login-form-panel .btn-primary:hover {
    background: #003da6;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 78, 204, 0.3);
}

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

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

/* Error Alert */
.login-form-panel .alert {
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 0.85rem 1.15rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Quick Login Demo Accounts Section */
.demo-login-section {
    margin-top: 2rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.25rem;
    position: relative;
    z-index: 2;
}

.demo-title {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.demo-title i {
    color: #f59e0b;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.demo-chip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    outline: none;
}

.demo-chip:hover {
    background: #e0f2fe;
    border-color: #bae6fd;
    transform: translateY(-1px);
}

.demo-chip:active {
    transform: translateY(0);
}

.chip-role {
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-chip .chip-role { color: #dc2626; }
.resp-chip .chip-role { color: #0284c7; }
.volunteer-chip .chip-role { color: #059669; }

.chip-email {
    font-size: 0.65rem;
    color: #64748b;
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Decorative circle in the bottom right of the card */
.decor-circle {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #0084ff 0%, #004ecc 100%);
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

/* Custom footer positioning & styling for the login page */
.login-page .app-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.65);
    position: absolute;
    bottom: 0;
    width: 100%;
    margin-top: 0;
    padding: 1.5rem 1rem;
    z-index: 1;
}

.login-page .app-footer p {
    color: rgba(255, 255, 255, 0.65);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-container {
        max-width: 450px;
    }
    .login-card-split {
        flex-direction: column;
        min-height: auto;
    }
    .login-visual-panel {
        display: none;
    }
    .login-form-panel {
        padding: 3rem 2rem;
    }
}

/* -----------------------------------------------------------------------------
 * ALERTE ET MODALS
 * ----------------------------------------------------------------------------- */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: var(--danger-border);
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.hidden {
    display: none !important;
}

/* Modals Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    padding: 1.5rem 2rem 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.75rem 2rem 2rem 2rem;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* -----------------------------------------------------------------------------
 * FOOTER
 * ----------------------------------------------------------------------------- */
.app-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    margin-top: auto;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* -----------------------------------------------------------------------------
 * RESPONSIVITÉ
 * ----------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .event-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dashboard-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .events-sidebar {
        width: 100%;
    }

    .events-list {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1.25rem;
    }

    .main-content {
        padding: 1.5rem 1.25rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .col-6 {
        flex: 0 0 100%;
    }

    .modal-card {
        margin: 1.25rem;
    }

    .event-stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-header {
        padding: 1.25rem 1.5rem 1rem 1.5rem;
    }

    .modal-body {
        padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    }
}

/* -----------------------------------------------------------------------------
 * STYLE DES PÔLES ET ACCESSOIRES DE SÉLECTION
 * ----------------------------------------------------------------------------- */
.task-poles {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    color: var(--text-muted);
}

.badge-pole {
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.poles-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.pole-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    user-select: none;
}

.pole-checkbox-label:hover {
    border-color: var(--border-hover);
    background: #f1f5f9;
}

.pole-checkbox-label input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--primary);
}

.pole-checkbox-label.selected {
    background: var(--primary-light);
    border-color: #bfdbfe;
    color: var(--primary);
}

/* User Management Modal Styles */
.user-management-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.user-management-table th, 
.user-management-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.user-management-table th {
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--bg-main);
}

.user-management-table tr:hover {
    background-color: #f8fafc;
}

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

.btn-danger-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    background-color: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-danger-sm:hover:not(:disabled) {
    background-color: #fca5a5;
    color: #7f1d1d;
    transform: scale(1.05);
}

.btn-danger-sm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.user-pole-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: var(--danger-border);
}

.btn-danger:hover {
    background: #fca5a5;
    color: #7f1d1d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}