/* Styles pour la page de checkout */
:root {
    --bleu-fonce: #104283;
    --bleu-clair: #08A1E1;
    --bleu-pastel: #84A4C5;
    --orange: #F49744;
    --blanc: #FDFDFD;
    --gris-clair: #f5f7fa;
    --gris: #6c757d;
    --noir: #212529;
}

/* ===== STRUCTURE PRINCIPALE ===== */
.formation-checkout {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 0 20px;
}

.checkout-header {
    margin-bottom: 40px;
    text-align: center;
}

.checkout-header h1 {
    color: var(--bleu-fonce);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Étapes */
.checkout-steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    position: relative;
    margin: 0 auto 40px;
    max-width: 800px;
}

.checkout-steps:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e0e0e0;
    color: #666;
    border-radius: 50%;
    font-weight: bold;
    margin-bottom: 8px;
    border: 2px solid white;
}

.step.active .step-number {
    background: var(--bleu-clair);
    color: white;
}

.step.completed .step-number {
    background: #4CAF50;
    color: white;
}

.step-title {
    display: block;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.step.active .step-title {
    color: var(--bleu-fonce);
    font-weight: 600;
}

/* Contenu principal */
.checkout-content-wrapper {
   /* display: grid; */
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

@media (max-width: 992px) {
    .checkout-content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Colonne gauche */
.checkout-left-column {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Colonne droite */
.checkout-right-column {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

/* Étapes du checkout */
.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* ===== PANIER (ÉTAPE 1) ===== */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart i {
    color: var(--bleu-pastel);
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-cart h3 {
    color: var(--bleu-fonce);
    margin-bottom: 15px;
}

.empty-cart p {
    color: var(--gris);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Récapitulatif panier */
.cart-summary {
    margin-bottom: 30px;
}

.cart-summary h3 {
    color: var(--bleu-fonce);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gris-clair);
}

.summary-items {
    margin-bottom: 25px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid var(--gris-clair);
}

.summary-item:last-child {
    border-bottom: none;
}

.item-info h4 {
    margin: 0 0 5px 0;
    color: var(--bleu-fonce);
    font-size: 1rem;
}

.item-meta {
    font-size: 0.85rem;
    color: var(--gris);
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-meta i {
    color: var(--bleu-clair);
}

.item-price {
    text-align: right;
    min-width: 100px;
}

.item-price .price {
    display: block;
    font-weight: 600;
    color: var(--bleu-fonce);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.item-price .free {
    color: #28a745;
    font-weight: 600;
}

.btn-remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-remove-item:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Totaux panier */
.summary-totals {
    background: var(--gris-clair);
    padding: 20px;
    border-radius: 8px;
    margin-top: 25px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #333;
}

.total-row.grand-total {
    border-top: 2px solid var(--bleu-clair);
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bleu-fonce);
}

.total-row .amount {
    font-weight: 600;
    color: var(--bleu-fonce);
}

/* ===== FORMULAIRE DE FACTURATION (ÉTAPE 2) ===== */
#billing-form {
    margin-bottom: 30px;
}

#billing-form h3 {
    color: var(--bleu-fonce);
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bleu-clair);
    font-size: 1.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--bleu-fonce);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--bleu-pastel);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--bleu-clair);
    box-shadow: 0 0 0 3px rgba(8, 161, 225, 0.1);
}

.terms-agreement {
    margin-top: 30px;
    padding: 20px;
    background: var(--gris-clair);
    border-radius: 8px;
}

.terms-agreement label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
    margin: 0;
}

.terms-agreement a {
    color: var(--bleu-clair);
    text-decoration: none;
    font-weight: 600;
}

.terms-agreement a:hover {
    text-decoration: underline;
}

/* ===== PAIEMENT (ÉTAPE 3) ===== */
.payment-methods {
    margin-bottom: 30px;
}

.payment-methods h3 {
    color: var(--bleu-fonce);
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bleu-clair);
    font-size: 1.3rem;
}

/* Options de paiement */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.payment-option {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.payment-option:hover {
    border-color: var(--bleu-pastel);
    background: #f9fdff;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.payment-option label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.payment-icon {
    font-size: 2rem;
    color: var(--bleu-clair);
    min-width: 40px;
    text-align: center;
}

.payment-info {
    flex: 1;
}

.payment-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--bleu-fonce);
}

.payment-info p {
    margin: 0;
    color: var(--gris);
    font-size: 0.9rem;
}

.payment-option input[type="radio"]:checked ~ label .payment-info h4 {
    color: var(--bleu-clair);
}

.payment-option input[type="radio"]:checked {
    border-color: var(--bleu-clair);
    background: #f0f7ff;
}

/* Formulaires spécifiques */
.stripe-form,
.bank-details,
.pay-later-details {
    margin-top: 20px;
    padding: 20px;
    background: var(--gris-clair);
    border-radius: 8px;
    display: none;
}

.payment-option input[type="radio"]:checked ~ .stripe-form,
.payment-option input[type="radio"]:checked ~ .bank-details,
.payment-option input[type="radio"]:checked ~ .pay-later-details {
    display: block;
}

/* Paiement en plusieurs fois */
.payment-installment {
    margin: 30px 0;
    padding: 20px;
    background: var(--gris-clair);
    border-radius: 8px;
}

.payment-installment h4 {
    color: var(--bleu-fonce);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.installment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.installment-option {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 15px;
    background: white;
    border: 2px solid var(--bleu-pastel);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.installment-option:hover {
    border-color: var(--bleu-clair);
    background: #f9fdff;
}

.installment-option input[type="radio"] {
    display: none;
}

.installment-option .option-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.option-title {
    font-weight: 600;
    color: var(--bleu-fonce);
}

.option-desc {
    font-size: 0.85rem;
    color: var(--gris);
}

.installment-option input[type="radio"]:checked + .option-content .option-title {
    color: var(--bleu-clair);
}

.installment-option input[type="radio"]:checked {
    border-color: var(--bleu-clair);
    background: #f0f7ff;
}

/* ===== RÉCAPITULATIF DE COMMANDE ===== */
.order-summary h3 {
    color: var(--bleu-fonce);
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bleu-clair);
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-review-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.order-review-table th,
.order-review-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--gris-clair);
}

.order-review-table th {
    text-align: left;
    font-weight: 500;
    color: var(--bleu-fonce);
    width: 60%;
}

.order-review-table td {
    text-align: right;
    font-weight: 500;
    color: var(--bleu-fonce);
}

.order-review-table .order-total th,
.order-review-table .order-total td {
    border-top: 2px solid var(--bleu-clair);
    font-weight: 700;
    font-size: 1.2rem;
    padding-top: 15px;
}

.amount {
    font-weight: 600;
}

.amount.free {
    color: #28a745;
}

/* Conditions générales */
.terms-and-conditions {
    margin: 25px 0;
    padding: 20px;
    background: var(--gris-clair);
    border-radius: 8px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.terms-checkbox span {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
}

.terms-checkbox a {
    color: var(--bleu-clair);
    text-decoration: none;
    font-weight: 600;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* ===== NAVIGATION ===== */
.checkout-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--gris-clair);
}

.btn-prev-step,
.btn-next-step,
.btn-confirm-payment {
    padding: 14px 30px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
}

.btn-prev-step {
    background: var(--gris-clair);
    color: var(--bleu-fonce);
    border: 1px solid var(--bleu-pastel);
}

.btn-prev-step:hover {
    background: var(--bleu-pastel);
    color: white;
}

.btn-next-step,
.btn-confirm-payment {
    background: var(--bleu-clair);
    color: white;
}

.btn-next-step:hover,
.btn-confirm-payment:hover {
    background: var(--bleu-fonce);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(8, 161, 225, 0.2);
}

@media (max-width: 768px) {
    .checkout-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-prev-step,
    .btn-next-step,
    .btn-confirm-payment {
        width: 100%;
        min-width: auto;
    }
}

/* ===== AUTHENTIFICATION ===== */
.checkout-auth-required {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: var(--bleu-fonce);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-header p {
    color: var(--gris);
    font-size: 1.1rem;
}

.cart-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Onglets authentification */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--gris-clair);
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab:hover {
    color: var(--bleu-fonce);
}

.auth-tab.active {
    color: var(--bleu-clair);
    border-bottom-color: var(--bleu-clair);
    font-weight: 600;
}

.auth-tab-content {
    margin-bottom: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.auth-form {
    padding-top: 10px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
}

.auth-form input:focus,
.auth-form select:focus {
    border-color: var(--bleu-clair);
    outline: none;
    box-shadow: 0 0 0 2px rgba(8, 161, 225, 0.1);
}

.password-input {
    position: relative;
}

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

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.password-toggle:hover {
    color: var(--bleu-clair);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #333;
}

.btn-link {
    background: none;
    border: none;
    color: var(--bleu-clair);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-size: 0.95rem;
}

.btn-link:hover {
    color: var(--bleu-fonce);
}

/* Boutons d'authentification */
.btn-login,
.btn-register {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
    background: var(--bleu-clair);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
}

.btn-login:hover,
.btn-register:hover {
    background: var(--bleu-fonce);
}

/* Messages d'erreur */
.auth-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    color: #721c24;
}

/* Loading overlay */
.checkout-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.checkout-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--bleu-pastel);
    border-top-color: var(--bleu-clair);
    border-radius: 50%;
    animation: checkout-spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes checkout-spin {
    to { transform: rotate(360deg); }
}

.checkout-loading-overlay p {
    color: var(--bleu-fonce);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .formation-checkout {
        margin: 60px auto 20px;
        padding: 0 15px;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .checkout-steps:before {
        display: none;
    }
    
    .step {
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
    }
    
    .step-number {
        margin-bottom: 0;
    }
    
    .checkout-left-column,
    .checkout-right-column {
        padding: 20px;
    }
}



/* Dashboard étudiant */
.student-dashboard-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.dashboard-header .welcome-message h1 {
    margin: 0;
    color: white;
}

.dashboard-header .welcome-message p {
    opacity: 0.9;
    margin: 5px 0 0;
}

.user-avatar img {
    border-radius: 50%;
    border: 3px solid white;
}

/* Onglets */
.dashboard-tabs .nav-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.dashboard-tabs .nav-tabs li {
    margin-right: 10px;
}

.dashboard-tabs .nav-tabs a {
    display: block;
    padding: 12px 20px;
    background: #f5f5f5;
    border-radius: 5px 5px 0 0;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-bottom: none;
    transition: all 0.3s;
}

.dashboard-tabs .nav-tabs a:hover,
.dashboard-tabs .nav-tabs li.active a {
    background: white;
    color: #0073aa;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Cartes de formations */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.course-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.course-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.course-status.active {
    background: #4CAF50;
    color: white;
}

.course-status.completed {
    background: #2196F3;
    color: white;
}

.course-content {
    padding: 20px;
}

.course-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.course-meta i {
    margin-right: 5px;
}

.course-excerpt {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.course-actions {
    display: flex;
    gap: 10px;
}

/* Tableaux */
.invoices-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.invoices-table th,
.invoices-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.invoices-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.invoices-table tr:hover {
    background: #f8f9fa;
}

/* Statut des commandes */
.order-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.order-status.completed {
    background: #d4edda;
    color: #155724;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.on_hold {
    background: #cce5ff;
    color: #004085;
}

/* Formulaires */
.profile-form .form-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.form-actions {
    text-align: right;
    margin-top: 20px;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.empty-state i {
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px;
    color: #333;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

/* Résumé des paiements */
.payments-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.summary-card h4 {
    margin: 0 0 10px;
    color: #666;
    font-size: 14px;
}

.summary-card h2 {
    margin: 0;
    color: #0073aa;
    font-size: 32px;
}

/* Liste des paiements */
.payments-list {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.payment-header h4 {
    margin: 0;
}

.payment-date {
    color: #666;
    font-size: 14px;
}

.payment-description {
    margin: 0 0 10px;
    color: #666;
}

.payment-details {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.payment-details i {
    margin-right: 5px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.on_hold {
    background: #cce5ff;
    color: #004085;
}

/* Connexion requise */
.login-required {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.login-icon {
    color: #ccc;
    margin-bottom: 20px;
}

.login-required h2 {
    margin: 0 0 10px;
    color: #333;
}

.login-required p {
    color: #666;
    margin-bottom: 30px;
}

.login-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .dashboard-tabs .nav-tabs {
        flex-wrap: wrap;
    }
    
    .dashboard-tabs .nav-tabs li {
        margin-bottom: 5px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .login-actions {
        flex-direction: column;
    }
}


/* Styles pour les options de paiement */
.payment-option {
    position: relative;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.payment-option:hover {
    border-color: #c0c0c0;
    background: #f9f9f9;
}

.payment-option.selected,
.payment-option input[type="radio"]:checked + label {
    border-color: #007cba;
    background: #f0f8ff;
    box-shadow: 0 0 0 1px #007cba;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-option label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.payment-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin-right: 15px;
}

.payment-option.selected .payment-icon,
.payment-option input[type="radio"]:checked + label .payment-icon {
    background: #007cba;
    color: white;
}

.payment-icon i {
    font-size: 24px;
}

.payment-info {
    flex: 1;
}

.payment-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.payment-option.selected .payment-info h4,
.payment-option input[type="radio"]:checked + label .payment-info h4 {
    color: #007cba;
}

.payment-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Styles pour les détails spécifiques */
.stripe-form,
.bank-details,
.pay-later-details {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #007cba;
    display: none;
}

.payment-option.selected .stripe-form,
.payment-option.selected .bank-details,
.payment-option.selected .pay-later-details,
.payment-option input[type="radio"]:checked + label ~ .stripe-form,
.payment-option input[type="radio"]:checked + label ~ .bank-details,
.payment-option input[type="radio"]:checked + label ~ .pay-later-details {
    display: block;
}

/* Style pour le bouton radio custom */
.radio-indicator {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
}

.payment-option.selected .radio-indicator,
.payment-option input[type="radio"]:checked + label .radio-indicator {
    border-color: #007cba;
}

.radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #007cba;
    border-radius: 50%;
    opacity: 0;
}

.payment-option.selected .radio-indicator::after,
.payment-option input[type="radio"]:checked + label .radio-indicator::after {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .payment-option {
        padding: 12px;
    }
    
    .payment-icon {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .payment-icon i {
        font-size: 20px;
    }
    
    .payment-info h4 {
        font-size: 15px;
    }
    
    .payment-info p {
        font-size: 13px;
    }
}























/* ============================================
   STRUCTURE PRINCIPALE
   ============================================ */

.formation-checkout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.checkout-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.checkout-header h1 {
    color: #333;
    font-size: 28px;
    margin: 0;
}

.checkout-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.checkout-left-column {
    flex: 1;
    min-width: 300px;
}

.checkout-right-column {
    width: 350px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    align-self: flex-start;
}

/* ============================================
   ÉTAPES DE NAVIGATION
   ============================================ */

.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    position: relative;
    counter-reset: step;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
}

.checkout-steps .step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
    padding: 0 10px;
}

.checkout-steps .step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: #fff;
    border: 3px solid #e0e0e0;
    border-radius: 50%;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 16px;
    color: #999;
    transition: all 0.3s ease;
}

.checkout-steps .step.active .step-number {
    background: #007cba;
    color: white;
    border-color: #007cba;
    transform: scale(1.1);
}

.checkout-steps .step-title {
    display: block;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
}

.checkout-steps .step.active .step-title {
    color: #007cba;
    font-weight: 600;
}

/* ============================================
   CONTENU DES ÉTAPES
   ============================================ */

.checkout-step {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    display: none;
}

.checkout-step h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

/* ============================================
   BOUTONS
   ============================================ */

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #005a87, #003d5c);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================
   FORMULAIRES
   ============================================ */

.auth-form input,
#billing-form input,
#billing-form select,
#billing-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
    transition: all 0.3s;
}

.auth-form input:focus,
#billing-form input:focus,
#billing-form select:focus,
#billing-form textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

.auth-form input.error-field,
#billing-form input.error-field,
#billing-form select.error-field,
#billing-form textarea.error-field {
    border-color: #dc3545;
    background: #fff8f8;
}

/* ============================================
   AUTHENTIFICATION
   ============================================ */

.checkout-auth-required {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.cart-notice {
    background: #e7f3ff;
    border-left: 4px solid #007cba;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 25px;
}

.auth-tab {
    padding: 15px 30px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.auth-tab:hover {
    color: #007cba;
}

.auth-tab.active {
    color: #007cba;
    border-bottom: 3px solid #007cba;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.auth-error-message {
    background: #fee;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

/* ============================================
   PANIER
   ============================================ */

.summary-items {
    margin-bottom: 25px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

.summary-item:hover {
    background: #f0f8ff;
    border-color: #cfe2ff;
}

.summary-item h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
    flex: 1;
}

.summary-item .price {
    font-weight: 600;
    color: #007cba;
    margin: 0 15px;
}

.btn-remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-remove-item:hover {
    background: #c82333;
}

.summary-totals {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #dee2e6;
}

.total-row.grand-total {
    border-bottom: none;
    border-top: 2px solid #dee2e6;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* ============================================
   PAIEMENT
   ============================================ */

.payment-methods {
    margin-bottom: 30px;
}

.payment-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.payment-option:hover {
    border-color: #007cba;
    background: #f8f9fa;
}

.payment-option.selected {
    border-color: #007cba;
    background: #f0f8ff;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

.payment-option input[type="radio"] {
    margin-right: 10px;
}

.payment-option label {
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin: 0;
}

.payment-option label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s;
}

.payment-option.selected label::before {
    border-color: #007cba;
    background: #007cba;
    box-shadow: inset 0 0 0 4px white;
}

.terms-and-conditions {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 30px;
}

.terms-and-conditions input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.2);
}

.terms-and-conditions label {
    font-size: 15px;
    color: #333;
    cursor: pointer;
}

/* ============================================
   RÉCAPITULATIF DE COMMANDE
   ============================================ */

.order-review h3 {
    margin-top: 0;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.order-review-table {
    overflow-x: auto;
}

.order-review-table table {
    width: 100%;
    border-collapse: collapse;
}

.order-review-table th,
.order-review-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.order-review-table th {
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
}

.order-review-table tfoot th {
    background: none;
}

.order-review-table .order-total th,
.order-review-table .order-total td {
    font-size: 18px;
    font-weight: bold;
    color: #007cba;
    border-top: 2px solid #dee2e6;
}

/* ============================================
   MESSAGES D'ERREUR
   ============================================ */

.checkout-error-message {
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 5px solid #dc3545;
    background: #fff8f8;
    animation: slideIn 0.3s ease;
}

.checkout-error-message.alert-success {
    border-left-color: #28a745;
    background: #f8fff9;
}

.checkout-error-message i {
    margin-right: 10px;
    font-size: 18px;
}

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

/* ============================================
   LOADER
   ============================================ */

.checkout-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.checkout-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.checkout-loader-overlay p {
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

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

/* ============================================
   PAGE DE CONFIRMATION
   ============================================ */

.formation-confirmation {
    text-align: center;
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.confirmation-success {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.confirmation-success i.fa-check-circle {
    font-size: 80px;
    color: #28a745;
    margin-bottom: 20px;
}

.confirmation-success h1 {
    color: #333;
    margin-bottom: 15px;
}

.confirmation-success p {
    color: #666;
    font-size: 18px;
    line-height: 1.6;
}

.confirmation-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border: 1px solid #e9ecef;
}

.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .checkout-content-wrapper {
        flex-direction: column;
    }
    
    .checkout-right-column {
        width: 100%;
    }
    
    .checkout-steps .step-title {
        font-size: 12px;
    }
    
    .step-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .step-buttons .btn {
        width: 100%;
    }
    
    .confirmation-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .confirmation-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .checkout-step {
        padding: 20px;
    }
    
    .summary-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .summary-item .price {
        margin: 10px 0;
    }
}