/* ============================================
   CreativeIA - Styles globaux
   Style : Futuriste / Neon
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Variables --- */
:root {
  --bg-primary:     #0a0a1a;
  --bg-secondary:   #111133;
  --bg-card:        #1a1a3e;
  --neon-blue:      #00d4ff;
  --neon-purple:    #8b5cf6;
  --neon-pink:      #ec4899;
  --text-primary:   #f0f0ff;
  --text-secondary: #a0a0cc;
  --glow-blue:      0 0 20px rgba(0, 212, 255, 0.3);
  --glow-purple:    0 0 20px rgba(139, 92, 246, 0.3);
  --glow-pink:      0 0 20px rgba(236, 72, 153, 0.3);
  --font-heading:   'Space Grotesk', 'Inter', sans-serif;
  --font-body:      'Inter', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
  --max-width:      1200px;
  --header-height:  80px;
  --radius:         12px;
  --radius-sm:      8px;
  --transition:     0.3s ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--neon-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--neon-pink);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background-color: var(--bg-secondary);
}

.text-gradient {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 20px;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-bottom: 12px;
}

p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 50px;
  text-align: center;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-blue);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
  display: block;
  text-align: center;
}

/* --- Header / Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img,
.logo svg {
  height: 40px;
  width: auto;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--neon-blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  transition: width var(--transition);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition), opacity var(--transition);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  color: #fff;
  box-shadow: var(--glow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 0 60px rgba(139, 92, 246, 0.3);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--neon-blue);
  border: 1px solid rgba(0, 212, 255, 0.4);
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--neon-blue);
  box-shadow: var(--glow-blue);
  color: var(--neon-blue);
  transform: translateY(-2px);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), var(--glow-blue);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--neon-blue);
}

.card h3 {
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(30deg);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Why Section (3 cards) --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card .card-icon {
  transition: transform var(--transition), filter var(--transition);
}

.service-card:hover .card-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.service-card .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--neon-blue);
}

.service-card .btn-link:hover {
  gap: 10px;
  color: var(--neon-pink);
}

/* --- Stats Section --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item {
  padding: 30px 20px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Service Detail Blocks (services.html) --- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail.reverse {
  direction: rtl;
}

.service-detail.reverse > * {
  direction: ltr;
}

.service-detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-detail-icon svg,
.service-detail-icon img {
  width: 200px;
  height: 200px;
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.2));
}

.service-detail-content h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.service-detail-content p {
  margin-bottom: 20px;
}

.service-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 14px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 20px;
  color: var(--neon-blue);
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
}

.cta-section h2 {
  margin-bottom: 20px;
  position: relative;
}

.cta-section p {
  margin-bottom: 40px;
  position: relative;
}

.cta-section .hero-buttons {
  position: relative;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius);
  padding: 40px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(10, 10, 26, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(160, 160, 204, 0.5);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0cc' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-error {
  color: var(--neon-pink);
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: var(--neon-pink);
}

.form-group.error .form-error {
  display: block;
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px;
}

.form-success.visible {
  display: block;
}

.form-success svg {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  color: var(--neon-blue);
}

/* Contact info */
.contact-info {
  padding-top: 20px;
}

.contact-info h3 {
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-info-item svg {
  width: 24px;
  height: 24px;
  color: var(--neon-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info-item h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-info-item p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-grid-2col {
  grid-template-columns: 2fr 1fr;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-links h4,
.footer-social h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--neon-blue);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: var(--glow-blue);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-bottom a {
  color: var(--text-secondary);
}

.footer-bottom a:hover {
  color: var(--neon-blue);
}

/* --- Page Hero (services, contact) --- */
.page-hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top center, rgba(0, 212, 255, 0.08) 0%, transparent 60%);
}

.page-hero h1,
.page-hero p {
  position: relative;
}

.page-hero p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 16px auto 0;
}

/* --- Legal Pages --- */
.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 16px;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 24px;
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content li {
  list-style: disc;
  margin-bottom: 8px;
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(17, 17, 51, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 212, 255, 0.15);
  padding: 20px 0;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.5;
}

.cookie-banner-text a {
  color: var(--neon-blue);
}

.cookie-banner-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-banner .btn {
  padding: 10px 24px;
  font-size: 0.85rem;
}

/* --- Reveal animation placeholder --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
