/* ====== global.css ====== */

/* header.ejs */
/* title-logo CSP-friendly – dans le header */
header .title-logo {
  font-family: "Bangers", system-ui, sans-serif;
  font-weight: 700;
  color: #C2185B;
  text-align: center;
  margin: 0;
    display:inline-block;        /* ou inline-flex */
  white-space:nowrap;          /* interdit le retour à la ligne */
  font-size:clamp(1rem, 5vw, 1rem); /* s’adapte à la largeur */
  margin:0 auto;               /* centre si besoin */
}

.header .counter-text {
color: #fff; 
font-family: 'Bangers', system-ui; 
font-style:italic; 
font-weight:700; 
font-size:clamp(1rem, 2vw + .5rem, 1.5rem);
}


.vibes-switcher img {
  transition: transform .2s;
}
.vibes-switcher img:hover {
  transform: rotate(90deg);
}

.right-content .vibes-switcher img { 
    transition: transform .2s; 
}
.right-content .vibes-switcher img:hover { 
    transform: rotate(90deg); 
}

.cursor-pointer {
  cursor: pointer;
}
.vibes-counter {
  font-style: italic;
  font-size: 1rem;
}

/* menubar.ejs */
.icon-15 { font-size: 1.5em; }
.icon-14 { font-size: 1.4em; }

.offcanvas-top-layer { z-index: 1060 !important; }
.text-white           { color: #fff !important; }

.back-btn.d-none {
  display: none !important;
}

.avatar-rose {
  background: #C2185B !important;
}

/* ==================  NOTIFICATION TOAST  ================== */
.toast-container {
  position: fixed;
  bottom: calc(4rem + 8px);   /* hauteur menubar + marge */
  left: 50%;
  transform: translateX(-50%);
  z-index: 1090;              /* au-dessus de la menubar (z-index 1080) */
}

/* ===== OFFCANVAS OPTIONS CHAT ===== */
#offcanvasChatOptions .offcanvas-header {
  border-bottom: 1px solid rgba(255, 80, 162, 0.1);
}

#offcanvasChatOptions .offcanvas-body > p {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.85rem;
  font-weight: 300;
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* Groupe de boutons radio */
#offcanvasChatOptions .btn-group {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-radius: 30px;
  overflow: hidden;
}

#offcanvasChatOptions .btn-group label {
  border: none;
  padding: 12px 20px;
  margin: 0;
}

#offcanvasChatOptions .btn-group label:first-child {
  border-radius: 30px 0 0 30px;
}

#offcanvasChatOptions .btn-group label:last-child {
  border-radius: 0 30px 30px 0;
}


/* ===== Tchat List CSP-friendly - Styles de base ===== */
/* ============================================
   MODALS - Style Discovery Coherent
   ============================================ */

.action-modal .modal-dialog {
  max-width: 340px;
  margin: 1.5rem auto;
}

.action-modal .modal-content {
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid rgba(255, 80, 162, 0.15);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
              0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
  position: relative;
}

/* Effet de glow subtil en haut */
.action-modal .modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 80, 162, 0.3), transparent);
}

.action-modal .modal-body {
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Titre style Source Serif 4 italic */
.modal-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  font-style: italic;
  color: #fff;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

/* Sous-titre */
.modal-subtitle {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 28px 0;
}

/* ============================================
   BOUTONS
   ============================================ */

.action-btn {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 16px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.action-btn:last-of-type {
  margin-bottom: 0;
  margin-top: 8px;
}

.action-btn:active {
  transform: scale(0.98);
}

/* --- Danger (Rouge/Rose vif) --- */
.action-btn--danger {
  background: transparent;
  border: 1px solid rgba(255, 80, 162, 0.4);
  color: #C2185B;
}

.action-btn--danger:hover {
  background: rgba(255, 80, 162, 0.1);
  border-color: #C2185B;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 80, 162, 0.15);
}

/* --- Danger Outline --- */
.action-btn--danger-outline {
  background: transparent;
  border: 1px solid rgba(255, 80, 162, 0.4);
  color: #C2185B;
}

.action-btn--danger-outline:hover {
  background: rgba(255, 80, 162, 0.1);
  border-color: #C2185B;
}
/* --- Primary (Rose Vibes) --- */
.action-btn--primary {
  background: linear-gradient(135deg, #C2185B 0%, #AD1457 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 80, 162, 0.25);
}

.action-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 80, 162, 0.35);
}

/* --- Warning (Orange) --- */
.action-btn--warning {
  background: transparent;
  border: 1px solid rgba(255, 80, 162, 0.4);
  color: #C2185B;
}

.action-btn--warning:hover {
  background: rgba(255, 80, 162, 0.1);
  border-color: #C2185B;
}

/* --- Cancel (Gris subtle) --- */
.action-btn--cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}

.action-btn--cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

/* Séparateur avant Annuler */
.action-btn--cancel::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* ============================================
   ANIMATIONS
   ============================================ */

.action-modal.fade .modal-dialog {
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-modal.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Backdrop sombre avec blur */
.action-modal + .modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

/* ============================================
   ÉTATS SPÉCIAUX
   ============================================ */

.action-btn:focus-visible {
  outline: 2px solid #C2185B;
  outline-offset: 2px;
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* Effet de pulse sur le bouton primary au focus */
.action-btn--primary:focus {
  animation: btn-pulse 2s ease-in-out infinite;
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 80, 162, 0.25); }
  50% { box-shadow: 0 4px 30px rgba(255, 80, 162, 0.4); }
}


/* ========== MENUBAR DROP - Élégante ========== */
.menubar-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f0310;
  z-index: 999;
}

/* Double barre de séparation élégante */
.menubar-separator {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.separator-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  width: 100%;
}

.separator-line.accent {
  height: 1px;
  background: rgba(255, 80, 162, 0.3);
  width: 60%;
  margin: 0 auto;
}

/* Navigation */
.menubar-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 20px 24px;
  background: #0f0310;
}

/* Lien de navigation */
.menubar-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

/* Icônes de la menubar – grisées par défaut, taille responsive */
.drop-menubar-icon {
  width: clamp(28px, 8vw, 48px);   /* min 28px, idéal 8% de la largeur écran, max 48px */
  height: clamp(28px, 8vw, 48px);
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s ease;
}

/* Lettre principale (MENUBAR CLASSIQUE) */
.nav-letter {
  font-family: 'Quicksand', sans-serif;      /* ← modifié */
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1;
  transition: all 0.3s ease;
}

/* Label qui apparaît au hover/actif */
.nav-label {
  font-family: 'Quicksand', sans-serif;      /* ← modifié */
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s ease;
  margin-top: 2px;
}

/* ========== DROP MENUBAR - Lettres Icones ========== */
.drop-menubar-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f0310;
  z-index: 999;
}

/* ===== MODE NORMAL : D R O P ===== */
.drop-menubar-separator {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
}

.drop-menubar-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  width: 100%;
}

.drop-menubar-line.drop-menubar-accent {
  background: rgba(255, 80, 162, 0.15);
  width: 40%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.drop-menubar-line.drop-menubar-accent::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 100%;
  background: rgba(255, 80, 162, 0.6);
  box-shadow: 0 0 20px rgba(255, 80, 162, 0.8);
  animation: pulseBeam 2s ease-in-out infinite;
  filter: blur(4px);
}

@keyframes pulseBeam {
  0%, 100% {
    width: 0;
    opacity: 0;
  }
  50% {
    width: 100%;
    opacity: 1;
  }
}

.drop-menubar-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 16px 20px 28px;
}

.drop-menubar-link {
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

/* Lettre principale (DROP) */
.drop-menubar-letter {
  font-family: 'Quicksand', sans-serif;      /* ← modifié */
  font-size: 3rem;                           /* ajustez à votre goût */
  font-weight: 700;                          /* max pour Quicksand */
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.2;
  transition: all 0.3s ease;
  display: block;
}

/* État actif */
.drop-menubar-link.drop-menubar-active .drop-menubar-letter {
  color: #C2185B;
  transform: scale(1.15);
  text-shadow: 0 0 30px rgba(255, 80, 162, 0.6);
}

/* Hover */
.drop-menubar-link:hover .drop-menubar-letter {
  color: rgba(255, 80, 162, 0.7);
}

/* Point indicateur sous l'actif */
.drop-menubar-link.drop-menubar-active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: #C2185B;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 80, 162, 0.8);
}


/* Très petits écrans (320px et moins) */
@media (max-width: 320px) {
  .drop-menubar-icon {
    width: 24px;
    height: 24px;
  }
}

/* Petits mobiles (321px - 374px) */
@media (min-width: 321px) and (max-width: 374px) {
  .drop-menubar-icon {
    width: 28px;
    height: 28px;
  }
}

/* Mobiles moyens (375px - 413px) */
@media (min-width: 375px) and (max-width: 413px) {
  .drop-menubar-icon {
    width: 32px;
    height: 32px;
  }
}

/* Grands mobiles (414px - 480px) */
@media (min-width: 414px) and (max-width: 480px) {
  .drop-menubar-icon {
    width: 36px;
    height: 36px;
  }
}

/* Tablettes et plus (481px et plus) */
@media (min-width: 481px) {
  .drop-menubar-icon {
    width: 48px;
    height: 48px;
  }
}

/* ===== MODE EXPANDED : Discovery ===== */
/* (ces règles écrasent parfois les précédentes, on les supprime pour éviter la confusion) */

.mt-32 {
  margin-top: 32px;
}

/* ──── Offcanvas Installer l'app (thème sombre façon Discovery) ──── */
#installAppCanvas {
  border-radius: 24px 24px 0 0;
  border: none;
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  color: #fff;
}

/* Header : croix de fermeture stylée */
#installAppCanvas .offcanvas-header {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
  z-index: 10;
  padding: 20px;
  border: none;
}

#installAppCanvas .btn-close-custom {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 80, 162, 0.3);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
#installAppCanvas .btn-close-custom:hover {
  background: rgba(255, 80, 162, 0.2);
  border-color: #C2185B;
}
#installAppCanvas .btn-close-custom .close-icon,
#installAppCanvas .btn-close-custom img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
#installAppCanvas .btn-close-custom:hover .close-icon,
#installAppCanvas .btn-close-custom:hover img {
  opacity: 1;
}

/* Corps */
#installAppCanvas .offcanvas-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 32px !important;
}

/* Avatar */
#installAppCanvas .action-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: #fff;
  margin-bottom: 20px;
}
/* L’avatar rose pour l’install */
#installAppCanvas .action-avatar[style*="background: #C2185B"] {
  background: #C2185B !important;
}

/* Titre */
#installAppCanvas .action-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  font-style: italic;
  color: #fff;
  margin-bottom: 8px;
}

/* Message */
#installAppCanvas #installMessage {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

/* Instructions iOS */
#installAppCanvas #iosInstructions p {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
}
#installAppCanvas #iosInstructions strong {
  color: #C2185B;
}

/* Spacer (déjà dans discovery, mais on assure ici) */
#installAppCanvas .flex-spacer {
  flex: 1 1 0;
  min-height: 16px;
}

/* ──── Bouton flottant PWA (discret, style badge-tag) ──── */
.install-link-fixed {
  position: fixed;
  bottom: var(--install-btn-bottom, 130px);  /* plus haut par défaut */
  right: 16px;
  z-index: 999;
  animation: slideUp 0.3s ease-out;
}

.install-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;                     /* fond transparent */
  border: 1px solid rgba(255, 255, 255, 0.5);  /* fine bordure blanche */
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  padding: 0;
  outline: none;
  opacity: 0.7;                                /* légère transparence */
}

.install-link-btn:hover {
  border-color: rgba(255, 255, 255, 0.9);
  opacity: 1;
  transform: scale(1.05);
}

.install-link-btn:active {
  transform: scale(0.98);
}

.install-link-btn:focus {
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.install-icon {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 2;
  color: white;
  flex-shrink: 0;
  opacity: 0.8;                               /* icône légèrement tamisée */
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 0.7;
    transform: translateY(0);
  }
}

/* Sur pages avec footer : on remonte encore plus */
.has-footer .install-link-fixed {
  --install-btn-bottom: 140px;               /* ajuste si besoin */
}

/* Accessibilité : réduire l’animation */
@media (prefers-reduced-motion: reduce) {
  .install-link-fixed {
    animation: none;
  }
  .install-link-btn {
    transition: none;
  }
}


/* Mobile */
@media (max-width: 380px) {
  .drop-menubar-letter {
    font-size: 2rem;
  }
  .drop-menubar-nav {
    padding: 14px 16px 24px;
  }
}
