body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top, #2b2b2b 0, #000 55%, #000 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  color: #fff;
}

/* Carte de connexion */
.login-box {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.75),
    0 0 20px rgba(255, 87, 51, 0.35);
  padding: 32px 26px;
  width: 100%;
  max-width: 280px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Titre avec glow */
#title-glow {
    position: relative;
    z-index: 5;
    text-align: center;
    margin: 0 0 24px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fbd7a0;
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.4),
        0 0 2px rgba(0, 0, 0, 0.6);
    animation:
        titleSoftPulse 6s ease-in-out infinite,
        titleColorCycleWarm 12s linear infinite;
}

@keyframes titleSoftPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow:
            0 0 1px rgba(255, 230, 200, 0.25),
            0 0 2px rgba(0, 0, 0, 0.4);
    }
    50% {
        transform: scale(1.02);
        text-shadow:
            0 0 2px rgba(255, 230, 200, 0.28),
            0 0 3px rgba(0, 0, 0, 0.45);
    }
}

/* Cycle de couleurs chaudes */
@keyframes titleColorCycleWarm {
    0%   { color: #ffd9a1; }
    33%  { color: #ffc2a8; }
    66%  { color: #ffb3b3; }
    100% { color: #ffe7c7; }
}

/* Champs */
.input-group {
  position: relative;
  margin-bottom: 18px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 11px 42px 11px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  outline: none;
  font-size: 15px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

/* Bouton œil */
.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.75);
}

/* Bouton submit */
button[type="submit"] {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff5733, #ff8a50);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  box-shadow: 0 0 12px rgba(255, 87, 51, 0.55);
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  opacity: 0.95;
  box-shadow: 0 0 18px rgba(255, 87, 51, 0.8);
}

/* Message d’erreur */
.error-message {
  background: rgba(255, 0, 0, 0.08);
  color: #ff8a80;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  border: 1px solid rgba(255, 82, 82, 0.7);
}

/* Lien inscription */
.signup-link {
  margin-top: 18px;
  font-size: 14px;
  color: #ddd;
}

.signup-link a {
  color: #4fc3f7;
  text-decoration: none;
}

.signup-link a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
  .login-box {
    margin: 0 16px;
    padding: 28px 20px;
  }
  #title-glow {
    font-size: 19px;
  }
}

/* PWA Bouton Partage / Installer */
.pwa-actions {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Espacement entre les boutons */
}

/* Base pour les boutons PWA */
.pwa-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    max-width: 250px; /* Limite la largeur */
    margin: 0 auto; /* Centré horizontalement */
}

/* Effet au survol */
.pwa-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Bouton spécifique "Installer" */
#btn_share_install {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: rgba(59, 130, 246, 0.8);
    font-size: 1rem;
}

#btn_share_install:hover {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.65);
}

/* Badge discret "installé" */
.share-btn.installed::after {
    content: "✓";
    position: absolute;
    top: -5px;
    right: -4px;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.22);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: rgba(187, 247, 208, 0.95);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.25);
}

/* Toast discret */
.nav-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 99999;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.nav-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

/* Masquer le bouton "Partager" dans la page de login */
body.login-page #btn_share_install {
    display: none;
}

/* Bouton Quitter l'application avec icône */
#btnQuitApp {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #776d6d2a; /* Rouge pour quitter */
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
  position: relative; /* S'assurer qu'il est positionné relativement ou absolument */
  z-index: 9999; /* S'assurer qu'il soit au-dessus */
  cursor: pointer; /* S'assurer que le curseur change en cliquant */
  }

#btnQuitApp:hover {
    background-color: #776d6d; /* Une teinte un peu plus foncée au survol */
    transform: translateY(-2px);
}

/* Icône dans le bouton */
#btnQuitApp i {
    font-size: 16px;
}
