/* --- Variables de Design --- */
:root {
    --ap-blue: #0066a9;          /* Bleu officiel Afrikpay */
    --ap-blue-hover: #005288;    /* Bleu survol */
    --ap-dark: #1e1b20;          /* Noir/Gris foncé officiel */
    --ap-light-bg: #f4f7fa;      /* Fond de la page */
    --ap-border-color: #ccd4dc;  /* Bordure de l'input en état normal */
    --ap-text-main: #2d3138;     /* Titres et labels */
    --ap-text-muted: #5a6573;    /* Gris foncé pour l'accessibilité des sous-textes */
    --ap-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- Mise en page globale --- */
html, body {
    height: 100%;
    margin: 0;
}

body {
    background-color: var(--ap-light-bg);
    font-family: var(--ap-font);
    display: flex;
    align-items: center;
    justify-content: center;
}

.invoice-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
}

/* --- Structure de la carte --- */
.invoice-card {
    width: 100%;
    max-width: 440px;
    background-color:#ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(30, 27, 32, 0.06);
    overflow: hidden;
}

/* --- En-tête clair et aéré --- */
.card-header-dark {
    background-color: #E9EDF0;
    color: var(--ap-dark);
    text-align: center;
    padding: 44px 32px 12px 32px;
    border-bottom: 1px solid #f0f2f5;
}

.logo-container {
    width: 100%;
    max-width: 260px;
    margin: 0 auto 24px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    width: 100%;
    height: auto;
    max-height: 55px; /* Logo agrandi pour mieux occuper l'espace */
    object-fit: contain;
    display: block;
}

.card-header-dark h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ap-dark);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.card-header-dark p {
    font-size: 14px;
    color: var(--ap-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* --- Formulaire et Inputs "Éditables" --- */
.card-body-light {
    padding: 28px 30px 24px 30px;
}

.custom-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.custom-form-group label {
    font-size: 15px;
    font-weight: 700;
    color: var(--ap-text-main);
    margin-bottom: 10px;
}

/* État normal : fond blanc et bordure définie */
.custom-form-group input {
    background-color: #ffffff;
    border: 1px solid var(--ap-border-color);
    border-radius: 8px;
    padding: 13px 16px;
    font-size: 15px;
    color: var(--ap-dark);
    outline: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.custom-form-group input:hover {
    border-color: #a1b0be;
}

/* État Focus : bordure de la marque et halo bleu subtil */
.custom-form-group input:focus {
    border-color: var(--ap-blue);
    box-shadow: 0 0 0 4px rgba(0, 102, 169, 0.12);
}

.custom-form-group input::placeholder {
    color: #7e8b9a;
}

/* --- Textes d'aide sous l'input --- */
.custom-help-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Application d'une opacité douce à 75% pour la première phrase */
.custom-help-text {
    font-size: 12.5px;
    color: var(--ap-text-main); /* On se base sur la couleur principale */
    opacity: 0.75;              /* Baisse l'opacité globale du texte */
    line-height: 1.4;
    font-weight: 500;
}

/* Application d'une opacité encore un peu plus légère (65%) pour l'exemple */
.example-text {
    opacity: 0.75;              /* Rend l'exemple un poil plus discret */
    font-size: 12px;
}

/* --- Alignement chirurgical du Bouton --- */
.btn-invoice-submit {
    width: 100%;
    background-color: var(--ap-blue);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    gap: 12px; /* Espacement parfait icône/texte */
    
    box-shadow: 0 4px 12px rgba(0, 102, 169, 0.18);
    transition: all 0.2s ease;
}

.btn-invoice-submit:hover {
    background-color: var(--ap-blue-hover);
    box-shadow: 0 6px 16px rgba(0, 102, 169, 0.28);
}

.download-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* --- Support en gris avec Hover Bleu (Intégré dans la boîte blanche) --- */
.invoice-support {
    margin-top: 24px;
    font-size: 14px;
    color: var(--ap-text-muted); /* Texte en gris */
    text-align: center;
}

.invoice-support a {
    color: var(--ap-text-muted); /* Lien en gris par défaut */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.invoice-support a:hover {
    color: var(--ap-blue); /* Devient bleu uniquement au survol */
    text-decoration: underline;
}

/* --- Pied de page (Fermeture de la carte) --- */
.card-footer-gray {
    border-top: 1px solid #f0f2f5;
    padding: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--ap-text-muted);
    background-color: #fafbfc;
    letter-spacing: 0.2px;
}