
/* ---------------- DESKTOP (flip) ---------------- */
.services-desktop { display: block; }
.services-mobile  { display: none; }

/* flip card */

.flip-card {
  width: 330px;
  height: 450px;
  position:relative;
  /*perspective: 1000px;*/
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(.1, -0.4, .3, 1.3);
}
.card-inner:hover {
    transform: rotateY(180deg);
    cursor:pointer;
}

.card-front, .card-back {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly; /* contenu en haut, bouton en bas */
    padding: 10px 20px;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    backface-visibility: hidden;
    overflow: hidden;
    color:var(--muted);
    gap: 10px;
}
.card-front { 
    background:var(--black-alt);
}
.card-front img {
    width: 100%;
    max-height: 165px;
    border-radius: 6px;
}
.card-front h2 {
  font-size: clamp(0.6rem, 3vw, 1.1rem);
  text-align: center;
}
.card-front ul, .card-front  p, .card-back p, .card-popover p {
  font-size: 0.8em;
  line-height: 1.6em;
}
.card-front ul {
  list-style: none;      /* On désactive les puces natives */
  padding: 0;
  margin: 0;
}
.card-front li {
  position: relative;
  padding-left: 1.5rem;  /* espace pour la puce */
  /*text-align: center;*/
  margin-bottom: 10px;
}
.card-front li::before {
  /* content: "◆";                /* symbole du losange */
  content: "✦";
  position: absolute;
  left: 0;                     /* aligné au début du padding */
   top : 0;
  /*top: 50%;
  transform: translateY(-50%);*/
  font-size: 1rem;
}
.card-front li::before {
  color: var(--cyan);
}

.container-arrow {
  display: flex;
  justify-content:flex-end;
  align-items: flex-end;
}
.container-arrow img {
  width: 40px;
}

.card-back  {
  justify-content: flex-start;
  background: var(--prunus);
  transform: rotateY(180deg);
  text-align: center;
}
.card-back h4 {
  font-size: 1.1em;
  color: var(--violet);
  padding: 20px 0;
}

/* CTA button style */
.card-back .cta, .card-popover .cta, .demo-web-card-infos .cta {
  align-self: center;
  cursor: pointer;
  background: var(--violet);
  color: var(--white);
  font-size: 0.8em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px;
  margin-top: auto;  /* Pousse le bouton vers le bas */
  margin-bottom: 10px;
  border-radius: 10px;
  transition: background 0.4s ease, transform 0.2s ease, box-shadow 0.4s ease;
}
.card-back .cta:hover, .card-popover .cta:hover {
    background: var(--cyan);
    color: var(--black-alt);
    transform: scale(1.05);
    box-shadow: 0 0 5px var(--cyan), 0 0 15px var(--violet);
}

.cta a, .card-back a, .card-popover a {
    text-decoration: none;
}


/* ---------------- MOBILE (overlay) ---------------- */
@media (max-width: 670px) {
  .services-desktop { display: none; }
  .services-mobile  { display: block; }

  .overlay-card {
    width: 330px;
    height: 450px;
    position: relative;
    overflow: hidden;   /* 👈 empêche le popover de dépasser */
    border-radius: 12px; /* 👈 conserve les arrondis pendant l'anim */
  }

  .overlay-card .toggle { display: none; }

  .overlay-card .card-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:var(--black-alt);
    color:var(--muted); 
    padding:16px;
    border-radius:12px;
    display:flex;
    flex-direction:column;
    justify-content: space-between;
    gap:10px;
    transition: opacity .4s ease; /* pour petit effet de fondu */
    /*margin: 0 auto;*/
  }
  .card-front h2 {
    font-size: clamp(0.6rem, 5vw, 1.2rem);
  }
  .card-front img {
    max-height: 150px;
  }

  /* popover : caché juste en-dessous de la carte */
  .card-popover {
    position:absolute;
    top: 100%;  /* placé sous la carte */
    left: 0;
    width:100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    background: #1b0a2c;
    color:var(--muted); 
    border-radius:12px;
    padding:16px;
    box-shadow:0 4px 20px rgba(0,0,0,.3);
    transition: top .8s ease, opacity .36s ease;
    opacity:0;
    z-index:40;
    /* ✅ autorise juste la croix à dépasser */
    overflow: visible;
  }
 .card-popover h4{
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    color: var(--violet);
    margin-bottom: 15px;
 }
  .card-popover p{
    font-size: 0.8em;
    text-align: center;
 }

  /* quand checkbox activé → popover slide depuis le bas */
  .toggle:checked ~ .card-popover {
    top: 0;
    opacity: 1;
  }

  /* boutons (open/close) */
  .btn.open {
    display:inline-block;
    padding:10px 12px;
    border-radius:10px;
    background:var(--violet);
    color:#fff;
    font-size: 0.9em;
    text-align:center;
    cursor:pointer;
    transition: background 0.4s ease, transform 0.2s ease, box-shadow 0.4s ease;
  }
  .btn.open:hover {
    background: var(--cyan);
    color: var(--black-alt);
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--cyan), 0 0 30px var(--violet);
  }
  .btn.close {
    margin-top:10px;
    background:var(--cyan);
    color:#000;
  }

  /* petit effet de "voile" sur la front quand overlay ouvert */
  .toggle:checked ~ .card-front {
    opacity: .6;
    filter: blur(.5px);
  }

  .btn.close {
    position: absolute;
    top: -5px;
    right: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--cyan);
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.4);
    transition: transform .25s ease, background .25s ease;
    overflow: visible; /* permet au halo de dépasser */
  }

  /* halo avec pseudo-élément */
  .btn.close::before {
    content: "";
    position: absolute;
    inset: -8px; /* déborde autour du bouton */
    border-radius: 50%;
    background: radial-gradient(
      circle,
      rgba(103, 232, 249, 0.4) 0%,   /* cyan clair semi-transparent */
      rgba(103, 232, 249, 0.05) 60%,
      transparent 100%
    );
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    z-index: -1; /* reste derrière le bouton */
  }

  /* effet au survol */
  .btn.close:hover::before {
    opacity: 1;
    transform: scale(1.2);
  }
}

