/* Variables */
:root{
	--hpa-blue: #09374f;
	--hpa-beige: #eaeae3;
	--hpa-rose: #d1afa7;
	--hpa-white: #fff;
	--hpa-text: #0b1a22;
	--hpa-muted: #6e7a84;
	--hpa-radius: 4px;
	--hpa-shadow: 0 10px 30px rgba(0,0,0,.12);
	--hpa-ring: 0 0 0 1px rgba(9,55,79,.28);
}

/* Container */
#hpa-account{
	position: relative;
	display: inline-block;
}

/* Icon button */
#hpa-trigger{
	background: transparent;
	border: 0;
	padding: 2px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	outline: none;
}
#hpa-trigger:focus{ box-shadow: var(--hpa-ring); }
#hpa-trigger svg{ width: 20px; height: 20px; display: block; }

/* Drawer */
#hpa-drawer{
	position: absolute;
	top: calc(100% + 10px);
	right: -60px;
	width: 220px;
	background: var(--hpa-white);
	border-radius: var(--hpa-radius);
	box-shadow: var(--hpa-shadow);
	padding: 10px;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
#hpa-drawer.is-open{
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.hpa-menu{
	list-style: none;
	margin: 0;
	padding: 4px;
}
.hpa-menu a{
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 4px;
	color: var(--hpa-text);
	text-decoration: none;
}
.hpa-menu a:hover, .hpa-menu a:focus{
	background: var(--hpa-beige);
	outline: none;
}

/* Modal */
#hpa-overlay{
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: 99;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, visibility .18s ease;
}
#hpa-overlay.is-open{ opacity: 1; visibility: visible; pointer-events: auto; }

#hpa-modal{
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	z-index: 9999;
	pointer-events: none;
}
#hpa-modal .hpa-card{
	pointer-events: none;
	width: 92vw;
	max-width: 420px;
	background: var(--hpa-white);
	border-radius: var(--hpa-radius);
	box-shadow: var(--hpa-shadow);
	opacity: 0;
	transform: translateY(6px) scale(.98);
	transition: opacity .2s ease, transform .2s ease;
}
#hpa-modal.is-open .hpa-card{
	pointer-events: auto;
	opacity: 1;
	transform: translateY(0) scale(1);
}

.hpa-card-header{
	padding: 14px 18px 0 18px;
}
.hpa-tabs{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}
.hpa-tabs button{
	background: var(--hpa-beige);
	border: 0;
	padding: 10px 12px;
	border-radius: 4px;
	color: var(--hpa-text);
	cursor: pointer;
}
.hpa-tabs button.is-active{
	background: var(--hpa-blue);
	color: #fff;
}
.hpa-card-body{
	padding: 12px 18px 4px 18px;
}
.hpa-card-footer{
	padding: 10px 18px 16px 18px;
	color: var(--hpa-muted);
	font-size: 14px;
}

/* Forms */
.hpa-field{
	margin-bottom: 12px;
}
.hpa-field label{
	display: block;
	font-size: 14px;
	color: var(--hpa-text);
	margin-bottom: 6px;
}
.hpa-field input[type="text"],
.hpa-field input[type="email"],
.hpa-field input[type="password"]{
	width: 100%;
	padding: 10px 12px;
	border-radius: 4px;
	border: 1px solid #d6d6cf;
	background: #fff;
	color: var(--hpa-text);
}
.hpa-field input:focus{ outline: none; box-shadow: var(--hpa-ring); border-color: #b9c8d1; }

.hpa-inline{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.hpa-actions{
	margin-top: 10px;
	 text-align: center;
}

.hpa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 54px !important;
    border-radius: 4px !important;
    border: 0;
    background: var(--hpa-blue);
    color: #fff;
    cursor: pointer;
}
.hpa-btn[disabled]{ opacity: .6; cursor: not-allowed; }
.hpa-btn[data-loading]::after{
	content: '…';
	animation: hpa-ellipsis 1s infinite;
}
@keyframes hpa-ellipsis{
	0%{ content: '…'; }
	33%{ content: '..'; }
	66%{ content: '.'; }
	100%{ content: '…'; }
}

.hpa-link{
	background: none;
	border: 0;
	padding: 0;
	color: var(--hpa-blue);
	text-decoration: underline;
	cursor: pointer;
}

/* Password toggle */
.hpa-showpw{
	margin-left: 8px;
	font-size: 13px;
}

/* Toasts */
.hpa-toasts{
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 10050;
	display: grid;
	gap: 8px;
}
.hpa-toast{
	background: var(--hpa-blue);
	color: #fff;
	padding: 8px 12px;
	border-radius: 4px;
	box-shadow: var(--hpa-shadow);
	opacity: 1;
	transform: translateY(0);
	transition: opacity .25s ease, transform .25s ease;
}
.hpa-toast--error{ background: #b3261e; }
.hpa-toast--success{ background: #0b7a25; }
.hpa-toast.is-out{ opacity: 0; transform: translateY(10px); }

/* Modal open lock */
html.hpa-modal-open, body.hpa-modal-open{ overflow: hidden !important; }

/* Responsive */
@media (max-width: 480px){
	#hpa-drawer{
		right: auto;
		left: -40px;
	}
}


#hpa-overlay{
  z-index: 99999; /* avant: 9998 */
}
#hpa-modal{
  z-index: 100000; /* avant: 10000 */
}

.hpa-toasts{
	z-index: 100500;
}

/* Password input with embedded toggle */
.hpa-input-wrap{
	position: relative;
}
.hpa-input--password{
	padding-right: 44px; /* place pour le bouton œil */
}
.hpa-showpw{
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
}
.hpa-showpw:focus{ outline: none; box-shadow: var(--hpa-ring); }
.hpa-showpw .hpa-eye svg{ width: 20px; height: 20px; display: block; }

/* Swap des icônes selon aria-pressed */
.hpa-showpw[aria-pressed="false"] .hpa-eye--on{ display: inline-block; }
.hpa-showpw[aria-pressed="false"] .hpa-eye--off{ display: none; }
.hpa-showpw[aria-pressed="true"]  .hpa-eye--on{ display: none; }
.hpa-showpw[aria-pressed="true"]  .hpa-eye--off{ display: inline-block; }

h3#hpa-modal-title {
    text-align: center;
    text-transform: uppercase;
    font-size: 23px !important;
    margin-top: 20px !important;
}
p#hpa-modal-desc {
    text-align: center;
}
p#hpa-footer-login {
    text-align: center;
}
p#hpa-footer-register {
    text-align: center;
}

#hpa-login-form input[type=text], #hpa-login-form input[type=password]{
	    color: #080f2d75 !important;
}