/* assets/styles.css – complété avec le layout type Feedly */

/* Reset & base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Segoe UI", Roboto, sans-serif;
    color: #111827;
    background-color: #f3f4f6;
}

/* ----------- Layout général (dashboard) ----------- */
.app-shell {
    background: #f3f4f6;
}

.layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    padding: 1rem 0.9rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.3rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: url('favicon.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo__icon {
    color: #022c22;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}

.sidebar-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #111827;
}

.sidebar-user {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.4rem;
}

.nav-section {
    padding: 0.3rem 0.1rem;
}

.nav-section-bottom {
    margin-top: auto;
}

.nav-section-title {
    margin: 0 0 0.25rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.nav-item:hover {
    background: #e5e7eb;
    color: #111827;
}

.nav-item--active {
    background: #111827;
    color: #f9fafb;
}

.nav-item--secondary {
    color: #6b7280;
}

.nav-item--secondary:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.nav-item-icon {
    font-size: 1rem;
}

.nav-item-label {
    flex: 1;
}

.nav-item-count {
    font-size: 0.78rem;
    color: #6b7280;
    background: #e5e7eb;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    min-width: 1.2rem;
    text-align: center;
}

/* Groupes de rubriques */
.nav-group {
    border-radius: 8px;
    padding: 0.15rem 0.2rem;
}

.nav-group-summary {
    list-style: none;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.nav-group[open] > .nav-group-summary {
    background: #e5e7eb;
    border-radius: 6px;
}

.nav-group-toggle {
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    display: inline-block;
    width: 1rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.nav-group[open] .nav-group-toggle {
    transform: rotate(90deg);
}

.nav-group-name {
    flex: 1;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    transition: background 0.12s ease;
}

.nav-group-name:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-group-count {
    font-size: 0.8rem;
    color: #6b7280;
}
.nav-group-body {
    padding-left: 0.35rem;
    margin-top: 0.15rem;
}


.nav-feed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.15rem 0.4rem;
    font-size: 0.83rem;
    color: #4b5563;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.12s ease;
}

.nav-feed:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-feed-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-feed-count {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ----------- Contenu principal ----------- */
.content {
    padding: 1.2rem 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    overflow: hidden;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.7rem;
}

.content-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.content-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.content-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-pill {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #e5e7eb;
    font-size: 0.8rem;
    color: #374151;
}

.content-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.content-btn:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.content-btn:active {
    transform: scale(0.95);
}

/* Liste des articles */
.article-list {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.article-list-header {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 110px;
    padding: 0.5rem 0.9rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.78rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
}

.article-empty {
    padding: 1.2rem;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Colonnes */
.col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-feed {
    padding-right: 0.5rem;
}

.col-title {
    padding-right: 0.5rem;
}

.col-age {
    text-align: right;
}

/* Lignes d'articles */
.article-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.article-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 110px;
    grid-template-rows: auto auto;
    grid-template-areas:
        "feed title age"
        "details details details";
    align-items: center;
    padding: 0.4rem 0.9rem;
    font-size: 0.88rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.08s ease;
}

.article-row:hover {
    background: #f3f4f6;
}

.article-row--unread {
    background: #ffffff;
    font-weight: 600;
}

.article-row--read {
    background: #f5f5f5;
    color: #6b7280;
    font-weight: 400;
}

.article-row--expanded {
    background: #f0fdf4 !important;
}

.article-row .col-feed {
    grid-area: feed;
    grid-area: feed;
    display: flex;
    align-items: center;
}

.article-feed-name {
    flex: 1;
}
.article-row .col-title {
    grid-area: title;
    display: flex;
    align-items: center;
}

.article-row .col-age {
    grid-area: age;
    text-align: right;
    font-size: 0.75rem;
    color: #6b7280;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', monospace;
}

.article-read-icon {
    margin-right: 0.35rem;
    font-size: 0.7rem;
    color: #22c55e;
}

/* Cases à cocher */
.article-checkbox {
    opacity: 0;
    margin-right: 0.5rem;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.article-row:hover .article-checkbox {
    opacity: 1;
}

body.has-selection .article-checkbox {
    opacity: 1;
}

.article-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
}

.article-title-text {
    cursor: pointer;
    flex: 1;
}

.article-title-text:hover {
    text-decoration: underline;
}

/* Selection actions */
.selection-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.action-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.action-btn:active {
    transform: scale(0.95);
}

.article-link {
    text-decoration: none;
    color: inherit;
}

.article-link:hover {
    text-decoration: underline;
}

.article-read-icon {
    margin-right: 0.35rem;
    opacity: 0.7;
}

/* Contenu détaillé */
.article-details {
    grid-area: details;
    margin-top: 0.3rem;
    display: none;
}

.article-row--expanded .article-details {
    display: block;
}

.article-details-inner {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
    margin-top: 0.2rem;
    font-size: 0.9rem;
    color: #374151;
}


.article-details-toolbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.toolbar-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: #e5e7eb;
    transform: scale(1.08);
}

.toolbar-btn:active {
    transform: scale(0.95);
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: #d1d5db;
    margin: 0 0.2rem;
}

.article-open-link {
    font-size: 0.8rem;
    text-decoration: none;
    color: #2563eb;
}

.article-open-link:hover {
    text-decoration: underline;
}
/* ----------- Styles de la page de login existante ----------- */
/* (repris de ta version précédente, non re-listés ici pour gagner de la place)
   Garde simplement les blocs .auth-*, .app-main, .app-body, .app-footer...
   que tu as déjà en place. */


/* Responsive */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .content {
        padding: 1rem;
    }

    .article-list-header,
    .article-row {
        grid-template-columns: minmax(0, 1fr) 110px;
    }

    .col-feed {
        display: none;
    }
}