/**
 * modal-components.css
 * Styles pour les composants à l'intérieur des modales
 * Optimisé pour mobile
 */

/* ========================================
   EQUIPMENT DETAIL MODAL
   ======================================== */

.equipment-detail-content {
    padding: 0;
}

.equipment-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 769px) {
    .equipment-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.detail-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.detail-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #0A66C2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h3 i {
    font-size: 14px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.detail-value {
    font-weight: 400;
    color: #1a1a1a;
    font-size: 14px;
}

/* ✅ MOBILE : Stack vertical */
@media (max-width: 768px) {
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ========================================
   STATUS BADGES
   ======================================== */

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-badge.status-active {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-maintenance {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-stopped {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-retired {
    background: #e2e3e5;
    color: #383d41;
}

.status-badge.status-unknown {
    background: #e2e3e5;
    color: #6c757d;
}

/* ========================================
   QUICK ACTIONS
   ======================================== */

.quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 769px) {
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
}

.quick-actions .btn {
    width: 100%;
    padding: 12px 16px;
    background: white;
    color: #0A66C2;
    border: 2px solid #0A66C2;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-actions .btn:hover {
    background: #0A66C2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.3);
}

.quick-actions .btn i {
    font-size: 16px;
}

/* ========================================
   STATS GRID
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #0A66C2;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   FORM COMPONENTS
   ======================================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0A66C2;
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* ========================================
   BUTTONS IN MODALS
   ======================================== */

.modal-action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #0A66C2;
    color: white;
}

.btn-primary:hover {
    background: #085a9e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* ✅ MOBILE : Boutons plus grands et accessibles */
@media (max-width: 768px) {
    .modal-action-btn {
        padding: 14px 24px;
        font-size: 16px;
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   DARK MODE
   ======================================== */

.dark-mode .detail-section {
    background: #2a2a2a;
    border-color: #444;
}

.dark-mode .detail-label {
    color: #aaa;
}

.dark-mode .detail-value {
    color: #ffffff;
}

.dark-mode .stat-item {
    background: #2a2a2a;
    border-color: #444;
}

.dark-mode .stat-value {
    color: #4a9eff;
}

.dark-mode .stat-label {
    color: #aaa;
}

.dark-mode .form-group input,
.dark-mode .form-group textarea,
.dark-mode .form-group select {
    background: #2a2a2a;
    border-color: #444;
    color: white;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Améliorer le contraste */
.detail-label,
.stat-label {
    color: #555;
}

/* Focus visible */
.quick-actions .btn:focus {
    outline: 2px solid #0A66C2;
    outline-offset: 2px;
}

/* Réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
    .quick-actions .btn,
    .modal-action-btn {
        transition: none;
    }
    
    .quick-actions .btn:hover,
    .modal-action-btn:hover {
        transform: none;
    }
}

/* ========================================
   CURRENCY SELECTOR
   ======================================== */

.currency-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.currency-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.currency-option:hover {
    border-color: #0A66C2;
    background: #f8f9ff;
}

.currency-option.selected {
    border-color: #0A66C2;
    background: #e3f2fd;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.15);
}

.currency-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.currency-symbol {
    font-size: 24px;
    font-weight: bold;
    color: #0A66C2;
    min-width: 40px;
    text-align: center;
}

.currency-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.currency-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.currency-code {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.currency-check {
    color: #0A66C2;
    font-size: 18px;
}

.currency-preview {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.currency-preview strong {
    color: #333;
    font-size: 14px;
}

.currency-preview div {
    margin-top: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #666;
}

/* Mobile styles */
@media (max-width: 768px) {
    .currency-option {
        padding: 12px;
    }
    
    .currency-symbol {
        font-size: 20px;
        min-width: 35px;
    }
    
    .currency-name {
        font-size: 15px;
    }
}

