/* =========================================================
   Pages contenu — FAQ, Blog, Recherche, Tutoriels
   Design system refonte 2026 (CGT Alkor)
   ========================================================= */

/* ---------- Hero éditorial compact (FAQ, Blog, Tutoriels) ---------- */
.content-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(280px, 46vw, 420px);
  display: flex;
  align-items: flex-end;
  padding: clamp(28px, 9vw, 72px) 0 clamp(24px, 7vw, 56px);
  overflow: hidden;
}

.content-hero-bg {
  position: absolute;
  inset: -8% 0;
  z-index: -2;
  will-change: transform;
}

.content-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.content-hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 15, 30, 0.45) 0%, rgba(3, 15, 30, 0.72) 60%, var(--bg-deep) 100%),
    radial-gradient(120% 80% at 15% 100%, rgba(3, 15, 30, 0.6), transparent 70%);
}

.content-hero-inner {
  width: 100%;
}

.content-hero-title {
  margin: 10px 0 0;
  max-width: 18ch;
}

.content-hero-lede {
  margin: 14px 0 0;
  max-width: 58ch;
  color: var(--text-2);
}

/* ---------- Recherche — en-tête ---------- */
.search-head {
  padding-top: clamp(28px, 6vw, 56px);
  padding-bottom: clamp(8px, 2vw, 16px);
}

.search-head-title {
  margin: 8px 0 0;
  font-size: clamp(32px, 5.6vw, 56px);
}

.search-head-lede {
  margin: 14px 0 0;
  max-width: 58ch;
  color: var(--text-2);
}

.search-form-wrap {
  margin: clamp(24px, 4vw, 40px) 0 clamp(28px, 5vw, 48px);
}

.search-form {
  position: relative;
  max-width: 720px;
}

.search-form-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search-form-input {
  width: 100%;
  padding: 16px 120px 16px 52px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-2);
  background: rgba(8, 44, 82, 0.45);
  color: var(--text);
  font-size: 16px;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.search-form-input::placeholder {
  color: var(--text-3);
}

.search-form-input:focus {
  outline: none;
  border-color: rgba(97, 177, 188, 0.55);
  box-shadow: 0 0 0 3px rgba(97, 177, 188, 0.12);
}

.search-form-clear {
  position: absolute;
  right: 96px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  padding: 6px;
  border-radius: var(--r-pill);
  transition: color 0.2s, background 0.2s;
}

.search-form-clear:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.search-form-submit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.search-meta {
  margin-bottom: clamp(20px, 3vw, 32px);
  color: var(--text-2);
  font-size: 15px;
}

.search-meta strong {
  color: var(--accent-soft);
}

.search-empty {
  text-align: center;
  padding: clamp(40px, 8vw, 72px) clamp(16px, 4vw, 24px);
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(97, 177, 188, 0.08), transparent 70%),
    linear-gradient(165deg, rgba(14, 58, 102, 0.22) 0%, rgba(8, 44, 82, 0.45) 100%);
}

.search-empty-icon {
  display: inline-flex;
  margin-bottom: 18px;
  color: rgba(97, 177, 188, 0.35);
}

.search-empty-title {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 10px;
}

.search-empty-text {
  margin: 0 0 24px;
  color: var(--text-2);
  max-width: 48ch;
  margin-inline: auto;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.search-category-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  max-width: 920px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .search-category-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.search-category-cards .hub-card {
  min-height: 0;
  padding: 20px;
  text-decoration: none;
  color: inherit;
}

.search-category-cards .hub-card h3 {
  font-size: 18px;
  margin: 0;
}

.search-category-cards .hub-card p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-2);
}

.product-card-ref {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-3);
}

.product-card-ref strong,
.product-card-ref {
  color: var(--accent-soft);
}

.product-card-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}

/* ---------- FAQ accordion ---------- */
.faq-section {
  padding-top: clamp(28px, 5vw, 48px);
  padding-bottom: clamp(48px, 8vw, 88px);
}

.faq-category {
  margin-bottom: clamp(32px, 5vw, 48px);
}

.faq-category:last-child {
  margin-bottom: 0;
}

.faq-category-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 500;
  color: var(--accent-soft);
  margin: 0 0 16px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.04) 0%, transparent 52%),
    linear-gradient(165deg, rgba(14, 58, 102, 0.28) 0%, rgba(8, 44, 82, 0.52) 100%);
  box-shadow: var(--shadow-1);
  transition: border-color 0.35s var(--ease-out);
}

.faq-item[open] {
  border-color: rgba(97, 177, 188, 0.32);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 2.5vw, 22px) clamp(18px, 2.8vw, 24px);
  font-weight: 600;
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.45;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-right: 2px solid var(--accent-soft);
  border-bottom: 2px solid var(--accent-soft);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}

.faq-item[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 10px;
}

.faq-answer {
  padding: 0 clamp(18px, 2.8vw, 24px) clamp(18px, 2.8vw, 24px);
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.72;
  overflow-wrap: break-word;
}

.faq-answer p {
  margin: 0 0 12px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: var(--accent-soft);
}

.faq-empty {
  text-align: center;
  padding: clamp(40px, 8vw, 64px) 20px;
  color: var(--text-3);
}

/* ---------- Blog grille ---------- */
.blog-section {
  padding-top: clamp(28px, 5vw, 48px);
  padding-bottom: clamp(48px, 8vw, 88px);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 24px);
}

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, transparent 55%),
    linear-gradient(165deg, rgba(14, 58, 102, 0.22) 0%, rgba(8, 44, 82, 0.42) 100%);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.35s var(--ease-out), transform 0.45s var(--ease-luxe), box-shadow 0.35s var(--ease-out);
}

.blog-card:hover {
  border-color: rgba(97, 177, 188, 0.34);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.blog-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(8, 44, 82, 0.55);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease-luxe);
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: clamp(18px, 2.8vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-card-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.blog-card-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 500;
  line-height: 1.18;
  margin: 0;
}

.blog-card-excerpt {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 28px);
  margin-top: clamp(32px, 5vw, 48px);
}

.blog-pagination a {
  color: var(--accent-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.blog-pagination a:hover {
  color: var(--text);
}

.blog-pagination span {
  color: var(--text-3);
  font-size: 13px;
}

/* ---------- Article blog ---------- */
.blog-article-section {
  padding-top: clamp(28px, 5vw, 48px);
  padding-bottom: clamp(48px, 8vw, 88px);
}

.blog-article-header {
  max-width: 820px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.blog-article-kicker {
  display: inline-block;
  margin-bottom: 8px;
}

.blog-article-title {
  font-size: clamp(28px, 4.6vw, 48px);
  line-height: 1.08;
  margin: 0 0 16px;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-bottom: clamp(20px, 3vw, 28px);
  border-bottom: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: 14px;
}

.blog-article-featured {
  margin-bottom: clamp(28px, 4vw, 40px);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-1);
}

.blog-article-featured img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-article-back {
  margin-top: clamp(32px, 5vw, 48px);
  text-align: center;
}

/* Corps article Strapi */
.blog-article-body {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.75;
  color: var(--text-2);
  max-width: min(820px, 100%);
  overflow-wrap: break-word;
}

.blog-article-body > *:first-child {
  margin-top: 0 !important;
}

.blog-article-body h1,
.blog-article-body h2 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
  margin: 28px 0 10px;
  line-height: 1.2;
}

.blog-article-body h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(97, 177, 188, 0.28);
}

.blog-article-body h2:first-of-type {
  margin-top: 0;
}

.blog-article-body h3 {
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 20px);
  color: var(--accent-soft);
  margin: 20px 0 8px;
}

.blog-article-body h4,
.blog-article-body h5,
.blog-article-body h6 {
  font-weight: 600;
  margin: 16px 0 6px;
  color: var(--text);
}

.blog-article-body p {
  margin: 0 0 14px;
}

.blog-article-body p:empty,
.blog-article-body p:has(> br:only-child) {
  display: none;
}

.blog-article-body ul,
.blog-article-body ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
}

.blog-article-body li {
  margin: 0 0 6px;
}

.blog-article-body a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-article-body a:hover {
  color: var(--text);
}

.blog-article-body strong,
.blog-article-body b {
  color: var(--text);
  font-weight: 600;
}

.blog-article-body blockquote {
  margin: 16px 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

.blog-article-body img {
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border-radius: var(--r-sm);
}

.blog-article-body hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 24px 0;
}

.blog-article-body pre {
  margin: 14px 0;
  padding: 14px;
  overflow-x: auto;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--r-sm);
}

.blog-article-body code {
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
}

.blog-article-body pre code {
  padding: 0;
  background: none;
}

/* ---------- Tutoriels vidéo ---------- */
.tutorial-section {
  padding-top: clamp(28px, 5vw, 48px);
  padding-bottom: clamp(48px, 8vw, 88px);
}

.tutorial-category {
  margin-bottom: clamp(40px, 6vw, 64px);
}

.tutorial-category:last-child {
  margin-bottom: 0;
}

.tutorial-category-head {
  margin-bottom: clamp(20px, 3vw, 28px);
  max-width: 52ch;
}

.tutorial-category-name {
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.1;
  margin: 8px 0 0;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tutorial-video {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  text-align: left;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-1);
  transition: border-color 0.35s var(--ease-out), transform 0.45s var(--ease-luxe);
}

.tutorial-video:hover {
  border-color: rgba(97, 177, 188, 0.34);
  transform: translateY(-3px);
}

.tutorial-video-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.tutorial-video-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tutorial-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 15, 30, 0.45);
  transition: background 0.35s var(--ease-out);
}

.tutorial-video:hover .tutorial-video-play {
  background: rgba(3, 15, 30, 0.55);
}

.tutorial-video-play img {
  width: 48px;
  height: 48px;
  opacity: 0.92;
}

.tutorial-video-caption {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background:
    linear-gradient(165deg, rgba(14, 58, 102, 0.35) 0%, rgba(8, 44, 82, 0.55) 100%);
}

/* Modale vidéo */
.tutorial-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(3, 15, 30, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tutorial-modal.is-open {
  display: flex;
}

.tutorial-modal-panel {
  position: relative;
  width: min(1100px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline-2);
  background: linear-gradient(165deg, rgba(8, 44, 82, 0.92) 0%, rgba(4, 18, 34, 0.96) 100%);
  box-shadow: var(--shadow-2);
}

.tutorial-modal-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 40px;
}

.tutorial-modal-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.tutorial-modal-title {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 28px);
  margin: 0;
  line-height: 1.15;
}

.tutorial-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s, background 0.2s;
}

.tutorial-modal-close:hover {
  border-color: rgba(97, 177, 188, 0.45);
  background: rgba(97, 177, 188, 0.12);
}

.tutorial-modal-body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.tutorial-modal-nav {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s, background 0.2s;
}

.tutorial-modal-nav:hover {
  border-color: rgba(97, 177, 188, 0.45);
  background: rgba(97, 177, 188, 0.12);
}

.tutorial-modal-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.tutorial-modal-video-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--r-sm);
  overflow: hidden;
}

.tutorial-modal-video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.tutorial-modal-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tutorial-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 120px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: transparent;
  opacity: 0.7;
  transition: opacity 0.2s, border-color 0.2s;
}

.tutorial-thumb.is-active,
.tutorial-thumb:hover {
  opacity: 1;
  border-color: var(--accent);
}

.tutorial-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.tutorial-thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
}

.tutorial-thumb-play img {
  width: 24px;
  height: 24px;
  aspect-ratio: auto;
}

/* ---------- CTA communauté ---------- */
.content-cta {
  text-align: center;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--r-lg);
  border: 1px solid rgba(97, 177, 188, 0.22);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(97, 177, 188, 0.1), transparent 70%),
    linear-gradient(165deg, rgba(14, 58, 102, 0.28) 0%, rgba(8, 44, 82, 0.52) 100%);
  box-shadow: var(--shadow-1);
}

.content-cta-title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.8vw, 28px);
  margin: 0 0 10px;
}

.content-cta-text {
  margin: 0 auto 20px;
  max-width: 48ch;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.65;
}

/* ---------- Desktop ---------- */
@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tutorial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

@media (max-width: 719px) {
  .search-form-input {
    padding-right: 52px;
    font-size: 16px;
  }

  .search-form-submit {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 10px;
  }

  .search-form-clear {
    right: 14px;
  }

  .search-form {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .search-form-icon {
    left: 14px;
  }

  .tutorial-modal-body {
    grid-template-columns: 1fr;
  }

  .tutorial-modal-nav {
    display: none;
  }

  .tutorial-modal-mobile-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .tutorial-modal-mobile-nav .tutorial-modal-nav {
    display: grid;
  }
}

@media (min-width: 720px) {
  .tutorial-modal-mobile-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card:hover,
  .tutorial-video:hover {
    transform: none;
  }

  .blog-card:hover .blog-card-media img {
    transform: none;
  }
}
