* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0a0a0a; color: #fff; font-family: -apple-system, sans-serif; }
header { padding: 2rem; border-bottom: 1px solid #222; text-align: center; }
header h1 { font-size: 1.8rem; }
header p { color: #888; margin-top: 0.3rem; }

/* Filters */
.filters-bar { border-bottom: 1px solid #222; padding: 1rem 0; display: flex; flex-direction: column; gap: 1rem; }
.categories-scroll { display: flex; gap: 0.75rem; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; flex-wrap: nowrap; padding: 0 1rem; }
.categories-scroll::-webkit-scrollbar { display: none; }
.filter-btn { padding: 0.4rem 1rem; border-radius: 20px; border: 1px solid #333; background: transparent; color: #aaa; cursor: pointer; text-decoration: none; font-size: 0.85rem; white-space: nowrap; flex-shrink: 0; }
.filter-btn:hover { border-color: #666; color: #fff; }
.filter-btn.active { background: #fff; color: #000; border-color: #fff; }
.selects-bar { display: flex; gap: 0.75rem; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; flex-wrap: nowrap; padding: 0 1rem; }
.selects-bar::-webkit-scrollbar { display: none; }
.selects-bar select { background: #111; border: 1px solid #333; color: #aaa; padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 0.85rem; cursor: pointer; flex-shrink: 0; }
.selects-bar select:hover { border-color: #666; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 0.75rem; padding: 1rem; }
.card { background: transparent; border: none; border-radius: 0; padding: 0; transition: transform 0.2s; cursor: pointer; }
.card:hover { transform: scale(1.03); }
.card-featured .phone {
  border-color: #3a3a3e !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 0 2px #111 !important;
}

/* Phones dans la grid — ratio automatique */
.grid .phone { width: 90%; max-width: 120px; margin: 0 auto; border-radius: 24px !important; padding: 8px 5px !important; }
.grid .phone-screen { aspect-ratio: 9 / 17; border-radius: 16px !important; }
.grid .dynamic-island { width: 36px !important; height: 14px !important; margin: 6px auto 4px !important; }
.grid .phone-icon { width: 50%; height: auto; aspect-ratio: 1; border-radius: 22%; }
.grid .phone-icon-placeholder { width: 50%; aspect-ratio: 1; border-radius: 22%; }
.grid .phone-name { font-size: 11px; }
.grid .phone-dev { font-size: 9px; }
.grid .phone-rating { font-size: 10px; }
.grid .btn-left-1 { top: 30px !important; height: 14px !important; }
.grid .btn-left-2 { top: 50px !important; height: 20px !important; }
.grid .btn-left-3 { top: 76px !important; height: 20px !important; }
.grid .phone::before { top: 44px !important; height: 30px !important; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 2rem; }
.pagination a { color: #fff; text-decoration: none; background: #222; padding: 0.5rem 1rem; border-radius: 8px; border: 1px solid #333; font-size: 0.9rem; }
.pagination a:hover { border-color: #666; }
.pagination span { color: #888; font-size: 0.9rem; }

/* Featured section — Swiper coverflow */
.featured-section { padding: 2rem 0 3rem; border-bottom: 1px solid #222; overflow: hidden; }
.swiper { width: 100%; padding: 2rem 0 3rem !important; }
.swiper-slide { width: 160px; margin: 0 10px; }
.phone-wrap { text-decoration: none; color: inherit; display: block; }

/* Premium phone */
.phone { width: 160px; background: linear-gradient(145deg, #2a2a2e, #1a1a1e, #2a2a2e); border-radius: 40px; border: 1px solid #3a3a3e; position: relative; padding: 14px 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 0 2px #111; }
.phone::before { content: ''; position: absolute; right: -3px; top: 80px; width: 3px; height: 50px; background: linear-gradient(to bottom, #2a2a2e, #3a3a3e, #2a2a2e); border-radius: 0 3px 3px 0; }
.btn-left-1 { position: absolute; left: -3px; top: 60px; width: 3px; height: 22px; background: linear-gradient(to bottom, #2a2a2e, #3a3a3e, #2a2a2e); border-radius: 3px 0 0 3px; }
.btn-left-2 { position: absolute; left: -3px; top: 90px; width: 3px; height: 32px; background: linear-gradient(to bottom, #2a2a2e, #3a3a3e, #2a2a2e); border-radius: 3px 0 0 3px; }
.btn-left-3 { position: absolute; left: -3px; top: 130px; width: 3px; height: 32px; background: linear-gradient(to bottom, #2a2a2e, #3a3a3e, #2a2a2e); border-radius: 3px 0 0 3px; }
.phone-screen { background: #000; border-radius: 30px; overflow: hidden; position: relative; aspect-ratio: 9 / 17; display: flex; flex-direction: column; align-items: center; }
.dynamic-island { width: 60px; height: 22px; background: #000; border-radius: 12px; border: 1.5px solid #1a1a1a; margin: 10px auto 8px; flex-shrink: 0; }
.app-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0 12px 16px; width: 100%; }
.phone-icon { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.phone-icon-placeholder { width: 72px; height: 72px; border-radius: 18px; background: #1a1a1a; }
.phone-name { color: #fff; font-size: 13px; font-weight: 600; text-align: center; }
.phone-dev { color: #888; font-size: 10px; text-align: center; }
.phone-rating { color: #f5a623; font-size: 12px; }
.phone-badge { background: rgba(255,255,255,0.08); padding: 2px 8px; border-radius: 20px; color: #aaa; font-size: 10px; border: 0.5px solid rgba(255,255,255,0.1); }
.home-bar { width: 50px; height: 4px; background: #333; border-radius: 2px; margin: 8px auto 4px; }

/* Swiper pagination dots */
.swiper-pagination-bullet { background: #444; opacity: 1; }
.swiper-pagination-bullet-active { background: #fff; }
.swiper-slide .phone { padding: 10px 8px !important; }

/* SPONSORED */
.sponsored-scroll {
  display: flex;
  gap: 2rem;
  overflow-x: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 1rem 1rem;
}
.sponsored-scroll::-webkit-scrollbar { display: none; }

/* Desktop */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 2rem; padding: 1.5rem 2rem 2rem; }
  .sponsored-scroll { padding: 0 2rem 1rem; }
  .featured-section { max-width: 900px; margin: 0 auto; }
  .filters-bar { align-items: center; }
  .categories-scroll { justify-content: center; }
  .swiper-slide { width: 220px !important; margin: 0 15px !important; }
  .swiper-slide .phone { width: 220px !important; border-radius: 52px !important; padding: 18px 10px !important; }
  .swiper-slide .phone-screen { aspect-ratio: 9 / 17; border-radius: 42px !important; }
  .swiper-slide .dynamic-island { width: 80px !important; height: 28px !important; }
  .swiper-slide .phone-icon { width: 90px !important; height: 90px !important; border-radius: 22px !important; }
  .swiper-slide .phone-icon-placeholder { width: 90px !important; height: 90px !important; border-radius: 22px !important; }
  .swiper-slide .phone-name { font-size: 16px !important; }
  .swiper-slide .phone-dev { font-size: 12px !important; }
  .swiper-slide .phone-rating { font-size: 14px !important; }
  .swiper-slide .home-bar { width: 70px !important; }
}