:root {
    --bg: #0b0b0c;
    --panel: #0f0f10;
    --panel2:rgb(20, 20, 20)0;
    --muted: #9aa0a6;
    --accent: #61dafb;
     --accent2:rgb(155, 155, 155)b;
    --accent-2: #a855f7;
    --radius: 12px;
    color-scheme: dark;
    --Color_1: #202020;
    --Color_2: #EAEAEA;
    --Color_3: #9400D3;
    --scrollbar-bg: transparent;

    --bg-color: #000;
    --duree-apparition-cercle: 0.8s;
    /* Temps que met le texte pour sortir entièrement de la grotte */
    --duree-sortie-grotte: 1.5s;
    --duree-sortie-split: 1.0s;

    --ease-smooth: cubic-bezier(0.85, 0, 0.15, 1);

    --start: black;
      --text: #1a1a1a;  

    --card : linear-gradient(180deg, #111, #0a0a0a);

                --josy-pink: var(--accent);
            --josy-black: #111;
            --josy-white: #fff;
            --josy-gray: #f2f2f2;
            --bg-dark: #1a1a1a;
            --radius: 24px;
            --shadow: 8px 8px 0px var(--josy-black);

}

/* --- LE SWITCH UIVERSE (ADAPTÉ) --- */
.theme-switch-wrapper {
    position: fixed;
    top: -10px;
    left: -20px;
    z-index: 10001;
    transform: scale(0.7); /* Pour qu'il soit plus élégant */
}

.toggle-switch {
  position: relative;
  width: 100px;
  height: 50px;
      top: -14px;
  --light: #d8dbe0;
  --dark: #28292c;
}

.switch-label {
  position: absolute;
  width: 100%;
  height: 50px;
  background-color: var(--dark);
  border-radius: 25px;
  cursor: pointer;
  border: 3px solid var(--dark);
  scale: 0.6;
}

.checkbox {
  position: absolute;
  display: none;
}

.slider {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 25px;
  transition: 0.3s;
}

.checkbox:checked ~ .slider {
  background-color: #fdfaf5; /* Couleur crème quand activé */
  border: 1px solid #e0ddd7;
}

.slider::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  box-shadow: inset 12px -4px 0px 0px var(--light);
  background-color: var(--dark);
  transition: 0.3s;
}

.checkbox:checked ~ .slider::before {
  transform: translateX(50px);
  background-color: #f39c12; /* Un petit soleil orange sur le crème */
  box-shadow: none;
}

/*-------------INSTA------------*/

:root {
  --btn-size: 43px;
  --insta-color: var(--accent);
  --logo-color-default: var(--accent);
  --logo-color-hover: #000;
}


/* Style spécifique pour le bouton Josyscope */
.Josyscope-btn {
    background: var(--accent);/*linear-gradient(135deg, rgba(168, 85, 247, 0.7), rgba(97, 218, 251, 0.9)) !important;*/
    border: 3px solid var(--accent) !important;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 25px !important;
}

.Josyscope-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4), 0 0 40px rgba(97, 218, 251, 0.2);
    border-color: #fff !important;
}

/* Animation de l'icône astro */
.icon-astro {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent2);
    padding-bottom: 4px;
    animation: starPulse 2s infinite ease-in-out;
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px var(--accent)); }
    50% { transform: scale(1.2); opacity: 0.7; filter: drop-shadow(0 0 8px var(--accent)); }
}

/* Adaptation mobile pour que les boutons s'empilent joliment */
@media (max-width: 600px) {
    .cta-container {
        flex-direction: column;
        align-items: center;
        gap: 15px !important;
    }
    .Josyscope-btn, .PersoJOSY {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}


/*-------------FIN INSTA------------*/

/*-------------BOUTON JEU PC------------*/


/* --- Variante 1 : Bouton Permanent & Pulse --- 
.bouton_jeu_pc {
  z-index: 10006;
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px; 
  margin: 13px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 25px; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    top: -9px;
    right: 90px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.3s ease;
  width: auto; 
  overflow: visible;
  animation: buttonPulse 2s infinite; 
}*/

/* On change le texte du contenu 
.bouton_jeu_pc::before {
  content: "🎁 Joue !"; 
  display: inline-block;
}
  
/* L'animation de pulse */
@keyframes buttonPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}


/* --- Nouveau Style du Bouton Ticket --- */
.bouton_jeu_pc {
  z-index: 10006;
  position: fixed;
    top: -11px;
    right: 100px;
  
  /* Nouveau style : Dégradé coloré Or-Violet pour un look magnifique et attirant */
  background: linear-gradient(135deg, #FFD700 0%, var(--accent) 100%);
  color: white; /* Texte blanc pour le contraste sur le dégradé */
  
  border: 0px solid transparent; /* Prépare la bordure pour le hover */
  border-radius: 30px; /* Look très arrondi, moderne */
  padding: 0; /* On gère le padding à l'intérieur du span */
  
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  
  /* L'animation Pulse que tu aimes */
  animation: ticketPulse 2s infinite ease-in-out;
  transition: all 0.3s ease;
  
  /* Supprime les anciennes contraintes de taille */
  width: auto;
  min-width: 0;
  
  /* New beautiful and attractive styling: depth and subtle background blur */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgb(from var(--accent) r g b / 0.3);
  backdrop-filter: blur(5px); /* Add a subtle background blur for a premium look */
}

/* Conteneur Flex pour aligner icône et texte */
.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px; /* Le vrai padding est ici */
}

/* Style spécifique pour l'image du ticket admission */
.ticket-icon {
  width: 30px; /* Ajusté pour l'image <img> */
  height: 30px;
  margin-right: 12px; /* maintained space */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)) brightness(1.1); /* Petit relief sur le ticket et boost brightness for attraction */
  transition: transform 0.3s ease;
}

/* Effet au survol (Hover) */
.bouton_jeu_pc:hover {
  background: linear-gradient(135deg, #a855f7 0%, #FFD700 100%); /* Reverse gradient on hover */
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px); /* Légère montée */
}

/* Retain the rotation on hover */
.bouton_jeu_pc:hover .ticket-icon {
  transform: rotate(-10deg) scale(1.1);
}

/* Nouvelle animation de Pulse (adoucie, violet accent) */
@keyframes ticketPulse {
  0% {
    transform: scale(1) translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgb(from var(--accent) r g b / 0.3);
  }
  50% {
    transform: scale(1.03) translateY(-1px);
    /* Pulse color matching the violet accent */
    box-shadow: 0 6px 25px rgb(from var(--accent) r g b / 0.5), 0 0 30px rgb(from var(--accent) r g b / 0.5);
  }
  100% {
    transform: scale(1) translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 20pxrgb(from var(--accent) r g b / 0.3);
  }
}

/* Adaptabilité Mobile */
@media (max-width: 767px) {
  .bouton_jeu_pc {
    top: -9px;
    right: 84px;
    font-size: 11px;
  }
  .btn-content {
    padding: 7px 6px;
  }
  .ticket-icon {
    width: 22px; /* Un peu plus petit sur mobile */
    height: 18px;
    margin-right: 1px;
  }
}


.gift-tooltip {
    position: fixed;
    top: 50px; /* Sous le bouton */
    right: 100px;
    background: white;
    color: black;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10007;
    display: none; /* Caché par défaut, activé par le JS */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: floatTooltip 3s infinite ease-in-out;
}

/* Petite flèche vers le haut */
.gift-tooltip::after {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

@keyframes floatTooltip {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#modal-container {
  position: fixed;
  display: table;
  overflow: hidden;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  transform: scale(0);
  z-index: 9999;
}

#modal-container.closed {
  display: none !important;
}


#modal-container.one {
  transform: scaleY(0.01) scaleX(0);
  animation: unfoldIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.one .modal-background .modal {
  transform: scale(0);
  animation: zoomIn 0.3s 0.7s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.one .modal-background .modal p {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typeWriter 2s steps(40) forwards;
}

#modal-container.out {
  transform: scale(1);
  animation: unfoldOut 1s 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.modal-background {
  display: table-cell;
  background: rgba(0, 0, 0, 0.8);
  text-align: center;
  vertical-align: middle;
}

.modal_jeu_2 {
  background: var(--Color_2);
  bottom: -29vh;
  left: 47vh;
  padding: 20px;
  height: 90vh;
  width: 45vw;
  display: inline-block;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  position: relative;
  transform: translate(-50%, -50%);
}

.modal {
  background: var(--Color_2);
  bottom: -5vh;
  left: -2vw;
  padding: 20px;
  height: 90vh;
  width: 45vw;
  display: inline-block;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  position: relative;
  transform: translate(-50%, -50%);
}

.iframe-jeu {
  position: relative;
  bottom: -2vh;
  right: -5%;
  width: 90%;
  height: 74%;
  border: none;
  border-radius: 10px;
  opacity: 0;
  /* Commence invisible */
  display: none;
  /* Assurez-vous qu'il est affiché */
  transition: transform 0.3s ease, opacity 0.5s ease;
  /* Transition pour opacité */
  z-index: -1;
  /* Met au premier plan */
}

.modal h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 25px;
  line-height: 25px;
  margin-bottom: 25px;
}

.modal p {
  margin-top: 7px;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  line-height: 22px;
  font-style: italic;
}

.modal .buttone {
  display: inline-block;
  text-align: center;
  padding: 6px 20px;
  margin: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  background-color: var(--Color_1);
  color: var(--Color_2);
  border: 2px solid var(--Color_2);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  z-index: 3000;
}

.modal .buttone:hover {
  background-color: var(--Color_3);
  color: var(--Color_2);
}

.modal input[type="text"],
.modal button {
  margin-top: 20px;
  z-index: 99000;
  position: relative;
}

.modal button {
  margin-top: 30px;
  margin-bottom: 10px;
  background-color: #6a5acd;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 99000;
  position: relative;
}

.modal button:hover {
  background-color: #8a2be2;
}

#button-open-game {
  position: absolute;
  right: 40px;
  bottom: 2px;
  color: var(--Color_1);
  padding: 3px 3px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 99000;
}

#button-open-game:hover {
  color: var(--Color_3);
}

.modal .modal-svg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border-radius: 3px;
}

@keyframes typeWriter {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

/*------------- Styles pour le pop-up----------- */


#modal-container {
  position: fixed;
  display: table;
  overflow: hidden;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  transform: scale(0);
  z-index: 9999;
}
 
#modal-container.closed {
  display: none !important;
}
 
 
#modal-container.one {
  transform: scaleY(0.01) scaleX(0);
  animation: unfoldIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
 
#modal-container.one .modal-background .modal {
  transform: scale(0);
  animation: zoomIn 0.3s 0.7s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
 
#modal-container.one .modal-background .modal p {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typeWriter 2s steps(40) forwards;
}
 
#modal-container.out {
  transform: scale(1);
  animation: unfoldOut 1s 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
 
.modal-background {
  display: table-cell;
  background: rgba(0, 0, 0, 0.8);
  text-align: center;
  vertical-align: middle;
}
 
.modal_jeu_2 {
  background: var(--Color_2);
  bottom: -29vh;
  left: 47vh;
  padding: 20px;
  height: 90vh;
  width: 45vw;
  display: inline-block;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  position: relative;
  transform: translate(-50%, -50%);
}
 
.modal {
  background: var(--Color_2);
  bottom: -5vh;
  left: -2vw;
  padding: 20px;
  height: 90vh;
  width: 45vw;
  display: inline-block;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  position: relative;
  transform: translate(-50%, -50%);
}
 
.iframe-jeu {
  position: relative;
  bottom: -2vh;
  right: -5%;
  width: 90%;
  height: 74%;
  border: none;
  border-radius: 10px;
  opacity: 0;
  /* Commence invisible */
  display: none;
  /* Assurez-vous qu'il est affiché */
  transition: transform 0.3s ease, opacity 0.5s ease;
  /* Transition pour opacité */
  z-index: -1;
  /* Met au premier plan */
}
 
.modal h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 25px;
  line-height: 25px;
  margin-bottom: 25px;
}
 
.modal p {
  margin-top: 7px;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  line-height: 22px;
  font-style: italic;
}
 
.modal .buttone {
  display: inline-block;
  text-align: center;
  padding: 6px 20px;
  margin: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  background-color: var(--Color_1);
  color: var(--Color_2);
  border: 2px solid var(--Color_2);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  z-index: 3000;
}
 
.modal .buttone:hover {
  background-color: var(--Color_3);
  color: var(--Color_2);
}
 
.modal input[type="text"],
.modal button {
  margin-top: 20px;
  z-index: 99000;
  position: relative;
}
 
.modal button {
  margin-top: 30px;
  margin-bottom: 10px;
  background-color: #6a5acd;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 99000;
  position: relative;
}
 
.modal button:hover {
  background-color: #8a2be2;
}
 
#button-open-game {
  position: absolute;
  right: 40px;
  bottom: 2px;
  color: var(--Color_1);
  padding: 3px 3px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 99000;
}
 
#button-open-game:hover {
  color: var(--Color_3);
}
 
.modal .modal-svg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border-radius: 3px;
}
 
@keyframes typeWriter {
  from {
    width: 0;
  }
 
  to {
    width: 100%;
  }
}
 
/* Styles pour le pop-up */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}
 
.popup {
  background: var(--Color_2);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;
}
 
.popup .close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
}
 
 
 
.popup_Jeu {
  position: fixed;
  margin-top: 0px;
  visibility: hidden;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 9999999;
  opacity: 0;
 
}

.popup_Jeu.active {
  visibility: visible !important;
  opacity: 1 !important;
}
 
.popup_Jeu_tel {
  position: fixed;
  visibility: hidden;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 99999;
  opacity: 0;
 
}
 
.grid-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding-top: 0px;
    padding-bottom: 0px;
}

.game-panel {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  animation: fadeIn 0.3s ease;
  position: relative;
}

.game-panel.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 50px;
}

/* TITRE ET EMOJI FIXES EN HAUT */
.game-title,
.game-emoji {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  flex-shrink: 0;
}

.game-title {
  top: 50px;
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  text-align: center;
  width: 100%;
  max-width: 90vw;
  margin: 0;
  padding: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.game-emoji {
  top: 20px;
  font-size: 2rem;
  text-align: center;
  width: 100%;
  max-width: 90vw;
}

#game-josymot {
  padding: 0;
  justify-content: center;
  align-items: center;
  padding-top: 0;
}

/* DESIGN JEU 1 : Formulaire élégant avec bordure rose */
.josymot-form-box {
  width: clamp(85vw, 100%, 420px);
  padding: clamp(16px, 2vh, 24px);
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.98) 100%);
  border: 3px solid var(--josy-pink);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 1.2vh;
  margin-top: 100px;
  margin-bottom: 20px;
}

.josymot-header {
  text-align: center;
  border-bottom: 2px dashed var(--josy-pink);
  padding-bottom: 1vh;
}

.josymot-header h3 {
  font-size: clamp(0.9rem, 1.8vh, 1.1rem);
  color: #111;
  margin: 0 0 0.5vh 0;
  font-weight: bold;
}

.josymot-subtitle {
  font-size: clamp(0.75rem, 1.3vh, 0.9rem);
  color: #666;
  margin: 0;
  line-height: 1.3;
}

.josymot-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid #111;
  border-radius: 12px;
  padding: clamp(6px, 1vh, 10px);
  overflow: hidden;
}

.josymot-prefix {
  font-weight: bold;
  color: var(--josy-pink);
  font-size: clamp(0.85rem, 1.5vh, 1rem);
  flex-shrink: 0;
  letter-spacing: 1px;
}

.josymot-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: clamp(0.8rem, 1.5vh, 0.95rem);
  color: #111;
  outline: none;
  font-weight: 600;
}

.josymot-input::placeholder {
  color: #ccc;
}

.josymot-btn {
  padding: clamp(0.8rem, 1.2vh, 1rem);
  background: linear-gradient(135deg, var(--josy-pink), #a855f7);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: clamp(0.8rem, 1.5vh, 0.95rem);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.josymot-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.josymot-btn:active {
  transform: translateY(0);
}

.josymot-result {
  min-height: 2.5vh;
  padding: 0.8vh;
  text-align: center;
  font-size: clamp(0.75rem, 1.2vh, 0.9rem);
  border-radius: 8px;
  font-weight: 600;
  flex-shrink: 0;
}

#game-jeuvisuel {
  padding: 0;
  justify-content: center;
  align-items: center;
}

#game-josyscope {
  width: 100%;
  height: 100vh !important;
  border-radius: 16px;
  overflow: visible;
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  gap: 0;
}

/* DESIGN JEU 2 : Boîte wrapper bleu pour l'iframe */
.visual-game-box {
  width: clamp(85vw, 100%, 600px);
  height: 80vh;
  background: linear-gradient(135deg, rgba(30,58,138,0.9) 0%, rgba(25,45,105,0.9) 100%);
  border: 3px solid #2196F3;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(33, 150, 243, 0.3);
  overflow: visible;
  display: flex;
  flex-direction: column;
  margin-top: 100px;
  margin-bottom: 20px;
  position: relative;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
}

.iframe-jeu {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- JREU 2 : Écran de compte à rebours initial --- */
.visual-ready-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.5rem, 8vh, 3rem);
  font-weight: bold;
  color: #ffff00;
  text-shadow: 3px 3px 10px rgba(0,0,0,0.8);
  z-index: 100;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* --- JEU 2 : Header avec compte à rebours et cible --- */
.visual-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
  margin-bottom: 10px;
  color: white;
  font-size: clamp(0.9rem, 2vh, 1.2rem);
  font-weight: 600;
  padding: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  flex-shrink: 0;
}

.visual-countdown {
  font-size: clamp(1.2rem, 3vh, 1.8rem);
  font-weight: bold;
  color: #ffff00;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
  min-width: 50px;
  text-align: center;
}

.visual-target {
  flex: 1;
  text-align: center;
}

#visual-random-word {
  font-weight: bold;
  color: #ffff00;
  background: rgba(255,255,0,0.2);
  padding: 5px 15px;
  border-radius: 4px;
  margin-left: 10px;
}

/* --- JEU 2 : Conteneur des mots --- */
#visual-word-container {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  background: rgba(0,0,0,0.4);
  border-radius: 8px;
  overflow: hidden;
  display: block;
  padding: 0;
  cursor: grab;
}

/* --- JEU 2 : Mots individuels --- */
.visual-word {
  position: absolute;
  padding: 0px;
  background: linear-gradient(135deg, #FFB6C1 0%, #FF69B4 100%);
  color: #333;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  box-shadow: 0 1px 4px rgba(255, 105, 180, 0.3);
  font-size: clamp(0.45rem, 0.65vh, 0.65rem);
  white-space: nowrap;
  padding: 1px 4px;
}

.visual-word:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 105, 180, 0.6);
}

.visual-word.correct {
  background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
  color: white;
  animation: popBounce 0.6s ease-out;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

@keyframes popBounce {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- JEU 2 : Overlay de résultats --- */
#visual-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-radius: 8px;
  animation: fadeInOverlay 0.3s ease-out;
}

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

#visual-overlay.show {
  display: flex;
}

/* --- JEU 2 : MODE SWITCH --- */
.game-mode-switch {
  position: absolute;
  top: 10px;
  right: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 50;
  background: rgba(0,0,0,0.5);
  padding: 8px 12px;
  border-radius: 20px;
}

.switch-label {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  cursor: pointer;
}

.switch-label input {
  display: none;
}

.switch-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.switch-slider:before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .switch-slider {
  background-color: #FF69B4;
}

input:checked + .switch-slider:before {
  transform: translateX(26px);
}

.switch-text {
  font-size: 0.8rem;
  color: #999;
  font-weight: 600;
  transition: color 0.3s ease;
}

.switch-text.active {
  color: #ffff00;
}

input:checked + .switch-slider ~ .switch-text:first-of-type {
  color: #ffff00;
}

input:checked + .switch-slider ~ .switch-text:last-of-type {
  color: #999;
}

/* --- JEU 2 : MODE CONTAINERS --- */
.game-mode-container {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-mode-container.active {
  display: flex;
  opacity: 1;
}

/* --- MODE EMPILEMENT : HEADER --- */
.empilement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
  margin-bottom: 10px;
  color: white;
  font-size: clamp(0.9rem, 2vh, 1.2rem);
  font-weight: 600;
  padding: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  flex-shrink: 0;
}

.empilement-countdown {
  font-size: clamp(1.2rem, 3vh, 1.8rem);
  font-weight: bold;
  color: #ffff00;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
  min-width: 50px;
  text-align: center;
}

.empilement-target {
  flex: 1;
  text-align: center;
}

#empilement-random-word {
  font-weight: bold;
  color: #ffff00;
  background: rgba(255,255,0,0.2);
  padding: 5px 15px;
  border-radius: 4px;
  margin-left: 10px;
}

/* --- MODE EMPILEMENT : CONTENEUR DES MOTS --- */
#empilement-word-container {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  background: rgba(0,0,0,0.4);
  border-radius: 8px;
  overflow: visible;
  padding: 0;
  cursor: grab;
  margin-bottom: 10px;
  perspective: 1000px;
}

/* --- MODE EMPILEMENT : MOTS DRAGGABLES --- */
.empilement-word {
  position: absolute;
  padding: 4px 8px;
  background: linear-gradient(135deg, #FFB6C1 0%, #FF69B4 100%);
  color: #333;
  font-weight: 600;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(255, 105, 180, 0.4);
  font-size: 0.6rem;
  white-space: nowrap;
  padding: 2px 5px;
  z-index: 10;
  touch-action: none;
}

.empilement-word:active {
  cursor: grabbing;
  z-index: 1000;
  box-shadow: 0 8px 20px rgba(255, 105, 180, 0.8);
  transform: scale(1.1);
}

.empilement-word.dragging {
  cursor: grabbing;
  z-index: 1000;
  box-shadow: 0 8px 20px rgba(255, 105, 180, 0.8);
  transform: scale(1.1);
  opacity: 0.9;
}

.empilement-word.correct {
  background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
  color: white;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
  animation: popBounce 0.6s ease-out;
}

/* --- MODE EMPILEMENT : ZONE DE DÉPÔT --- */
#empilement-drop-zone {
  width: 100%;
  height: 60px;
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.3) 0%, rgba(255, 105, 180, 0.2) 100%);
  border: 3px dashed #FF69B4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFB6C1;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

#empilement-drop-zone.drag-over {
  background: rgba(255, 105, 180, 0.3);
  border-color: #FFB6C1;
  box-shadow: 0 0 15px rgba(255, 105, 180, 0.5);
  transform: scale(1.02);
}

#empilement-drop-zone.success {
  background: linear-gradient(135deg, rgba(0, 255, 0, 0.3) 0%, rgba(0, 204, 0, 0.2) 100%);
  border-color: #00ff00;
  color: #00ff00;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
}

.jeu-result {
  text-align: center;
  color: white;
  font-size: clamp(1.2rem, 3vh, 2rem);
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.jeu-result.success {
  color: #00ff00;
}

.jeu-result.failure {
  color: #ff6666;
}

.jeu-replay-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #FFB6C1 0%, #FF69B4 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: clamp(0.9rem, 1.5vh, 1.1rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
}

.jeu-replay-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 105, 180, 0.6);
}

.jeu-replay-btn:active {
  transform: scale(0.95);
}

/* Wrapper pour l'iframe */

.iframe-jeu {
  width: 100%;
  height: 100%;
  border: none;
}


/* Afficher les emojis quand le panneau est actif */
#game-jeuvisuel.active .game-emoji,
#game-josyscope.active .game-emoji {
  opacity: 1;
}

/* Wrapper pour l'iframe */
.iframe-wrapper {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 16px;
  overflow: hidden;
  background: black;
  display: flex;
}

.iframe-wrapper iframe {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  border: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
 
 
.close-button_Jeu {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  color: white;
}
 
.close-button_Jeu:hover {
  color: rgb(255, 0, 0);
  transform: scale(1.1);
}
 
 
#textContainer {
  position: relative;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  left: 0;
  transform: none;
  top: 0;
  padding-bottom: 10px;
  color: rgb(200, 200, 200);
}
 
 
 
.spaced-element {
  opacity: 0;
  display: none;
  margin-top: 20px;
  /* Espace au-dessus */
  margin-bottom: 20px;
  /* Espace en dessous */
  left: 15vw;
  position: relative;
  /* Au lieu de fixed */
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  justify-content: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
 
input.spaced-element {
  cursor: text;
  pointer-events: auto;
}
 
p.spaced-element {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 68vh;
  left: 45%;
  opacity: 1;
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  color: var(--Color_2);
  z-index: 99999;
}
 
 
button.spaced-element {
  left: 45%;
  top: 3vh;
  padding: 6px 1vw;
  margin: 1vw;
  /* font-size: calc(1.15vw + 8px);
   /* background-color: var(--Color_1);*/
  background: rgba(0, 0, 0, 0.3);
  /*color: var(--Color_2);*/
  color: white;
  border: 0px solid var(--Color_2);
  border-radius: 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.0rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  z-index: 99999;
  cursor: pointer;
  pointer-events: auto;
}
 
 
/* Effet au survol du bouton */
button.spaced-element:hover {
  color: var(--Color_2);
 
  /*  background: var(--Color_3);*/
  background: rgba(0, 0, 0, 0.6);
}

/* --- DEPRECATED: Old grid-item styles --- */
 
/* -------FIN JEU PC ------- */
 
/* ============= NAVIGATION LATERALE POPUP ============= */
 
.game-sidebar {
    position: fixed;
    right: 2%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10000;
}
 
.game-icon-btn {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
 
.game-icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity 0.3s ease;
}
 
.game-icon-btn svg {
    width: 35px;
    height: 35px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    filter: grayscale(1) brightness(0.6);
    color: white;
}
 
.game-icon-btn:hover {
    transform: scale(1.1);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
 
.game-icon-btn.active {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(from var(--accent) r g b / 0.6);
    transform: scale(1.15);
}
 
.game-icon-btn.active::before {
    opacity: 0.2;
}
 
.game-icon-btn.active svg {
    filter: grayscale(0) brightness(1);
    transform: scale(1.1);
}
 
.game-icon-btn:active {
    transform: scale(0.95);
}
 
/* Label tooltip au survol */
.game-icon-btn::after {
    content: attr(data-label);
    position: absolute;
    right: 85px;
    background: var(--accent);
    color: var(--text);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
 
.game-icon-btn:hover::after {
    opacity: 1;
    transform: translateX(0);
}
 
/* Panels de jeu */
.game-panel {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}
 
/* Container principal ajusté */
.popup_Jeu .grid-container {
    width: 85vw !important;
    margin-right: auto;
}
 


/* ============= STYLES MOBILE POUR LE POPUP JEU ============= */
@media (max-width: 768px) {
  
  /* Navigation latérale en mode mobile */
  .game-sidebar {
    right: 1%;
    gap: 12px;
  }
  
  .game-icon-btn {
    width: 55px;
    height: 55px;
    border-radius: 12px;
  }
  
  .game-icon-btn svg {
    width: 28px;
    height: 28px;
  }
  
  /* Tooltip en dessous pour mobile */
  .game-icon-btn::after {
    right: auto;
    left: 50%;
    top: 65px;
    transform: translateX(-50%) translateY(-10px);
  }
  
  .game-icon-btn:hover::after {
    transform: translateX(-50%) translateY(0);
  }
  
  .grid-container {
    padding: 20px;
  }
  
  #game-josymot .game-title {
    font-size: 2rem;
  }
  
  #game-josymot .game-content {
    max-width: 100%;
  }
  
  #game-josymot input,
  #game-josymot .btn-valider {
    width: 100%;
  }
}
 
  .grid-item[data-index="1"].active {
    display: flex;
  }
 
  .text-gradient {
    font-size: 1.3rem;
    top: 0;
    margin-bottom: 15px;
  }
 
  #textContainer {
    position: relative;
    left: 0;
    transform: none;
    top: 0;
    font-size: 0.75rem;
    white-space: normal;
    text-align: center;
    width: 100%;
    margin-bottom: 15px;
  }
 
  .spaced-element {
    position: relative;
    left: 0;
    transform: none;
    top: 0;
    width: 100%;
    margin: 10px auto;
    opacity: 1;
    display: block;
  }
 
  p.spaced-element {
    position: relative;
    transform: none;
    top: auto;
    left: auto;
    width: 100%;
    font-size: 0.95rem;
    margin: 15px auto;
    text-align: center;
  }
 
  input.spaced-element {
    width: 100%;
    max-width: 280px;
    padding: 10px;
    font-size: 0.9rem;
    margin: 12px auto;
    display: block;
  }
 
  button.spaced-element {
    left: auto;
    top: auto;
    transform: none;
    padding: 10px 20px;
    font-size: 0.85rem;
    display: inline-block;
    width: auto;
    margin: 10px auto;
  }
 
  .close-button_Jeu {
    top: 10px;
    right: 10px;
    font-size: 30px;
    font-weight: bold;
        color: red;
  }
 
  .iframe-jeu {
  width: 89vw;
        left: -13px;
        height: 74vh;
        top: -170px;
    border-radius: 8px;
    margin-top: 10px;
  }
 
  .game-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
 
  .content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
 
  .modal-svg {
    display: none;
  }

 
/* ============= FIN STYLES MOBILE ============= */



/* -------FIN JEU PC ------- */

/* ============= STYLES MOBILE POUR LE POPUP JEU ============= */
@media (max-width: 768px) {
  .grid-container {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 20px;
    width: 100%;
    height: 100%;
    max-height: 90vh;
    position: relative;
    top: 0;
     transition: all 1s ease !important;
  }

  .grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 45vh !important;
    min-height: 45vh;
   /* width: 100%;*/
    width: 90vw !important;
    padding: 20px 15px;
    border-radius: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease, height 0.3s ease, min-height 0.3s ease !important;
     transition: all 1s ease !important;
  }

  #popup_Jeu .grid-item {
    min-height: auto !important;
  }

  #text_1 {
     top: 15vh !important
}

#text_0 {
     top: 15vh !important
}

#emoji_1 {
     top: -20px !important
}

#emoji_0 {
     top: -20px !important
}

  #popup_Jeu .grid-item.active {
    height: 80vh !important;
    min-height: auto !important;
    transition: all 1s ease !important;
  }

  #popup_Jeu .grid-item.inactive {
    height: 5vh !important;
    min-height: auto !important;
    transition: all 1s ease !important;
   /* display: none !important;*/
  }

  .grid-item[data-index="0"] {
    display: flex;
  }

  .grid-item[data-index="1"] {
    display: none;
  }

  .grid-item[data-index="0"].active {
    display: flex;
  }

  .grid-item[data-index="1"].active {
    display: flex;
  }

  .text-gradient {
    font-size: 1.3rem;
    top: 0;
    margin-bottom: 15px;
  }

  #textContainer {
    position: relative;
    left: 0;
    transform: none;
    top: 0;
    font-size: 0.75rem;
    white-space: normal;
    text-align: center;
    width: 100%;
    margin-bottom: 15px;
  }

  .spaced-element {
    position: relative;
    left: 0;
    transform: none;
    top: 0;
    width: 100%;
    margin: 10px auto;
    opacity: 1;
    display: block;
  }

  p.spaced-element {
    position: relative;
    transform: none;
    top: auto;
    left: auto;
    width: 100%;
    font-size: 0.95rem;
    margin: 15px auto;
    text-align: center;
  }

  input.spaced-element {
    width: 100%;
    max-width: 280px;
    padding: 10px;
    font-size: 0.9rem;
    margin: 12px auto;
    display: block;
  }

  button.spaced-element {
    left: auto;
    top: auto;
    transform: none;
    padding: 10px 20px;
    font-size: 0.85rem;
    display: inline-block;
    width: auto;
    margin: 10px auto;
  }

  .close-button_Jeu {
    top: 10px;
    right: 10px;
    font-size: 30px;
    font-weight: bold;
        color: red;
  }

  .iframe-jeu {
  width: 89vw;
        left: -13px;
        height: 74vh;
        top: -170px;
    border-radius: 8px;
    margin-top: 10px;
  }

  .game-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .modal-svg {
    display: none;
  }
}

/* ============= FIN STYLES MOBILE ============= */

/* Modification du texte lors du survol */
@media (min-width: 768px) {

  /* Effet de survol */
 /* .bouton_jeu_pc:hover {
    width: 220px;
    min-width: 220px;
    padding: 6px 2vw;
    border-radius: 20px;
  }

  .bouton_jeu_pc:hover::before {
    content: "🎁 Joue !";
  }*/
}

/*-------------FIN BOUTON JEU PC------------*/

/*DEPART*/

/* STRUCTURE DE L'ÉCRAN D'ACCUEIL */


#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    pointer-events: none;
}

.split-bg {
    position: absolute;
    top: -20px;
    width: 56%;
    height: 115vh;
    background-color: var(--bg-color);
    transition: transform var(--duree-sortie-split) var(--ease-smooth);
    z-index: 1;
}

.split-bg.left {
    left: 0;
    border-right: 1px solid #111;
}

.split-bg.right {
    right: 0;
}

.center-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    gap: 0px;
    /* Utilisation de la variable pour le temps de décalage */
    transition: gap var(--duree-decalage-et-texte) var(--ease-elastic);
}

.logo-circle {
    width: 130px;
    height: auto;
    opacity: 0;
    transform: scale(1.4);
    filter: blur(10px);
    /* Utilisation de la variable pour l'apparition */
    transition: all var(--duree-apparition-cercle) ease-out,
        transform var(--duree-sortie-split) var(--ease-smooth);
}

/* Le masque (la sortie de la grotte) */
.text-mask {
    width: 0;
    overflow: hidden;
    /* On utilise la variable ici */
    transition: width var(--duree-sortie-grotte) var(--ease-smooth),
        transform var(--duree-sortie-split) var(--ease-smooth);
}

/* L'image du texte à l'intérieur */
.logo-text {
    width: 210px;
    padding-left: 30px;
    padding-top: 15px ;
    height: auto;
    display: block;
    filter: brightness(1.2);

    /* ÉTAT INITIAL : Le texte est "au fond de la grotte" (à gauche du masque) */
    transform: translateX(-100%);

    /* Transition pour le mouvement de sortie */
    transition: transform var(--duree-sortie-grotte) var(--ease-smooth);
}

/* --- ÉTAPE 2 : Déclenchement de la sortie --- */
.stage-2-shift.center-stage {
    /* gap: 30px;
      /* L'espace se crée */
}

.stage-2-shift .text-mask {
    width: 233px;
    /* Le masque s'ouvre */
}

.stage-2-shift .logo-text {
    /* Le texte glisse vers la droite pour devenir visible */
    transform: translateX(0%);
}

/* --- ÉTATS --- */
.stage-1-appear .logo-circle {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}


/* Sortie */
.is-exiting .split-bg.left {
    transform: translateY(-100%);
}

.is-exiting .split-bg.right {
    transform: translateY(-100%);
}

.is-exiting .logo-circle {
    transform: translateY(-100vh); /*translateX(-60vw) !important;*/
}

.is-exiting .text-mask {
    transform: translateY(-100vh); /*translateX(60vw);*/
}

/* --- CONTENU --- */
#main-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
}

body.ready #main-content {
    opacity: 1;
}




.section:nth-child(4) {
    width: 100%;
    overflow-x: hidden;
    margin-bottom: 10px;

}

.rack {
    display: flex;
    position: relative;
    width: fit-content;
    transform: translateX(0%);
    /*top: 24.1vh;*/
    left: 35%;
    z-index: 1200;
}



.tshirtss {
    height: auto;
    width: 42vw;
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    margin-left: -8.5%;
    /* Chevauchement des t-shirts */
    z-index: calc(5 - var(--order));
    /* Inverser l'empilement */
    cursor: pointer;
    /* pointer-events: none; /* Par défaut, désactive le survol */
    pointer-events: none;
}


/* fin STRUCTURE DE L'ÉCRAN D'ACCUEIL */


/* largeur de la scrollbar */
::-webkit-scrollbar {
    width: 9px;
    background: black !important;

}

/* fond */
::-webkit-scrollbar-track {
    /*background: var(--bg);
        /*var(--scrollbar-bg)*/
        background: black;

}

/* barre */
::-webkit-scrollbar-thumb {
    /* background-color: var(--accent);*/
    background-color: var(--accent);
    border-radius: 10px;
    border: 0px solid transparent;
    background-clip: content-box;
}

/* hover */
::-webkit-scrollbar-thumb:hover {
    background-color: color-mix(in srgb, var(--accent) 80%, black) !important;
}

.slider2 {
    opacity: 0 !important;
}

.slider2.scrolled{
    opacity: 1 !important;
}


.nav.scrolled {
    background: rgba(15, 15, 16, .95);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
        font-family: 'Poppins', sans-serif;
}

html {
    scrollbar-gutter: stable;
        font-family: 'Poppins', sans-serif;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: #fff;
    -webkit-font-smoothing: antialiased;

    /* overflow: hidden; */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 1rem;
    padding-top: 1.3rem;
}



/*fin navbar*/

/* Flèche uniquement, arrondie et douce */
#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 14px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10102;
}

#scrollTopBtn.show {
    opacity: 0.9;
    transform: translateY(0);
}

#scrollTopBtn svg {
    width: 40px;
    height: 40px;
    fill: var(--accent);
    /* couleur sombre */
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease, fill 0.3s ease;
}

#scrollTopBtn:hover svg {
    transform: translateY(-5px);
    fill: var(--accent);
    /* couleur hover */
    stroke: var(--accent);
}

/*JOSYMOT */


.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
  /*  width: 100%;*/
    max-width: 400px;
    margin-bottom: 10px;
}

@media (min-width: 480px) {
    .input-group {
        flex-direction: row;
    }
}

input[type="text"] {
    flex-grow: 1;
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid rgba(234, 234, 234, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
    outline: none;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--accent);
}

.button_home {
    padding: 15px 30px;
    border-radius: 30px;
    display: inline-block;
    border: none;
    background-color: var(--accent);
    color: white;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.4s, background-color 3s;
  /*  box-shadow: 0 4px 15px rgba(148, 0, 211, 0.3);*/
  box-shadow: 0 4px 15px color-mix(in srgb, var(--accent), transparent 70%);
}


.button_home:hover {
    transform: scale(1.05);
    /* On intensifie le glow de la couleur d'accent au survol */
    box-shadow: 0 8px 25px color-mix(in srgb, var(--accent), transparent 40%);
    filter: brightness(1.1); /* Petit flash de lumière */
}


.nav{
    background: transparent;
}

.button_home:active {
    transform: scale(0.95);
}


/* HERO */
.hero {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    top: -20px
}

/* Vidéo en arrière-plan */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

@media(max-width:800px) {
    .hero-video {
        object-position: -520px center;
    }
}


.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(0, 0, 0, .6), rgba(0, 0, 0, .8))
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    transform: translateY(-6vh)
}

.hero h1 {
    font-size: 3.4rem;
    margin: 0 0 .15rem;
    color: white !important;
    animation: float 3s ease-in-out infinite;
    animation-delay: 0s;
}

.hero .lead {
    color: #9aa0a6/*var(--muted)*/;
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    max-width: 720px;
    animation: float 3s ease-in-out infinite;
    animation-delay: 100ms;
}

.accent {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.8;
    font-weight: 800
}

/* Liquid-glass effect for josymot
#josymot {
    display: block;
    position: relative;
    font-size: 5.6rem;
    line-height: 0.95;
    margin-top: .05rem;
    height: 13vh;
    font-weight: 800;
    background: linear-gradient(90deg, rgba(97, 218, 251, 1), rgba(168, 85, 247, 1));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    animation: gradient 3s ease infinite, float 2,4s ease-in-out infinite;
    animation-delay: 0s, 0s
}*/

.animate-gradient-text {
    position: relative;
    font-weight: 900;
    font-family: 'Poppins', sans-serif;
    background-image: linear-gradient(90deg,
            #ffffff,
            var(--accent),
            #ffffff);
    background-size: 200% 200%;
    background-position: 0% 50%;

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;

    animation: gradientMove 3s ease-in-out infinite;

}

/* couche intérieure foncée */
.animate-gradient-text::after {
    content: "JOSY";
    position: absolute;
    left: 10px;
    top: 10px;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    color: #17343f;
    /* centre foncé */
    transform: scale(0.88);
    /* ← C’EST ÇA LE SECRET */
    filter: blur(0.6px);
    opacity: 0.95;
    pointer-events: none;
    z-index: 100000;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}



#josymot {
    display: block;
    position: relative;
    font-family: 'Poppins', sans-serif;
    font-size: auto;

    color: rgba(255, 255, 255, 0.2);
    /* Texte quasi transparent */
    position: relative;


    /* Reflets et relief (Liquid Look) */
    text-shadow:
        -2px -2px 5px rgba(255, 255, 255, 0.7),
        /* Brillance haute */
        3px 3px 10px rgba(0, 0, 0, 0.1),
        /* Ombre portée douce */
        inset 2px 2px 4px rgba(255, 255, 255, 0.9);

    padding: 10px;
    padding-bottom: 40px;
    border-radius: 20px;

}

/* Animation pour l'aspect "liquide" */
/*   #josymot:after {
            content: 'JOSY';
            position: absolute;
            left: 10px;
            top: 10px;
            color: transparent;
            background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.8) 50%, transparent 60%);
            background-size: 200% 100%;
            -webkit-background-clip: text;
            animation: shine 4s infinite linear;
        }*/


@keyframes shine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media(max-width:900px) {
    #josymot {
        font-size: 2.6rem
    }

    .hero h1 {
        font-size: 1.8rem
    }

    .hero-content {
        transform: translateY(-3vh)
    }
}

@media(min-width:1400px) {
    #josymot {
        font-size: 6.8rem
    }

    .hero h1 {
        font-size: 3.4rem
    }

    .hero-content {
        transform: translateY(-8vh)
    }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: .6rem;
    animation: float 3s ease-in-out infinite;
    animation-delay: 200ms
}

.hero-actions {
    display: flex;
    /* Permet aux éléments de passer à la ligne s'il n'y a plus de place */
    flex-wrap: wrap; 
    /* Centre les boutons horizontalement */
    justify-content: center; 
    /* Espace entre les deux boutons */
    gap: 15px;
    margin-top: 2rem;
}

.hero-actions .btn {
    /* Empêche le texte de revenir à la ligne à l'intérieur du bouton */
    white-space: nowrap;
    /* Sur mobile, on peut forcer le bouton à prendre toute la largeur quand il est seul */
  /*  flex: 1 1 auto;*/

    text-align: center;
}

.btn {
    display: inline-block;
    padding: .8rem 1.1rem;
    border-radius: 8px;
    text-decoration: none
}

.btn.primary {
    background: var(--accent);
    /*linear-gradient(90deg, var(--accent), var(--accent-2));*/
    color: var(--text) !important;
    font-weight: 700;
    padding: 1rem 2.2rem;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(97, 218, 251, .12);
    white-space: nowrap;      /* Force le texte sur une seule ligne */
    overflow: hidden;         /* Empêche le texte de dépasser du bouton */
    display: inline-flex;     /* Aligne mieux le contenu */
    align-items: center;
    justify-content: center;
}

@media(max-width:758px) {
    .btn.primary {
       /* padding: 0rem 0rem;*/
    }
}

.btn.outline {
    border: 2px solid rgba(97, 218, 251, .28);
    color: var(--accent);
    background: transparent;
    padding: 0.9rem 1.6rem;
    border-radius: 14px
}

/* SECTIONS */
.section {
    padding: 4rem 0;
    padding-bottom: 1.1rem;
    padding-top: 0rem;
     background: var(--panel2)
}

.section.dark {
    background: var(--panel)
}



.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
    margin-left:10px;
    margin-right: 10px;
}

.grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
    margin-left:10px;
    margin-right: 10px;
}

.card {
    background: var(--card);
    padding: 1.2rem;
    padding-bottom: 1.6rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .03);
    text-align: center
}

.card-emoji {
    font-size: 2.5rem;
    margin-bottom: .5rem
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem
}

.chip {
    background: linear-gradient(90deg, #111, #0a0a0a);
    padding: .7rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .04)
}

/* Utility padding like tailwind p-6 */
.p-6 {
    padding: 1.5rem
}



.p {
    font-weight: 400;
    font-size: 0.9rem;
    opacity: 0.7;
}

.h3 {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Accent text */
.accent-text {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.25rem;
    text-align: center
}

/* Accent link (Acheter) 
.accent-link {
    display: inline-block;
    margin-top: .75rem;
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    position: absolute;
    bottom: 20px;
    transform: translate(-50%, 0);
}*/

.accent-link {
    /* 1. Positionnement */
    position: absolute;
    bottom: 10px;
    left: 50%; /* On place le bord gauche du bouton au milieu de la carte */
    transform: translateX(-50%); /* On le recule de 50% de sa propre largeur pour le centrer */
    
    /* 2. Style du bouton */
    display: inline-block;
    white-space: nowrap; /* Empêche le texte "Prochainement" de s'écrire sur deux lignes */
    padding: 6px 15px;
    background-color: var(--accent);
    color: var(--text);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    
    /* 3. Transition */
    transition: all 0.3s ease;
    z-index: 10;
}


.accent-link:hover {



    background-color: transparent;
   border: 2px solid var(--accent); /* Apparition du contour de 2px */
    color: var(--accent);
 box-shadow: 0 10px 20px rgb(from var(--accent) r g b / 0.3);
    text-decoration: none;
}
@media(min-width:600px) {
    .accent-link:hover {
            position: absolute;
    bottom: 10px;
    left: 50%; /* On place le bord gauche du bouton au milieu de la carte */
            transform: translate(-50%, -3px);
   
    }
}

@media(max-width:600px) {
    .p-6 {
        padding: 0rem
    }

    .h3 {
       margin-top: 0.5rem;
       margin-bottom: 0.6rem;
    }

    .accent-link {
      bottom: 4px;
    }

    .grid{
         gap: 0.8rem;
    }
}

/* JOSYmot cards */
.josymots-grid {
    grid-template-columns: repeat(auto-fit, minmax(max-content, 1fr));
    align-items: stretch
}

.josymot-card {
    background: linear-gradient(180deg, #0e0e0f, #070707);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .03);
    transition: all .3s ease;
    display: flex;
    align-items: center;
    justify-content: center
}

.josymot-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 15px var(--accent)
        /*rgba(97, 218, 251, .06)*/
    ;
    border-color: var(--accent)
}

.josymot-text {
    margin: 0;
    font-size: 1.125rem
}

.newsletter {
    max-width: 720px;
    margin: 0 auto;
    text-align: center
}

.newsletter-form {
    display: flex;
    gap: .6rem;
    justify-content: center;
    margin-top: 1rem
}

.newsletter-form input {
    flex: 1;
    padding: .8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .04);
    color: #fff
}



@media(max-width:800px) {
    .hero h1 {
        font-size: 2rem
    }

    .muted {
    
    margin-bottom: 0px;
}



    .logo {
        position: relative;
   top: 4px;
}

.josymots-grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch
}
}

/* small animations */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity .8s ease-out, transform .8s ease-out
}

.fade-in.in,
.fade-in-section.in {
    opacity: 1;
    transform: translateY(0)
}

/* Gradient Animation */
@keyframes gradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-14px)
    }
}

.floating-element {
    animation: float 3s ease-in-out infinite
}

/* Scroll animation */
@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1
    }

    100% {
        transform: translateY(8px);
        opacity: 0
    }
}

.animate-scroll {
    animation: scroll 3s ease-in-out infinite
}

/* Bounce */
.bounce-animation {
    animation: float 3s ease-in-out infinite
}

/* Button glow and outline */
.glow-button {
    position: relative;
    overflow: hidden;
    transition: all .3s ease;
    background: var(--accent);
    /*linear-gradient(90deg, var(--accent), var(--accent-2))*/
    color: var(--text);
    font-weight: 700
}

.glow-button:hover {
    box-shadow: 0 8px 30px rgba(97, 218, 251, .15);
    transform: translateY(-3px)
}

.glow-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    transform: translate(-50%, -50%);
    transition: width .6s, height .6s
}

.glow-button:hover::before {
    width: 300px;
    height: 300px
}

.PersoJOSY{
 border-radius: 25px !important;
 color: var(--text) !important;
}

/* --- Style Vertical (Comme le Josyscope, SIDE-BY-SIDE layouts are now vertical) --- */
.studio-vertical {
    display: flex !important;
    flex-direction: column !important; /* Force l'icône AU-DESSUS du texte */
    align-items: center !important;
    justify-content: center !important;
  /*  gap: 8px !important; /* Espace JOSYdéal entre le crayon et le texte */
    padding: 15px 25px !important;
    text-align: center;
 /*   border-radius: 20px !important;*/
    transition: all 0.4s ease;
}

.studio-vertical:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgb(from var(--accent) r g b / 0.5);
    border-color: #fff !important;
}

/* --- Parent de l'icône Crayon (Pulses et Halo Néon) --- */
.icon-pencil-astro {
    display: flex;
    align-items: center;
    justify-content: center;
    /* On utilise l'animation du Josyscope mais avec le halo néon violet d'accent de la marque */
    animation: pencilParentPulse 2.2s infinite ease-in-out;
}

@keyframes pencilParentPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        /* Ombre glow du Josyscope, couleur violette d'accent pour un halo doux */
        filter: drop-shadow(0 0 3px var(--accent));
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
        /* Ombre glow du Josyscope, couleur violette d'accent pour un halo doux */
        filter: drop-shadow(0 0 10px var(--accent));
    }
}

/* --- Le SVG du Crayon lui-même (Animation Arc-en-ciel) --- */
.pencil-anim {
    width: 20px !important;
    height: 20px !important;
    transition: transform 0.3s ease;
    /* J'utilise currentColor pour que l'animation de couleur se propage depuis .icon-pencil-astro */
    color: currentColor;
    animation: pencilRainbowNéon 4s infinite linear;
}

/* 🌈 Animation Néon Arc-en-ciel JOSY (change la couleur de 'color' qui remplit le crayon) 🌈 
@keyframes pencilRainbowNéon {
    0%   { color: #61dafb; } 
    17%  { color: #ff00ff; } 
    34%  { color: #ff0000; } 
    51%  { color: #ffff00; } 
    68%  { color: #00ff00; } 
    85%  { color: #0000ff; } 
    100% { color: #61dafb; } 
}*/

/* Effet au survol du bouton entier pour le crayon */
.PersoJOSY:hover .pencil-anim {
    transform: scale(1.3) rotate(15deg);
}

/* Texte du bouton JOSYmail 
.btn-text {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white; 
}*/


.outline-button {
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: .7rem 1rem
}

.outline-button:hover {
    background: var(--accent);
    color: #080808
}

/* Collection card interactions */
.collection-card {
    transform: translateZ(0);
    transition: all .5s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .3);
    position: relative
}

.collection-card:hover {
    transform: scale(1.05);
    /* On prend la variable, et on force l'opacité à 62% */
    box-shadow: 0 20px 50px rgb(from var(--accent) r g b / 0.62);
}

.collection-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(97, 218, 251, .06));
    opacity: 0;
    transition: opacity .5s
}

.collection-card:hover::before {
    opacity: 1
}

.collection-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center
}

.collection-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
    transition: left .7s
}

.collection-card:hover .collection-image::after {
    left: 100%
}

/* hero scroll indicator */
.scroll-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1rem
}

.mouse {
    width: 30px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
    background: rgba(0, 0, 0, .25)
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--accent);
    border-radius: 2px
}

/* Arrival animation for initial word */
@keyframes arrive {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-title {
    display: block;
}

#josymot.arrive {
    animation: arrive 700ms cubic-bezier(.2, .9, .2, 1) both
}

/* floating applies after arrival */
.floating-element {
    animation: float 3s ease-in-out infinite
}


/*-------- Gallerie JOSY Team -------------*/


.gallery-section {
    position: fixed;
    top: 24%;
    left: 2%;
    width: 94%;
    overflow: hidden;
    color: white;
    z-index: 990;
}

.gallery-scroll {
    display: flex;
    overflow: hidden;
    cursor: auto;

    /* Fondu gauche/droite */
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 5%, rgba(0, 0, 0, 1) 95%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 5%, rgba(0, 0, 0, 1) 95%, rgba(0, 0, 0, 0) 100%);
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
}

.gallery-grid {
    display: flex;
    gap: 10px;
    transition: transform 0s linear;
}

.gallery-grid img {
    width: calc(25% - 7.5px);
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .gallery-grid img {
        width: calc(50% - 7.5px);
    }
}

#toggleGallery {
    display: none;
}


.vous_josy_2 {
    position: relative;
    width: 85vw;
    left: 50%;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(16px, 1.6vw, 20px);
    font-weight: 500;
    padding-top: 20px;
    transform: translate(-50%, 0%);
    color: var(--Color_2);
    pointer-events: none;
    z-index: 900;
}


/*------- FIN Gallerie JOSY Team ----------*/

/* Josymots header layout */
.josymots-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.h2_mot{
    padding-bottom: 0px;
    margin-bottom: 0px;
}

@media (max-width: 800px) {
  .josymots-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
  }

  .input-group{
        position: relative;
    right: -65px;
    transform: translate(50%, 0px);
     margin-bottom: 0px;
     top: -10px;
  }

  .button_home {
        padding: 15px 15px;
  }

  .container{
    padding-bottom: 0rem;
  }

}

/* Mobile styles for collections */
#showMoreCollections {
  display: none;
}
@media (max-width: 768px) {
  #collections {
    position: relative;
  }

  #collections .container {
    padding-bottom: 80px; /* Espace pour le bouton + fade */
  }

  #collections::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 500px;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(15,15,16,0), var(--panel));
  }

  .grid2 article:nth-child(n+4) {
    display: none;
  }

  #showMoreCollections {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 18px;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: var(--accent);
    color: var(--text);
    font-size: 2rem;
    font-weight: 800;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    z-index: 3;
    animation: showMorePulse 2.2s ease-in-out infinite;
  }

  #showMoreCollections:hover {
    transform: translateX(-50%) scale(1.05);
  }

  @keyframes showMorePulse {
    0%,
    100% {
      transform: translateX(-50%) scale(1);
    }
    50% {
      transform: translateX(-50%) scale(1.08);
    }
  }
}

/* Le formulaire global devient une colonne */
.newsletter-form {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre les deux blocs horizontalement */
    gap: 15px;           /* Espace entre les deux lignes */
    width: 100%;
    max-width: 500px;    /* Limite la largeur pour une meilleure lecture */
    margin: 0 auto;
}

/* Étage 1 : On garde l'email et le bouton côte à côte */
.newsletter-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
        padding-top: 10px;
}

.newsletter-input-group input {
    flex: 1; /* L'input prend tout l'espace restant */
}

/* Étage 2 : Alignement du texte de consentement */
.newsletter-legal-group {
    display: flex;
    align-items: flex-start; /* Aligne la case avec le haut du texte */
    gap: 10px;
    font-size: 0.85rem;
    color: var(--muted);     /* Utilise ta couleur de texte secondaire */
    text-align: left;

}

.newsletter-legal-group input {
    margin-top: 3px;         /* Petit ajustement visuel pour la case */
}

/* Cache les messages par défaut, le script les affichera en 'block' */
.sib-form-message-panel {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
    max-width: 550px;
}

/* Style quand c'est un succès */
#success-message {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

/* Style quand c'est une erreur */
#error-message {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

/* On s'assure que le bouton garde son style même si Brevo ajoute des classes */
.newsletter-form button.btn.primary {
    min-width: 150px;
    height: 50px;
    cursor: pointer;
}

.newsletter-form button.btn.primary:hover {
scale : 1.03;
}

/* Empêche Brevo d'afficher l'icône n'importe comment */
.sib-hide-loader-icon {
    display: none !important;
}

.btn.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Style des messages d'erreur/succès pour qu'ils soient lisibles sur le noir */
.sib-form-message-panel {
    margin: 20px auto;
    padding: 15px;
    border-radius: var(--radius);
    max-width: 500px;
    text-align: center;
}

#success-message { background: rgba(0, 255, 100, 0.1); color: #00ff64; border: 1px solid #00ff64; }
#error-message { background: rgba(255, 50, 50, 0.1); color: #ff3232; border: 1px solid #ff3232; }

/* On s'assure que le groupe reste en ligne (row) */
.newsletter-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: flex-start; /* Important pour aligner le bouton en haut si un message d'erreur apparait sous l'email */
    padding-top: 10px;
}

/* Le conteneur Brevo prend toute la place disponible */
.newsletter-input-group .form__entry {
    flex: 1;
    width: 100%;
}

/* L'input à l'intérieur prend 100% de son conteneur */
.newsletter-input-group input {
    width: 100%; /* Modification ici */
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: white;
    box-sizing: border-box; /* Pour que le padding ne dépasse pas */
}

/* Style de l'erreur spécifique sous l'email (optionnel) */
.entry__error {
    font-size: 0.8rem;
    color: #ff4949;
    margin-top: 5px;
    text-align: left;
    display: none; /* Le script le passera en block si erreur */
}

/* --- ANIMATIONS ET ERREURS FORMULAIRE --- */

/* Définition de la secousse */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Classe à ajouter en JS pour déclencher l'animation */
.shake-element {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* Style erreur pour l'email */
.input-error {
  border-color: #ff3333 !important;
  background-color: rgba(255, 0, 0, 0.15) !important; /* Rouge léger */
  color: #fff !important;
}

/* Style erreur pour la case à cocher (outline rouge) */
.checkbox-error {
  outline: 2px solid #ff3333;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Style erreur pour le label de la case à cocher */
.label-error {
  color: #ff3333 !important;
}


:root {
  --speed: 80s;
  /* 4 mots visibles = chaque mot fait 25% de la largeur de l'écran (25vw) */
  --word-width: 25vw; 
}

.josymot-container {
  width: 100%;
  overflow: hidden;
  padding: 0px 0;
}

.josymot-row {
  width: 100%;
  display: flex;
}

.josymot-track {
  display: flex;
  gap: 1.25rem;
   padding: 8px;
   width: max-content; /* Indispensable pour que la piste s'étende selon les mots */
  /* On ne définit pas de width fixe ici, le contenu va pousser les murs */

}
/*
.word {
  width: var(--word-width);
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  font-family: sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  
  padding: 0 10px; 
  box-sizing: border-box;

    background: linear-gradient(180deg, #0e0e0f, #070707);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .03);
    color:var(--accent);
    padding: 1.25rem;
}

@media (max-width: 700px) {
    .word {
        font-size: 0.8rem;
    }
}


.word:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 15px var(--accent)
    ;
    border-color: var(--accent)
}




.track-right {
  animation: scrollRight var(--speed) linear infinite;
}

@keyframes scrollRight {
  0% { transform: translateX(calc(-1 * (7 * var(--word-width)))); }
  100% { transform: translateX(0); }
}

.track-left {
  animation: scrollLeft var(--speed) linear infinite;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-1 * (7 * var(--word-width)))); }
}*/

.word {
    /* On supprime width: var(--word-width) */
    width: auto; 
    flex-shrink: 0; 
    white-space: nowrap;
    
    /* On ajuste le padding pour que le cadre respire autour du mot */
    padding: 14px 35px; 
   /* margin: 0 10px; /* Espace entre les cadres */
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(180deg, #0e0e0f, #070707);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .03);
    color: var(--accent);
    transition: transform 0.3s ease;
}


.word:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 15px var(--accent)
    ;
    border-color: var(--accent)
}

@media (max-width: 700px) {
    .word {
        font-size: 1.0rem;
         padding: 14px 18px; 
    }
}

/* --- NOUVELLES ANIMATIONS UNIVERSELLES --- */

@keyframes scrollLeft {
    0% { transform: translateX(0); }
    /* On se déplace de la moitié exacte de la largeur totale de la piste */
    100% { transform: translateX(-50%); } 
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* On applique les animations simplifiées */
.track-left {
    animation: scrollLeft 90s linear infinite;
}

.track-right {
    animation: scrollRight 90s linear infinite;
}

/* ===== STYLES JOSY-SCOPE QUIZ ===== */

#josy-scope-container {
  /* Style Josy-Scope SIMPLE.html */
  width: clamp(85vw, 90%, 480px);
  padding: clamp(16px, 3vh, 24px) clamp(14px, 3vh, 20px);
  text-align: center;
  border: 4px solid var(--josy-black);
  border-radius: var(--radius);
  box-shadow: 10px 10px 0px var(--josy-pink);
  background: white;
  position: relative;
min-height: 70vh;
  
  /* Flex sans scroll */
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
  margin-top: 100px;
  margin-bottom: 20px;
/*
  width: 100%;
    max-width: 480px;
    padding: 24px 20px;
    text-align: center;
    border: 4px solid var(--josy-black);
    border-radius: var(--radius);
    box-shadow: 10px 10px 0px var(--josy-pink);
    background: white;
    position: relative;*/
}


#josy-scope-container h1 {
  font-size: clamp(1.3rem, 4vh, 2.2rem);
  text-transform: uppercase;
  color: var(--accent);
  -webkit-text-stroke: 1.5px #111;
  margin: 0.5vh 0;
  line-height: 1;
  flex-shrink: 0;
}

#josy-scope-container p {
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  color: #333;
  font-size: clamp(0.7rem, 1.2vh, 0.85rem);
  margin: 0.1vh 0 !important;
  flex-shrink: 0;
  line-height: 1.3;
}

#josy-scope-container h2 {
  color: #333;
  font-size: clamp(1.2rem, 2vh, 1.4rem) !important;
  margin: 1vh 0 !important;
  min-height : 0px !important;
}

#start-screen,
#quiz-screen,
#loading-screen,
#result-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  gap: clamp(4px, 1vh, 12px);
  padding: 0;
  align-items: stretch;
}

#start-screen {
  justify-content: center;
  align-items: center;
  text-align: center;
}

#quiz-screen,
#result-screen {
  justify-content: flex-start;
  align-items: stretch;
}

.progress-bar {
  height: 1vh;
  background: #e0e0e0;
  border-radius: 10px;
  margin: 0.4vh 0;
  border: 2px solid #111;
  overflow: hidden;
  flex-shrink: 0;
}

#progress {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn_scope {
  display: block;
  width: 99%;
  height: 9vh;
  background: #111;
  color: white;
  border: 2px solid transparent;
  padding: clamp(0.6rem, 1vh, 1rem);
  margin: 1vh 0;
  border-radius: 18px;
  font-size: clamp(0.95rem, 1.5vh, 1.05rem);
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 4px 4px 0px var(--accent);
  flex-shrink: 0;
}

.btn_scope:active {
  transform: translate(2px, 2px);
}

.btn_scope:hover {
  border: 2px solid var(--accent);
  box-shadow: 4px 4px 0px var(--accent) !important;
}

#answer-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.4vh;
  width: 100%;
  justify-content: flex-start;
}

#recommendations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6vh;
  width: 100%;
  margin-top: 0.5vh;
  flex-shrink: 0;
}

.josy-mot-final {
  font-size: clamp(1rem, 3.5vh, 1.8rem);
  color: var(--accent);
  display: block;
  margin: 0.3vh 0;
  text-transform: uppercase;
  line-height: 1.1;
  flex-shrink: 0;
}

.combo-card {
  background: #f2f2f2;
  border: 3px solid #111;
  padding: clamp(6px, 0.8vh, 10px);
  border-radius: 12px;
  margin: 0;
  text-align: left;
  transition: transform 0.2s;
  cursor: pointer;
  font-size: clamp(0.6rem, 0.9vh, 0.75rem);
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 0.3vh;
}

.combo-card:hover {
  transform: translateY(-3px);
  box-shadow: 4px 4px 0px var(--accent);
}

.combo-card:active {
  transform: scale(0.98);
}

.product-title {
  color: #111;
  background: var(--accent);
  display: inline-block;
  padding: 1px 6px;
  font-size: clamp(0.6rem, 0.8vh, 0.7rem);
  margin-bottom: 4px;
  border-radius: 4px;
  font-weight: bold;
}

.color-swatch-display {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0.2vh 0;
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  font-size: clamp(0.6rem, 0.8vh, 0.7rem);
  color: #333;
  line-height: 1.2;
}

.circle {
  width: clamp(14px, 1.5vh, 16px);
  height: clamp(14px, 1.5vh, 16px);
  border-radius: 50%;
  border: 1.5px solid #111;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 35px;
  height: 35px;
  border: 4px solid #f2f2f2;
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 10px auto;
  flex-shrink: 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}