/* =============================================
   JUST DO WEB - Espace Client
   Charte graphique & Design System
   ============================================= */

:root {
    --white: #FFFFFF;
    --black: #212121;
    --violet: #5F2194;
    --violet-rose: #A01899;
    --jaune: #F8AF42;
    --bleu: #44CAE6;
    --gradient: linear-gradient(135deg, #5F2194, #A01899);
    --gradient-h: linear-gradient(90deg, #5F2194, #A01899);

    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;

    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #F44336;
    --info: #2196F3;

    --font-title: 'Poppins', sans-serif;
    --font-text: 'Nunito', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);

    --topbar-h: 64px;
    --sidebar-w: 260px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-text);
    color: var(--black);
    background: var(--gray-100);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 800;
    line-height: 1.2;
}

a {
    color: var(--violet);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--violet-rose); }

img { max-width: 100%; height: auto; }

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -100px; right: -100px;
}

.login-body::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -80px; left: -80px;
}

.login-container {
    width: 100%;
    max-width: 440px;
    z-index: 1;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-logo-img {
    height: 70px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 1.8rem;
    background: var(--gradient-h);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.login-form label i {
    color: var(--violet);
    margin-right: 4px;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-text);
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.login-form input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(95, 33, 148, 0.15);
}

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

.login-footer p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.login-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--violet);
    font-weight: 700;
    font-size: 1.1rem;
}

.login-phone:hover { color: var(--violet-rose); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-primary {
    background: var(--gradient);
    color: var(--white);
}
.btn-primary:hover { color: var(--white); opacity: 0.9; }

.btn-secondary {
    background: var(--gray-200);
    color: var(--black);
}
.btn-secondary:hover { background: var(--gray-300); color: var(--black); }

.btn-accent-yellow {
    background: var(--jaune);
    color: var(--black);
}
.btn-accent-yellow:hover { color: var(--black); opacity: 0.9; }

.btn-accent-blue {
    background: var(--bleu);
    color: var(--white);
}
.btn-accent-blue:hover { color: var(--white); opacity: 0.9; }

.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover { color: var(--white); opacity: 0.9; }

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}
.btn-outline:hover {
    border-color: var(--violet);
    color: var(--violet);
}

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

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1rem;
}

.btn-icon {
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
}

/* =============================================
   TOP BAR
   ============================================= */
.top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--violet);
}

.top-bar-logo img {
    height: 36px;
}

.top-bar-info {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.client-selector-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-selector-form label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-600);
    white-space: nowrap;
}

.client-selector-form select {
    padding: 6px 12px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-text);
    font-size: 0.85rem;
    background: var(--white);
    cursor: pointer;
    outline: none;
    max-width: 200px;
}

.client-selector-form select:focus {
    border-color: var(--violet);
}

.client-name {
    font-weight: 700;
    color: var(--violet);
    font-size: 0.9rem;
}

.user-greeting {
    font-size: 0.85rem;
    color: var(--gray-600);
    white-space: nowrap;
}

.user-greeting i { color: var(--violet-rose); }

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.top-bar-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--violet);
    font-weight: 700;
    font-size: 0.85rem;
}
.top-bar-phone:hover { color: var(--violet-rose); }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
    z-index: 900;
    transition: transform var(--transition);
}

.sidebar-content {
    padding: 24px 16px;
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-500);
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-section-title i {
    margin-right: 6px;
}

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

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.sidebar-menu li a:hover {
    background: var(--gray-100);
    color: var(--violet);
}

.sidebar-menu li a.active {
    background: var(--gradient);
    color: var(--white);
}

.sidebar-menu li a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}
.sidebar-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--jaune);
}
.sidebar-empty p {
    font-size: 0.9rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 899;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
    margin-left: var(--sidebar-w);
    margin-top: var(--topbar-h);
    padding: 32px;
    min-height: calc(100vh - var(--topbar-h));
}

/* =============================================
   PAGE HEADER
   ============================================= */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.8rem;
    color: var(--black);
}

.page-header h1 i {
    color: var(--violet);
    margin-right: 8px;
}

.page-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

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

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 1.1rem;
    color: var(--black);
}

.card-header h2 i {
    color: var(--violet);
    margin-right: 8px;
}

.card-body {
    padding: 24px;
}

.card-gradient {
    background: var(--gradient);
    color: var(--white);
}
.card-gradient h2, .card-gradient h3 { color: var(--white); }
.card-gradient h2 i, .card-gradient h3 i { color: var(--jaune); }

/* =============================================
   FORMS
   ============================================= */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 6px;
    font-family: var(--font-text);
}

.form-group label .required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--white);
}

.form-control:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(95, 33, 148, 0.12);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23757575' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 4px;
}

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

.form-section {
    margin-bottom: 40px;
}

.form-section-title {
    font-size: 1.2rem;
    color: var(--violet);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--violet);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Checkbox custom */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.checkbox-item:hover {
    background: var(--gray-200);
}

.checkbox-item input[type="checkbox"] {
    accent-color: var(--violet);
    width: 18px; height: 18px;
    cursor: pointer;
}

.checkbox-item label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

/* =============================================
   TABLE
   ============================================= */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead th {
    background: var(--gray-100);
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid var(--gray-200);
}

thead th:hover {
    color: var(--violet);
}

thead th .sort-icon {
    margin-left: 4px;
    font-size: 0.7rem;
    opacity: 0.4;
}

tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: background var(--transition);
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr.clickable {
    cursor: pointer;
}

tbody td {
    padding: 12px 16px;
    vertical-align: middle;
}

/* Inline editable select */
td select.inline-select {
    padding: 4px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-family: var(--font-text);
    font-size: 0.85rem;
    background: var(--white);
    cursor: pointer;
}

td input.inline-input {
    padding: 4px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-family: var(--font-text);
    font-size: 0.85rem;
    width: 80px;
    background: var(--white);
}

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-nouveau { background: #E3F2FD; color: #1565C0; }
.badge-en-cours { background: #FFF3E0; color: #E65100; }
.badge-attente-infos { background: #FCE4EC; color: #C62828; }
.badge-attente-validation { background: #F3E5F5; color: #6A1B9A; }
.badge-terminee { background: #E8F5E9; color: #2E7D32; }

.badge-faible { background: #E8F5E9; color: #2E7D32; }
.badge-moyen { background: #FFF3E0; color: #E65100; }
.badge-urgent { background: #FFEBEE; color: #C62828; }

.badge-admin { background: var(--gradient); color: var(--white); }
.badge-client { background: var(--bleu); color: var(--white); }

/* NRJ statuts */
.badge-proposition-jdw { background: #E3F2FD; color: #1565C0; }
.badge-a-ecrire-jdw { background: #FFF3E0; color: #E65100; }
.badge-a-relire-client { background: #F3E5F5; color: #6A1B9A; }
.badge-a-corriger-jdw { background: #FCE4EC; color: #C62828; }
.badge-a-publier-jdw { background: #E0F7FA; color: #00695C; }
.badge-contenu-publie { background: #E8F5E9; color: #2E7D32; }

/* =============================================
   ALERTS
   ============================================= */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #C62828;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid #2E7D32;
}

.alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border-left: 4px solid #1565C0;
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border-left: 4px solid #E65100;
}

/* =============================================
   FLASH MESSAGES
   ============================================= */
.flash-message {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    animation: slideInUp 0.4s ease;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
}

.flash-success { background: #2E7D32; color: var(--white); }
.flash-error { background: #C62828; color: var(--white); }
.flash-info { background: #1565C0; color: var(--white); }

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.3rem;
    cursor: pointer;
    margin-left: auto;
    opacity: 0.7;
}
.flash-close:hover { opacity: 1; }

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

/* =============================================
   DASHBOARD
   ============================================= */
.dashboard-welcome {
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 32px;
}

.dashboard-welcome h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.dashboard-welcome p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.dashboard-card {
    padding: 24px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
}

.dashboard-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--white);
    flex-shrink: 0;
}

.dashboard-card-icon.violet { background: var(--gradient); }
.dashboard-card-icon.yellow { background: var(--jaune); color: var(--black); }
.dashboard-card-icon.blue { background: var(--bleu); }
.dashboard-card-icon.rose { background: var(--violet-rose); }

.dashboard-card-content h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.dashboard-card-content p {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* =============================================
   CHARTE GRAPHIQUE - Color swatches
   ============================================= */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.color-swatch {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
}

.color-swatch-preview {
    height: 80px;
    width: 100%;
}

.color-swatch-info {
    padding: 12px;
    text-align: center;
}

.color-swatch-name {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.color-swatch-hex {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-family: monospace;
}

/* =============================================
   FILE UPLOAD & GRID
   ============================================= */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.file-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    position: relative;
}

.file-item-icon {
    font-size: 2rem;
    color: var(--violet);
    margin-bottom: 8px;
}

.file-item-name {
    font-size: 0.8rem;
    font-weight: 600;
    word-break: break-all;
    color: var(--gray-700);
}

.file-item-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.file-upload-zone {
    border: 2px dashed var(--gray-400);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gray-50);
}

.file-upload-zone:hover {
    border-color: var(--violet);
    background: rgba(95, 33, 148, 0.03);
}

.file-upload-zone i {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.file-upload-zone p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.file-upload-zone input[type="file"] {
    display: none;
}

/* =============================================
   SUPPORT / ACTIONS MESSAGES
   ============================================= */
.message-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
}

.message-item {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--violet);
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.message-meta strong {
    color: var(--violet);
}

.message-text {
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.message-form {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
}

.message-form textarea {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-text);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    outline: none;
}

.message-form textarea:focus {
    border-color: var(--violet);
}

/* =============================================
   MEMBER / PRODUCT CARDS (Fiche projet)
   ============================================= */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.item-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.item-card-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--violet);
}

.item-card-delete {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* =============================================
   DOCUMENTS - Folders
   ============================================= */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.folder-item {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.folder-item:hover {
    border-color: var(--violet);
    box-shadow: var(--shadow-sm);
}

.folder-item.active {
    border-color: var(--violet);
    background: rgba(95, 33, 148, 0.05);
}

.folder-item i {
    font-size: 2.5rem;
    color: var(--jaune);
    margin-bottom: 8px;
}

.folder-item span {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
}

/* =============================================
   FILTERS / CONTROLS
   ============================================= */
.list-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toggle-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.toggle-control input[type="checkbox"] {
    accent-color: var(--violet);
    width: 16px;
    height: 16px;
}

/* =============================================
   TABS (for Charte Graphique)
   ============================================= */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab {
    padding: 12px 20px;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab:hover { color: var(--violet); }

.tab.active {
    color: var(--violet);
    border-bottom-color: var(--violet);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--gray-400);
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--gray-600);
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .top-bar-info {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

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

    .top-bar {
        padding: 0 12px;
    }

    .phone-text, .btn-text {
        display: none;
    }

    .btn-sm {
        padding: 8px 10px;
    }

    .dashboard-welcome h1 {
        font-size: 1.4rem;
    }

    .dashboard-welcome p {
        font-size: 0.9rem;
    }

    .login-card {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 1.4rem;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.8rem;
    }

    thead th, tbody td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .top-bar-right .top-bar-phone {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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