/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 17px;
}

html.font-large {
    font-size: 19px;
}

html.font-xlarge {
    font-size: 21px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    font-size: 1rem;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid #1a6fa8;
    outline-offset: 2px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* Navigation */
#main-nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
}

#main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#main-nav a:hover, #main-nav a.active {
    background-color: rgba(255,255,255,0.2);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Boutons */
.btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
    min-height: 44px;
}

.font-size-controls {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.btn-font {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.5);
    min-width: 48px;
    font-weight: 700;
    padding: 0.4rem 0.6rem;
}

.btn-font:hover {
    background: rgba(255,255,255,0.32);
}

.btn:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.modal-content input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.modal-content button {
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    background: #007bff;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.modal-content button:hover {
    background: #0056b3;
}

.modal-content p {
    text-align: center;
    margin-top: 1rem;
}

.modal-content a {
    color: #007bff;
    text-decoration: none;
}

.modal-content a:hover {
    text-decoration: underline;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    min-height: calc(100vh - 200px);
}

#welcome-message {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Admin panel */
.admin-panel {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.admin-section {
    background: white;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-section h3 {
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

table tr:hover {
    background: #f8f9fa;
}

/* Page content */
.page-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-header {
    border-bottom: 2px solid #007bff;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.page-meta {
    color: #666;
    font-size: 0.9rem;
}

/* Create news section */
.create-news-section {
    margin-bottom: 2rem;
}

.create-news-section button {
    transition: all 0.3s ease;
}

#news-form-container {
    animation: slideDown 0.3s ease-out;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* News Carousel and Tickets */
.news-carousel {
    margin: 2rem 0;
}

.news-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-ticket {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.news-ticket:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.ticket-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.ticket-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.ticket-title-section {
    flex: 1;
}

.ticket-title {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.ticket-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
}

.ticket-author {
    font-weight: 500;
}

.ticket-likes {
    color: #e91e63;
    font-weight: 500;
}

.ticket-toggle {
    margin-left: 1rem;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #007bff;
    transition: transform 0.3s ease;
}

.ticket-content {
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    animation: slideDown 0.3s ease-out;
}

.ticket-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ticket-text {
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.5rem;
}

.ticket-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
    min-height: 40px;
}

.ticket-comments {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.comments-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 1rem;
    transition: background 0.3s ease;
}

.comments-toggle:hover {
    background: #e9ecef;
}

.comments-icon {
    color: #007bff;
    transition: transform 0.3s ease;
}

.comments-content {
    animation: slideDown 0.3s ease-out;
}

.comments-list {
    margin-bottom: 1rem;
}

.comment {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border-left: 4px solid #007bff;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-date {
    color: #666;
}

.comment-content {
    line-height: 1.5;
    color: #444;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.comment-form textarea {
    min-height: 80px;
    resize: vertical;
}

/* Responsive pour les billets */
@media (max-width: 768px) {
    .news-ticket {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .ticket-header {
        padding: 1rem;
    }
    
    .ticket-title {
        font-size: 1.1rem;
    }
    
    .ticket-meta {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
    
    .ticket-content {
        padding: 1rem;
    }
    
    .ticket-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ticket-actions button {
        width: 100%;
    }
}

/* Animation pour l'expansion des billets */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 2000px;
        transform: translateY(0);
    }
}

/* News items (legacy - gardé pour compatibilité) */
.news-item {
    background: white;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.news-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.news-meta {
    color: #666;
    font-size: 0.9rem;
}

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

.news-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.like-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.like-btn:hover {
    background: #f8f9fa;
}

.like-btn.liked {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #2196f3;
}

/* Reaction buttons */
.reactions-bar {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.reaction-btn {
    background: #fff;
    border: 1px solid #ccc;
    padding: 0.55rem 1rem;
    border-radius: 22px;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.4;
    min-height: 44px;
}

.reaction-btn:hover {
    background: #f8f9fa;
    transform: scale(1.08);
}

.reaction-btn.active {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
    font-weight: 600;
}

.reaction-hand.active {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

/* Voters section */
.voters-section {
    margin-top: 0.4rem;
}

.voters-toggle {
    font-size: 0.95rem;
    padding: 0.45rem 0.9rem;
}

.voters-panel {
    background: #f1f8e9;
    border: 1px solid #c5e1a5;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.voters-panel strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #33691e;
    font-size: 0.9rem;
}

.voters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.voter-name {
    background: #dcedc8;
    border: 1px solid #aed581;
    color: #33691e;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

/* Comments */
.comments-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.comment {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

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

.comment-content {
    line-height: 1.5;
}

.comment-form {
    margin-top: 1rem;
}

.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Checkbox grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

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

.checkbox-item input[type="checkbox"] {
    width: auto;
}

/* Éditeur de commentaires */
.comment-toolbar {
    display: flex;
    align-items: center;
    gap: .2rem;
    flex-wrap: wrap;
    padding: .25rem .4rem;
    background: #f5f7fa;
    border: 1px solid #dde1ea;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

.ctb {
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: .15rem .45rem;
    cursor: pointer;
    font-size: .85rem;
    color: #333;
    line-height: 1.4;
    min-width: 26px;
}

.ctb:hover { background: #e2e6ef; border-color: #c5cad8; }

.ctb-sep {
    width: 1px;
    height: 18px;
    background: #ccc;
    margin: 0 .2rem;
}

.comment-editor {
    min-height: 60px;
    padding: .5rem .6rem;
    border: 1px solid #dde1ea;
    border-radius: 0 0 6px 6px;
    outline: none;
    font-size: .9rem;
    background: #fff;
    margin-bottom: .4rem;
    line-height: 1.5;
}

.comment-editor:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none;
}

.comment-attachment img { max-width: 100%; border-radius: 6px; margin-top: .4rem; }
.comment-attachment audio,
.comment-attachment video { max-width: 100%; margin-top: .4rem; }

.comment-actions { margin-left: auto; display: flex; gap: .1rem; }
.comment-actions .ctb { padding: .1rem .3rem; font-size: .8rem; }

/* File viewer modal */
.file-viewer-modal { background: rgba(0,0,0,.55); }
.file-viewer-modal .modal-content { overflow: hidden; }

.sheet-wrapper { overflow: auto; }
.sheet-wrapper table { border-collapse: collapse; font-size: .82rem; }
.sheet-wrapper td, .sheet-wrapper th {
    border: 1px solid #ddd;
    padding: .2rem .5rem;
    white-space: nowrap;
}
.sheet-wrapper tr:nth-child(even) { background: #f9f9f9; }
.sheet-wrapper tr:first-child td, .sheet-wrapper th { background: #e8f0fe; font-weight: 600; }

.docx-content { padding: .5rem 1rem; line-height: 1.7; }
.docx-content h1, .docx-content h2, .docx-content h3 { margin: .8rem 0 .4rem; }
.docx-content p { margin: .4rem 0; }

/* Matrice permissions */
.matrix-page-header {
    text-align: center;
    background: #eef2ff;
    font-size: .82rem;
    border-left: 2px solid #c7d0f8;
    padding: .4rem .3rem;
}

.matrix-sub-header {
    text-align: center;
    background: #f5f7ff;
    font-size: .78rem;
    color: #555;
    padding: .3rem .2rem;
    min-width: 48px;
}

.matrix-sub-header input[type="checkbox"] {
    display: block;
    margin: 0 auto .2rem;
    cursor: pointer;
    width: 15px;
    height: 15px;
}

.matrix-cell {
    text-align: center;
    padding: .35rem .2rem;
}

.matrix-cell input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.matrix-cell.border-left {
    border-left: 2px solid #eee;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    #main-nav ul {
        justify-content: center;
    }
    
    .admin-section {
        padding: 1rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    color: white;
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════
   NEWS CAROUSEL — Style Étal Solidaire
═══════════════════════════════════════════════ */
:root {
    --es-green-dark:  #2d5a1b;
    --es-green:       #4a8c35;
    --es-green-light: #6db84e;
    --es-cream:       #f5f7ef;
    --es-gold:        #d4a017;
    --es-earth:       #7a5c3a;
    --es-border:      #c8ddb8;
}

.news-carousel-section {
    background: var(--es-cream);
    border-radius: 14px;
    border: 1px solid var(--es-border);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(45,90,27,.1);
    margin-top: 1rem;
}

.news-carousel-header {
    background: linear-gradient(135deg, var(--es-green-dark) 0%, var(--es-green) 100%);
    padding: 14px 20px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ncs-logo {
    height: 34px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.ncs-title  { color: #fff; font-size: 1.05rem; font-weight: 700; text-align: right; }
.ncs-subtitle { font-size: .85rem; color: rgba(255,255,255,.85); text-align: right; }

/* Filter bar */
.ncs-filter-bar {
    display: flex;
    gap: 6px;
    padding: 10px 16px 6px;
    flex-wrap: wrap;
}

.ncs-filter-btn {
    background: #fff;
    border: 1px solid var(--es-border);
    color: #444;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: .95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    min-height: 40px;
}

.ncs-filter-btn:hover { background: #e8f0df; border-color: var(--es-green-light); }
.ncs-filter-btn.active { background: var(--es-green); border-color: var(--es-green); color: #fff; font-weight: 600; }

/* Carousel track */
.ncs-track-wrap { position: relative; padding: 10px 0 4px; }

.ncs-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 20px 14px;
    -webkit-overflow-scrolling: touch;
}

.ncs-track::-webkit-scrollbar { height: 5px; }
.ncs-track::-webkit-scrollbar-track { background: #e8eee0; border-radius: 4px; }
.ncs-track::-webkit-scrollbar-thumb { background: var(--es-green-light); border-radius: 4px; }

/* Cards */
.ncs-card {
    flex-shrink: 0;
    width: 230px;
    scroll-snap-align: start;
    border-radius: 11px;
    overflow: hidden;
    background: #fff;
    border: 2px solid var(--es-border);
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, border-color .2s;
    position: relative;
}

.ncs-card:hover {
    transform: scale(1.04) translateY(-3px);
    box-shadow: 0 8px 22px rgba(45,90,27,.22);
    border-color: var(--es-green-light);
    z-index: 2;
}

.ncs-card.ncs-card-active {
    border-color: var(--es-green-dark);
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 10px 28px rgba(45,90,27,.32);
}

.ncs-card.ncs-card-hidden { display: none; }

.ncs-thumb {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ncs-thumb-logo {
    width: 72%;
    height: 72%;
    object-fit: contain;
    opacity: .5;
    filter: grayscale(15%);
}

.ncs-badge {
    position: absolute;
    top: 7px; left: 7px;
    font-size: .8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: .3px;
    color: #fff;
}

.ncs-badge-urgent { background: #c0392b; }
.ncs-badge-info   { background: #1a6fa8; }
.ncs-badge-stock  { background: #27ae60; }
.ncs-badge-event  { background: #8e44ad; }

.ncs-card-body  { padding: 11px 13px 13px; }
.ncs-card-author { font-size: .82rem; color: var(--es-earth); font-weight: 600; margin-bottom: 3px; }

.ncs-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--es-green-dark);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ncs-card-reactions { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }

.ncs-rx {
    font-size: .82rem;
    background: var(--es-cream);
    color: #444;
    padding: 3px 8px;
    border-radius: 9px;
    border: 1px solid var(--es-border);
}

/* Nav arrows */
.ncs-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: var(--es-green-dark);
    color: #fff;
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    transition: background .2s;
}

.ncs-arrow:hover { background: var(--es-green); }
.ncs-arrow-left  { left: 4px; }
.ncs-arrow-right { right: 4px; }

/* Detail panel */
.ncs-detail {
    display: none;
    border-top: 2px solid var(--es-border);
    background: #fff;
    padding: 18px 20px 20px;
}

.ncs-detail.open { display: block; }

.ncs-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.ncs-detail-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--es-green-dark);
}

.ncs-close-btn {
    background: var(--es-cream);
    border: 1px solid var(--es-border);
    color: #555;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ncs-close-btn:hover { background: var(--es-border); color: var(--es-green-dark); }

.ncs-detail-meta { font-size: .92rem; color: var(--es-earth); margin-bottom: 12px; }

.ncs-detail-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ncs-detail-text { line-height: 1.7; color: #333; margin-bottom: 14px; font-size: 1.05rem; }

.no-news { text-align: center; color: #666; padding: 2rem; }
