:root{
  --cm-max: 1600px;
  --cm-pad: clamp(20px, 4vw, 60px);
}

.cm-home{
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #eaf1ff;
  position: relative;
  overflow-x: hidden;
}

/* Largeur fluide élégante */
.cm-shell{
  width: min(var(--cm-max), 100%);
  margin: 0 auto;
  padding-left: var(--cm-pad);
  padding-right: var(--cm-pad);
}

/* Background animé */
.cm-bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1000px 600px at 12% 18%, rgba(0,121,255,.35), transparent 60%),
    radial-gradient(900px 520px at 85% 20%, rgba(0,220,255,.22), transparent 55%),
    linear-gradient(180deg, #070b16 0%, #0a1130 100%);
}

.cm-orb{
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(46px);
  opacity: .5;
  animation: cmOrb 10s ease-in-out infinite;
}
.cm-orb-1{ left: -150px; top: 80px; background: radial-gradient(circle, rgba(0,150,255,.8), transparent 70%);}
.cm-orb-2{ right: -180px; top: 200px; background: radial-gradient(circle, rgba(0,255,210,.35), transparent 70%);}

@keyframes cmOrb{
  0%,100%{ transform: translate(0,0);}
  50%{ transform: translate(20px,-20px);}
}

/* HERO */
.cm-hero{ padding: 40px 0 10px; }

.cm-hero-inner{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 992px){
  .cm-hero-inner{ grid-template-columns: 1fr; text-align:center; }
}

.cm-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 18px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.15);
  font-weight:900;
}

.cm-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 6px rgba(34,197,94,.2);
}

.cm-welcome{
  margin:20px 0 10px;
  font-family:Cooper, serif;
  font-size: clamp(30px, 3vw, 50px);
  font-style: italic;
  background: linear-gradient(90deg, #2e6fb9, #ffffff, #af0606);
  background-size: 180%;
  animation: shine 12s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes shine{
  0%{ background-position:-500%;}
  100%{ background-position:500%;}
}

.cm-hello{
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
  font-weight: 900;
}

.cm-gif-frame{
  width: min(380px, 100%);
  padding:16px;
  border-radius:24px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.15);
  box-shadow:0 20px 60px rgba(0,0,0,.4);
}
.cm-gif{ width:100%; border-radius:18px; }

/* MODULES */
.cm-modules{ padding: 40px 0; }

.cm-card{
  border-radius:20px;
  overflow:hidden;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.15);
  transition:.3s;
}
.cm-card:hover{
  transform: translateY(-6px);
  box-shadow:0 20px 60px rgba(0,0,0,.4);
}

.cm-media{
  height:200px;
  position:relative;
}
.cm-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.cm-chip{
  position:absolute;
  bottom:15px;
  left:15px;
  padding:8px 14px;
  border-radius:999px;
  background:white;
  color:#000;
  font-weight:900;
}

.cm-body{ padding:20px; }

.cm-btn{
  border-radius:12px !important;
  font-weight:900 !important;
  margin:6px 4px 0 0;
}

.cm-locked{
  padding:10px;
  border-radius:12px;
  border:1px dashed rgba(255,255,255,.3);
  text-align:center;
}

/* ===== STATUS DOT ===== */

.cm-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  transition: all .3s ease;
}

/* Connecté */
.cm-online{
  background:#22c55e;
  box-shadow:0 0 0 6px rgba(34,197,94,.25);
}

/* Déconnecté */
.cm-offline{
  background:#ef4444;
  box-shadow:0 0 0 6px rgba(239,68,68,.25);
  
  /* ===== STATUS DOT ===== */

}
.cm-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  transition: all .3s ease;
}

/* Connecté → PULSE VISIBLE */
.cm-online{
  background:#22c55e;
  box-shadow:0 0 0 0 rgba(34,197,94,.7);
  animation: cmPulse 1.6s infinite;
}

/* Déconnecté */
.cm-offline{
  background:#ef4444;
  box-shadow:0 0 0 6px rgba(239,68,68,.25);
}

@keyframes cmPulse{
  0%{
    box-shadow: 0 0 0 0 rgba(34,197,94,.8);
  }
  70%{
    box-shadow: 0 0 0 16px rgba(34,197,94,0);
  }
  100%{
    box-shadow: 0 0 0 0 rgba(34,197,94,0);
  }
}

/* ===== ANIMATION BONJOUR ===== */

.cm-rise{
  opacity: 0;
  transform: translateY(80px) scale(.98);
  filter: blur(8px);
  animation: cmRiseUp 1.4s cubic-bezier(.19,1,.22,1) forwards;
  animation-delay: .4s;
}

@keyframes cmRiseUp{
  0%{
    opacity: 0;
    transform: translateY(80px) scale(.98);
    filter: blur(8px);
  }
  60%{
    opacity: 1;
    filter: blur(2px);
  }
  100%{
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ===== FIX DROPDOWN / NAVBAR CLIQUABLE ===== */
.cm-home .cm-bg{
  pointer-events: none; /* le fond ne capture plus les clics */
}

/* ===== NAVBAR AU-DESSUS + DROPDOWN QUI NE POUSSE PAS ===== */
#navbar{
  position: relative;
  z-index: 5000;
}

/* garde le comportement Bootstrap (menu au-dessus, pas dans le flux) */
#navbar .dropdown-menu{
  z-index: 6000;
}

/* ===== NAVBAR THEME DARK (glass) ===== */
#navbar .navbar{
  background: rgba(10, 17, 48, 0.55) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow: 0 16px 50px rgba(0,0,0,.30);
}

/* liens */
#navbar .nav-link{
  color: rgba(255,255,255,.86) !important;
  font-weight: 800;
  border-radius: 12px;
  padding: 10px 12px;
}

/* active */
#navbar .nav-link.active{
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
}

/* hover */
#navbar .nav-link:hover{
  background: rgba(255,255,255,.08);
  color: #fff !important;
}

/* dropdown menu */
#navbar .dropdown-menu{
  background: rgba(10, 17, 48, 0.92) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(12px);
}

#navbar .dropdown-item{
  color: rgba(255,255,255,.88) !important;
  font-weight: 700;
}

#navbar .dropdown-item:hover{
  background: rgba(255,255,255,.10) !important;
  color: #fff !important;
}

#navbar .dropdown-divider{
  border-top-color: rgba(255,255,255,.14) !important;
}

