/* ============================================
   Precellence Software - Shared Styles
   ============================================ */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --background-light: #f5f6fa;
  --background-white: #ffffff;
  --text-color: #333;
  --text-light: rgba(255, 255, 255, 0.9);
  --border-color: #ddd;
  --hover-color: #2c3e50;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: url('../../precellence-brand.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
  pointer-events: none;
}

/* Header styles */
header {
  background-color: var(--primary-color);
  color: white;
  padding: var(--spacing-sm);
  text-align: center;
  position: relative;
}

/* Language Selector - Fixed Position (Option 4) */
.language-selector-fixed {
  position: fixed;
  top: var(--spacing-md);
  right: var(--spacing-md);
  z-index: 1000;
  display: flex;
  gap: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  padding: 0.25rem;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn-fixed {
  padding: 0.6rem 1.2rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 48px;
  font-family: inherit;
}

.lang-btn-fixed:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.lang-btn-fixed.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Brand header - Option 4: Dégradé coloré inspiré du logo */
header.brand-header {
  background: linear-gradient(135deg, 
    rgba(255, 100, 100, 0.3) 0%,
    rgba(255, 150, 50, 0.3) 25%,
    rgba(255, 200, 0, 0.3) 50%,
    rgba(100, 200, 255, 0.3) 75%,
    rgba(150, 100, 255, 0.3) 100%
  );
  backdrop-filter: blur(15px);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header.brand-header h1,
header.brand-header p {
  position: relative;
  z-index: 2;
  color: white;
  margin: 0;
}

header.brand-header p {
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

header h1 {
  font-size: 2rem;
  margin: 0;
}

/* Navigation styles - simplified */
nav {
  background: rgba(0, 0, 0, 0.6);
  padding: var(--spacing-sm);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  font-weight: 500;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

nav a.active {
  background-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* Main content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-md);
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Hero section - simplified */
.hero {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-sm);
  background: transparent;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

/* Brand hero - simplified, no background image */
.hero.brand-hero {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: var(--spacing-lg) var(--spacing-md);
}

.hero.brand-hero h2 {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero.brand-hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  max-width: 700px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.hero img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  margin-bottom: var(--spacing-sm);
  object-fit: contain;
}

.hero h2 {
  margin-bottom: var(--spacing-sm);
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero.brand-hero h2 {
  color: white;
}

/* Content sections */
.content-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.25);
}

.card h3 {
  color: #ffffff;
  margin-bottom: var(--spacing-sm);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.card p {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.card a {
  color: #ffffff;
}

/* App cards for hub page - simplified and modern */
.app-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: var(--spacing-lg);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}

.app-card img {
  max-width: 180px;
  height: auto;
  margin-bottom: var(--spacing-md);
  border-radius: 12px;
}

.app-card h3 {
  color: #ffffff;
  margin-bottom: var(--spacing-xs);
  font-size: 1.5rem;
  font-weight: 600;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.app-card > p:first-of-type {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.app-card > p:last-of-type {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
  line-height: 1.5;
}

.app-card .badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: auto;
}

.app-card .badge.coming-soon {
  background-color: rgba(255, 255, 255, 0.7);
  color: #ffffff;
}

/* Screenshots */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.screenshot-wrapper {
  text-align: center;
}

.screenshot {
  display: inline-block;
  max-width: 90%;
  height: auto;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.3s;
}

.screenshot:hover {
  transform: scale(1.02);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: 5% auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #ffffff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  color: rgba(255, 255, 255, 0.8);
}

/* Footer - simplified */
footer {
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  text-align: center;
  padding: var(--spacing-md);
  margin-top: var(--spacing-lg);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

/* Download/Social wrapper */
.download-social-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
}

.download-social-wrapper img {
  width: 150px;
  border-radius: 12px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.download-social-wrapper img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Legacy language tabs (kept for compatibility, but not used on main page) */
.language-tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 0.25rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.lang-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 44px;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Brand section - simplified, no background image */
.brand-section {
  position: relative;
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.brand-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-sm);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 600;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.brand-section p {
  max-width: 800px;
  margin: 0 auto var(--spacing-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  line-height: 1.7;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.brand-section > * {
  position: relative;
  z-index: 1;
}

/* Responsive design */
@media (max-width: 1000px) {
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .content-section,
  .screenshots {
    grid-template-columns: 1fr;
  }
  
  .app-card {
    margin-bottom: var(--spacing-md);
  }
  
  header.brand-header {
    min-height: 140px;
  }
  
  .language-selector-fixed {
    top: var(--spacing-sm);
    right: var(--spacing-sm);
  }
  
  .hero.brand-hero h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }
  
  header.brand-header h1 {
    font-size: 1.5rem;
  }
  
  main {
    padding: var(--spacing-sm);
  }
  
  .hero {
    padding: var(--spacing-md) var(--spacing-sm);
  }
  
  .hero.brand-hero {
    min-height: 250px;
    padding: var(--spacing-md) var(--spacing-sm);
  }
  
  header.brand-header {
    min-height: 120px;
  }
  
  .language-selector-fixed {
    top: var(--spacing-xs);
    right: var(--spacing-xs);
    padding: 0.2rem;
  }
  
  .lang-btn-fixed {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-width: 42px;
  }
  
  header.brand-header h1 {
    font-size: 1.5rem;
  }
  
  header.brand-header p {
    font-size: 1rem;
  }
  
  .hero.brand-hero h2 {
    font-size: 1.75rem;
  }
  
  .hero.brand-hero p {
    font-size: 1rem;
  }
  
  .brand-section h2 {
    font-size: 1.5rem;
  }
  
  .app-card {
    padding: var(--spacing-md);
  }
  
  .app-card h3 {
    font-size: 1.25rem;
  }
}
