/* ═══════════════════════════════════════
   DEFAULTS — styles globaux / tous pages
   ═══════════════════════════════════════ */

/* ── Reset ──────────────────────────────── */
* { margin: 0; padding: 0; }

html {
  font-family: sans-serif;
  line-height: var(--line-height);
  font-weight: normal;
  color: var(--color-black);
  background: var(--color-white);
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: 0 auto;
}

/* ── Liens ──────────────────────────────── */
a:any-link {
  color: currentColor;
  color: var(--color-grey-500);
  text-decoration: underline;
}

/* ── Typographie ────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-weight: inherit; }
h1 { font-size: inherit; }
h2 { font-size: 4rem; line-height: 1; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 0.83em; }

summary, strong { font-weight: 400; }
i, em { font-style: normal; color: var(--color-gray-400); }

/* ── Images ─────────────────────────────── */
img {
  height: auto;
  max-height: 100vh;
  object-fit: contain;
}

/* ── Boutons ─────────────────────────────── */
button {
  font: inherit;
  background: none;
  border: 0;
  color: var(--color-gray-500);
}
button:not(:disabled) { cursor: pointer; }
button.active { color: black; }
.btn-contact { cursor: pointer; text-decoration: none; }
.picture-item label { font-size: 0.875rem; }

/* ── Header / Navigation ─────────────────── */
header {
  position: fixed;
  background-color: var(--color-white);
  width: 100%;
  z-index: 50;
}
.header-nav { display: flex; padding: .5rem; }
.header-back { padding: .3rem 0; position: fixed; }

/* Menu hamburger */
.nav {
  position: fixed;
  width: 100%;
  top: -100vh;
  max-height: 97vh;
  background-color: var(--color-gray-100);
  z-index: 5;
  transition: all 0.25s;
}
.nav figure { display: inline; position: relative; text-align: center; }
.nav a {
  display: inline-block;
  font-weight: 300;
  font-size: 16px;
  padding: 5px;
  margin: 0;
}

label[for="toggle"] { transition: all 0.5s; z-index: 21; cursor: zoom-in; }
input[type="checkbox"] { display: none; }
input[type="checkbox"]:checked + .nav { top: 0; }

/* ── Footer ──────────────────────────────── */
#footer {
  font-size: 1rem;
  position: sticky;
  position: -webkit-sticky;
  bottom: 0;
  z-index: 1;
  width: 100%;
  height: 50px;
  transition: height 1s, visibility 1s, background-color 1s;
}
.footerinfo { padding: 2rem; padding-top: 10vh; }

/* ── Layout ──────────────────────────────── */
.contact { position: relative; margin: 0; padding: 0; }
.slideout { transition: all 1s; }
.info.slideout {
  position: absolute;
  margin: -100vh 0vw;
  right: 100vw;
  z-index: 2;
  transition: all 1s;
}

/* ── SVG icons ───────────────────────────── */
svg#icon { max-width: 50px; fill: var(--color-gray-600); }
#logo svg { vertical-align: bottom; fill: var(--color-gray-600); }
button svg, #footerbuttondown svg, #footerbuttonup svg { width: 24px; vertical-align: middle; }

/* ── Tooltips ────────────────────────────── */
.gallery-tooltip {
  visibility: hidden;
  opacity: 0;
  transition: all .2s ease-in-out;
}

.gallery-tooltip a, .picture-item__img a {
  text-decoration: none;
}
.picture-item__inner a {
  text-decoration: none;
}

.prev-tooltip {
  position: absolute;
  right: 10vw;
  visibility: hidden;
  opacity: 0;

}

/* ── Grid items ──────────────────────────── */
.picture-item__img { display: block; }
.picture-item__inner { position: relative; height: 100%; margin-right: 5%; }
.picture-item__details { display: none; }
.picture-item__details.show { display: block; }
.picture-item__img.show { display: none; }

/* ── Éléments d'UI ───────────────────────── */
.grid1::after { content: "3"; }
.grid2::after { content: "6"; }

[aria-current]:not([aria-current="false"]) { font-weight: bold; }

/* ── Animations ──────────────────────────── */
@keyframes fadeIn {
  0%   { transform: translateY(-12px); opacity: 0; }
  100% { transform: translateY(0);     opacity: 1; }
}

/* ── Tableau ─────────────────────────────── */
table {
  width: 100%;
  float: left;
  text-align: left;
  border-collapse: collapse;
  text-decoration: none;
}

/* ── Boutons stylisés ────────────────────── */
.button {
  display: inline-block;
  padding: var(--spacing-s) var(--spacing-m);
  font-weight: 400;
  color: var(--color-white);
  background-color: var(--color-black);
  border-radius: 20px;
}
.button[disabled] { color: var(--color-white); background-color: var(--color-gray-600); }
.button-white {
  border-radius: 20px;
  display: inline-block;
  padding: var(--spacing-s) var(--spacing-m);
  font-weight: 400;
  color: var(--color-black);
  background-color: var(--color-white);
}
.error { color: var(--color-red); }
.global-message {
  display: block;
  padding: var(--spacing-m);
  text-align: center;
  color: var(--color-white);
  background-color: var(--color-black);
}

/* ── Select ──────────────────────────────── */
select {
  text-align-last: center;
  color: white;
  padding: var(--spacing-s) var(--spacing-m);
  border: 2px solid var(--color-black);
  border-radius: 20px;
  background-color: var(--color-black);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
select:active, select:focus { outline: none; box-shadow: none; }

/* ── Texte utilitaire ────────────────────── */
.text { hyphens: manual; }
.text > * { margin-block: 0; }
.text > * + * { margin-block-start: var(--spacing-s); }
.stack-s > * + * { margin-top: var(--spacing-s); }
.stack-m > * + * { margin-top: var(--spacing-m); }

/* ══════════════════════════════════════════
   HOVER
   ══════════════════════════════════════════ */
@media (hover: hover) {
  .nav a:hover { background: rgba(255,140,0,0.5); }

  .row:hover .picture-item__inner { transition: all .2s; opacity: .9; }
  .row .picture-item__inner:hover { opacity: 1; }

  .btn-info:hover .gallery-tooltip,
  .btn-info:hover .prev-tooltip,
  .btn-contact:hover .gallery-tooltip,
  .picture-item:hover .gallery-tooltip { visibility: visible; opacity: 1; }

  svg#icon:hover { fill: var(--color-gray-800); }
  #logo:hover svg { fill: var(--color-gray-800); }
  button:hover { color: black; }

  .button:hover { background-color: rgba(0,0,0,0.1); cursor: pointer; }
  .button-white:hover { background-color: rgba(255,255,255,0.7); }
}

/* ══════════════════════════════════════════
   MEDIA QUERIES
   ══════════════════════════════════════════ */
@media screen and (max-height: 520px) {
  .footerinfo { padding: 0.5rem 0 0 0.5rem; padding-top: 6vh; }

  #footer { font-size: .75rem; }

  h2 { font-size: 3rem; }
  h3 { font-size: 2em; }

  .button { padding: 0.5rem; }

  button svg, #footerbuttondown svg, #footerbuttonup svg { width: 26px; vertical-align: sub; }
}

@media screen and (max-width: 798px) {
  #filters button {
    background: var(--color-gray-100);
    padding: .3rem .5rem;
    border-radius: 15px;
  }
}

@media screen and (min-width: 1600px) {
  .picture-item { height: 540px; }
}
