﻿/* ============================================
   PLANNING VOYAGE - Styles spécifiques
   ============================================ */

/* Calendar Section */
.calendar-section {
    margin-bottom: var(--spacing-xl);
}

.calendar-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

    .calendar-nav-header h2 {
        flex: 1;
        text-align: center;
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text-primary);
    }

.btn-calendar-nav {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

    .btn-calendar-nav:hover {
        background: var(--bg-card);
        border-color: var(--primary-blue);
        color: var(--primary-blue);
        transform: scale(1.05);
    }

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: var(--spacing-lg);
}

.calendar-day {
    background: var(--bg-card);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

    .calendar-day.today {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(147, 197, 253, 0.05));
        border: 2px solid var(--primary-blue);
    }

    .calendar-day.weekend {
        background: var(--gray-50);
    }

.day-header {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xs);
    flex-shrink: 0;
}

.day-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.day-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.today-badge {
    background: var(--primary-blue);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-events {
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    overflow-y: auto;
    flex: 1;
}

/* Event Cards */
.event-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    position: relative;
    overflow: hidden;
}

    .event-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        transition: var(--transition);
    }

    .event-card.completed::before {
        background: var(--success-color);
    }

    .event-card.in-progress::before {
        background: #3b82f6;
    }

    .event-card.upcoming::before {
        background: #f59e0b;
    }

    .event-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-blue);
    }

.event-time {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--primary-blue);
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.event-location,
.event-inspector {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

    .event-location svg,
    .event-inspector svg {
        flex-shrink: 0;
        opacity: 0.7;
    }

.event-status {
    position: absolute;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

    .event-status.completed {
        background: var(--success-color);
    }

    .event-status.in-progress {
        background: #3b82f6;
    }

    .event-status.upcoming {
        background: #f59e0b;
    }

.no-events {
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* Badge Count */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    min-width: 32px;
}

/* Cell Badge in Table */
.cell-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

    .cell-badge.upcoming {
        background: rgba(245, 158, 11, 0.1);
        color: #d97706;
    }

    .cell-badge.in-progress {
        background: rgba(59, 130, 246, 0.1);
        color: #2563eb;
    }

    .cell-badge.completed {
        background: rgba(16, 185, 129, 0.1);
        color: #059669;
    }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .calendar-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .calendar-day {
        min-height: 120px;
    }
}

@media (max-width: 768px) {
    .calendar-nav-header h2 {
        font-size: 1rem;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
    }

    .calendar-day {
        min-height: auto;
    }

    .day-header {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .day-name {
        font-size: 0.75rem;
    }

    .day-date {
        font-size: 0.7rem;
    }

    .today-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    .event-card {
        padding: var(--spacing-xs);
    }

    .event-time {
        font-size: 0.7rem;
    }

    .event-title {
        font-size: 0.8rem;
    }

    .event-location,
    .event-inspector {
        font-size: 0.7rem;
    }

    .event-status {
        width: 16px;
        height: 16px;
    }

        .event-status svg {
            width: 12px;
            height: 12px;
        }

    /* Stats grid responsive */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Controls responsive */
    .analyse-controls {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .controls-left,
    .controls-right {
        width: 100%;
        flex-direction: column;
    }

    .period-selector {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .calendar-nav-header {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

        .calendar-nav-header h2 {
            font-size: 0.9rem;
        }

    .btn-calendar-nav {
        padding: var(--spacing-xs);
    }

    .event-card {
        padding: 6px;
    }

    .event-details {
        gap: 2px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .analyse-controls,
    .btn-calendar-nav,
    .table-actions-cell {
        display: none !important;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        break-inside: avoid;
    }

    .event-card {
        box-shadow: none;
        border: 1px solid #000;
    }

    .calendar-day {
        break-inside: avoid;
    }
}
/* ==========================================
   ATTENTION SECTION STYLES
   ========================================== */

.attention-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.attention-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.attention-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .attention-title svg {
        stroke: #f59e0b;
        flex-shrink: 0;
    }

    .attention-title h3 {
        font-size: 1.25rem;
        font-weight: 600;
        color: #111827;
        margin: 0;
    }

.attention-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Grille des cartes */
.attention-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* Cartes d'attention */
.attention-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .attention-card:hover {
        border-color: #3b82f6;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
        transform: translateY(-2px);
    }

    /* Classes de priorité pour les cartes */
    .attention-card.critical {
        border-left: 4px solid #dc2626;
    }

    .attention-card.high {
        border-left: 4px solid #f59e0b;
    }

    .attention-card.medium {
        border-left: 4px solid #3b82f6;
    }

    .attention-card.low {
        border-left: 4px solid #6b7280;
    }

/* Header de carte */
.attention-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attention-card-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

    .attention-card-type svg {
        stroke: currentColor;
        flex-shrink: 0;
    }

/* Badges de priorité */
.attention-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.priority-critical {
    background: #fee2e2;
    color: #991b1b;
}

.priority-high {
    background: #fef3c7;
    color: #92400e;
}

.priority-medium {
    background: #dbeafe;
    color: #1e40af;
}

.priority-low {
    background: #f3f4f6;
    color: #374151;
}

/* Corps de carte */
.attention-card-body {
    flex: 1;
}

    .attention-card-body h4 {
        font-size: 1.125rem;
        font-weight: 600;
        color: #111827;
        margin: 0 0 0.5rem 0;
        line-height: 1.4;
    }

.attention-reason {
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    margin: 0.5rem 0;
}

.attention-details {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

/* Footer de carte */
.attention-card-footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.btn-attention-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

    .btn-attention-action:hover {
        background: #2563eb;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }

    .btn-attention-action:active {
        transform: translateY(0);
    }

    .btn-attention-action svg {
        stroke: currentColor;
        flex-shrink: 0;
    }

/* Footer de section */
.attention-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

    .attention-footer p {
        color: #6b7280;
        font-size: 0.875rem;
        margin: 0;
    }

/* Responsive */
@media (max-width: 1024px) {
    .attention-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .attention-section {
        padding: 1rem;
    }

    .attention-grid {
        grid-template-columns: 1fr;
    }

    .attention-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .attention-count {
        align-self: flex-start;
    }

    .attention-card {
        padding: 1rem;
    }

    .attention-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
/* ==========================================
   ATTENTION SECTION STYLES
   ========================================== */

.attention-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.attention-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.attention-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .attention-title svg {
        stroke: #f59e0b;
        flex-shrink: 0;
    }

    .attention-title h3 {
        font-size: 1.25rem;
        font-weight: 600;
        color: #111827;
        margin: 0;
    }

.attention-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Grille des cartes */
.attention-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* Cartes d'attention */
.attention-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .attention-card:hover {
        border-color: #3b82f6;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
        transform: translateY(-2px);
    }

    /* Classes de priorité pour les cartes */
    .attention-card.critical {
        border-left: 4px solid #dc2626;
    }

    .attention-card.high {
        border-left: 4px solid #f59e0b;
    }

    .attention-card.medium {
        border-left: 4px solid #3b82f6;
    }

    .attention-card.low {
        border-left: 4px solid #6b7280;
    }

/* Header de carte */
.attention-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attention-card-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

    .attention-card-type svg {
        stroke: currentColor;
        flex-shrink: 0;
    }

/* Badges de priorité */
.attention-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.priority-critical {
    background: #fee2e2;
    color: #991b1b;
}

.priority-high {
    background: #fef3c7;
    color: #92400e;
}

.priority-medium {
    background: #dbeafe;
    color: #1e40af;
}

.priority-low {
    background: #f3f4f6;
    color: #374151;
}

/* Corps de carte */
.attention-card-body {
    flex: 1;
}

    .attention-card-body h4 {
        font-size: 1.125rem;
        font-weight: 600;
        color: #111827;
        margin: 0 0 0.5rem 0;
        line-height: 1.4;
    }

.attention-reason {
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    margin: 0.5rem 0;
}

.attention-details {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

/* Footer de carte */
.attention-card-footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.btn-attention-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

    .btn-attention-action:hover {
        background: #2563eb;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }

    .btn-attention-action:active {
        transform: translateY(0);
    }

    .btn-attention-action svg {
        stroke: currentColor;
        flex-shrink: 0;
    }

/* Footer de section */
.attention-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

    .attention-footer p {
        color: #6b7280;
        font-size: 0.875rem;
        margin: 0 0 1rem 0;
    }

    .attention-footer .btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.625rem 1.25rem;
        border-radius: 0.5rem;
        font-size: 0.875rem;
        font-weight: 500;
        transition: all 0.2s;
    }

        .attention-footer .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .attention-footer .btn svg {
            flex-shrink: 0;
        }

/* Responsive */
@media (max-width: 1024px) {
    .attention-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .attention-section {
        padding: 1rem;
    }

    .attention-grid {
        grid-template-columns: 1fr;
    }

    .attention-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .attention-count {
        align-self: flex-start;
    }

    .attention-card {
        padding: 1rem;
    }

    .attention-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}