/**
 * Styles CSS pour le plugin MyBansoa Custom
 *
 * @package MyBansoa
 */

/* Variables */
:root {
    --mybansoa-primary: #1E3A8A;
    --mybansoa-secondary: #8B4513;
    --mybansoa-success: #228B22;
    --mybansoa-danger: #DC3545;
    --mybansoa-warning: #FFC107;
    --mybansoa-info: #17A2B8;
    --mybansoa-light: #F8F9FA;
    --mybansoa-dark: #343A40;
}

/* Grille d'événements */
.mybansoa-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.event-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--mybansoa-primary);
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.event-image {
    position: relative;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-date-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--mybansoa-primary);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    min-width: 50px;
}

.event-date-badge .date-day {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

.event-date-badge .date-month {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.event-content {
    padding: 1.5rem;
}

.event-title {
    margin-bottom: 1rem;
}

.event-title a {
    color: var(--mybansoa-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
}

.event-title a:hover {
    color: var(--mybansoa-primary);
}

.event-meta {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.event-meta > div {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-meta i {
    color: var(--mybansoa-primary);
}

.event-excerpt {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.event-actions {
    text-align: center;
}

/* Formulaire de don */
.mybansoa-donation-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h3 {
    color: var(--mybansoa-secondary);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--mybansoa-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--mybansoa-primary);
}

.amount-presets {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.amount-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--mybansoa-primary);
    background: #fff;
    color: var(--mybansoa-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.amount-btn:hover,
.amount-btn.active {
    background: var(--mybansoa-primary);
    color: #fff;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover,
.payment-method input:checked + .method-icon + .method-name {
    border-color: var(--mybansoa-primary);
    background: #f8f9fa;
}

.method-icon {
    font-size: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Grille de l'annuaire */
.mybansoa-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.directory-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.directory-card:hover {
    transform: translateY(-4px);
}

.directory-image {
    height: 200px;
    overflow: hidden;
}

.directory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.directory-content {
    padding: 1.5rem;
}

.directory-title {
    margin-bottom: 0.5rem;
}

.directory-title a {
    color: var(--mybansoa-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.directory-title a:hover {
    color: var(--mybansoa-primary);
}

.directory-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.directory-category,
.directory-type {
    background: var(--mybansoa-light);
    color: var(--mybansoa-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.directory-excerpt {
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.directory-contact {
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.contact-item a {
    color: var(--mybansoa-primary);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.directory-actions {
    text-align: center;
}

/* Recherche */
.directory-search {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.search-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    min-width: 150px;
}

/* Nécrologies */
.mybansoa-obituaries-list {
    display: grid;
    gap: 1.5rem;
}

.obituary-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid var(--mybansoa-secondary);
}

.obituary-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.obituary-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.obituary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.obituary-info {
    flex: 1;
}

.obituary-name {
    margin-bottom: 0.25rem;
}

.obituary-name a {
    color: var(--mybansoa-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
}

.obituary-name a:hover {
    color: var(--mybansoa-secondary);
}

.obituary-date {
    color: #666;
    font-size: 0.9rem;
}

.obituary-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.obituary-actions {
    text-align: center;
}

/* Widgets */
.mybansoa-events-widget,
.mybansoa-donation-widget,
.mybansoa-contact-widget {
    padding: 1rem;
}

.event-widget-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.event-widget-item:last-child {
    border-bottom: none;
}

.event-widget-title {
    margin-bottom: 0.5rem;
}

.event-widget-title a {
    color: var(--mybansoa-secondary);
    text-decoration: none;
    font-weight: 600;
}

.event-widget-title a:hover {
    color: var(--mybansoa-primary);
}

.event-widget-date,
.event-widget-location {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.donation-message {
    margin-bottom: 1rem;
}

.donation-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.stat-item {
    background: var(--mybansoa-light);
    padding: 1rem;
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--mybansoa-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.donation-button {
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.contact-item a {
    color: var(--mybansoa-primary);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--mybansoa-primary);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.3s ease;
}

.social-link:hover {
    background: var(--mybansoa-secondary);
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--mybansoa-primary);
    color: #fff;
}

.btn-primary:hover {
    background: #151d3b;
    color: #fff;
}

.btn-secondary {
    background: var(--mybansoa-secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: #6b3410;
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--mybansoa-primary);
    color: var(--mybansoa-primary);
}

.btn-outline:hover {
    background: var(--mybansoa-primary);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mybansoa-events-grid,
    .mybansoa-directory-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .search-filters {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .donation-stats {
        grid-template-columns: 1fr;
    }
    
    .obituary-header {
        flex-direction: column;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--mybansoa-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages d'alerte */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
