:root{
  --bg: #0f1216;
  --panel: #151a21;
  --muted: #8892a6;
  --text: #e6edf3;
  --primary: #4ba3ff;
  --primary-ghost: rgba(75,163,255,.12);
  --border: #232a34;
  --accent: #2a3340;
  --success: #2ecc71;
  --chip: #202734;
  --chip-border: #2b3442;
  --danger: #ff5f5f;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: url("assets/background/background_1.png") no-repeat center center fixed;
  background-size: cover; /* L'image prend tout l'écran */
  color:var(--text);
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

/* --- Topbar --- */
.topbar {
  position: sticky; /* reste visible en haut au scroll */
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.toplink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e6e8ee;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 10px;
  transition: background-color .15s ease, transform .1s ease;
}

.toplink:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

.topicon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.pill {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  font-weight: 600;
}

.container > header {
  margin-top: 10px;
}


.container{
  max-width:1100px;
  margin:48px auto;
  padding:0 20px;
}
header h1{
  margin:0 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing:.3px;
}
header p{
  margin:0 0 24px;
  color:var(--muted);
}

/* Filters panel */
.filters{
  background: linear-gradient(180deg, #121720, #131a24);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
  display:grid;
  gap:12px;
  grid-template-columns: 1.2fr .8fr 1fr;
  align-items:end;
}
@media (max-width: 860px){
  .filters{grid-template-columns: 1fr}
}
.field{display:flex; flex-direction:column; gap:8px}
.label{
  font-weight:600;
  color:#cdd6e4;
  font-size:13px;
}
.search{ position:relative; }
.search input{
  width:100%;
  padding:12px 14px 12px 38px;
  background:#0d1219;
  border:1px solid var(--border);
  border-radius:12px;
  color:var(--text);
  outline:none;
  transition: border .15s ease;
}
.search input:focus{border-color:#35507a}
.search svg{
  position:absolute; left:10px; top:50%; transform:translateY(-50%);
  width:18px; height:18px; opacity:.7
}

.cost-filters{
  display:flex; flex-wrap:wrap; gap:10px;
  padding:6px; background:#0d1219; border:1px solid var(--border); border-radius:12px;
}
.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border:1px solid var(--chip-border); border-radius:999px;
  background:var(--chip); color:#cfd8e5; cursor:pointer; user-select:none;
  font-size:13px;
}
.chip input{display:none}
.chip.active{
  border-color:#3a4b63; background: #182131;
  box-shadow: inset 0 0 0 1px #33435a;
}
.chip .dot{
  width:10px; height:10px; border-radius:50%; background:#48566b; flex: 0 0 auto;
}
.chip.active .dot{background: var(--primary)}

select{
  appearance:none;
  width: min(200px, 60vw);
  padding:12px 14px;
  background:#0d1219;
  border:1px solid var(--border);
  border-radius:12px;
  color:var(--text);
  outline:none;
}

/* Results bar */
.results-info{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin:16px 2px 8px;
  color:var(--muted); font-size:14px;
}

/* Cards */
.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:16px;
  margin-top:8px;
}
@media (max-width: 1100px){ .grid{grid-template-columns: repeat(2, minmax(0,1fr));} }
@media (max-width: 680px){ .grid{grid-template-columns: 1fr;} }

/* --- Cards --- */
.card {
  background: linear-gradient(180deg, rgba(17,22,30,0.92), rgba(15,20,28,0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .12s ease, border-color .12s ease;
  position: relative;
  min-height: 340px; /*  légèrement plus haute, sans casser la grille */
  background-blend-mode: overlay;
}

/* --- Fonds dynamiques selon archétype --- */
.card-dpt,
.card-support,
.card-soin {
  background-blend-mode: overlay;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* teinte + image combinées */
.card-dpt {
  background:
    linear-gradient(180deg, rgba(17,22,30,0.85), rgba(15,20,28,0.9)),
    url("assets/background/background_build_dpt.png");
  border-color: rgba(255, 85, 85, 0.4);
}

.card-support {
  background:
    linear-gradient(180deg, rgba(17,22,30,0.85), rgba(15,20,28,0.9)),
    url("assets/background/background_build_support.png");
  border-color: rgba(100, 255, 100, 0.4);
}

.card-soin {
  background:
    linear-gradient(180deg, rgba(17,22,30,0.85), rgba(15,20,28,0.9)),
    url("assets/background/background_build_soin.png");
  border-color: rgba(80, 180, 255, 0.4);
}


/* --- Reflet bas (sheen effect, conservé tel quel) --- */
.card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255,255,255,0.10) 35%,
    rgba(255,255,255,0.16) 70%,
    rgba(255,255,255,0.06) 100%
  );
  pointer-events: none;
  z-index: 3;
}

.card::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: -25%;
  width: 50%;
  height: 28%;
  transform: skewX(-18deg);
  background: linear-gradient(
    to right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.18) 45%,
    rgba(255,255,255,0.28) 50%,
    rgba(255,255,255,0.18) 55%,
    rgba(255,255,255,0) 100%
  );
  opacity: 0;
  filter: blur(0.5px);
  pointer-events: none;
  z-index: 4;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #2a3340;
}
.card:hover::before {
  animation: sheen 1.4s ease-out forwards;
}

/* Animation du balayage */
@keyframes sheen {
  0% { left: -25%; opacity: 0; }
  10% { opacity: 0.35; }
  60% { opacity: 0.35; }
  100% { left: 85%; opacity: 0; }
}

/* --- Thumbnail (image du perso) --- */
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: transparent; /*  on laisse le fond visible dessous */
  overflow: hidden;
  z-index: 2;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92; /*  un peu transparent pour voir le fond en dessous */
}

/* Dégradé de fondu sur l'image pour lisibilité */
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(17,22,30,0.7) 100%);
  pointer-events: none;
}

/* --- Contenu (identique, mais avec un poil plus d'air) --- */
.content {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.title-row{ display:flex; align-items:center; justify-content:space-between; gap:10px }
.title{
  margin:0; font-size:18px; line-height:1.2;
  word-break: break-word;
}
.badge{
  font-size:12px; padding:6px 8px; border-radius:999px;
  background: var(--primary-ghost); color:#cfe6ff; border:1px solid #2a3a52;
  white-space:nowrap;
}
.desc{
  margin:0; color:#c7cfdb; font-size:14px;
}
.tags{
  display:flex; flex-wrap:wrap; gap:8px; margin-top:2px;
}
.tag{
  font-size:12px; padding:6px 8px; border-radius:999px;
  border:1px solid var(--chip-border); background:#131a24; color:#b9c5d8;
}
.actions{
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:4px;
}
.btn{
  display:inline-block; text-decoration:none; font-weight:600;
  padding:10px 12px; border-radius:10px; border:1px solid #2a3a52;
  background: #142033; color:#cfe6ff;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.btn:hover{ background:#18263e; border-color:#334867 }
.btn:active{ transform: translateY(1px) }

/* Empty state */
.empty{
  padding:28px;
  border:1px dashed #2b3442;
  background: #0e141d;
  border-radius: 14px;
  color:#9aa7be;
  text-align:center;
}
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0;
}

.site-footer {
  margin-top: 40px;
  padding: 20px 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #ccc;
  text-align: center;
  font-size: 13px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.footer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 160px;
  text-align: center;
}

.footer-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.footer-icon:hover {
  transform: scale(1.1);
}

.footer-text-link {
  color: #3e7bfa;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}

.footer-text-link:hover {
  text-decoration: underline;
}

.footer-caption {
  margin-top: 6px;
  font-size: 12px;
  color: #aaa;
}

.footer-legal {
  font-size: 12px;
  color: #888;
}

.footer-legal a {
  color: #3e7bfa;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}
