/* Variables */
:root {
  --primary-color: #c80000;
  --secondary-color: #2c2e43;
  --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: #2c2e43;
  border-radius: var(--border-radius);
}

.page-header h1 {
  margin: 0;
  color: white;
  justify-content: center;
  font-size: 23px;
}

.page-header .subtitle {
  color: white;
  font-size: 12px;
  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;
  justify-content: space-between;
  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(--secondary-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(--secondary-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: var(--secondary-color);
  color: white;
}

.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: white !important;
  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;
}
.tickets-filters .ticket-filter {
  color: white;
  background-color: var(--secondary-color);
  border: none;
}
.tickets-filters {
  margin-bottom: 15px;
}
.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: start;
  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(--secondary-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(--secondary-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;
  }
}



/* demande de devis */
.card-detail-devis-modal {
        display: flex;
        align-items: start;
        justify-content: space-between;
        width: 200px;
        border: 1px solid;
        padding: 9px;
        border-radius: 9px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    h3.titre {
        font-size: 12px;
        margin: 0;
        margin-bottom: 25px;
    }

    .modal-container {
        display: flex;
        flex-wrap: wrap;
        gap: 25px;
        margin-top: 23px;
    }

    /* MODAL VOIR DETAIL */
    .modal-element {
        display: none;
        position: fixed;
        z-index: 9999999999;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        justify-content: center;
        align-items: center;
    }

    .detail-modal-content {
        background: white;
        padding: 20px;
        border-radius: 10px;
        position: relative;
        width: 50%;
    }

    .detail-close {
        position: absolute;
        top: 10px;
        right: 20px;
        cursor: pointer;
        font-size: 20px;
    }

    .detail-btn {
        background: #007bff;
        color: white;
        border: none;
        padding: 6px 10px;
        border-radius: 5px;
        cursor: pointer;
    }

    .detail-btn:hover {
        background: #0056b3;
    }


    /* prestatire */
    .result-item {
        padding: 5px 10px;
        cursor: pointer;
    }

    #prestataireTags .bloc-prestatire {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    #prestataireTags .info-prestatire {
        display: flex;
        gap: 20px;
    }

    .result-item:hover {
        background-color: #f0f0f0;
    }

    .tag {
        display: inline-block;
        background-color: #28a745;
        color: #fff;
        padding: 5px 10px;
        border-radius: 20px;
        margin: 2px;
        font-size: 0.9rem;
    }

    .tag .remove-tag {
        margin-left: 8px;
        cursor: pointer;
        font-weight: bold;
    }





    .result-item {
        padding: 5px 10px;
        cursor: pointer;
    }

    .result-item:hover {
        background-color: #f0f0f0;
    }

    .tag {
        display: inline-block;
        background-color: #007bff;
        color: #fff;
        padding: 5px 10px;
        border-radius: 20px;
        margin: 2px;
        font-size: 0.9rem;
    }

    .tag .remove-tag {
        margin-left: 8px;
        cursor: pointer;
        font-weight: bold;
    }

    input.radio-type-probleme {
        width: 15px;
    }

    input#choisirPieceSpecifique {
        width: 15px;
    }

    .modal-demande-logement-overlay h2 {
        font-size: 12px;
    }

    .section-title:after {
        display: none;
    }

    .modal-demande-logement-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .modal-demande-logement {
        background: #fff;
        padding: 30px 40px;
        border-radius: 12px;
        max-width: 700px;
        width: 95%;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        max-height: 90vh;
    }

    .modal-demande-logement h2 {
        text-align: center;
        margin-bottom: 25px;
        color: #333;
        font-size: 1.5rem;
    }

    .section-title {
        /* border-left: 4px solid #007bff;
        padding-left: 10px; */
        margin: 25px 0 10px;
        border: none;
    }

    .form-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .form-group {
        display: flex;
        flex-direction: column;
    }

    .form-group label {
        font-weight: 600;
        margin-bottom: 6px;
    }

    .form-control {
        padding: 8px 10px;
        border: 1px solid #ccc;
        border-radius: 6px;
    }

    textarea.form-control {
        grid-column: span 2;
    }

    .form-actions {
        display: flex;
        justify-content: space-between;
        margin-top: 25px;
    }

    .btn {
        padding: 10px 18px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 600;
    }

    .btn-primary {
        background-color: #007bff;
        color: white;
    }

    .btn-secondary {
        background-color: #6c757d;
        color: white;
    }

    .form-step {
        animation: fadeIn 0.3s ease;
    }

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

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .btn-next,
    .btn-prev {
        min-width: 120px;
    }