@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.caf-wrapper {
    font-family: 'Poppins', sans-serif;
    color: #14261C;
}

.caf-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

/* Logged-in state */
.caf-logged {
    text-align: center;
}
.caf-logged-msg {
    font-size: 16px;
    font-weight: 500;
    color: #14261C;
    margin: 0 0 28px;
}
.caf-logged .caf-btn {
    display: inline-block;
    width: auto;
    min-width: 260px;
    text-decoration: none;
}

/* Tabs */
.caf-tabs {
    display: flex;
    background: #F4F6F4;
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 32px;
}
.caf-tab {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #4E5652;
    padding: 10px 0;
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
}
.caf-tab:hover {
    color: #14261C;
}
.caf-tab.active {
    background: #FFFFFF;
    color: #06752E;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(20,38,28,0.10);
}

/* Form visibility */
.caf-form {
    display: none;
    animation: cafFadeIn 0.35s cubic-bezier(.4,0,.2,1) forwards;
}
.caf-form.active {
    display: block;
}
@keyframes cafFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Role selector */
.caf-role-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
}
.caf-role-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 2px solid #F4F6F4;
    background: #F6F7F8;
    border-radius: 14px;
    padding: 14px 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    font-family: 'Poppins', sans-serif;
    color: #4E5652;
}
.caf-role-btn svg {
    width: 26px;
    height: 26px;
    transition: stroke 0.3s cubic-bezier(.4,0,.2,1);
}
.caf-role-btn span {
    font-size: 13px;
    font-weight: 500;
}
.caf-role-btn:hover {
    border-color: rgba(27,174,112,0.35);
    color: #06752E;
    background: rgba(27,174,112,0.04);
}
.caf-role-btn.active {
    border-color: #1BAE70;
    background: linear-gradient(135deg, rgba(27,174,112,0.08), rgba(6,117,46,0.05));
    color: #06752E;
    box-shadow: 0 2px 12px rgba(27,174,112,0.18);
}
.caf-role-btn.active svg {
    stroke: #06752E;
}

/* Form groups & inputs */
.caf-group {
    margin-bottom: 18px;
}


.caf-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #14261C;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}
.caf-container .caf-group input[type="text"],
.caf-container .caf-group input[type="email"],
.caf-container .caf-group input[type="password"] {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #FFFFFF;
    border: 1.8px solid #E2E7E4;
    border-radius: 8px;
    padding: 12px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #14261C;
    transition: border-color 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s cubic-bezier(.4,0,.2,1);
    outline: none;
}
.caf-container .caf-group input[type="text"]::placeholder,
.caf-container .caf-group input[type="email"]::placeholder,
.caf-container .caf-group input[type="password"]::placeholder {
    color: #A3ADA8;
    font-weight: 400;
}
.caf-container .caf-group input[type="text"]:focus,
.caf-container .caf-group input[type="email"]:focus,
.caf-container .caf-group input[type="password"]:focus {
    border-color: #1BAE70;
    box-shadow: 0 0 0 3.5px rgba(27,174,112,0.15);
}

/* Remember row */
.caf-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    margin-top: -4px;
}
.caf-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 400;
    color: #4E5652;
    cursor: pointer;
}
.caf-remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 8px;
    height: 8px;
    border: 2px solid #D0D8D4;
    border-radius: 5px;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    position: relative;
}
.caf-remember input[type="checkbox"]:checked {
    background: #1BAE70;
    border-color: #1BAE70;
}
.caf-remember input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #FFFFFF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.caf-forgot {
    font-size: 13px;
    color: #1BAE70;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s cubic-bezier(.4,0,.2,1);
}
.caf-forgot:hover {
    color: #06752E;
    text-decoration: underline;
}

/* Password strength */
.caf-strength {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    height: 4px;
}
.caf-strength .caf-strength-bar {
    flex: 1;
    border-radius: 2px;
    background: #E2E7E4;
    transition: background 0.3s cubic-bezier(.4,0,.2,1);
}
.caf-strength.weak    .caf-strength-bar:nth-child(1)      { background: #E74C3C; }
.caf-strength.medium  .caf-strength-bar:nth-child(-n+2)   { background: #F39C12; }
.caf-strength.strong  .caf-strength-bar:nth-child(-n+3)   { background: #1BAE70; }
.caf-strength.very-strong .caf-strength-bar                { background: #06752E; }

.caf-strength-label {
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
    min-height: 16px;
    display: block;
    font-family: 'Poppins', sans-serif;
}
.caf-strength-label.weak          { color: #E74C3C; }
.caf-strength-label.medium        { color: #F39C12; }
.caf-strength-label.strong        { color: #1BAE70; }
.caf-strength-label.very-strong   { color: #06752E; }

/* Errors */
.caf-errors {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #991B1B;
    font-weight: 500;
    margin-bottom: 16px;
    display: none;
    font-family: 'Poppins', sans-serif;
    animation: cafFadeIn 0.25s ease forwards;
}
.caf-errors.visible {
    display: block;
}

/* Button */
.caf-btn {
    width: 100%;
    background: linear-gradient(135deg, #1BAE70, #06752E);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 4px 14px rgba(27,174,112,0.35);
    position: relative;
    overflow: hidden;
}

.caf-btn:hover{
	color:#ffffff!important;
}	

.caf-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}
.caf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(27,174,112,0.42);
}
.caf-btn:hover::before {
    left: 100%;
}
.caf-btn:active {
    transform: translateY(0);
}


/* CGU */
.caf-cgu {
    text-align: center;
    font-size: 12px;
    color: #4E5652;
    margin-top: 18px;
    margin-bottom: 0;
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
}
.caf-cgu a {
    color: #1BAE70;
    text-decoration: none;
    font-weight: 500;
}
.caf-cgu a:hover {
    text-decoration: underline;
    color: #06752E;
}

/* Responsive */
@media (max-width: 480px) {
    .caf-role-selector {
        gap: 8px;
    }
    .caf-role-btn {
        padding: 12px 6px;
    }
}
