/* ==========================================================================
   Feuille de style partagée par TOUTES les pages du site
   (pages écrites à la main + publications.html générée par gen_biblio_html.py)
   ========================================================================== */

:root { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
        color: #1f2937; background: #f8fafc; line-height: 1.5; }
body { margin: 0; padding: 1.5rem 1.25rem 4rem; }
a { color: #3730a3; }
header h1 { font-size: 1.6rem; margin-bottom: 0.2rem; }
.meta { color: #6b7280; font-size: 0.85rem; margin-bottom: 1rem; }
footer { margin-top: 3rem; color: #9ca3af; font-size: 0.78rem; }

/* --- Mise en page : menu à gauche, contenu à droite ----------------------- */
.layout { max-width: 1100px; margin: 0 auto; display: grid;
          grid-template-columns: 200px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.sidebar { position: sticky; top: 1.5rem; }
main { min-width: 0; max-width: 820px; }

.site-nav { display: flex; flex-direction: column; gap: 0.3rem; }
.site-nav a { padding: 0.4rem 0.9rem; border-radius: 8px; font-size: 0.9rem;
              font-weight: 600; text-decoration: none; color: #3730a3; }
.site-nav a:hover { background: #eef2ff; }
.site-nav a[aria-current="page"] { background: #3730a3; color: #fff; }
.photo { display: block; width: 100%; max-width: 200px; aspect-ratio: 1 / 1;
         object-fit: cover; border-radius: 12px; margin-top: 1.5rem;
         border: 1px solid #e5e7eb; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; gap: 1rem; }
  .sidebar { position: static; display: flex; align-items: center;
             gap: 1rem; flex-wrap: wrap; padding-bottom: 0.75rem;
             border-bottom: 1px solid #e5e7eb; }
  .site-nav { flex-direction: row; flex-wrap: wrap; }
  .photo { width: 64px; margin-top: 0; border-radius: 50%; }
}

/* --- Pastilles (liens) ---------------------------------------------------- */
.pill, .cats a { display: inline-block; margin: 0.15rem 0.35rem 0.15rem 0;
                 padding: 0.15rem 0.6rem; background: #eef2ff; color: #3730a3;
                 border-radius: 999px; font-size: 0.78rem; text-decoration: none; }
.pill:hover, .cats a:hover { background: #e0e7ff; }
.pill { font-size: 0.9rem; padding: 0.3rem 0.9rem; }
.cats a small { color: #6366f1; }

/* --- Sections ------------------------------------------------------------- */
section h2 { font-size: 1.15rem; border-bottom: 2px solid #c7d2fe;
             padding-bottom: 0.25rem; margin-top: 2.2rem; }

/* --- Page d'accueil ------------------------------------------------------- */
.hero { margin: 1rem 0 0.5rem; }
.hero h1 { font-size: 2.1rem; margin: 0; }
.hero .role { font-size: 1.1rem; color: #374151; margin: 0.2rem 0 0; }
.hero .affil { color: #6b7280; font-size: 0.9rem; margin: 0.2rem 0 0; }
.cards { display: grid; gap: 1rem; margin-top: 1rem;
         grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
        padding: 1rem 1.1rem; }
.card h3 { margin: 0 0 0.4rem; font-size: 1rem; color: #3730a3; }
.card p, .card ul { margin: 0; font-size: 0.9rem; }
.card ul { padding-left: 1.1rem; }
.links { margin-top: 0.8rem; }

/* --- Page des publications (générée) -------------------------------------- */
.cats { position: sticky; top: 0; background: #f8fafc; padding: 0.5rem 0;
        border-bottom: 1px solid #e5e7eb; margin-bottom: 1.5rem; z-index: 10; }
ol { list-style: none; padding-left: 0; }
ol li { padding: 0.45rem 0; border-bottom: 1px dotted #e5e7eb; }
.code { display: inline-block; min-width: 4.2em; font-family: ui-monospace, monospace;
        font-size: 0.78rem; color: #374151; background: #f3f4f6;
        border-radius: 4px; padding: 0 0.35rem; margin-right: 0.35rem; }
.me { font-weight: 600; color: #0a7d33; }
em.journal { font-style: italic; }
.badge { display: inline-block; margin-left: 0.3rem; padding: 0.05rem 0.55rem;
         border-radius: 999px; font-size: 0.72rem; text-decoration: none;
         font-weight: 600; }
.hal { background: #fff1e5; color: #b45309; border: 1px solid #fdba74; }
.zenodo { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; }
.doi { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }

/* Entrée ciblée par un lien (publications.html#ACL33) : surlignée */
ol li:target { background: #eef2ff; border-radius: 6px; padding-left: 0.5rem;
               padding-right: 0.5rem; }
ol li { scroll-margin-top: 4rem; }
