/* Mobile-first */
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Barre en haut */
.app-header{
  position: sticky;   /* reste en haut quand on scroll */
  top: 0;
  z-index: 10;
  background: #111;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Navigation */
.top-nav{
  display: flex;
  gap: 8px;
  padding: 10px;
}

/* Liens "boutons" */
.nav-link{
  flex: 1;                 /* chaque bouton prend la même largeur */
  text-align: center;
  padding: 12px 0;         /* zone tactile confortable */
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  background: #222;
  font-size: 30px;
}

/* Appui / hover */
.nav-link:active,
.nav-link:hover{
  background: #333;
}

.nav-link.active{
  background: #fff;
  color: #111;
  font-weight: 600;
}

/* Zone contenu */
.app-content{
  padding: 12px;
}

/* TABLE MOBILE FRIENDLY */
table {
  width: 100%;
  margin: 16px auto;       /* centre horizontalement */
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 30px;
}

/* LIGNES */
tr.status_dcnx,
tr.status_1 {
    background-color: indianred;
}

tr.status_cnx,
tr.status_0 {
    background-color: mediumseagreen;
}

/* Séparation des lignes */
tr td {
  border: 1px solid black;
}

/* CELLULES */
td {
  padding: 12px 10px;
  text-align: center;     /* centré horizontalement */
  vertical-align: middle;
  white-space: nowrap;    /* évite les retours moches */
}

/* Petits écrans */
@media (max-width: 360px) {
  table {
    font-size: 15px;
  }
  td {
    padding: 10px 6px;
  }
}

.sun{
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: relative;
  margin: 40px auto 9px auto;
  transition: all 0.4s ease;
  cursor: pointer;
}

/* 🌞 ALLUMÉ */
.sun.on{
  background: gold;
  box-shadow: 0 0 20px gold;
}

/* rayons */
.sun.on::before{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(to right, transparent 45%, gold 45% 55%, transparent 55%),
    linear-gradient(to bottom, transparent 45%, gold 45% 55%, transparent 55%),
    linear-gradient(45deg, transparent 45%, gold 45% 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45% 55%, transparent 55%);
}

/* halo */
.sun.on::after{
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  box-shadow: 0 0 25px gold;
  opacity: 0.7;
}

/* 🌑 ÉTEINT */
.sun.off{
  background: dimgray;
  box-shadow: none;
}

/* pas de rayons */
.sun.off::before,
.sun.off::after{
  content: none;
}
