:root{ --bg:#0D0F14; --panel:#151922; --text:#E6E8F0; --accent:#6D28D9; --accent2:#A78BFA; --border:#2A2F3A; }

.page-title{ color:#A78BFA; margin:26px 0 16px; }

.inspo-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

/* Card */
.inspo-card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.inspo-card:hover{
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(0,0,0,.35), 0 0 12px color-mix(in srgb, var(--accent) 25%, transparent);
}

.inspo-cover{
  height: 180px;
  background:#0F131B;
  display:grid; place-items:center;
  overflow:hidden;
}
.inspo-cover img{
  width: 100%; height: 100%; object-fit: cover; display:block;
}

.inspo-body{
  padding: 12px;
  display: grid;
  gap: 8px;
}

.inspo-title{
  margin: 0;
  font-size: 18px;
  color: #fff;
}
.inspo-meta{
  font-size: 13px;
  color: #BFC3D5;
}

/* Description longue (collapsible) */
.inspo-desc{
  color: #D5D8E6;
  line-height: 1.6;
  max-height: 7.5em; /* ~5 lignes */
  overflow: hidden;
  position: relative;
}
.inspo-desc.is-open{ max-height: none; }
.inspo-fade{
  content:"";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 48px;
  background: linear-gradient(180deg, transparent, rgba(21,25,34,0.92));
  display: block;
}
.inspo-desc.is-open + .inspo-actions .readmore::before{ content:"Lire moins"; }
.inspo-actions{
  display:flex; justify-content:flex-start;
}
.readmore{
  appearance:none; border:none; background:transparent; color:#A78BFA;
  font-weight:600; cursor:pointer; padding:0; position:relative;
}
.readmore:hover{ color:#C4A0FF; }

/* Tags (optionnels) */
.inspo-tags{
  display:flex; flex-wrap:wrap; gap:6px; margin-top:4px;
}
.inspo-tag{
  font-size:12px; color:#E6E8F0; background:#1E222C; border:1px solid var(--border);
  padding:4px 6px; border-radius: 999px;
}

/* Responsive */
@media (max-width: 640px){
  .inspo-cover{ height: 160px; }
}


/* ===== Modal Inspirations ===== */
.inspo-modal{
  position: fixed; inset: 0; z-index: 1000;
  display: none;
}
.inspo-modal.open{ display: block; }

.inspo-backdrop{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
}

.inspo-dialog{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 16px;
}
.inspo-modal-body{
  width: min(1000px, 96vw);
  max-height: 90vh;
  background: var(--panel, #151922);
  border: 1px solid var(--border, #2A2F3A);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* image + texte */
}

.inspo-modal-media{
  background: #0F131B;
  border-right: 1px solid var(--border, #2A2F3A);
  display: grid; place-items: center;
}
.inspo-modal-media img{
  width: 100%; height: 100%;
  max-height: 90vh;
  object-fit: cover;
}

.inspo-modal-content{
  padding: 16px;
  overflow-y: auto;
}
.inspo-modal-content h3{
  margin: 0 0 6px; color: #fff; font-size: 22px;
}
.inspo-modal-meta{
  color: #BFC3D5; font-size: 14px; margin-bottom: 12px;
}
.inspo-modal-desc{
  color: #D5D8E6; line-height: 1.7; white-space: pre-wrap;
}


.inspo-close:hover{ color:#fff; border-color: #6D28D9; }

/* Responsive modal */
@media (max-width: 900px){
  .inspo-modal-body{ grid-template-columns: 1fr; }
  .inspo-modal-media{ border-right: none; border-bottom: 1px solid var(--border, #2A2F3A); }
  .inspo-modal-media img{ max-height: 40vh; }
}

/* On garde les cards compactes (extrait) */
.inspo-desc{ max-height: 7.5em; overflow: hidden; position: relative; }
.inspo-fade{
  content:""; position:absolute; left:0; right:0; bottom:0; height:48px;
  background: linear-gradient(180deg, transparent, rgba(21,25,34,0.92));
}
.inspo-actions{ display:flex; justify-content:flex-start; }
.readmore{
  appearance:none; border:none; background:transparent; color:#A78BFA;
  font-weight:600; cursor:pointer; padding:0;
}
.readmore:hover{ color:#C4A0FF; }

/* === Popup Inspirations : corrections position + proportions === */

/* Le conteneur devient la référence pour la croix */
.inspo-modal-body{
  position: relative;                 /* nouveau */
  grid-template-columns: 1fr 2fr;     /* 1/3 image, 2/3 texte */
}

/* Croix en haut à droite, à l’intérieur du panneau */
.inspo-close{
  position: absolute;
  top: 10px;                          /* ajustez si besoin */
  right: 12px;                        /* ajustez si besoin */
  z-index: 3;                         /* au-dessus de l’image/texte */
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border, #2A2F3A);
  background: #1E222C;
  color: #E6E8F0;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

/* Mobile : on garde l’empilement vertical */
@media (max-width: 900px){
  .inspo-modal-body{ grid-template-columns: 1fr; }
  .inspo-modal-media{ border-right: none; border-bottom: 1px solid var(--border, #2A2F3A); }
}


.inspo-modal-body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2fr; /* 1/3 image, 2/3 texte */
  width: min(1000px, 96vw);
  max-height: 90vh;
  background: var(--panel, #151922);
  border: 1px solid var(--border, #2A2F3A);
  border-radius: 16px;
  overflow: hidden;
}

/* La croix est maintenant placée à l'intérieur */
.inspo-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  background: #1E222C;
  border: 1px solid var(--border, #2A2F3A);
  border-radius: 8px;
  color: #E6E8F0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: all .2s ease;
}
.inspo-close:hover {
  color: #fff;
  border-color: #6D28D9;
  background: #222632;
}

/* Responsive : image au-dessus du texte */
@media (max-width: 900px) {
  .inspo-modal-body {
    grid-template-columns: 1fr;
  }
  .inspo-modal-media {
    border-right: none;
    border-bottom: 1px solid var(--border, #2A2F3A);
  }
}
