.att-acces {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 50;
  pointer-events: auto;
  font-family: 'Plein Regular', ui-sans-serif, system-ui, sans-serif;
  color: #731100;
}

.att-acces > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  line-height: 1;
  color: #731100;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(225, 146, 128, 0.5);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.2s ease;
  opacity: 0.75;
}

.att-acces > summary::-webkit-details-marker {
  display: none;
}

.att-acces > summary:hover,
.att-acces > summary:focus-visible {
  opacity: 1;
  background: #fff;
}

.att-acces[open] > summary {
  opacity: 1;
  background: #fff;
  margin-bottom: 0.6rem;
}

.att-acces-panneau {
  width: min(20rem, calc(100vw - 2rem));
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(225, 146, 128, 0.5);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -12px rgba(115, 17, 0, 0.35);
  text-align: left;
}

.att-acces label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-family: 'Plein Bold', ui-sans-serif, system-ui, sans-serif;
}

.att-acces .att-champ {
  display: flex;
  gap: 0.4rem;
}

.att-acces input[type='password'],
.att-acces input[type='text'] {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  font: inherit;
  font-size: 0.95rem;
  color: #731100;
  background: #fff;
  border: 1px solid rgba(225, 146, 128, 1);
  border-radius: 8px;
}

.att-acces input:focus-visible,
.att-acces button:focus-visible,
.att-acces > summary:focus-visible {
  outline: 2px solid #ff6759;
  outline-offset: 2px;
}

.att-acces .att-oeil {
  padding: 0 0.6rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  color: #731100;
  background: transparent;
  border: 1px solid rgba(225, 146, 128, 1);
  border-radius: 8px;
}

.att-acces .att-memoriser {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.7rem 0 0;
  font-family: 'Plein Regular', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
}

.att-acces .att-memoriser input {
  accent-color: #ff6759;
}

.att-acces .att-envoyer {
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.65rem;
  font-family: 'Plein Bold', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  color: #fff;
  background: #731100;
  border: 0;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.att-acces .att-envoyer:hover {
  background: #8d1600;
}

.att-acces #login_error,
.att-acces .message {
  margin: 0 0 0.8rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.4;
  border-radius: 8px;
  background: rgba(255, 103, 89, 0.12);
  border: 1px solid #ff6759;
  color: #731100;
}

.att-acces #login_error p,
.att-acces .message p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .att-acces {
    animation: att-acces-apparait 0.6s ease 2.6s both;
  }

  .att-acces[open] {
    animation: none;
  }

  @keyframes att-acces-apparait {
    from {
      opacity: 0;
      transform: translateY(0.5rem);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (max-width: 450px) {
  .att-acces > summary {
    font-size: 0.8rem;
    padding: 0.45rem 0.8rem;
  }
}
