/* Styles pour la page de checkout EDD */

#edd_checkout_wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* === TABLE PANIER === */
#edd_checkout_cart_wrap {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    margin-bottom: 30px;
    overflow: hidden;
}

#edd_checkout_cart {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

/* En-tête du tableau */
#edd_checkout_cart thead th {
    background: #2c3e50 !important;
    color: #ffffff !important;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 16px;
    border: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}

/* Force la couleur du texte dans l'en-tête */
#edd_checkout_cart thead th,
#edd_checkout_cart thead th * {
    color: #ffffff !important;
}

/* Lignes du panier */
#edd_checkout_cart tbody td {
    padding: 20px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: top;
}

#edd_checkout_cart tbody tr:last-child td {
    border-bottom: none;
}

/* Nom du produit */
.edd_cart_item_name {
    font-weight: 600;
    color: #2c3e50;
}

.edd_checkout_cart_item_title {
    font-size: 18px;
    display: block;
    margin-bottom: 8px;
}

/* Notice de facturation */
.eddr-cart-item-notice {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 10px 0 0 0;
    font-size: 14px;
    color: #0c5460;
}

/* Prix */
.edd_cart_item_price {
    font-size: 18px;
    font-weight: 600;
    color: #27ae60;
}

/* Bouton supprimer */
.edd_cart_remove_item_btn {
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.edd_cart_remove_item_btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Footer du tableau */
#edd_checkout_cart tfoot th {
    background: #f8f9fa;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    text-align: right;
    border-top: 2px solid #dee2e6;
}

.edd_cart_amount {
    color: #27ae60;
    font-size: 20px;
}

/* === FORMULAIRE DE CHECKOUT === */
#edd_checkout_form_wrap {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    padding: 0;
    overflow: hidden;
}

/* Fieldsets */
#edd_purchase_form fieldset {
    border: none;
    margin: 0;
    padding: 30px;
    border-bottom: 1px solid #f0f2f5;
}

#edd_purchase_form fieldset:last-child {
    border-bottom: none;
}

/* Legends */
#edd_purchase_form legend {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    padding: 15px 20px 10px 20px;
    width: calc(100% + 60px);
    margin-left: -30px;
    margin-top: -30px;
    border-bottom: 2px solid #3498db;
}

/* Couleurs différentes pour chaque section */
#edd_checkout_user_info legend {
    background: #f8fbff;
    border-bottom-color: #3498db;
}

#edd_register_account_fields legend {
    background: #f0fff4;
    border-bottom-color: #27ae60;
}

#edd_cc_fields legend {
    background: #fff5f5;
    border-bottom-color: #e74c3c;
}

/* Labels */
#edd_purchase_form label {
    display: block;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Descriptions des champs */
.edd-description {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 8px;
    font-style: italic;
}

/* Champs de saisie */
#edd_purchase_form .edd-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafbfc;
    box-sizing: border-box;
    margin-bottom: 20px;
}

#edd_purchase_form .edd-input:focus {
    outline: none;
    border-color: #3498db;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#edd_purchase_form .edd-input:hover {
    border-color: #bdc3c7;
}

/* Champs obligatoires */
#edd_purchase_form .required {
    border-left: 4px solid #e74c3c;
}

/* Indicateur obligatoire */
.edd-required-indicator {
    color: #e74c3c;
    margin-left: 4px;
}

/* Lien "Vous avez déjà un compte" */
#edd-login-account-wrap {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.edd_checkout_register_login {
    color: #2980b9;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.edd_checkout_register_login:hover {
    color: #1abc9c;
    text-decoration: underline;
}

/* Section paiement sécurisé */
#edd_secure_site_wrapper {
    background: linear-gradient(135deg, #f0fff4, #e8f5e8);
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #155724;
    font-weight: 500;
}

#edd_secure_site_wrapper .padlock {
    margin-right: 10px;
    color: #27ae60;
}

/* Stripe payment element */
#edd-stripe-payment-element {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    background: #fafbfc;
    transition: border-color 0.3s ease;
}

#edd-stripe-payment-element:focus-within {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Politique de confidentialité */
#edd-privacy-policy-agreement {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.edd_terms_links {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.edd_terms_links:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Total final */
#edd_final_total_wrap {
    background: linear-gradient(135deg, #f0fff4, #e8f5e8);
    border: 2px solid #27ae60;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    font-size: 18px;
    margin-bottom: 25px;
}

#edd_final_total_wrap .edd_cart_amount {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
}

/* Bouton d'achat */
#edd-purchase-button {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#edd-purchase-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

#edd-purchase-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Layout en 2 colonnes pour certains champs */
@media (min-width: 768px) {
    /* Prénom/Nom */
    #edd-first-name-wrap,
    #edd-last-name-wrap {
        display: inline-block;
        width: 48%;
        vertical-align: top;
    }
    
    #edd-first-name-wrap {
        margin-right: 4%;
    }
    
    /* Identifiant/Email */
    #edd-email-wrap,
    #edd-user-login-wrap {
        display: inline-block;
        width: 48%;
        vertical-align: top;
    }
    
    #edd-email-wrap {
        margin-right: 4%;
    }
    
    /* Mots de passe */
    #edd-user-pass-wrap,
    #edd-user-pass-confirm-wrap {
        display: inline-block;
        width: 48%;
        vertical-align: top;
    }
    
    #edd-user-pass-wrap {
        margin-right: 4%;
    }
}

/* Responsive mobile */
@media (max-width: 767px) {
    #edd_checkout_wrap {
        padding: 10px;
    }
    
    #edd_purchase_form fieldset {
        padding: 20px;
    }
    
    #edd_purchase_form legend {
        font-size: 18px;
        padding: 10px 15px 8px 15px;
        width: calc(100% + 40px);
        margin-left: -20px;
    }
    
    #edd_checkout_cart thead th {
        padding: 10px;
        font-size: 14px;
    }
    
    #edd_checkout_cart tbody td {
        padding: 15px 10px;
    }
    
    .edd_checkout_cart_item_title {
        font-size: 16px;
    }
}

/* Animation au chargement */
#edd_checkout_wrap {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}