/* css/register.css - COMPLÈTEMENT identique à login.css + username/RGPD */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.logo {
    text-align: center;
    margin-bottom: 35px;
}

.logo h1 {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo p {
    color: #7f8c8d;
    font-size: 15px;
    font-weight: 400;
}

.alert {
    padding: 14px 18px;
    margin-bottom: 24px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.required {
    color: #dc3545;
    font-size: 12px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    letter-spacing: 0.5px;
}

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* VALIDATION JS - TOUS LES CHAMPS */
input.is-valid {
    border-color: #28a745;
    background: #f8fff9;
}

input.is-invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

small {
    display: block;
    color: #6c757d;
    font-size: 13px;
    margin-top: 6px;
    font-style: italic;
}

.valid-feedback, .invalid-feedback {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.valid-feedback { color: #28a745; }
.invalid-feedback { color: #dc3545; }

/* CHECKBOX RGPD CORRIGÉ */
.checkbox-group {
    margin-bottom: 28px;
}

.checkbox-label {
   /* display: flex;*/   /* provoque une erreur d'affichage */
    align-items: flex-start;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    padding-left: 36px;
    min-height: 28px;
}

.checkbox-label input
{
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}


.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 20px;
    width: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;

}



.checkbox-label input:checked + .checkmark {

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    border-color: #667eea;

}



.checkbox-label input:checked + .checkmark::after 

{

    content: '✔';

    position: absolute;

    left: 2px;

    top: -4px;

    color: white;

    font-size: 14px;

    font-weight: bold;

}



.checkbox-label input:focus + .checkmark 
{

    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);

}



.checkbox-label input.is-invalid + .checkmark 
{

    border-color: #dc3545 !important;

    background: #fff5f5;

}

.rgpd-help 
{
    display: block;
    color: #6c757d;
    font-size: 13px;
    margin-top: 8px;
    font-style: italic;
}

#rgpdError 
{
    display: none;
    font-size: 12px;
    margin-top: 4px;
    color: #dc3545;
    font-weight: 500;
}

.btn 
{
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn:not(:disabled):hover 
{
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn:active {
    transform: translateY(0);
}

/* FEEDBACK BOUTON */
.btn-feedback {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-feedback.valid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.btn-feedback.invalid {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


.links {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/*PASSWORD*/
/* SUPPRIME les anciens .password-wrapper et .toggle-password */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    padding-right: 45px !important; /* IMPORTANT : force l'espace */
    box-sizing: border-box;
}

.password-toggle {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none;
    border: none;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    opacity: 0.7;
    z-index: 10 !important; /* Au-dessus de tout */
    padding: 0 !important;
}

.password-toggle:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.eye-icon {
    font-size: 16px !important;
    line-height: 1;
    display: block !important;
    transition: all 0.2s ease;
}

/* 👁 Œil ouvert (mot de passe masqué) */
.password-toggle:not([data-visible="true"]) .eye-icon::before 
{
    content: "👁";
}

/* 🙈 Œil fermé (mot de passe visible) */
.password-toggle[data-visible="true"] .eye-icon::before 
{
    content: "🙈";
}




@media (max-width: 480px) {
    .register-container {
        padding: 35px 24px;
        margin: 10px;
        border-radius: 16px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .checkbox-label {
        font-size: 13px;
        padding-left: 28px;
    }
    
    .checkmark {
        height: 18px;
        width: 18px;
    }
}
