:root {
  --mdc-elevation-1: 0px 1px 3px rgba(0,0,0,0.12);
  --border-radius: 6px;
  font-family: 'Roboto', sans-serif;
}

/* ----- Thème sombre (par défaut) ----- */
.theme-dark {
    --bg-color: #121212;
    --text-color: #e4e4e4;
    --card-bg: #1e1e1e;
    --card-border: #333;
    --link-color: #4da3ff;
    --link-hover: #82c3ff;
    --appbar-bg: #1a1a1a;
    --footer-bg: #1a1a1a;
}

body.theme-dark {
    background: var(--bg-color);
    color: var(--text-color);
}

/* ----- Thème clair ----- */
.theme-light {
    --bg-color: #ffffff;
    --text-color: #222222;
    --card-bg: #f8f8f8;
    --card-border: #e0e0e0;
    --link-color: #0077cc;
    --link-hover: #005fa3;
    --appbar-bg: #fafafa;
    --footer-bg: #f1f1f1;
}

body.theme-light {
    background: var(--bg-color);
    color: var(--text-color);
}

/* ----- Styles communs utilisant les variables ----- */
.app-bar {
    background: var(--appbar-bg);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 0;
}

a {
    color: var(--link-color);
}
a:hover {
    color: var(--link-hover);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card__title a {
    color: var(--text-color);
}

.footer {
    background: var(--footer-bg);
    padding: 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--card-border);
}


/* Bouton flottant clair/sombre */
.theme-switcher {
    display:flex;
    align-items:center;
    justify-content: center;
    top: 20px;
    right: 10px;
    z-index: 2000;

    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.6rem 0.8rem;
    font-size: 1.2rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.2s;
}

.theme-switcher:hover {
    background: var(--card-border);
    transform: scale(1.05);
}

body {
  margin: 0;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 16px;
  line-height: 1.5;
}


.app-bar {
  background: var(--bg-color);
  color: var(--text-color);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.app-bar__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}


.nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
 color: var(--text-color);
  text-decoration: none;
  margin-left: 1rem;
}
.nav a:hover {
  text-decoration:none;
}
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}
.feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card-bg);
  box-shadow: var(--mdc-elevation-1);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0px 3px 6px rgba(0,0,0,0.15);
}
.card__image img {
  width: 100%;
  height: auto;
  display: block;
}
.card__content {
  padding: 1rem;
}
.card__time {
  font-size: 0.875rem;
  color: #666;
}
.card__title {
  font-size: 1.25rem;
  margin: 0.5rem 0;
}
.card__title a {
  color: inherit;
  text-decoration: none;
}
.card__title a:hover {
  text-decoration: underline;
}
.card__source {
  font-size: 0.875rem;
  color: #999;
}
.card__desc {
  font-size: 0.9rem;
  /*color: inherit;*/
  color: var(--text-color);
}
.footer {
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #777;
}
