/* =====================================================
   DON.CSS — Premium Redesign
   ===================================================== */

/* ── Variables ── */
:root {
    --don-primary: #1e3a8a;
    --don-primary-dark: #1e2d6b;
    --don-accent: #7c3aed;
    --don-accent-light: #ede9fe;
    --don-gold: #f59e0b;
    --don-gold-light: #fef3c7;
    --don-green: #10b981;
    --don-text: #1e293b;
    --don-muted: #64748b;
    --don-bg: #f8fafc;
    --don-white: #ffffff;
    --don-radius: 14px;
    --don-shadow: 0 4px 24px rgba(30,58,138,0.08);
    --don-shadow-lg: 0 20px 60px rgba(30,58,138,0.14);
}

/* Scope overrides to #don to avoid breaking the global header/nav */
#don { color: var(--don-text); background: var(--don-bg); line-height: 1.6; }
#don h2, #don h3, #don h4 { font-family: 'Outfit', 'Inter', sans-serif; }

/* ── Animation (needed for fade-up / delay-1 classes) ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.55s forwards;
}
.delay-1 { animation-delay: 0.12s; }

/* ── HERO (cotisation style) ── */
.don-hero {
    text-align: center;
    padding: 36px 24px 28px;
    max-width: 900px;
    margin: 0 auto;
}
.don-hero__title {
    font-family: 'OpenSans-Black', sans-serif;
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 900;
    color: #232340;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 14px;
}
.don-hero__accent { color: #454796; }
.don-hero__sub {
    font-size: 17px;
    color: #6b6f8a;
    max-width: 480px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.65;
}
.don-hero__logo {
    height: 56px;
    width: auto;
    margin: 0 auto 18px;
    display: block;
    /* Le fichier logo a un fond blanc opaque ; en multiply, le blanc devient
       transparent et laisse voir le fond (légèrement gris) de la page. */
    mix-blend-mode: multiply;
}


/* ── LAYOUT ── */

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.donation-wrapper {
    display: flex; flex-wrap: wrap; gap: 3rem; padding: 4.5rem 0 5rem;
}

.col-left { flex: 1; min-width: 320px; }
.col-right { flex: 0 0 460px; }

@media (max-width: 1000px) {
    .col-right { flex: 1 1 100%; }
    .donation-wrapper { flex-direction: column-reverse; gap: 2rem; }
}

/* ── SECTION TITLE ── */
.impact-section h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--don-primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}
.impact-section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--don-accent);
    border-radius: 2px;
    margin-top: 8px;
}

/* ── IMPACT CARDS ── */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.impact-card {
    background: var(--don-white);
    padding: 1.5rem;
    border-radius: var(--don-radius);
    box-shadow: var(--don-shadow);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.impact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(30,58,138,0.12);
}

.impact-icon-wrapper {
    flex-shrink: 0;
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--don-accent-light), #f0f7ff);
    color: var(--don-accent);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.impact-icon-wrapper svg { width: 24px; height: 24px; }

.impact-content h3 { font-size: 1rem; font-weight: 700; color: var(--don-primary); margin-bottom: 4px; }
.impact-content p { font-size: 0.87rem; color: var(--don-muted); margin: 0; line-height: 1.5; }

/* ── TESTIMONIAL ── */
.testimonial {
    background: var(--don-white);
    padding: 1.8rem 2rem;
    border-radius: var(--don-radius);
    border-left: 5px solid var(--don-accent);
    box-shadow: var(--don-shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.8rem;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px; left: 16px;
    font-size: 6rem;
    color: var(--don-accent-light);
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
}

.testimonial p {
    font-style: italic;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.testimonial-footer { margin-top: 1.2rem; display: flex; align-items: center; gap: 1rem; }

.avatar-circle {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--don-accent), var(--don-primary));
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
    flex-shrink: 0;
}

/* ── DONATION CARD ── */
.donation-card {
    background: var(--don-white);
    padding: 2.2rem 2rem;
    border-radius: 20px;
    box-shadow: var(--don-shadow-lg);
    border: 1px solid #e8ecf4;
    position: sticky;
    top: 2rem;
    overflow: hidden;
}

.donation-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--don-primary), var(--don-accent));
}

.form-title { font-size: 1.5rem; font-weight: 800; color: var(--don-primary); margin-bottom: 6px; }

.secure-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; color: var(--don-green); font-weight: 600;
    background: #ecfdf5; padding: 3px 10px; border-radius: 20px;
    border: 1px solid #d1fae5;
}

.form-group { margin-bottom: 1.5rem; }
.label { display: block; font-size: 0.88rem; font-weight: 700; margin-bottom: 8px; color: var(--don-text); text-transform: uppercase; letter-spacing: .04em; }

/* Frequency Switch */
.freq-switch { display: flex; background: #f1f5f9; padding: 4px; border-radius: 10px; gap: 4px; }
.freq-option { flex: 1; }
.freq-option input { display: none; }
.freq-option label {
    display: block; text-align: center; padding: 0.65rem;
    border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.88rem;
    transition: all 0.2s; color: var(--don-muted);
}
.freq-option input:checked + label {
    background: var(--don-white);
    color: var(--don-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Amount Grid */
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.amount-option input { display: none; }
.amount-option label {
    display: flex; align-items: center; justify-content: center;
    padding: 0.85rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px; cursor: pointer;
    font-weight: 700; font-size: 1rem;
    color: var(--don-text);
    transition: all 0.2s;
}
.amount-option label:hover { border-color: var(--don-accent); color: var(--don-accent); }
.amount-option input:checked + label {
    border-color: var(--don-primary);
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    color: var(--don-primary);
    box-shadow: 0 0 0 3px rgba(30,58,138,0.12);
}

.custom-input {
    width: 100%; padding: 0.85rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit; font-size: 0.95rem;
    margin-top: 0.8rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.custom-input:focus { outline: none; border-color: var(--don-primary); box-shadow: 0 0 0 3px rgba(30,58,138,0.1); }

/* Tax Box */
.tax-box {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    border: 1.5px solid #fde68a;
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    margin: 1.5rem 0;
}
.tax-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 0.9rem; color: #78350f; }
.tax-highlight {
    border-top: 1.5px solid #fcd34d;
    padding-top: 10px; margin-top: 6px;
    font-weight: 800; font-size: 1.1rem; color: var(--don-primary);
}
.tax-save { color: var(--don-green); font-weight: 700; }

/* Submit */
.btn-submit {
    display: block;
    text-align: center;
    width: 100%; padding: 1.1rem;
    border: none;
    background: linear-gradient(135deg, var(--don-primary) 0%, var(--don-accent) 100%);
    color: white;
    font-weight: 800; font-size: 1.1rem;
    border-radius: 50px; cursor: pointer;
    box-shadow: 0 8px 24px rgba(30,58,138,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.02em;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(30,58,138,0.4);
}
.btn-submit:active { transform: translateY(0); }

/* Fondation fiscal-receipt notice */
.fondation-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.fondation-notice p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--don-muted);
}
.fondation-notice strong { color: var(--don-text); }

.checkbox-group { margin-top: 1.5rem; font-size: 0.9rem; color: var(--don-muted); }
.checkbox-item { display: flex; flex-flow: row wrap; gap: 0.75rem; margin-bottom: 0.75rem; align-items: flex-start; }
.checkbox-item label { display: inline-block; margin: 0 !important; cursor: pointer; color: var(--don-text); font-weight: 500; flex: 1 1 0; min-width: 0; }
.don-required-note { display: block; font-size: 0.8rem; color: var(--don-muted); }

#don input[type="checkbox"] {
    appearance: auto;
    accent-color: var(--don-primary) !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    margin: 2px 0 0 0 !important;
    flex-shrink: 0;
    border: 1.5px solid var(--don-muted, #94a3b8);
    border-radius: 4px;
    background-color: #fff;
}

.checkbox-item .field-error-msg {
    flex-basis: 100%;
    margin-top: 0.25rem;
}

.field-error-msg {
    color: #dc2626 !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    margin-top: 0.4rem !important;
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.field-error-icon {
    width: 14px;
    height: 14px;
    color: #dc2626 !important;
    flex-shrink: 0;
}

.field-invalid {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

/* ── Mobile fixes ── */
@media (max-width: 600px) {
    /* Prevent sticky donation card from blocking content on mobile */
    .donation-card {
        position: static;
        top: auto;
    }

    /* Tighter container padding on very small phones */
    .container { padding: 0 1rem; }

    /* Donation wrapper tighter gap */
    .donation-wrapper { gap: 1.5rem; padding: 2rem 0 3rem; }

    /* Hero smaller on mobile */
    .don-hero { padding: 20px 16px 16px; }

    /* Amount grid 2-col instead of 3 */
    .amount-grid { grid-template-columns: repeat(2, 1fr); }

    /* Tax box full width */
    .tax-box { padding: 1rem; }

    /* Impact grid single column */
    .impact-grid { grid-template-columns: 1fr; }

    /* Testimonial tighter padding */
    .testimonial { padding: 1.2rem 1rem; }
}

/* ── Utilities for don/index.html.twig ── */
.testimonial-title { margin-bottom: 1.5rem; color: var(--don-primary); }
.testimonial-meta { font-size: 0.8rem; color: #94a3b8; }
.avatar-green { background: linear-gradient(135deg, #10b981, #059669); }
.avatar-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.d-none { display: none; }
.don-user-info-box { background: rgba(69, 71, 150, 0.05); padding: 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid #e8ecf4; }
.don-user-name { margin: 0; font-weight: 700; color: var(--don-text); }
.don-user-email { margin: 0.2rem 0; color: var(--don-muted); }
.don-user-address { margin: 0.8rem 0; color: var(--don-muted); font-size: 0.9rem; line-height: 1.4; }
.don-user-edit-link { font-size: 0.85rem; color: var(--don-primary); text-decoration: underline; font-weight: 600; }
.don-login-notice { font-size: 0.82rem; color: var(--don-muted); margin-bottom: 1rem; line-height: 1.4; }
.don-login-notice a { color: var(--don-primary); text-decoration: underline; font-weight: 600; }
.don-form-row { display: flex; gap: 1rem; margin-bottom: 0.8rem; }
.don-input-top { margin-top: 0; }
.don-input-spaced { margin-top: 0; margin-bottom: 0.8rem; }
.don-input-flex-1 { margin-top: 0; flex: 1; }
.don-input-flex-2 { margin-top: 0; flex: 2; }

/* ── Autocomplete Dropdown List ── */
.don-autocomplete-list {
    position: absolute;
    background: var(--don-white);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(30,58,138,0.08);
    width: 100%;
    z-index: 9999;
    margin: 4px 0 0 0;
    padding: 0;
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}
.don-autocomplete-list li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
    color: var(--don-text);
    transition: background 0.15s, color 0.15s;
}
.don-autocomplete-list li:hover,
.don-autocomplete-list li.active {
    background: #eff6ff;
    color: var(--don-primary);
}
.don-autocomplete-list li:last-child {
    border-bottom: none;
}

/* ── paiement (anciennement en style inline) ── */
body .donation-wrapper--centered {
    justify-content: center;
}

body .don-block--spaced {
    margin-bottom: 1.5rem;
}

body .don-user-info-box--spaced {
    margin-top: 1rem;
}

body .don-divider-label {
    font-size: 0.8rem;
    text-align: center;
    margin: 1.25rem 0;
    color: var(--don-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body .btn-submit--spaced {
    margin-top: 1.5rem;
}

body .don-legal-note {
    font-size: 0.8rem;
    text-align: center;
    margin-top: 1rem;
    color: var(--don-muted);
}

/* ── confirmation (anciennement en style inline) ── */
body .btn-submit--link {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 1.5rem;
}

/* ── index (anciennement en style inline) ── */
body .custom-input--native-select {
    margin-top: 0.4rem;
    appearance: auto !important;
    background-color: var(--don-white);
}

