/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  min-height: 100vh;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #0066cc;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.header-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

h1 {
  color: #0066cc;
  margin-bottom: 0;
  font-size: 2rem;
  flex: 0 0 auto;
}

/* Search and Controls */
.search-container {
  margin-bottom: 30px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px;
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

#searchInput {
  flex: 1;
  min-width: 300px;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

#searchInput:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
}

.category-filter {
  min-width: 200px;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.category-filter:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
} /* Statistics Cards */
.stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-card {
  background: linear-gradient(135deg, #0066cc, #004499);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  text-align: center;
  min-width: 150px;
  box-shadow: 0 2px 5px rgba(0, 102, 204, 0.2);
}

.stat-number {
  font-size: 2em;
  font-weight: bold;
  display: block;
}

.stat-label {
  font-size: 0.9em;
  opacity: 0.9;
}

/* Table Styling */
.table-container {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #ddd;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

thead {
  background-color: #0066cc;
  color: white;
}

th,
td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 1px;
}

tbody tr {
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background-color: #f8f9fa;
}

tbody tr:nth-child(even) {
  background-color: #fafbff;
}

.team-name {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.email-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.email-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.email-label {
  font-size: 0.85em;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

/* Email Display */
.email-address {
  color: #0066cc;
  text-decoration: none;
  font-family: monospace;
  transition: color 0.2s ease;
}

.email-address:hover {
  color: #004499;
  text-decoration: underline;
}

/* Categories Display */
.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-tag {
  background-color: #0066cc;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  white-space: nowrap;
  font-weight: 500;
}

.no-categories {
  color: #999;
  font-style: italic;
}
.no-results {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1.1em;
}

/* Navigation and Links */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0066cc, #004499);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 102, 204, 0.2);
}

.back-link:hover {
  background: linear-gradient(135deg, #004499, #0066cc);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .header-logo {
    height: 50px;
  }

  /* Hide right logo on mobile, keep only the left/top one */
  .header-logo-right {
    display: none;
  }

  .container {
    padding: 15px;
    margin: 0;
    min-height: 100vh;
    box-shadow: none;
  }

  h1 {
    font-size: 1.5rem;
  }

  .search-container {
    padding: 15px;
    flex-direction: column;
    align-items: stretch;
  }

  #searchInput {
    min-width: 250px;
    margin-bottom: 10px;
  }

  .category-filter {
    min-width: auto;
  }

  .stats {
    justify-content: center;
  }

  /* Enhanced table responsiveness */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 100%;
    font-size: 0.85em;
  }

  th,
  td {
    padding: 8px;
    font-size: 0.85em;
    vertical-align: top;
  }

  /* Optimize column widths for mobile */
  th:nth-child(1),
  td:nth-child(1) {
    /* Équipe */
    width: 35%;
    min-width: 120px;
  }

  th:nth-child(2),
  td:nth-child(2) {
    /* Catégories */
    width: 30%;
    min-width: 100px;
  }

  th:nth-child(3),
  td:nth-child(3) {
    /* Contacts */
    width: 35%;
    min-width: 150px;
  }

  .team-name {
    font-size: 0.9em;
    line-height: 1.3;
  }

  .categories-list {
    gap: 3px;
  }

  .category-tag {
    font-size: 0.7em;
    padding: 1px 6px;
  }

  .email-list {
    gap: 4px;
  }

  .email-item {
    gap: 1px;
  }

  .email-label {
    font-size: 0.75em;
  }

  .email-address {
    font-size: 0.8em;
    white-space: nowrap;
    display: inline-block;
  }

  .back-link {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .search-container {
    padding: 10px;
  }

  .stats {
    gap: 10px;
  }

  .stat-card {
    min-width: 120px;
    padding: 10px 15px;
  }

  .stat-number {
    font-size: 1.6em;
  }

  table {
    font-size: 0.8em;
  }

  th,
  td {
    padding: 6px;
  }

  /* Stack table layout for very small screens */
  .table-container {
    border: none;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  td {
    border: none;
    position: relative;
    padding: 8px 8px 8px 50%;
    text-align: left;
    white-space: normal;
  }

  td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 8px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
    color: #333;
  }

  .team-name {
    font-size: 1em;
    margin-bottom: 5px;
  }

  .categories-list {
    flex-wrap: wrap;
  }

  .email-address {
    white-space: nowrap;
    display: inline-block;
  }
}

/* Footer */
.privacy-notice {
  margin-top: 40px;
  padding: 20px;
  background-color: #f0f8ff;
  border: 1px solid #d1e7dd;
  border-radius: 8px;
  text-align: center;
}

.privacy-notice p {
  margin: 0;
  font-size: 14px;
  color: #0f5132;
  line-height: 1.5;
}

.privacy-notice a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
}

.privacy-notice a:hover {
  text-decoration: underline;
}

.privacy-notice a[href^="mailto:"] {
  color: #0066cc;
  font-weight: normal;
}

.privacy-notice .contact-info {
  margin-top: 15px;
  font-size: 12px;
  color: #666;
}
