:root{
  --fond:#f7f6f3;
  --fond-carte:#ffffff;
  --fond-survol:#efede8;
  --texte:#1c1c1a;
  --texte-doux:#6b6b64;
  --accent:#3a6b1f;
  --accent-fond:#e3edd8;
  --bordure:#e0ded8;
  --ombre:0 1px 3px rgba(0,0,0,.06);
}

@media (prefers-color-scheme:dark){
  :root{
    --fond:#161716;
    --fond-carte:#1f201e;
    --fond-survol:#2a2b28;
    --texte:#e8e8e4;
    --texte-doux:#9a9a92;
    --accent:#a5d66f;
    --accent-fond:#2b3a1c;
    --bordure:#31322e;
    --ombre:none;
  }
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
  background:var(--fond);
  color:var(--texte);
  line-height:1.5;
  display:flex;
  flex-direction:column;
  height:100vh;
}

/* En-tête */
#top{
  display:flex;
  align-items:baseline;
  gap:16px;
  padding:14px 24px;
  border-bottom:1px solid var(--bordure);
  background:var(--fond-carte);
}
#top h1{font-size:20px;margin:0;font-weight:700;letter-spacing:-.02em}
#etat{font-size:13px;color:var(--texte-doux)}

/* Disposition */
#layout{flex:1;display:flex;min-height:0}

#side{
  width:260px;
  flex-shrink:0;
  overflow-y:auto;
  border-right:1px solid var(--bordure);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:2px;
}

#main{flex:1;overflow-y:auto;padding:24px 32px;max-width:860px}

/* Boutons flux */
.flux{
  display:block;
  width:100%;
  text-align:left;
  padding:8px 12px;
  border:0;
  border-radius:8px;
  background:none;
  color:var(--texte);
  font:inherit;
  font-size:14px;
  cursor:pointer;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.flux:hover{background:var(--fond-survol)}
.flux:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.flux.on{background:var(--accent-fond);color:var(--accent);font-weight:600}

/* Articles */
.date-groupe{
  font-size:13px;
  font-weight:700;
  text-transform:capitalize;
  color:var(--texte-doux);
  margin:28px 0 10px;
  padding-bottom:6px;
  border-bottom:1px solid var(--bordure);
}
.date-groupe:first-child{margin-top:0}

.art{
  background:var(--fond-carte);
  border:1px solid var(--bordure);
  border-radius:10px;
  padding:14px 18px;
  margin-bottom:10px;
  box-shadow:var(--ombre);
}
.art a{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
  font-size:16px;
}
.art a:hover{text-decoration:underline}
.art .meta{
  font-size:12.5px;
  color:var(--texte-doux);
  margin:4px 0 0;
}
.art .meta .src{font-weight:600}
.art p{
  margin:8px 0 0;
  font-size:14px;
  color:var(--texte-doux);
}

.msg{color:var(--texte-doux);padding:20px 0}
.erreur{color:#c0392b}

/* Mobile */
@media (max-width:700px){
  #layout{flex-direction:column}
  #side{
    width:100%;
    flex-direction:row;
    overflow-x:auto;
    border-right:0;
    border-bottom:1px solid var(--bordure);
    padding:8px;
  }
  .flux{width:auto;flex-shrink:0}
  #main{padding:16px}
}
