/* =========================================
   PAGES.CSS — Styles spécifiques aux pages
   ========================================= */

/* --- 1. HERO SECTION (Page d'accueil) --- */
.hero {
  background: radial-gradient(circle at top right, var(--gray-700), var(--bg-hero));
  color: var(--text-inverse);
  min-height: min(600px, 90vh);
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

/* Effet de lumière (Glow) en haut à droite */
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 5.5vw, 56px);
  line-height: 1.2;
  margin-bottom: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-inverse);
  max-width: 850px;
}

.hero-tagline {
  display: inline-block;
  margin-top: 10px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.hero p {
  color: var(--text-inverse-muted);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
  max-width: 540px;
}

.hero-subtitle {
  margin: 0 0 32px 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* --- BOUTON HERO (Glassmorphism propre) --- */
.hero .btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.35); /* Bordure plus nette */
  color: var(--text-inverse) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.18) !important; /* Léger fond translucide plus visible */
  border-color: rgba(255, 255, 255, 0.8) !important; /* Bordure plus lumineuse */
  color: var(--text-inverse) !important; /* Garder la couleur blanche pour un style glassmorphic premium */
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.25), 0 0 15px rgba(255, 255, 255, 0.1);
  transform: translateY(-2.5px);
}

/* --- 2. PAGE HEADER (Pour Contact/Terms/Privacy) --- */
.page-header {
  background: radial-gradient(circle at top right, var(--gray-700), var(--bg-hero));
  color: var(--white);
  
  padding: 80px 0; 
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Effet de lumière du Mini-Hero */
.page-header::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}

.page-header .section-lead {
  color: var(--text-inverse-muted);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* --- 3. CONTENU GÉNÉRAL --- */
.page-content {
  padding: 40px 0 80px;
}

/* --- 4. STYLE DOCUMENT (Terms & Privacy) --- */
.doc-card {
  background: var(--bg-card);
  padding: clamp(30px, 5vw, 60px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 0 auto;
  
  position: relative;
  z-index: 10;
  margin-top: -60px; 
}

.doc-card h2 {
  font-size: clamp(20px, 3vw, 24px);
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-main);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

/* Texte Justifié */
.doc-card p, 
.doc-card li {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
  
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.doc-card ul {
  margin-bottom: 24px;
  padding-left: 20px;
}

.doc-card li {
  margin-bottom: 8px;
}

.doc-card a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 500;
}

/* --- 5. CONTACT PAGE --- */
.contact-intro {
  margin-bottom: 40px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 18px;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

.contact-alt {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 24px;
}

/* --- 6. AUDIENCE (Accueil) --- */
.audience-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 24px);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.audience-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.audience-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.audience-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* --- HERO VISUAL (MOCKUP INTERACTIF PREMIUM) --- */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  margin-top: 32px;
}

@media (min-width: 900px) {
  .hero-visual {
    margin-top: 0;
  }
}

.dashboard-mockup {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 280px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

/* Grille arrière animée */
.dashboard-mockup::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: 1;
  pointer-events: none;
}

/* Cercles flous luminescents en arrière-plan */
.hero-glow-1 {
  position: absolute;
  top: 10%;
  left: 20%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35) 0%, transparent 70%);
  filter: blur(30px);
  z-index: 0;
  pointer-events: none;
  animation: floatGlow 8s infinite alternate ease-in-out;
}

.hero-glow-2 {
  position: absolute;
  bottom: 10%;
  right: 15%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
  filter: blur(25px);
  z-index: 0;
  pointer-events: none;
  animation: floatGlow 6s infinite alternate-reverse ease-in-out;
}

@keyframes floatGlow {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-15px) scale(1.1); }
}

/* Éléments internes de l'interface simulée */
.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.mockup-dot:nth-child(1) { background: #ef4444; }
.mockup-dot:nth-child(2) { background: #eab308; }
.mockup-dot:nth-child(3) { background: #22c55e; }

.mockup-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Simulateur d'Écran */
.mockup-screen {
  flex-grow: 1;
  background: #030712;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

/* Oscilloscope / Courbe dynamique */
.mockup-oscilloscope {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-wave {
  width: 100%;
  height: 60px;
  background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.1) 0%, transparent 80%);
  position: relative;
  overflow: hidden;
}

.mockup-wave::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 100%;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 10px, #06b6d4 10px, #06b6d4 12px);
  mask-image: linear-gradient(to right, transparent, white, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, white, transparent);
  animation: moveWave 3s infinite linear;
  opacity: 0.6;
}

@keyframes moveWave {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Pixel de test clignotant */
.mockup-pixel-fixer {
  position: absolute;
  top: 30%;
  left: 45%;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(124, 58, 237, 0.6);
  background: rgba(124, 58, 237, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.mockup-pixel-fixer::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #ef4444;
  animation: blinkPixel 0.6s infinite steps(4);
}

@keyframes blinkPixel {
  0%, 100% { background: #ef4444; }
  25% { background: #22c55e; }
  50% { background: #3b82f6; }
  75% { background: #eab308; }
}

/* Grille de test tactile */
.mockup-touch-grid {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: repeat(4, 18px);
  gap: 4px;
}

.mockup-touch-box {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 2px;
}

.mockup-touch-box.active {
  background: #22c55e;
  border-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: fadeOutActive 1.5s infinite alternate;
}

@keyframes fadeOutActive {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* Téléphone flottant additionnel en superposition 3D */
.phone-mockup {
  position: absolute;
  bottom: -30px;
  right: -20px;
  width: 100px;
  height: 180px;
  background: #0b0f19;
  border: 4px solid #1f2937;
  border-radius: 20px;
  /* Ombre adoucie et lissée avec un glow violet pour fusionner avec l'arrière-plan */
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(var(--primary-rgb), 0.15);
  z-index: 3;
  overflow: hidden;
  padding: 6px;
  display: flex;
  flex-direction: column;
  transform: rotate(-10deg) translateY(0);
  animation: floatPhone 4s infinite alternate ease-in-out;
}

@keyframes floatPhone {
  0% { transform: rotate(-10deg) translateY(0); }
  100% { transform: rotate(-8deg) translateY(-10px); }
}

.phone-screen {
  flex-grow: 1;
  background: linear-gradient(180deg, #7c3aed 0%, #06b6d4 100%);
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- 7. RESPONSIVE --- */

/* Mobile */
@media (max-width: 640px) {
  .doc-card p,
  .doc-card li {
    text-align: left;
    hyphens: none;
  }
}

/* Desktop */
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
  }
}

/* Ultra-wide */
@media (min-width: 1600px) {
  .hero::before {
    width: 520px;
    height: 520px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}