/* Appliquer globalement */
*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f2f2f2;
}
.container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.card {
    background: #fff;
    padding: 35px;
    width: 100%;
    max-width: 380px;
    border-radius: 18px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
    text-align: center;

    /* 🔹 effet d'apparition */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards ease-out;
}

/* 🔹 animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.card h1 {
    margin-top: 0;
    font-size: 24px;
    color: #333;
}
.card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}
form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #ccc;
    outline: none;
    font-size: 14px;
    transition: .2s;
}
form input:focus {
    border-color: #2da7ff;
    box-shadow: 0 0 4px rgba(45,167,255,0.4);
}
button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #2da7ff;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: .2s;
}
button:hover {
    background: #1d8edb;
    transform: translateY(-2px);
}
.links {
    margin-top: 20px;
}
.links a {
    font-size: 14px;
    color: #444;
    text-decoration: none;
    transition: .2s;
}
.links a:hover {
    color: #b30000;
}

/* recaptcha v2 caché */
#captchaContainer {
	margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: max-height 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 0.6s ease,
                transform 0.4s ease;
}
#captchaContainer.show {
    max-height: 150px;
    opacity: 1;
    transform: scale(1);
}

/* Accessibilité screen-reader */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

#notifications-container {
	position: fixed;
	top: 20px;
	right: 20px;
	display: flex;
	flex-direction: column;
	z-index: 9999;
}
.notification {
  padding: 14px 18px 16px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0px 8px 24px rgba(0,0,0,0.2);
  width: fit-content;
  max-width: 300px;
  margin-bottom: 12px;
  word-break: break-word;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeIn 0.3s ease forwards;
  overflow: hidden;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
}

.notification .notif-message{
	display:block;
	margin-top:8px;
	text-align: justify;
}

.notification .notif-timer {
	height: 4px;
	border-radius: 2px;
	width: 100%;
	transform-origin: left;
	margin-top: 8px;
}

.notification {
  animation: shakeFadeIn 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

/* Header de la notification */
.notification .notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
}

/* Titre */
.notification .notif-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    flex: 1;            /* empêche le titre d’être compressé */
    min-width: 0;       /* autorise le texte à réduire proprement */
}

/* Icône */
.notification .notif-title span {
    flex-shrink: 0;     /* l’icône ne bouge jamais */
}

/* Bouton fermer */
.notification .close-btn {
	display: none;
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;     /* IMPORTANT : évite que la croix glisse vers le centre */
}

.notification .close-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,0.3);
}

@keyframes shakeFadeIn {
  0% {
    opacity: 0;
    transform: translateX(0) rotate(0deg);
  }
  10% {
    opacity: 1;
    transform: translateX(-6px) rotate(-4deg);
  }
  20% {
    transform: translateX(6px) rotate(4deg);
  }
  30% {
    transform: translateX(-4px) rotate(-2.5deg);
  }
  40% {
    transform: translateX(4px) rotate(2.5deg);
  }
  50% {
    transform: translateX(-2px) rotate(-1.5deg);
  }
  60% {
    transform: translateX(2px) rotate(1.5deg);
  }
  70% {
    transform: translateX(-1px) rotate(-0.8deg);
  }
  80% {
    transform: translateX(1px) rotate(0.8deg);
  }
  90% {
    transform: translateX(0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
  }
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(-20px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
	from { opacity: 1; transform: translateY(0); }
	to { opacity: 0; transform: translateY(-20px); }
}

@keyframes fadeShrinkOut {
  0% {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    padding-top: 14px;
    padding-bottom: 16px;
    margin-bottom: 12px;
  }
  60% {
    opacity: 0.6;
    margin-bottom: 6px;
  }
  100% {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
	transform: translateY(-20px);
  }
}

@keyframes progress {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}
