/**
 * Mission Control - Styles
 * Phase 7 - Notes, Prospection et Taches
 * BeulBeulBook
 */

/* ============================================================= */
/* HEADER STATS */
/* ============================================================= */

.mc-stat-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.mc-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mc-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    margin-right: 1rem;
    flex-shrink: 0;
}

.mc-stat-content {
    flex-grow: 1;
}

.mc-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: #1a1a2e;
}

.mc-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.mc-stat-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

.mc-stat-today {
    background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
    border: 1px solid #ffc107;
}

/* ============================================================= */
/* NAVIGATION */
/* ============================================================= */

.mc-nav {
    background: #fff;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mc-nav .nav-link {
    color: #495057;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.mc-nav .nav-link:hover {
    background: #f8f9fa;
}

.mc-nav .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* ============================================================= */
/* ACTION ITEMS (Dashboard) */
/* ============================================================= */

.mc-action-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.mc-action-item:hover {
    background: #f8f9fa;
}

.mc-action-item.mc-pinned {
    background: #fff8e6;
    border-left-color: #ffc107;
}

.mc-action-item.mc-overdue {
    border-left-color: #dc3545;
}

.mc-action-content {
    min-width: 0;
    flex: 1;
}

.mc-action-status {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.mc-action-buttons {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.mc-action-item:hover .mc-action-buttons {
    opacity: 1;
}

.mc-pin-badge {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
}

/* ============================================================= */
/* TIMELINE */
/* ============================================================= */

.mc-timeline-item {
    border-left: 2px solid #e9ecef;
    margin-left: 10px;
    position: relative;
}

.mc-timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 50%;
}

/* ============================================================= */
/* PROSPECTION */
/* ============================================================= */

.mc-mini-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border-radius: 8px;
    border-left: 3px solid;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mc-workflow {
    display: flex;
    gap: 8px;
}

.mc-workflow-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.mc-workflow-step:hover {
    background: #dee2e6;
}

.mc-workflow-step.active {
    background: #198754;
    color: #fff;
}

/* ============================================================= */
/* TASKS */
/* ============================================================= */

.mc-task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.15s ease;
}

.mc-task-item:hover {
    background: #f8f9fa;
}

.mc-task-item.mc-pinned {
    background: #fff8e6;
    border-left: 3px solid #ffc107;
}

.mc-task-item.mc-done {
    opacity: 0.6;
}

.mc-task-check {
    flex-shrink: 0;
}

.mc-task-check .form-check-input {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.mc-task-content {
    min-width: 0;
    flex: 1;
}

.mc-task-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.mc-task-priority,
.mc-task-date,
.mc-task-status {
    flex-shrink: 0;
}

.mc-task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.mc-task-item:hover .mc-task-actions {
    opacity: 1;
}

/* ============================================================= */
/* NOTES - Tableau */
/* ============================================================= */

.mc-notes-table {
    font-size: 0.875rem;
}

.mc-notes-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6c757d;
    white-space: nowrap;
}

/* Largeurs des colonnes */
.mc-notes-col-pin {
    width: 36px;
    text-align: center;
}
.mc-notes-col-date {
    width: 130px;
    white-space: nowrap;
}
.mc-notes-col-priorite {
    width: 100px;
    text-align: center;
}
.mc-notes-col-entity {
    width: 160px;
}
.mc-notes-col-actions {
    width: 72px;
    text-align: center;
}
.mc-notes-col-content {
    /* flex restant */
}

/* Aperçu du contenu tronqué */
.mc-notes-contenu-preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 420px;
}

/* Badge priorité urgente — rouge WWP */
.mc-badge-urgente {
    background-color: #8f0000;
    color: #fff;
}

/* Ligne urgente : liseré gauche rouge */
.mc-note-row-urgente td:first-child {
    border-left: 3px solid #8f0000;
}

/* Icône état vide */
.mc-notes-empty-icon {
    font-size: 3rem;
}

/* Actions : visibles uniquement au survol */
.mc-notes-table tbody tr .mc-notes-col-actions .d-flex {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.mc-notes-table tbody tr:hover .mc-notes-col-actions .d-flex {
    opacity: 1;
}

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

/* Écrans moyens (laptops 1366x768) */
@media (max-width: 1440px) {
    .mc-stat-card {
        padding: 0.75rem;
    }

    .mc-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-right: 0.75rem;
    }

    .mc-stat-value {
        font-size: 1.5rem;
    }

    .mc-stat-label {
        font-size: 0.7rem;
    }

    .mc-nav .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }

    .mc-task-item,
    .mc-action-item {
        padding: 0.5rem 1.5rem;
    }
}

@media (max-width: 1200px) {
    .mc-stat-card {
        padding: 0.5rem;
    }

    .mc-stat-icon {
        width: 36px;
        height: 36px;
        margin-right: 0.5rem;
    }

    .mc-stat-value {
        font-size: 1.25rem;
    }

    .mc-nav .nav-link {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Cacher les icônes dans les stats pour gagner de la place */
    .mc-stat-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 768px) {
    .mc-stat-card {
        padding: 0.75rem;
    }

    .mc-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .mc-stat-value {
        font-size: 1.5rem;
    }

    .mc-nav .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }

    .mc-workflow-step {
        width: 28px;
        height: 28px;
    }

    .mc-task-item {
        flex-wrap: wrap;
    }

    .mc-task-status {
        width: 100%;
        margin-top: 0.5rem;
    }
}

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

@keyframes mc-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.mc-stat-card.mc-stat-today:hover .mc-stat-icon {
    animation: mc-pulse 0.6s ease-in-out;
}

/* ============================================================= */
/* PRIORITES */
/* ============================================================= */

.text-warning.bi-exclamation-triangle {
    animation: mc-pulse 2s infinite;
}

.text-danger.bi-exclamation-circle-fill {
    animation: mc-pulse 1s infinite;
}

/* ============================================================= */
/* CARTE */
/* ============================================================= */

.mc-carte-container {
    position: relative;
    height: calc(100vh - 220px);
    min-height: 480px;
}

.mc-carte-filters {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    min-width: 190px;
}

.mc-carte-filters-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.mc-carte-filter-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.mc-carte-filter-item .form-check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: 5px;
}

.mc-carte-filter-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mc-carte-filter-count {
    color: #6c757d;
    font-size: 0.75rem;
}

.mc-carte-map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
