/* Agenda Citoyen Sénégal - Styles */

:root {
    --acs-primary: #2563eb;
    --acs-secondary: #64748b;
    --acs-success: #16a34a;
    --acs-danger: #dc2626;
    --acs-warning: #ea580c;
    --acs-info: #0891b2;
    --acs-purple: #9333ea;
    --acs-pink: #db2777;
    --acs-border: #e2e8f0;
    --acs-bg-light: #f8fafc;
    --acs-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --acs-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

/* Conteneur principal */
.acs-agenda-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* En-tête avec filtres */
.acs-header {
    margin-bottom: 2rem;
}

.acs-header-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.acs-header-subtitle {
    font-size: 1.125rem;
    color: var(--acs-secondary);
    margin-bottom: 1.5rem;
}

/* Barre de filtres */
.acs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--acs-shadow);
}

.acs-filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.acs-filter-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
}

.acs-filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--acs-border);
    background: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #475569;
}

.acs-filter-btn:hover {
    background: var(--acs-bg-light);
    border-color: var(--acs-primary);
}

.acs-filter-btn.active {
    background: var(--acs-primary);
    color: white;
    border-color: var(--acs-primary);
}

.acs-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.acs-search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--acs-border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.acs-search-input:focus {
    outline: none;
    border-color: var(--acs-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.acs-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--acs-secondary);
}

/* Bouton principal */
.acs-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--acs-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: var(--acs-shadow);
}

.acs-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: var(--acs-shadow-lg);
    transform: translateY(-1px);
}

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

/* Carte d'événement */
.acs-event-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--acs-shadow);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.acs-event-card:hover {
    box-shadow: var(--acs-shadow-lg);
    transform: translateY(-4px);
}

.acs-event-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

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

.acs-event-date-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: var(--acs-shadow);
    min-width: 60px;
}

.acs-event-date-month {
    display: block;
    font-size: 0.75rem;
    color: var(--acs-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.acs-event-date-day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.acs-event-category {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.acs-category-icon {
    font-size: 1rem;
    line-height: 1;
}

.acs-event-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.acs-event-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.acs-event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.acs-event-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--acs-secondary);
}

.acs-event-meta-icon {
    color: var(--acs-primary);
    font-size: 1rem;
}

.acs-event-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--acs-border);
    margin-top: auto;
}

.acs-event-participants {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.acs-event-avatars {
    display: flex;
    margin-left: -0.5rem;
}

.acs-event-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: -0.5rem;
}

.acs-event-participant-count {
    font-size: 0.875rem;
    color: var(--acs-secondary);
}

.acs-event-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--acs-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--acs-secondary);
    transition: all 0.2s;
}

.acs-event-card:hover .acs-event-arrow {
    background: var(--acs-primary);
    color: white;
}

/* Catégories couleurs */
.acs-category-environnement {
    background: var(--acs-success);
}

.acs-category-education {
    background: var(--acs-primary);
}

.acs-category-citoyennete {
    background: var(--acs-purple);
}

.acs-category-sport {
    background: var(--acs-warning);
}

.acs-category-sante {
    background: var(--acs-danger);
}

.acs-category-culture {
    background: var(--acs-pink);
}

/* Bouton charger plus */
.acs-load-more {
    text-align: center;
    margin-top: 2rem;
}

.acs-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: white;
    color: var(--acs-primary);
    border: 2px solid var(--acs-primary);
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.acs-load-more-btn:hover {
    background: var(--acs-primary);
    color: white;
}

/* Messages */
.acs-no-events {
    text-align: center;
    padding: 3rem;
    color: var(--acs-secondary);
    font-size: 1.125rem;
}

/* Bouton participer */
.acs-btn-participate {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--acs-primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.acs-btn-participate:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Modal de participation */
.acs-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.acs-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.acs-modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.acs-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.acs-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--acs-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.acs-modal-close:hover {
    background: var(--acs-bg-light);
    color: #0f172a;
}

.acs-modal-body {
    padding: 1.5rem;
}

.acs-modal-event-info {
    background: var(--acs-bg-light);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.acs-modal-event-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.acs-modal-event-info p {
    font-size: 0.875rem;
    color: var(--acs-secondary);
    margin: 0.25rem 0;
}

.acs-modal-form-group {
    margin-bottom: 1.25rem;
}

.acs-modal-form-label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.acs-modal-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--acs-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.acs-modal-form-input:focus {
    outline: none;
    border-color: var(--acs-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.acs-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--acs-border);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.acs-modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.acs-modal-btn-primary {
    background: var(--acs-primary);
    color: white;
}

.acs-modal-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.acs-modal-btn-primary:disabled {
    background: var(--acs-secondary);
    opacity: 0.6;
    cursor: not-allowed;
}

.acs-modal-btn-secondary {
    background: white;
    color: var(--acs-secondary);
    border: 1px solid var(--acs-border);
}

.acs-modal-btn-secondary:hover {
    background: var(--acs-bg-light);
}

.acs-modal-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.acs-modal-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.acs-modal-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Loading spinner */
.acs-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.acs-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--acs-border);
    border-top-color: var(--acs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Formulaire de proposition */
.acs-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--acs-shadow-lg);
}

.acs-form-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.acs-form-subtitle {
    font-size: 1rem;
    color: var(--acs-secondary);
    margin-bottom: 2rem;
}

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

.acs-form-label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.acs-form-required {
    color: var(--acs-danger);
}

.acs-form-input,
.acs-form-textarea,
.acs-form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--acs-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.acs-form-input:focus,
.acs-form-textarea:focus,
.acs-form-select:focus {
    outline: none;
    border-color: var(--acs-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.acs-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.acs-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.acs-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--acs-border);
}

.acs-btn-submit {
    flex: 1;
    padding: 1rem 2rem;
    background: var(--acs-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.acs-btn-submit:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--acs-shadow-lg);
}

.acs-btn-submit:disabled {
    background: var(--acs-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.acs-btn-cancel {
    padding: 1rem 2rem;
    background: white;
    color: var(--acs-secondary);
    border: 1px solid var(--acs-border);
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.acs-btn-cancel:hover {
    background: var(--acs-bg-light);
}

/* Messages de formulaire */
.acs-form-message {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.acs-form-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.acs-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Responsive */
@media (max-width: 768px) {
    .acs-agenda-container {
        padding: 1rem;
    }

    .acs-header-title {
        font-size: 1.5rem;
    }

    .acs-events-grid {
        grid-template-columns: 1fr;
    }

    .acs-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .acs-filter-group {
        width: 100%;
    }

    .acs-search-box {
        width: 100%;
    }

    .acs-form-row {
        grid-template-columns: 1fr;
    }

    .acs-form-actions {
        flex-direction: column;
    }
}

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

.acs-event-card {
    animation: fadeIn 0.5s ease-out;
}

/* Utilitaires */
.acs-text-center {
    text-align: center;
}

.acs-mt-2 {
    margin-top: 2rem;
}

.acs-mb-2 {
    margin-bottom: 2rem;
}
