/* Style personnalisé pour les formulaires de connexion et d'inscription WooCommerce */

/* Container principal */
.u-columns.col2-set {
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 0 1rem;
}

/* Colonnes individuelles */
.u-column1,
.u-column2 {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

/* Effet de bordure décorative */
.u-column1::before,
.u-column2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00664a, #00a676, #00664a);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Titres des sections */
.u-column1 h2,
.u-column2 h2 {
    font-size: 1.8em;
    color: #00664a;
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.u-column1 h2::after,
.u-column2 h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #00664a, #00a676);
    border-radius: 2px;
}

/* Formulaires */
.woocommerce-form-login,
.woocommerce-form-register {
    margin: 0;
}

/* Groupes de champs */
.woocommerce-form-row {
    margin-bottom: 1.5rem;
    position: relative;
}

.woocommerce-form-row--wide {
    margin-bottom: 1.8rem;
}

/* Labels */
.woocommerce-form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95em;
    transition: color 0.2s ease;
}

/* Champs de saisie */
.woocommerce-Input,
.woocommerce-Input--text,
.input-text {
    width: 100% !important;
    padding: 1rem 1.2rem !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    font-size: 1em !important;
    line-height: 1.5 !important;
    min-height: 50px !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.woocommerce-Input:focus,
.woocommerce-Input--text:focus,
.input-text:focus {
    border-color: #00664a !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 74, 0.1) !important;
    background-color: #fff !important;
    transform: translateY(-1px);
}

/* Placeholder styling */
.woocommerce-Input::placeholder,
.woocommerce-Input--text::placeholder,
.input-text::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Indicateur de champ requis */
.required {
    color: #e74c3c;
    font-weight: 600;
}

/* Case à cocher "Se souvenir de moi" */
.woocommerce-form-login__rememberme {
    display: flex !important;
    align-items: center !important;
    margin: 1.5rem 0 !important;
    padding: 0 !important;
}

.woocommerce-form-login__rememberme input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: 0.5rem !important;
    accent-color: #00664a !important;
    cursor: pointer;
}

.woocommerce-form-login__rememberme span {
    font-size: 0.95em;
    color: #6c757d;
    cursor: pointer;
    user-select: none;
}

/* Boutons */
.woocommerce-button,
.woocommerce-Button,
button[type="submit"] {
    width: 100% !important;
    padding: 1rem 2rem !important;
    background: linear-gradient(135deg, #00664a, #00a676) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1.1em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
    min-height: 55px !important;
    letter-spacing: 0.5px !important;
    position: relative;
    overflow: hidden;
}

.woocommerce-button::before,
.woocommerce-Button::before,
button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.woocommerce-button:hover::before,
.woocommerce-Button:hover::before,
button[type="submit"]:hover::before {
    left: 100%;
}

.woocommerce-button:hover,
.woocommerce-Button:hover,
button[type="submit"]:hover {
    background: linear-gradient(135deg, #004d38, #008f5f) !important;
    transform: translateY(-2px) !important;
}

.woocommerce-button:active,
.woocommerce-Button:active,
button[type="submit"]:active {
    transform: translateY(0) !important;
}

/* Lien "Mot de passe oublié" */
.woocommerce-LostPassword {
    text-align: center !important;
    margin-top: 1.5rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid #e9ecef !important;
}

.woocommerce-LostPassword a {
    color: #00664a !important;
    text-decoration: none !important;
    font-size: 0.95em !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    position: relative;
}

.woocommerce-LostPassword a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00a676;
    transition: width 0.3s ease;
}

.woocommerce-LostPassword a:hover {
    color: #00a676 !important;
}

.woocommerce-LostPassword a:hover::after {
    width: 100%;
}

/* Message pour la génération automatique de mot de passe */
.woocommerce-form-register p:not(.woocommerce-form-row) {
    background: #fff;
    padding: 1rem 1.2rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    color: #2c3e50;
    font-size: 0.95em;
    margin-bottom: 1.5rem;
    position: relative;
}

.woocommerce-form-register p:not(.woocommerce-form-row)::before {
    content: 'ℹ️';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

/* Messages d'erreur et notifications */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    padding: 1rem 1.5rem !important;
    margin-bottom: 2rem !important;
    border-radius: 8px !important;
    list-style: none !important;
    border: none !important;
    font-weight: 500 !important;
    position: relative;
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woocommerce-error {
    background: #fff !important;
    color: #dc2626 !important;
    border: 1px solid #dc2626 !important;
}

.woocommerce-error::before {
    content: '⚠️';
    margin-right: 0.5rem;
}

.woocommerce-message {
    background: #fff !important;
    color: #00664a !important;
    border: 1px solid #00664a !important;
}

.woocommerce-message::before {
    content: '✅';
    margin-right: 0.5rem;
}

.woocommerce-info {
    background: #fff !important;
    color: #d97706 !important;
    border: 1px solid #d97706 !important;
}

.woocommerce-info::before {
    content: 'ℹ️';
    margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .u-columns.col2-set {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 1rem auto;
    }
    
    .u-column1,
    .u-column2 {
        padding: 2rem 1.5rem;
    }
    
    .u-column1 h2,
    .u-column2 h2 {
        font-size: 1.6em;
    }
    
    .woocommerce-Input,
    .woocommerce-Input--text,
    .input-text {
        padding: 0.9rem 1rem !important;
        min-height: 45px !important;
    }
    
    .woocommerce-button,
    .woocommerce-Button,
    button[type="submit"] {
        padding: 0.9rem 1.5rem !important;
        min-height: 50px !important;
        font-size: 1em !important;
    }
}

@media (max-width: 480px) {
    .u-columns.col2-set {
        padding: 0 0.5rem;
    }
    
    .u-column1,
    .u-column2 {
        padding: 1.5rem 1rem;
    }
    
    .u-column1 h2,
    .u-column2 h2 {
        font-size: 1.4em;
    }
}

/* Animation d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.u-column1,
.u-column2 {
    animation: fadeInUp 0.6s ease-out;
}

.u-column2 {
    animation-delay: 0.2s;
}

/* État de chargement pour les boutons */
.woocommerce-button.loading,
.woocommerce-Button.loading,
button[type="submit"].loading {
    position: relative;
    color: transparent !important;
}

.woocommerce-button.loading::after,
.woocommerce-Button.loading::after,
button[type="submit"].loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Style pour les champs avec erreur */
.woocommerce-form-row.woocommerce-invalid label {
    color: #dc2626;
}

.woocommerce-form-row.woocommerce-invalid .woocommerce-Input,
.woocommerce-form-row.woocommerce-invalid .woocommerce-Input--text,
.woocommerce-form-row.woocommerce-invalid .input-text {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* Style pour les champs valides */
.woocommerce-form-row.woocommerce-validated .woocommerce-Input,
.woocommerce-form-row.woocommerce-validated .woocommerce-Input--text,
.woocommerce-form-row.woocommerce-validated .input-text {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Amélioration du contraste et de la lisibilité */
@media (prefers-reduced-motion: reduce) {
    .u-column1,
    .u-column2,
    .woocommerce-button,
    .woocommerce-Button,
    button[type="submit"],
    .woocommerce-Input,
    .woocommerce-Input--text,
    .input-text {
        animation: none !important;
        transition: none !important;
    }
}

#customer_login::before, #customer_login::after {
    display: none;
}

#customer_login form.login, #customer_login form.register {
    border: none !important;
    padding: 0 !important;
    
}

#customer_login form.login p, #customer_login form.register p {
    flex-direction: column !important;
}