/* ===== Auth pages (connexion / inscription) ===== */

.auth{
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-aside{
    position: relative;
    background: linear-gradient(150deg, #1A0B3B 0%, #6A12B0 55%, #EC02A3 130%);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.auth-aside::after{
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -140px;
    bottom: -160px;
    background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
    border-radius: 100%;
}

.auth-aside-logo img{
    height: 54px;
    width: auto;
}

.auth-aside-content{
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.auth-aside-content h2{
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.25;
}

.auth-aside-content p{
    color: #EADCFB;
    font-size: 17px;
    margin-top: 16px;
    line-height: 1.6;
}

.auth-points{
    list-style: none;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-points li{
    color: #F3EAFE;
    font-size: 15.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-points li i{
    color: #FF7AD9;
}

.auth-aside-foot{
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.auth-main{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #fff;
}

.auth-card{
    width: 100%;
    max-width: 420px;
}

.auth-card-logo{
    display: none;
    margin-bottom: 24px;
}

.auth-card-logo img{
    height: 40px;
}

.auth-card h1{
    color: #1A1332;
    font-size: 28px;
    font-weight: 700;
}

.auth-sub{
    color: #6B6280;
    font-size: 15px;
    margin-top: 8px;
}

.auth-social{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    padding: 13px;
    border: 1.5px solid #E6E0F0;
    border-radius: 12px;
    color: #1A1332;
    font-weight: 500;
    font-size: 15px;
    transition: border-color .2s ease, background .2s ease;
}

.auth-social:hover{
    border-color: #C9B6EC;
    background: #FBF8FF;
}

.auth-social i{
    color: #EA4335;
}

.auth-divider{
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: #9A90AE;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after{
    content: "";
    flex: 1;
    height: 1px;
    background: #ECE6F4;
}

.auth-form{
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field > span{
    color: #1A1332;
    font-size: 14px;
    font-weight: 500;
}

.auth-input{
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid #E6E0F0;
    border-radius: 12px;
    padding: 0 14px;
    height: 50px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-input:focus-within{
    border-color: #8B0EF0;
    box-shadow: 0 0 0 3px rgba(139, 14, 240, 0.12);
}

.auth-input i{
    color: #A99FBF;
    font-size: 15px;
}

.auth-input input{
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    font-size: 15px;
    color: #1A1332;
    background: transparent;
}

.auth-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-check{
    align-items: center;
    gap: 8px;
    color: #5C5372;
    font-size: 14px;
    cursor: pointer;
}

.auth-check input{
    width: 16px;
    height: 16px;
    accent-color: #8B0EF0;
}

.auth-check.terms{
    align-items: flex-start;
    line-height: 1.5;
}

.auth-check.terms a{
    color: #8B0EF0;
    font-weight: 500;
}

.auth-forgot{
    color: #8B0EF0;
    font-size: 14px;
    font-weight: 500;
}

.auth-submit{
    margin-top: 6px;
    border: none;
    cursor: pointer;
    background: linear-gradient(98deg, #EC02A3 0%, #831CF8 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 15px;
    border-radius: 12px;
    transition: opacity .2s ease;
}

.auth-submit:hover{
    opacity: 0.92;
}

.auth-switch{
    text-align: center;
    margin-top: 26px;
    color: #5C5372;
    font-size: 14.5px;
}

.auth-switch a{
    color: #8B0EF0;
    font-weight: 600;
}

@media (max-width: 900px){
    .auth{
        grid-template-columns: 1fr;
    }

    .auth-aside{
        display: none;
    }

    .auth-card-logo{
        display: block;
        text-align: center;
    }

    .auth-card-logo img{
        margin: 0 auto;
    }

    .auth-card h1{
        text-align: center;
    }

    .auth-sub{
        text-align: center;
    }
}

/* ===== Flash messages ===== */

.flash{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 14.5px;
    margin: 20px 0;
    line-height: 1.5;
    transition: opacity .4s ease, transform .4s ease;
}

.flash.flash-hide{
    opacity: 0;
    transform: translateY(-8px);
}

.flash ul{
    margin: 0;
    padding-left: 18px;
}

.flash-alert{
    background: #FDECF3;
    color: #B3034F;
    border: 1px solid #F6C9DB;
}

.flash-notice{
    background: #EAF8EF;
    color: #1B7A45;
    border: 1px solid #BFE6CE;
}

/* ===== Logout button (nav) ===== */

.logout-btn{
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
}

.buttons form{
    margin: 0;
}

/* ===== Notice pages (email sent / resend) ===== */

.notice-page{
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(120% 120% at 50% 0%, #F6F0FD 0%, #FFFFFF 60%);
}

.notice-card{
    width: 100%;
    max-width: 480px;
    background: #fff;
    border: 1px solid #EFEAF6;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(131, 28, 248, 0.10);
    padding: 44px 40px;
    text-align: center;
}

.notice-logo{
    display: inline-block;
    margin-bottom: 26px;
}

.notice-logo img{
    height: 38px;
}

.notice-icon{
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    border-radius: 100%;
    background: linear-gradient(135deg, #F4F1FD, #FDF0F9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-icon i{
    font-size: 32px;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.notice-card h1{
    color: #1A1332;
    font-size: 26px;
    font-weight: 700;
}

.notice-card > p{
    color: #5C5372;
    font-size: 15.5px;
    line-height: 1.6;
    margin-top: 12px;
}

.notice-hint{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #F6F2FC;
    color: #6B6280;
    font-size: 13.5px;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 24px 0;
}

.notice-actions{
    margin-top: 8px;
}

.notice-actions .auth-submit{
    width: 100%;
}


/* Choix du profil à l'inscription (individuel / équipe) */
.auth-profile{ border: none; padding: 0; margin: 0; }
.auth-profile[hidden]{ display: none; }
.auth-profile legend{
    color: #1A1332; font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 12px;
}
.auth-profile-cards{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.auth-profile-card{
    position: relative;
    display: flex; flex-direction: column; gap: 5px;
    border: 1.5px solid #E6E0F0; border-radius: 14px;
    padding: 18px 16px; cursor: pointer; background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .12s ease;
}
.auth-profile-card:hover{ border-color: #B98BF0; transform: translateY(-1px); }
.auth-profile-card input{ position: absolute; opacity: 0; pointer-events: none; }

/* Pastille de sélection (coin haut-droit) */
.auth-profile-card::after{
    content: "";
    position: absolute; top: 14px; right: 14px;
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid #D9CEEC;
    transition: border-color .2s ease, background .2s ease;
}

.auth-profile-card i{
    font-size: 22px; color: #831CF8;
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: #F4EEFE; margin-bottom: 4px;
    transition: background .2s ease, color .2s ease;
}
.auth-profile-card strong{ font-size: 15px; color: #1A1332; }
.auth-profile-card span{ font-size: 12.5px; color: #9A90AE; line-height: 1.45; }

/* État sélectionné : CSS natif (:has) + repli via la classe JS .is-selected */
.auth-profile-card.is-selected,
.auth-profile-card:has(input:checked){
    border-color: #8B0EF0; background: #FBF5FF;
    box-shadow: 0 0 0 3px rgba(139, 14, 240, 0.12);
}
.auth-profile-card.is-selected i,
.auth-profile-card:has(input:checked) i{
    background: linear-gradient(135deg, #EC02A3, #831CF8); color: #fff;
}
.auth-profile-card.is-selected::after,
.auth-profile-card:has(input:checked)::after{
    border-color: #8B0EF0;
    background: #8B0EF0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.auth-profile-card:focus-within{
    border-color: #8B0EF0; box-shadow: 0 0 0 3px rgba(139, 14, 240, 0.18);
}

/* Bandeau de récap une fois le profil choisi */
.auth-profile-recap{
    display: flex; align-items: center; gap: 10px;
    background: #FBF5FF; border: 1px solid #ECE0FB; border-radius: 12px;
    padding: 10px 14px;
}
.auth-profile-recap-label{
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #9A90AE;
}
.auth-profile-recap strong{ font-size: 14px; color: #1A1332; }
.auth-profile-change{
    margin-left: auto; background: none; border: none; cursor: pointer;
    color: #8B0EF0; font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
}
.auth-profile-change:hover{ text-decoration: underline; }
.auth-profile-change i{ font-size: 11px; }

.auth-profile-fields{ display: flex; flex-direction: column; gap: 18px; }
.auth-profile-fields[hidden]{ display: none; }
.auth-field[hidden]{ display: none; }

@media (max-width: 420px){ .auth-profile-cards{ grid-template-columns: 1fr; } }

/* Bannière d'invitation (inscription / connexion via un lien d'équipe) */
.auth-invite-banner{
    display: flex; align-items: center; gap: 14px;
    background: #FBF5FF; border: 1px solid #ECE0FB; border-radius: 14px;
    padding: 14px 16px; margin-bottom: 4px;
}
.auth-invite-banner > i{
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #EC02A3, #831CF8); color: #fff; font-size: 18px;
}
.auth-invite-banner div{ display: flex; flex-direction: column; gap: 2px; }
.auth-invite-banner strong{ font-size: 14.5px; color: #1A1332; }
.auth-invite-banner span{ font-size: 12.5px; color: #9A90AE; line-height: 1.4; }
