/* ================================================
   Formation Web Dev - Page Styles
   Uses portfolio design system variables
   ================================================ */

/* ---- Hero Section ---- */
.formation-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding: 12rem 9% 6rem;
    min-height: 100vh;
}

.formation-hero-content {
    flex: 1;
    max-width: 55rem;
}

.formation-hero-content .badge {
    display: inline-block;
    padding: 0.6rem 1.6rem;
    background: rgba(0, 171, 240, 0.15);
    border: 1px solid rgba(0, 171, 240, 0.3);
    border-radius: 2rem;
    font-size: 1.4rem;
    color: var(--main-color);
    margin-bottom: 2rem;
    letter-spacing: 0.05rem;
}

.formation-hero-content h1 {
    font-size: 4.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.formation-hero-content h1 span {
    color: var(--main-color);
}

.formation-hero-content .subtitle {
    font-size: 1.6rem;
    line-height: 1.8;
    color: rgba(237, 237, 237, 0.8);
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 3.5rem;
}

.hero-stats .stat {
    text-align: center;
}

.hero-stats .stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--main-color);
}

.hero-stats .stat-label {
    font-size: 1.3rem;
    color: rgba(237, 237, 237, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.cta-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.4rem 3.5rem;
    background: var(--main-color);
    color: var(--bg-color);
    font-size: 1.7rem;
    font-weight: 600;
    border-radius: 0.8rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid var(--main-color);
}

.cta-main:hover {
    background: transparent;
    color: var(--main-color);
}

/* Code Window Visual */
.formation-hero-visual {
    flex: 1;
    max-width: 50rem;
}

.code-window {
    background: #0d2137;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 171, 240, 0.15);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 1.6rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header .dot {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.code-title {
    margin-left: 1rem;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.5);
}

.code-body {
    padding: 2rem;
    font-size: 1.4rem;
    line-height: 1.9;
    overflow-x: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    margin: 0;
}

.code-body .tag {
    color: #e06c75;
}

.code-body .attr {
    color: #d19a66;
}

.code-body .val {
    color: #98c379;
}

.code-body .text {
    color: #abb2bf;
}


/* ---- Modules Section ---- */
.formation-modules {
    padding: 8rem 9%;
    background: var(--second-bg-color);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32rem, 1fr));
    gap: 2.5rem;
    margin: 0 auto;
    margin-top: 2rem;
    max-width: 1350px;
}

.module-card {
    background: rgba(8, 27, 41, 0.6);
    border: 1px solid rgba(0, 171, 240, 0.15);
    border-radius: 1.2rem;
    padding: 3rem 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(0, 171, 240, 0.05);
    transition: 0.5s;
}

.module-card:hover::before {
    width: 100%;
}

.module-card:hover {
    border-color: var(--main-color);
    transform: translateY(-5px);
}

.module-icon {
    width: 5.5rem;
    height: 5.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 171, 240, 0.1);
    border-radius: 1rem;
    margin-bottom: 2rem;
    font-size: 2.8rem;
    color: var(--main-color);
}

.module-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.module-card p {
    font-size: 1.4rem;
    line-height: 1.7;
    color: rgba(237, 237, 237, 0.7);
}


/* ---- Pricing Section ---- */
.formation-pricing {
    padding: 8rem 9%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    border-radius: 0.8rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    max-width: 50rem;
    width: 100%;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.alert-error i {
    font-size: 2rem;
    color: #ef4444;
}

.pricing-card {
    background: linear-gradient(135deg, rgba(0, 171, 240, 0.08), rgba(8, 27, 41, 0.9));
    border: 2px solid rgba(0, 171, 240, 0.3);
    border-radius: 2rem;
    padding: 4rem 3.5rem;
    max-width: 48rem;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 171, 240, 0.05) 0%, transparent 70%);
    animation: pricingGlow 6s ease-in-out infinite;
}

@keyframes pricingGlow {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(5%, 5%);
    }
}

.pricing-header {
    position: relative;
    margin-bottom: 2.5rem;
}

.pricing-header h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.price .amount {
    font-size: 5rem;
    font-weight: 800;
    color: var(--main-color);
    line-height: 1;
}

.price .currency {
    font-size: 2rem;
    font-weight: 600;
    color: var(--main-color);
    opacity: 0.8;
}

.price-note {
    font-size: 1.3rem;
    color: rgba(237, 237, 237, 0.5);
    margin-top: 0.8rem;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2.5rem;
    position: relative;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    font-size: 1.5rem;
    color: rgba(237, 237, 237, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    font-size: 1.8rem;
    color: #27c93f;
}

/* Purchase Form */
.purchase-form {
    position: relative;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 1.3rem;
    color: rgba(237, 237, 237, 0.7);
    margin-bottom: 0.6rem;
}

.form-group input {
    width: 100%;
    padding: 1.3rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 171, 240, 0.2);
    border-radius: 0.8rem;
    color: var(--text-color);
    font-size: 1.5rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--main-color);
    outline: none;
}

.form-group input::placeholder {
    color: rgba(237, 237, 237, 0.4);
}

.btn-purchase {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1.4rem 2rem;
    background: linear-gradient(135deg, #ff6600, #ff8533);
    border: none;
    border-radius: 0.8rem;
    color: #fff;
    font-size: 1.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-purchase:hover {
    background: linear-gradient(135deg, #ff8533, #ff6600);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 102, 0, 0.3);
}

.btn-purchase i {
    font-size: 2rem;
    color: #fff;
}

.payment-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: rgba(237, 237, 237, 0.5);
}

.payment-badge span {
    color: rgba(237, 237, 237, 0.5);
}

/* Already purchased section */
.access-section {
    margin-top: 4rem;
    text-align: center;
    max-width: 48rem;
    width: 100%;
}

.access-section p {
    font-size: 1.5rem;
    color: rgba(237, 237, 237, 0.6);
    margin-bottom: 1.5rem;
}

.access-form {
    display: flex;
    gap: 1rem;
}

.access-form input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 171, 240, 0.2);
    border-radius: 0.8rem;
    color: var(--text-color);
    font-size: 1.4rem;
}

.access-form input::placeholder {
    color: rgba(237, 237, 237, 0.4);
}

.access-form input:focus {
    border-color: var(--main-color);
    outline: none;
}

.btn-access {
    padding: 1.2rem 2rem;
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 0.8rem;
    color: var(--main-color);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-access:hover {
    background: var(--main-color);
    color: var(--bg-color);
}


/* ---- Payment Status Page ---- */
.payment-status {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 12rem 9% 6rem;
}

.status-card {
    text-align: center;
    max-width: 45rem;
    padding: 4rem;
    background: rgba(0, 171, 240, 0.05);
    border: 1px solid rgba(0, 171, 240, 0.15);
    border-radius: 2rem;
}

.status-icon {
    font-size: 7rem;
    margin-bottom: 2rem;
}

.status-icon.text-success {
    color: #27c93f;
}

.status-icon.text-error {
    color: #ef4444;
}

.status-icon.text-warning {
    color: #ffbd2e;
}

.status-card h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.status-message {
    font-size: 1.6rem;
    color: rgba(237, 237, 237, 0.7);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.status-hint {
    font-size: 1.3rem;
    color: rgba(237, 237, 237, 0.4);
    font-style: italic;
}

.order-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.order-info small {
    font-size: 1.2rem;
    color: rgba(237, 237, 237, 0.3);
}


/* ---- Confirmation / Course Hero ---- */
.cours-hero {
    min-height: 360px;
    padding: 12rem 9% 4rem;
    text-align: center;
}

.cours-welcome .badge {
    display: inline-block;
    padding: 0.6rem 1.6rem;
    background: rgba(0, 171, 240, 0.15);
    border: 1px solid rgba(0, 171, 240, 0.3);
    border-radius: 2rem;
    font-size: 1.4rem;
    color: var(--main-color);
    margin-bottom: 2rem;
}

.cours-welcome h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.cours-welcome h1 span {
    color: var(--main-color);
}

.cours-welcome p {
    font-size: 1.5rem;
    color: rgba(237, 237, 237, 0.6);
}

.cours-welcome strong {
    color: var(--main-color);
}

/* ---- Confirmation Page ---- */
.cours-content {
    padding: 4rem 9% 8rem;
    max-width: 70rem;
    margin: 0 auto;
}

.confirmation-card {
    background: rgba(0, 171, 240, 0.05);
    border: 1px solid rgba(0, 171, 240, 0.15);
    border-radius: 2rem;
    padding: 4rem 3.5rem;
    text-align: center;
}

.confirmation-icon {
    margin-bottom: 2rem;
}

.confirmation-card h2 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.confirmation-text {
    font-size: 1.6rem;
    line-height: 1.7;
    color: rgba(237, 237, 237, 0.7);
    margin-bottom: 3rem;
}

.order-summary {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 1.2rem;
    padding: 2.5rem;
    margin-bottom: 3rem;
    text-align: left;
}

.order-summary h3 {
    font-size: 1.8rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

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

.summary-table td {
    padding: 1rem 0;
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(237, 237, 237, 0.8);
}

.summary-table tr:last-child td {
    border-bottom: none;
}

.summary-table td:first-child {
    color: rgba(237, 237, 237, 0.5);
    width: 40%;
}

.books-list {
    text-align: left;
    margin-bottom: 3rem;
}

.books-list h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.book-items {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.book-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.8rem;
    transition: background 0.2s;
}

.book-item:hover {
    background: rgba(0, 171, 240, 0.08);
}

.book-item i {
    font-size: 2.2rem;
    color: var(--main-color);
    min-width: 3rem;
    text-align: center;
}

.book-item span {
    font-size: 1.4rem;
    color: rgba(237, 237, 237, 0.8);
}

.confirmation-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.5rem 2rem;
    background: rgba(39, 201, 63, 0.08);
    border: 1px solid rgba(39, 201, 63, 0.2);
    border-radius: 0.8rem;
    font-size: 1.3rem;
    color: rgba(237, 237, 237, 0.7);
}

.confirmation-note i {
    font-size: 2rem;
    color: #27c93f;
}


/* ---- Account Stats ---- */
.account-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
}

.account-stat {
    text-align: center;
}

.account-stat-number {
    display: block;
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--main-color);
    line-height: 1.2;
}

.account-stat-label {
    font-size: 1.3rem;
    color: rgba(237, 237, 237, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

/* ---- Re-buy Section ---- */
.rebuy-section {
    text-align: center;
    margin-bottom: 4rem;
}

.rebuy-form .btn-purchase {
    display: inline-flex;
    padding: 1.4rem 3.5rem;
    font-size: 1.7rem;
    width: auto;
}

/* ---- Purchase Timeline ---- */
.purchase-timeline {
    margin-bottom: 4rem;
}

.purchase-timeline h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 2.5rem;
}

.purchase-timeline h2 i {
    font-size: 2.4rem;
    color: var(--main-color);
}

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 1.1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 171, 240, 0.15);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -3rem;
    top: 1.5rem;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    z-index: 2;
    background: var(--bg-color);
    border: 2px solid rgba(0, 171, 240, 0.3);
    color: var(--main-color);
}

.timeline-item.status-paid .timeline-dot {
    border-color: #27c93f;
    color: #27c93f;
}

.timeline-item.status-failed .timeline-dot,
.timeline-item.status-cancelled .timeline-dot {
    border-color: #ef4444;
    color: #ef4444;
}

.timeline-item.status-pending .timeline-dot {
    border-color: #ffbd2e;
    color: #ffbd2e;
}

.timeline-card {
    background: rgba(0, 171, 240, 0.04);
    border: 1px solid rgba(0, 171, 240, 0.12);
    border-radius: 1rem;
    padding: 1.8rem 2rem;
    transition: border-color 0.3s;
}

.timeline-card:hover {
    border-color: rgba(0, 171, 240, 0.3);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-date {
    font-size: 1.3rem;
    color: rgba(237, 237, 237, 0.5);
}

.timeline-status {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.3rem 1rem;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.timeline-status.status-paid {
    background: rgba(39, 201, 63, 0.12);
    color: #27c93f;
}

.timeline-status.status-pending {
    background: rgba(255, 189, 46, 0.12);
    color: #ffbd2e;
}

.timeline-status.status-failed,
.timeline-status.status-cancelled {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.timeline-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-product {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.timeline-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--main-color);
}

.timeline-footer {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.timeline-ref,
.timeline-txn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.2rem;
    color: rgba(237, 237, 237, 0.35);
    font-family: monospace;
}

.timeline-ref i,
.timeline-txn i {
    font-size: 1.3rem;
}


/* ---- Responsive ---- */
@media (max-width: 991px) {
    .formation-hero {
        flex-direction: column;
        text-align: center;
        padding: 10rem 4% 4rem;
    }

    .formation-hero-content {
        max-width: 100%;
    }

    .hero-stats {
        justify-content: center;
    }

    .formation-hero-visual {
        max-width: 100%;
    }

    .formation-modules {
        padding: 6rem 4%;
    }

    .formation-pricing {
        padding: 6rem 4%;
    }

    .cours-content {
        padding: 4rem 4% 8rem;
    }
}

@media (max-width: 575px) {
    .formation-hero-content h1 {
        font-size: 3.2rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .access-form {
        flex-direction: column;
    }

    .price .amount {
        font-size: 4rem;
    }

    .module-header {
        padding: 1.5rem 1.8rem;
    }

    .module-header h3 {
        font-size: 1.5rem;
    }

    .account-stats {
        gap: 2rem;
    }

    .timeline-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
}