/* THE MOTION INDEX — style.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:   #f7f6f1;
  --fg:   #000000;
  --dim:  #999999;
  --blue: #0000FF;
  --teal: #008080;
  --b:    1px;
}
body.grey { --bg: #c0c0c0; --blue: #008080; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Plus Jakarta Sans', 'Archivo', 'Helvetica Neue', sans-serif;
  font-size: 12px;
  line-height: 1;
  transition: background 0.18s;
}
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-thumb { background: var(--blue); }
.wrap { max-width: 1300px; margin: 0 auto; padding: 0 18px; }

/* NAV */
nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 0 14px;
  border-bottom: var(--b) solid var(--blue);
}
.nav-left { display: flex; align-items: center; }
.logo {
  font-size: 15px; font-weight: 900; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  border-top: 1.5px solid var(--blue);
  border-bottom: 1.5px solid var(--blue);
  padding: 6px 0 5px;
  line-height: 1;
  text-decoration: none;
  justify-self: center;
  white-space: nowrap;
  font-family: 'Neue Montreal', 'Plus Jakarta Sans', 'Archivo', sans-serif;
}
.nav-links {
  display: flex; align-items: center; gap: 2px;
  justify-self: end;
}
.nav-link {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; color: var(--dim);
  padding: 4px 14px 3px; border: var(--b) solid transparent; transition: color 0.1s;
}
.nav-link:hover { color: var(--blue); }
.nav-link.active { border-color: var(--blue); color: var(--blue); }
.nav-icon { font-size: 10px; }
.grey-btn {
  font-family: inherit; font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: none; border: var(--b) solid var(--fg); color: var(--fg);
  padding: 4px 10px 3px; cursor: pointer; transition: all 0.1s; line-height: 1.5;
}
.grey-btn:hover, .grey-btn.on { background: var(--fg); color: var(--bg); }

/* FILTERS */
.filters {
  padding: 13px 0 11px; border-bottom: var(--b) solid var(--blue);
  display: flex; flex-direction: column; align-items: center; gap: 11px;
}
.chk-grid { display: grid; grid-template-columns: repeat(4, 160px); }
.filter-col { display: flex; flex-direction: column; }
.chk-row {
  display: flex; align-items: center; gap: 7px; padding: 3px 0;
  cursor: pointer; font-size: 14px; color: var(--fg); font-weight: 400;
  white-space: nowrap; user-select: none; transition: color 0.08s;
}
.chk-row:hover, .chk-row.on { color: var(--blue); }
.chk-box {
  width: 12px; height: 12px; border: var(--b) solid currentColor;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 9px; line-height: 1; background: var(--bg);
}
.chk-row.on .chk-box { background: var(--blue); color: #fff; }
.mood-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
}
.mood-pill {
  font-size: 13px; color: var(--fg); padding: 5px 16px 4px;
  border: var(--b) solid var(--fg); border-radius: 999px;
  cursor: pointer; white-space: nowrap; user-select: none;
  background: transparent; transition: all 0.1s; line-height: 1.4;
}
.mood-pill:hover { border-color: var(--blue); color: var(--blue); }
.mood-pill.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* SEARCH */
.search-bar {
  border-top: var(--b) solid var(--blue); border-bottom: var(--b) solid var(--blue);
  padding: 10px 0; display: flex; justify-content: center;
}
.search-inner {
  display: flex; align-items: center; gap: 8px;
  border: var(--b) solid var(--fg); background: var(--bg);
  padding: 5px 12px; width: 380px; transition: border-color 0.1s;
}
.search-inner:focus-within { border-color: var(--blue); }
.search-inner input {
  font-family: inherit; font-size: 13px; background: none;
  border: none; color: var(--fg); outline: none; width: 100%;
}
.search-inner input::placeholder { color: var(--dim); }
.search-icon { color: var(--blue); font-size: 12px; flex-shrink: 0; }

/* GRID */
.grid-wrap { padding: 12px 0 60px; }
.masonry { columns: 4; column-gap: 5px; }
@media (max-width: 1060px) { .masonry { columns: 3; } }
@media (max-width: 680px)  { .masonry { columns: 2; } }

/* outline hover = zéro layout shift, zéro variation d'épaisseur */
.card {
  break-inside: avoid; margin-bottom: 5px;
  position: relative; overflow: hidden; background: #ccc;
  border: var(--b) solid var(--blue);
  outline: 2px solid transparent; outline-offset: -2px;
  cursor: pointer; animation: up 0.32s ease both;
  transition: outline-color 0.12s;
}
.card:hover { outline-color: var(--fg); }
.card.hidden { display: none; }

       
.card-img {
  display: block; width: 100%; object-fit: cover;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
/* hover scale handled by GSAP */
.card.p  .card-img { aspect-ratio: 9/12; }
.card.l  .card-img { aspect-ratio: 16/9; }
.card.sq .card-img { aspect-ratio: 1/1; }
.card.w  .card-img { aspect-ratio: 4/3; }

/* CURSOR */
#cursor {
  position: fixed; pointer-events: none; z-index: 9999;
  font-family: 'Archivo', sans-serif; font-size: 10px; font-weight: 900;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--blue);
  opacity: 0; transform: translate(-50%,-50%); transition: opacity 0.12s; white-space: nowrap;
}
.on-card #cursor { opacity: 1; }
.on-card { cursor: none; }

/* MODAL */
.modal-wrap {
  display: none; position: fixed; inset: 0;
  background: rgba(255,255,255,0.95); z-index: 200;
  align-items: center; justify-content: center;
}
body.grey .modal-wrap { background: rgba(192,192,192,0.95); }
.modal-wrap.on { display: flex; }
.modal {
  background: var(--bg); border: var(--b) solid var(--blue);
  width: 90vw; max-width: 860px; overflow: hidden; animation: up 0.2s ease;
}
.modal-vid { aspect-ratio: 16/9; background: #000; position: relative; overflow: hidden; }
.modal-vid img { width:100%; height:100%; object-fit:cover; display:block; }
.modal-x {
  position: absolute; top:10px; right:10px;
  background: var(--bg); border: var(--b) solid var(--blue); color: var(--blue);
  width:26px; height:26px; cursor:pointer;
  font-family:inherit; font-size:11px; font-weight:900;
  display:flex; align-items:center; justify-content:center; transition:all 0.1s;
}
.modal-x:hover { background: var(--blue); color: #fff; }
.modal-body {
  padding: 10px 14px 12px; border-top: var(--b) solid var(--blue);
  display: flex; justify-content: center; align-items: center;
}
.modal-meta {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue); text-align: center;
}

/* FOOTER */
footer {
  border-top: var(--b) solid var(--blue); padding: 10px 0;
  display: flex; justify-content: space-between; align-items: center;
}
.foot { font-size:9px; letter-spacing:0.12em; text-transform:uppercase; color:var(--dim); }

/* LEARN & GIVE */
.page-header { padding:18px 0 15px; border-bottom:var(--b) solid var(--blue); }
.page-title  { font-size:22px; font-weight:900; letter-spacing:-0.01em; text-transform:uppercase; }
.card-grid   { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; padding:12px 0 60px; }
@media (max-width:860px) { .card-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px) { .card-grid { grid-template-columns:1fr; } }

.item-card {
  border: var(--b) solid var(--blue);
  outline: 2px solid transparent; outline-offset: -2px;
  background: var(--bg); overflow: hidden;
  transition: outline-color 0.12s;
}
.item-card:hover { outline-color: var(--fg); }
.item-thumb { aspect-ratio:16/9; overflow:hidden; background:#ddd; }
.item-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.item-body  { padding:10px 12px 12px; border-top:var(--b) solid var(--blue); display:flex; flex-direction:column; gap:7px; }
.item-type  { font-size:9px; font-weight:700; letter-spacing:0.14em; text-transform:uppercase; color:var(--blue); }
.item-title { font-size:13px; font-weight:700; line-height:1.3; }
.item-desc  { font-size:11px; color:var(--dim); line-height:1.5; }
.item-tags  { display:flex; flex-wrap:wrap; gap:4px; }
.item-tag   { font-size:9px; letter-spacing:0.06em; text-transform:uppercase; color:var(--fg); border:var(--b) solid var(--fg); padding:2px 7px; border-radius:999px; }
.item-footer{ display:flex; justify-content:space-between; align-items:center; margin-top:2px; }
.item-meta  { font-size:9px; color:var(--dim); letter-spacing:0.06em; }
.item-btn   {
  font-family:inherit; font-size:10px; font-weight:700; letter-spacing:0.08em;
  text-transform:uppercase; text-decoration:none;
  background:var(--blue); color:#fff; border:var(--b) solid var(--blue);
  padding:4px 12px 3px; cursor:pointer; transition:all 0.1s; line-height:1.5; display:inline-block;
}
.item-btn:hover { background:var(--fg); border-color:var(--fg); }
.item-btn.free  { background:transparent; color:var(--blue); }
.item-btn.free:hover { background:var(--blue); color:#fff; }

@keyframes up { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
