@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&display=swap');

:root {
  --fond: #0b0a0d;
  --carte: #14121a;
  --texte: #ece8e1;
  --atténue: #9a93a3;
  --accent: #c1121f;
  --accent-clair: #e63946;
  --bordure: #2a2530;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(193, 18, 31, .08), transparent),
    var(--fond);
  color: var(--texte);
  line-height: 1.6;
}

h1, h2, h3 { font-family: "Cinzel", Georgia, serif; }

/* --- En-tête --- */

.hero {
  text-align: center;
  padding: 4.5rem 1rem 4rem;
  border-bottom: 1px solid var(--bordure);
}

.ouroboros {
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(193, 18, 31, .45));
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 6vw, 3.1rem);
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--texte);
  text-shadow: 0 0 30px rgba(193, 18, 31, .25);
}

.accroche { color: var(--atténue); margin-top: .7rem; font-size: 1.05rem; font-style: italic; }

.liens { margin-top: 1.8rem; display: flex; justify-content: center; gap: 2rem; }

.liens a {
  font-family: "Cinzel", Georgia, serif;
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--texte);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color .2s, border-color .2s;
}

.liens a:hover { border-color: var(--accent); color: var(--accent-clair); }

/* --- Sections --- */

main { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }

section { padding: 3.5rem 0; border-bottom: 1px solid var(--bordure); }

section:last-of-type { border-bottom: none; }

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

h2::before { content: "◈ "; color: var(--accent); }

code {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 4px;
  padding: .1em .35em;
  font-size: .9em;
}

/* --- Filtres par tag --- */

.filtres-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }

.filtres-tags button {
  background: transparent;
  color: var(--atténue);
  border: 1px solid var(--bordure);
  border-radius: 2px;
  padding: .3rem .9rem;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.filtres-tags button:hover { color: var(--texte); border-color: var(--atténue); }

.filtres-tags button.actif {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(193, 18, 31, .4);
}

/* --- Grille de projets --- */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.1rem;
}

.carte {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 4px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  position: relative;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.carte::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .18s;
}

.carte:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(193, 18, 31, .18);
}

.carte:hover::before { opacity: 1; }

.carte-entete { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }

.carte h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; }

.annee { color: var(--accent-clair); font-size: .85rem; white-space: nowrap; font-family: "Cinzel", Georgia, serif; }

.desc { color: var(--atténue); font-size: .95rem; flex: 1; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }

.tags li {
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-clair);
  background: rgba(193, 18, 31, .12);
  border: 1px solid rgba(193, 18, 31, .25);
  border-radius: 2px;
  padding: .15rem .6rem;
}

.lien-projet {
  color: var(--accent-clair);
  text-decoration: none;
  font-size: .9rem;
  align-self: flex-start;
  letter-spacing: .04em;
}

.lien-projet:hover { text-decoration: underline; text-shadow: 0 0 12px rgba(230, 57, 70, .5); }

.vide { color: var(--atténue); }

/* --- Contact / pied --- */

.contact { list-style: none; display: flex; flex-direction: column; gap: .5rem; }

.contact a { color: var(--accent-clair); text-decoration: none; }

.contact a:hover { text-decoration: underline; }

.pied {
  text-align: center;
  color: var(--atténue);
  font-size: .85rem;
  font-style: italic;
  padding: 2rem 1rem;
  border-top: 1px solid var(--bordure);
}
