/* =============================================================
   Variables & Reset
   ============================================================= */
:root {
  --c-bg-header:  #1c1c1e;
  --c-chip-border:#a5a5a8;
  --c-chip-active:#e5e5e7;
  --c-footer-bg:  #fff;
  --c-footer-text:#000;
  --c-bg-body:    #d3d3d3; /*#f2f2f7;*/
}
html { scroll-padding-top: 56px; }
*,*::before,*::after { box-sizing: border-box; }
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--c-bg-body);
  text-align: center;
}

html, body {
  height: 100%;
  margin: 0;
}
body {
  /* pour forcer le calcul de 100vh même quand la barre d’URL apparaît/disparaît */
  height: 100vh;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

#page {
  /* ton wrapper principal : min-height pour couvrir tout l’écran */
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.overlay.age-gate,
.modal-overlay {
  /* colle ton overlay sur l’intégralité de la fenêtre, safe-areas iOS comprises */
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  width: 100%;
  height: 100%;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 2000;
}

/* === Désactive l’animation de pop/scale sur like et favorite === */
.action-btn.like,
.action-btn.favorite {
  animation: none !important;
  animation-name: none !important;
  transform: none !important;
}

/* Empêche aussi tout scale lors du press */
.action-btn.like:active,
.action-btn.favorite:active {
  animation: none !important;
  transform: none !important;
}

/* =============================================================
   Top Nav
   ============================================================= */
.top-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 56px;
  background: var(--c-bg-header);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 100;
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
}

.top-nav .logo {
  /* si tu veux centrer / aligner ton image au mÃƒÆ’Ã‚Âªme endroit que le texte avant */
  display: flex;
  align-items: center;
  margin-right: auto;
}

.top-nav .logo img {
  height: 32px;    /* ou la taille qui te convient */
  width: auto;
  object-fit: contain;
  /* tu peux jouer sur margin-right si tu veux un espacement avant le bouton Upgrade */
  margin-right: 12px;
}

.top-nav .search-form{
  flex: 1 1 0;          /* grandit et rÃ©trÃ©cit */
  width: auto;          /* plus de largeur fixe */
  max-width: none;      /* supprime la limite */
  min-width: 0;         /* Ã©vite les dÃ©bordements */
  margin-right: 16px;   /* petit espace avant les boutons de droite */
}

.logo span { font-weight: bold; }

.burger {
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 6px 0;
}

/* =============================================================
   Login Button - Version Mobile OptimisÃ©e
   ============================================================= */
.login-btn {
  background: #4b0082;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: bold;
  font-size: 1.0rem;
  transition: all 0.2s ease;
}

.login-btn:hover {
  background: #e6006b;
  transform: translateY(-1px);
}

.login-btn .login-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.login-btn .login-text {
  display: inline;
}

/* =============================================================
   Media Queries pour Mobile
   ============================================================= */
@media (max-width: 768px) {
  .login-btn {
    padding: 8px;
    min-width: 40px;
    justify-content: center;
    gap: 0;
  }
  
  .login-btn .login-icon {
    width: 20px;
    height: 20px;
  }
  
  /* Masquer le texte sur mobile */
  .login-btn .login-text {
    display: none;
  }
}

/* Styles pour trÃ¨s petits Ã©crans */
@media (max-width: 480px) {
  .login-btn {
    padding: 6px;
    min-width: 36px;
  }
  
  .login-btn .login-icon {
    width: 18px;
    height: 18px;
  }
}

/* Drawer (menu mobile) */
.drawer {
  position: fixed;
  top: 56px;
  right: -100%;
  width: 200px;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  transition: right .3s ease;
}

.drawer.open { right: 0; }

.drawer a {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 0;
}

/* =============================================================
   Titre & Filtres
   ============================================================= */
h1 {
  margin: calc(45px + 8px) 0 6px;  /* Supprime margin-left/right */
  padding: 8px 16px;               /* Garde le padding pour l'alignement */
  padding-left: 25px;
  font-size: 20px;
  font-weight: bold;
  text-align: left;
  color: #000;
}

/* =============================================================
   Conteneur du dropdown en ligne - CORRIGÃƒÆ’Ã¢â‚¬Â°
   ============================================================= */
.filter-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: -10px; /* Remonte encore le menu de 2px */
  margin-bottom: 4px; /* Petit espacement avant la grille */
}

.filter-dropdown-container {
  flex-shrink: 0;
  padding: 2px 8px 0 16px; /* RÃ©duit padding-top Ã  2px */
  margin-bottom: 0;
  margin-right: 0;
  display: flex;
  justify-content: flex-start;
}

/* =============================================================
   Chips scrollables - CORRIGÃƒÆ’Ã¢â‚¬Â°
   ============================================================= */
.filter-bar {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 2px 8px 0 0; /* RÃ©duit padding-top et bottom */
  flex: 1;
  scroll-snap-type: x proximity;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.chip {
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  border: none;              /* plus de bordure dans l'ÃƒÆ’Ã‚Â©tat normal */
  border-radius: 26px;
  padding: 6px 20px;
  background: #e5e5e7;       /* gris clair pour non-sÃƒÆ’Ã‚Â©lectionnÃƒÆ’Ã‚Â© */
  color: #3a3a3c;            /* texte sombre */
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}

.chip.active {
  background: #fff;          /* blanc pour sÃƒÆ’Ã‚Â©lectionnÃƒÆ’Ã‚Â© */
  color: #3a3a3c;            /* mÃƒÆ’Ã‚Âªme texte sombre */
  border: 1px solid #a5a5a8; /* bordure grise */
}

.chip:hover,
.chip:focus {
  box-shadow: 0 0 2px rgb(0 0 0 / .3);
}

/* =============================================================
   Grille des vignettes
   ============================================================= */
.grid {
 display: grid;
 grid-template-columns: repeat(2, 1fr);
 gap: 14px;
 padding: 20px;
 padding-top: 80px; /* Espace pour le header */
}

/* Container identique à index.html */
.thumb {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-height: 200px;
  background: #fff;                   /* #fff au lieu de #f0f0f0 */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);  /* ajoute l’ombre si tu l’avais */
}

/* Image elle-même : coins arrondis en haut, pas d’opacité à 0 */
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  border-top-left-radius: 12px;     /* coins du haut */
  border-top-right-radius: 12px;
  border-bottom-left-radius: 0;     /* pas de rayon en bas */
  border-bottom-right-radius: 0;
  opacity: 1;                       /* visible tout de suite */
  transition: none;                 /* ou reproduis exactement la transition d’index si tu en as */
}


.thumb img:hover { transform: scale(1.02); }
.thumb img[src]  { opacity: 1; }

#sentinel { height: 1px; }

/* =============================================================
   Overlay 18+
   ============================================================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / .8);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.hidden { display: none; }

#page.blurred {
  filter: blur(10px);
  pointer-events: none;
}

#page.modal-blur {
  filter: blur(10px);
  transition: filter 0.3s ease;
}

/* =============================================================
   Footer navigation
   ============================================================= */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--c-footer-bg);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  border-top: 1px solid #ddd;
}

.footer-nav button {
  background: none;
  border: none;
  color: var(--c-footer-text);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}

.footer-nav button svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.icon-wrapper {
  position: relative;
  display: inline-block;
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e11b1b;
  color: #fff;
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 10px;
  line-height: 1;
}

/* =============================================================
   Media-queries
   ============================================================= */
@media (max-width: 480px) {
  .age-gate .overlay-content {
    width: 90%;
    padding: 24px 16px;
  }

  .popup-logo {
    width: 200px; /* RÃƒÆ’Ã‚Â©duit la taille du logo sur mobile */
  }

  .age-gate .overlay-content h2 {
    font-size: 4rem; /* RÃƒÆ’Ã‚Â©duit l'emoji ÃƒÂ°Ã…Â¸Ã¢â‚¬ÂÃ…Â¾ sur mobile */
    margin-top: -10px;
    margin-bottom: -10px;
  }

  .btn-rect {
    width: 100%; /* Boutons full largeur sur mobile */
    max-width: 300px; /* Limite pour rester propre */
  }

  .age-gate .overlay-content .warning {
    font-size: 0.9rem;
  }

  .age-gate .overlay-content .description {
    font-size: 0.7rem;
  }
}

/* =============================================================
   Age-gate : fond illustrÃƒÆ’Ã‚Â© + glass-morphism
   ============================================================= */
.age-gate {
  color: #fff;
  text-align: center;
}

.age-gate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('./assets/age-bg.jpg') center / cover no-repeat fixed;
  filter: brightness(.45) blur(2px);
  z-index: -1;
  animation: gateZoom 30s linear infinite alternate;
}

@keyframes gateZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}

.age-gate .overlay-content {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px) saturate(130%);
  padding: 32px 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 6px 40px rgb(0 0 0 / 0.4);
  width: 400px; /* largeur fixe */
  max-width: 90%;
}

.age-gate .overlay-content h2 {
  margin-top: -20px;
   margin-bottom: -20px;
  font-size: 8rem;
  font-weight: bold;
}

.age-gate .overlay-content .warning {
  color: white;
  font-weight: bold;
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.4;
}

.age-gate .overlay-content .description {
  color: #ddd;
  margin-bottom: 24px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.age-gate .overlay-content .buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.btn-rect {
  padding: 14px 0;
  width: 200px;
  font-size: 1rem;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-rect:hover,
.btn-rect:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.35);
}

.btn-rect.white {
  background: #fff;
  color: #000;
}

.btn-rect.transparent {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.popup-logo {
  width: 300px;
  margin-bottom: 10px;
}

/* =============================================================
   Style bouton dropdown
   ============================================================= */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  min-width: auto;
  white-space: nowrap;
  background: #fff !important;
  color: #3a3a3c !important;
  border: 1px solid #a5a5a8 !important;
}

.dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  border-radius: 8px;
  padding: 4px 0;
  list-style: none;
  min-width: 120px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.2);
  z-index: 20;
}

.dropdown-menu li {
  padding: 8px 16px;
  cursor: pointer;
}

.dropdown-menu li:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu li.active::before {
  content: 'âœ” ';
}

.hidden {
  display: none !important;
}


/* =============================================================
   Style gradient Shift
   ============================================================= */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.upgrade-btn {
  /* dÃƒÆ’Ã‚Â©gradÃƒÆ’Ã‚Â© rose ÃƒÂ¢Ã¢â‚¬ Ã¢â‚¬Â blanc animÃƒÆ’Ã‚Â© */
  background: linear-gradient(
    270deg,
    #ff007f,
    #ffffff,
    #ff007f
  );
  background-size: 600% 600%;
  animation: gradientShift 5s ease infinite;
  
  /* clipper le dÃƒÆ’Ã‚Â©gradÃƒÆ’Ã‚Â© dans le texte */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
          background-clip: text;
                  color: transparent;
  
  /* zone cliquable invisible */
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.3rem;
  cursor: pointer;
  margin-left: auto;
  margin-right: 5px;
  white-space: nowrap;
}

.upgrade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


/* =============================================================
   Barre de recherche dark
   ============================================================= */


/* =============================================================
   Barre de recherche dark
   ============================================================= */

/* Wrapper du form */
.search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);  /* fond clair semi-transparent */
  padding: 6px 12px;                      /* hauteur ÃƒÂ¢Ã¢â‚¬Â°Ã†â€™ 36px */
  border-radius: 8px;                     /* coins arrondis */
  width: 260px;                           /* largeur fixe, adapte si besoin */
  max-width: 100%;                        /* responsive */

  /* ÃƒÂ¢Ã¢â‚¬ Ã‚Â Collage ÃƒÆ’  gauche */
  margin-left: 0;
  /* ÃƒÂ¢Ã¢â‚¬ Ã‚Â Prend tout lÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢espace vide ÃƒÆ’  droite */
  margin-right: auto;

  transition: box-shadow 0.2s ease;
}

/* Input texte */
.search-form .search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1rem;
}

/* Placeholder gris clair */
.search-form .search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Bouton icÃƒÆ’Ã‚Â´ne */
.search-form .search-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 8px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
}

/* IcÃƒÆ’Ã‚Â´ne loupe (taille) */
.search-form .search-icon {
  width: 20px;
  height: 20px;
}

/* Focus state (blue outline) */
.search-form:focus-within {
  box-shadow: 0 0 0 2px #4c8cff;  /* contour bleu au focus */
}

@media (max-width: 480px) {
  .search-form {
    display: none;
  }
}




/* =============================================================
  odal Overlay
   ============================================================= */


/* Modal Overlay */
/* 1. On rend lâ€™overlay transparent, pour que le ::before soit visible */
.modal-overlay {
  background: transparent !important;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

/* 2. On ajoute le ::before pour lâ€™effet Â« frosted glass Â» sombre */
.modal-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  /* mÃªme teinte sombre que ton age-gate */
  background: rgba(0, 0, 0, 0.45);
  /* flou et assombrissement identiques */
  backdrop-filter: blur(8px) brightness(0.45) saturate(130%);
  -webkit-backdrop-filter: blur(8px) brightness(0.45) saturate(130%);
  z-index: -1;
}

/* 3. Quand on active lâ€™overlay, on le rend visible */
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}


.modal-content {
    background: #2c2c2e;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    color: white;
}

.modal-overlay .modal-content {
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(8px) saturate(130%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.4) !important;
}

/* =============================================================
   SUITE DU MODAL + STYLES MANQUANTS - Ã€ AJOUTER Ã€ LA FIN
   ============================================================= */

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-icon {
  background: none !important;    /* plus de fond dÃ©gradÃ© */
  border-radius: 0 !important;    /* plus de rond */
  padding: 20px 0 0 !important;         /* annule tout padding */
}

/* 2) Fixe la taille de ton logo */
.modal-icon img {
  display: block;
  margin: 0 auto;                 /* bien centrer */
  width: 150px;                   /* <-- ajuste cette valeur */
  height: auto;                   /* pour garder les proportions */
}
/* 2) Fixe la taille de ton logo */
.modal-icon img {
  display: block;
  margin: 0 auto;                 /* bien centrer */
  width: 350px;                   /* <-- ajuste cette valeur */
  height: auto;                   /* pour garder les proportions */
}

/* Subtitle */
.modal-subtitle {
    font-size: 16px;
    color: #fff !important;
    margin-bottom: 30px;
    line-height: 1.4;
}

/* Google Sign In Button */
.google-signin-btn {
    width: 100%;
    background: #fff;
    color: #333;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.google-signin-btn:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Google Icon */
.google-icon {
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIyLjU2IDEyLjI1QzIyLjU2IDExLjQ3IDIyLjQ5IDEwLjcyIDIyLjM2IDEwSDEyVjE0LjI2SDE3LjkyQzE3LjY2IDE1LjYgMTYuOTIgMTYuNzYgMTUuODYgMTcuNDVWMjAuMDNIMTkuMzVDMjEuMzMgMTguMiAyMi41NiAxNS40NCAyMi41NiAxMi4yNVoiIGZpbGw9IiM0Mjg1RjQiLz4KPHBhdGggZD0iTTEyIDIyQzE0LjkgMjIgMTcuMzggMjEuMDEgMTkuMzUgMjAuMDNMMTUuODYgMTcuNDVDMTQuODUgMTguMDkgMTMuNTQgMTguNSAxMiAxOC41QzguOTggMTguNSA2LjQ0IDE2Ljg1IDUuNTQgMTQuNTVIMi4wNFYxNy4xN0M0LjA1IDIxLjE4IDcuNzUgMjQgMTIgMjRaIiBmaWxsPSIjMzRBODUzIi8+CjxwYXRoIGQ9Ik01LjU0IDE0LjU1QzUuMzEgMTMuOTEgNS4xOCAxMy4yMyA1LjE4IDEyLjVDNS4xOCAxMS43NyA1LjMxIDExLjA5IDUuNTQgMTAuNDVWNy44M0gyLjA0QzEuMzYgOS4xNyAxIDEwLjc4IDEgMTIuNUMxIDE0LjIyIDEuMzYgMTUuODMgMi4wNCAxNy4xN0w1LjU0IDE0LjU1WiIgZmlsbD0iI0ZCQkMwNCIvPgo8cGF0aCBkPSJNMTIgNS41QzEzLjY2IDUuNSAxNS4xNiA2LjEyIDE2LjMgNy4yMkwxOS4zNiA0LjE2QzE3LjMzIDIuMjQgMTQuOCAxIDEyIDFDNy43NSAxIDQuMDUgMy44MiAyLjA0IDcuODNMNS41NCAxMC40NUM2LjQ0IDguMTUgOC45OCA2LjUgMTIgNi41WiIgZmlsbD0iI0VBNDMzNSIvPgo8L3N2Zz4K') no-repeat center;
    background-size: contain;
}

/* Apple Button */
.apple-signin-btn {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apple-signin-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Terms */
.terms {
    font-size: 12px;
    color: #fff !important;
    margin-top: 20px;
    line-height: 1.4;
}

.terms a {
    color: #ff007f;
    text-decoration: none;
}

.terms a:hover {
    text-decoration: underline;
}

/* =============================================================
   Gem Page (pour gem.html)
   ============================================================= */
.gem-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 20px 100px;
}

.page-title-large {
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
  color: #fff;
}

/* Toggle Bar */
.toggle-bar {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
  margin: 0 auto 40px;
  width: fit-content;
}

.toggle-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.toggle-btn.active {
  background: #fff;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Packages Grid */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.package-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.package-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.package-card .price {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #ff007f;
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
}

.package-card img {
  width: 80px;
  height: 80px;
  margin: 20px auto;
  display: block;
  border-radius: 12px;
}

.package-card h2 {
  font-size: 24px;
  font-weight: bold;
  margin: 16px 0 8px;
  color: #fff;
}

.package-card p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.4;
}

.package-card .bonus {
  color: #4ade80;
  font-weight: bold;
  font-size: 12px;
}

/* =============================================================
   Auth Section (Login/Register)
   ============================================================= */
.auth {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 30px;
  margin: 20px auto;
  max-width: 400px;
  text-align: center;
}

.auth.hidden {
  display: none;
}

.btn {
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn.google {
  background: #fff;
  color: #333;
}

.btn.google:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn.apple {
  background: #000;
  color: #fff;
}

.btn.apple:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =============================================================
   Gallery Section
   ============================================================= */
.gallery {
  /* top | right | bottom | left */
  padding: 4rem 10px 50px 10px;
}


.grid {
  display: grid;
  gap: 5px;
  padding: 5px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
    margin: 0 auto;
  }
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =============================================================
   Burger Menu Animation
   ============================================================= */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* =============================================================
   Modal Responsive
   ============================================================= */
@media (max-width: 480px) {
    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-subtitle {
        font-size: 14px;
    }
    
    .google-signin-btn,
    .apple-signin-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* =============================================================
   Compteur de Tokens (remplace le bouton Upgrade)
   ============================================================= */

.token-counter {
  position: relative;               /* for an absoluteâ€position option below */
  display: flex;
  align-items: center;
  
  /* squeeze padding so the icons sit right on the border */
  padding: 8px 0;
  /* but reserve space so the number never overlaps the icons */
  padding-left: 32px;  
  padding-right: 32px;
  
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: auto;
  margin-right: 5px;
  white-space: nowrap;
  min-width: 120px;
  
  /* weâ€™ll absolutelyâ€position the icons */
  justify-content: center;  
}

/* absolutelyâ€place the icons flush to the left/right */
.token-counter .gem-icon {
  position: absolute;
   left: -15px; 
  top: 50%;
  transform: translate(0, -50%);
  width: 30px;
  height: 30px;
}

.token-counter .plus-icon {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translate(0, -50%);
  width: 30px;
  height: 30px;
  
  /* if you still want the purple circle behind a â€œ+â€ text */
/* 
   background: #ff007f;
    border-radius: 50%; */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.token-counter .token-amount {
  /* no extra margins neededâ€”the flex centering handles it */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* rest of your hover, animation and mediaâ€queries stay the same */
.token-counter:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.token-counter.updating .token-amount {
  animation: tokenUpdate 0.3s ease-in-out;
}

@keyframes tokenUpdate {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); color: #4ade80; }
  100% { transform: scale(1); }
}

@media (max-width: 480px) {
  .token-counter {
    font-size: 16px;
    padding-left: 28px;
    padding-right: 28px;
    min-width: 100px;
  }
  .token-counter .gem-icon {
    width: 30px;
    height: 30px;
  }
  .token-counter .plus-icon {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}



/* Message pages for Allopass */
.message-page {
  min-height: 100vh;
  background: var(--c-bg-body);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}
.message-page h1 { margin-bottom: 20px; }
.message-page a { color: #333; text-decoration: underline; }

.sms-payment {
  margin-top: 40px;
  text-align: center;
}
.sms-payment input {
  padding: 10px;
  border-radius: 8px;
  border: none;
  margin-right: 10px;
}
.sms-message { margin-top: 10px; }

/* =============================================================
   STYLES SUPPLÃ‰MENTAIRES POUR LES GIFS, VIDÃ‰OS ET LOADING CORRIGÃ‰S
   Ajoutez ceci Ã  la fin de votre styles-4.css
   ============================================================= */

/* Styles spÃ©cifiques pour les GIFs */
.thumb img[data-type="gif"] {
  border: 2px solid #ff007f;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
  position: relative;
}

/* Badge GIF pour identifier visuellement */
.thumb img[data-type="gif"]::after {
  content: 'GIF';
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff007f;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  z-index: 2;
}

/* âœ… NOUVEAUX STYLES POUR LES VIDÃ‰OS */
.thumb[data-type="video"] {
  border: 2px solid #4CAF50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
  position: relative;
}


/* Styles pour les Ã©lÃ©ments vidÃ©o dans les thumbs */
.thumb video {
  transition: opacity 0.3s ease;
  opacity: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
}

.thumb.loaded video,
.thumb video[src] {
  opacity: 1;
}

/* Masquer les images en erreur */
.thumb.error {
  display: none;
}

/* Animation de chargement pour toutes les images et vidÃ©os */
.thumb img {
  transition: opacity 0.3s ease;
  opacity: 0;
}

.thumb img.loaded,
.thumb img[src] {
  opacity: 1;
}

/* Base des thumbs */
.thumb {
  position: relative;
}

/* âœ… CORRECTIF PRINCIPAL : Spinner seulement si .loading */
.thumb.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #ff007f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
  display: block;
}

/* âœ… CRUCIAL : Masquer le spinner quand PAS loading */
.thumb:not(.loading)::before {
  display: none !important;
  content: none !important;
}

/* Animation du spinner */
@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Style pour les images qui Ã©chouent au chargement */
.thumb.error::before {
  content: 'âŒ Erreur';
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  width: 80px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  color: #ff4444;
  border: 2px solid #ff4444;
  border-radius: 8px;
  animation: none;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: Arial, sans-serif;
  font-weight: bold;
}

/* AmÃ©lioration de l'affichage des GIFs sur mobile */
@media (max-width: 768px) {
  .thumb img[data-type="gif"] {
    border-width: 1px;
    box-shadow: 0 0 5px rgba(255, 0, 127, 0.2);
  }
  
  .thumb img[data-type="gif"]::after {
    font-size: 8px;
    padding: 1px 4px;
    top: 4px;
    right: 4px;
  }
  
  /* AmÃ©lioration de l'affichage des VIDÃ‰OS sur mobile */
  .thumb[data-type="video"] {
    border-width: 1px;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.2);
  }
  
  
  /* Spinner plus petit sur mobile */
  .thumb.loading::before {
    width: 25px;
    height: 25px;
    border-width: 2px;
  }
  
  /* Message d'erreur plus petit sur mobile */
  .thumb.error::before {
    width: 60px;
    height: 30px;
    font-size: 10px;
  }
}

/* Animation au hover pour les GIFs */
.thumb img[data-type="gif"]:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

/* Animation au hover pour les VIDÃ‰OS */
.thumb[data-type="video"]:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.thumb video:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

/* Hover effect gÃ©nÃ©ral pour les thumbs */
.thumb:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Style pour le diagnostic des erreurs en console */
.debug-overlay {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 12px;
  z-index: 9999;
  max-width: 300px;
}

/* Performance : Optimisation du rendu des images et vidÃ©os */
.thumb img,
.thumb video {
  image-rendering: auto;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: opacity;
}

/* Ã‰tat de chargement rÃ©ussi */
.thumb.loaded {
  /* Animation subtile de succÃ¨s */
}

.thumb.loaded img,
.thumb.loaded video {
  opacity: 1;
}

/* AmÃ©lioration pour les trÃ¨s petits Ã©crans */
@media (max-width: 480px) {
  .thumb.loading::before {
    width: 20px;
    height: 20px;
    border-width: 2px;
  }
  
  .thumb.error::before {
    width: 50px;
    height: 25px;
    font-size: 9px;
  }
  
  .thumb img[data-type="gif"]::after {
    font-size: 7px;
    padding: 1px 3px;
    top: 2px;
    right: 2px;
  }
  
}

/* Transition douce pour tous les Ã©tats */
.thumb {
  transition: all 0.2s ease;
}

/* Assurer que les GIFs gardent leur aspect ratio */
.thumb img[data-type="gif"] {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Assurer que les VIDÃ‰OS gardent leur aspect ratio */
.thumb video {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Style pour indiquer qu'une image/vidÃ©o est cliquable */
.thumb {
  cursor: pointer;
}

.thumb:active {
  transform: scale(0.98);
}

/* âœ… STYLES POUR LA PAGE DÃ‰TAIL (detail.html) */

/* Style pour la vidÃ©o principale dans detail.html */
video.main-image {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Style pour les contrÃ´les vidÃ©o */
video.main-image::-webkit-media-controls-panel {
  background-color: rgba(0, 0, 0, 0.8);
}

video.main-image::-webkit-media-controls-play-button,
video.main-image::-webkit-media-controls-pause-button {
  background-color: #4CAF50;
  border-radius: 50%;
}

/* Responsive pour la vidÃ©o principale */
@media (max-width: 768px) {
  video.main-image {
    border-radius: 8px;
  }
}

/* âœ… STYLES POUR DIFFÃ‰RENCIER LES TYPES DE MÃ‰DIA */

/* Badge spÃ©cifique par type */
.thumb[data-type="gif"] img[data-type="gif"]::after {
  background: linear-gradient(45deg, #ff007f, #ff69b4);
  animation: pulse 2s infinite;
}

.thumb[data-type="video"]::after {
  background: linear-gradient(45deg, #4CAF50, #8BC34A);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Effet de focus pour l'accessibilitÃ© */
.thumb:focus {
  outline: 2px solid #4CAF50;
  outline-offset: 2px;
}

/* AmÃ©lioration du contraste pour les badges */
.thumb img[data-type="gif"]::after,
.thumb[data-type="video"]::after {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 900;
}

/* Optimisation pour les Ã©crans haute rÃ©solution */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .thumb img,
  .thumb video {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark mode support (optionnel) */
@media (prefers-color-scheme: dark) {
  .thumb.error::before {
    background: rgba(50, 50, 50, 0.95);
    color: #ff6b6b;
    border-color: #ff6b6b;
  }
  
  .debug-overlay {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #444;
  }
}


/* ——— Menu flottant bas de page ——— */
.bottom-nav {
  position: fixed;
  bottom: 5px;               /* écart depuis le bas */
  left: 50%;                  /* centré horizontal */
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border-radius: 50px;
  padding: 8px 24px;
  display: flex;
  gap: 40px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bottom-nav .nav-item {
  position: relative;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bottom-nav .nav-item img {
  display: block;
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

/* Badge de notification */
.bottom-nav .nav-item--badge .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e53935;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
}


/* =============================================================
   Panel de génération (glisse depuis le bas, masquage/affichage)
   ============================================================= */
textarea,
input,
button {
  font-size: 16px; /* empêche le zoom mobile */
}

/* Panel Génération calé au-dessus du clavier */
.generate-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: env(keyboard-inset-height, 0px);
  bottom: constant(keyboard-inset-height, 0px);

  /* On rajoute une marge horizontale pour ne pas coller */
  margin: 0 12px 0 12px;    /* 12px à gauche et à droite */

  background: rgba(0, 0, 0, 0.85);

  /* padding : haut 16px, côtés 24px, bas 48px */
  padding: 16px 24px 48px;

  /* arrondir tous les coins */
  border-radius: 16px;

  /* animation d’apparition */
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1005;
}

.generate-panel.open {
  transform: translateY(0);
}

.generate-panel.hidden {
  display: none !important;
}

/* Croix de fermeture */
.close-panel {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1006;
}

/* Sliders alignés sur une ligne */
.panel-sliders {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-slider {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.panel-slider .lora-label {
  color: #fff;
  text-align: center;
  margin-bottom: 4px;
}
.panel-slider input {
  width: 100%;
}

/* Textarea stylée */
#inputAreaPanel {
  width: 100%;
  margin-bottom: 16px;
  resize: vertical;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 8px;  /* arrondi interne */
  padding: 12px;
  font-size: 16px;
  line-height: 1.4;
}

/* Bouton Générer arrondi */
.generate-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  background: #4b0082;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

/* Zoom de l’icône "Generate" quand actif */
.bottom-nav .nav-item[href="#generate"].active img {
  transform: scale(1.3);
  transition: transform 0.3s ease;
}

/* Optionnel : limiter la largeur du panel sur grands écrans */
@media (min-width: 480px) {
  .generate-panel {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}


/* ===== Boîte d’actions sous chaque image ===== */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;        /* ↓ padding plus petit */
  background: #000;         /* même background que votre inline */
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}
.action-bar button,
.action-bar .view-count {
  padding: 4px 8px;         /* ↓ padding interne réduit */
  font-size: 10px;          /* ↓ texte plus petit */
  border-radius: 8px;       /* coins plus petits */
  min-width: 0;             /* pas de largeur minimale */
}
.action-bar button {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  gap: 4px;
}
.action-bar .view-count {
  display: flex;
  align-items: center;
}

#gallery > div > div:nth-child(2) {
  display: none !important;
}

.overlay-prompt-btn {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 6px 12px;       /* ↑ plus d’espace interne */
  font-size: 12px;         /* ↑ texte plus grand */
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  z-index: 5;
}

/* 🔄 ÉTATS DE CHARGEMENT ET D'ERREUR */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4b0082;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.loading-text {
  color: #666;
  font-size: 16px;
  margin: 0;
  font-weight: 500;
}

.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #666;
}

.empty-state p,
.error-state p {
  margin: 8px 0;
}

.empty-state p:first-of-type {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

.error-state {
  color: #dc3545;
}

.error-state p:first-of-type {
  font-size: 18px;
  font-weight: 500;
  color: #dc3545;
}

/* Bouton de retry avec hover */
.error-state button:hover {
  background: #6a1b9a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(75, 0, 130, 0.3);
}

/* Animation fade-in pour les images chargées */
.grid > div {
  animation: fadeInUp 0.3s ease-out;
}

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

/* Loading state pour les boutons de génération */
.generating .loading-spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #4b0082;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

