/**
 * ITSOFT DZ - Resources Pages Styles
 * Blog, FAQ, Support, Documentation — light/dark via variables
 */

/* ============================================
   HERO (aligné sur legal/about/services/logiciels)
   ============================================ */

.resources-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  padding: calc(72px + 4rem) 0 4rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  overflow: hidden;
}

.resources-hero .hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  opacity: 0.6;
  pointer-events: none;
}

.resources-hero .hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(0, 102, 204, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(0, 163, 224, 0.08) 0%, transparent 50%);
}

.resources-hero .hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 102, 204, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 204, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.resources-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.resources-hero .hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 102, 204, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0066CC;
  margin-bottom: 2rem;
}

.resources-hero .hero-label i {
  font-size: 1rem;
}

.resources-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.resources-hero h1 .line {
  display: block;
}

.resources-hero .hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #334155;
  line-height: 1.7;
  max-width: 700px;
  margin: 0;
}

[data-theme="dark"] .resources-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .resources-hero .hero-mesh {
  background:
    radial-gradient(circle at 30% 40%, rgba(0, 163, 224, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(0, 102, 204, 0.1) 0%, transparent 50%);
}

[data-theme="dark"] .resources-hero .hero-grid {
  background-image:
    linear-gradient(rgba(0, 163, 224, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 163, 224, 0.05) 1px, transparent 1px);
}

[data-theme="dark"] .resources-hero .hero-label {
  background: rgba(0, 102, 204, 0.2);
  color: #00A3E0;
}

[data-theme="dark"] .resources-hero h1 {
  color: #f1f5f9;
}

[data-theme="dark"] .resources-hero .hero-description {
  color: #cbd5e1;
}

/* ============================================
   SECTIONS & CARDS
   ============================================ */

.resources-section {
  background: var(--bg);
  padding: 4rem 0 6rem;
}

.resources-narrow {
  max-width: 860px;
  margin: 0 auto;
}

.resources-block {
  margin-top: 4rem;
}

.resources-block h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--text-main);
  margin: 0 0 0.75rem;
  text-align: center;
}

.resources-block-sub {
  color: var(--text-muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.resources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .resources-grid:not(.resources-grid-3):not(.resources-grid-4) {
    grid-template-columns: repeat(3, 1fr);
  }

  .resources-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) {
  .resources-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.resource-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-4px);
  border-color: #0066CC;
  box-shadow: 0 16px 40px rgba(0, 102, 204, 0.12);
}

.resource-card-center,
.resource-step {
  text-align: center;
}

.resource-step {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.resource-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.resource-card-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #0066CC;
  background: rgba(0, 102, 204, 0.1);
  border: 1px solid rgba(0, 102, 204, 0.2);
  border-radius: 1rem;
}

.resource-card-center .resource-card-icon,
.resource-step .resource-card-icon {
  margin-bottom: 1rem;
}

.resource-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0066CC;
  background: rgba(0, 102, 204, 0.08);
  border: 1px solid rgba(0, 102, 204, 0.18);
  border-radius: 2rem;
  padding: 0.3rem 0.8rem;
}

.resource-card h3 {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--text-main);
  margin: 0 0 0.75rem;
}

.resource-card > p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.65;
  margin: 0 0 1rem;
}

.resource-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.resource-card-meta i {
  margin-right: 0.35rem;
}

.resource-action {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.resource-action a {
  color: #0066CC;
  text-decoration: none;
}

.resource-action a:hover {
  text-decoration: underline;
}

.resource-price {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
}

.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resource-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.resource-list li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-size: 0.75rem;
  color: #0066CC;
}

.resource-card-highlight {
  border-color: #0066CC;
  box-shadow: 0 16px 40px rgba(0, 102, 204, 0.15);
}

[data-theme="dark"] .resource-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .resource-card-icon {
  color: #00A3E0;
  background: rgba(0, 102, 204, 0.15);
  border-color: rgba(0, 102, 204, 0.3);
}

[data-theme="dark"] .resource-category {
  color: #00A3E0;
  background: rgba(0, 102, 204, 0.12);
  border-color: rgba(0, 102, 204, 0.3);
}

[data-theme="dark"] .resource-step {
  background: rgba(0, 102, 204, 0.06);
}

[data-theme="dark"] .resource-action a {
  color: #00A3E0;
}

/* ============================================
   FEATURED (blog)
   ============================================ */

.resources-featured {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .resources-featured {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.resources-featured-body {
  padding: clamp(1.75rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.resources-featured-body h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  line-height: 1.2;
  color: var(--text-main);
  margin: 0;
}

.resources-featured-body > p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 0.5rem;
  max-width: 56ch;
}

.resources-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #0066CC, #00A3E0);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.post-category {
  font-weight: 700;
  color: #0066CC;
}

.post-dot {
  opacity: 0.5;
}

[data-theme="dark"] .post-category {
  color: #00A3E0;
}

.resources-featured-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 3rem 2rem;
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
}

[data-theme="dark"] .resources-featured-visual {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #0066CC 130%);
}

/* ============================================
   FAQ
   ============================================ */

.faq-group {
  margin-bottom: 2.5rem;
}

.faq-group h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  color: var(--text-main);
  margin: 0 0 1rem;
}

.faq-group h2 i {
  color: #0066CC;
}

[data-theme="dark"] .faq-group h2 i {
  color: #00A3E0;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text-main);
}

.faq-chevron {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-light);
  transition: transform 0.3s ease;
}

.faq-question.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
}

.faq-answer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.7;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

/* ============================================
   CTA
   ============================================ */

.resources-cta {
  margin-top: 4rem;
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: clamp(2rem, 5vw, 3.5rem);
}

.resources-cta h2 {
  color: var(--text-main);
  margin: 0 0 0.75rem;
}

.resources-cta p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}

.resources-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
  .resources-hero {
    min-height: auto;
    padding: calc(64px + 3rem) 0 3rem;
  }

  .resources-section {
    padding: 3rem 0 4rem;
  }

  .resources-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .resources-cta-actions .btn {
    width: 100%;
  }
}
