/* =========================================================
   VIP BLOG / ADMIN – CSS UNIQUE, RÉUTILISABLE, SANS CONFLIT
   Scope: tout est enfermé dans .vipblog
   ========================================================= */

.vipblog{
  --orange:#f36a21;
  --text:#1f2328;
  --muted:#6b7280;
  --card:#ffffff;
  --bg:#f4f5f7;
  --line:#e9e9ee;
  --shadow: 0 10px 24px rgba(0,0,0,.08);
  --radius: 14px;
  --radiusImg: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;

  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

.vipblog *{ box-sizing:border-box; }

/* Topbar */
.vipblog .topbar{
  position: sticky; top:0; z-index: 10;
  background: rgba(244,245,247,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.vipblog .topbar-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.vipblog .brand{
  font-weight: 900;
  letter-spacing:.2px;
  display:flex; align-items:center; gap:10px;
}
.vipblog .pill{
  font-size:12px;
  border:1px solid var(--line);
  padding:6px 10px;
  border-radius:999px;
  background:#fff;
  color: var(--muted);
  font-weight: 800;
}

/* Layout */
.vipblog .wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 60px;
}

/* Blog header row */
.vipblog .blogbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 14px;
}
.vipblog .search{
  width: 420px;
  max-width: 60vw;
}
.vipblog .search input{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:10px 12px;
  outline:none;
  font-size:14px;
}

/* Cards grid */
.vipblog .grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 980px){
  .vipblog .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .vipblog .grid{ grid-template-columns: 1fr; }
  .vipblog .search{width:100%; max-width:100%;}
  .vipblog .blogbar{flex-direction:column; align-items:stretch;}
}

.vipblog .card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.vipblog .thumb{ padding: 18px 18px 0; }
.vipblog .thumb img{
  width:100%;
  height: 210px;
  object-fit: cover;
  border-radius: var(--radiusImg);
  display:block;
  background:#eee;
}
.vipblog .content{ padding: 14px 18px 18px; }

.vipblog .title{
  margin: 6px 0 10px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}
.vipblog .title a{
  color: var(--orange);
  text-decoration:none;
}
.vipblog .title a:hover{ text-decoration: underline; }

.vipblog .excerpt{
  margin:0;
  font-size: 18px;
  line-height: 1.55;
  color: #2b2f36;
  letter-spacing: .1px;
  white-space: pre-wrap;
}
.vipblog .badge{
  font-weight: 900;
  letter-spacing:.6px;
  text-transform: uppercase;
}

/* Clamp 4 lignes */
.vipblog .excerpt.clamp{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 4;
  white-space: normal;
}

/* Bouton Lire la suite */
.vipblog .readmore{ margin-top: 12px; }

/* Bouton global pagination */
.vipblog .more-wrap{
  margin-top: 18px;
  display:flex;
  justify-content:center;
}
.vipblog .more-wrap .btn{ min-width: 260px; }

/* Admin panel */
.vipblog .admin{
  margin-top: 18px;
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.vipblog .admin-head{
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.vipblog .admin-head h2{
  margin:0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing:.4px;
  color: var(--muted);
  font-weight: 900;
}
.vipblog .admin-body{ padding: 14px 16px 16px; }

.vipblog .row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.vipblog .field{ display:flex; flex-direction:column; gap:6px; flex:1; min-width: 200px; }
.vipblog label{ font-size:12px; color: var(--muted); font-weight: 800; }

.vipblog input, .vipblog textarea, .vipblog select{
  width:100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 10px;
  outline:none;
  font-size: 14px;
}
.vipblog textarea{ min-height: 110px; resize: vertical; }

/* Buttons */
.vipblog .btn{
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 900;
}
.vipblog .btn.primary{
  border-color: rgba(243,106,33,.45);
  box-shadow: 0 6px 18px rgba(243,106,33,.10);
}
.vipblog .btn.danger{ border-color: rgba(255,90,122,.45); }
.vipblog .btn.ok{ border-color: rgba(48,210,123,.45); }

.vipblog .muted{ color: var(--muted); font-size: 12px; font-weight: 700; }

.vipblog .admin-list{
  margin-top: 14px;
  display:grid;
  gap:10px;
}
.vipblog .admin-item{
  border:1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  background:#fff;
}
.vipblog .admin-item strong{ font-size: 13px; }
.vipblog .mini-meta{ font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 700; }
.vipblog .right{ display:flex; gap:8px; align-items:flex-start; }
.vipblog .small{ padding: 8px 10px; border-radius: 10px; font-size: 12px; }

.vipblog .hidden{ display:none !important; }

/* Toast */
.vipblog .toast{
  position: fixed;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border:1px solid var(--line);
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 900;
  font-size: 13px;
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 9999;
}
.vipblog .toast.show{
  opacity:1;
  transform: translateX(-50%) translateY(-2px);
}

/* Modal Lire la suite */
.vipblog .modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display:none;
  align-items:center;
  justify-content:center;
  z-index: 999;
  padding: 18px;
}
.vipblog .modal-backdrop.show{ display:flex; }

.vipblog .modal{
  width: min(820px, 95vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.vipblog .modal-head{
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.vipblog .modal-title{
  margin:0;
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
}
.vipblog .modal-body{
  padding: 14px 16px 16px;
  color: #2b2f36;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;

  max-height: 80vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.vipblog .modal-body::-webkit-scrollbar{ width: 8px; }
.vipblog .modal-body::-webkit-scrollbar-track{ background: transparent; }
.vipblog .modal-body::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.25);
  border-radius: 999px;
}
.vipblog .modal-body::-webkit-scrollbar-thumb:hover{ background: rgba(0,0,0,.45); }
.vipblog .modal-body{
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.35) transparent;
}

/* Admin: gate anti-flash */
.vipblog .gate{
  position: fixed;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: var(--bg);
  z-index: 99999;
}
.vipblog .gate-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  text-align:center;
  max-width: 520px;
  width: 92%;
}
.vipblog .gate-title{
  margin:0 0 6px;
  color: var(--text);
  font-weight: 900;
  letter-spacing:.2px;
}
.vipblog .gate-sub{
  margin:0;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
