/* Styles pour la page de connexion/inscription WooCommerce */

* {
    box-sizing: border-box;
}

/* Container principal */
.woocommerce {
    display: flex;
    align-items: center;
    justify-content: center;
    margin:0 auto !important;
}

/* Annuler le flex pour la page de mot de passe oublié */
body.woocommerce-lost-password .woocommerce {
    display: block !important;
    align-items: initial !important;
    justify-content: initial !important;
}

#customer_login, body.woocommerce-lost-password .entry-content .woocommerce {
    width: 100%;
    max-width: 600px;
    background: #1c1c1e;
    border-radius: 20px;
    margin-top: 2rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    backdrop-filter: blur(20px);
}

body.woocommerce-lost-password .entry-content .woocommerce {
    margin: 2rem auto 0 !important;
}

body.woocommerce-lost-password .entry-content .woocommerce .lost_reset_password {
    margin: 20px !important;
}

body.woocommerce-lost-password form .form-row {
    width: 100% !important;
}

/* Navigation des onglets - Style iOS */
.account-tabs {
    display: flex;
    background: #2c2c2e;
    margin: 20px;
    border-radius: 12px;
    padding: 0;
    position: relative;
}

.tab-button {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
    border-radius: 8px;
    text-align: center;
}

.tab-button.active {
    color: #000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tab-button:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Contenu des colonnes */
.u-column1,
.u-column2 {
    width: 100% !important;
    padding: 0 20px 20px;
    display: none;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.u-column1.active,
.u-column2.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Masquer les titres h2 originaux */
.u-column1 h2,
.u-column2 h2 {
    display: none;
}

/* Styles des formulaires */
.woocommerce-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.woocommerce-form-row {
    margin: 0 !important;
    position: relative;
}

/* Labels - Style iOS moderne */
.woocommerce-form label {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    letter-spacing: -0.01em;
}

.required {
    color: #ff9f0a;
    margin-left: 2px;
}

/* Champs de saisie - Style iOS */
.woocommerce-Input {
    width: 100%;
    padding: 16px;
    background: #2c2c2e;
    border: 1.5px solid transparent;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.woocommerce-Input:focus {
    outline: none;
    border-color: #ff9f0a;
    background: #3a3a3c;
    box-shadow: 0 0 0 4px rgba(255, 159, 10, 0.1);
}

.woocommerce-Input:hover:not(:focus) {
    background: #3a3a3c;
}

.woocommerce-Input::placeholder {
    color: #8e8e93;
}

/* Container pour le mot de passe avec bouton d'affichage */
.password-input {
    position: relative;
    display: block;
    width: 100%;
}

.password-input input {
    padding-right: 50px;
}

.show-password-input {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8e8e93;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Masquer l'icône de l'œil dans les messages d'erreur et les divs de force de mot de passe */
.woocommerce-error .show-password-input,
.woocommerce-message .show-password-input,
.woocommerce-info .show-password-input,
.woocommerce-notices-wrapper .show-password-input,
#password_strength .show-password-input,
.woocommerce-password-strength .show-password-input,
.woocommerce-password-hint .show-password-input,
.password-input > .show-password-input:not(:first-of-type) {
    display: none !important;
}

/* Garder visible uniquement le bouton dans le span.password-input */
span.password-input .show-password-input {
    display: flex !important;
}

.show-password-input:hover {
    color: #ff9f0a;
    background: rgba(255, 159, 10, 0.1);
}

.show-password-input::before {
    content: "👁";
    font-size: 16px;
}

.show-password-input.active::before {
    content: "🙈";
}

/* Checkbox "Se souvenir de moi" - Style iOS */
.woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    margin: 8px 0 !important;
    cursor: pointer;
}

.woocommerce-form__input-checkbox {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    -webkit-appearance: none;
    appearance: none;
    background: #2c2c2e;
    border: 1.5px solid #48484a;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woocommerce-form__input-checkbox:checked {
    background: #ff9f0a;
    border-color: #ff9f0a;
}

.woocommerce-form__input-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 12px;
    font-weight: bold;
}

/* Boutons principaux - Style iOS moderne */
.woocommerce-button,
.woocommerce-Button {
    background: #ff9f0a;
    color: #000;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    margin-top: 8px;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.woocommerce-button:hover,
.woocommerce-Button:hover {
    background: #ffb340;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 159, 10, 0.3);
}

.woocommerce-button:active,
.woocommerce-Button:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* Animation de chargement pour les boutons */
.woocommerce-button.loading::after,
.woocommerce-Button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lien mot de passe oublié */
.woocommerce-LostPassword {
    text-align: center;
    margin-top: 16px !important;
}

.woocommerce-LostPassword a {
    color: #8e8e93;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.woocommerce-LostPassword a:hover {
    color: #ff9f0a;
}

/* Texte informatif inscription */
.u-column2 p {
    color: #FFFFFF;
    font-size: 16px;
    line-height: 1.5;
    margin: 15px auto;
    font-weight: 500;
}

/* Politique de confidentialité */
.woocommerce-privacy-policy-text {
    font-size: 12px;
    color: #6d6d70;
    line-height: 1.4;
    margin: 20px 0 0;
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.woocommerce-privacy-policy-link {
    color: #ff9f0a;
    text-decoration: none;
    font-weight: 500;
}

.woocommerce-privacy-policy-link:hover {
    text-decoration: underline;
}

/* Messages d'erreur WooCommerce - Style iOS */
.woocommerce-notices-wrapper {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
}

.woocommerce-notices-wrapper:empty {
    display: none;
    margin: 0;
}

/* Pour la page de réinitialisation de mot de passe */
body.woocommerce-lost-password .woocommerce-notices-wrapper {
    margin: 0 auto 20px auto !important;
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
    clear: both !important;
}

body.woocommerce-lost-password .woocommerce-error,
body.woocommerce-lost-password .woocommerce-message,
body.woocommerce-lost-password .woocommerce-info {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 16px 0 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
}

body.woocommerce-lost-password .woocommerce-error {
    margin-top: 20px !important;
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    padding: 16px;
    border-radius: 12px;
    margin: 0 0 16px 0;
    border: 1px solid rgba(255, 59, 48, 0.2);
    font-size: 14px;
    font-weight: 500;
    list-style: none;
}

.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
    list-style: none;
    margin: 0;
}

ul.woocommerce-error li strong {
    display: none !important;
}

.woocommerce-message {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
    border-color: rgba(52, 199, 89, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .woocommerce {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }
    
    #customer_login {
        max-width: none;
        width: 100%;
        border-radius: 16px;
    }
    
    .u-column1,
    .u-column2 {
        padding: 24px 20px 20px;
    }
    
    .tab-button {
        padding: 14px 12px;
        font-size: 14px;
    }
    
    .woocommerce-Input {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

@media (max-width: 480px) {
    .woocommerce {
        padding: 12px;
        padding-top: 20px;
    }
    
    #customer_login {
        border-radius: 12px;
    }
    
    .u-column1,
    .u-column2 {
        padding: 20px 16px 16px;
    }
    
    .account-tabs {
        margin: 6px;
    }
    
    .tab-button {
        padding: 12px 8px;
        font-size: 13px;
    }
}

/* Améliorations d'accessibilité */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour l'accessibilité */
.tab-button:focus-visible,
.woocommerce-Input:focus-visible,
.woocommerce-button:focus-visible,
.woocommerce-Button:focus-visible {
    outline: 2px solid #ff9f0a;
    outline-offset: 2px;
}

/* Animation d'entrée pour le container principal */
#customer_login {
    animation: containerFadeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Styles spécifiques pour la page de réinitialisation de mot de passe */
body.woocommerce-lost-password .entry-header {
    display: none;
}

body.woocommerce-lost-password .woocommerce-ResetPassword {
    animation: containerFadeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.woocommerce-lost-password .woocommerce-ResetPassword p {
    color: #fff;
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    font-weight: 500;
}

body.woocommerce-lost-password .woocommerce form p:first-of-type {
    margin-bottom: 24px;
}

/* Champs de mot de passe dans le formulaire de réinitialisation */
body.woocommerce-lost-password .woocommerce-form__label {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    letter-spacing: -0.01em;
}

body.woocommerce-lost-password .password-input {
    position: relative;
}

body.woocommerce-lost-password .woocommerce-password-strength {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

body.woocommerce-lost-password .woocommerce-password-strength.short,
body.woocommerce-lost-password .woocommerce-password-strength.bad {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

body.woocommerce-lost-password .woocommerce-password-strength.good {
    background: rgba(255, 159, 10, 0.1);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.2);
}

body.woocommerce-lost-password .woocommerce-password-strength.strong {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

body.woocommerce-lost-password .woocommerce-password-hint {
    color: #8e8e93;
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.4;
}