/*
@author UBPartner
*/

.produits-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 560px;
  padding-top: 140px;
  padding-bottom: 80px;
  background: linear-gradient(
    105deg,
    #436ba1 0%,
    #4c609e 30%,
    #574f9c 55%,
    #65409d 78%,
    #7038a1 100%
  );
}

.produits-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.produits-eyebrow {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.produits-hero-title {
  margin-bottom: 22px;
  font-size: 52px;
  font-weight: 800;
  line-height: 1.12;
  color: #fff;
}

.produits-hero-sub {
  max-width: 460px;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
}

.produits-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.produits-visual-wrap {
  width: 100%;
  height: 380px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.produits-visual-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================
   HALO - lumière violette juste sous la sous-navigation
   ========================================================== */
.subnav-glow {
  position: relative;
  z-index: 0;
  height: 120px;
  margin-bottom: -120px;
  pointer-events: none;
  background:
    radial-gradient(
      52% 120px at 50% 0%,
      rgba(123, 63, 212, 0.12),
      rgba(123, 63, 212, 0) 72%
    ),
    linear-gradient(
      180deg,
      rgba(123, 63, 212, 0.05) 0%,
      rgba(123, 63, 212, 0) 100%
    );
}

/* le halo passe au-dessus du fond de la section suivante,
   mais reste derrière son texte */
.page-section > .container {
  position: relative;
  z-index: 1;
}


.produits-decor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* trame technique, identique à celle de l'accueil */
.produits-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(
    ellipse 60% 70% at 30% 45%,
    #000 10%,
    transparent 72%
  );
  mask-image: radial-gradient(
    ellipse 60% 70% at 30% 45%,
    #000 10%,
    transparent 72%
  );
  pointer-events: none;
}

/* ── Orbites ── */
.decor-ring {
  transform-box: view-box;
  transform-origin: 260px 300px;
}

.decor-ring-1 {
  animation: decorSpin 62s linear infinite;
}

.decor-ring-2 {
  animation: decorSpinRev 46s linear infinite;
}

.decor-ring-3 {
  animation: decorSpin 34s linear infinite;
}

@keyframes decorSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes decorSpinRev {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

/* ── Courbe de tendance ── */
.decor-trend {
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  animation: decorDraw 2.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

@keyframes decorDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.decor-area {
  opacity: 0;
  animation: decorFade 1.6s ease 1.6s forwards;
}

.decor-points {
  opacity: 0;
  animation: decorFade 1.2s ease 1.8s forwards;
}

@keyframes decorFade {
  to {
    opacity: 1;
  }
}

/* point courant : pulsation discrète */
.decor-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: decorPulse 3.4s ease-in-out 2s infinite;
  opacity: 0;
}

@keyframes decorPulse {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .decor-ring,
  .decor-pulse {
    animation: none;
  }
  .decor-trend {
    stroke-dashoffset: 0;
    animation: none;
  }
  .decor-area,
  .decor-points {
    opacity: 1;
    animation: none;
  }
}

/* ==========================================================
   SOUS-NAVIGATION collante
   ========================================================== */
.subnav-bar {
  background: #fff;
  border-bottom: 1px solid #e0e8f5;
  padding: 8px 0;
  position: sticky;
  top: 93px; /* 40px du bandeau actualités + hauteur de la navbar */
  z-index: 100;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
}

.subnav-links {
  list-style: none;
  padding: 0;
  display: flex;
  margin: 0;
  gap: 22px;
}

.subnav-links a {
  color: #555;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.subnav-links a:hover,
.subnav-links a.active {
  color: #7347b3;
  border-bottom-color: #7347b3;
}

/* ==========================================================
   SECTIONS DE CONTENU
   ========================================================== */
.page-section {
  height: auto;
  padding: var(--section-space) 0;
  background: #f3f4fb;
}

.page-section--light {
  background: #fff;
}

.page-section .container {
  width: 1000px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.section-tag {
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-weight: 800;
  font-size: 34px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 20px;
}

.section-text {
  color: #666;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ==========================================================
   CAS D'UTILISATION - onglets
   ========================================================== */
/* ── Onglets : filet classique, indicateur qui se déploie ── */
.cas-tabs-wrap {
  text-align: center;
}

.cas-tabs {
  display: inline-flex;
  gap: 52px;
  margin: 0 auto 44px;
  border-bottom: 1px solid rgba(36, 27, 61, 0.12);
}

.cas-tab {
  position: relative;
  padding: 0 2px 16px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--inkSoft);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s ease;
}

/* l'indicateur se déploie depuis le centre */
.cas-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cas-tab:hover {
  color: var(--ink);
}

.cas-tab.active {
  color: var(--ink);
  font-weight: 600;
}

.cas-tab.active::after {
  transform: scaleX(1);
}

.cas-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.cas-tab-content {
  display: none;
}

.cas-tab-content.active {
  display: block;
  animation: casFade 0.4s ease both;
}

@keyframes casFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cas-tab-content.active {
    animation: none;
  }
  .cas-tab::after {
    transition: none;
  }
}

@media (max-width: 575.98px) {
  .cas-tabs {
    gap: 26px;
  }
  .cas-tab {
    font-size: 14px;
    white-space: normal;
  }
}

.cas-subtitle {
  text-align: center;
  font-size: 18px;
  color: #333;
  font-weight: 400;
  margin-bottom: 8px;
}

.cas-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* même pastille que les cartes « Avantages », en 30px */
/* puce en losange : un carré pivoté à 45°, anneau translucide
   conservé grâce au background-clip sur la boîte de contenu */
.cas-check {
  position: relative;
  flex: none;
  width: 26px;
  aspect-ratio: 1;
  margin-top: 6px;
  border: solid 0.28rem rgba(115, 71, 179, 0.18);
  border-radius: 4px;
  background: linear-gradient(147deg, var(--primary) 13%, var(--logoCyan) 89%);
  background-clip: content-box;
  box-shadow: 0 0 0.5rem 0 rgba(71, 33, 241, 0.55) inset;
  transform: rotate(45deg);
}

.cas-item p {
  color: #666;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 992px) {
  /* comme .article-hero-img dès que le hero passe sur une colonne */
  .produits-visual-wrap {
    height: 260px;
  }
  /* hero resserré : moins haut, moins de padding, et un visuel
     plus grand puisqu'il occupe désormais toute la largeur */
  .produits-hero {
    min-height: 0;
    padding-top: 110px;
    padding-bottom: 25px;
  }
  .produits-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }
  .produits-hero-sub {
    margin: 0 auto;
  }
  .produits-hero-title {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .page-section {
    min-height: 100%;
    padding: 60px 0;
  }
  .section-tag {
  text-align: center;
  }

  .section-title {
    text-align:center;
  }

  #apropos .section-text {
    text-align: justify;
    padding: 0 10px;
  }

}

@media (max-width: 576px) {
  p{
    font-size: 13px !important;
  }
  .produits-hero-title {
    font-size: 29px;
  }
}

/* ==========================================================
   MODALE - demande de démonstration
   S'appuie sur la modale Bootstrap (déjà chargée) pour le
   comportement ; l'habillage est repris du reste du site.
   ========================================================== */
.demo-modal .modal-dialog {
  max-width: 560px;
}

/* même habillage que la carte du formulaire de contact :
   filet violet en haut et coins hauts droits */
.demo-modal .modal-content {
  overflow: hidden;
  border: none;
  border-top: 4px solid var(--primary);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 40px 90px rgba(36, 27, 61, 0.28);
}

/* ── En-tête ── */
.demo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 38px 0;
  background: #fff;
}

.demo-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--primary);
}

.demo-modal-close {
  flex: none;
  padding: 4px;
  border: none;
  background: none;
  color: var(--inkSoft);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.demo-modal-close:hover {
  color: var(--primary);
}

/* ── Corps ── */
.demo-modal-body {
  padding: 18px 38px 38px;
}

.demo-modal-lead {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--inkSoft);
}

.demo-submit {
  width: 100%;
  margin-top: 6px;
}

.demo-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--inkSoft);
  text-align: center;
}

.demo-note a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .demo-modal-head {
    padding: 26px 22px 0;
  }
  .demo-modal-body {
    padding: 16px 22px 28px;
  }
}

/* la sous-navigation collante ajoute ~52px : les ancres doivent
   descendre d'autant pour que le titre de section reste visible */
.page-section[id] {
  scroll-margin-top: 170px;
}

/* le formulaire de la modale hérite des champs communs (style.css) ;
   il ne lui reste que son rythme vertical */
.demo-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ==========================================================
   SOUS-NAVIGATION EN MOBILE
   Les liens se centrent sur une ligne, le bouton passe en
   dessous, centré lui aussi.
   ========================================================== */
@media (max-width: 767.98px) {
  .subnav-bar {
    /* la navbar mobile est plus courte que la version desktop */
    top: 88px;
    padding: 12px 0;
  }

  .subnav-bar > .container {
    justify-content: center !important;
  }

  .subnav-bar > .container > div {
    flex-direction: column;
    width: 100%;
  }

  .subnav-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    width: 100%;
  }

  .subnav-bar .btn {
    align-self: center;
  }
}

@media (max-width: 767.98px) {
  /* la sous-navigation empilée est plus haute : les ancres
     doivent descendre d'autant */
  .page-section[id] {
    scroll-margin-top: 200px;
  }
}


@media (max-width: 1199.98px) {
  .page-section .container {
    padding-left: 30px;
    padding-right: 30px;
  }
}

/* en mobile, on revient au retrait de 15px commun à tout le site */
@media (max-width: 767.98px) {
  .page-section .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}
