@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============== Reset & base mobile-safe ============== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif !important; }
html, body { overflow-x: hidden; background:#fff; color:#000; }
img, video { max-width: 100%; height: auto; display: block; }
input, select, textarea, button { font-size: 16px; } /* évite le zoom iOS */
.hidden { display: none !important; }

/* Header fixé injecté dans #header-placeholder */
#header-placeholder {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
}

/* Décalage du contenu si header fixed (mobile & petits écrans) */
@media (max-width: 600px) { body { padding-top: 72px; } }

/* ============== Filtres ============== */
.filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
  margin: 80px 0 30px; /* espace sous header */
}

.filter { position: relative; width: 140px; }

.filter-toggle {
  width: 100%; padding: 6px 22px 6px 16px;
  background: #fff; border: 1px solid #000; border-radius: 20px;
  text-align: center; cursor: pointer; font-size: 16px; font-weight: 600;
  position: relative;
}
.filter-toggle:hover { background: #f7f7f7; }

.filter-toggle::after {
  content: ""; position: absolute; top: 50%; right: 10px;
  width: 20px; height: 14.5px; transform: translateY(-50%);
  background: url("../logos/minifleche.png") center/contain no-repeat;
  pointer-events: none;
}
.filter.open .filter-toggle::after { transform: translateY(-50%) rotate(180deg); }

.filter-options {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; width: 100%;
  background: #fff; border: 1px solid rgba(0,0,0,0.2); border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); list-style: none; padding: 4px 0; z-index: 10;
  max-height: 60vh; overflow: auto; /* mobile: scroll si liste longue */
}
.filter.open .filter-options { display: block; }

.filter-options li {
  padding: 8px 12px; cursor: pointer; font-size: 16px; line-height: 1.2;
  transition: background .15s, text-decoration .15s;
}
.filter-options li:hover { background: rgba(0,0,0,0.05); text-decoration: underline; }

/* — Verrou des filtres pour non-abonnés (on peut ouvrir, mais pas sélectionner) — */
.no-sub .filter .filter-options li {
  cursor: not-allowed !important; color: #888;
}
.no-sub .filter .filter-options li:hover { background: #fff; text-decoration: none; }

/* ============== Grille des produits ============== */
.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: 1300px; margin: 0 auto 20px; padding: 0 20px;
}

/* Conteneur où le JS injecte les cartes */
#product-list { display: contents; }

/* Cartes produit */
.product-card {
  display: flex; flex-direction: column; align-items: stretch;
  margin-bottom: 40px; cursor: pointer;
}
.product-card img {
  width: 100%; height: auto; max-height: 240px; object-fit: cover; border-radius: 15px;
}
.product-card .title {
  font-size: 16px; font-weight: 500; margin: 12px 14px 4px; line-height: 1.4; text-align: left;
}
.product-card .views {
  margin: 0 14px 14px; font-size: 14px; color: #666; text-align: left;
}

/* — État verrouillé (non-abonné au-delà des 8 premières) — */
.product-card.locked { position: relative; cursor: not-allowed !important; }
.product-card.locked img,
.product-card.locked .title,
.product-card.locked .views {
  filter: blur(6px);
  user-select: none;
}
.product-card.locked:hover img,
.product-card.locked:hover .title,
.product-card.locked:hover .views {
  filter: blur(6px); /* pas de sur-flou au hover */
}

/* ============== Carte épinglée (projet) ============== */
.pinned-card{
  display: block !important; background: none !important; border-radius: 12px;
  overflow: hidden; margin: 0 0 40px 0; line-height: 0;
}
.pinned-card img{
  display: block; width: 100%; height: 240px; object-fit: cover; border-radius: 12px;
}
.pinned-overlay, .pinned-title, .pinned-cta { display: none !important; }

/* ============== Bouton “Afficher plus” ============== */
.more-wrapper { width: 100%; display: flex; justify-content: center; margin: 20px 0; }
.more-btn {
  background: #fff; border: 1px solid #000; border-radius: 50px;
  width: 50px; height: 30px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .18s, transform .18s; padding: 0;
}
.more-btn:hover { background: #f5f5f5; }
.more-btn:active { transform: translateY(1px); }
.more-icon { width: 20px; height: auto; }

/* ============== Footer ============== */
.site-footer { border-top: 1px solid #000; background: #fff; padding: 40px 34px 55px; }
.footer-inner { max-width: 1220px; margin: 0 auto; display: flex; align-items: flex-start; }

.footer-learning { flex: 1.35; }
.footer-learning .footer-title { font-size: 22px; font-weight: 700; margin-bottom: 26px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin: 20px 0; }
.footer-list a {
  text-decoration: none; color: #000; font-size: 16px; font-weight: 500;
  transition: color .18s, text-decoration .18s;
}
.footer-list a:hover { color: #444; text-decoration: underline; }

.footer-separator { width: 1px; background: #000; opacity: 0.85; margin: 0 40px; align-self: stretch; }

.footer-social { flex: 0.9; display: flex; flex-direction: column; }
.footer-social .footer-title { font-size: 22px; font-weight: 700; margin-bottom: 26px; }
.social-icons { display: flex; gap: 30px; margin-bottom: 24px; }
.social-link { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.social-link img { max-width: 100%; max-height: 100%; }

.info-btn {
  display: inline-block; text-decoration: none !important; color: #000; border: 1px solid #000;
  padding: 10px 20px; font-size: 14px; font-weight: 600; border-radius: 22px; background: #fff; text-align: center;
  transition: background .18s, color .18s, transform .18s, text-decoration .18s;
  margin-bottom: 12px;
}
.info-btn:hover { background: #000; color: #fff; transform: translateY(-2px); text-decoration: underline; }

/* ============== Responsive ============== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; gap: 14px; }
  .product-card img, .pinned-card img { height: 200px; object-fit: cover; }

  /* Boutons tactiles */
  .essor-btn, .btn-primary, .btn-outline, .btn-offer, .btn-unsub {
    min-height: 44px; width: 100%;
  }
}

/* ==== SAFE AREA iOS & espace en bas ==== */
html, body { height: 100%; }
body {
  /* Ajoute un “coussin” en bas pour la barre iOS, sans impacter desktop */
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

/* ==== Footer responsive (≤ 480px) ==== */
@media (max-width: 480px) {
  .site-footer { padding: 18px 0 28px; }

  /* La grille du footer passe en 1 colonne */
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px 10px;
  }

  .footer-separator { display: none; }

  .footer-title {
    font-size: clamp(22px, 6vw, 28px);
    margin-bottom: 8px;
  }

  /* Liste “Essor Learning.” plus lisible */
  .footer-learning .footer-list { font-size: 16px; line-height: 1.45; }
  .footer-learning .footer-list li { margin: 8px 0; }

  /* Icônes réseaux : wrap + espacées */
  .social-icons { display: flex; flex-wrap: wrap; gap: 14px; }
  .social-link img { width: 32px; height: auto; }

  /* Bouton Mentions légales sur toute la largeur, lisible */
  .info-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 15px;
  }
}

/* Un cran encore plus étroit */
@media (max-width: 360px) {
  .footer-title { font-size: clamp(20px, 6.5vw, 26px); }
  .social-link img { width: 28px; }
}



