/* ============================================================
   PHUKET360 — hub.css
   Mobile-first. Page hub catégorie.
   --cat-color défini en inline style sur .hub-wrapper
   ============================================================ */

/* ============================================================
   WRAPPER
   ============================================================ */
.hub-wrapper {
  width: 100%;
  background: #ffffff;
}

/* ============================================================
   HEADER HUB
   ============================================================ */
.hub-header {
  background: var(--cat-color, var(--ocean-deep));
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}

.hub-header-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--cat-color, var(--ocean-deep)) 0%, transparent 60%);
  opacity: 0.85;
  pointer-events: none;
}

.hub-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  max-width: 640px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hub-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  flex-shrink: 0;
}

.hub-icon-wrap svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
  stroke-width: 1.75;
}

.hub-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin: 0;
}

.hub-count-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.hub-breadcrumb {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.hub-breadcrumb-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.hub-breadcrumb-inner a {
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition);
}

.hub-breadcrumb-inner a:hover {
  color: var(--cat-color, var(--ocean-light));
  text-decoration: none;
}

.bc-sep {
  display: flex;
  align-items: center;
  color: var(--text-light);
  opacity: 0.5;
}

.bc-sep svg {
  width: 12px;
  height: 12px;
}

.bc-current {
  color: var(--cat-color, var(--ocean));
  font-weight: 600;
}

/* ============================================================
   CONTENU PRINCIPAL
   ============================================================ */
.hub-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

/* ============================================================
   ÉTAT VIDE
   ============================================================ */
.hub-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 60px 0;
  text-align: center;
}

.hub-empty-text {
  color: var(--text-light);
  font-size: 1rem;
}

.hub-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--ocean-deep);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity var(--transition);
}

.hub-empty-btn:hover {
  opacity: 0.85;
  color: #fff;
  text-decoration: none;
}

.hub-empty-btn svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  flex-shrink: 0;
}

/* ============================================================
   GRILLE ARTICLES — 1 colonne mobile (chaque carte respire),
   2 colonnes a partir de la tablette, 3 sur desktop (cf plus bas)
   ============================================================ */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ============================================================
   CARD ARTICLE
   ============================================================ */
.hub-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-card:hover {
  text-decoration: none;
}

/* Image — ratio 16/9 via padding trick */
.hub-card-img {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background-size: cover;
  background-position: center;
  background-color: var(--cat-color, var(--ocean-deep));
  flex-shrink: 0;
}

.hub-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-block;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.hub-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.hub-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ocean-deep);
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hub-card-extrait {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Masquees sur mobile : pas assez de place pour eviter une coupure en plein
   milieu d'un mot, reapparaissent a partir de la tablette (cf @media 768px). */
.hub-card-puces {
  display: none;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  flex-direction: column;
  gap: 3px;
}
.hub-card-puces li {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.4;
  padding-left: 13px;
  position: relative;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.hub-card-puces li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cat-color, #1B4F72);
}

.hub-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.hub-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.hub-meta-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ============================================================
   BANDEAU THÉMATIQUES — même composant qu'article.php
   ============================================================ */
.article-thematiques {
  background: var(--sable);
  padding: 40px 16px;
}

.article-thematiques-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.article-thematiques-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ocean-deep);
  margin: 0;
}

.thema-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

.thema-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  background: #fff;
  border-radius: 12px;
  text-decoration: none;
  border-bottom: 3px solid var(--cat-color, #2E86C1);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.thema-card i,
.thema-card svg {
  width: 22px;
  height: 22px;
  stroke: var(--cat-color, #2E86C1);
  stroke-width: 1.75;
  flex-shrink: 0;
}

.thema-card span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

.article-thematiques-btn {
  display: inline-flex;
  align-items: center;
  background: var(--soleil);
  color: var(--ocean-deep);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 28px;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 4px;
  transition: opacity 0.2s;
}

.article-thematiques-btn:hover {
  opacity: 0.88;
  text-decoration: none;
  color: var(--ocean-deep);
}

@media (min-width: 768px) {
  .thema-grid { gap: 14px; }
  .thema-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
  }
}

.hub-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.hub-cta-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.hub-cta-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--pill-color, var(--ocean-light));
  color: #fff;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
}

.hub-pill:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

.hub-pill svg {
  width: 15px;
  height: 15px;
  stroke: #fff;
  flex-shrink: 0;
}

/* ============================================================
   DESKTOP (>= 768px)
   ============================================================ */
@media (min-width: 768px) {

  .hub-header {
    min-height: 320px;
  }

  .hub-title {
    font-size: 2.8rem;
  }

  .hub-icon-wrap {
    width: 80px;
    height: 80px;
  }

  .hub-icon-wrap svg {
    width: 40px;
    height: 40px;
  }

  .hub-breadcrumb-inner {
    padding: 12px 24px;
  }

  .hub-main {
    padding: 40px 24px 64px;
  }

  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .hub-card-puces {
    display: flex;
  }

  /* Hover card uniquement sur desktop */
  .hub-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }

}

@media (min-width: 1024px) {
  .hub-main {
    padding: 48px 32px 80px;
  }

  .hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
