:root {
  --bg: #eef0f2; --ink: #1b2430; --muted: #5d6877; --accent: #c92c7a;
  --on-accent: #fff; --line: #cfd5dc; --gap: 12px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161b22; --ink: #e8ecf1; --muted: #98a3b1; --accent: #7b8cff; --on-accent: #10131a; --line: #2c3440; }
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--ink); line-height: 1.6;
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main.wrap { flex: 1; padding-top: 40px; padding-bottom: 64px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Bandeau : image de fond fluide, logo en haut à gauche, titre */
.banner {
  /* Votre image : placez-la dans le dossier images/ et gardez ce nom, ou changez le chemin */
  --banner-img: url("images/bandeau.png");
  position: relative; color: #fff;
  min-height: clamp(220px, 30vw, 360px);
  display: flex; flex-direction: column;
  background-image:
    var(--banner-img),
    linear-gradient(135deg, #c92c7a, #17bebb);                /* couleur de secours */
  background-size: contain;            /* l'image s'adapte à la largeur */
  background-position: center;
  background-repeat: no-repeat;
}
.banner--compact { min-height: clamp(150px, 16vw, 210px); }
.banner .wrap { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; padding-top: 20px; }
.brand { display: inline-block; line-height: 0; }
.brand img { height: 48px; width: auto; display: block; }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: #fff; text-decoration: none; font-weight: 600; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-color: rgba(255,255,255,.5); }
.site-nav a[aria-current="page"] { border-color: #fff; }
.banner-text { width: 100%; max-width: 1200px; margin: auto auto 0; padding: 24px 24px 32px; }
.banner-title { font-size: clamp(2rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.banner-sub { margin-top: 10px; max-width: 46ch; opacity: .9; }
.banner a:focus-visible { outline-color: #fff; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; }
.site-footer a { color: var(--muted); }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.intro p { color: var(--muted); max-width: 36ch; }



/* Filtres + grille */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button { font: inherit; font-weight: 600; font-size: .95rem; padding: 8px 16px; border-radius: 0px; cursor: pointer;
  border: 1.5px solid var(--line); background: transparent; color: var(--ink); transition: background .15s, color .15s, border-color .15s; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filters .count { opacity: .65; font-weight: 400; margin-left: 6px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); --gap: 8px; } }
.item { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border: 0; padding: 0; cursor: pointer; background: var(--line); border-radius: 4px; display: block; width: 100%; }
.item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.item:hover img, .item:focus-visible img { transform: scale(1.05); }
.item .caption { position: absolute; inset: auto 0 0 0; padding: 28px 12px 10px; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-weight: 600; font-size: .95rem; opacity: 0; transition: opacity .2s; }
.item:hover .caption, .item:focus-visible .caption { opacity: 1; }
.item[hidden] { display: none; }
.item.enter { animation: pop .3s ease both; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* Lightbox : plein écran, image centrée, flèches et bouton de fermeture */
dialog { border: 0; padding: 0; background: transparent; color: #fff; }
dialog[open] {
  display: flex; align-items: center; justify-content: center;
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0;
}
dialog::backdrop { background: rgba(10, 14, 20, .92); }
.lb-figure { display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: min(88vw, 1100px); max-height: 92vh; }
.lb-figure img { display: block; max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 4px; }
.lb-figure figcaption { margin-top: 12px; font-weight: 600; text-align: center; }
.lb-figure figcaption span { opacity: .7; font-weight: 400; margin-left: 8px; }
.lb-btn {
  position: fixed; display: grid; place-items: center; width: 48px; height: 48px;
  border: 0; border-radius: 50%; cursor: pointer; font: inherit; font-size: 1.6rem; line-height: 1;
  background: rgba(255,255,255,.14); color: #fff; transition: background .15s;
}
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.lb-close { top: 20px; right: 20px; font-size: 1.3rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-btn[hidden] { display: none; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lb-figure img { max-height: 70vh; }
}

/* Pages de texte (contact, mentions légales) */
.page { max-width: 760px; }
.page h1 { margin-bottom: 32px; }
.page h2 { font-size: 1.3rem; margin: 36px 0 8px; letter-spacing: -0.01em; }
.page p, .page li { max-width: 68ch; }
.page p + p { margin-top: 12px; }
.page ul { padding-left: 1.2em; }
.todo { background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 0 4px; border-radius: 3px; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 980px; }
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; gap: 32px; } }
.contact-layout h2 { font-size: 1.3rem; margin-bottom: 8px; }
.details { list-style: none; padding: 0; margin-top: 16px; }
.details li { padding: 10px 0; border-top: 1px solid var(--line); }
.details strong { display: block; font-size: .9rem; color: var(--muted); font-weight: 600; }
form label { display: block; font-weight: 600; margin-bottom: 4px; }
form .field { margin-bottom: 16px; }
form input, form textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); }
form textarea { min-height: 150px; resize: vertical; }
form button { font: inherit; font-weight: 600; padding: 10px 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .item img, .filters button { transition: none; } .item.enter { animation: none; }
}

/* Image de fond fixe (page d'accueil) : elle reste en place quand on fait défiler la page */
.has-fixed-bg {
  --page-img: url("images/cheval-grand.png");   /* votre image */
  --veil: 0%;                          /* 0% = image pure, 100% = fond uni */
}
.has-fixed-bg::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(color-mix(in srgb, var(--bg) var(--veil), transparent), color-mix(in srgb, var(--bg) var(--veil), transparent)),
    var(--page-img);
  background-size: contain; background-position: top; background-repeat: no-repeat;
}
.has-fixed-bg .site-footer { background: color-mix(in srgb, var(--bg) 85%, transparent); }
