/* 
 * Styles pour le formulaire d'inscription Akibat.fr
 * À placer dans : /wp-content/themes/votre-theme-enfant/assets/css/akibat-registration.css
 * Ce fichier est chargé automatiquement uniquement sur la page d'inscription
 */

/* === STYLES GÉNÉRAUX === */
.akibat-form-text {
    display: block;
    margin-top: 3px;
    color: #666;
    font-size: 12px;
}

.akibat-password-help {
    margin-top: 5px;
}

.akibat-password-help small {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* === SECTION CIVILITÉ === */
.akibat-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.akibat-radio-label {
    display: flex;
    align-items: center;
    font-weight: normal !important;
    cursor: pointer;
    margin: 0;
}

.akibat-radio-label input[type="radio"] {
    margin-right: 8px;
    margin-top: 0;
}

/* === INDICATEUR DE FORCE DU MOT DE PASSE === */
.akibat-password-strength {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.akibat-password-strength::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    opacity: 0.3;
}

.akibat-strength-weak {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border-color: #ffcdd2;
}

.akibat-strength-weak::before {
    width: 25%;
    background: #c62828;
}

.akibat-strength-medium {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #ef6c00;
    border-color: #ffcc02;
}

.akibat-strength-medium::before {
    width: 60%;
    background: #ef6c00;
}

.akibat-strength-strong {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-color: #c8e6c9;
}

.akibat-strength-strong::before {
    width: 100%;
    background: #2e7d32;
}

/* Indicateur détaillé de force */
.akibat-password-requirements {
    margin-top: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #dee2e6;
}

.akibat-password-requirements h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #495057;
    font-weight: 600;
}

.akibat-requirement {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
    color: #6c757d;
}

.akibat-requirement:last-child {
    margin-bottom: 0;
}

.akibat-requirement-icon {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.akibat-requirement.valid {
    color: #28a745;
}

.akibat-requirement.invalid {
    color: #dc3545;
}

/* === MESSAGES D'ERREUR === */
.akibat-error-message {
    color: #e74c3c !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    display: block;
    font-weight: 500;
    padding: 8px 12px;
    background: #ffebee;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
}

.akibat-password-mismatch,
.akibat-age-error {
    color: #e74c3c !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    display: block;
    font-weight: 500;
    padding: 8px 12px;
    background: #ffebee;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
}

/* Champs en erreur */
.akibat-error-field {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1) !important;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .akibat-radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .akibat-password-strength {
        padding: 10px 12px;
        font-size: 13px;
    }

    .akibat-password-requirements {
        padding: 10px;
    }
}

/* === ANIMATIONS === */
.akibat-password-strength,
.akibat-error-message,
.akibat-password-requirements {
    animation: akibat-fade-in 0.4s ease;
}

@keyframes akibat-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation pour les exigences */
.akibat-requirement {
    transition: all 0.3s ease;
}

.akibat-requirement.valid {
    animation: akibat-check-bounce 0.5s ease;
}

@keyframes akibat-check-bounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* === AMÉLIORATION DE L'ACCESSIBILITÉ === */
.akibat-radio-label:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Focus visible pour les champs de saisie */
.woocommerce-form-register input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* === STYLES SPÉCIFIQUES WOOCOMMERCE === */
.woocommerce-form-register .akibat-radio-group {
    margin-bottom: 0;
}

.woocommerce-form-register .form-row-first,
.woocommerce-form-register .form-row-last {
    margin-bottom: 1em;
}

/* Amélioration des labels */
.woocommerce-form-register label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.woocommerce-form-register .required {
    color: #e74c3c;
    font-weight: bold;
}

/* === STYLES POUR LA PAGE MON COMPTE === */
.woocommerce-account .akibat-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.woocommerce-account .akibat-radio-label {
    display: flex;
    align-items: center;
    font-weight: normal !important;
    cursor: pointer;
    margin: 0;
}

/* === DARK MODE SUPPORT (OPTIONNEL) === */
@media (prefers-color-scheme: dark) {
    .akibat-password-help small {
        color: #aaa;
    }

    .akibat-strength-weak {
        background: linear-gradient(135deg, #4a1a1a 0%, #6a2626 100%);
        color: #ff6b6b;
        border-color: #6a2626;
    }

    .akibat-strength-medium {
        background: linear-gradient(135deg, #4a3a1a 0%, #6a5a26 100%);
        color: #ffa726;
        border-color: #6a5a26;
    }

    .akibat-strength-strong {
        background: linear-gradient(135deg, #1a4a1a 0%, #266a26 100%);
        color: #66bb6a;
        border-color: #266a26;
    }

    .akibat-password-requirements {
        background: #2a2a2a;
        border-left-color: #555;
    }

    .akibat-password-requirements h4 {
        color: #ccc;
    }

    .akibat-form-text {
        color: #aaa;
    }
}

/* === PRINT STYLES === */
@media print {

    .akibat-password-strength,
    .akibat-password-requirements {
        display: none !important;
    }
}

/* === STYLES DE PERFORMANCE === */
.akibat-password-strength,
.akibat-error-message,
.akibat-password-requirements {
    will-change: opacity, transform;
}

/* Optimisation pour les animations sur mobile */
@media (max-width: 768px) {

    .akibat-password-strength,
    .akibat-error-message {
        animation-duration: 0.3s;
    }
}

/* === AMÉLIORATION VISUELLE === */
.woocommerce-form-register .form-row {
    margin-bottom: 1.2em;
}

.woocommerce-form-register .required {
    margin-left: 2px;
}

.woocommerce-form-register input::placeholder {
    color: #888;
    opacity: 1;
}

/* Style cohérent pour tous les inputs */
.woocommerce-form-register input[type="text"],
.woocommerce-form-register input[type="email"],
.woocommerce-form-register input[type="password"],
.woocommerce-form-register input[type="date"] {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 12px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.woocommerce-form-register input[type="text"]:focus,
.woocommerce-form-register input[type="email"]:focus,
.woocommerce-form-register input[type="password"]:focus,
.woocommerce-form-register input[type="date"]:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Style pour le bouton de soumission */
.woocommerce-form-register .button {
    background-color: #007cba;
    border-color: #007cba;
    transition: background-color 0.3s ease;
    padding: 12px 24px;
    font-weight: 600;
}

.woocommerce-form-register .button:hover {
    background-color: #005a87;
    border-color: #005a87;
}