/* ================================
   FASTPANEL - PAGE CHECKOUT
   Design harmonisé avec panier.php
   Palette signature : #4fc3f7 (cyan)
   ================================ */

/* Variables CSS — alignées avec panier-style.css */
:root {
    /* Même palette que le panier */
    --fp-blue:        #4fc3f7;
    --fp-blue-dark:   #29b6f6;
    --fp-blue-deeper: #0288d1;
    --fp-blue-glow:   rgba(79,195,247,0.35);

    --primary-900: #181a1b;
    --primary-800: #1e2022;
    --primary-700: #252829;
    --primary-600: #2d3133;
    --primary-500: rgba(255,255,255,0.15);
    --primary-400: rgba(255,255,255,0.5);
    --primary-300: rgba(255,255,255,0.65);

    --green-500: #22c55e;
    --green-400: #4ade80;
    --red-500:   #ef4444;
    --red-400:   #f87171;
    --white:     #ffffff;

    --radius-sm:   8px;
    --radius:      10px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   20px;
    --radius-full: 9999px;

    /* Legacy aliases pour compatibilité */
    --blue-600: #0288d1;
    --blue-500: #4fc3f7;
    --blue-400: #81d4fa;
    --blue-300: #b3e5fc;
}

/* ================================
   BREADCRUMB BAR (remplace l'ancien hero)
   ================================ */

.checkout-breadcrumb-bar {
    background: var(--primary-800);
    border-bottom: 1px solid rgba(255,255,255,0.09);
    padding: 13px 0;
}

/* Breadcrumb */
.checkout-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.checkout-breadcrumb span {
    color: rgba(255,255,255,0.55);
}

.checkout-breadcrumb a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-300);
    text-decoration: none;
    transition: all 0.2s ease;
}

.checkout-breadcrumb a:hover {
    color: var(--fp-blue);
}

.checkout-breadcrumb .fa-chevron-right {
    color: var(--primary-500);
    font-size: 10px;
}

/* ================================
   MAIN SECTION
   ================================ */

.checkout-main-section {
    background: var(--primary-900);
    padding: 30px 0 100px;
    position: relative;
}

/* ================================
   PAGE WRAP (layout 2 colonnes)
   ================================ */

.chk-page-wrap {
    padding-top: 32px;
}

@media (max-width: 991px) {
    .chk-page-wrap {
        padding-top: 20px;
    }
    .chk-page-wrap .col-lg-5 {
        margin-top: 0;
    }
}

@media (max-width: 575px) {
    .chk-page-wrap {
        padding-top: 12px;
    }
}

.checkout-glass-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.checkout-glass-container h2 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 24px;
    font-size: 1.375rem;
}

.checkout-glass-container h2 span {
    background: linear-gradient(135deg, var(--fp-blue) 0%, var(--fp-blue-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================
   ALERT
   ================================ */

.checkout-alert {
    background: rgba(79, 195, 247, 0.07);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-left: 4px solid var(--blue-500);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    color: var(--primary-200);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.checkout-alert i {
    color: var(--blue-400);
    font-size: 16px;
}

.checkout-alert a {
    color: var(--blue-400);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.checkout-alert a:hover {
    color: var(--blue-300);
}

/* ================================
   FORM
   ================================ */

.checkout-form-group {
    margin-bottom: 20px;
}

.checkout-form-label {
    display: block;
    color: var(--primary-200);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.checkout-form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--white);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.checkout-form-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(79, 195, 247, 0.5);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.12);
}

.checkout-form-input::placeholder {
    color: var(--primary-500);
}

/* ── Custom select dropdown ── */
.cselect-wrap {
    position: relative;
}
.cselect-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.cselect-display svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}
.cselect-wrap.open .cselect-display svg {
    transform: rotate(180deg);
}
.cselect-drop {
    background: #0b1628;
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 10px;
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.cselect-grp {
    padding: 8px 14px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fp-blue);
    opacity: 0.8;
}
.cselect-opt {
    padding: 9px 16px;
    font-size: 0.9rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: background 0.15s;
}
.cselect-opt:hover {
    background: rgba(79, 195, 247, 0.12);
    color: #fff;
}
.cselect-opt.active {
    background: rgba(79, 195, 247, 0.2);
    color: var(--fp-blue);
    font-weight: 600;
}

/* ================================
   ORDER SUMMARY
   ================================ */

.checkout-order-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--primary-200);
    font-size: 0.9375rem;
}

.checkout-order-item:last-child {
    border-bottom: none;
}

.checkout-custom-item {
    background: rgba(79, 195, 247, 0.04);
    border: 1px solid rgba(79, 195, 247, 0.12);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.checkout-custom-item h4 {
    color: var(--blue-400);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.checkout-custom-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 6px 0;
    font-size: 0.8125rem;
    color: var(--primary-400);
}

.checkout-custom-detail-value {
    font-weight: 600;
    color: var(--fp-blue);
}

.checkout-custom-total {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(79, 195, 247, 0.2);
    font-weight: 700;
    color: var(--white);
    font-size: 0.9375rem;
}

/* ================================
   TOTAL SECTION
   ================================ */

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.checkout-total-row:last-child {
    border-bottom: none;
    padding-top: 20px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-total-label {
    font-size: 0.9375rem;
    color: var(--primary-400);
    font-weight: 500;
}

.checkout-total-value {
    font-size: 1rem;
    color: var(--primary-200);
    font-weight: 600;
}

.checkout-total-row:last-child .checkout-total-label {
    font-size: 1.125rem;
    color: var(--white);
    font-weight: 700;
}

.checkout-total-row:last-child .checkout-total-value {
    font-size: clamp(1.5rem, 0.89vw + 0.95rem, 1.75rem);
    background: linear-gradient(135deg, var(--fp-blue) 0%, var(--fp-blue-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Promo row */
.checkout-total-row.promo-row .checkout-total-label {
    color: var(--fp-blue);
    font-weight: 600;
}

.checkout-total-row.promo-row .checkout-total-value {
    color: var(--fp-blue);
    font-weight: 700;
}

/* ================================
   PROMO CODE
   ================================ */

.checkout-promo-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 24px 0;
}

.checkout-promo-input {
    display: flex;
    gap: 12px;
}

.checkout-promo-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--white);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.checkout-promo-input input:focus {
    border-color: rgba(79, 195, 247, 0.5);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.12);
}

.checkout-promo-btn {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    border: none;
    border-radius: var(--radius);
    padding: 14px 24px;
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkout-promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.checkout-promo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ================================
   PAYMENT METHODS
   ================================ */

.checkout-payment-section {
    margin-top: 28px;
}

.checkout-payment-method {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkout-payment-method > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.checkout-payment-method:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(79, 195, 247, 0.25);
}

.checkout-payment-method.active {
    background: rgba(79, 195, 247, 0.09);
    border-color: rgba(79, 195, 247, 0.45);
}

.checkout-payment-method i {
    font-size: 24px;
    color: var(--blue-400);
}

.checkout-payment-method span {
    color: var(--primary-200);
    font-weight: 600;
    font-size: 1rem;
}

.checkout-payment-method .fa-chevron-right {
    font-size: 14px;
    color: var(--primary-500);
}

.checkout-submit-btn {
    width: 100%;
    background: #0288d1;
    border: none;
    border-radius: var(--radius-md);
    padding: 18px 28px;
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.2px;
}

.checkout-submit-btn:hover {
    background: #0277bd;
}

.checkout-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ================================
   ALERTS
   ================================ */

.alert {
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid;
    font-size: 0.875rem;
}

.alert p {
    margin: 0;
}

.alert-success {
    background: rgba(79,195,247,0.08);
    border-color: rgba(79,195,247,0.28);
    color: var(--fp-blue);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--red-400);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--blue-400);
}

.alert strong {
    font-weight: 700;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .checkout-breadcrumb {
        font-size: 12px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .checkout-main-section {
        padding: 20px 0 60px;
    }

    .checkout-glass-container {
        padding: 24px;
        border-radius: var(--radius-lg);
    }

    .checkout-glass-container h2 {
        font-size: 1.25rem;
    }

    .checkout-promo-input {
        flex-direction: column;
    }

    .checkout-promo-btn {
        width: 100%;
        justify-content: center;
    }
}


/* ================================
   GAMING SERVICES RECAP
   ================================ */

.checkout-gaming-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.checkout-service-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    flex-shrink: 0;
}

.checkout-specs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.spec-badge {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    font-size: 0.8rem;
    color: var(--blue-300);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.spec-badge i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.details-toggle {
    background: none;
    border: none;
    color: var(--blue-400);
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 8px 0 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    width: 100%;
    text-align: left;
}

.details-toggle:hover {
    color: var(--blue-300);
}

.details-toggle i {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.details-toggle.open i {
    transform: rotate(180deg);
}

.details-body {
    display: none;
    border-top: 1px solid rgba(79, 195, 247, 0.12);
    margin-top: 4px;
    padding-top: 8px;
}

.details-body.open {
    display: block;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 480px) {
    .checkout-hero-section {
        padding: 90px 0 40px;
    }

    .checkout-glass-container {
        padding: 20px;
    }

    .checkout-form-input {
        padding: 12px 14px;
        font-size: 0.875rem;
    }

    .checkout-custom-item {
        padding: 16px;
    }

    .checkout-custom-item h4 {
        font-size: 0.9375rem;
    }

    .checkout-custom-detail {
        font-size: 0.75rem;
    }

    .checkout-payment-method {
        padding: 14px 16px;
    }

    .checkout-payment-method i {
        font-size: 20px;
    }

    .checkout-payment-method span {
        font-size: 0.875rem;
    }

    .checkout-submit-btn {
        padding: 16px 24px;
    }
}

/* ---- Toggle switch facture groupée ---- */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 152, 0, 0.25);
    border: 1px solid rgba(255, 152, 0, 0.4);
    border-radius: 26px;
    transition: all 0.3s ease;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: #ff9800;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
    transform: translateX(24px);
}
.toggle-switch input:not(:checked) + .toggle-slider {
    background: rgba(79, 195, 247, 0.25);
    border-color: rgba(79, 195, 247, 0.3);
}
.toggle-switch input:not(:checked) + .toggle-slider::before {
    transform: translateX(0);
    background: #4fc3f7;
    box-shadow: 0 2px 6px rgba(79, 195, 247, 0.3);
}

/* ================================
   BARRE D'ÉTAPES (partagée avec panier.php)
   Les classes .cart-steps-bar/.cart-step sont définies dans
   panier-style.css — on ajoute uniquement l'état "done"
   ================================ */
.cart-steps-bar {
    background: #0a1a2e;
    padding: 6px 0 24px;
    position: relative;
    z-index: 10;
}
.cart-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 460px;
    margin: 0 auto;
    padding: 0 20px;
}
.cart-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex: 1;
    position: relative;
}
.cart-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 2px;
    background: rgba(255,255,255,0.08);
    z-index: 0;
}
.cart-step.done:not(:last-child)::after,
.cart-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, rgba(79,195,247,0.5), rgba(79,195,247,0.1));
}
.cart-step-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    position: relative; z-index: 1;
    transition: all 0.35s;
}
.cart-step.active .cart-step-icon {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    border-color: #4fc3f7;
    color: #fff;
    box-shadow: 0 0 20px rgba(79,195,247,0.45), 0 0 0 4px rgba(79,195,247,0.12);
}
.cart-step.done .cart-step-icon {
    background: rgba(79,195,247,0.15);
    border-color: rgba(79,195,247,0.5);
    color: #4fc3f7;
}
.cart-step-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}
.cart-step.active .cart-step-label { color: #4fc3f7; }
.cart-step.done .cart-step-label   { color: rgba(79,195,247,0.6); }

/* ================================
   CARTE ADRESSE ENREGISTRÉE
   ================================ */
.chk-addr-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(79,195,247,0.05);
    border: 1px solid rgba(79,195,247,0.22);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 24px;
    position: relative;
    transition: border-color 0.2s;
}
.chk-addr-card:hover { border-color: rgba(79,195,247,0.38); }

.chk-addr-card-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(79,195,247,0.12);
    border: 1px solid rgba(79,195,247,0.25);
    display: flex; align-items: center; justify-content: center;
    color: #4fc3f7;
    font-size: 15px;
    flex-shrink: 0;
}

.chk-addr-card-body { flex: 1; min-width: 0; }

.chk-addr-card-name {
    font-size: 0.93rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.chk-addr-card-line {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
}
.chk-addr-phone { margin-top: 4px; }
.chk-addr-phone i { color: #4fc3f7; margin-right: 4px; font-size: 11px; }

.chk-addr-edit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(79,195,247,0.08);
    border: 1px solid rgba(79,195,247,0.25);
    border-radius: 8px;
    color: #4fc3f7;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    align-self: center;
}
.chk-addr-edit-btn:hover {
    background: rgba(79,195,247,0.16);
    border-color: rgba(79,195,247,0.5);
}

@media (max-width: 580px) {
    .chk-addr-card { flex-wrap: wrap; }
    .chk-addr-edit-btn { width: 100%; justify-content: center; margin-top: 8px; }
    .cart-step-label { display: none; }
    .cart-steps { max-width: 180px; }
    .checkout-hero-section { padding: 100px 0 60px; }
}
