/* ========== GÉNÉRAL ========== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem;
  font-family: 'MedievalSharp', cursive;
  background: #0b0c10;
  color: #f4e9d8;
  cursor: url('assets/cursor/cur1054.png'), auto;
}

ul {
  list-style-type: '🗡 ';
  padding-left: 2rem;
  line-height: 2rem;
}

/* Popup musique */

.popup {
  position: fixed;
  top: -250px; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
}

.popup-content {
  background: #2c1f0d;
  border: 2px solid goldenrod;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  color: #ffeaa7;
  font-family: 'MedievalSharp', serif;
  box-shadow: 0 0 10px gold;
}

.popup-content button {
  margin: 1rem;
  padding: 0.5rem 1rem;
  background: goldenrod;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
}

/* ========== TITRES ========== */
h1, h2, h3 {
  text-align: center;
  margin-bottom: 1rem;
}

h1 { font-size: 2rem; color: gold; }
h2 { font-size: 1.5rem; color: lightgray; }

.skills-rpg li strong {
  color: gold;
}

/* ========== BOUTONS ========== */
button {
  font-family: inherit;
  background: darkred;
  color: white;
  border: 2px solid goldenrod;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}
button:hover {
  transform: scale(1.05);
}

.filters button,
#loadMoreBtn,
.role-toggle button {
  cursor: url('assets/cursor/cur1051.png'), auto;
}

.filters {
  text-align: center;
  margin-bottom: 1rem;
}

.filters button {
  margin: 0 5px;
  background: #333;
  border: 1px solid goldenrod;
  color: gold;
  padding: 0.4rem 0.8rem;
}

/* ========== FORMULAIRE DE CONTACT ========== */
form input,
form textarea {
  display: block;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #333;
  color: white;
  border: 1px solid goldenrod;
}

form button[type="submit"] {
  background: goldenrod;
  color: black;
}

/* ========== CONTENEUR PRINCIPAL (CV) ========== */
.hero-card {
  max-width: 800px;
  margin: auto;
  border: 6px double goldenrod;
  border-radius: 10px;
  padding: 2rem;
  background: rgba(34, 34, 34, 0.95);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.role-toggle {
  text-align: center;
  margin-bottom: 2rem;
}

/* ========== EFFET FLIP 3D (RÔLES) ========== */
.card-wrapper {
  perspective: 1200px;
  width: 100%;
  position: relative;
}

.card-3d {
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
}

.card-face {
  backface-visibility: hidden;
  width: 100%;
  grid-column: 1;
  grid-row: 1;
}

.card-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.card-back {
  transform: rotateY(180deg);
}

.card-flipped {
  transform: rotateY(180deg);
}

/* ========== SECTION PROJETS (Quêtes) ========== */
.quests {
  margin-top: 2rem;
}

.quests h3 {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
}

#questList {
  list-style-type: '📜 ';
  padding-left: 2rem;
}

#questList li {
  margin-bottom: 1rem;
}

/* ========== ANIMATIONS (apparition, loader, étincelles) ========== */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1b1b1b;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 1s ease 2s forwards;
}

.loader-inner {
  color: gold;
  font-size: 1.2rem;
  background: rgba(34, 34, 34, 0.8);
  padding: 1.5rem;
  border: 2px solid goldenrod;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 10px #daa520;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: gold;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.8;
  animation: sparkle-animation 600ms ease-out forwards;
  box-shadow: 0 0 8px gold;
  z-index: 9999;
}

@keyframes sparkle-animation {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.8;
  }
  100% {
    transform: scale(0.2) translate(var(--dx), var(--dy));
    opacity: 0;
  }
}

/* ========== LIEN SECRET (vers projet) ========== */
.secret-link {
  text-decoration: none;
  margin-left: 5px;
  font-size: 0.8em;
  color: transparent;
  position: relative;
  z-index: 2;
}

li:hover .secret-link {
  color: goldenrod;
}

/* ========== APERÇU IFRAME FANTASY (optionnel) ========== */
.preview-container {
  position: absolute;
  top: 100%;
  left: 0;
  width: 600px;
  height: 450px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1;
  border: 2px solid goldenrod;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

li:hover .preview-container {
  opacity: 0.95;
  transform: scale(1);
}

.preview-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(1) blur(1px) contrast(0.8);
  pointer-events: none;
}

/* ========== RESPONSIVE (optionnel) ========== */
/* 
@media (max-width: 767px) {
  .card-3d {
    transform: none !important;
    display: block;
  }
  .card-face {
    position: static;
    transform: none;
    backface-visibility: visible;
  }
  .card-wrapper {
    perspective: none;
  }
  .role-toggle {
    display: none;
  }
}
*/


.card-filters {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: 2rem 0;
  perspective: 1000px;
  gap: 2rem;
}

.filter-card {
  background: url("assets/images/parchment.jpg") center/cover no-repeat;
  width: 120px;
  height: 160px;
  padding: 1rem;
  text-align: center;
  font-family: 'MedievalSharp', cursive;
  color: #3b2d1f;
  font-size: 1.1rem;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(177, 162, 162, 0.3);
  transform-origin: bottom center;
  transform: rotateZ(0deg);
  transition: transform 0.5s, box-shadow 0.3s;
  cursor: pointer;
  user-select: none;
}

.filter-card:nth-child(1) { transform: rotateZ(-15deg); }
.filter-card:nth-child(2) { transform: rotateZ(0deg); }
.filter-card:nth-child(3) { transform: rotateZ(15deg); }

.filter-card.active {
  transform: translateY(-40px) scale(1.1) rotateZ(0deg);
  z-index: 10;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.card-filters {
  margin-bottom: 120px;
  position: relative;
  z-index: 5;
}

#questList {
  position: relative;
  z-index: 1;
}

.cv-download {
  text-align: center;
  margin-top: 2rem;
}

.cv-download a {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  background: darkred;
  color: gold;
  border: 2px solid goldenrod;
  border-radius: 10px;
  font-family: 'MedievalSharp', cursive;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: url('assets/cursor/cur1051.png'), auto;
}

.cv-download a:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px gold;
}


@media (max-width: 768px) {
  .quests {
    margin-top: 6rem;
  }

  .card-filters {
    gap: 0;  }

  .filter-card {
    margin-inline: -20px;
  }

  .preview-container {
    width: 100%;
    height: 300px;
    top: 80%;
    left: 0;
    transform: scale(1) translateY(-50%);
  }
}


