/**
 * Styles publics pour Lacyme Ticketing - Design Tableau
 * Couleurs: #552028 (texte), #f6451e (orange), #9abde4 (bleu), #efe8e1 (beige fond)
 */

:root {
    --lacyme-primary: #552028;
    --lacyme-accent: #f6451e;
    --lacyme-blue: #9abde4;
    --lacyme-bg-light: #efe8e1;
    --lacyme-success: #00a86b;
    --lacyme-white: #ffffff;
    --lacyme-gray-light: #f5f5f5;
    --lacyme-gray: #6b7280;
    --lacyme-gray-dark: #374151;
    --lacyme-border: #e5e7eb;
}

/* ========================================
   DASHBOARD LAYOUT
======================================== */

.lacyme-dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f1ed 0%, #efe8e1 100%);
    width: 100%;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ========================================
   SIDEBAR
======================================== */

.lacyme-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #552028 0%, #3d1820 100%);
    border-right: none;
    box-shadow: 4px 0 20px rgba(85, 32, 40, 0.15);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 100;
}

.lacyme-sidebar-user {
    display: flex;
    color: var(--lacyme-white);
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.lacyme-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #EFE8E1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lacyme-white);
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(246, 69, 30, 0.3);
    overflow: hidden;
}

.lacyme-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.lacyme-user-avatar svg {
    width: 32px;
    height: 32px;
}

.lacyme-user-info {
    flex: 1;
}

.lacyme-user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lacyme-white);
    margin: 0 0 0.25rem 0;
}

.lacyme-user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.lacyme-sidebar-section {
    margin-bottom: 2rem;
}

.lacyme-sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lacyme-filter-count {
    background: var(--lacyme-accent);
    color: var(--lacyme-white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: auto;
}

/* Groupe de filtre */
.lacyme-filter-group {
    margin-bottom: 1.25rem;
    position: relative;
}

/* Label du filtre */
.lacyme-filter-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease;
}

/* Label quand filtre actif */
.lacyme-filter-group.has-value .lacyme-filter-label {
    color: var(--lacyme-white);
}

.lacyme-filter-group.has-value .lacyme-filter-label::before {
    content: '● ';
    color: var(--lacyme-accent);
    font-size: 0.6rem;
    margin-right: 0.25rem;
    vertical-align: middle;
}

/* Select de filtre - État par défaut */
.lacyme-filter-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.1);
    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='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Select hover */
.lacyme-filter-select:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Select focus */
.lacyme-filter-select:focus {
    outline: none;
    border-color: var(--lacyme-accent);
    background-color: rgba(246, 69, 30, 0.15);
    box-shadow: 0 0 0 3px rgba(246, 69, 30, 0.1);
}

/* Select actif (avec valeur sélectionnée) */
.lacyme-filter-select.filter-active {
    background-color: var(--lacyme-accent);
    border-color: var(--lacyme-accent);
    border-width: 2px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(246, 69, 30, 0.3);
}

/* Options du select */
.lacyme-filter-select option {
    color: #000000;
    background: #ffffff;
    padding: 0.5rem;
    font-weight: 500;
}

.lacyme-filter-select option:checked {
    background: #f3f4f6;
    font-weight: 600;
}

.lacyme-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.lacyme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    width: 100%;
    white-space: nowrap;
}

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

.lacyme-btn-primary {
    background: var(--lacyme-accent);
    color: var(--lacyme-white);
    box-shadow: 0 4px 12px rgba(246, 69, 30, 0.25);
}

.lacyme-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(246, 69, 30, 0.35);
    background: #ff5530;
}

.lacyme-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--lacyme-white);
    border-color: rgba(255, 255, 255, 0.2);
}

.lacyme-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.lacyme-sidebar-stats {
    background: var(--lacyme-gray-light);
    padding: 1rem;
    border-radius: 8px;
}

.lacyme-mini-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lacyme-mini-stat {
    text-align: center;
}

.lacyme-mini-stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--lacyme-primary);
    margin: 0;
}

.lacyme-mini-stat-label {
    font-size: 0.75rem;
    color: var(--lacyme-gray);
    margin: 0.25rem 0 0 0;
}

.lacyme-sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--lacyme-border);
}

.lacyme-sidebar-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: transparent;
    border: 2px solid var(--lacyme-border);
    border-radius: 8px;
    color: var(--lacyme-gray-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lacyme-sidebar-logout:hover {
    background: var(--lacyme-accent);
    border-color: var(--lacyme-accent);
    color: var(--lacyme-white);
}

/* ========================================
   CONTENU PRINCIPAL
======================================== */

.lacyme-main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    overflow-y: auto;
    min-height: 100vh;
}

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

.lacyme-dashboard-title {
    font-size: 2rem;
    color: var(--lacyme-primary);
    margin: 0 0 0.25rem 0;
    font-weight: 800;
}

.lacyme-dashboard-subtitle {
    color: var(--lacyme-gray);
    margin: 0;
    font-size: 0.95rem;
}

/* ========================================
   CONTRÔLES DE ZOOM
======================================== */

.lacyme-zoom-controls {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 0.5rem 0.75rem !important;
}

.lacyme-zoom-controls .lacyme-zoom-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border: none !important;
    background: transparent !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
    padding: 4px !important;
}

.lacyme-zoom-controls .lacyme-zoom-btn svg {
    color: #6b7280 !important;
    fill: #6b7280 !important;
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}

.lacyme-zoom-controls .lacyme-zoom-btn:hover {
    background: #f3f4f6 !important;
    color: #552028 !important;
}

.lacyme-zoom-controls .lacyme-zoom-btn:hover svg {
    color: #552028 !important;
    fill: #552028 !important;
}

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

.lacyme-zoom-reset {
    border-left: 1px solid var(--lacyme-border);
    margin-left: 0.25rem;
    padding-left: 0.5rem;
}

.lacyme-zoom-level {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lacyme-primary);
    min-width: 45px;
    text-align: center;
}

.lacyme-header-search {
    position: relative;
    width: 350px;
}

.lacyme-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lacyme-gray);
    pointer-events: none;
}

.lacyme-header-search input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3.5rem;
    border: 2px solid var(--lacyme-border);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.lacyme-header-search input:focus {
    outline: none;
    border-color: var(--lacyme-accent);
    box-shadow: 0 0 0 3px rgba(241, 43, 22, 0.1);
}

/* ========================================
   STATISTIQUES CARDS
======================================== */

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

.lacyme-stat-card {
    background: var(--lacyme-white);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid var(--lacyme-border);
}

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

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

.lacyme-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--lacyme-gray);
}

.lacyme-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.lacyme-stat-card-total {
    border-color: #e5e7eb;
}

.lacyme-stat-card-total .lacyme-stat-icon {
    background: #f3f4f6;
    color: #6b7280;
}

.lacyme-stat-card-total .lacyme-stat-value {
    color: #1f2937;
}

.lacyme-stat-card-nouveau {
    border-color: #93c5fd;
}

.lacyme-stat-card-nouveau .lacyme-stat-icon {
    background: #3b82f6;
    color: #ffffff;
}

.lacyme-stat-card-nouveau .lacyme-stat-value {
    color: #1e40af;
}

.lacyme-stat-card-encours {
    border-color: #fcd34d;
}

.lacyme-stat-card-encours .lacyme-stat-icon {
    background: #f59e0b;
    color: #ffffff;
}

.lacyme-stat-card-encours .lacyme-stat-value {
    color: #c2410c;
}

.lacyme-stat-card-termine {
    border-color: #6ee7b7;
}

.lacyme-stat-card-termine .lacyme-stat-icon {
    background: #10b981;
    color: #ffffff;
}

.lacyme-stat-card-termine .lacyme-stat-value {
    color: #047857;
}

.lacyme-stat-card:hover .lacyme-stat-icon {
    transform: scale(1.1);
}

.lacyme-stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin: 0;
}

/* ========================================
   ONGLETS
======================================== */

.lacyme-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--lacyme-border);
}

.lacyme-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--lacyme-gray);
    transition: all 0.2s ease;
    font-size: 0.9rem;
    margin-bottom: -2px;
}

.lacyme-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: #e5e7eb;
    color: var(--lacyme-gray-dark);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.lacyme-tab:hover {
    color: var(--lacyme-accent);
    background: rgba(241, 43, 22, 0.05);
}

.lacyme-tab.active {
    color: var(--lacyme-accent);
    border-bottom-color: var(--lacyme-accent);
    background: rgba(241, 43, 22, 0.05);
}

.lacyme-tab.active .lacyme-tab-count {
    background: var(--lacyme-accent);
    color: var(--lacyme-white);
}

/* ========================================
   TABLEAU DES TICKETS
======================================== */

.lacyme-tickets-container {
    background: var(--lacyme-white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 400px;
    position: relative;
}

.lacyme-tickets-table {
    width: 100%;
    border-collapse: collapse;
}

.lacyme-tickets-table thead {
    background: var(--lacyme-gray-light);
    border-bottom: 2px solid var(--lacyme-border);
}

.lacyme-tickets-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--lacyme-gray);
}

.lacyme-tickets-table tbody tr {
    border-bottom: 1px solid var(--lacyme-border);
    transition: background 0.2s ease;
    cursor: pointer;
}

.lacyme-tickets-table tbody tr:hover {
    background: rgba(241, 43, 22, 0.02);
}

.lacyme-tickets-table td {
    padding: 1.25rem;
    font-size: 0.9rem;
}

.lacyme-ticket-id {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--lacyme-gray);
    font-weight: 600;
}

.lacyme-ticket-requester-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lacyme-ticket-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lacyme-primary), var(--lacyme-accent));
    color: var(--lacyme-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.lacyme-ticket-info {
    flex: 1;
}

.lacyme-ticket-title {
    font-weight: 600;
    color: var(--lacyme-gray-dark);
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.lacyme-ticket-requester {
    font-size: 0.85rem;
    color: var(--lacyme-gray);
    margin: 0;
}

.lacyme-ticket-assigned {
    max-width: 180px;
}

.lacyme-assigned-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #fff5f3 0%, #ffffff 100%);
    border: 1.5px solid #f6451e;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--lacyme-primary);
    max-width: 100%;
}

.lacyme-assigned-badge svg {
    color: var(--lacyme-accent);
    flex-shrink: 0;
}

.lacyme-assigned-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lacyme-unassigned-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    background: var(--lacyme-bg-light);
    border: 1.5px solid var(--lacyme-border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--lacyme-gray);
    font-style: italic;
    white-space: nowrap;
}

.lacyme-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lacyme-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.lacyme-status-badge.lacyme-status-nouveau,
.lacyme-status-nouveau {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.lacyme-status-badge.lacyme-status-nouveau .lacyme-status-dot {
    background: #0284c7;
    box-shadow: 0 0 0 2px #e0f2fe;
}

.lacyme-status-badge.lacyme-status-en_cours,
.lacyme-status-en_cours {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    color: #c2410c;
    border: 1px solid #fdba74;
}

.lacyme-status-badge.lacyme-status-en_cours .lacyme-status-dot {
    background: #ea580c;
    box-shadow: 0 0 0 2px #ffedd5;
}

.lacyme-status-badge.lacyme-status-resolu,
.lacyme-status-resolu {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.lacyme-status-badge.lacyme-status-resolu .lacyme-status-dot {
    background: #059669;
    box-shadow: 0 0 0 2px #d1fae5;
}

.lacyme-status-badge.lacyme-status-ferme,
.lacyme-status-ferme {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

.lacyme-status-badge.lacyme-status-ferme .lacyme-status-dot {
    background: #6b7280;
    box-shadow: 0 0 0 2px #f3f4f6;
}

.lacyme-ticket-category {
    color: var(--lacyme-gray-dark);
    font-size: 0.9rem;
}

.lacyme-category-cell {
    display: block;
}

.lacyme-category-cell strong {
    color: var(--lacyme-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.lacyme-category-cell small {
    color: var(--lacyme-gray);
    font-size: 0.85rem;
    font-weight: 400;
    display: block;
    margin-top: 0.15rem;
}

.lacyme-ticket-enterprise {
    color: var(--lacyme-gray-dark);
    font-weight: 500;
}

.lacyme-ticket-date {
    color: var(--lacyme-gray);
    font-size: 0.9rem;
}

/* Colonne actions avec bouton loupe */
.lacyme-actions-header,
.lacyme-ticket-actions-cell {
    width: 60px;
    text-align: center;
}

.lacyme-view-ticket-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--lacyme-bg-light);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--lacyme-primary);
}

.lacyme-view-ticket-btn:hover {
    background: var(--lacyme-accent);
    color: var(--lacyme-white);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(246, 69, 30, 0.25);
}

.lacyme-view-ticket-btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   LOADER & EMPTY STATE
======================================== */

.lacyme-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.lacyme-no-tickets {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--lacyme-gray);
}

.lacyme-no-tickets svg {
    margin-bottom: 1rem;
    opacity: 0.3;
}

.lacyme-no-tickets p {
    font-size: 1.125rem;
    margin: 0;
}

/* ========================================
   MODAL
======================================== */

.lacyme-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lacyme-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(85, 32, 40, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lacyme-modal-content {
    position: relative;
    max-width: 950px;
    width: 100%;
    background: var(--lacyme-white);
    border-radius: 24px;
    padding: 3rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(85, 32, 40, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lacyme-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--lacyme-bg-light);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--lacyme-primary);
}

.lacyme-modal-close:hover {
    background: var(--lacyme-accent);
    color: var(--lacyme-white);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(246, 69, 30, 0.3);
}

/* ========================================
   CONTENU MODAL - DÉTAILS TICKET
======================================== */

#lacyme-ticket-details {
    padding: 1rem 0;
}

/* Header modal */
.lacyme-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--lacyme-bg-light);
}

/* Sélecteur de statut */
.lacyme-status-selector {
    position: relative;
}

.lacyme-current-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--lacyme-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lacyme-current-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lacyme-current-status svg {
    transition: transform 0.3s ease;
}

.lacyme-status-dropdown.open + .lacyme-current-status svg,
.lacyme-current-status:has(+ .lacyme-status-dropdown.open) svg {
    transform: rotate(180deg);
}

.lacyme-status-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: var(--lacyme-white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(85, 32, 40, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

.lacyme-status-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lacyme-status-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--lacyme-bg-light);
}

.lacyme-status-option:last-child {
    border-bottom: none;
}

.lacyme-status-option:hover {
    background: linear-gradient(135deg, #fff5f3 0%, #ffffff 100%);
    padding-left: 1.5rem;
}

.lacyme-status-option .lacyme-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lacyme-status-option span:last-child {
    color: var(--lacyme-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.lacyme-modal-ticket-number {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lacyme-gray);
    background: var(--lacyme-bg-light);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.lacyme-modal-title {
    font-size: 1.75rem;
    color: var(--lacyme-primary);
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

/* Rangée des métadonnées (assignation + statut) */
.lacyme-modal-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--lacyme-bg-light);
    flex-wrap: wrap;
}

.lacyme-ticket-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* Onglets */
.lacyme-modal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--lacyme-bg-light);
}

.lacyme-modal-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--lacyme-gray);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.lacyme-modal-tab:hover {
    color: var(--lacyme-primary);
    background: var(--lacyme-bg-light);
}

.lacyme-modal-tab.active {
    color: var(--lacyme-accent);
    border-bottom-color: var(--lacyme-accent);
    font-weight: 600;
}

.lacyme-modal-tab svg {
    width: 18px;
    height: 18px;
}

.lacyme-modal-tab-content {
    display: none;
}

.lacyme-modal-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Sélecteur d'assignation (même style que le sélecteur de statut) */
.lacyme-assignment-selector {
    position: relative;
}

.lacyme-current-assignment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--lacyme-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: var(--lacyme-primary);
}

.lacyme-current-assignment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lacyme-current-assignment svg:first-child {
    color: var(--lacyme-accent);
    flex-shrink: 0;
}

.lacyme-current-assignment svg:last-child {
    transition: transform 0.3s ease;
    margin-left: 0.25rem;
}

.lacyme-current-assignment.lacyme-unassigned {
    color: var(--lacyme-gray);
}

.lacyme-current-assignment.lacyme-unassigned svg:first-child {
    color: var(--lacyme-gray);
}

/* Dropdown d'assignation */
.lacyme-assignment-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 280px;
    max-width: 350px;
    background: var(--lacyme-white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(85, 32, 40, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.lacyme-assignment-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lacyme-assignment-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lacyme-assignment-error {
    padding: 1.5rem;
    text-align: center;
    color: var(--lacyme-gray);
    font-size: 0.9rem;
}

.lacyme-assignment-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--lacyme-bg-light);
}

.lacyme-assignment-option:last-child {
    border-bottom: none;
}

.lacyme-assignment-option:hover {
    background: linear-gradient(135deg, #fff5f3 0%, #ffffff 100%);
    padding-left: 1.5rem;
}

.lacyme-assignment-option svg {
    width: 20px;
    height: 20px;
    color: var(--lacyme-accent);
    flex-shrink: 0;
}

.lacyme-assignment-option[data-username=""] svg {
    color: var(--lacyme-gray);
}

.lacyme-assignment-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.lacyme-assignment-option-name {
    font-weight: 600;
    color: var(--lacyme-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lacyme-assignment-option-role {
    font-size: 0.8rem;
    color: var(--lacyme-gray);
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Toast de succès */
.lacyme-success-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    font-weight: 600;
    z-index: 10001;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease-out;
}

.lacyme-success-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.lacyme-success-toast:has(❌) {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Grille d'informations */
.lacyme-modal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.lacyme-modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lacyme-modal-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lacyme-gray);
}

.lacyme-modal-info-value {
    font-size: 1rem;
    color: var(--lacyme-primary);
    font-weight: 500;
    word-break: break-word;
}

.lacyme-ticket-status-large {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
}

.lacyme-ticket-status-large .lacyme-status-dot {
    width: 10px;
    height: 10px;
}

.lacyme-modal-section {
    background: var(--lacyme-bg-light);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--lacyme-accent);
}

.lacyme-modal-section-title {
    font-size: 1.1rem;
    color: var(--lacyme-primary);
    font-weight: 600;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lacyme-modal-section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--lacyme-accent);
    border-radius: 2px;
}

.lacyme-modal-description {
    margin: 0;
    line-height: 1.7;
    color: var(--lacyme-gray-dark);
    font-size: 0.95rem;
}

/* Pièce jointe */
.lacyme-attachment-section {
    background: #f0f6fc;
    border-left-color: #2196f3;
}

.lacyme-attachment-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e3f2fd;
    transition: all 0.2s ease;
}

.lacyme-attachment-card:hover {
    border-color: #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
    transform: translateY(-2px);
}

.lacyme-attachment-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lacyme-attachment-info {
    flex: 1;
    min-width: 0;
}

.lacyme-attachment-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lacyme-attachment-ext {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

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

.lacyme-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.lacyme-btn-primary {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

.lacyme-btn-primary:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.lacyme-btn-secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.lacyme-btn-secondary:hover {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}

/* Historique */
.lacyme-logs-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.lacyme-logs-timeline {
    position: relative;
    padding-left: 2rem;
}

.lacyme-logs-timeline::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--lacyme-accent) 0%, var(--lacyme-border) 100%);
}

.lacyme-log-entry {
    position: relative;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-left: 0;
}

.lacyme-log-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6451e 0%, #d63c19 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lacyme-white);
    box-shadow: 0 4px 12px rgba(246, 69, 30, 0.25);
    position: relative;
    z-index: 1;
}

.lacyme-log-icon svg {
    width: 20px;
    height: 20px;
}

/* Couleurs spécifiques selon le type d'action */
.lacyme-log-icon-created .lacyme-log-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.lacyme-log-icon-status_changed .lacyme-log-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.lacyme-log-icon-assigned .lacyme-log-icon,
.lacyme-log-icon-reassigned .lacyme-log-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.lacyme-log-icon-comment_added .lacyme-log-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.lacyme-log-icon-priority_changed .lacyme-log-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.lacyme-log-content {
    flex: 1;
    min-width: 0;
}

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

.lacyme-log-action {
    font-weight: 600;
    color: var(--lacyme-primary);
    font-size: 0.95rem;
}

.lacyme-log-time {
    font-size: 0.8rem;
    color: var(--lacyme-gray);
    white-space: nowrap;
}

.lacyme-log-details {
    color: var(--lacyme-gray-dark);
    line-height: 1.5;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.lacyme-log-timestamp {
    font-size: 0.75rem;
    color: var(--lacyme-gray);
}

.lacyme-loading-modal,
.lacyme-error-modal {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--lacyme-gray);
    font-size: 0.95rem;
}

.lacyme-error-modal {
    color: #dc3545;
}

.lacyme-no-logs {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--lacyme-gray);
    font-style: italic;
}

/* Actions */
.lacyme-ticket-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--lacyme-bg-light);
}

.lacyme-ticket-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    flex: 1;
    letter-spacing: 0.02em;
}

.lacyme-ticket-action-btn svg {
    width: 18px;
    height: 18px;
}

.lacyme-ticket-action-btn.primary {
    background: linear-gradient(135deg, #552028 0%, #f6451e 100%);
    color: var(--lacyme-white);
    box-shadow: 0 4px 12px rgba(246, 69, 30, 0.25);
}

.lacyme-ticket-action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(246, 69, 30, 0.35);
}

.lacyme-ticket-action-btn.secondary {
    background: var(--lacyme-white);
    color: var(--lacyme-primary);
    border-color: var(--lacyme-border);
}

.lacyme-ticket-action-btn.secondary:hover {
    background: var(--lacyme-bg-light);
    border-color: var(--lacyme-accent);
    color: var(--lacyme-accent);
    transform: translateY(-3px);
}

/* Section commentaire dans le modal */
.lacyme-comment-section {
    padding: 1.5rem;
}

.lacyme-comment-textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid var(--lacyme-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.lacyme-comment-textarea:focus {
    outline: none;
    border-color: var(--lacyme-primary);
    box-shadow: 0 0 0 3px rgba(85, 32, 40, 0.1);
}

.lacyme-comment-textarea::placeholder {
    color: #9ca3af;
}

#lacyme-submit-comment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--lacyme-primary) 0%, var(--lacyme-accent) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#lacyme-submit-comment:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(246, 69, 30, 0.3);
}

#lacyme-submit-comment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#lacyme-submit-comment svg {
    width: 16px;
    height: 16px;
}

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

/* Tablettes (1024px et moins) */
@media (max-width: 1024px) {
    .lacyme-sidebar {
        width: 250px;
    }
    
    .lacyme-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .lacyme-modal-content {
        max-width: 90%;
        margin: 2rem auto;
    }
    
    .lacyme-tabs {
        gap: 0.5rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .lacyme-tab {
        flex-shrink: 0;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Tablettes moyennes (900px et moins) */
@media (max-width: 900px) {
    .lacyme-enterprise-grid,
    .lacyme-platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobiles et petites tablettes (768px et moins) */
@media (max-width: 768px) {
    /* Formulaire - Layout responsive */
    .lacyme-ticket-form-wrapper {
        padding: 2rem 1rem;
    }
    
    .lacyme-ticket-header {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .lacyme-ticket-title {
        font-size: 1.75rem;
    }
    
    .lacyme-ticket-subtitle {
        font-size: 1rem;
    }
    
    .lacyme-form-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .lacyme-section-title {
        font-size: 1.25rem;
    }
    
    .lacyme-form-row {
        flex-direction: column !important;
        gap: 1rem;
    }
    
    .lacyme-col-6,
    .lacyme-col-4 {
        flex-basis: 100% !important;
        max-width: 100% !important;
    }
    
    .lacyme-enterprise-grid,
    .lacyme-platform-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .lacyme-submit-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Dashboard Layout */
    .lacyme-dashboard-layout {
        flex-direction: column;
    }
    
    .lacyme-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 9999;
        transition: left 0.3s ease;
        border-right: 1px solid var(--lacyme-border);
        padding: 1.5rem;
        overflow-y: auto;
    }
    
    .lacyme-sidebar.mobile-open {
        left: 0;
    }
    
    .lacyme-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
    
    .lacyme-sidebar-overlay.active {
        display: block;
    }
    
    .lacyme-mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: var(--lacyme-primary);
        color: white;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .lacyme-mobile-menu-btn:hover {
        background: var(--lacyme-accent);
    }
    
    .lacyme-sidebar-user {
        flex-direction: row;
        gap: 1rem;
    }
    
    .lacyme-user-avatar {
        width: 48px;
        height: 48px;
    }
    
    .lacyme-sidebar-section {
        margin-bottom: 1.5rem;
    }
    
    .lacyme-main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    /* Stats */
    .lacyme-stats-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .lacyme-stat-card {
        padding: 1.25rem;
    }
    
    .lacyme-stat-value {
        font-size: 2rem;
    }
    
    /* Header */
    .lacyme-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .lacyme-dashboard-title {
        font-size: 1.75rem;
    }
    
    .lacyme-header-search {
        width: 100%;
    }
    
    /* Tabs */
    .lacyme-tabs {
        gap: 0.375rem;
        padding: 0 0.5rem;
    }
    
    .lacyme-tab {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    .lacyme-tab-count {
        padding: 0.125rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Table */
    .lacyme-tickets-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .lacyme-tickets-table thead {
        display: none;
    }
    
    .lacyme-tickets-table tbody,
    .lacyme-tickets-table tr {
        display: block;
    }
    
    .lacyme-tickets-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--lacyme-border);
        border-radius: 12px;
        padding: 1rem;
        background: var(--lacyme-white);
    }
    
    .lacyme-tickets-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
    }
    
    .lacyme-tickets-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--lacyme-gray);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    /* Modal */
    .lacyme-modal {
        padding: 1rem;
    }
    
    .lacyme-modal-content {
        max-width: 100%;
        max-height: 95vh;
        margin: 0;
        border-radius: 16px;
    }
    
    .lacyme-modal-header {
        padding: 1.5rem;
    }
    
    .lacyme-modal-title {
        font-size: 1.5rem;
    }
    
    .lacyme-modal-ticket-number {
        font-size: 0.8rem;
    }
    
    .lacyme-modal-meta-row {
        flex-direction: column;
        gap: 0.75rem;
        padding-bottom: 1.5rem;
    }
    
    .lacyme-assignment-selector,
    .lacyme-status-selector {
        width: 100%;
    }
    
    .lacyme-current-assignment,
    .lacyme-current-status {
        width: 100%;
        justify-content: space-between;
    }
    
    .lacyme-assignment-dropdown,
    .lacyme-status-dropdown {
        left: 0;
        right: 0;
        min-width: auto;
        max-width: none;
    }
    
    .lacyme-modal-tabs {
        gap: 0.375rem;
        border-bottom: 2px solid var(--lacyme-bg-light);
    }
    
    .lacyme-modal-tab {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    .lacyme-modal-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .lacyme-logs-container {
        max-height: 300px;
    }
    
    .lacyme-log-entry {
        gap: 0.75rem;
    }
    
    .lacyme-log-icon {
        width: 36px;
        height: 36px;
    }
    
    .lacyme-log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .lacyme-log-time {
        order: -1;
    }
    
    /* Filtres */
    .lacyme-filter-select {
        font-size: 0.9rem;
        padding: 0.625rem;
    }
    
    /* Toast */
    .lacyme-toast,
    .lacyme-success-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    /* Login */
    .lacyme-login-container {
        padding: 2rem 1.5rem;
    }
    
    .lacyme-login-logo {
        width: 80px;
        height: 80px;
    }
    
    /* Pagination */
    .lacyme-pagination {
        gap: 0.375rem;
        margin: 2rem 0 1.5rem 0;
    }
    
    .lacyme-page-btn {
        min-width: 40px;
        height: 40px;
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .lacyme-page-prev,
    .lacyme-page-next {
        padding: 0.375rem;
        min-width: 40px;
    }
    
    .lacyme-page-text {
        display: none;
    }
    
    .lacyme-page-prev {
        order: -1;
    }
    
    .lacyme-page-next {
        order: 999;
    }
    
    .lacyme-page-ellipsis {
        min-width: 32px;
        height: 40px;
    }
}

/* Petits mobiles (480px et moins) */
@media (max-width: 480px) {
    /* Formulaire - Petits écrans */
    .lacyme-ticket-form-wrapper {
        padding: 1.5rem 0.75rem;
    }
    
    .lacyme-ticket-header {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
    
    .lacyme-ticket-title {
        font-size: 1.5rem;
    }
    
    .lacyme-ticket-subtitle {
        font-size: 0.9rem;
    }
    
    .lacyme-form-section {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .lacyme-section-title {
        font-size: 1.1rem;
    }
    
    .lacyme-label {
        font-size: 0.9rem;
    }
    
    .lacyme-input,
    .lacyme-textarea,
    .lacyme-select {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .lacyme-enterprise-box,
    .lacyme-platform-box {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .lacyme-submit-btn {
        width: 100%;
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    /* Dashboard */
    .lacyme-main-content {
        padding: 0.75rem;
    }
    
    .lacyme-dashboard-header {
        padding: 1rem;
    }
    
    .lacyme-dashboard-title {
        font-size: 1.5rem;
    }
    
    .lacyme-stat-card {
        padding: 1rem;
    }
    
    .lacyme-stat-label {
        font-size: 0.7rem;
    }
    
    .lacyme-stat-value {
        font-size: 1.75rem;
    }
    
    .lacyme-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .lacyme-modal-content {
        border-radius: 12px;
    }
    
    .lacyme-modal-header,
    .lacyme-modal-body {
        padding: 1rem;
    }
    
    .lacyme-modal-title {
        font-size: 1.25rem;
    }
    
    .lacyme-current-assignment,
    .lacyme-current-status {
        font-size: 0.85rem;
        padding: 0.5rem 0.875rem;
    }
    
    .lacyme-page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .lacyme-page-ellipsis {
        min-width: 28px;
        height: 36px;
        font-size: 1rem;
    }
}/* ========================================
   FORMULAIRE DE TICKET
   ======================================== */

/* Fond beige uniquement pour la page du formulaire (pas le dashboard) */
body:not(:has(.lacyme-dashboard-layout)) {
    background: linear-gradient(135deg, #f5f1ed 0%, #efe8e1 100%) !important;
    min-height: 100vh;
}

.lacyme-ticket-form-wrapper {
    max-width: 950px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.lacyme-ticket-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem 2rem;
    background: var(--lacyme-white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(85, 32, 40, 0.08);
}

.lacyme-ticket-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--lacyme-primary);
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.03em;
}

.lacyme-ticket-subtitle {
    font-size: 1.1rem;
    color: var(--lacyme-gray);
    margin: 0;
}

.lacyme-form-section {
    margin-bottom: 2rem;
    padding: 2.5rem;
    background: var(--lacyme-white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(85, 32, 40, 0.08);
    border: none;
}

.lacyme-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--lacyme-bg-light);
    position: relative;
}

.lacyme-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 60px;
    height: 2px;
    background: var(--lacyme-accent);
}

.lacyme-section-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lacyme-accent);
    color: var(--lacyme-white);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(246, 69, 30, 0.25);
}

.lacyme-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--lacyme-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.lacyme-form-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.lacyme-form-col {
    flex: 1;
    min-width: 0;
}

.lacyme-col-12 {
    flex-basis: 100%;
    max-width: 100%;
}

.lacyme-col-6 {
    flex-basis: calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
}

.lacyme-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--lacyme-primary);
    letter-spacing: 0.01em;
}

.lacyme-label .required {
    color: var(--lacyme-accent);
    font-weight: 700;
}

.lacyme-input,
.lacyme-textarea,
.lacyme-select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--lacyme-white);
    color: var(--lacyme-primary);
}

.lacyme-input:focus,
.lacyme-textarea:focus,
.lacyme-select:focus {
    outline: none;
    border-color: var(--lacyme-accent);
    box-shadow: 0 0 0 4px rgba(246, 69, 30, 0.1);
}

.lacyme-textarea {
    min-height: 150px;
    resize: vertical;
}

.lacyme-field-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--lacyme-gray);
    font-style: italic;
}

/* Grid d'entreprises (blocs cliquables sans radio visible) */
.lacyme-enterprise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Masquer les inputs radio */
.lacyme-enterprise-grid input[type="radio"],
.lacyme-platform-grid input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lacyme-enterprise-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    border: 2px solid var(--lacyme-border);
    border-radius: 12px;
    font-weight: 600;
    color: var(--lacyme-gray-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: var(--lacyme-white);
}

.lacyme-enterprise-box:hover {
    border-color: var(--lacyme-primary);
    background: #fef8f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(85, 32, 40, 0.15);
}

input[type="radio"]:checked + .lacyme-enterprise-box {
    border-color: #f6451e;
    border-width: 3px;
    background: linear-gradient(135deg, #552028, #f6451e);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(246, 69, 30, 0.3);
}

/* Grid de plateformes (radio buttons stylisés) */
.lacyme-platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.lacyme-platform-box,
.lacyme-platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--lacyme-white);
    box-shadow: 0 2px 8px rgba(85, 32, 40, 0.08);
}

.lacyme-platform-box:hover,
.lacyme-platform-card:hover {
    border-color: var(--lacyme-accent);
    background: var(--lacyme-white);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(246, 69, 30, 0.15);
}

input[type="radio"]:checked + .lacyme-platform-box,
input[type="radio"]:checked + .lacyme-platform-card {
    border-color: #f6451e;
    border-width: 3px;
    background: linear-gradient(135deg, #552028, #f6451e);
    box-shadow: 0 8px 24px rgba(246, 69, 30, 0.4);
}

input[type="radio"]:checked + .lacyme-platform-box .lacyme-platform-icon,
input[type="radio"]:checked + .lacyme-platform-box .lacyme-platform-text,
input[type="radio"]:checked + .lacyme-platform-card .lacyme-platform-icon,
input[type="radio"]:checked + .lacyme-platform-card .lacyme-platform-name {
    color: #ffffff;
    filter: brightness(1.2);
}

.lacyme-platform-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.lacyme-platform-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--lacyme-primary);
    text-align: center;
}

/* Grid de contextes (cartes cliquables) */
.lacyme-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.lacyme-context-card {
    padding: 1.5rem;
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--lacyme-white);
    color: var(--lacyme-primary);
    box-shadow: 0 2px 8px rgba(85, 32, 40, 0.08);
    font-size: 0.95rem;
}

.lacyme-context-card:hover {
    border-color: var(--lacyme-accent);
    background: var(--lacyme-white);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(246, 69, 30, 0.15);
}

.lacyme-context-card.active {
    border-color: var(--lacyme-accent);
    background: linear-gradient(135deg, #552028, #f6451e);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(246, 69, 30, 0.3);
}

/* Upload de fichier */
.lacyme-file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.lacyme-file-input {
    position: absolute;
    left: -9999px;
}

.lacyme-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem;
    border: 2px dashed var(--lacyme-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--lacyme-white);
    color: var(--lacyme-gray-dark);
    font-weight: 600;
}

.lacyme-file-label:hover {
    border-color: var(--lacyme-primary);
    background: #fef8f7;
}

.lacyme-file-name {
    color: var(--lacyme-accent);
    font-weight: 700;
}

/* Messages */
.lacyme-form-messages {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lacyme-form-messages.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.lacyme-form-messages.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Bouton de soumission */
.lacyme-form-actions {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--lacyme-border);
}

.lacyme-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 3.5rem;
    background: linear-gradient(135deg, #552028 0%, #f6451e 100%);
    color: var(--lacyme-white);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(246, 69, 30, 0.3);
}

.lacyme-submit-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(246, 69, 30, 0.4);
}

.lacyme-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.lacyme-btn-loader {
    display: none;
}

.lacyme-loader-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    animation: spin 1s linear infinite;
}

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

/* Pagination */
.lacyme-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0 2rem 0;
    padding: 1.5rem 0;
}

.lacyme-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 44px;
    height: 44px;
    padding: 0.5rem 1rem;
    border: 2px solid var(--lacyme-border);
    border-radius: 10px;
    background: var(--lacyme-white);
    color: var(--lacyme-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(85, 32, 40, 0.08);
}

.lacyme-page-btn:hover {
    background: linear-gradient(135deg, #fff5f3 0%, #ffffff 100%);
    border-color: var(--lacyme-accent);
    color: var(--lacyme-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(246, 69, 30, 0.2);
}

.lacyme-page-btn.active {
    background: linear-gradient(135deg, #f6451e 0%, #d63c19 100%);
    border-color: var(--lacyme-accent);
    color: var(--lacyme-white);
    box-shadow: 0 4px 16px rgba(246, 69, 30, 0.3);
    transform: translateY(-1px);
    pointer-events: none;
}

.lacyme-page-btn svg {
    flex-shrink: 0;
}

.lacyme-page-prev,
.lacyme-page-next {
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}

.lacyme-page-prev svg {
    margin-right: 0.25rem;
}

.lacyme-page-next svg {
    margin-left: 0.25rem;
}

.lacyme-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    color: var(--lacyme-gray);
    font-weight: 600;
    font-size: 1.1rem;
    user-select: none;
}




/* ========================================
   AUTHENTICATION - LOGIN FORM
======================================== */

.lacyme-login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f1ed 0%, #efe8e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.lacyme-login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(85, 32, 40, 0.1);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
}

.lacyme-login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.lacyme-login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.lacyme-login-logo img,
.lacyme-login-logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lacyme-login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lacyme-primary);
    margin: 0 0 0.5rem 0;
}

.lacyme-login-subtitle {
    color: var(--lacyme-gray);
    font-size: 0.95rem;
    margin: 0;
}

#lacyme-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lacyme-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lacyme-login-label {
    font-weight: 600;
    color: var(--lacyme-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lacyme-login-label svg {
    width: 18px;
    height: 18px;
    color: var(--lacyme-accent);
}

.lacyme-login-input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--lacyme-border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.lacyme-login-input:focus {
    outline: none;
    border-color: var(--lacyme-accent);
    box-shadow: 0 0 0 3px rgba(246, 69, 30, 0.1);
}

.lacyme-password-wrapper {
    position: relative;
}

.lacyme-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--lacyme-gray);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.lacyme-password-toggle svg {
    width: 22px;
    height: 22px;
}

.lacyme-login-btn {
    background: linear-gradient(135deg, var(--lacyme-accent) 0%, #d63817 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.lacyme-login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(246, 69, 30, 0.3);
}

.lacyme-login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.lacyme-login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

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

#lacyme-login-messages {
    margin-top: 1rem;
}

.lacyme-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    border-left: 4px solid #dc2626;
    font-weight: 500;
}

.lacyme-success {
    background: #d1fae5;
    color: #065f46;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    border-left: 4px solid #10b981;
    font-weight: 500;
}

.lacyme-login-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--lacyme-gray);
    font-size: 0.85rem;
}

.lacyme-logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    font-size: 0.95rem;
}

.lacyme-logout-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.lacyme-logout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

@media (max-width: 768px) {
    .lacyme-login-wrapper {
        padding: 1rem;
    }
    
    .lacyme-login-container {
        padding: 2rem 1.5rem;
    }
    
    .lacyme-login-title {
        font-size: 1.5rem;
    }
}

