/* ========= MES CRÉATIONS ========= */

.creations-section {
  padding-top: 0;
  margin-top: 0;
}

/* Accordéon */

.crea-group {
  border-radius: 18px;
  background: #070710;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
  margin: -30px 0;
  overflow: hidden;
}

.crea-group[open] {
  border-color: rgba(114, 241, 184, 0.65);
  box-shadow: 0 0 0 1px rgba(114, 241, 184, 0.25);
}

.crea-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 500;
  font-size: 0.96rem;
}

.crea-summary::-webkit-details-marker {
  display: none;
}

.crea-summary-chevron {
  transition: transform 0.2s ease-out;
  opacity: 0.7;
}

.crea-subgroup {
  padding: 8px 12px 14px;
}

.crea-subtitle {
  margin: 4px 0 8px;
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Grille d’objets */

.crea-grid {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 12px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  justify-content: center;
  gap: 12px;
}

/* Carte d’une création */

.creation-card {
  background:
    radial-gradient(circle at top left, rgba(114, 241, 184, 0.09), transparent 55%),
    radial-gradient(circle at bottom right, rgba(176, 130, 255, 0.08), transparent 55%),
    #050509;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.creation-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 160deg,
    rgba(114, 241, 184, 0.12),
    transparent 22%,
    transparent 60%,
    rgba(178, 130, 255, 0.18),
    transparent 80%
  );
  opacity: 0;
  transition: opacity 0.25s ease-out;
  pointer-events: none;
}

.creation-card:hover::before,
.creation-card:focus-within::before {
  opacity: 1;
}

.creation-card:hover,
.creation-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* Zone image avec fond flou automatique */

.creation-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    isolation: isolate;
}

.creation-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(22px);
  transform: scale(1.15);
  opacity: 0.55;
  z-index: 0;
}

    .creation-media[data-status]::after {
        content: attr(data-status);
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(-25deg);
        width: 140%;
        text-align: center;
        padding: 10px 0;
        font-weight: 800;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        font-size: 1rem;
        background: rgba(220, 30, 30, 0.92);
        color: #fff;
        z-index: 9999;
        pointer-events: none;
        box-shadow: 0 10px 24px rgba(0,0,0,0.45);
    }

    /* (Optionnel) rendre l'image un peu plus "vendu" */
    .creation-media[data-status] .creation-img {
        opacity: 0.55;
        filter: grayscale(0.2);
    }

    /* Liseré + léger voile sur la photo */
    .creation-media[data-status] {
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
    }

        .creation-media[data-status] .creation-img {
            opacity: 0.65;
        }

/* Trick visuel : l’image principale reste au-dessus */
.creation-media img.creation-img-primary {
  z-index: 2;
}

.creation-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent !important;
  transition: opacity 0.28s ease-out, transform 0.28s ease-out;
}

.creation-img-primary {
  opacity: 1;
  transform: scale(1.0);
}

.creation-img-secondary {
  opacity: 0;
  z-index: 3;
}

/* Changement d’image au survol / focus (desktop) */

@media (hover: hover) and (pointer: fine) {
  .creation-card:hover .creation-img-primary,
  .creation-card:focus-within .creation-img-primary {
    opacity: 0;
  }

  .creation-card:hover .creation-img-secondary,
  .creation-card:focus-within .creation-img-secondary {
    opacity: 1;
    transform: scale(1.02);
  }
}
/* Contenu texte + bouton */

.creation-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 4px;
  padding-top: 4px;
}

/* Centrage des titres des cartes */
.creation-title {
  font-size: 0.96rem;
  font-weight: 600;
  margin: 0 0 2px;
  text-align: center;
  width: 100%;
}

.creation-text {
  font-size: 0.84rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.76);
  margin: 0 0 4px;
}

/* Bouton */

.creation-btn {
  align-self: center;
  font-size: 0.8rem;
  padding: 6px 16px;
  border-radius: 999px;
  margin-top: auto;
  white-space: nowrap;
}

/* Responsive */

@media (max-width: 640px) {
  .crea-summary {
    padding-inline: 12px;
    padding-block: 12px;
    font-size: 0.94rem;
  }

  /* Sur mobile : 2 colonnes par défaut */
  .crea-grid {
    padding-inline: 10px;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creation-card {
    padding-inline: 8px;
    display: flex;
    flex-direction: column;
  }

  /* Texte limité à 3 lignes sur mobile */
  .creation-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;   /* max 3 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Bouton plus confortable au doigt */
  .creation-btn {
    padding: 8px 18px;
    font-size: 0.82rem;
  }
}

/* Très petits écrans : on repasse à 1 colonne pour garder la lisibilité */
@media (max-width: 350px) {
  .crea-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Mobile : switch via tap (.show-alt) =====
   Ajouté par le script sur .creation-card au tap.
   Sur écran tactile (pointer: coarse), on force l’affichage
   de la seconde image quand la classe .show-alt est présente. */

@media (pointer: coarse) {
  .creation-card.show-alt .creation-img-primary {
    opacity: 0;
    transform: scale(1.0);
  }
  .creation-card.show-alt .creation-img-secondary {
    opacity: 1;
    transform: scale(1.02);
  }
}


/* Petits indicateurs (dots) sous les images */
.creation-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.creation-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(15, 23, 42, 0.35);
  opacity: 0.7;
  padding: 0;
  outline: none;
  cursor: default;
  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out,
    background-color 0.2s ease-out;
}

/* Dot actif (image 2 visible) */
.creation-dot--active {
  background: rgba(255, 255, 255, 0.95);
  opacity: 1;
  transform: scale(1.1);
}

@media (hover: hover) and (pointer: fine) {
  .creation-dot {
    cursor: pointer;
  }

  .creation-dot:hover {
    opacity: 1;
    transform: scale(1.15);
  }
}

@media (max-width: 640px) {
  .creation-dots {
    margin-top: 4px;
    gap: 6px;
  }

  .creation-dot {
    width: 7px;
    height: 7px;
  }
}

