/**
 * Donation Form Styles
 * 
 * Reproduction fidèle de festival-registration.css
 * Mêmes variables, mêmes valeurs, mêmes patterns (préfixe donform-)
 */

/* ============================================
   FONTS & VARIABLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --donform-font-title: 'Cinzel', serif;
    --donform-font-body: 'Montserrat', sans-serif;
    --donform-primary: #1a1a2e;
    --donform-secondary: #b22a26;
    --donform-accent: #8b7355;
    --donform-light: #f8f6f3;
    --donform-white: #ffffff;
    --donform-text: #333333;
    --donform-text-light: #666666;
    --donform-border: #e0dcd5;
    --donform-success: #2e7d32;
    --donform-error: #c62828;
    --donform-warning: #f57c00;
    --donform-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --donform-radius: 8px;
    --donform-transition: all 0.3s ease;
}

/* ============================================
   WRAPPER & FORM
   ============================================ */

.donform-wrapper {
    font-family: var(--donform-font-body);
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.donform-form {
    background: var(--donform-white);
    border-radius: var(--donform-radius);
    box-shadow: var(--donform-shadow);
    overflow: hidden;
}

/* ============================================
   MESSAGES
   ============================================ */

.donform-message {
    padding: 40px 40px;
    border-radius: var(--donform-radius);
    text-align: center;
    margin-bottom: 30px;
}

.donform-message--success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid var(--donform-success);
}

.donform-message--success .donform-message-icon {
    width: 70px;
    height: 70px;
    background: var(--donform-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2em;
    color: white;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.donform-message--success h3 {
    color: var(--donform-success);
    font-family: var(--donform-font-title);
    font-size: 1.6em;
    margin: 0 0 15px 0;
}

.donform-message--success p {
    color: #1b5e20;
    margin: 10px 0;
    line-height: 1.6;
}

.donform-message--error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 2px solid var(--donform-error);
    color: var(--donform-error);
}

.donform-message--error .donform-message-icon {
    width: 70px;
    height: 70px;
    background: var(--donform-error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2em;
    color: white;
}

.donform-message--error strong {
    font-family: var(--donform-font-title);
    font-size: 1.4em;
}

.donform-message--error p {
    margin: 10px 0;
    line-height: 1.6;
}

/* ============================================
   SECTIONS
   ============================================ */

.donform-section {
    padding: 30px 40px;
    border-bottom: 1px solid var(--donform-border);
}

.donform-section:last-child {
    border-bottom: none;
}

.donform-section-title {
    font-family: var(--donform-font-title);
    font-size: 1.4em;
    font-weight: 600;
    color: var(--donform-primary);
    margin: 0 0 10px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--donform-secondary);
    display: inline-block;
}

.donform-section-subtitle {
    color: var(--donform-text-light);
    font-style: italic;
    margin: 0 0 20px 0;
}

.donform-subsection {
    background: var(--donform-light);
    padding: 25px;
    border-radius: var(--donform-radius);
    margin: 20px 0;
}

.donform-subsection-title {
    font-family: var(--donform-font-title);
    font-size: 1.1em;
    font-weight: 500;
    color: var(--donform-primary);
    margin: 0 0 15px 0;
}

/* ============================================
   ROWS & FIELDS
   ============================================ */

.donform-row {
    margin-bottom: 20px;
}

.donform-row:last-child {
    margin-bottom: 0;
}

.donform-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .donform-row-2 {
        grid-template-columns: 1fr;
    }
}

.donform-field {
    display: flex;
    flex-direction: column;
}

.donform-label {
    font-weight: 500;
    color: var(--donform-text);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.donform-label .required,
.donform-required {
    color: var(--donform-error);
    font-weight: 700;
}

/* ============================================
   INPUTS
   ============================================ */

.donform-input,
.donform-select,
.donform-textarea {
    font-family: var(--donform-font-body);
    font-size: 1em;
    padding: 12px 16px;
    border: 2px solid var(--donform-border);
    border-radius: var(--donform-radius);
    background: var(--donform-white);
    color: var(--donform-text);
    transition: var(--donform-transition);
    width: 100%;
    box-sizing: border-box;
}


.donform-input:focus,
.donform-select:focus,
.donform-textarea:focus {
    outline: none;
    border-color: var(--donform-secondary);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.donform-input::placeholder,
.donform-textarea::placeholder {
    color: #aaa;
}

.donform-textarea {
    resize: vertical;
    min-height: 100px;
}

.donform-hint {
    font-size: 0.85em;
    color: var(--donform-text-light);
    margin-top: 6px;
}

/* Fallback: inputs sans classe explicite dans .donform-field */
.donform-field input[type="text"],
.donform-field input[type="email"],
.donform-field input[type="tel"],
.donform-field input[type="number"],
.donform-field textarea {
    font-family: var(--donform-font-body);
    font-size: 1em;
    padding: 12px 16px;
    border: 2px solid var(--donform-border);
    border-radius: var(--donform-radius);
    background: var(--donform-white);
    color: var(--donform-text);
    transition: var(--donform-transition);
    width: 100%;
    box-sizing: border-box;
}

.donform-field input[type="text"]:focus,
.donform-field input[type="email"]:focus,
.donform-field input[type="tel"]:focus,
.donform-field input[type="number"]:focus,
.donform-field textarea:focus {
    outline: none;
    border-color: var(--donform-secondary);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.donform-field input::placeholder,
.donform-field textarea::placeholder {
    color: #aaa;
}

.donform-field textarea {
    resize: vertical;
    min-height: 100px;
}

.donform-field label {
    font-weight: 500;
    color: var(--donform-text);
    margin-bottom: 8px;
    font-size: 0.95em;
}

/* Error state */
.donform-input-error {
    border-color: var(--donform-error) !important;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1) !important;
}

/* Error message */
.donform-error {
    display: none;
    font-size: 0.85em;
    color: var(--donform-error);
    margin-top: 6px;
    font-weight: 500;
}

/* ============================================
   RADIO & CHECKBOX
   ============================================ */

.donform-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.donform-radio,
.donform-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--donform-transition);
}

.donform-radio input,
.donform-checkbox input {
    width: 20px;
    height: 20px;
    margin: 0;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--donform-secondary);
}

.donform-radio span,
.donform-checkbox span {
    color: var(--donform-text);
}

.donform-radio:hover span,
.donform-checkbox:hover span {
    color: var(--donform-primary);
}

/* Radio cards (type selector) — cf. .festival-reg-radio-card */
.donform-type-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donform-type-card {
    background: var(--donform-white);
    border: 2px solid var(--donform-border);
    border-radius: var(--donform-radius);
    padding: 20px;
    transition: var(--donform-transition);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.donform-type-card:hover {
    border-color: var(--donform-secondary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.donform-type-card--active,
.donform-type-card:has(input:checked) {
    border-color: var(--donform-secondary);
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.05) 0%, rgba(201, 162, 39, 0.1) 100%);
}

.donform-type-card input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    margin-right: 15px;
    cursor: pointer;
    accent-color: var(--donform-secondary);
    flex-shrink: 0;
}

.donform-type-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.donform-type-content strong {
    font-weight: 500;
}

/* Checkbox group — cf. .festival-reg-checkbox-group */
.donform-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donform-checkbox-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: var(--donform-white);
    border: 1px solid var(--donform-border);
    border-radius: 6px;
    transition: var(--donform-transition);
    cursor: pointer;
}

.donform-checkbox-card:hover {
    border-color: var(--donform-secondary);
}

.donform-checkbox-card:has(input:checked) {
    border-color: var(--donform-secondary);
    background: rgba(201, 162, 39, 0.05);
}

.donform-checkbox-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--donform-secondary);
    flex-shrink: 0;
}

/* Consent checkbox — cf. .festival-reg-checkbox-consent */
.donform-consent .donform-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    transition: var(--donform-transition);
    padding: 12px 15px;
    background: var(--donform-white);
    border: 1px solid var(--donform-border);
    border-radius: 6px;
}

.donform-consent .donform-checkbox-label:hover {
    border-color: var(--donform-secondary);
}

.donform-consent .donform-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--donform-secondary);
    flex-shrink: 0;
}

.donform-consent .donform-checkbox-label span {
    color: var(--donform-text);
    font-size: 0.95em;
    line-height: 1.6;
}

/* ============================================
   INFO BOXES
   ============================================ */

.donform-info-box {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    border-left: 4px solid var(--donform-secondary);
    padding: 20px 25px;
    border-radius: 0 var(--donform-radius) var(--donform-radius) 0;
    margin-top: 20px;
}

.donform-info-box p {
    margin: 0 0 10px 0;
    color: var(--donform-text);
}

.donform-info-box p:last-child {
    margin-bottom: 0;
}

.donform-info-box a {
    color: var(--donform-secondary);
    text-decoration: none;
    font-weight: 500;
}

.donform-info-box a:hover {
    text-decoration: underline;
}

.donform-info-box-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left-color: var(--donform-warning);
}

/* ============================================
   AMOUNT BUTTONS
   ============================================ */

.donform-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.donform-amount-btn {
    flex: 1;
    min-width: 80px;
    padding: 15px 12px;
    border: 2px solid var(--donform-border);
    border-radius: var(--donform-radius);
    background: var(--donform-white);
    color: var(--donform-text);
    font-family: var(--donform-font-title);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--donform-transition);
    text-align: center;
}

.donform-amount-btn:hover {
    border-color: var(--donform-secondary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.donform-amount-btn--active {
    border-color: var(--donform-secondary);
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.05) 0%, rgba(201, 162, 39, 0.1) 100%);
    color: var(--donform-secondary);
}

.donform-amount-price {
    font-family: var(--donform-font-title);
    font-weight: 600;
    color: var(--donform-secondary);
    font-size: 1.1em;
}

/* ============================================
   DYNAMIC FIELDS SUBSECTION
   ============================================ */

.donform-fields {
    background: var(--donform-light);
    padding: 25px 40px;
    border-bottom: 1px solid var(--donform-border);
}

/* ============================================
   SUBMIT SECTION
   ============================================ */

.donform-submit-section {
    background: linear-gradient(180deg, var(--donform-light) 0%, #f0ede8 100%);
    text-align: center;
    padding-top: 40px !important;
    padding-bottom: 40px !important;
}

.donform-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--donform-font-title);
    font-size: 1.15em;
    font-weight: 600;
    padding: 18px 50px;
    background: var(--donform-secondary);
    color: var(--donform-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.donform-submit-btn:hover {
    background: #b22a26; 
    color: var(--donform-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.donform-submit-btn:active {
    background: #b22a26 !important;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.donform-submit-btn:active,
.donform-submit-btn:focus,
.donform-submit-btn:focus-visible {
  background-color: #b22a26 !important;
}

.donform-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.donform-submit-text {
    position: relative;
}

/* Spinner */
.donform-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(26, 26, 46, 0.3);
    border-top-color: var(--donform-primary);
    border-radius: 50%;
    animation: donformSpin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes donformSpin {
    to { transform: rotate(360deg); }
}

/* ============================================
   CONSENT TEXT BOX
   ============================================ */

.donform-consent-text {
    background: var(--donform-light);
    border-left: 3px solid var(--donform-secondary);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 0 var(--donform-radius) var(--donform-radius) 0;
}

.donform-consent-text p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--donform-text);
}

.donform-required-note {
    margin-top: 25px;
    font-size: 0.9em;
    color: var(--donform-text-light);
}

.donform-required-note .required {
    color: var(--donform-error);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .donform-wrapper {
        padding: 10px;
    }

    .donform-section {
        padding: 20px;
    }

    .donform-section-title {
        font-size: 1.2em;
    }

    .donform-fields {
        padding: 20px;
    }

    .donform-consent {
        padding: 20px;
    }

    .donform-type-selector {
        flex-direction: column;
        gap: 10px;
    }

    .donform-row-2 {
        grid-template-columns: 1fr;
    }

    .donform-amounts {
        flex-wrap: wrap;
    }

    .donform-amount-btn {
        min-width: 60px;
        padding: 12px 8px;
        font-size: 0.95em;
    }

    .donform-submit-btn {
        width: 100%;
        padding: 16px 25px;
        font-size: 1em;
        letter-spacing: 1px;
    }

    .donform-message {
        padding: 25px 20px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes donformFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.donform-section {
    animation: donformFadeIn 0.5s ease forwards;
}

.donform-section:nth-child(1) { animation-delay: 0.1s; }
.donform-section:nth-child(2) { animation-delay: 0.2s; }
.donform-section:nth-child(3) { animation-delay: 0.3s; }
.donform-section:nth-child(4) { animation-delay: 0.4s; }
.donform-section:nth-child(5) { animation-delay: 0.5s; }
.donform-section:nth-child(6) { animation-delay: 0.6s; }
