/* --- Variables et Styles Globaux --- */
:root {
    --primary-color: #FFD700; /* Jaune vif */
    --primary-color-dark: #e6c200;
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --text-color-muted: #a0a0a0;
    --error-color: #cf6679;
    --success-color: #03dac6;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px; /* Padding de base, réduit sur mobile */
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    background-color: var(--surface-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid #333;
}

/* --- Header --- */
header {
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 20px 30px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

header p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
}

/* --- Main Content --- */
main {
    padding: 30px;
}

.payment-card {
    background-color: var(--surface-color);
}

.payment-card h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

.info-article {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #333;
}

.info-article:last-of-type {
    border-bottom: none;
    margin-bottom: 30px;
}

.info-article h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-article p {
    line-height: 1.7;
    color: var(--text-color-muted);
}

/* --- Résumé du Montant --- */
.amount-summary {
    background-color: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}

.summary-row.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--primary-color);
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* --- Boutons --- */
.action-area {
    text-align: center;
}

.pay-button {
    width: 100%;
    padding: 18px;
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none; /* Important pour les liens */
    text-align: center;
    box-sizing: border-box; /* <-- LA LIGNE AJOUTÉE POUR CORRIGER LE DÉBORDEMENT */
}

.pay-button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.button-icon {
    font-size: 1.2rem;
}

/* --- Classe utilitaire --- */
.hidden {
    display: none;
}

/* ======================================================= */
/* =============    MEDIA QUERIES (Responsive)    ============= */
/* ======================================================= */

/* Pour les écrans de tablettes et plus petits (max-width: 768px) */
@media (max-width: 768px) {
    body {
        padding: 15px; /* Un peu moins de padding sur les côtés */
    }
    
    header {
        padding: 15px 20px;
    }

    main {
        padding: 25px;
    }

    .logo-icon {
        font-size: 2.2rem; /* Légèrement plus petit */
    }

    header h1 {
        font-size: 1.6rem;
    }
}

/* Pour les petits mobiles en mode portrait (max-width: 480px) */
@media (max-width: 480px) {
    body {
        padding: 10px; /* Padding minimal */
    }

    .container {
        border-radius: 12px; /* Coins un peu moins arrondis */
    }
    
    header {
        padding: 15px;
    }

    main {
        padding: 20px;
    }

    .logo {
        flex-direction: column; /* Logo au-dessus du texte */
        gap: 5px;
    }
    
    .logo-icon {
        font-size: 2rem;
    }

    header h1 {
        font-size: 1.4rem;
    }
    
    header p {
        font-size: 0.8rem;
    }

    .payment-card h2 {
        font-size: 1.3rem;
    }

    .info-article h3 {
        font-size: 1rem;
    }

    .info-article p {
        font-size: 0.9rem;
    }

    .pay-button {
        font-size: 1rem;
        padding: 15px;
    }
}

/* Pour les très grands écrans (min-width: 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 600px; /* Le container peut être un peu plus large sur un grand écran */
    }
}
