

/* ---------- Galerie /modeles ---------- */
.gal-tools { display: flex; flex-wrap: wrap; gap: var(--s-1h); margin-top: var(--s-2); width: 100%; max-width: 720px; }
.gal-search { flex: 1 1 320px; display: flex; align-items: center; gap: var(--s-1); min-height: 56px; padding: 0 var(--s-2); border-radius: var(--r-pill); background: var(--c-bg); border: 1px solid var(--c-line); box-shadow: var(--shadow-soft); }
.gal-search:focus-within { border-color: var(--c-ia); }
.gal-search .ic { color: var(--c-ink-3); }
.gal-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: var(--fs-16); color: var(--c-ink); outline: none; }
.gal-filter { position: relative; flex: none; }
.gal-filter summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-1); min-height: 56px; padding: 0 var(--s-3); border-radius: var(--r-pill); background: var(--c-bg); border: 1px solid var(--c-line); font-family: var(--f-title); font-weight: 500; }
.gal-filter summary::-webkit-details-marker { display: none; }
.gal-filter summary .ic { width: 18px; height: 18px; color: var(--c-ia); transition: transform .2s; }
.gal-filter[open] summary .ic, .gal-filter.is-on summary .ic { transform: rotate(45deg); }
.gal-filter.is-on summary { border-color: var(--c-ia); color: var(--c-ia); }
.gal-filter { width: 100%; }
.gal-filter summary { width: 100%; justify-content: center; }
/* Mobile : la liste s'ouvre sous le bouton, dans le flux de la page (pas de menu qui dépasse de l'écran) */
.gal-filter-panel { margin-top: var(--s-1); padding: var(--s-1); border-radius: var(--r-lg); background: var(--c-bg); border: 1px solid var(--c-line); box-shadow: var(--shadow-soft); text-align: left; }
@media (min-width: 641px) {
  .gal-filter { width: auto; }
  .gal-filter summary { width: auto; }
  /* Menu calé sur le bord droit du bouton, pour ne jamais sortir de l'écran à droite */
  .gal-filter-panel { position: absolute; z-index: 20; top: calc(100% + var(--s-1)); right: 0; margin-top: 0; width: min(calc(100vw - 2 * var(--s-2)), 520px); max-height: min(70vh, 520px); overflow: auto; box-shadow: var(--shadow); }
}
.gal-filter-all { width: 100%; min-height: 40px; margin-bottom: var(--s-05); padding: 0 var(--s-1h); border-radius: var(--r-sm); border: 0; background: var(--c-bg-alt); font: inherit; font-family: var(--f-title); font-weight: 500; text-align: left; cursor: pointer; }
.gal-filter-all:hover { color: var(--c-ia); }
.gal-filter-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.gal-filter-sector { display: flex; align-items: center; min-height: 40px; padding: 0 var(--s-1h); border-radius: var(--r-sm); color: var(--c-ink); font-weight: 500; text-decoration: none; }
.gal-filter-sector:hover, .gal-filter-sector:focus-visible { background: var(--c-ia-soft); color: var(--c-ia-strong); }
.gal-filter-sector[aria-current="true"] { background: var(--c-ia); color: var(--c-on-dark); }
@media (min-width: 641px) { .gal-filter-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-05); } }
/* Secteur choisi : lien vers sa page, à droite du titre (le nombre de résultats n'est lu que par les lecteurs d'écran) */
.gal-note { margin-left: auto; }
.gal-note[hidden] { display: none; }
.page-hero-in .gal-tools { margin-inline: auto; justify-content: center; }

.gal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-1); margin-bottom: var(--s-3); }
.gal-count { color: var(--c-ink-3); font-size: var(--fs-14); }
.gal { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.gal-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--c-bg); border: 1px solid var(--c-line); transition: box-shadow .2s, border-color .2s; }
.gal-card:hover { border-color: var(--c-ia-line); box-shadow: var(--shadow-soft); }
.gal-card[hidden] { display: none; }
.gal-shot .mq { border: 0; border-bottom: 1px solid var(--c-line); border-radius: 0; }
.gal-body { display: flex; flex-direction: column; gap: var(--s-05); padding: var(--s-2) var(--s-2) var(--s-3); }
.gal-name { font-family: var(--f-title); font-weight: 600; font-size: var(--fs-18); }
.gal-name a { color: inherit; text-decoration: none; }
.gal-name a:hover { color: var(--c-ia); }
.gal-empty { padding: var(--s-4); text-align: center; color: var(--c-ink-2); }

@media (prefers-reduced-motion: reduce) { .gal-card, .gal-filter summary .ic { transition: none; } }
@media (min-width: 641px) { .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1101px) { .gal { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

