body {
    min-height: 95vh;
    align-items: center;
    background-color: black;
}

.btn-outline-success-mtn {
    --bs-btn-color: #ffcb05;
    --bs-btn-hover-color: #ffcb05;
    --bs-btn-focus-shadow-rgb: 25, 135, 84;
    --bs-btn-active-color: #ffcb05;
    --bs-btn-active-bg: black;
    --bs-btn-active-border-color: #198754;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #0e0d0d !important;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #ffcb05;
    --bs-gradient: none;
}

.btn-primary-mtn {
    --bs-btn-color: #fff;
    --bs-btn-bg: black;
    --bs-btn-border-color: black;
    --bs-btn-hover-color: #ffcb05;
    --bs-btn-hover-bg: #121111;
    --bs-btn-hover-border-color: black;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #ffcb05;
    --bs-btn-active-bg: #121111;
    --bs-btn-active-border-color: black;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: black;
    --bs-btn-disabled-border-color: black;
}

.body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* ── Conteneur principal : plus large ── */
.form-container {
    width: 100%;
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.hidden {
    display: none;
}

.form-box {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

/* ── Layout 2 colonnes ── */
.payment-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.payment-sidebar {
    flex: 0 0 300px;
    text-align: center;
}

.payment-main {
    flex: 1;
    min-width: 0;
}

.momo_logo {
    height: 40px;
    width: auto;
}


/* ── Image carrée avec coins légèrement arrondis ── */
.event-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid #ffcb05;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto 0.75rem;
}

.event-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.event-date-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: #fff;
    background: #1f2937;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

/* ── Grille champs côte à côte ── */
.fields-row {
    display: flex;
    gap: 0.75rem;
}

.fields-row > * {
    flex: 1;
}

/* ── Titres / labels ── */
h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.form-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.85rem;
}

.form-control,
.input-group-text {
    border-color: #d1d5db;
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    padding: 0.5rem 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.form-text {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ── Footer compact ── */
.payment-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

/* ── Carte de succès paiement ── */
.success-card {
    padding: 1.5rem 1rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    animation: successPop 0.4s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 0.25rem;
}

.success-amount {
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.success-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.success-redirect {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
}

.spin-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ── Mobile : retour en colonne ── */
@media (max-width: 640px) {
    .form-container {
        margin: 1rem auto;
        max-width: 100%;
    }

    .form-box {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .payment-layout {
        flex-direction: column;
        align-items: center;
    }

    .payment-sidebar {
        flex: unset;
        width: 100%;
    }

    .event-avatar {
        width: 140px;
        aspect-ratio: 1 / 1;
        border-radius: 10px;
    }

    .fields-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ══════════════════════════════════════════
   TICKET PAGE – layout professionnel
   ══════════════════════════════════════════ */

.ticket-page-container {
    max-width: 680px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ── En-tête tickets (liste) ── */
.tickets-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tickets-header-img {
    width: 200px;
    height: 200px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid #ffcb05;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto 0.75rem;
}

.tickets-header-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.tickets-header-sub {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ── Carte ticket ── */
.ticket-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid #e5e7eb;
}

.ticket-layout {
    display: flex;
    align-items: stretch;
}

/* ── Colonne gauche (image / QR) ── */
.ticket-left {
    flex: 0 0 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    border-right: 2px dashed #d1d5db;
    position: relative;
}

/* Encoche haut/bas sur la bordure dashed */
.ticket-left::before,
.ticket-left::after {
    content: "";
    position: absolute;
    right: -12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dee2e6; /* même fond que le body du ticket-layout */
}

.ticket-left::before {
    top: -11px;
}
.ticket-left::after {
    bottom: -11px;
}

.ticket-banner {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.75rem;
}

.ticket-qr {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: inline-block;
}

.ticket-code {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    background: #f3f4f6;
    padding: 3px 12px;
    border-radius: 6px;
}

/* ── Colonne droite (infos) ── */
.ticket-right {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ticket-status-badge {
    display: inline-block;
    width: fit-content;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 14px;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.badge-valid {
    background: #dcfce7;
    color: #166534;
}

.badge-used {
    background: #fee2e2;
    color: #991b1b;
}

.ticket-event-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.ticket-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.ticket-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ticket-detail-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.ticket-detail-value {
    font-size: 0.85rem;
    color: #1f2937;
    font-weight: 600;
}

.ticket-instruction {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #6b7280;
    background: #f9fafb;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.ticket-instruction svg {
    flex-shrink: 0;
    color: #3b82f6;
}

.btn-ticket-share {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: #25d366;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
    width: fit-content;
}

.btn-ticket-share:hover {
    background: #1da851;
    color: #fff;
    text-decoration: none;
}

/* ── Footer ticket ── */
.ticket-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .ticket-page-container {
        margin: 1rem auto;
        max-width: 100%;
    }

    .ticket-layout {
        flex-direction: column;
    }

    .ticket-left {
        flex: unset;
        border-right: none;
        border-bottom: 2px dashed #d1d5db;
        padding: 1rem;
    }

    .ticket-left::before,
    .ticket-left::after {
        display: none;
    }

    .ticket-banner {
        width: 90px;
        height: 90px;
    }

    .ticket-right {
        padding: 1rem;
    }

    .ticket-event-name {
        font-size: 1rem;
    }

    .tickets-header-img {
        width: 160px;
        height: 160px;
        border-radius: 10px;
    }
}
