@font-face {
  font-family: 'Modern Gothic';
  src: url('/assets/fonts/ModernGothic-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Modern Gothic';
  src: url('/assets/fonts/ModernGothic-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

:root {
  --bg-color: #f1fcf7; /* Vert très clair */
  --block-bg: #ffffff;
  --text-color: #111111;
  --accent-color: #92f7c5; /* Vert clair (fonds boutons) */
  --accent-dark: #56b385;  /* Vert sombre (détails graphiques) */
  --secondary-color: #666;
  --border-color: #cfe6db;
  --font-sans: 'Modern Gothic', -apple-system, BlinkMacSystemFont, sans-serif;
  --space-unit: 2rem;
  --block-padding: 7px 16px 9px 13px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.section-padding { padding: 4rem 0; }
.container { max-width: 1400px; margin: 0; padding: 0 var(--space-unit); }

/* Base Block Style (Inspired by .word-block) */
.block-style, .word-block, .btn-secondary, .cta-link, h2, h3, .section-title, .tag-outline {
  display: inline-block;
  border: 1px solid var(--border-color);
  background-color: var(--block-bg);
  padding: var(--block-padding);
  line-height: 1;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Buttons & Links Uniformization */
.btn-primary, .btn-secondary, .cta-link {
  display: inline-block;
  background: var(--accent-color) !important;
  color: #111111 !important;
  border: 1px solid var(--accent-color);
  padding: var(--block-padding);
  font-weight: 400;
  font-size: 1.1rem;
  text-transform: none;
  line-height: 1;
  text-decoration: none;
}

.btn-primary:hover, .btn-secondary:hover, .cta-link:hover {
  transform: translateY(-2px);
  filter: brightness(0.95);
}

/* Hero */
.hero {
  padding: 6rem var(--space-unit);
  text-align: left;
  max-width: 1400px;
  margin: 0;
}
.hero-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.word-block {
  font-size: 4rem;
  white-space: nowrap;
}

.arrow {
  color: #cccccc;
  font-weight: 400;
  margin-left: 0.2rem;
  display: inline-block;
  transform: rotate(var(--arrow-rotation, 0deg));
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero h1 { font-size: 5rem; line-height: 1; margin: 0; letter-spacing: -0.04em; font-weight: 700; border: none; padding: 0; }

.hero-cta { display: flex; gap: 1rem; margin-top: 2rem; }

/* Titles */
h2 {
  font-size: 2.5rem;
  margin: 0 0 2rem 0;
  font-weight: 700;
  display: inline-block;
}

h3 {
  font-size: 1.8rem;
  margin: 0 0 1rem 0;
  font-weight: 400;
}

.section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--secondary-color);
  border-color: var(--border-color);
  margin: 2rem 0 2rem var(--space-unit);
}

h3 .h3-arrow {
  display: inline-block;
  margin-right: 0.6rem;
  color: var(--accent-dark);
  transform: rotate(var(--arrow-rotation, 0deg));
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-refresh-btn, .hero-cursor-btn {
  display: inline-block;
  border: 1px solid var(--border-color);
  background: white;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.5rem;
  margin-left: 0.5rem;
  align-self: center;
  transition: all 0.2s;
  vertical-align: middle;
}

.hero-refresh-btn:hover, .hero-cursor-btn:hover, .hero-cursor-btn.active {
  background: var(--accent-color);
  color: #111111;
  border-color: var(--accent-color);
}

ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

ul li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

ul li .li-square {
  position: absolute;
  left: 0;
  top: 0.6em;
  transform: translateY(-50%);
  display: inline-block;
  background-color: var(--accent-dark);
  width: 7px;
  height: 7px;
}

/* Problem/Solution */
.problem-solution { background: transparent; }
.problem-solution .container { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.problem-solution h2 { margin-top: 0; }

/* Expertise Grid */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0;
  padding: 0 var(--space-unit);
}
.expertise-item .num { color: var(--accent-dark); font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; }

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 100%;
  margin: 2rem 0 0;
  padding: 0 var(--space-unit);
}
.project-card {
  aspect-ratio: 1/1;
  background-color: #eee;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  color: white;
  text-decoration: none;
  overflow: hidden;
  border-radius: 4px;
}

.project-card picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease-in-out;
  display: block;
}

/* L'image de survol (la deuxième balise picture) est cachée par défaut */
.project-card picture:nth-of-type(2) img {
  opacity: 0;
}

/* Au survol, on affiche la deuxième et on cache la première */
.project-card:hover picture:nth-of-type(2) img {
  opacity: 1;
}

.project-card:hover picture:nth-of-type(1) img {
  opacity: 0;
}

.project-card::after { 
  content: ''; 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); 
  z-index: 1;
}

.project-info { 
  z-index: 2; 
  position: relative; 
}

.project-info .client { 
  font-size: 0.8rem; 
  font-weight: 700; 
  text-transform: uppercase; 
  opacity: 0.8; 
  display: block; 
}

.project-info .project-name { 
  font-size: 1.8rem; 
  font-weight: 700; 
  display: block; 
  margin-top: 0.3rem; 
  line-height: 1.1; 
}

/* About */
.about-container { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; max-width: 1400px; margin: 0; padding: 0 var(--space-unit); }
.about-text p { margin-bottom: 1.5rem; }

/* Tags */
.tag-group { margin-bottom: 2rem; padding: 0 var(--space-unit); }
.tag-label {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  padding: 0;
  color: var(--text-color);
  border: none;
  background-color: transparent;
}
.tag-container { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 1200px; }
.tag-outline {
  color: var(--accent-dark);
  border-color: var(--accent-dark);
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* Offer */
.offer-section { background: var(--accent-color); color: #111111; padding: 4rem var(--space-unit); text-align: left; }
.offer-box { max-width: 800px; margin: 0; }
.offer-box h3 { font-size: 3rem; margin-bottom: 0.8rem; line-height: 1; color: #111111; border-color: #111111; }
.offer-box p { font-size: 1.6rem; margin-bottom: 1.5rem; opacity: 0.9; }
.offer-box .btn-primary { background: white !important; color: var(--accent-color) !important; border-color: white; }

/* Deliverables */
.deliverables {
  font-size: 1rem;
  margin: 1rem 0;
  padding: 0 0 0 1rem;
  border-left: 1px solid var(--accent-dark);
  color: var(--secondary-color);
}
.deliverables strong {
  color: var(--text-color);
  display: block;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Reference Ticker */
.references-list {
  position: relative;
  height: 4rem;
  padding: 0;
  margin-top: 1.5rem;
  list-style: none;
}
.references-list li {
  list-style: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  opacity: 0;
  font-weight: 700;
  animation: fade-in-out-staggered 55s infinite;
  border: none;
  padding: 0;
  display: block;
}

.references-list li:nth-child(1) { animation-delay: 0s; }
.references-list li:nth-child(2) { animation-delay: 5s; }
.references-list li:nth-child(3) { animation-delay: 10s; }
.references-list li:nth-child(4) { animation-delay: 15s; }
.references-list li:nth-child(5) { animation-delay: 20s; }
.references-list li:nth-child(6) { animation-delay: 25s; }
.references-list li:nth-child(7) { animation-delay: 30s; }
.references-list li:nth-child(8) { animation-delay: 35s; }
.references-list li:nth-child(9) { animation-delay: 40s; }
.references-list li:nth-child(10) { animation-delay: 45s; }
.references-list li:nth-child(11) { animation-delay: 50s; }

.collab {
  color: var(--secondary-color);
  font-weight: 400;
  font-size: 1.1rem;
  margin-left: 0.5rem;
}

.obfuscated {
  unicode-bidi: bidi-override;
  direction: rtl;
  display: inline-block;
}

@keyframes fade-in-out-staggered {
  0% { opacity: 0; transform: translateY(10px); }
  2% { opacity: 1; transform: translateY(0); }
  7% { opacity: 1; transform: translateY(0); }
  9% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 0; }
}

footer { padding: 3rem var(--space-unit); text-align: left; font-size: 0.9rem; color: var(--secondary-color); border-top: 1px solid var(--border-color); }

@media (max-width: 900px) {
  .hero h1 { font-size: 3.5rem; }
  .word-block { font-size: 2.5rem; }
  .problem-solution .container, .about-container { grid-template-columns: 1fr; gap: 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
}
