/* fun.css : à charger APRÈS ta feuille de style actuelle.
   Pour tout annuler, retire simplement la ligne <link> qui l'appelle.
   Les 6 couleurs ci-dessous se changent à volonté. */
@import url("https://fonts.googleapis.com/css2?family=Pangolin&display=swap");

:root {
  --fond: #c9823e;
  --encre: #2a1b4d;
  --vert: #7ce38b;
  --rose: #ff8fc7;
  --jaune: #ffd84d;
  --blanc: #fffdf8;
  --orange: #ff853b;
}

body {
  font-family: "Pangolin", "Comic Sans MS", cursive, sans-serif;
  /*background-color: var(--fond);*/
  background-image: url('../images/citrouille.webp');
  background-size: 198px; /*ancien 26px 26px*/
  color: var(--encre);
  line-height: 1.6;
}

h1 {
  /*display: inline-block;*/
  transform: rotate(-1.5deg);
  padding: 11px .3em;
  text-align:center;
  color: var(--blanc);
}
h2 {
  display: inline-block;
  background: linear-gradient(transparent 60%, var(--orange) 60%);

}

a { color: var(--encre); text-decoration-color: var(--rose); text-decoration-thickness: .2em; text-underline-offset: .12em; }
a:hover { background: var(--rose); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }

img {
  max-width: 100%;
  height: auto;
  border: 3px solid var(--encre);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--encre);
}
hr { border: 0; border-top: 3px dashed var(--encre); margin: 2rem 0; }

/* ---------- Page galerie ---------- */
.galerie { max-width: 80rem; margin: 0 auto; padding: 1.25rem; }

.menu, .filtres { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.menu a, .filtres button {
  font: inherit;
  color: var(--encre);
  background: var(--blanc);
  border: 3px solid var(--encre);
  border-radius: 5px;
  padding: .2rem 1rem;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--encre);
  cursor: pointer;
}
.menu a:hover, .filtres button:hover { background: var(--jaune); }
.menu a[aria-current="page"], .filtres button[aria-pressed="true"] { background: var(--orange); }

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1.75rem;
  padding: 0;
  list-style: none;
}
.objet {
  background: var(--blanc);
  border: 3px solid var(--encre);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--encre);
  overflow: hidden;
  transition: transform .15s;
}
.objet:nth-child(odd) { transform: rotate(-1deg); }
.objet:nth-child(even) { transform: rotate(1deg); }
.objet:hover { transform: rotate(0) scale(1.03); }
.objet[hidden] { display: none; }

.couv {
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  font-size: 3rem;
  border-bottom: 3px solid var(--encre);
}
.couv img { width: 100%;height: 100%; object-fit: cover; border: 0; border-radius: 0; box-shadow: none; }
[data-cat="livre"] .couv { background: var(--rose); }
[data-cat="film"] .couv { background: var(--jaune); }
[data-cat="musique"] .couv { background: var(--vert); }
[data-cat="autre"] .couv { background: var(--fond); }

.texte { padding: .75rem 1rem 1rem; }
.objet h2 { display: block; background: none; font-size: 1.2rem; margin: 0; }
.objet p { margin: .25rem 0 0; font-size: .95rem; }
.objet .auteur { font-weight: bold; }

/* ---------- Page Microbloging ---------- */

.log {
    background: var(--blanc);
    border: 3px solid var(--encre);
    border-radius: 10px;
    margin: 1.25rem 0;
    overflow: hidden;
    box-shadow: 5px 5px 0 var(--encre);
}

.log > h2 {
    display: block;
    margin: 0;
    border-radius: 0;
    padding: .3rem .9rem;
    background: linear-gradient(90deg, var(--encre), var(--vert));
    color: var(--blanc);
}

.post {
    list-style: none;
    margin: 0;
    padding: 0 .9rem .9rem;
}

@media (prefers-reduced-motion: reduce) {
  .objet { transition: none; }
}
