/* Studio Tonus - Optimized CSS | Ecoindex A/B Target */
/* Version: 2.2 | Date: 2025-11-22 */
/* Mise à jour: Logo dans navigation + fixes responsive */

/* ========================================
   FONT FACES - Local hosting only
   ======================================== */
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/fira-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/fira-mono-700.woff2') format('woff2');
}

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  --primary: #ee7778;
  --secondary: #303880;
  --dark: #1A202C;
  --gray: #2D3748;
  --teal: #83aaa5;
  --yellow: #bca414;
  --light: #EDF2F7;
  --lighter: #F7FAFC;
  --white: #ffffff;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Fira Mono', 'Courier New', monospace;
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

/* ========================================
   LAYOUT - Container
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav-fixed {
  position: fixed;
  width: 100%;
  top: 0;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  z-index: 1000;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

/* Logo avec image */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--gray);
  transition: color 0.3s;
  font-size: 0.875rem;
}

.nav-links a:hover {
  color: var(--primary);
  opacity: 1;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  background: var(--primary);
  color: var(--white) !important;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  transition: opacity 0.3s, transform 0.2s;
  display: inline-block;
  font-weight: 600;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  color: var(--white) !important;
}

.btn-hero {
  background: var(--white);
  color: var(--primary);
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  display: inline-block;
  transition: opacity 0.3s, transform 0.2s;
}

.btn-hero:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  display: inline-block;
  transition: background 0.3s, color 0.3s;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  opacity: 1;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  padding: 0.5rem 1.5rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.badge-secondary {
  display: inline-block;
  background: var(--light);
  color: var(--secondary);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.badge-eco {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f3f4f6;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  transition: background 0.3s;
}

.badge-eco:hover {
  background: #e5e7eb;
}

.badge-eco-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  transition: background 0.3s;
}

.badge-eco-footer:hover {
  background: rgba(255,255,255,0.2);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  background: var(--primary);
  padding: 8rem 1rem 5rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: rgba(255,255,255,0.9);
  max-width: 56rem;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

/* ========================================
   STATS
   ======================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.stat-item {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
}

/* ========================================
   SECTIONS
   ======================================== */
.section-white {
  background: var(--white);
  padding: 5rem 1rem;
}

.section-light {
  background: var(--lighter);
  padding: 5rem 1rem;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
.text-center {
  text-align: center;
}

.section-title-primary {
  font-size: clamp(2.5rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.section-title-secondary {
  font-size: clamp(2.5rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--gray);
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.6;
}

.text-xl {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--gray);
}

/* ========================================
   UTILITY MARGINS
   ======================================== */
.mb-8 {
  margin-bottom: 2rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: start; /* Changé de center à start pour meilleur alignement */
}

.grid-arthur {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.arthur-text {
  order: 1;
}

.arthur-photo-container {
  order: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.arthur-skills {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skill-icon {
  font-size: 1.5rem;
  color: var(--primary);
  width: 2rem;
  flex-shrink: 0;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  justify-items: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========================================
   PARTNER LOGOS
   ======================================== */
.partner-logo {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s;
  margin: 0 auto;
  max-width: 120px;
  height: auto;
}

.partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ========================================
   ARTHUR PHOTO
   ======================================== */
.arthur-photo {
  border-radius: 50%;
  border: 6px solid var(--primary);
  box-shadow: 0 10px 40px rgba(238,119,120,0.2);
  width: 100%;
  max-width: 384px;
  margin: 0 auto;
}

/* ========================================
   SERVICES
   ======================================== */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 2fr;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-icon {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.service-icon h3 {
  font-size: 1.875rem;
  margin-top: 1rem;
  line-height: 1.2;
}

.service-content {
  padding: 2rem;
}

.service-content p {
  margin-bottom: 1.5rem;
  color: var(--gray);
  line-height: 1.6;
}

.bg-primary {
  background: var(--primary);
}

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

.bg-third {
  background: var(--teal);
}

.tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.tags span {
  background: var(--light);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  text-align: center;
}

/* ========================================
   RÉALISATIONS - Vignettes vidéo optimisées
   ======================================== */
.realisations-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.video-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.video-card {
  display: block;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s, box-shadow 0.3s;
  max-width: 320px;
  width: 100%;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.video-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 42px;
  background: rgba(255,0,0,0.8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.video-card:hover .video-play-btn {
  background: rgba(255,0,0,1);
}

.video-play-btn::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 18px solid white;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 3px;
}

.video-info {
  padding: 1rem;
}

.video-info h4 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1rem;
}

.video-info p {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.4;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer h4 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.footer p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.footer a {
  color: rgba(255,255,255,0.7);
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--white);
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

/* ========================================
   UTILITIES
   ======================================== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* ========================================
   RESPONSIVE DESIGN - Mobile First
   ======================================== */

/* Mobile: < 768px */
@media (max-width: 768px) {
  /* Navigation - Mobile menu */
  .mobile-menu-btn {
    display: block;
  }

  .logo-img {
    height: 32px;
  }

  .logo h1 {
    font-size: 1.25rem;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 64px);
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transition: left 0.3s ease;
    z-index: 999;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 1rem;
  }

  /* Typography adjustments */
  .hidden-mobile {
    display: none;
  }

  /* Hero section */
  .hero {
    padding: 6rem 1rem 3rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  /* Arthur section - Stack vertically on mobile */
  .grid-arthur {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .arthur-text {
    order: 2;
    text-align: center;
  }

  .arthur-photo-container {
    order: 1;
  }

  .arthur-photo {
    max-width: 250px;
    width: 100%;
  }

  .arthur-skills {
    align-items: center;
  }

  .skill-item {
    justify-content: center;
  }

  /* Services */
  .service-card {
    grid-template-columns: 1fr !important;
  }

  .service-icon {
    padding: 2rem;
  }

  .service-icon h3 {
    font-size: 1.5rem;
  }

  /* Partners grid - 2 colonnes sur mobile */
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .partner-logo {
    max-width: 100px;
  }

  /* Réalisations - 1 colonne sur mobile */
  .video-row {
    flex-direction: column;
    align-items: center;
  }

  .video-card {
    max-width: 100%;
  }

  /* General */
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .section-white,
  .section-light {
    padding: 3rem 1rem;
  }

  /* Testimonials */
  .hover-lift {
    transform: none !important;
  }
}

/* Tablet: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Navigation reste visible sur tablette */
  .mobile-menu-btn {
    display: none;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  /* Hero ajustements */
  .hero {
    padding: 7rem 1rem 4rem;
  }

  /* Partners - 4 colonnes sur tablette */
  .partners-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .partner-logo {
    max-width: 110px;
  }

  /* Arthur section */
  .grid-arthur {
    gap: 2rem;
  }

  .arthur-photo {
    max-width: 300px;
  }

  /* Services */
  .service-card {
    grid-template-columns: 1fr 2fr;
  }

  .service-icon {
    padding: 2rem;
  }

  .service-icon h3 {
    font-size: 1.5rem;
  }

  /* Réalisations - 2 par ligne */
  .video-row {
    justify-content: center;
  }

  .video-card {
    max-width: 300px;
  }

  /* Stats */
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Grid-2 */
  .grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  /* Sections padding */
  .section-white,
  .section-light {
    padding: 4rem 1rem;
  }

  /* Footer grid */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: > 1024px */
@media (min-width: 1025px) {
  .mobile-menu-btn {
    display: none;
  }

  /* Partners grid - 8 colonnes en ligne */
  .partners-grid {
    grid-template-columns: repeat(8, 1fr);
    max-width: 100%;
    gap: 1.5rem;
  }

  /* Réalisations - 3 par ligne */
  .video-card {
    max-width: 320px;
  }
}

/* Large Desktop: > 1440px */
@media (min-width: 1441px) {
  .container {
    max-width: 1280px;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles */
@media print {
  .nav-fixed,
  .footer,
  .badge-eco,
  .btn-primary,
  .btn-hero,
  .btn-outline {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
  }
}

/* Animation heartbeat pour le coeur */
@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(1);
  }
}
/* Fix : 4 vignettes centrées sur une ligne en desktop */
@media (min-width: 1025px) {
    .video-row {
        flex-wrap: nowrap;        /* empêche le retour à la ligne */
        justify-content: center;  /* centre le groupe */
    }

    .video-card {
        flex: 0 1 320px;          /* taille fixe, comme maintenant */
    }
}