/* ============================================================================
 *  DESIGN 2 — style.css  « La Planche »
 * ============================================================================
 *  FR : Grille dense, vignettes carrées, voile au survol. Palette neutre,
 *       fond légèrement plus sombre pour faire ressortir les images.
 *  EN : Dense grid, square thumbnails, hover overlay. Neutral palette, a
 *       slightly darker ground so the images pop.
 * ========================================================================== */

:root {
  --ink:    #f5f5f5;   /* FR: texte clair sur fond sombre EN: light text on dark */
  --paper:  #141414;   /* FR: fond sombre  EN: dark background */
  --muted:  #9a9a9a;
  --line:   #2a2a2a;
  --accent: #c9b27e;   /* FR: accent sable discret EN: subtle sand accent */
  --max:    1300px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ----- EN-TÊTE / HEADER --------------------------------------------------- */
.site-header { padding: 2.5rem 1.5rem 0; max-width: var(--max); margin: 0 auto; }
.header-inner {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.name { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
.role { color: var(--muted); margin-top: 0.35rem; font-size: 0.95rem; }

.lang-btn {
  flex-shrink: 0; background: transparent; border: 1px solid var(--line);
  color: var(--ink); padding: 0.4rem 0.8rem; border-radius: 999px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; transition: background 0.15s, color 0.15s;
}
.lang-btn:hover { background: var(--ink); color: var(--paper); }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ----- FILTRES / FILTERS -------------------------------------------------- */
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.8rem; }
.filter {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer;
  font-size: 0.9rem; transition: all 0.15s;
}
.filter:hover { color: var(--ink); border-color: var(--muted); }
.filter--active { color: var(--paper); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ----- LA PLANCHE / THE SHEET --------------------------------------------- */
.sheet {
  max-width: var(--max); margin: 2rem auto 4rem; padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem; /* FR: serré, façon planche-contact EN: tight, contact-sheet feel */
}
.tile {
  position: relative; overflow: hidden; aspect-ratio: 1 / 1;
  background: var(--line); cursor: pointer;
}
.tile-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s, filter 0.4s;
  filter: grayscale(0.15);
}
.tile:hover .tile-img { transform: scale(1.05); filter: grayscale(0); }

/* FR : voile sombre qui apparaît au survol avec le texte.
   EN : dark overlay that appears on hover with the text. */
.tile-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0) 60%);
  opacity: 0; transition: opacity 0.3s;
}
.tile:hover .tile-overlay,
.tile:focus-within .tile-overlay { opacity: 1; }
.tile-cat { color: var(--accent); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.tile-title { color: #fff; font-weight: 600; font-size: 0.95rem; margin-top: 0.15rem; }

/* ----- PIED DE PAGE / FOOTER ---------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 2rem 1.5rem; text-align: center;
  color: var(--muted); font-size: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .tile:hover .tile-img { transform: none; }
}
