@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght=600;700&family=Inter:wght=400;500&display=swap');

:root {
    --cs-primary: #1a2e40;
    --cs-primary-hover: #243f57;
    --cs-teal: #4b6b94;
    --cs-teal-hover: #375273;
    --cs-orange: #e07a5f;
    --cs-orange-hover: #cc664a;
    --cs-red: #e09f9d;
    --cs-red-hover: #d98886;
    --cs-gold: #dfb15b;
    --cs-olive: #7f8c99;
    --cs-yellow: #f4f1de;

    --cs-bg: #f5f7f8;
    --cs-cream: #e1e5e8;
    --cs-text: #4a5764;

    --cs-green: #68b0ab;
    --cs-green-hover: #539e98;
    --cs-green-bg: #f0f7f6;
    --cs-green-border: #d3eae7;
    --cs-green-text: #2f615d;

    --cs-orange-bg: #fdf5f2;
    --cs-orange-border: #f7e2da;
    --cs-orange-text: #a65037;

    --cs-surface: #e9ecef;
    --cs-border: #ccd3d9;

    --font-title: 'Crimson Pro', serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    --cs-card-bg-start: #ffffff;
    --cs-card-bg-end: #ffffff;
    --cs-card-title-color: #24313c;
    --cs-card-text-color: #5c6b77;
    --cs-card-border: #e4e8eb;
    --cs-card-shadow: rgba(36, 49, 60, 0.03);
    --cs-card-shadow-hover: rgba(36, 49, 60, 0.06);

    --cs-navbar-shadow: rgba(0, 0, 0, 0.05);
    --cs-navbar-link: rgba(255, 255, 255, 0.85);
    --cs-navbar-link-hover: rgba(255, 255, 255, 0.1);
    --cs-navbar-link-active: rgba(255, 255, 255, 0.15);

    --cs-header-gradient-start: #3a506b;
    --cs-header-gradient-end: #5c7493;
    --cs-header-text: #ffffff;

    --cs-footer-text: rgba(255, 255, 255, 0.85);
    --cs-footer-link: rgba(255, 255, 255, 0.65);
    --cs-footer-shadow: rgba(0, 0, 0, 0.1);

    --cs-badge-new-bg: #fcf4dd;
    --cs-badge-new-text: #946f1a;
    --cs-badge-new-border: #f7e6be;
    --cs-badge-admin-yes-bg: #e2efee;
    --cs-badge-admin-yes-text: #2f615d;
    --cs-badge-admin-no-bg: #eaedf0;
    --cs-badge-admin-no-text: #61707d;
    --cs-badge-cat-bg: #eaedf0;
    --cs-badge-cat-text: #5c6b77;

    --cs-search-bg: #ffffff;
    --cs-search-border: #ccd3d9;
    --cs-search-icon: #a3b0bc;
    --cs-search-focus-shadow: rgba(75, 107, 148, 0.15);

    --cs-btn-action-bg: #ebf1f7;
    --cs-btn-action-text: #375273;
    --cs-btn-action-hover-bg: #dde6f0;
    --cs-btn-action-shadow: rgba(55, 82, 115, 0.04);
}

body {
    background-color: var(--cs-bg);
    color: var(--cs-text);
    font-family: var(--font-body);
    line-height: 1.7;
    padding-bottom: 90px;
}

h1, h2, h3, .article-section h2 {
    font-family: var(--font-title), serif;
    letter-spacing: -0.02em;
}

a {
    color: var(--cs-teal);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--cs-primary); text-decoration: underline; }

.navbar {
    background-color: var(--cs-primary) !important;
    padding: 0.75rem 0;
    box-shadow: 0 4px 12px var(--cs-navbar-shadow);
}
.navbar-brand {
    color: white !important;
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none !important;
}
.navbar-nav .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cs-navbar-link) !important;
    padding: 0.35rem 0.75rem;
    border-radius: 0.35rem;
    transition: all 0.2s;
}
.navbar-nav .nav-link:hover  { color: white !important; background: var(--cs-navbar-link-hover); }
.navbar-nav .nav-link.active { color: white !important; background: var(--cs-navbar-link-active); font-weight: 600; }

.site-header {
    background: linear-gradient(135deg, var(--cs-header-gradient-start) 0%, var(--cs-header-gradient-end) 100%);
    padding: 1.1rem 0 0.9rem;
    margin-bottom: 2rem;
    color: var(--cs-header-text);
}
.site-header-tagline {
    font-size: 1.3rem;
    opacity: 0.9;
    margin: 0;
}
.site-header-sync {
    font-size: 0.75rem;
    opacity: 0.65;
    margin: 0.2rem 0 0;
    display: block;
}
.pulse-icon {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.75);
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    background: var(--cs-primary);
    color: var(--cs-footer-text);
    padding: 0.75rem 0;
    font-size: 0.875rem;
    box-shadow: 0 -4px 12px var(--cs-footer-shadow);
}
footer a       { color: var(--cs-footer-link) !important; }
footer a:hover { color: white !important; text-decoration: underline; }
.footer-links  { display: flex; align-items: center; gap: 0.5rem; }
.sep           { opacity: 0.5; }

.article-card {
    border: 1px solid var(--cs-card-border);
    border-radius: 1rem;
    box-shadow: 0 4px 18px var(--cs-card-shadow);
    background: linear-gradient(180deg, var(--cs-card-bg-start) 0%, var(--cs-card-bg-end) 100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s ease;
    height: 100%;
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px var(--cs-card-shadow-hover);
    border-color: rgba(96, 165, 251, 0.4);
}

.article-card .card-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}

.article-card .card-body > .row.align-items-center {
    margin-bottom: 1rem;
}

.article-card .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cs-card-title-color);
    margin-bottom: 0.85rem;
    line-height: 1.4;
    display: block;
}

.article-card .card-text {
    font-size: 0.9rem;
    color: var(--cs-card-text-color);
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 0;
}

.article-card-apa {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--cs-olive);
    padding: 0.75rem 1.75rem;
    background-color: var(--cs-surface);
    border-top: 1px dashed var(--cs-cream);
    font-style: normal;
}
.article-card-apa em { font-style: italic; }

.article-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--cs-surface);
    padding: 1rem 1.75rem;
}

.article-card--read {
    border: 1px solid var(--cs-green-border) !important;
    background: linear-gradient(180deg, var(--cs-green-bg) 0%, #ffffff 120px) !important;
}
.article-card--read .card-title { color: var(--cs-green-text); }

.article-card--in-progress {
    border: 1px solid var(--cs-orange-border) !important;
    background: linear-gradient(180deg, var(--cs-orange-bg) 0%, #ffffff 120px) !important;
}
.article-card--in-progress .card-title { color: var(--cs-orange-text); }

.btn-read {
    background-color: var(--cs-btn-action-bg);
    color: var(--cs-btn-action-text) !important;
    border: none;
    border-radius: 2rem;
    padding: 0.45rem 1.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 2px 6px var(--cs-btn-action-shadow);
    transition: all 0.2s;
}
.btn-read:hover {
    background-color: var(--cs-btn-action-hover-bg);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}
.btn-read:active {
    transform: scale(0.98);
}

.badge-status-container {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: var(--cs-badge-new-bg);
    color: var(--cs-badge-new-text);
    border: 1px solid var(--cs-badge-new-border);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 10px;
    border-radius: 20px;
    vertical-align: middle;
}
.badge-dot {
    width: 5px;
    height: 5px;
    background-color: var(--cs-badge-new-text);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%   { transform: scale(1);   opacity: 1; }
    50%  { transform: scale(1.4); opacity: 0.7; }
    100% { transform: scale(1);   opacity: 1; }
}

.badge-read {
    display: inline-flex;
    align-items: center;
    background-color: var(--cs-green-bg);
    color: var(--cs-green-text);
    border: 1px solid var(--cs-green-border);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    vertical-align: middle;
}
.badge-read-inline {
    display: inline-flex;
    align-items: center;
    background-color: var(--cs-green-bg);
    color: var(--cs-green-text);
    border: 1px solid var(--cs-green-border);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.badge-in-progress {
    display: inline-flex;
    align-items: center;
    background-color: var(--cs-orange-bg);
    color: var(--cs-orange-text);
    border: 1px solid var(--cs-orange-border);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    vertical-align: middle;
}
.badge-in-progress-inline {
    display: inline-flex;
    align-items: center;
    background-color: var(--cs-orange-bg);
    color: var(--cs-orange-text);
    border: 1px solid var(--cs-orange-border);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.badge-read-yes { background: var(--cs-badge-admin-yes-bg); color: var(--cs-badge-admin-yes-text); font-size: .72rem; }
.badge-read-no  { background: var(--cs-badge-admin-no-bg); color: var(--cs-badge-admin-no-text);    font-size: .72rem; }

.cat-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--cs-badge-cat-bg);
    color: var(--cs-badge-cat-text);
}
.cat-default { background: rgba(148, 163, 184, 0.1); color: var(--cs-olive); }

.search-bar { width: 100%; }
.search-bar-inner {
    display: flex;
    align-items: center;
    background: var(--cs-search-bg);
    border: 1px solid var(--cs-search-border);
    border-radius: 3rem;
    padding: 0.3rem 0.3rem 0.3rem 1rem;
    transition: all .2s;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
}
.search-bar-inner:focus-within {
    border-color: var(--cs-teal);
    box-shadow: 0 0 0 3px var(--cs-search-focus-shadow);
}
.search-icon            { color: var(--cs-search-icon); flex-shrink: 0; }
.search-input           { flex: 1; border: none; outline: none; font-size: 0.9rem; background: transparent; color: var(--cs-text); min-width: 0; }
.search-input::placeholder { color: var(--cs-search-icon); }
.search-clear           { color: var(--cs-search-icon); font-size: 0.85rem; padding: 0 0.25rem; text-decoration: none; flex-shrink: 0; }
.search-clear:hover     { color: var(--cs-text); }
.search-submit          { background: var(--cs-primary); color: white; border: none; border-radius: 2rem; padding: 0.35rem 1.1rem; font-size: 0.82rem; font-weight: 600; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.search-submit:hover    { background: var(--cs-teal); }
.search-results-info    { font-size: .875rem; color: var(--cs-olive); border-left: 3px solid var(--cs-teal); padding-left: .75rem; }

.category-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1rem 0; }
.cat-filter-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.35em 1em;
    border-radius: 2rem;
    border: 1px solid var(--cs-border);
    text-decoration: none;
    background: white;
    color: var(--cs-text);
    transition: all 0.18s ease;
    min-height: 2rem;
}
.cat-filter-tag:hover {
    border-color: var(--cs-teal);
    color: var(--cs-teal);
    background: var(--cs-btn-action-bg);
}
.cat-filter-tag.active {
    background: var(--cs-primary);
    color: #fff !important;
    border-color: transparent !important;
}

.category-hero {
    background: var(--cs-surface);
    color: var(--cs-primary);
    padding: 2rem 0;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--cs-cream);
}
.category-hero h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--cs-primary) !important;
}
.category-hero p {
    opacity: 0.9;
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--cs-text);
}

.pubmed-keywords-block {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    overflow: hidden;
    max-width: 780px;
}
.pubmed-keywords-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pubmed-keywords-label {
    font-size: 0.7rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
}
.pubmed-keywords-code {
    display: block;
    padding: 0.9rem 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
}

.article-header {
    background: white;
    border-radius: 0.75rem;
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin-bottom: 1.5rem;
    border: 1px solid var(--cs-cream);
}
.article-header h1 { font-size: 1.9rem; color: var(--cs-primary); line-height: 1.35; }

.article-section {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin-bottom: 1.5rem;
    border: 1px solid var(--cs-cream);
}
.article-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cs-primary);
    border-left: 4px solid var(--cs-teal);
    padding-left: 0.75rem;
    text-transform: uppercase;
}

.pagination { gap: 0.35rem; }
.page-item .page-link {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 1px solid var(--cs-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cs-text);
    background: white;
}
.page-item.active .page-link {
    background: var(--cs-primary) !important;
    border-color: var(--cs-primary) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}
.page-item .page-link:hover:not(.active) {
    background-color: var(--cs-surface);
    color: var(--cs-primary);
}

.note-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    overflow: hidden;
    border: 1px solid var(--cs-cream);
}
.note-card-header {
    display: block;
    width: 100%;
    padding: 1rem 1.25rem;
    background: white;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
.note-card-header:hover { background: var(--cs-surface); }
.note-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--cs-primary);
}
.note-card-meta {
    font-size: 0.8rem;
    color: var(--cs-olive);
    white-space: nowrap;
}
.note-card-footer {
    padding: 0.5rem 1.25rem 0.75rem;
    border-top: 1px solid var(--cs-cream);
    background: var(--cs-surface);
}

.note-content {
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--cs-text);
}
.note-content h1, .note-content h2, .note-content h3 {
    font-family: var(--font-title);
    color: var(--cs-primary);
    margin: 1rem 0 0.5rem;
}
.note-content h2 { font-size: 1.2rem; }
.note-content h3 { font-size: 1rem; }
.note-content p  { margin: 0 0 0.75rem; }
.note-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.note-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.note-content li { margin-bottom: 0.25rem; }
.note-content strong { font-weight: 700; }
.note-content em     { font-style: italic; }
.note-content del    { opacity: 0.6; }
.note-content hr     { border: none; border-top: 1px solid var(--cs-cream); margin: 1rem 0; }
.note-content a      { color: var(--cs-teal); }
.note-content a:hover { color: var(--cs-primary); }
.note-content blockquote {
    border-left: 3px solid var(--cs-cream);
    margin: 0.75rem 0;
    padding: 0.25rem 1rem;
    color: var(--cs-olive);
    font-style: italic;
}

.card { border: 1px solid var(--cs-cream); border-radius: 0.75rem; box-shadow: 0 4px 12px rgba(0,0,0,.02); }

.btn-cs { background: var(--cs-btn-action-bg); color: var(--cs-btn-action-text); border: none; border-radius: 2rem; font-size: .85rem; padding: 0.45rem 1.25rem; font-weight: 600; transition: all 0.2s; }
.btn-cs:hover { background: var(--cs-btn-action-hover-bg); }

.card-admin-bar {
    border-top: 1px solid var(--cs-cream);
    background: var(--cs-bg);
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.admin-action-bar {
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
    border-radius: 0.6rem;
}

.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.32rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.btn-admin-edit                { background: var(--cs-btn-action-bg); color: var(--cs-btn-action-text) !important; }
.btn-admin-edit:hover          { background: var(--cs-btn-action-hover-bg); }

.btn-admin-read                { background: var(--cs-green-bg);   color: var(--cs-green-text) !important; border: 1px solid var(--cs-green-border); }
.btn-admin-read:hover          { background: #d1fae5; }

.btn-admin-unread              { background: var(--cs-surface);    color: var(--cs-text) !important; border: 1px solid var(--cs-border); }
.btn-admin-unread:hover        { background: var(--cs-cream); }

.btn-admin-in-progress         { background: var(--cs-orange-bg); color: var(--cs-orange-text) !important; border: 1px solid var(--cs-orange-border); }
.btn-admin-in-progress:hover   { background: #ffedd5; }

.btn-admin-in-progress-active  { background: #ffedd5; color: var(--cs-orange-text) !important; border: 1.5px solid var(--cs-orange-hover); }
.btn-admin-in-progress-active:hover { background: #fed7aa; }

.btn-admin-delete              { background: #fef2f2; color: #b91c1c !important; border: 1px solid #fecaca; padding: 0.32rem 0.65rem; }
.btn-admin-delete:hover        { background: #fee2e2; }

.admin-form .form-label { font-weight: 600; font-size: 0.875rem; color: var(--cs-primary); margin-bottom: 0.3rem; }
.admin-form .form-control,
.admin-form .form-select {
    border-radius: 0.5rem;
    border: 1.5px solid var(--cs-border);
    padding: 0.6rem 0.875rem;
    font-size: 0.9rem;
    background: var(--cs-bg);
    transition: all .2s;
}
.admin-form .form-control:focus,
.admin-form .form-select:focus {
    border-color: var(--cs-teal);
    box-shadow: 0 0 0 3px var(--cs-search-focus-shadow);
    background: white;
    outline: none;
}
.admin-form textarea.form-control         { min-height: 110px; resize: vertical; }
.admin-form .form-text                    { font-size: 0.8rem; color: var(--cs-olive); }
.admin-form .form-check-input:checked     { background-color: var(--cs-teal); border-color: var(--cs-teal); }
.admin-form .form-check-label             { font-size: 0.9rem; }
.admin-form .field-group                  { margin-bottom: 1.25rem; }

.section-label {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .72rem;
    color: var(--cs-olive);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--cs-cream);
    padding-bottom: .5rem;
}

.table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--cs-text); }
.table td { vertical-align: middle; }

.synthese-table { font-size: .8rem; }
.synthese-table thead th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}
.synthese-cell              { font-size: .8rem; line-height: 1.45; color: var(--cs-text); max-width: 220px; }
.synthese-cell span[title]  { cursor: help; }

.language-switcher-floating {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}
.language-switcher-floating .btn {
    border-radius: 50px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}
.btn-light {
    background: linear-gradient(145deg, var(--cs-primary), var(--cs-primary-hover)) !important;
    color: white !important;
    border: none !important;
    opacity: 1 !important;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}
.btn-outline-light.opacity-75 {
    background: linear-gradient(145deg, #ffffff, var(--cs-surface)) !important;
    color: var(--cs-primary) !important;
    border: 1.5px solid var(--cs-cream) !important;
    opacity: 0.85 !important;
}
.language-switcher-floating .btn:hover {
    opacity: 1 !important;
    transform: scale(1.18);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    border: 1.5px solid var(--cs-teal) !important;
    cursor: pointer;
}

/* ── Hamburger toggler (navbar sombre) ──────────────────────────── */
.navbar-toggler {
    border-color: rgba(255,255,255,0.35);
    padding: 0.3rem 0.55rem;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2c255%2c255%2c0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(255,255,255,0.2); }

/* ── Mobile ≤ 767px ─────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    body { padding-bottom: 70px; }

    /* Navbar collapse */
    .navbar-collapse { padding: 0.75rem 0 0.5rem; }
    .navbar-collapse .navbar-nav.flex-row {
        flex-direction: column !important;
        margin-left: 0 !important;
        gap: 0.15rem !important;
    }
    .navbar-collapse .navbar-nav .nav-link { padding: 0.55rem 0.75rem; }
    .navbar-collapse .ms-auto {
        margin-left: 0 !important;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255,255,255,0.15);
        flex-wrap: wrap;
    }

    /* Language switcher — masqué sur mobile */
    .language-switcher-floating { display: none !important; }

    /* Category filters */
    .category-filters  { gap: 0.35rem; }
    .cat-filter-tag    { flex: 1 1 calc(50% - 0.25rem); min-height: 2.5rem; font-size: 0.72rem; }
    .cat-badge         { font-size: 0.65rem; }

    /* Category hero */
    .category-hero     { padding: 1.25rem 0 1rem; }
    .category-hero h1  { font-size: 1.4rem; }

    /* Article header/section */
    .article-header,
    .article-section   { padding: 1.25rem; }
    .article-header h1 { font-size: 1.35rem; }

    /* Article cards */
    .article-card .card-body   { padding: 1.25rem; }
    .article-card .card-footer { padding: 0.75rem 1.25rem; }
    .article-card-apa          { padding: 0.6rem 1.25rem; }
    .article-card:hover        { transform: none; }

    /* Admin bars */
    .admin-action-bar  { padding: 0.75rem !important; }
    .card-admin-bar    { flex-wrap: wrap; padding: 0.5rem 0.75rem; gap: 0.35rem; }
    .btn-admin         { font-size: 0.75rem; padding: 0.3rem 0.7rem; }

    /* Footer */
    footer .d-flex { flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; }

    /* Notes */
    .note-card-meta { white-space: normal; }

    /* Tables — scroll horizontal */
    .table-responsive { -webkit-overflow-scrolling: touch; }
    .synthese-table   { min-width: 700px; }

    /* Pubmed keywords */
    .pubmed-keywords-block { max-width: 100%; }
    .pubmed-keywords-code  { font-size: 0.72rem; overflow-x: auto; }

    /* Site header */
    .site-header         { padding: 1rem 0 0.85rem; }
    .site-header-tagline { font-size: 1.1rem; }

    /* Resources */
    .resources-banner .container { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .resources-page-hero h1      { font-size: 1.5rem; }
}

/* ── Très petits écrans ≤ 479px ─────────────────────────────────── */
@media (max-width: 479.98px) {
    .cat-filter-tag    { flex: 1 1 100%; }
    .article-header h1 { font-size: 1.2rem; }
    .article-header,
    .article-section   { padding: 1rem; }
    .article-card .card-body { padding: 1rem; }
    .btn-admin         { font-size: 0.72rem; padding: 0.28rem 0.55rem; }
    .search-submit     { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
}

/* ── Desktop ≥ 768px ────────────────────────────────────────────── */
@media (min-width: 768px) {
    .category-hero    { padding: 3rem 0; text-align: left; }
    .category-hero h1 { font-size: 2.5rem; }
    .category-hero p  { margin: 0; font-size: 1.1rem; }
}

.btn-favorite-star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-favorite-star:hover {
    transform: scale(1.15);
}

.btn-favorite-star svg {
    vertical-align: middle;
}

.btn-favorite-star-card {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.btn-favorite-star-card:hover {
    transform: scale(1.2);
}

.btn-favorite-star-card .text-muted:hover {
    color: var(--cs-gold) !important;
}

.resources-banner {
    background: #fef9ee;
    border-bottom: 2px solid var(--cs-gold);
    padding: 0.55rem 0;
}
.resources-banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.resources-banner__text {
    font-size: 0.875rem;
    color: var(--cs-primary);
    opacity: 0.9;
}
.resources-banner__link {
    font-size: 0.82rem;
    font-weight: 600;
    color: #8a6000 !important;
    background: #fdefc0;
    border: 1px solid #e8c84a;
    border-radius: 2rem;
    padding: 0.25rem 0.9rem;
    white-space: nowrap;
    text-decoration: none !important;
    transition: all 0.2s;
    flex-shrink: 0;
}
.resources-banner__link:hover {
    background: #fce49a;
    border-color: var(--cs-gold);
    color: #6b4a00 !important;
}

.resources-page-hero {
    background: linear-gradient(135deg, #4a3800 0%, #7a6000 100%);
    color: white;
    padding: 2rem 0 1.75rem;
    margin-bottom: 2rem;
}
.resources-page-hero h1 {
    font-family: var(--font-title);
    font-size: 2rem;
    margin: 0.25rem 0 0.5rem;
    color: white;
}
.resources-page-hero p {
    opacity: 0.85;
    margin: 0;
    font-size: 1rem;
}
.resources-page-back {
    display: inline-block;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none !important;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}
.resources-page-back:hover { color: white !important; }
