/* ========================================
   CONSEILS JARDIN - Styles V1.0
   ======================================== */

/* ----------------------------------------
   HERO
   ---------------------------------------- */
.cj-hero {
  position: relative;
  padding: calc(80px + var(--space-16)) 0 var(--space-16);
  background: linear-gradient(
    135deg,
    #1e4d0f 0%,
    #2d6e18 40%,
    #3a6b22 70%,
    #5a4020 100%
  );
  overflow: hidden;
}

.cj-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 255, 255, 0.04) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.06) 0%,
      transparent 40%
    ),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5c0 13.807-11.193 25-25 25' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1' fill='none'/%3E%3C/svg%3E");
}

.cj-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

/* Breadcrumb */
.cj-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-8);
  font-size: var(--text-sm);
}
.cj-breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}
.cj-breadcrumb a:hover {
  color: white;
}
.cj-breadcrumb span {
  color: rgba(255, 255, 255, 0.3);
}
.cj-bc-active {
  color: #86efac;
  font-weight: 600;
}

/* Hero icon */
.cj-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  border-radius: 24px;
  color: white;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.3),
    inset 0 2px 8px rgba(255, 255, 255, 0.2);
}
.cj-hero-icon svg {
  width: 46px;
  height: 46px;
}

.cj-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  color: white;
  margin-bottom: var(--space-4);
}

.cj-hero-desc {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.82);
  max-width: 580px;
  margin: 0 auto var(--space-8);
  line-height: 1.75;
}

.cj-hero-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.cj-hero-badges span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-2) var(--space-5);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  color: white;
  font-size: var(--text-sm);
  font-weight: 500;
  backdrop-filter: blur(8px);
}
.cj-hero-badges svg {
  width: 16px;
  height: 16px;
  color: #86efac;
}

/* ----------------------------------------
   FILTRES
   ---------------------------------------- */
.cj-filters-section {
  padding: var(--space-4) 0;
  background: white;
  position: sticky;
  top: 80px;
  z-index: 100;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 4px 14px rgba(0, 0, 0, 0.04);
}

.cj-filters {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
}

.cj-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #f3f4f6;
  color: #374151;
  border: 2px solid transparent;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s;
}

.cj-filter-btn svg {
  width: 16px;
  height: 16px;
}

.cj-filter-btn:hover {
  background: #dcfce7;
  color: #3a6b22;
  border-color: #86efac;
}
.cj-filter-btn--active,
.cj-filter-btn.active {
  background: linear-gradient(135deg, #3a6b22, #5a9a35);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(58, 107, 34, 0.3);
}
.cj-filter-btn--saison.active {
  background: linear-gradient(135deg, #5a9a35, #86efac);
}
.cj-filter-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
}
.cj-filter-btn.active .cj-filter-count {
  background: rgba(255, 255, 255, 0.25);
}
.cj-filter-sep {
  width: 1px;
  height: 28px;
  background: #e5e7eb;
  margin: 0 4px;
}

/* ----------------------------------------
   SECTION GRILLE
   ---------------------------------------- */
.cj-section {
  padding: var(--space-12) 0 var(--space-16);
  background: #f5f7f2;
}

.cj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

/* ----------------------------------------
   CARTE FICHE
   ---------------------------------------- */
.cj-card {
  position: relative;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
}
.cj-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.14);
}
.cj-card.cj-hidden {
  display: none;
}

/* Image */
.cj-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.cj-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.cj-card:hover .cj-card-img img {
  transform: scale(1.07);
}
.cj-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay */
.cj-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 77, 15, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cj-card:hover .cj-card-overlay {
  opacity: 1;
}
.cj-card-read-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 18px 26px;
  background: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.cj-card:hover .cj-card-read-btn {
  opacity: 1;
  transform: scale(1);
}
.cj-card-read-btn svg {
  width: 34px;
  height: 34px;
  color: #3a6b22;
}
.cj-card-read-btn span {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1f2937;
}

/* Niveau pill */
.cj-niveau-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  z-index: 5;
  backdrop-filter: blur(4px);
}

/* Vedette */
.cj-feat-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  z-index: 5;
}
.cj-feat-pill svg {
  width: 12px;
  height: 12px;
}

/* Contenu */
.cj-card-content {
  padding: 18px 20px;
}

.cj-card-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.cj-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
}
.cj-saison-pill {
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cj-card-content h3 {
  font-size: 1.05rem;
  color: #1f2937;
  margin: 0 0 4px;
  line-height: 1.3;
}
.cj-card-subtitle {
  font-size: 0.82rem;
  color: #3a6b22;
  font-weight: 600;
  margin: 0 0 6px;
}
.cj-card-desc {
  font-size: 0.84rem;
  color: #6b7280;
  margin: 0 0 10px;
  line-height: 1.4;
}

/* Aperçu astuces */
.cj-card-tips-preview {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cj-card-tips-preview li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.81rem;
  color: #374151;
}
.cj-card-tips-preview svg {
  width: 14px;
  height: 14px;
  color: #22c55e;
  flex-shrink: 0;
  margin-top: 2px;
}

/* CTA card */
.cj-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3a6b22;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.cj-card-cta:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

/* Empty state */
.cj-empty-state {
  text-align: center;
  padding: 70px 20px;
  color: #9ca3af;
}
.cj-empty-state svg {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  opacity: 0.25;
  display: block;
}
.cj-empty-state h3 {
  font-size: var(--text-2xl);
  color: #374151;
  margin-bottom: 12px;
}
.cj-empty-state p {
  font-size: var(--text-lg);
  margin-bottom: 24px;
}

.cj-no-results {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.cj-no-results svg {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  opacity: 0.2;
  display: block;
}

/* ----------------------------------------
   CTA SECTION
   ---------------------------------------- */
.cj-cta {
  padding: var(--space-24) 0;
  background: linear-gradient(135deg, #1e4d0f 0%, #3a6b22 50%, #5a4020 100%);
  position: relative;
}
.cj-cta-content {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.cj-cta-content h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  color: white;
  margin-bottom: var(--space-4);
}
.cj-cta-content p {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-10);
}
.cj-cta-content strong {
  color: #86efac;
}
.cj-cta-btns {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.cj-cta .btn-primary {
  background: white;
  color: #1e4d0f;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}
.cj-cta .btn-primary:hover {
  background: #f0fdf4;
  transform: translateY(-3px);
}
.cj-cta .btn-secondary {
  border-color: white;
  color: white;
}
.cj-cta .btn-secondary:hover {
  background: white;
  color: #1e4d0f;
}

/* ----------------------------------------
   MODAL FICHE DÉTAIL
   ---------------------------------------- */
.cj-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 5, 0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
  backdrop-filter: blur(10px);
}
.cj-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.cj-modal-box {
  background: white;
  border-radius: 22px;
  max-width: 680px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
  transform: scale(0.9) translateY(24px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cj-modal-backdrop.active .cj-modal-box {
  transform: scale(1) translateY(0);
}

/* Héro image dans la modal */
.cj-modal-hero {
  position: relative;
  aspect-ratio: 16/9;
  background: #1a3a0a;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
}
.cj-modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cj-modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(10, 20, 5, 0.65) 100%
  );
}
.cj-modal-badges {
  position: absolute;
  bottom: 14px;
  left: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cj-modal-badge {
  padding: 5px 13px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  backdrop-filter: blur(4px);
}
.cj-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: rgb(0 0 0 / 40%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.2s;
  z-index: 10;
}
.cj-modal-close-btn svg {
  width: 20px;
  height: 20px;
}
.cj-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: rotate(90deg);
}

/* Body modal */
.cj-modal-body {
  padding: 26px 28px 30px;
}

.cj-modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cj-modal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
}

.cj-modal-body h2 {
  font-size: 1.55rem;
  color: #1a3a0a;
  margin: 0 0 6px;
  line-height: 1.25;
}
.cj-modal-subtitle {
  font-size: 0.95rem;
  color: #3a6b22;
  font-weight: 600;
  margin: 0 0 14px;
}
.cj-modal-desc {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.7;
  margin: 0 0 22px;
}

/* Tips list */
.cj-modal-tips {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.cj-modal-tips-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #166534;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cj-modal-tips-title svg {
  width: 16px;
  height: 16px;
}
.cj-modal-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cj-modal-tips li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #1f2937;
  line-height: 1.5;
}
.cj-tips-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.cj-tips-check svg {
  width: 13px;
  height: 13px;
  color: white;
}

/* Tags */
.cj-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.cj-modal-tag {
  padding: 4px 12px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ----------------------------------------
   RESPONSIVE
   ---------------------------------------- */
@media (max-width: 768px) {
  .cj-hero {
    padding: calc(70px + var(--space-12)) 0 var(--space-12);
  }
  .cj-hero-icon {
    width: 78px;
    height: 78px;
    border-radius: 18px;
  }
  .cj-hero-icon svg {
    width: 38px;
    height: 38px;
  }
  .cj-filters-section {
    top: 70px;
  }
  .cj-grid {
    grid-template-columns: 1fr;
  }
  .cj-cta-btns {
    flex-direction: column;
    align-items: center;
  }
  .cj-modal-body {
    padding: 18px 18px 24px;
  }
  .cj-modal-body h2 {
    font-size: 1.3rem;
  }
  .cj-filter-sep {
    display: none;
  }
}

@media (max-width: 480px) {
  .cj-hero-badges {
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
  }
  .cj-modal-box {
    border-radius: 18px 18px 0 0;
  }
  .cj-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .cj-modal-hero {
    border-radius: 18px 18px 0 0;
  }
}

/* ── Image cliquable dans la modal ── */
.cj-modal-hero {
  cursor: zoom-in;
}
.cj-modal-hero-overlay {
  pointer-events: none;
}

.cj-modal-hero:hover img {
  filter: brightness(1.08);
  transition: filter 0.25s;
}
