:root {
    --background-light: #f0f4f8;
    --background-dark: #000000;
    --text-light: #333;
    --text-dark: #ffffff;
    --button-bg: #4CAF50;
    --button-hover-bg: #45a049;
    --button-active-bg: #3e8e41;
    --button-focus-outline: #4CAF50;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-light);
    color: var(--text-light);
    padding: 30px;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

body.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-dark);
}

h1 {
    text-align: center;
    margin-bottom: 70px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    font-size: 2.5rem;
    color: #000000;
}

body.dark-mode h1 {
    color: #ffffff;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.1);
}

body.dark-mode .container {
    background-color: #333;
}

.image-container {
    display: flex;
    justify-content: center; 
    align-items: center;
    height: 100px;
}

.image-container img {
    max-width: 75px;
    height: auto;
}

/* Centering the button using Flexbox */
.button-container {
    display: flex;
    justify-content: center; /* Center horizontally */
    gap: 20px; /* Add space between buttons */
    margin: 20px; /* Add space from content above */
}

.button {
    background-color: var(--button-bg);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Button hover effect */
.button:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* Button focus effect */
.button:focus {
    outline: 2px solid var(--button-focus-outline);
    outline-offset: 4px;
}

/* Button active effect */
.button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Search bar style */
.search-bar {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 0;
    padding: 15px 0;
}

/* Search bar input and select */
.search-bar input, .search-bar select {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 20px;
    padding: 10px;
    font-size: 16px;
}

/* Search bar input style */
.search-bar input {
    width: 60%;
    max-width: 600px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

/* Focus effect for search bar */
.search-bar select:focus,
.search-bar input:focus {
    border-color: var(--button-bg);
    box-shadow: 0px 0px 10px rgba(76, 175, 80, 0.3);
}

/* Table styles */
.table-container {
    width: 100%;
    max-width: 100%;                /* Ne dépasse jamais la largeur de l'écran */
    overflow-x: auto;               /* Scroll horizontal quand nécessaire */
    overflow-y: hidden;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

body.dark-mode .table-container {
    border-color: #444;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* Le tableau ne doit JAMAIS forcer un dépassement */
table {
    width: auto;                    /* ← CHANGEMENT IMPORTANT */
    min-width: 100%;                /* au moins la largeur du wrapper */
    max-width: none;                /* autorise à être très large */
    border-collapse: collapse;
    table-layout: auto;
}

/* Empêche les cellules de se casser bêtement */
th, td {
    padding: 14px 16px;
    white-space: nowrap;            /* texte sur une seule ligne */
    text-align: left;
}

/* Sauf pour les cellules avec icône + texte */
.icon-cell {
    white-space: normal;
    min-width: 220px;               /* confortable pour OS/CPU/GPU */
}

th {
    background-color: var(--button-bg);
    color: white;
    text-transform: uppercase;
    font-size: 14px;
    border-bottom: 0px solid #f0f0f0;
}

/* Largeurs minimales pour éviter que ça devienne illisible */
th:nth-child(1), td:nth-child(1)  { min-width: 220px; } /* OS */
th:nth-child(2), td:nth-child(2)  { min-width: 140px; } /* Version */
th:nth-child(3), td:nth-child(3)  { min-width: 240px; } /* CPU */
th:nth-child(4), td:nth-child(4)  { min-width:  90px; } /* Cores */
th:nth-child(5), td:nth-child(5)  { min-width:  90px; } /* Threads */
th:nth-child(6), td:nth-child(6)  { min-width: 220px; } /* GPU */
th:nth-child(7), td:nth-child(7)  { min-width: 100px; } /* VRAM */
th:nth-child(8), td:nth-child(8)  { min-width: 100px; } /* RAM */
th:nth-child(9),  td:nth-child(9) { min-width: 150px; } /* Owner */
th:nth-child(10), td:nth-child(10){ min-width: 180px; } /* Denomination */
th:nth-child(11), td:nth-child(11){ min-width: 120px; } /* Device */

tr:hover {
    background-color: #f9f9f9;
    border-bottom: 0px solid #f0f0f0;
}
body.dark-mode table {
    background-color: #1a1919;
}

body.dark-mode th {
    background-color: #222222;
    color: #fff;
}

body.dark-mode tr {
    background-color: #424242;
}

body.dark-mode tr:nth-child(even) {
    background-color: #888888;
}

body.dark-mode tr:hover {
    background-color: #818181;
}

body.dark-mode td {
    color: #fff;
}

body.dark-mode td img {
    border: none;
}


.switch-container {
    display: flex;
    justify-content: center;
  }
  
  .switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin: 5px;
  }


.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #bbbbbb;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #89C445;
}

input:focus + .slider {
  box-shadow: 0 0 1px #89C445;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

tr:nth-child(even) {
    background-color: #f9f9f9;
    border-bottom: 0px solid #f0f0f0;
}

td img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    vertical-align: middle;
    border-bottom: 0px solid #f0f0f0;
}

.icon-cell {
    display: flex;
    align-items: center;
}

.icon-cell span {
    margin-left: 10px;
}

/* File upload container style */
.file-upload-container {
    text-align: center;
    margin: 20px 0;
}

/* Label style for file input */
.file-label {
    display: block;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--button-bg);
}

/* File input style */
.file-input {
    font-size: 16px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 30px;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #fff;
    color: #333;
    width: auto;
}

/* File input focus effect */
.file-input:focus {
    border-color: var(--button-bg);
    box-shadow: 0px 0px 10px rgba(76, 175, 80, 0.3);
}

/* Adjust file input hover effect */
.file-input:hover {
    background-color: #f9f9f9;
}

/* Make the file input fit nicely with other elements */
.file-input-container {
    margin: 20px;
    text-align: center;
}

/* Conteneur qui limite la largeur et active le scroll */
.table-wrapper {
    width: 100%;                    /* prend toute la largeur disponible dans .container */
    max-width: 100%;                /* jamais plus large que le parent */
    overflow-x: auto;               /* ← LA barre de scroll apparaît ICI */
    overflow-y: hidden;
    margin: 1.5rem 0;
    -webkit-overflow-scrolling: touch; /* scroll fluide sur mobile */
}

/* Style de la barre de scroll (optionnel mais joli) */
.table-wrapper::-webkit-scrollbar {
    height: 9px;
}
.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}
.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mode sombre pour la scrollbar */
body.dark-mode .table-wrapper::-webkit-scrollbar-track {
    background: #2d2d2d;
}
body.dark-mode .table-wrapper::-webkit-scrollbar-thumb {
    background: #666;
}

#copyToast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);

    background: #333;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 9999;
}

#copyToast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    table {
        font-size: 14px;
    }

    th, td {
        padding: 15px;
    }

    .search-bar input {
        width: 80%;
    }
}

@media (max-width: 480px) {
    table {
        font-size: 13px;
    }

    .search-bar input {
        width: 100%;
    }
}

@media (max-width: 320px) {
    .button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .search-bar input {
        width: 90%;
    }
}
