/* =====================================================
   MOVAWAY — COMPONENTS partagés (modale vidéo, blog, FAQ home, story)
   ===================================================== */

/* ============ MODALE VIDÉO ============ */
.has-video-trigger { cursor: pointer; }

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.video-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 8, 56, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.video-modal-content {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: min(95vw, 480px);
  max-height: 90vh;
  transform: scale(0.94);
  transition: transform .3s ease;
}
.video-modal.is-open .video-modal-content {
  transform: scale(1);
}
.video-modal-player {
  width: 100%;
  height: auto;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  background: #000;
  display: block;
}
.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  border: 0;
}
.video-modal-close:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }
@media (max-width: 540px) {
  .video-modal-close { top: -46px; right: 4px; }
}

/* ============ BLOG ============
 * Scopé à `section.blog` pour ne PAS entrer en collision avec `body.blog`
 * que WordPress ajoute via body_class() quand is_home() est vrai
 * (cas par défaut sur la homepage si pas de "Page d'articles" séparée). */
section.blog {
  padding: 80px 0;
  background: var(--bg-soft);
}
section.blog .section-head { text-align: center; max-width: 680px; margin: 0 auto 50px; }
section.blog .section-head p { color: var(--ink-soft); font-weight: 500; margin-top: 14px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .blog-grid { grid-template-columns: 1fr; }
}
.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
/* Stretched link : SEO préservé (1 seule ancre sur le titre), UX : toute la carte cliquable */
.blog-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.blog-card h3 a:hover { color: var(--primary); }
.blog-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--bg); }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.tag-blog {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark); /* a11y : primary sur blanc = 3,68:1 < 4,5:1 ; primary-dark = 6:1 */
  margin-bottom: 10px;
}
.blog-body h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  line-height: 1.25;
}
.blog-body p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 18px;
  flex: 1;
  font-weight: 500;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-soft);
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-weight: 600;
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ============ BLOG SLIDER (optionnel — n'altère pas la zone .blog si retiré) ============ */
.blog-slider {
  position: relative;
  padding: 4px 0;
}
.blog-slider-viewport {
  overflow: hidden;
}
/* Override de .blog-grid UNIQUEMENT lorsqu'elle est dans le slider (sinon elle garde sa grille native) */
.blog-slider .blog-grid {
  display: flex;
  gap: 24px;
  grid-template-columns: none;
  transition: transform .4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.blog-slider .blog-card {
  flex: 0 0 calc((100% - 48px) / 3); /* 3 visibles + 2 gaps de 24px */
  min-width: 0;
}
/* Boutons navigation (au milieu de la thumb de l'article — aspect-ratio 16/10 → ~150-200px) */
.blog-slider-nav {
  position: absolute;
  top: 130px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 4px;
  transition: background .2s ease, color .2s ease, transform .2s ease, opacity .2s ease;
}
.blog-slider-nav:hover:not(:disabled) {
  background: var(--primary-cta);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.05);
}
.blog-slider-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.blog-slider-prev { left: -10px; }
.blog-slider-next { right: -10px; }

/* Pastilles */
.blog-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}
/* Accessibilité : zone tactile >= 24x24px (bouton), pastille visuelle en
   ::before (10px) pour garder le rendu d'origine. */
.blog-slider-dots .dot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.blog-slider-dots .dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background .2s ease, width .2s ease;
}
.blog-slider-dots .dot:hover::before { background: var(--ink-mute); }
.blog-slider-dots .dot.is-active { width: 34px; }
.blog-slider-dots .dot.is-active::before {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

@media (max-width: 999px) {
  .blog-slider .blog-card { flex: 0 0 100%; }
  .blog-slider-nav { top: 100px; }
}


/* ============ FAQ ============ */
.faq {
  padding: 80px 0;
  background-color: var(--bg-soft);
  background-image: url("https://movaway.fr/wp-content/uploads/2025/11/bg-faq.svg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: contain;
}
.faq .section-head { text-align: center; max-width: 600px; margin: 0 auto 40px; }
.faq-list { max-width: 820px; margin: 0 auto; }
details.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}
details.faq-item[open] {
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(41, 124, 255, 0.18);
}
details.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 50px 16px 25px;
  font-weight: 700;
  font-size: 16px;
  line-height: 23px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: background .25s ease, color .2s ease;
}
details.faq-item[open] > summary {
  background: var(--primary-cta);
  color: #fff;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 32px; height: 32px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 400;
  transition: transform .25s ease, background .2s ease, color .2s ease;
}
details.faq-item[open] summary::after {
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
details.faq-item .faq-content {
  padding: 25px 25px 40px;
  color: var(--ink-soft);
  line-height: 1.7em;
  font-weight: 500;
  font-size: 16px;
  background: #fff;
}
details.faq-item .faq-content strong { color: var(--ink); font-weight: 800; }

/* Animation d'ouverture : simple fondu + léger glissement.
   IMPORTANT : l'AFFICHAGE repose sur le comportement natif de <details>
   (le contenu est rendu dès l'ouverture, fiable partout). L'animation ne
   fait qu'embellir l'entrée et ne peut JAMAIS masquer le contenu. */
@keyframes faqContentIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
details.faq-item[open] > .faq-content {
  animation: faqContentIn 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  details.faq-item[open] > .faq-content { animation: none; }
}

.faq-cta { text-align: center; margin-top: 32px; }

/* ============ FORMULAIRES DE LEAD (tous les forms du site) ============ */
/* Honeypot anti-spam : champ invisible pour les humains (les bots le remplissent).
   display:none suffirait, mais certains bots l'ignorent → on le sort de l'écran. */
.mvw-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  margin: 0; padding: 0;
}
/* Checkbox consentement RGPD */
.mvw-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  cursor: pointer;
}
.mvw-form-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: 1px;
  accent-color: var(--primary);
  cursor: pointer;
}
.mvw-form-consent a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
/* Message de confirmation / erreur post-soumission */
.mvw-form-feedback {
  border-radius: var(--radius-md, 12px);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 14.5px;
  line-height: 1.55;
}
.mvw-form-feedback strong { display: block; margin-bottom: 2px; }
.mvw-form-feedback--ok  { background: #E7F7EE; color: #14532d; border: 1px solid #86efac; }
.mvw-form-feedback--err { background: #FDECEC; color: #7f1d1d; border: 1px solid #fca5a5; }
.newsletter-ok { font-size: 15px; }

/* ============ SKELETONS JOIN STORIES : espace réservé (anti-CLS) ============ */
/* Le widget (bulle vidéo) fait ~120-140px de haut : on réserve la place pour que
   son injection (ou la disparition du skeleton) ne décale plus la page. */
.landing-callback,
.paiement-callback,
.contact-callback {
  min-height: 140px;
}

/* Desktop : bump du padding gauche selon Salient */
@media (min-width: 1000px) {
  details.faq-item summary { padding-left: 30px; }
  details.faq-item .faq-content { padding-left: 30px; padding-right: 30px; }
}


/* Stories (vidéos rondes) */
.stories {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}
.story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 130px;
}
.story-thumb {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 3px #ffffff,
    0 0 0 9px var(--ring-color, rgba(30, 99, 255, 0.35));
  cursor: pointer;
  transition: transform .2s ease;
}
.story { --ring-color: rgba(30, 99, 255, 0.35); }
.story-thumb:hover { transform: scale(1.04); }
.story-thumb video,
.story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story-thumb .story-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.story-thumb .story-play::before {
  content: "";
  width: 0; height: 0;
  border-left: 10px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 3px;
}
.story-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  line-height: 1.25;
}

