/* Accueil JoPic : habillage des elements Avada par classes CSS.
   jopic-metal-card (gabarit Post Card), jopic-texte (Texte, fond clair),
   jopic-texte-sombre (Texte, fond sombre), jopic-accordeon (Toggles).
   Meme langage visuel que les onglets d'univers : metal brosse, liseré cuivre, lumiere. */

/* ---------------------------------------------------------------------------
   Vitrine produits : cartes du gabarit « Product Post Card »
   --------------------------------------------------------------------------- */

.jopic-metal-card {
  --awb-bg-color: transparent !important;
  --awb-bg-color-hover: transparent !important;
  --awb-transform-hover: none !important;
  --jopic-edge: linear-gradient(160deg, rgba(255, 204, 156, 0.75) 0%, rgba(201, 119, 44, 0.42) 26%, rgba(60, 36, 20, 0.3) 56%, rgba(232, 108, 0, 0.6) 100%);
}

/* Metal bronze lisse des onglets (sans rayures) : reflet en haut, cotes plus
   sombres et centre plus clair, lueur orange sous la photo. */
.jopic-metal-card > .fusion-column-wrapper {
  position: relative;
  overflow: hidden;
  height: 100%;
  border: 1px solid transparent !important;
  border-radius: 16px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 24%) padding-box,
    linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 74%, rgba(0, 0, 0, 0.28) 100%) padding-box,
    radial-gradient(ellipse 90% 36% at 50% 44%, rgba(255, 150, 60, 0.3) 0%, rgba(255, 150, 60, 0) 72%) padding-box,
    linear-gradient(180deg, #6f5b4c 0%, #54453a 50%, #3a2f28 100%) padding-box,
    var(--jopic-edge) border-box !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 4px rgba(10, 6, 3, 0.14),
    0 10px 18px rgba(10, 6, 3, 0.2) !important;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 240ms ease;
}

/* Bande de lumiere qui balaie le metal au survol. */
.jopic-metal-card > .fusion-column-wrapper::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  z-index: 3;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 40%, rgba(255, 236, 210, 0.1) 47%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 236, 210, 0.1) 53%, rgba(255, 255, 255, 0) 60%);
  transform: translateX(-62%);
  pointer-events: none;
  transition: transform 950ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jopic-metal-card:hover > .fusion-column-wrapper,
.jopic-metal-card:focus-within > .fusion-column-wrapper {
  transform: translateY(-8px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 150, 60, 0.3),
    0 0 16px rgba(232, 108, 0, 0.26),
    0 14px 22px rgba(10, 6, 3, 0.26) !important;
}

.jopic-metal-card:hover > .fusion-column-wrapper::before {
  transform: translateX(62%);
}

/* Photo du produit sur une plaque claire : les fonds blancs se fondent. */
.jopic-metal-card .jopic-card-image {
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #f6efe6 58%, #e4d8c9 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 6px 16px rgba(0, 0, 0, 0.4);
}

.jopic-metal-card .jopic-card-image img {
  mix-blend-mode: multiply;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jopic-metal-card:hover .jopic-card-image img {
  transform: scale(1.06);
}

/* Titre du produit : degrade metallique. */
.jopic-metal-card .fusion-title-heading,
.jopic-metal-card .fusion-title-heading a {
  font-size: clamp(1.2rem, 1.55vw, 1.5rem) !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
  overflow-wrap: anywhere;
}

/* Trois lignes au maximum pour les noms longs. */
.jopic-metal-card .fusion-title-heading {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.jopic-metal-card .fusion-title-heading a {
  background: linear-gradient(180deg, #ffffff 0%, #fbf1e6 45%, #efcfa8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55));
}

/* Marque, puis description courte. */
.jopic-metal-card .fusion-text p {
  margin: 0;
  color: rgba(255, 243, 230, 0.82) !important;
}

.jopic-metal-card .fusion-column-wrapper > .fusion-text:nth-child(1 of .fusion-text) p {
  color: #ffb873 !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.jopic-metal-card .fusion-separator,
.jopic-metal-card .fusion-separator-border {
  border-color: rgba(255, 166, 74, 0.32) !important;
}

/* Prix bien visible. */
.jopic-metal-card .price,
.jopic-metal-card .price .amount {
  color: #ffffff !important;
  font-weight: 800;
}

.jopic-metal-card .price del,
.jopic-metal-card .price del .amount {
  color: rgba(255, 243, 230, 0.55) !important;
  font-weight: 600;
}

/* Bouton dans le style des boutons du moteur Fitment. */
.jopic-metal-card .fusion-button.jopic-bouton {
  border: 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ff9a28 0%, #e86c00 55%, #8c3a00 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 14px rgba(140, 58, 0, 0.4) !important;
  color: #fff !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jopic-metal-card .fusion-button.jopic-bouton:hover,
.jopic-metal-card .fusion-button.jopic-bouton:focus-visible {
  background: linear-gradient(180deg, #ffab43 0%, #e47600 55%, #9c4300 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 18px rgba(255, 140, 40, 0.55) !important;
}

.jopic-metal-card .fusion-button.jopic-bouton .fusion-button-text {
  color: #fff !important;
}

/* Barre de defilement sous la vitrine (ajoutee par jopic-accueil.js). */
.jopic-defile {
  position: relative;
  width: min(640px, 72%);
  height: 8px;
  /* Remonte dans l'espace reserve aux ombres, juste sous les cartes. */
  margin: -10px auto 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #14110f 0%, #2a231e 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
  touch-action: none;
}

/* Zone de prise plus haute que la barre, pour le doigt et la souris. */
.jopic-defile::before {
  content: "";
  position: absolute;
  inset: -14px 0;
}

.jopic-defile[hidden],
.jopic-defile__poignee[hidden] {
  display: none;
}

/* Rail qui coupe la poignee a ses deux bouts (la lueur reste visible dessus
   et dessous). En boucle, la poignee sort a droite et revient par la gauche. */
.jopic-defile__rail {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  clip-path: inset(-20px 0);
}

.jopic-defile__poignee {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #ffb35c 0%, #e86c00 60%, #b14f00 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 12px rgba(232, 108, 0, 0.45);
  cursor: grab;
  transition: transform 0ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 200ms ease;
  will-change: transform;
}

.jopic-defile:hover .jopic-defile__poignee,
.jopic-defile.is-active .jopic-defile__poignee,
.jopic-defile.is-dragging .jopic-defile__poignee {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 140, 40, 0.75);
}

.jopic-defile.is-dragging,
.jopic-defile.is-dragging .jopic-defile__poignee {
  cursor: grabbing;
}

.jopic-defile:focus-visible {
  outline: 2px solid #e86c00;
  outline-offset: 8px;
}

/* Le carrousel coupe ce qui depasse : on lui donne de l'air pour que les
   ombres et le soulevement au survol restent entiers. */
.fusion-post-cards.awb-swiper:has(.jopic-metal-card) {
  /* --jopic-bord : marge de cote posee par jopic-accueil.js, toujours plus
     petite que l'espace entre les cartes (la suivante ne depasse jamais). */
  padding: 28px var(--jopic-bord, 16px) 44px !important;
  /* Bords en fondu : l'ombre d'une carte qui sort ne se coupe jamais net. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--jopic-bord, 16px), #000 calc(100% - var(--jopic-bord, 16px)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--jopic-bord, 16px), #000 calc(100% - var(--jopic-bord, 16px)), transparent 100%);
}

/* Les cartes se saisissent a la souris quand le glisser est actif dans Avada
   (classes posees par jopic-accueil.js). */
.fusion-post-cards.is-jopic-glisser .swiper-wrapper {
  cursor: grab;
}

.fusion-post-cards.is-jopic-glisser.is-jopic-saisi .swiper-wrapper {
  cursor: grabbing;
}

/* Cartes de hauteur egale dans le carrousel, bouton toujours en bas. */
.fusion-post-cards:has(.jopic-metal-card) .swiper-wrapper {
  align-items: stretch !important;
}

.fusion-post-cards:has(.jopic-metal-card) .jopic-metal-card {
  height: auto;
}

.jopic-metal-card > .fusion-column-wrapper > div:last-child {
  margin-top: auto;
}

.jopic-metal-card .fusion-column-wrapper > .fusion-text p {
  font-size: 0.9rem !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere;
}

/* Avada reserve 15 % de marge de chaque cote du titre : on la reduit. */
.jopic-metal-card .fusion-title {
  --awb-margin-left: 4% !important;
  --awb-margin-right: 4% !important;
  --awb-margin-left-medium: 4% !important;
  --awb-margin-right-medium: 4% !important;
}

/* ---------------------------------------------------------------------------
   Textes de l'accueil (element Texte, classe jopic-texte, fond clair)
   --------------------------------------------------------------------------- */

.jopic-texte {
  color: #2b2420;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* Les titres gardent le style Avada des autres titres de la page. */
.jopic-texte h2,
.jopic-texte h3 {
  margin: 1.4em 0 0.5em;
}

.jopic-texte > h2:first-child,
.jopic-texte > h3:first-child {
  margin-top: 0;
}

.jopic-texte p {
  margin: 0 0 1em;
}

.jopic-texte a {
  color: #c25a00;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(90deg, #ff9a28, #e86c00) left bottom / 0 2px no-repeat;
  transition: background-size 220ms ease, color 160ms ease;
}

.jopic-texte a:hover,
.jopic-texte a:focus-visible {
  color: #8c3a00;
  background-size: 100% 2px;
}

.jopic-texte ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

.jopic-texte li::marker {
  color: #e86c00;
}

/* Texte et questions dans la meme colonne : colonne de lecture centree. */
.fusion-column-wrapper:has(> .jopic-accordeon) > .jopic-texte,
.fusion-column-wrapper > .jopic-accordeon {
  width: 100%;
  max-width: 940px;
  margin-right: auto;
  margin-left: auto;
}

.fusion-column-wrapper:has(> .jopic-accordeon) > .jopic-texte {
  text-align: center;
}

/* Texte sur fond sombre (classe jopic-texte-sombre) : le texte garde la
   couleur Avada; les liens, noirs par defaut dans Avada, passent en orange. */
.fusion-text.jopic-texte-sombre a {
  color: #ff9a3c;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(90deg, #ffb873, #e86c00) left bottom / 0 2px no-repeat;
  transition: background-size 220ms ease, color 160ms ease;
}

.fusion-text.jopic-texte-sombre a:hover,
.fusion-text.jopic-texte-sombre a:focus-visible {
  color: #ffc58a;
  background-size: 100% 2px;
}

.jopic-texte-sombre li::marker {
  color: #e86c00;
}

/* ---------------------------------------------------------------------------
   Parties depliables (element Toggles, classe jopic-accordeon)
   Style clair et sobre : cartes blanches, filet chaud, icone orange discrete,
   trait orange a gauche sur la question ouverte.
   --------------------------------------------------------------------------- */

/* Avada dessine l'icone dans un carre plein (variables posees en ligne sur
   l'element) : on vide ces couleurs. */
.jopic-accordeon {
  --awb-icon-box-color: transparent !important;
  --awb-hover-color: transparent !important;
  --awb-toggle-hover-accent-color: transparent !important;
}

.jopic-accordeon .fusion-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 10px !important;
  /* Contour mince aux couleurs JoPic : noir aux bouts, orange, centre clair. */
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, #1f1a17 0%, #e86c00 24%, #ffb35c 50%, #e86c00 76%, #1f1a17 100%) border-box !important;
  box-shadow: 0 1px 2px rgba(40, 20, 5, 0.04), 0 6px 16px rgba(60, 30, 10, 0.05);
  transition: box-shadow 200ms ease;
}

.jopic-accordeon .fusion-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 3px;
  background: #e86c00;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jopic-accordeon .fusion-panel:hover {
  box-shadow: 0 1px 2px rgba(40, 20, 5, 0.04), 0 10px 24px rgba(232, 108, 0, 0.12);
}

.jopic-accordeon .fusion-panel:has(a[aria-expanded="true"]) {
  box-shadow: 0 1px 2px rgba(40, 20, 5, 0.04), 0 12px 28px rgba(232, 108, 0, 0.14);
}

.jopic-accordeon .fusion-panel:has(a[aria-expanded="true"])::before {
  transform: scaleY(1);
}

.jopic-accordeon .panel-heading {
  border: 0 !important;
  background: transparent !important;
}

.jopic-accordeon .panel-title a {
  display: flex !important;
  align-items: center;
  gap: 18px;
  padding: 18px 22px !important;
  text-align: left;
}

.jopic-accordeon .panel-title a:focus-visible {
  outline: 2px solid #e86c00;
  outline-offset: -4px;
}

/* Meme police que les paragraphes de la page (Avada met la police etroite). */
.jopic-accordeon .fusion-toggle-heading,
.jopic-accordeon .panel-body {
  font-family: var(--body_typography-font-family), Arial, Helvetica, sans-serif !important;
}

.jopic-accordeon .fusion-toggle-heading {
  flex: 1 1 auto;
  margin: 0 !important;
  color: #1f1a17 !important;
  font-size: clamp(1.02rem, 1.25vw, 1.18rem) !important;
  font-weight: 700;
  line-height: 1.35;
  transition: color 180ms ease;
}

.jopic-accordeon .panel-title a:hover .fusion-toggle-heading,
.jopic-accordeon .panel-title a[aria-expanded="true"] .fusion-toggle-heading {
  color: #b85400 !important;
}

/* Icone a droite : pastille orange pale, pleine quand la question est ouverte. */
.jopic-accordeon .fusion-toggle-icon-wrapper {
  display: grid !important;
  flex: 0 0 auto;
  order: 2;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #fff0e3 !important;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 200ms ease;
}

.jopic-accordeon .panel-title a .fusion-toggle-icon-wrapper i.fa-fusion-box {
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #e86c00 !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.jopic-accordeon .panel-title a:hover .fusion-toggle-icon-wrapper {
  background: #ffe1c7 !important;
}

.jopic-accordeon .panel-title a[aria-expanded="true"] .fusion-toggle-icon-wrapper {
  background: #e86c00 !important;
  transform: rotate(180deg);
}

.jopic-accordeon .panel-title a[aria-expanded="true"] .fusion-toggle-icon-wrapper i.fa-fusion-box {
  color: #ffffff !important;
}

.jopic-accordeon .panel-body {
  margin: 0 22px;
  padding: 14px 0 20px !important;
  border-top: 1px solid #f1e9e1 !important;
  color: #4a3f38 !important;
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
}

.jopic-accordeon .panel-body a {
  color: #c25a00;
  font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Mobile et mouvements reduits
   --------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .jopic-metal-card .fusion-title-heading,
  .jopic-metal-card .fusion-title-heading a {
    font-size: 1.04rem !important;
  }

  .jopic-metal-card .fusion-column-wrapper > .fusion-text p {
    font-size: 0.82rem !important;
  }

  .jopic-defile {
    width: 86%;
    height: 6px;
    margin-top: -8px;
  }

  /* Sur cellulaire, un long paragraphe centre se lit mal : titre centre seulement. */
  .fusion-column-wrapper:has(> .jopic-accordeon) > .jopic-texte {
    text-align: left;
  }

  .fusion-column-wrapper:has(> .jopic-accordeon) > .jopic-texte h2 {
    text-align: center;
  }

  /* Petites cartes : ombre courte et collee a la carte. */
  .jopic-metal-card > .fusion-column-wrapper {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 2px 3px rgba(10, 6, 3, 0.14),
      0 6px 12px rgba(10, 6, 3, 0.16) !important;
  }

  /* Vitrine d'un bord a l'autre de l'ecran (largeur et position posees par
     jopic-accueil.js) : une carte au centre, la precedente et la suivante se
     coupent aux deux bords de l'ecran (fondu tres court, meme chose des deux
     cotes). */
  .fusion-post-cards.awb-swiper:has(.jopic-metal-card) {
    padding: 16px 0 30px !important;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  }

  .jopic-accordeon .panel-title a {
    gap: 14px;
    padding: 15px 16px !important;
  }

  .jopic-accordeon .panel-body {
    margin: 0 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jopic-metal-card > .fusion-column-wrapper,
  .jopic-metal-card > .fusion-column-wrapper::before,
  .jopic-metal-card .jopic-card-image img,
  .jopic-defile__poignee,
  .jopic-accordeon .fusion-panel,
  .jopic-accordeon .fusion-panel::before,
  .jopic-accordeon .fusion-toggle-heading,
  .jopic-accordeon .fusion-toggle-icon-wrapper {
    transition: none !important;
  }

  .jopic-metal-card:hover > .fusion-column-wrapper {
    transform: none;
  }
}
