/* css/styles.css */

:root {
    --green: #2e7d32;
    --red:   #c62828;
}

/* Fond « Discord » : sur html, pas sur body */
html {
    height: 100%;
    background: #2b2d31;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
    overflow: hidden;
    background: transparent; /* IMPORTANT */
}

/* Canvas particles */
#particles-js {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1; /* derrière main, mais au-dessus du fond html */
}

/* Contenu centré */
main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

/* Titre gradient animé */
h1 {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(90deg, #00ffd5, #00ff00, #ff0040 80%);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slide 5s linear infinite;
    margin: 0 0 2rem 0;
}
@keyframes slide {
    to { background-position: -200% 0; }
}

/* Bouton ON/OFF */
#toggle {
    padding: 1.5rem 4rem;
    font-size: 1.75rem;
    border: none;
    border-radius: 1rem;
    color: #fff;
    cursor: pointer;
    transition: background .3s;
}
#toggle.off { background: var(--red); }
#toggle.on  { background: var(--green); }

/* Encadré Temp/Hum */
.card {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: #1e1f22;
    border-radius: .75rem;
    font-size: 1.25rem;
    box-shadow: 0 0 10px #0004;
}
/* à ajouter dans css/styles.css (ou css/navbar.css) */
.navbar {
    width: 100%;
    background-color: #1a1c20; /* un ton plus sombre que le fond principal */
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
}

.navbar-content {
    max-width:1024px;
    margin:0 auto;
    display:flex;
    justify-content:space-between;  /* espace entre Accueil et Login/Mon compte */
    align-items:center;
}

.btn-home {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    padding: 0.1rem 0.1rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.btn-home:hover {
    background: rgba(255,255,255,0.1);
}
/* ==== login-form ==== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 300px;
}
.login-form label {
    display: flex;
    flex-direction: column;
    font-size: 1rem;
}
.login-form input {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border: none;
    border-radius: 0.5rem;
}
.login-form button {
    padding: 0.75rem;
    font-size: 1rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--green);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.login-form button:hover {
    background: #24912a;
}
.error {
    background: #ff4f4f;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}
.btn-login {
    color:#fff;
    text-decoration:none;
    font-size:1rem;
    padding:0.5rem 1rem;
    border-radius:0.5rem;
    display:flex;
    align-items:center;
    transition:background 0.2s;
}
.btn-login i {
    margin-right:0.5rem;
}
.btn-login:hover {
    background:rgba(255,255,255,0.1);
}