/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #f7f9fc;
  color: #333;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  padding: 10px;
}

/* Dark mode */
body.dark-mode {
  background-color: #1e1e1e;
  color: #e0e0e0;
}
header.dark-mode, footer.dark-mode {
  background-color: #2c2c2c;
  color: #f1f1f1;
  border-bottom-color: #555;
}
section.dark-mode {
  background-color: #2a2a2a;
  box-shadow: none;
}
h2.dark-mode {
  color: #66afe9;
  border-left-color: #66afe9;
}

/* Logo */
.logo {
  max-width: 150px;
  margin: 10px auto;
  display: block;
}

/* Header */
header {
  text-align: center;
  padding: 20px;
  background-color: #2c3e50;
  color: #ecf0f1;
  border-bottom: 5px solid #3498db;
}
h1 {
  font-size: 2em;
}
#toggleDarkMode {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 0.9em;
  cursor: pointer;
}

/* Sections */
section {
  margin-bottom: 30px;
  background-color: #ffffff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  transition: background 0.3s ease;
}
h2 {
  margin: 20px 0 10px;
  color: #2980b9;
  font-size: 1.5em;
  border-left: 5px solid #3498db;
  padding-left: 10px;
}
p {
  margin-bottom: 10px;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 40px;
  padding: 15px;
  background-color: #bdc3c7;
  color: #2c3e50;
  transition: background 0.3s ease;
}

/* Responsive */
@media screen and (max-width: 768px) {
  h1 {
    font-size: 1.5em;
  }
  section {
    padding: 10px;
  }
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: #ecf0f1;
  background-color: #3498db;
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
}

.main-nav a:hover {
  background-color: #2980b9;
}

/* Dark mode menu */
body.dark-mode .main-nav a {
  background-color: #444;
  color: #fff;
}
body.dark-mode .main-nav a:hover {
  background-color: #666;
}

#serrageTable tbody tr:hover {
  background-color: #666;
  transition: background-color 0.3s ease;
}

@media screen and (max-width: 768px) {
  #serrageTable,
  #serrageTable thead,
  #serrageTable tbody,
  #serrageTable th,
  #serrageTable td,
  #serrageTable tr {
    display: block;
    width: 100%;
  }

  #serrageTable thead {
    display: none; /* Cacher l'en-tête classique sur petit écran */
  }

  #serrageTable tr {
    margin-bottom: 15px;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  #serrageTable td {
    position: relative;
    padding-left: 45%;
    text-align: left;
    border: none;
  }

  #serrageTable td::before {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40%;
    white-space: nowrap;
    font-weight: bold;
    content: attr(data-label);
    color: #333;
  }
}

@media screen and (max-width: 768px) {
  #serrageTable,
  #serrageTable thead,
  #serrageTable tbody,
  #serrageTable th,
  #serrageTable td,
  #serrageTable tr {
    display: block;
    width: 100%;
  }

  #serrageTable thead {
    display: none;
  }

  #serrageTable tr {
    margin-bottom: 15px;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  #serrageTable td {
    position: relative;
    padding-left: 45%;
    border: none;
    text-align: left;
  }

  #serrageTable td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 10px;
    width: 40%;
    font-weight: bold;
    color: #444;
    white-space: nowrap;
  }
}

#serrageTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#serrageTable th, #serrageTable td {
  border: 1px solid #ccc;
  padding: 14px 10px;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
}

#serrageTable th {
  background-color: #636262;
  font-weight: bold;
}

#serrageTable td:nth-child(2),
#serrageTable td:nth-child(3),
#serrageTable td:nth-child(4),
#serrageTable td:nth-child(5) {
  text-align: center;
}

.btn-print {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin: 20px 0;
  display: inline-block;
}
.btn-print:hover {
  background-color: #218838;
}
@media print {
  .btn-print, #toggleDarkMode, nav, header, footer {
    display: none;
  }
  body {
    background: white;
    margin: 0;
  }
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  font-family: Arial, sans-serif;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.btn-retour {
  display: inline-block;
  padding: 10px 20px;
  background-color: #444;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s;
  font-weight: bold;
}
.btn-retour:hover {
  background-color: #666;
}

/* === Espacement tableau diagnostic === */
.tools-section table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.75em;
  margin-bottom: 2em;
}

.tools-section th,
.tools-section td {
  padding: 1em 1.25em;
  background-color: var(--bg-cell);
}

.tools-section thead th {
  background-color: var(--bg-header);
}

.tools-section tr:hover td {
  background-color: var(--bg-hover);
}

#bsodTable th:nth-child(2),
#bsodTable td:nth-child(2) {
  width: 350px;              /* ajuste selon ton visuel */
  word-break: break-word;    /* force la coupure des mots si trop longs */
  hyphens: auto;             /* ajoute un tiret si nécessaire */
}

.note {
  color: orangered;
  font-weight: bold;
  font-size: 20px;
}

.bips-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-family: sans-serif;
}

.bips-table caption {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.bips-table th,
.bips-table td {
  padding: 12px 16px;
  text-align: left;
  border: 1px solid #ccc;
}

.bips-table thead {
  background-color: #838282;
}

.wincom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-family: sans-serif;
}

.wincom-table caption {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.wincom-table th,
.wincom-table td {
  padding: 12px 16px;
  text-align: left;
  border: 1px solid #ccc;
}

.wincom-table thead {
  background-color: #838282;
}

/* Table style for Linux commands section */
#lincom table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background-color: #f9f9f9;
  font-family: 'Segoe UI', sans-serif;
}

#lincom th, #lincom td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

#lincom th {
  background-color: #2f3b52;
  color: #ffffff;
}

#lincom tr:hover {
  background-color: #e0f0ff;
}

#lincom colgroup col:nth-child(1) {
  width: 20%;
}
#lincom colgroup col:nth-child(2),
#lincom colgroup col:nth-child(3) {
  width: 40%;
}

/* Section title styling */
#lincom h2 {
  font-size: 1.8em;
  margin-top: 2rem;
  color: #2f3b52;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.5rem;
}

/* Table style for Stress Test section */
#linstress table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background-color: #f9f9f9;
  font-family: 'Segoe UI', sans-serif;
}

#linstress th, #linstress td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

#linstress th {
  background-color: #2f3b52;
  color: #ffffff;
}

#linstress tr:hover {
  background-color: #e0f0ff;
}

#linstress colgroup col:nth-child(1) {
  width: 20%;
}
#linstress colgroup col:nth-child(2),
#linstress colgroup col:nth-child(3) {
  width: 40%;
}

/* Title styling */
#linstress h2 {
  font-size: 1.8em;
  margin-top: 2rem;
  color: #2f3b52;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.5rem;
}

/* Table style for macOS command sections */
#appcom table, #appstress table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background-color: #f9f9f9;
  font-family: 'Segoe UI', sans-serif;
}

#appcom th, #appcom td,
#appstress th, #appstress td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

#appcom th, #appstress th {
  background-color: #2f3b52;
  color: #ffffff;
}

#appcom tr:hover, #appstress tr:hover {
  background-color: #e0f0ff;
}

#appcom colgroup col:nth-child(1),
#appstress colgroup col:nth-child(1) {
  width: 20%;
}
#appcom colgroup col:nth-child(2),
#appcom colgroup col:nth-child(3),
#appstress colgroup col:nth-child(2),
#appstress colgroup col:nth-child(3) {
  width: 40%;
}

/* Title styling */
#appcom h2, #appstress h2 {
  font-size: 1.8em;
  margin-top: 2rem;
  color: #2f3b52;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.5rem;
}

/* Base styles */
.main-nav {
  background-color: #2f3b52;
  padding: 0.5rem 1rem;
  font-family: 'Segoe UI', sans-serif;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav li {
  margin: 0.2rem 0.5rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: #ffffff;
  border-radius: 6px;
  transition: background 0.3s;
  font-weight: 500;
}

.main-nav a:hover {
  background-color: #44506b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-nav ul {
    flex-direction: column;
    align-items: center;
  }

  .main-nav li {
    width: 100%;
    text-align: center;
  }

  .main-nav a {
    width: 100%;
    padding: 1rem;
    border-top: 1px solid #44506b;
  }
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  margin: 0;
  background-color: #2f3b52;
}

.main-nav li {
  position: relative;
  margin: 0.2rem;
}

.main-nav a {
  display: block;
  padding: 0.6rem 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
}

.main-nav a:hover {
  background-color: #44506b;
}

/* Sous-menu caché par défaut */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #3a4964;
  border-radius: 0 0 6px 6px;
  min-width: 200px;
  z-index: 1000;
  flex-direction: column;
}

.submenu li a {
  padding: 0.6rem;
  border-bottom: 1px solid #44506b;
}

.has-submenu:hover .submenu {
  display: flex;
}

/* Responsive: stacké en vertical */
@media (max-width: 768px) {
  .main-nav ul {
    flex-direction: column;
    align-items: center;
  }

  .main-nav li {
    width: 100%;
    text-align: center;
  }

  .submenu {
    position: static;
    border-radius: 0;
  }
}

.access-btn {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  background-color: #2f3b52;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  margin-top: 1rem;
}

.access-btn:hover {
  background-color: #44506b;
}

.logout-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #ffffff;
  color: #e74c3c;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.logout-btn:hover {
  background-color: #e74c3c;
  color: white;
}
