/**
 * Public styles for Formulaire Bénévoles
 * Style inspiré de Sneat Dashboard (cohérent avec qr-kermesse)
 */

/* Variables - Palette Sneat */
:root {
    --fb-primary: #696cff;
    --fb-primary-dark: #5e61e6;
    --fb-primary-light: #ebe9ff;
    --fb-success: #71dd37;
    --fb-success-light: #e3fad5;
    --fb-warning: #ffab00;
    --fb-warning-light: #fff2d4;
    --fb-error: #ff3e1d;
    --fb-error-light: #ffe0db;
    --fb-text: #697a8d;
    --fb-heading: #566a7f;
    --fb-border: #d9dee3;
    --fb-bg: #f5f5f9;
    --fb-bg-white: #ffffff;
    --fb-shadow-sm: 0 0.125rem 0.25rem rgba(165, 179, 198, 0.2);
    --fb-shadow-md: 0 0.25rem 1rem rgba(165, 179, 198, 0.25);
    --fb-radius: 0.375rem;
    --fb-radius-lg: 0.5rem;
}

/* Form container */
.fb-form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--fb-text);
}

.fb-event-header {
    background: var(--fb-bg-white);
    padding: 30px;
    border-radius: var(--fb-radius-lg);
    margin-bottom: 30px;
    border-left: 4px solid var(--fb-primary);
    box-shadow: var(--fb-shadow-sm);
}

.fb-event-header h1 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--fb-heading);
    font-size: 1.625rem;
    font-weight: 500;
}

.fb-event-date,
.fb-event-location {
    color: var(--fb-text);
    margin: 10px 0;
    font-size: 0.9375rem;
}

.fb-event-date .dashicons,
.fb-event-location .dashicons {
    margin-right: 5px;
    color: var(--fb-primary);
}

.fb-event-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--fb-border);
    color: var(--fb-text);
}

/* Form sections */
.fb-form-section {
    background: var(--fb-bg-white);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--fb-radius-lg);
    box-shadow: var(--fb-shadow-sm);
    transition: box-shadow 0.2s ease-in-out;
}

.fb-form-section:hover {
    box-shadow: var(--fb-shadow-md);
}

.fb-form-section h2 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--fb-border);
    color: var(--fb-heading);
    font-size: 1.125rem;
    font-weight: 500;
}

.fb-form-help {
    color: var(--fb-text);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Form rows */
.fb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
    .fb-form-row {
        grid-template-columns: 1fr;
    }
}

/* Form groups */
.fb-form-group {
    margin-bottom: 1.25rem;
}

.fb-form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--fb-heading);
    font-size: 0.8125rem;
}

.fb-form-group input[type="text"],
.fb-form-group input[type="email"],
.fb-form-group input[type="tel"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--fb-text);
    background: var(--fb-bg-white);
    transition: all 0.2s ease-in-out;
}

.fb-form-group input:focus {
    border-color: var(--fb-primary);
    outline: 0;
    box-shadow: 0 0 0 2px var(--fb-primary-light);
}

/* Checkbox group */
.fb-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    font-size: 0.875rem;
}

.fb-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--fb-primary);
}

/* Stand blocks */
.fb-stand-block {
    background: var(--fb-bg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: var(--fb-radius-lg);
    border-left: 4px solid var(--fb-primary);
}

.fb-stand-title {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--fb-heading);
    font-size: 1rem;
    font-weight: 500;
}

.fb-stand-description {
    color: var(--fb-text);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Creneaux list */
.fb-creneaux-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.fb-creneau-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--fb-bg-white);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.fb-creneau-item:hover {
    border-color: var(--fb-primary);
    background: var(--fb-primary-light);
}

.fb-creneau-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--fb-primary);
}

.fb-creneau-time {
    flex: 1;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--fb-heading);
}

.fb-creneau-status {
    font-size: 0.75rem;
    color: var(--fb-text);
}

.fb-creneau-full {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--fb-bg);
}

.fb-creneau-full input[type="checkbox"] {
    cursor: not-allowed;
}

.fb-badge-complete {
    background: var(--fb-error-light);
    color: var(--fb-error);
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Submit section */
.fb-form-submit {
    text-align: center;
}

.fb-form-submit .button-primary {
    background: var(--fb-primary);
    border-color: var(--fb-primary);
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    height: auto;
    font-weight: 500;
    border-radius: var(--fb-radius);
    box-shadow: 0 0.125rem 0.25rem rgba(105, 108, 255, 0.4);
    transition: all 0.2s ease-in-out;
}

.fb-form-submit .button-primary:hover {
    background: var(--fb-primary-dark);
    border-color: var(--fb-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(105, 108, 255, 0.5);
}

/* Messages */
.fb-message {
    padding: 0.875rem 1rem;
    border-radius: var(--fb-radius);
    margin-top: 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    border-left: 4px solid;
}

.fb-message.success {
    background: var(--fb-success-light);
    color: var(--fb-success);
    border-color: var(--fb-success);
}

.fb-message.error {
    background: var(--fb-error-light);
    color: var(--fb-error);
    border-color: var(--fb-error);
}

/* Closed event */
.fb-event-closed {
    max-width: 600px;
    margin: 60px auto;
    padding: 2.5rem;
    text-align: center;
    background: var(--fb-bg-white);
    border-radius: var(--fb-radius-lg);
    box-shadow: var(--fb-shadow-md);
}

.fb-event-closed h1 {
    color: var(--fb-heading);
    margin-bottom: 1.25rem;
    font-size: 1.625rem;
}

.fb-event-closed p {
    color: var(--fb-text);
    font-size: 1rem;
}

/* No stands */
.fb-no-stands {
    text-align: center;
    color: var(--fb-text);
    padding: 2.5rem;
    background: var(--fb-bg);
    border-radius: var(--fb-radius-lg);
}

/* Loading state */
.btn-loading {
    display: inline-flex;
    align-items: center;
}

.btn-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Profile page */
.fb-profile-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.fb-profile-login {
    background: var(--fb-bg-white);
    padding: 2rem;
    border-radius: var(--fb-radius-lg);
    box-shadow: var(--fb-shadow-md);
    max-width: 400px;
    margin: 0 auto;
}

.fb-profile-login h2 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: var(--fb-heading);
    font-size: 1.25rem;
    font-weight: 500;
}

.fb-profile-reservations {
    background: var(--fb-bg-white);
    padding: 1.5rem;
    border-radius: var(--fb-radius-lg);
    box-shadow: var(--fb-shadow-sm);
}

.fb-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--fb-border);
}

.fb-reservation-item {
    padding: 1.25rem;
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius);
    margin-bottom: 1rem;
    background: var(--fb-bg);
}

.fb-reservation-item h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--fb-heading);
    font-size: 1rem;
    font-weight: 500;
}

.fb-reservation-item p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--fb-text);
}

.fb-reservation-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fb-border);
    display: flex;
    gap: 0.5rem;
}

.fb-reservation-actions .button {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    height: auto;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .fb-form-container {
        padding: 0 15px;
    }
    
    .fb-event-header {
        padding: 1.25rem;
    }
    
    .fb-form-section {
        padding: 1.25rem;
    }
    
    .fb-creneaux-list {
        grid-template-columns: 1fr;
    }
}
