/* ========================================
   HOME PREMIUM – SAMSUNG-INSPIRED DESIGN
   Dark, minimal, visual, spacious, premium
   ======================================== */

/* Focus sur : Samsung-like design with subtle animations, lots of whitespace */

/* HERO: Fullscreen premium */
.hero-premium {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
  margin-top: calc(-1 * var(--header-height));
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-visual {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11,11,15,0.7) 0%, rgba(18,18,24,0.6) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-text {
  margin-bottom: 3rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1.5rem 0;
  letter-spacing: -2px;
  color: var(--text);
}

.hero-title .accent {
  color: var(--primary);
  font-size: 1em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted);
  margin: 0 0 2rem 0;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-ghost-light {
  background: transparent;
  border: 1px solid rgba(231,231,235,0.3);
  color: var(--text);
  box-shadow: none;
}

.btn-ghost-light:hover {
  border-color: rgba(231,231,235,0.6);
  background: rgba(231,231,235,0.05);
}

/* PILLARS: 3 services clés */
.pillars-section {
  position: relative;
  padding: 8rem 0;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
}

.pillar {
  text-align: center;
  padding: 2rem 1rem;
  animation: fadeInUp 0.6s ease-out;
}

.pillar[data-reveal-delay="80"] {
  animation-delay: 0.1s;
}

.pillar[data-reveal-delay="160"] {
  animation-delay: 0.2s;
}

.pillar-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--text);
}

.pillar-text {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.link-arrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.3s ease, color 0.3s ease;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 2px;
}

.link-arrow:hover {
  transform: translateX(4px);
  color: var(--primary-2);
}

/* LOCAL: Zones & segments */
.local-section {
  padding: 6rem 0;
  background: var(--bg-elev);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.local-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.local-intro h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem 0;
  color: var(--text);
}

.local-intro p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.local-segments {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.segment-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(192,20,26,0.3);
}

.segment-link:hover {
  background: rgba(192,20,26,0.1);
  transform: translateY(-2px);
  border-color: var(--primary);
}

/* PROJECTS: Flipbook Gallery */
.projects-section {
  padding: 8rem 0;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.projects-header {
  text-align: center;
  margin-bottom: 4rem;
}

.projects-header h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}

/* FLIPBOOK: Interactive page-turning gallery */
.flipbook-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 3rem;
  perspective: 1200px;
}

.flipbook-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20,20,30,0.5), rgba(15,15,22,0.5));
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.flipbook-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.flipbook-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: rotateY(90deg);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center center;
  pointer-events: none;
}

.flipbook-page.active {
  opacity: 1;
  transform: rotateY(0deg);
  pointer-events: auto;
  z-index: 10;
}

.flipbook-page.prev {
  transform: rotateY(-90deg);
}

.flipbook-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.flipbook-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.flipbook-page.active .flipbook-card img {
  transform: scale(1);
}

.flipbook-tag {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(11,11,15,0.85);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  animation: slideInUp 0.6s ease 0.3s both;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flipbook-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
}

.flipbook-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(192,20,26,0.1), rgba(192,20,26,0.05));
  border: 1.5px solid rgba(192,20,26,0.3);
  color: var(--primary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.flipbook-btn:hover {
  background: linear-gradient(135deg, rgba(192,20,26,0.2), rgba(192,20,26,0.1));
  border-color: rgba(192,20,26,0.5);
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(192,20,26,0.2);
}

.flipbook-btn:active {
  transform: scale(0.95);
}

.flipbook-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 70px;
}

.flipbook-current {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.flipbook-divider {
  opacity: 0.5;
}

.projects-link {
  text-align: center;
}

/* METHOD: 3 étapes */
.method-section {
  padding: 8rem 0;
  background: var(--bg-elev);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.method-section h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 4rem 0;
  color: var(--text);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.method-card {
  text-align: center;
  padding: 2rem;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

.method-card[data-reveal-delay="100"] {
  animation-delay: 0.1s;
}

.method-card[data-reveal-delay="200"] {
  animation-delay: 0.2s;
}

.method-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.method-number {
  display: inline-block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.method-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--text);
}

.method-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* CTA FINAL */
.cta-section {
  padding: 6rem 0;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cta-final {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.cta-final h2 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1.5rem 0;
  color: var(--text);
}

.cta-final p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 2.5rem 0;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(192,20,26,0.1);
  box-shadow: 0 0 20px rgba(192,20,26,0.25);
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* DATA REVEAL: Intersection Observer animations */
[data-reveal] {
  animation: fadeInUp 0.8s ease-out forwards;  
  opacity: 0;
}

[data-reveal-delay="100"] {
  animation-delay: 0.1s;
}

[data-reveal-delay="200"] {
  animation-delay: 0.2s;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .hero-ctas {
    gap: 0.75rem;
  }

  .pillars-grid {
    gap: 2rem;
    padding: 0 1rem;
  }

  .pillar {
    padding: 1.5rem 0.5rem;
  }

  .local-segments {
    gap: 1.5rem;
    flex-direction: column;
  }

  .segment-link {
    width: 100%;
    text-align: center;
  }

  .gallery-track {
    gap: 1rem;
    margin: 0 -20px;
    padding: 0 20px 1rem 20px;
  }

  .gallery-track article {
    flex: 0 0 calc(100% - 1rem);
  }

  .method-grid {
    gap: 1.5rem;
  }

  .method-card {
    padding: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-premium {
    min-height: 90vh;
  }

  .hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    letter-spacing: -1px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .hero-ctas {
    gap: 0.5rem;
  }

  .pillars-section {
    padding: 4rem 0;
  }

  .pillars-grid {
    gap: 1.5rem;
    grid-template-columns: 1fr;
  }

  .pillar {
    padding: 1rem;
  }

  .local-section {
    padding: 4rem 0;
  }

  .projects-section {
    padding: 4rem 0;
  }

  .projects-header h2 {
    font-size: 1.5rem;
  }

  .method-section {
    padding: 4rem 0;
  }

  .method-section h2 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
  }

  .method-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cta-section {
    padding: 4rem 0;
  }

  .cta-final h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  .cta-final p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
}
