/* ── Conseil de famille ───────────────────────────────────────────────────── */

.council-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem 1rem 5rem;
}

/* Header */
.council-header {
    margin-bottom: 1.5rem;
}

.council-back-link {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: #6c63ff;
    font-size: 0.875rem;
    text-decoration: none;
}

.council-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3436;
    margin: 0 0 0.5rem;
}

.council-meta-row {
    font-size: 0.8rem;
    color: #636e72;
}

.council-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    margin-top: 0.4rem;
}

.council-status.active {
    background: #d4edda;
    color: #155724;
}

.council-status.idle {
    background: #f8f9fa;
    color: #636e72;
    border: 1px solid #dee2e6;
}

.council-status-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Start card */
.council-start-card {
    background: linear-gradient(135deg, #f0eeff, #e8e6ff);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #d0c9ff;
}

.council-start-card p {
    margin: 0 0 1rem;
    color: #4a4080;
    font-size: 0.9rem;
    line-height: 1.5;
}

.council-btn-start {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #6c63ff, #5a52e0);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}

.council-btn-start:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(108, 99, 255, 0.3);
}

/* Sections */
.council-section {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.council-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.council-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3436;
    margin: 0 0 0.75rem;
}

.council-section-header .council-section-title {
    margin: 0;
}

.council-section-count {
    background: #6c63ff;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    min-width: 24px;
    text-align: center;
}

.council-section-meta {
    font-size: 0.78rem;
    color: #b2bec3;
}

/* Add form */
.council-add-form {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.council-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.council-input:focus {
    outline: none;
    border-color: #6c63ff;
}

.council-add-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.council-type-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #636e72;
    cursor: pointer;
}

.council-btn-add {
    margin-left: auto;
    padding: 0.5rem 1rem;
    background: #6c63ff;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
    transition: background 0.15s;
}

.council-btn-add:active { background: #5a52e0; }

/* Checklist items */
.council-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.council-checklist-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.75rem;
    border-left: 3px solid #dee2e6;
    position: relative;
}

.council-checklist-item.type-decision {
    border-left-color: #6c63ff;
}

.council-checklist-item.resolved {
    opacity: 0.75;
}

.council-checklist-item-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.council-type-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: #e9ecef;
    color: #495057;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.council-type-badge.decision {
    background: #ebe9ff;
    color: #5a52e0;
}

.council-checklist-item-title {
    flex: 1;
    font-size: 0.9rem;
    color: #2d3436;
    min-width: 0;
}

.council-checklist-item-author {
    font-size: 0.75rem;
    color: #b2bec3;
}

/* Resolve form */
.council-checklist-resolve summary {
    list-style: none;
}

.council-checklist-resolve summary::-webkit-details-marker { display: none; }

.council-btn-resolve {
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
    background: #e9ecef;
    color: #495057;
    border-radius: 20px;
    cursor: pointer;
    display: inline-block;
    margin-top: 0.4rem;
    min-height: 30px;
    line-height: 1.6;
    transition: background 0.15s;
}

.council-btn-resolve:hover { background: #dee2e6; }

.council-resolve-form {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.council-notes-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
}

.council-notes-input:focus {
    outline: none;
    border-color: #6c63ff;
}

.council-resolve-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.council-resolve-actions button {
    padding: 0.4rem 0.85rem;
    border: none;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
    transition: opacity 0.15s;
}

.council-resolve-actions button:active { opacity: 0.8; }

.council-btn-seen { background: #d4edda; color: #155724; }
.council-btn-approved { background: #d4edda; color: #155724; }
.council-btn-rejected { background: #f8d7da; color: #721c24; }
.council-btn-postponed { background: #fff3cd; color: #856404; }

/* Resolution badge */
.council-resolution-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.4rem;
}

.res-seen, .res-approved { background: #d4edda; color: #155724; }
.res-rejected { background: #f8d7da; color: #721c24; }
.res-postponed { background: #fff3cd; color: #856404; }
.res-pending { background: #e9ecef; color: #6c757d; }

/* Delete button */
.council-delete-form {
    display: inline;
}

.council-btn-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: #b2bec3;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s;
}

.council-btn-delete:hover { color: #e17055; }

/* Tasks */
.council-tasks {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.council-task-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.75rem;
    border-left: 3px solid #6c63ff;
}

.council-task-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
}

.council-task-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3436;
}

.council-task-cat {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    width: fit-content;
}

.council-task-meta {
    font-size: 0.78rem;
    color: #636e72;
}

.council-task-desc {
    font-size: 0.82rem;
    color: #636e72;
    margin: 0.25rem 0 0;
    line-height: 1.4;
}

.council-task-assign summary {
    list-style: none;
}

.council-task-assign summary::-webkit-details-marker { display: none; }

.council-btn-assign {
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
    background: #ebe9ff;
    color: #5a52e0;
    border-radius: 20px;
    cursor: pointer;
    display: inline-block;
    min-height: 30px;
    line-height: 1.6;
    transition: background 0.15s;
}

.council-assign-form {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.council-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

.council-assign-actions {
    display: flex;
    gap: 0.5rem;
}

.council-assign-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
    transition: opacity 0.15s;
}

/* Budget */
.council-budget-alert {
    margin-bottom: 1rem;
}

.council-budget-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: #636e72;
    margin: 0 0 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.council-budget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.4rem;
    background: #f8f9fa;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.council-budget-item.over {
    background: #fff5f5;
    border-left: 3px solid #e17055;
}

.council-budget-label {
    font-weight: 500;
    color: #2d3436;
}

.council-budget-amounts {
    color: #636e72;
    font-size: 0.82rem;
}

.council-budget-amounts em {
    font-style: normal;
    font-weight: 700;
    color: #e17055;
}

.council-budget-ok {
    color: #28a745;
    font-size: 0.9rem;
    margin: 0;
}

.council-over-tag {
    font-style: normal;
    font-weight: 700;
    color: #e17055;
    font-size: 0.78rem;
}

.council-remaining-tag {
    font-style: normal;
    color: #28a745;
    font-size: 0.78rem;
}

/* Events */
.council-events {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.council-event-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #fdcb6e;
    font-size: 0.88rem;
}

.council-event-date {
    font-weight: 700;
    color: #2d3436;
    white-space: nowrap;
    min-width: 36px;
}

.council-event-title {
    flex: 1;
    color: #2d3436;
}

.council-event-badge.yearly {
    font-size: 0.7rem;
    background: #ffeaa7;
    color: #856404;
    padding: 0.15rem 0.4rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Validate section */
.council-validate-section {
    background: linear-gradient(135deg, #f0fff4, #e6ffed);
    border: 1px solid #b7ebc5;
}

.council-btn-validate {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.85rem;
    background: linear-gradient(135deg, #28a745, #20883a);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 48px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}

.council-btn-validate:active {
    transform: scale(0.98);
}

/* History */
.council-history {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.council-history-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3436;
    font-size: 0.88rem;
    transition: background 0.15s;
}

.council-history-link:hover { background: #e9ecef; }

.council-history-arrow { color: #b2bec3; }

/* Notes body */
.council-notes-body {
    font-size: 0.9rem;
    color: #2d3436;
    line-height: 1.6;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
}

/* Item notes */
.council-item-notes {
    font-size: 0.8rem;
    color: #636e72;
    margin: 0.4rem 0 0;
    font-style: italic;
}

/* Empty states */
.council-empty {
    color: #b2bec3;
    font-size: 0.88rem;
    text-align: center;
    padding: 0.75rem 0;
    margin: 0;
}

/* Desktop */
@media (min-width: 700px) {
    .council-page {
        padding: 1.5rem 2rem 2rem;
    }

    .council-resolve-actions {
        justify-content: flex-start;
    }

    .council-budget-item {
        flex-wrap: nowrap;
    }
}
