/**
 * APRAPFEA Machine de Don — Styles Dédiés
 * Design Système Impeccable & Expérience Donateur Haut de Gamme
 *
 * @package APRAPFEA
 */

/* ==========================================================================
   1. Bannière d'Introduction & Badges
   ========================================================================== */
.don-banner-card {
    background: #ffffff;
    border: 1px solid var(--th-border-color, #e2e8f0);
    box-shadow: 0 16px 45px rgba(13, 56, 35, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.sacred-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 30px;
    background: rgba(201, 151, 56, 0.12);
    color: var(--th-theme-color2, #C99738);
    border: 1px solid rgba(201, 151, 56, 0.25);
}

.don-banner-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 16px 20px;
    border-radius: 14px;
    text-align: left;
}

.don-banner-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--th-theme-color, #0D3823);
    color: var(--th-theme-color2, #C99738);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.don-banner-stat-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--th-theme-color, #0D3823);
    line-height: 1.1;
}

.don-banner-stat-lbl {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 3px;
}

/* ==========================================================================
   2. Carte Principale : La Machine de Don
   ========================================================================== */
.don-machine-card {
    background: #ffffff;
    border: 1px solid var(--th-border-color, #e2e8f0);
    box-shadow: 0 20px 50px rgba(13, 56, 35, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.don-machine-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--th-theme-color, #0D3823) 0%, var(--th-theme-color2, #C99738) 100%);
}

.don-step-block {
    padding-bottom: 25px;
    border-bottom: 1px dashed #e2e8f0;
}

.don-step-block:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.don-step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.don-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--th-theme-color, #0D3823);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(13, 56, 35, 0.2);
}

.don-step-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--th-theme-color, #0D3823);
    margin: 0;
    line-height: 1.25;
}

/* ==========================================================================
   3. Étape 1 : Sélecteur de Fréquence
   ========================================================================== */
.don-frequency-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 575px) {
    .don-frequency-selector {
        grid-template-columns: 1fr;
    }
}

.don-freq-btn {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.don-freq-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.don-freq-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.25s ease;
}

.don-freq-btn:hover .don-freq-content {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.don-freq-btn.active .don-freq-content,
.don-freq-btn input[type="radio"]:checked + .don-freq-content {
    background: #0D3823;
    border-color: #0D3823;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(13, 56, 35, 0.18);
}

.don-freq-btn.active .don-freq-content i,
.don-freq-btn input[type="radio"]:checked + .don-freq-content i {
    color: var(--th-theme-color2, #C99738);
}

/* ==========================================================================
   4. Étape 2 : Sélecteur de Montants Prédéfinis
   ========================================================================== */
.don-amount-presets-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

@media (max-width: 991px) {
    .don-amount-presets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .don-amount-presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.don-amount-btn {
    position: relative;
    cursor: pointer;
    margin: 0;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.22s ease;
}

.don-amount-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.don-amount-val {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
    transition: color 0.22s ease;
}

.don-amount-curr {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.don-amount-btn:hover {
    border-color: var(--th-theme-color2, #C99738);
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.don-amount-btn.active,
.don-amount-btn input[type="radio"]:checked ~ .don-amount-val {
    color: #ffffff;
}

.don-amount-btn.active,
.don-amount-btn:has(input[type="radio"]:checked) {
    background: #0D3823 !important;
    border-color: #0D3823 !important;
    box-shadow: 0 8px 24px rgba(13, 56, 35, 0.22);
    transform: translateY(-3px);
}

.don-amount-btn.active .don-amount-val,
.don-amount-btn:has(input[type="radio"]:checked) .don-amount-val {
    color: #ffffff;
}

.don-amount-btn.active .don-amount-curr,
.don-amount-btn:has(input[type="radio"]:checked) .don-amount-curr {
    color: var(--th-theme-color2, #C99738);
}

/* Montant personnalisé */
.don-custom-amount-wrap {
    background: #fbfbfc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px 20px;
}

.don-custom-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.don-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.don-custom-input {
    height: 52px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 10px 80px 10px 18px;
    font-size: 17px;
    font-weight: 700;
    color: #0D3823;
    transition: all 0.25s ease;
}

.don-custom-input:focus {
    border-color: var(--th-theme-color2, #C99738);
    box-shadow: 0 0 0 4px rgba(201, 151, 56, 0.15);
    background: #ffffff;
}

.don-input-addon {
    position: absolute;
    right: 18px;
    font-weight: 800;
    font-size: 13px;
    color: #64748b;
    pointer-events: none;
}

/* ==========================================================================
   5. Étape 3 : Affectation du Don (Pôles Budgétaires)
   ========================================================================== */
.don-poles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 767px) {
    .don-poles-grid {
        grid-template-columns: 1fr;
    }
}

.don-pole-card {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.don-pole-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.don-pole-inner {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.don-pole-card:hover .don-pole-inner {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.don-pole-card.active .don-pole-inner,
.don-pole-card:has(input[type="radio"]:checked) .don-pole-inner {
    border-color: var(--th-theme-color, #0D3823);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(13, 56, 35, 0.09);
}

.don-pole-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.don-pole-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    background: rgba(201, 151, 56, 0.15);
    color: #926618;
    text-transform: uppercase;
}

.don-pole-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    position: relative;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.don-pole-card.active .don-pole-radio,
.don-pole-card:has(input[type="radio"]:checked) .don-pole-radio {
    border-color: var(--th-theme-color, #0D3823);
    background: var(--th-theme-color, #0D3823);
}

.don-pole-card.active .don-pole-radio::after,
.don-pole-card:has(input[type="radio"]:checked) .don-pole-radio::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.don-pole-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--th-theme-color, #0D3823);
    margin-bottom: 6px;
    line-height: 1.35;
}

.don-pole-desc {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 12px;
    flex-grow: 1;
}

.don-pole-target {
    font-size: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.don-pole-target strong {
    color: var(--th-theme-color2, #C99738);
    font-size: 13px;
}

/* ==========================================================================
   6. Étape 4 : Coordonnées du Donateur
   ========================================================================== */
.don-fields-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 767px) {
    .don-fields-grid-2 {
        grid-template-columns: 1fr;
    }
}

.don-field label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.don-field .form-control {
    height: 50px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    padding: 10px 16px;
    font-size: 14.5px;
    color: #0f172a;
    transition: all 0.25s ease;
}

.don-field .form-control:focus {
    background: #ffffff;
    border-color: var(--th-theme-color, #0D3823);
    box-shadow: 0 0 0 4px rgba(13, 56, 35, 0.1);
}

/* ==========================================================================
   7. Étape 5 : Moyens de Règlement
   ========================================================================== */
.don-payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 991px) {
    .don-payment-methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .don-payment-methods-grid {
        grid-template-columns: 1fr;
    }
}

.don-payment-card {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.don-payment-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.don-pay-inner {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px;
    height: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.don-pay-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.25s ease;
}

.don-pay-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
}

.don-pay-desc {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.35;
}

.don-payment-card:hover .don-pay-inner {
    border-color: #cbd5e1;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.don-payment-card.active .don-pay-inner,
.don-payment-card:has(input[type="radio"]:checked) .don-pay-inner {
    background: #ffffff;
    border-color: var(--th-theme-color, #0D3823);
    box-shadow: 0 8px 24px rgba(13, 56, 35, 0.12);
    transform: translateY(-2px);
}

.don-payment-card.active .don-pay-icon,
.don-payment-card:has(input[type="radio"]:checked) .don-pay-icon {
    transform: scale(1.1);
}

.don-instruction-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--th-theme-color2, #C99738) !important;
    font-size: 13.5px;
    line-height: 1.6;
}

/* ==========================================================================
   8. Bouton de Soumission & Alertes
   ========================================================================== */
.don-submit-button {
    font-size: 16.5px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    border-radius: 12px !important;
    transition: all 0.3s ease;
}

.don-submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(13, 56, 35, 0.25) !important;
}

.don-alert-box {
    padding: 18px 22px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
    animation: donFadeIn 0.35s ease;
}

.don-alert-box.alert-success {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #166534;
}

.don-alert-box.alert-danger {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    color: #991b1b;
}

@keyframes donFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
