/* Overlay gris semi-transparent */
#profile-overlay {
    font-family: "Grold", serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

#profile-overlay.active {
    display: block;
}

/* Panneau latéral */
#profile-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 30%;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.4s ease;
    z-index: 9999;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

#profile-panel.open {
    right: 0;
}

/* Bouton fermeture */
#profile-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    transition: transform 0.2s ease, color 0.2s ease;
}

#profile-close:hover {
    color: #e6494d;
    transform: scale(1.2);
}

/* En-tête */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-header > h2 {
    font-size: 1.8em;
    margin: 0;
}

/* Formulaire */
.profile-form {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

/* Champs */
.profile-form input[type="email"],
.profile-form input[type="password"],
.profile-form input[type="text"] {
    /*width: 80%;*/
    height: 45px;
    width: 300px;
    padding: 10px 40px 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Container champ mot de passe + icône */
.password-container {
    position: relative;
}

.toggle-password:focus {
    outline: none;
    box-shadow: none;
}

/* Bouton de login */
.login-button-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.login-btn {
    font-style: italic;
    font-weight: 800;
    background-color: #FFD500;
    color: black;
    padding: 12px;
    width: 40%;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.login-btn:hover {
    background-color: var(--primary-button-hover);
}

/* Liens bas de formulaire */
.forgot-password,
.register-link {
    color: #8000ff;
    text-align: center;
    font-size: 14px;
    text-decoration: none;
}

.forgot-password:hover,
.register-link:hover {
    text-decoration: underline;
}






.user-profile {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2933;
    padding: 24px 32px;
    box-sizing: border-box;
}

/* HEADER */

.user-profile-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
}

.user-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #c0d7df;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-profile-avatar img {
    width: 28px;
    height: auto;
    display: block;
}

.user-profile-main {
    flex: 1;
}

.user-profile-name {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.user-profile-line {
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
}

.user-profile-icon-box {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-profile-icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
}

.user-profile-icon--phone {
    transform: scale(.90);
}

.user-profile-icon--mail {
    transform: scale(0.65);
}

/* MENU */

.user-profile-menu {
    list-style: none;
    padding: 0;
    margin: 40px 0 0;
    font-weight: 600;
}

.user-profile-menu li {
    font-size: 16px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.user-profile-menu li + li {
    margin-top: 8px;
}

.user-profile-menu li a {
    display: block;
    padding: 14px 18px;
    text-decoration: none;
    color: #1f2933;
    font-weight: 600;
    background-color: #f7f7f7;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.user-profile-menu li:hover a {
    background-color: #e8e8e8;
    border-left-color: #0072c6;
    color: #0072c6;
    transform: translateX(4px);
}

.user-profile-menu li:active a {
    transform: translateX(2px);
}

.user-profile-menu li.active a {
    background-color: #e0e0e0;
    border-left-color: #0072c6;
    color: #0072c6;
    font-weight: 700;
}

/* SECTIONS BASSES */

.user-profile-section-title {
    margin: 40px 0 8px;
    font-weight: 600;
    font-size: 15px;
}

.user-profile-companies {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-profile-companies li {
    font-size: 14px;
    padding: 4px 0;
}

/* liens "Mes paiements XXX" */
.user-profile-menu .docs a {
    font-size: 13px;
    text-decoration: none;
    color: inherit;
}

.user-profile-menu .docs a:hover {
    text-decoration: underline;
}

.user-profile-logout {
    margin-top: 32px !important;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
}

.logout-btn {
    font-style: italic;
    font-weight: 800;
    background-color: #FFD500;
    color: black;
    padding: 12px 15px;
    width: 50%;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.logout-btn:hover {
    background-color: var(--primary-button-hover, #FFC700);
    transform: translateY(-2px);
}

.logout-btn:active {
    transform: translateY(0);
}