button, input, select, textarea {
  font-family: inherit;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  background: #f7f8f7;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* ---- Animation de fond (canvas) ---- */
#wrapper {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

#wrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#canvas {
  z-index: 1;
}

#canvasbg {
  z-index: -10;
  -webkit-filter: blur(3px);
  -moz-filter: blur(3px);
  -o-filter: blur(3px);
  filter: blur(3px);
  opacity: 0.6;
}

/* ---- Carte de connexion ---- */
.carte-connexion {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  width: 380px;
  padding: 28px 32px 22px;
}

.carte-connexion .logo {
  height: 64px;
  margin-bottom: 18px;
}

.carte-connexion h2 {
  margin: 0 0 16px;
  font-size: 1.4em;
  font-weight: 500;
  color: #1F2A37;
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 16px;
}

.champ {
  margin-bottom: 16px;
}

.champ label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
  color: #374151;
  margin-bottom: 6px;
}

.champ input[type="text"],
.champ input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #C7D2C0;
  border-radius: 6px;
  background: #EEF3EA;
  font-size: 0.95em;
}

.champ input:focus {
  outline: none;
  border-color: #8BC34A;
  background: #E9F3E3;
}

.champ-mdp {
  position: relative;
}

.champ-mdp input {
  padding-right: 42px !important;
}

.btn-oeil {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1em;
  line-height: 1;
  padding: 6px;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.btn-oeil:hover {
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.05);
}

.btn-oeil.actif {
  opacity: 1;
}

.souvenir {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #374151;
  margin: 4px 0 20px;
}

.btn-connexion {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: #8BC34A;
  color: white;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
}

.btn-connexion:hover {
  background: #7CB342;
}

.pied-carte {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #E5E7EB;
  font-size: 0.85em;
}

.pied-carte a {
  color: #4B5563;
  text-decoration: none;
}

.pied-carte a:hover {
  text-decoration: underline;
}

/* ---- Horloge, en haut à droite ---- */
.carte-horloge {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  padding: 18px 24px;
  text-align: center;
  width: 220px;
}

.carte-horloge .date {
  font-weight: 600;
  color: #1F2A37;
  margin-bottom: 12px;
}

.horloge-analogique {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid #1F2A37;
}

.horloge-analogique .chiffre {
  position: absolute;
  font-size: 0.75em;
  color: #6B7280;
  width: 16px;
  text-align: center;
}

.aiguille {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: bottom center;
  background: #1F2A37;
  border-radius: 3px;
}

.aiguille.heures { width: 4px; height: 32px; margin-left: -2px; }
.aiguille.minutes { width: 3px; height: 46px; margin-left: -1.5px; }
.aiguille.secondes { width: 1.5px; height: 50px; margin-left: -0.75px; background: #B91C1C; }

.centre-horloge {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: #1F2A37;
  border-radius: 50%;
}

.carte-horloge .digitale {
  font-family: monospace;
  font-size: 1.3em;
  font-weight: 700;
  color: #1F2A37;
}

/* ---- Lien "À propos", en bas à droite ---- */
.a-propos {
  position: fixed;
  bottom: 14px;
  right: 18px;
  font-size: 0.85em;
}

.a-propos a {
  color: #6B7280;
  text-decoration: underline;
}

/* ---- Badge de statut de connexion à la base ---- */
.statut-bdd {
  position: fixed;
  top: 20px;
  left: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  padding: 10px 16px;
  font-size: 0.9em;
  font-weight: 600;
  color: #374151;
}

.statut-bdd.ok {
  color: #15803d;
}

.statut-bdd.erreur {
  color: #B91C1C;
}

/* ---- Toast de connexion ---- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1F2A37;
  color: white;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 600;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.ok {
  background: #8BC34A;
}

.toast.erreur {
  background: #B91C1C;
}
