/**
 * Content Section 12 - Titre + Texte centrés + image en dessous
 *
 * Layout: Titre et texte centrés au-dessus d'une image
 * Fonctionnalités:
 * - Titre principal centré (WYSIWYG)
 * - Texte centré (WYSIWYG)
 * - Image en dessous du contenu qui chevauche la section
 * - Système de couleurs personnalisables
 *
 * @package Dioqa_UI_Kit
 */

/* ============================================
   Section Container
   ============================================ */

.content-section-12 {
  overflow: visible;
}

/* Appliquer le padding dynamique sur la section */
.content-section-12[style*='--padding-top'] {
  padding-top: var(--padding-top);
}

.content-section-12[style*='--padding-bottom'] {
  padding-bottom: var(--padding-bottom);
}

/* Fallback si pas de padding défini */
.content-section-12:not([style*='--padding-top']) {
  padding-top: 5rem;
}

.content-section-12:not([style*='--padding-bottom']) {
  padding-bottom: 5rem;
}

/* Conteneur avec background - padding fixe intérieur */
.content-12-wrapper {
  border-radius: 0;
  padding-top: 5rem;
  padding-bottom: 10rem;
}

.content-12-wrapper .row {
  align-items: start;
}

/* ============================================
   Main Title
   ============================================ */

.content-12-title-wrapper {
  text-align: center;
  margin-bottom: 2rem;
}

.content-12-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 600;
  font-size: var(--text-2xl, 32px);
  line-height: 1.2;
}

.content-12-title p {
  margin: 0;
}

/* ============================================
   Text Content (remplace la grid de features)
   ============================================ */

.content-12-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-weight: 400;
  font-size: var(--text-base, 16px);
  line-height: 1.6;
}

.content-12-text p {
  margin: 0 0 1rem;
}

.content-12-text p:last-child {
  margin-bottom: 0;
}

.content-12-text h1,
.content-12-text h2,
.content-12-text h3,
.content-12-text h4,
.content-12-text h5,
.content-12-text h6 {
  margin: 0 0 1rem;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
}

.content-12-text ul,
.content-12-text ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  text-align: left;
  display: inline-block;
}

.content-12-text li {
  margin-bottom: 0.5rem;
}

/* ============================================
   Image/Video Section (Bottom)
   ============================================ */

.content-12-image-container {
  margin-top: -6rem;
}

.content-12-media {
  width: 100%;
  position: relative;
}

.content-12-image-img {
  width: 100%;
  height: auto;
  max-height: 30rem;
  object-fit: cover;
  display: block;
}

/* Video Styles */
.content-12-video-wrapper {
  position: relative;
  width: 100%;
  cursor: pointer;
}

.content-12-video {
  width: 100%;
  height: auto;
  max-height: 30rem;
  object-fit: cover;
  display: block;
}

.content-12-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 155px;
  height: 155px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 2;
}

.content-12-video-play:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.content-12-video-play svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Masquer le bouton play quand la vidéo est en lecture */
.content-12-video-wrapper.is-playing .content-12-video-play {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   Dark Background Adaptation
   ============================================ */

/* Les couleurs du texte sont gérées par les classes smart color (dioqa_get_smart_text_color) */

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet (< 992px) */
@media (max-width: 991.98px) {
  .content-section-12[style*='--padding-top'] {
    padding-top: calc(var(--padding-top) * 0.8);
  }

  .content-section-12[style*='--padding-bottom'] {
    padding-bottom: calc(var(--padding-bottom) * 0.8);
  }

  .content-section-12:not([style*='--padding-top']) {
    padding-top: 4rem;
  }

  .content-section-12:not([style*='--padding-bottom']) {
    padding-bottom: 4rem;
  }

  .content-12-wrapper {
    padding-top: 4rem;
    padding-bottom: 8rem;
  }

  .content-12-title-wrapper {
    margin-bottom: 1.5rem;
  }

  .content-12-title {
    font-size: var(--text-xl, 28px);
  }

  .content-12-text {
    font-size: var(--text-sm, 14px);
    max-width: 700px;
  }

  .content-12-image-img,
  .content-12-video {
    max-height: 25rem;
  }

  .content-12-video-play {
    width: 120px;
    height: 120px;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767.98px) {
  .content-section-12[style*='--padding-top'] {
    padding-top: calc(var(--padding-top) * 0.6);
  }

  .content-section-12[style*='--padding-bottom'] {
    padding-bottom: calc(var(--padding-bottom) * 0.6);
  }

  .content-section-12:not([style*='--padding-top']) {
    padding-top: 3rem;
  }

  .content-section-12:not([style*='--padding-bottom']) {
    padding-bottom: 3rem;
  }

  .content-12-wrapper {
    padding-top: 3rem;
    padding-bottom: 6rem;
  }

  .content-12-title-wrapper {
    margin-bottom: 1.25rem;
  }

  .content-12-title {
    font-size: var(--text-lg, 24px);
  }

  .content-12-text {
    font-size: var(--text-sm, 14px);
    max-width: 100%;
  }

  .content-12-image-container {
    margin-top: -65px;
  }

  .content-12-video-play {
    width: 100px;
    height: 100px;
  }
}

/* Small Mobile (< 576px) */
@media (max-width: 575.98px) {
  .content-12-title-wrapper {
    margin-bottom: 1rem;
  }

  .content-12-title {
    font-size: var(--text-lg, 20px);
  }

  .content-12-text {
    font-size: var(--text-sm, 14px);
  }

  .content-12-image-container {
    margin-top: -65px;
  }

  .content-12-video-play {
    width: 80px;
    height: 80px;
  }
}

/* ============================================
   Accessibility & Motion
   ============================================ */

/* Focus visible pour accessibilité clavier */
.content-12-text a:focus-visible {
  outline: 2px solid var(--bs-primary, #007bff);
  outline-offset: 2px;
}

.content-12-video-play:focus-visible {
  outline: 3px solid var(--bs-primary, #007bff);
  outline-offset: 4px;
  border-radius: 50%;
}

/* Réduire les animations pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
  .content-12-video-play {
    transition: none !important;
  }

  .content-12-video-play:hover {
    transform: translate(-50%, -50%) !important;
  }
}
