* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #1f2937;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #1f2937;
    color: white;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h1 {
    margin-top: 0;
    font-size: 24px;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.sidebar button {
    border: none;
    padding: 10px 12px;
    background: #2563eb;
    color: white;
    cursor: pointer;
    border-radius: 8px;
}

.sidebar button:hover {
    background: #1d4ed8;
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-btn {
    width: 100%;
    text-align: left;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    background: #374151;
    color: white;
    word-break: break-word;
        background: #2563eb;
}

.feed-btn:hover {
    background: #4b5563;
}

.content {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar input {
    flex: 1;
    min-width: 250px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.toolbar button {
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    background: #2563eb;
    color: white;
}

.toolbar button:hover {
    background: #1d4ed8;
}

#status {
    color: #6b7280;
    font-size: 14px;
}

.table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #111827;
    color: white;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

tbody tr:hover {
    background: #f9fafb;
}

.title-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.title-link:hover {
    text-decoration: underline;
}

.loading {
    text-align: center;
    color: #6b7280;
}

@media (max-width: 900px) {
    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}

#btn-add {
    background: #10b981;
}

#btn-add:hover {
    background: #059669;
}

.feed-item {
    position: relative;
}

.feed-delete {
    position: absolute;
    right: 10px;
    top: 8px;
    color: #ef4444;
    cursor: pointer;
    font-size: 14px;
}

.feed-delete:hover {
    color: #dc2626;
    transform: scale(1.2);
}

.feed-delete {
    opacity: 0;
    transition: 0.2s;
}

.feed-item:hover .feed-delete {
    opacity: 1;
}
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; /* 🔥 bloque scroll global */
}
.app {
    display: flex;
    height: 100vh; /* 🔥 prend tout l'écran */
}
.sidebar {
    width: 280px;
    background: #1f2937;
    color: white;
    padding: 20px;

    height: 100vh;        /* 🔥 pleine hauteur */
    overflow-y: auto;     /* 🔥 scroll ici uniquement */
    overflow-x: hidden;
}
.content {
    flex: 1;
    padding: 20px;

    height: 100vh;        /* 🔥 fixe hauteur */
    overflow: hidden;     /* 🔥 empêche scroll global */
    display: flex;
    flex-direction: column;
}
.table-wrapper {
    flex: 1;
    overflow-y: auto;
}
.feed-btn {
    transition: 0.2s;
}

.feed-btn:hover {
    filter: brightness(1.1);
}
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    height: 180px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-3px);
}

.card-title {
    font-weight: bold;
    font-size: 14px;
    color: #111827;
    overflow: hidden;
}

.card-source {
    font-size: 12px;
    color: #6b7280;
}

.card-date {
    font-size: 11px;
    color: #9ca3af;
}
.Image{
    width: 280px;
    background: #1f2937;
    padding-right: 40px;
}
.card {
    cursor: pointer;
}

.card-title {
    font-weight: bold;
    word-break: break-word;
}
/* =========================
   LAYOUT
========================= */

.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 280px;
    background: #1f2937;
    color: white;
    padding: 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

/* MOBILE SIDEBAR */
#overlay {
    display: none;
}

.mobile-only {
    display: none;
}
/* =========================
   TOOLBAR
========================= */

.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.toolbar input {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* =========================
   TABLE
========================= */

.table-wrapper {
    flex: 1;
    overflow: auto;
    background: white;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}
/* =========================
   CARDS
========================= */

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 10px;
    overflow-y: auto;
}

@media (max-width: 768px) {

    .app {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100%;
        z-index: 1000;
        transition: 0.3s;
    }

    .sidebar.open {
        left: 0;
    }

    #overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 900;
        display: none;
    }

    #overlay.active {
        display: block;
    }

    .mobile-only {
        display: block;
    }

    .content {
        padding: 10px;
    }

    table {
        min-width: 500px;
    }
}