* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

input {
    border: 0.1px solid #666;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #77faff 100%);
    background: #484848;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    padding: 12px;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #222;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1000;
}

.app-name {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px
}

.menu-right a:hover {
    text-decoration: underline;
}

#content {
    padding-top: 60px; /* espace pour éviter que le contenu passe sous la barre */
}
/* Menu déroulant */
.menu-container {
    position: relative;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.box {
  transform: scaleY(0);
  transform-origin: top;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.box.open {
  transform: scaleY(1);
  opacity: 1;
}

.dropdown {
    position: absolute;
    top: 56px;
    right: 0;
    background: white;
    color: black;
    min-width: 150px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-radius: 0 0 10px 10px;
    /*display: none;
    flex-direction: column;*/
}


.dropdown i, .card-header i, .app-name i {
    margin-right: 10px;
}

.dropdown a {
    padding: 25px 80px 25px 15px;
    text-decoration: none;
    color: black;
    border: 0.1px solid #CCC;
    display: flex;
    /*text-align: left;*/
}

.dropdown a:hover {
    background: #f0f0f0;
}

.dropdown a:hover:last-child {
    border-radius: 0 0 10px 10px;
}

/* Card */

.card-1 {
    text-align:left;
    background: white;
    border-radius: 20px;
    box-shadow: 0px 3px 10.3px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    /*transition: transform 0.3s ease, box-shadow 0.3s ease;*/
    /*transform: translateY(-5px);*/
    border: 1px solid #490094;
    margin: 0 auto;
    margin-bottom: 15px;
}

/* En-tête */
.card-header {
    background: linear-gradient(195deg, #5dbfe3 0%, #188489 100%);
    background: linear-gradient(95deg, #cc5de3 0%, #2bdae2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    box-shadow: 0px 2.9px 3px rgba(0, 0, 0, 0.5);
}
.card-header h3 {
    font-size: 16px;
    margin-bottom: 2px;
    font-weight: 600;
}

.card-header p {
    font-size: 14px;
    opacity: 0.9;
}

.card-body {
    padding: 10px 10px;
}

.card-body.empty {
    padding: 0 10px;
}

#devices-list.card-body {
    padding: 0 10px;
}


/* Grille des informations */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 5px;
    /*background: #f8f9fa;
    border-radius: 12px;
    */padding: 0 10px;
}

.info-grid:last-child {
    margin-bottom: 0;
}

.info-grid:last-child {
    margin-bottom:0px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /*margin-bottom: 8px;*/
    font-weight: 600;
}

.info-value {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Icônes */
.icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Section Mode */
.mode-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    border-left: 4px solid #667eea;
}

.mode-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

#device button  {
    display: inlin-block;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

#login input {
    color: inherit;
    font-size: 14px;
    margin-bottom: 8px;
    width: 100%;
    width: -webkit-fill-available;
    border: 1px solid #666;
    border-radius: 5px;
    padding: 8px 16px;
}

#login input:placeholder-shown {
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#login button {
    float: right;
}

/* Section Temps */
/*.temps-section, */
.device {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin: 5px 0px;
    border: 1px solid #DEDEDE;
    display: flex;
    justify-content: space-between;
    align-items:center; 
}

.device:first-child {
    margin-top: 10px;
}

.device:last-child {
    margin-bottom: 10px;
}

.device button, #add-device-form button { 
  z-index: 1;
  font-size: 10px;
  color: #FFFFFF;
}

#device-send-message {
    width: 100%;
}

.device > div {
    display: flex;
    align-items: center;
}

.device > div:last-child > button {
    margin-left: 2px;
}

#devices {
    margin: -5px 0;
}

#add-device-form {
  display: contents;
  justify-content: space-between;
  margin: 0 3px;
/*  align-items: center; */
}

#add-device-form input[type="text"] { 
  width: 100%;
  padding: 0 5px;
  margin: 0;
  margin-right: 10px;
  border-radius: 8px;
  border: 1px solid #999;
}

#add-device-form button[type="submit"] { 
    width: inherit;
    font-size: 10px
}

#device form {
    display: contents;
}

textarea#message {
    width: 100%;
    width: -webkit-fill-available;
    height: 4em;
    padding: 5px 10px;
    margin: 0 10px;
    border-radius: 3px;
    border: 0.1px solid #666;
}
.hidden {
  display: none;
}

.temps-comparison {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.temps-item {
    display: flex;
    flex-direction: column;
}

.temps-item small {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.temps-item strong {
    font-size: 16px;
    color: #333;
}

.temps-separator {
    color: #ddd;
    font-size: 12px;
}

.temps-ecart {
    text-align: center;
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
}

.temps-ecart.positif {
    color: #48bb78;
}

.temps-ecart.negatif {
    color: #f56565;
}

/* Barre de progression */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Footer */
.card-footer {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #f8f9fa;
}

.danger {
    background-color: #f44336;  /* rouge */
}

.alert {
    background-color: #ff9800;  /* orange */
}

.success {
    background-color: #4caf50;  /* vert */
}

.status-dot {
    width: 15px;          /* largeur du bouton */
    height: 15px;         /* hauteur égale pour cercle */
    border-radius: 50%;   /* rend le div parfaitement rond */
    display: inline-block;
    margin: 5px;          /* petit espace entre boutons */
    margin-right: 12px;
    box-shadow: 0 0 3px rgba(0,0,0,0.3); /* optionnel : léger relief */
    cursor: pointer;      /* optionnel : pour donner l’impression d’un bouton cliquable */
    transition: background 0.3s; /* optionnel : animation au hover */
}

/* Couleurs selon le statut */
.status-dot.ok {
    background-color: #4caf50;  /* vert */
}

.status-dot.error {
    background-color: #f44336;  /* rouge */
}

.status-dot.warning {
    background-color: #ff9800;  /* orange */
}

/* Hover optionnel */
.status-dot:hover {
    filter: brightness(1.2);
}

/* Responsive */
/*@media (max-width: 480px) {
    .card-1 {
        max-width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card-footer {
        flex-direction: column;
    }
}*/

