/* 
   Startech Main Styles
   Extracted from head.php for performance and caching.
*/

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.glass-nav {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(24px);
}
.text-glow {
  text-shadow: 0 0 20px rgba(255, 172, 82, 0.3);
}
.hero-gradient {
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(14,14,14,1) 100%);
}
/* Effet Scroll Navbar Premium */
.navbar-scrolled {
  background: rgba(10, 10, 10, 0.45) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.9);
  
  /* Masque progressif pour adoucir la bordure basse */
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
}

/* Transition Logo Unique */
.site-logo {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* Stabilité du conteneur de logo pour éviter les sauts de layout */
.navbar-scrolled .logo-container {
   height: 38px !important;
}
@media (min-width: 768px) {
  .navbar-scrolled .logo-container {
     height: 54px !important;
  }
}

.navbar-scrolled img {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
/* Transition fluide pour la barre (normale) */
#main-navbar {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#main-navbar img {
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
}
/* Tailwind Typography overrides for TinyMCE */
.rich-text h1, .rich-text h2, .rich-text h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.rich-text h2 {
   font-size: 1.25rem;
   border-bottom: 1px solid #222;
   padding-bottom: 0.75rem;
}
.rich-text p { margin-bottom: 1rem; }
.rich-text ul { list-style-type: disc; list-style-position: inside; margin-bottom: 1rem; color: #d4d4d4; }
.rich-text li { margin-bottom: 0.5rem; }
.rich-text strong { color: white; font-weight: 700; }
.rich-text a { color: #ffac52; transition: all 0.2s; }
.rich-text a:hover { text-decoration: underline; color: #ffb641; }
/* Skeleton Loading Effect */
@keyframes skeleton-loading {
  0% { background-color: rgba(255, 255, 255, 0.03); }
  50% { background-color: rgba(255, 255, 255, 0.08); }
  100% { background-color: rgba(255, 255, 255, 0.03); }
}
.skeleton {
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}
/* Micro-animations for Cards */
@keyframes card-entrance {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-card {
  animation: card-entrance 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
}

.item-card, .item-row {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.item-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(255, 172, 82, 0.4) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px -5px rgba(255, 172, 82, 0.1);
}

.item-row:hover td {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

.item-row:hover .ref-cell div {
  border-color: rgba(255, 172, 82, 0.5) !important;
  color: var(--primary) !important;
}
/* Scroll Snap Helpers */
html {
  scroll-behavior: smooth;
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-bounce-subtle {
  animation: bounce-subtle 3s ease-in-out infinite;
}

/* Hero Portal Split */
.hero-portal {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
}
@media (min-width: 768px) {
  .hero-portal {
    flex-direction: row;
  }
}
.portal-side {
  position: relative;
  min-height: 50vh;
  flex: 1;
  transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  cursor: pointer;
}
@media (min-width: 768px) {
  .portal-side {
    height: 100%;
    width: 50%;
  }
}

.portal-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 10;
  transition: background 0.5s ease;
}
.portal-side:hover .portal-overlay {
  background: transparent;
}

/* HERO — EFFET FOCUS / BLUR AU SURVOL */
.portal-side {
  transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1),
              filter 0.5s ease,
              opacity 0.5s ease;
}

/* Quand le GAUCHE est survolé → droite s'efface */
.hero-portal:has(.hero-left .portal-content:hover) .hero-right {
  filter: blur(3px) brightness(0.5);
  opacity: 0.6;
}

/* Quand le DROIT est survolé → gauche s'efface */
.hero-portal:has(.hero-right .portal-content:hover) .hero-left {
  filter: blur(3px) brightness(0.5);
  opacity: 0.6;
}

/* Le côté actif se met légèrement en avant */
.hero-portal:has(.hero-left .portal-content:hover) .hero-left,
.hero-portal:has(.hero-right .portal-content:hover) .hero-right {
  filter: brightness(1.1);
}

.portal-content {
  position: relative;
  z-index: 20;
  max-width: 600px;
  padding: 6rem 2rem 2rem;
  text-align: left;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  will-change: transform;
}

.portal-side:hover .portal-content {
  transform: scale(1.05);
}
@media (min-width: 768px) {
  .portal-content {
    padding: 16rem 4rem 4rem;
    justify-content: center;
  }
}

/* ANIMATIONS & INTERACTIONS */
@keyframes bounce-subtle-2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-bounce-subtle-2 {
  animation: bounce-subtle-2 2s ease-in-out infinite;
}

.discover-node {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  border-left: 2px solid var(--primary-color);
  transition: all 0.3s ease;
}
.discover-node:hover {
  background: rgba(0, 188, 212, 0.15);
  border-left-width: 4px;
}

.shared-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* HERO — ANIMATION D'ENTRÉE (SLIDE UP STAGGER) */
@keyframes heroSlideUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-anim {
  opacity: 0;
  animation: heroSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Délais côté gauche */
.hero-left .hero-anim-1 { animation-delay: 0.1s; }
.hero-left .hero-anim-2 { animation-delay: 0.25s; }
.hero-left .hero-anim-3 { animation-delay: 0.4s; }

/* Délais côté droit */
.hero-right .hero-anim-1 { animation-delay: 0.2s; }
.hero-right .hero-anim-2 { animation-delay: 0.35s; }
.hero-right .hero-anim-3 { animation-delay: 0.5s; }

/* Bento Grid UI */
.bento-card {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
@media (min-width: 768px) {
  .bento-card {
    padding: 0.85rem;
  }
}
.bento-card:hover {
  background: rgba(30, 30, 30, 0.8);
  border-color: rgba(255, 172, 82, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.bento-card .bento-icon { margin-bottom: 0.5rem; flex-shrink: 0; }
.bento-card h3 { margin-bottom: 0.25rem; }
.bento-card p { line-height: 1.4; font-size: 11px; text-align: center; }

/* Text Reveal Anim */
.reveal-text {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}
.reveal-text.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0e0e0e;
}
::-webkit-scrollbar-thumb {
  background: #ffac52;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #eb8d00;
}
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #ffac52 #0e0e0e;
}

/* --- GLOBAL IMAGE LAZY LOADING & FADE-IN --- */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

img.img-loaded {
    opacity: 1 !important;
}

/* --- PWA STANDALONE MODE (APP VIEW) --- */
@media all and (display-mode: standalone) {
    #main-navbar {
        display: none !important;
    }
    main {
        /* Reduce the huge top padding since the navbar is gone */
        padding-top: 2rem !important;
    }
}
