/* demo.css */

/* Hero section */
.demo-hero {
  text-align: center;
  margin-bottom: 45px;
  margin-top: 16px;
}

/* Added for CrossRoutes and SocketEvents detailed sections */
.demo-detail {
  width: 100%;
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.demo-full {
  width: 100%;
  max-width: 1000px;
  padding: 2rem;
  margin: 0 1rem;
}

.demo-long {
  margin-top: 1rem;
  line-height: 1.5;
  font-size: 1rem;
}
.demo-hero h1 {
  color: #009fdd;
  font-size: 2.5em;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 7px;
  margin-top: 0;
}
.desc-lead {
  color: #009fdd;
  font-size: 1.22em;
  font-weight: 600;
  margin: 0 auto;
  display: inline-block;
  text-align: center;
  line-height: 1.47;
}
.desc-lead-2 {
  color: #00bfff;
  font-size: 0.99em;
  font-weight: 500;
  display: block;
  margin-top: 2px;
  letter-spacing: 0.1px;
}

/* Conteneur global */
#exemples {
  padding: 58px 0 40px 0;
  background: none;
  min-height: 100vh;
}

.demo-section {
  background: #fff;
  border-radius: 21px;
  box-shadow: 0 4px 18px #009fdd13;
  margin: 0 auto 48px auto;
  max-width: 850px;
  padding: 38px 36px 27px 36px;
  transition: box-shadow .13s;
  border: 1.5px solid #eafdff;
}
.demo-section h2 {
  color: #009fdd;
  margin-bottom: 16px;
  font-size: 2em;
  font-weight: 800;
  margin-top: 0;
  letter-spacing: -0.5px;
}
.demo-section ul {
  margin: 0 0 9px 26px;
  font-size: 1.08em;
  color: #444;
}
.demo-desc {
  font-size: 1.13em;
  color: #222f37;
  margin-bottom: 12px;
  line-height: 1.62;
}
.demo-section code {
  background: #eafdff;
  color: #005fa3;
  font-size: 1em;
  padding: 1px 7px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', 'Fira Mono', 'Menlo', monospace;
}

/* Boutons */
.demo-download-links {
  margin-top: 14px;
  margin-bottom: 6px;
}
.core-btn {
  background: linear-gradient(90deg,#00bfff 60%,#009fdd 100%);
  color: #fff;
  border: none;
  border-radius: 15px;
  padding: 10px 22px;
  font-size: 1.08em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px #009fdd13;
  margin-right: 8px;
  margin-bottom: 4px;
  transition: transform .11s cubic-bezier(.24,.92,.57,1.32), background .11s;
  outline: none;
}
.core-btn.green { background: linear-gradient(90deg,#1ec676 60%,#14b862 100%); }
.core-btn.blue  { background: linear-gradient(90deg,#00bfff 60%,#009fdd 100%); }
.core-btn:hover,
.core-btn:focus { background: #00bfff; color: #fff; transform: scale(1.045); }
.core-btn:active { background: #009fdd; color: #fff; transform: scale(0.97); }

/* Popup Styles */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.33);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup-content {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 30px #009fdd1c;
  max-width: 700px;
  width: 97vw;
  padding: 33px 23px 22px 23px;
  position: relative;
  text-align: left;
  animation: popupIn .17s cubic-bezier(.45,1.36,.5,1) 1;
}
.popup-content h3 {
  color: #00bfff;
  margin-top: 0;
  margin-bottom: 13px;
  font-size: 1.29em;
  font-weight: 800;
}
.popup-content pre {
  background: #f2faff;
  border-radius: 9px;
  padding: 14px 8px;
  max-height: 360px;
  overflow: auto;
  font-size: 1em;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 18px;
}
.popup-content .core-btn {
  min-width: 120px;
  margin-top: 0;
}
@keyframes popupIn {
  0% { transform: scale(0.84); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Surlignage des hits */
.highlight-keyword {
  background: #00bfff25;
  color: #009fdd;
  font-weight: bold;
  border-radius: 4px;
  padding: 0 2px;
}

/* Responsive */
@media (max-width:900px) {
  .demo-section { max-width: 99vw; padding: 6vw 2vw 4vw 2vw; }
}
@media (max-width:600px) {
  .popup-content { padding: 10px 3vw 8px 3vw; }
  .desc-lead { font-size: 1.07em; }
  .demo-section { font-size: 0.97em; }
  .demo-hero h1 { font-size: 1.4em; }
}
.white-hero {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px #009fdd19;
  padding: 34px 28px 23px 28px;
  margin: 0 auto 38px auto;
  max-width: 760px;
  text-align: center;
}
@media (max-width:700px) {
  .white-hero {
    padding: 16px 4vw 12px 4vw;
    max-width: 99vw;
  }
}

/* ===== Nouveau design pour la page demo ===== */
/* Hero container */
#demo-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4rem 0;
}

/* The hero card uses global glass-card style via the class 'glass-card' */
.demo-hero {
  max-width: 960px;
  width: calc(100% - 4rem);
  margin: 0 auto;
  text-align: center;
}

.demo-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.demo-lead {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.demo-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* Grid layout for demo cards */
/*
 * Réorganisation de la grille de démonstration pour un affichage vertical.
 * Au lieu d’une grille responsive, nous utilisons maintenant un flux en colonne
 * afin que chaque carte de démonstration occupe toute la largeur disponible.
 */
.demo-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 1000px;
  margin: 4rem auto 2rem;
  padding: 0 1rem;
}

/* Demo card styling similar to module cards */
.demo-card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 8px 24px var(--shadow-color);
  transition: transform 0.3s cubic-bezier(.24,.92,.57,1.32), box-shadow 0.3s;
  /* Ensure demo cards span the full width of the container when stacked vertically */
  width: 100%;
}

.demo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px var(--shadow-color);
}

.demo-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.demo-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.demo-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.demo-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.demo-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Disclaimer style at bottom of demo page */
.demo-disclaimer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.demo-disclaimer b {
  color: var(--primary-dark);
}

@media (max-width: 700px) {
  .demo-hero h1 {
    font-size: 2rem;
  }
  .demo-lead {
    font-size: 1.1rem;
  }
  .demo-sub {
    font-size: 0.95rem;
  }
}
