/* Variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #3f37c9;
    --success-color: #4bb543;
    --warning-color: #f9c74f;
    --danger-color: #ef476f;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
  }
  
  /* Base Styles */
  .intervention-container {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 2rem; */
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
  }
  
  /* Typography */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin: 0 0 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark-color);
  }
  
  h1 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
    margin: 0;
  }
  
  h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
  
  p {
    margin: 0 0 1rem;
  }
  
  /* Page Header */
  .page-header {
    margin-bottom: 2rem;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
  }
  
  .page-header h1 {
    margin: 0;
    color: var(--primary-color);
    justify-content: center;
    font-size: 30px;
  }
  
  .page-header .subtitle {
    color: var(--gray-color);
    font-size: 1.1rem;
    margin: 0.5rem 0 0;
  }
  
  /* Cards */
  .card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #e9ecef;
  }
  
  .card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
  }
  
  .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .card-header i {
    color: var(--primary-color);
    font-size: 1.25rem;
  }
  
  .card-header h3 {
    font-size: 20px;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  /* Info Card */
  .info-card .card-body {
    padding: 1.5rem;
  }
  
  .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    transition: var(--transition);
  }
  
  .info-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
  }
  
  .info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .info-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .info-value {
    font-weight: 500;
    color: var(--dark-color);
    font-size: 1rem;
  }
  
  /* Table Styles */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .interventions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
  }
  
  .interventions-table th {
    background-color: #f8f9fa;
    color: var(--gray-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem;
    white-space: nowrap;
    border-bottom: 2px solid #e9ecef;
  }
  
  .interventions-table td {
    padding: 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
  }
  
  .intervention-item:hover td {
    background-color: #f8f9ff;
  }
  
  /* Table Cells */
  .date-cell {
    white-space: nowrap;
    min-width: 100px;
  }
  
  .date {
    font-weight: 600;
    color: var(--dark-color);
  }
  
  .time {
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: 0.25rem;
  }
  
  .intervenant-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
  }
  
  .intervenant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(67, 97, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
  }
  
  .intervenant-info {
    line-height: 1.3;
  }
  
  .intervenant-info .name {
    font-weight: 500;
    color: var(--dark-color);
  }
  
  .intervenant-info .role {
    font-size: 0.8rem;
    color: var(--gray-color);
  }
  
  .description-cell .title {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
  }
  
  .description-cell .details {
    font-size: 0.85rem;
    color: var(--gray-color);
  }
  
  .status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .status-badge.completed {
    background-color: rgba(75, 181, 67, 0.1);
    color: var(--success-color);
  }
  
  .actions-cell {
    white-space: nowrap;
    text-align: right;
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1.5;
  }
  
  .btn i {
    font-size: 0.9em;
    color: white;
  }
  
  .btn-primary {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
  }
  
  .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
  }
  
  .btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
  }
  
  .btn-secondary:hover {
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }
  
  .btn-outline {
    background: transparent;
    color: var(--gray-color);
    border: 1px solid #dee2e6;
  }
  
  .btn-outline:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: var(--dark-color);
    transform: translateY(-2px);
  }
  
  .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #e9ecef;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 0.5rem;
  }
  .btn-icon i {
    color: white;
  }
  
  .btn-icon:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    transform: translateY(-2px);
  }
  
  /* Summary Section */
  .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
  
  .summary-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid #e9ecef;
  }
  
  .summary-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
  }
  
  .summary-item.next-rdv {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6ebff 100%);
    border-left: 4px solid var(--primary-color);
  }
  
  .summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(67, 97, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
  }
  
  .summary-content .date {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0.25rem 0;
  }
  
  .summary-content .time {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin: 0;
  }
  
  .summary-item.observations {
    border-left: 4px solid var(--primary-color);
  }
  
  .summary-item.recommendations {
    border-left: 4px solid var(--primary-color);
  }
  
  .summary-item h4 {
    display: flex;
    align-items: center;
    margin: 0;
    gap: 0.5rem;
    /* color: var(--dark-color); */
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
  }
  
  .summary-item h4 i {
    color: var(--primary-color);
  }
  
  .summary-item ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .summary-item li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .summary-item li i {
    color: var(--success-color);
    margin-top: 0.2rem;
    flex-shrink: 0;
  }
  
  /* Action Buttons */
  .action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
  }
  
  /* Responsive Adjustments */
  @media (max-width: 992px) {
    .intervention-container {
      padding: 1rem;
    }
  
    .info-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  
    .summary-grid {
      grid-template-columns: 1fr;
    }
  }
  
  @media (max-width: 768px) {
    .card-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.75rem;
    }
  
    .card-header .actions {
      width: 100%;
      display: flex;
      gap: 0.5rem;
    }
  
    .btn {
      flex: 1;
      padding: 0.5rem;
      font-size: 0.8rem;
    }
  
    .intervenant-cell {
      min-width: 150px;
    }
  
    .interventions-table th,
    .interventions-table td {
      padding: 0.75rem;
    }
  
    .action-buttons {
      flex-direction: column;
    }
  
    .action-buttons .btn {
      width: 100%;
    }
  }
  
  @media (max-width: 576px) {
    .info-grid {
      grid-template-columns: 1fr;
    }
  
    .intervenant-cell {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
  
    .intervenant-avatar {
      display: none;
    }
  
    .date-cell {
      white-space: normal;
    }
  
    .description-cell .title,
    .description-cell .details {
      white-space: normal;
      word-break: break-word;
    }
  
    .actions-cell {
      text-align: left;
      padding-top: 0.5rem;
    }
  
    .btn-icon {
      margin: 0.25rem;
    }
  }
  
  /* Animations */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .intervention-item {
    animation: fadeIn 0.3s ease-out forwards;
  }
  
  /* Print Styles */
  @media print {
    .intervention-container {
      padding: 0;
      max-width: 100%;
    }
  
    .card {
      box-shadow: none;
      border: 1px solid #ddd;
      page-break-inside: avoid;
    }
  
    .action-buttons,
    .btn {
      display: none !important;
    }
  
    .page-header {
      text-align: left;
      padding: 1rem;
      margin-bottom: 1rem;
    }
  
    .interventions-table {
      font-size: 0.8rem;
    }
  }
  .filter-card {
    margin-bottom: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.search-box {
    display: flex;
    gap: 5px;
}

.search-box input {
    flex: 1;
}

/* Styles pour les badges de type de document */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    display: inline-block;
    margin: 2px 0;
}

.badge-devis {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

.badge-commande {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.badge-facture {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

/* Amélioration du tableau */
.documents-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.documents-table th {
    background-color: #f5f7fa;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.documents-table td {
    padding: 15px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}

.documents-table tr:hover {
    background-color: #f8fafc;
}

/* Styles pour les cellules spécifiques */
.montant-cell {
    font-weight: 600;
    color: #2d3748;
    text-align: right;
    white-space: nowrap;
}

/* Styles pour les informations du prestataire */
.prestataire-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prestataire-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
}

.prestataire-info {
    line-height: 1.3;
}

.prestataire-info .name {
    font-weight: 500;
    color: #2d3748;
}

.prestataire-info .specialite {
    font-size: 0.8em;
    color: #718096;
}

/* Styles pour les statuts */
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: capitalize;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.status-badge.en-attente {
    background-color: #fffaf0;
    color: #c05621;
    border: 1px solid #fbd38d;
}

.status-badge.valide {
    background-color: #e6fffa;
    color: #2c7a7b;
    border: 1px solid #81e6d9;
}

.status-badge.paye {
    background-color: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
}

.status-badge.refuse {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #fc8181;
}

/* Styles pour les boutons d'action */
.btn-icon {
    background: none;
    border: none;
    color: #4a5568;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.9em;
    margin: 0 2px;
}

.btn-icon:hover {
    background-color: #edf2f7;
}

.btn-icon.btn-primary {
    color: #3182ce;
}

.btn-icon.btn-success {
    color: #38a169;
}

.btn-icon.btn-info {
    color: #2c5282;
}

.btn-icon.btn-danger {
    color: #e53e3e;
}

/* Responsive */
@media (max-width: 1200px) {
    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .actions-cell {
        white-space: nowrap;
    }
}