/* =========================================================
   FEATURES — MOBILE
========================================================= */

@media (max-width: 991px) {

  .tf-features-grid,
  .tf-features-grid-secure {
    display: block !important;
    padding: 0 20px;
  }

  .tf-features-grid-secure .tf-feature-card,
  .tf-features-grid .tf-feature-card {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 30px !important;
    flex: none !important;
  }

  .tf-subfeatures-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================
   ZONE DYNAMIQUE — MOBILE
============================= */
@media (max-width: 768px) {

  .tf-dynamic-zone.is-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    z-index: 99999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    padding: 60px 20px 20px !important;
    overflow-y: auto !important;
    box-shadow: none !important;
    border-left: none !important;
  }

  .tf-close-btn {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 100000 !important;
    background: #bd3535 !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 15px !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
  }

  .tf-panel-inner {
    padding: 0 !important;
    padding-top: 20px !important;
  }

  .tf-dynamic-zone.is-active::before {
    content: '';
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: -1;
  }
}

/* =========================================================
   MOBILE — DYNAMIC PANEL — VARIANTE E
========================================================= */

@media (max-width: 768px) {

  .tf-panel-inner {
    padding: 30px 20px;
  }

  /* Grille → 1 colonne */
  .tf-subfeatures-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    border-top: none;
    padding-top: 0;
  }

  /* Feature = carte légère */
  .tf-subfeature {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }

  .tf-subfeature:last-child {
    border-bottom: none;
  }

  /* Titre feature */
  .tf-subfeature strong {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .4px;
    color: #bd3535;
  }

  /* Texte */
  .tf-subfeature p {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 6px;
    color: #555;
  }

  /* Phrase finale */
  .tf-feature-outro {
    margin-top: 40px;
    font-size: 13px;
    text-align: center;
    color: #444;
  }

  .tf-feature-outro::before {
    content: '';
    display: block;
    width: 120px;
    height: 1px;
    margin: 0 auto 20px;
    background: linear-gradient(
      to right,
      rgba(0,0,0,0),
      rgba(0,0,0,.2),
      rgba(0,0,0,0)
    );
  }

}

@media (max-width: 768px) {

  .tf-dynamic-zone.is-active {
    position: relative;
  }

  .tf-dynamic-zone.is-active::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 60px;

    background: linear-gradient(
      to top,
      rgba(255,255,255,1),
      rgba(255,255,255,0)
    );

    pointer-events: none;
    z-index: 5;
  }
}

/* =========================================================
   SCROLL INDICATOR — GLOBAL
========================================================= */

/* EXISTE TOUJOURS (sinon ::before ne s’affiche jamais) */
.tf-scroll-indicator{
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);

  background: rgba(0,0,0,.75);
  color: #fff;

  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;

  padding: 10px 18px;
  border-radius: 30px;

  z-index: 100002;
  pointer-events: none;

  /* CACHÉ PAR DÉFAUT */
  opacity: 0;
  visibility: hidden;

  transition: opacity .35s ease, transform .35s ease;
}

/* TEXTE */
.tf-scroll-indicator::before{
  content: "Faites défiler pour voir la suite ↓";
}

/* ================= MOBILE ONLY ================= */
@media (max-width: 768px){

  /* VISIBLE UNIQUEMENT SI JS AJOUTE .is-visible */
  .tf-scroll-indicator.is-visible{
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    animation: tf-scroll-hint 1.8s ease-in-out infinite;
  }

  @keyframes tf-scroll-hint{
    0%   { transform: translate(-50%, 0); opacity: .6; }
    50%  { transform: translate(-50%, -6px); opacity: 1; }
    100% { transform: translate(-50%, 0); opacity: .6; }
  }

  /* Gradient bas */
  .tf-dynamic-zone.is-active::after{
    content:'';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      rgba(255,255,255,0),
      rgba(255,255,255,.85)
    );
    z-index: 99998;
  }
}

/* ================= DESKTOP ================= */
@media (min-width: 769px){
  .tf-scroll-indicator{
    display: none;
  }
}