@keyframes filterCardIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  color: #fff;
  background: #000;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  z-index: 10;
  background: transparent;
  transition: background 0.3s ease;
}

.header--scrolled {
  background: rgba(0, 0, 0, 0.85);
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
}

.header-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.header-nav a,
.header-nav__link {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.header-nav a:hover,
.header-nav__link:hover {
  opacity: 0.8;
}

/* Hamburger button — hidden on desktop, visible on mobile */
.header-burger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  z-index: 12;
}

/* Landing page */
.landing {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
}

.landing-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
}

.landing-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110vw;
  height: 61.875vw; /* 16:9 ratio, scaled 110% */
  min-height: 110vh;
  min-width: 195.55vh; /* 16:9 ratio, scaled 110% */
  transform: translate(-50%, -50%);
  border: none;
}

/* Pages intérieures */
.page {
  min-height: 100vh;
  padding: 6rem 2rem 2rem;
  background: #111;
}

.page h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page p {
  font-size: 1.125rem;
  opacity: 0.85;
  line-height: 1.7;
}

/* Contact form */
.contact-form {
  max-width: 640px;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-field label {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.9;
}

.contact-field input,
.contact-field textarea {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: #fff;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  transition: border-color 0.2s;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: #666;
}

.contact-field textarea {
  resize: vertical;
}

.contact-error {
  font-size: 0.85rem;
  color: #f87171;
}

.contact-success {
  padding: 0.75rem 1rem;
  background: #166534;
  border-radius: 6px;
  font-size: 0.95rem;
}

.contact-submit {
  align-self: flex-start;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  background: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.contact-submit:hover {
  opacity: 0.85;
}

.contact-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Under construction page */
.under-construction-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: #000;
  gap: 2rem;
  text-align: center;
}

.under-construction-logo {
  width: auto;
  height: auto;
  max-width: min(300px, 80vw);
  max-height: 120px;
  object-fit: contain;
}

.under-construction-fallback {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.under-construction-title {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 600;
  margin: 0;
  color: #fff;
}

/* Homepage projects section */
.projects-section {
  position: relative;
  z-index: 1;
  background: #000;
  padding: 4rem 2rem;
  text-align: center;
  color: #fff;
}

.projects-section__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.projects-section__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.projects-section__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 300px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}

.projects-section__card--no-thumbnail {
  background: rgba(255, 255, 255, 0.08);
}

.projects-section__card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.projects-section__card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
  z-index: 1;
}

.projects-section__card-tag {
  position: relative;
  z-index: 2;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  padding-bottom: 0.25rem;
}

.projects-section__card-title {
  position: relative;
  z-index: 2;
  font-size: 1.25rem;
  font-weight: 600;
  padding-bottom: 1.5rem;
}

.projects-section__link {
  display: inline-block;
  margin-top: 2rem;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.projects-section__link:hover {
  opacity: 1;
}

/* Projets page */
.projets-page__message {
  font-size: 1.1rem;
  opacity: 0.6;
  margin-top: 2rem;
}

.projets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.projets-page__load-more {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* Tag filters */
.projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.projects-filters__btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
}

.projects-filters__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.projects-filters__btn--active {
  background: #fff;
  color: #000;
}

/* Project card */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 280px;
  padding: 2.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  animation: filterCardIn 0.35s ease both;
}

.project-card:hover {
  transform: scale(1.04);
}

/* Thumbnail image as background */
.project-card__thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.4s ease;
  z-index: 0;
}

/* Dark overlay — appears on hover */
.project-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.project-card:hover .project-card__thumbnail {
  filter: blur(4px);
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

/* Tag and title — hidden by default, appear on hover */
.project-card__tag {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-card__title {
  position: relative;
  z-index: 2;
  font-size: 1.25rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s;
}

.project-card:hover .project-card__tag,
.project-card:hover .project-card__title {
  opacity: 1;
  transform: translateY(0);
}

/* Cards without thumbnail — show tag and title normally */
.project-card--no-thumbnail .project-card__tag,
.project-card--no-thumbnail .project-card__title {
  opacity: 1;
  transform: translateY(0);
}

.project-card--no-thumbnail .project-card__tag {
  opacity: 0.7;
}

.project-card--no-thumbnail:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Project / article detail page (shared) */
.project-detail-wrapper,
.article-detail-wrapper,
.static-page-wrapper {
  max-width: 880px;
  margin: 0 auto;
}

.project-detail,
.article-detail {
  margin: 0;
}

.project-detail h1,
.article-detail h1 {
  margin-top: 0;
}

.project-detail__back,
.article-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.project-detail__back:hover,
.article-detail__back:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

.project-detail__back-icon,
.article-detail__back-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.project-detail__back:hover .project-detail__back-icon,
.article-detail__back:hover .article-detail__back-icon {
  transform: translateX(-3px);
}

.project-detail__byline,
.article-detail__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.65;
  margin: 0 0 2rem;
}

.project-detail__byline-item:not(:last-child)::after,
.article-detail__byline-item:not(:last-child)::after {
  content: "·";
  margin: 0 0.6rem;
  opacity: 0.7;
}

.project-detail__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .project-detail__content:has(> aside) {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 1.5rem;
  }
}

.project-detail__credits {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-detail__credits-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.55;
  margin: 0 0 1rem;
}

.project-detail__credits-body {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.85;
}

.project-detail__credits-body p {
  margin: 0 0 0.5em;
  font-size: inherit;
}

.project-detail__credits-body p:last-child {
  margin-bottom: 0;
}

.project-detail__credits-body a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.project-detail__credits-body a:hover {
  opacity: 0.7;
}

@media (min-width: 768px) {
  .project-detail__credits {
    padding-top: 0;
    padding-left: 1.5rem;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .project-detail__credits-body {
    font-size: 0.8rem;
  }
}

.project-detail__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 2rem;
}

.project-detail__video iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0.5rem;
}

/* Network section */
.network-section {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 4rem 2rem;
  min-height: 50vh;
}

.network-section__title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem;
  color: #111;
}

.network-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.network-filters__btn {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  color: #333;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
}

.network-filters__btn:hover {
  background: rgba(0, 0, 0, 0.12);
}

.network-filters__btn--active {
  background: #111;
  color: #fff;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.network-card {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 0.5rem;
  padding: 1rem;
  transition: background 0.2s ease;
  animation: filterCardIn 0.35s ease both;
}

.network-card:hover {
  background: rgba(0, 0, 0, 0.07);
}

.network-card__logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.network-card__name {
  font-size: 0.85rem;
  text-align: center;
  color: #333;
  opacity: 0.7;
}

/* Article detail summary */
.article-detail__summary {
  font-size: 1.15rem;
  font-style: italic;
  opacity: 0.75;
  margin: 0 0 2rem;
  line-height: 1.6;
}

.article-detail__illustration {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 0 0 2rem;
}

/* Shared content body styling for project and article detail pages */
.content-overlay__body {
  font-size: 1.1rem;
  line-height: 1.7;
  opacity: 0.85;
}

.content-overlay__body p {
  margin: 0 0 0.75em;
}

.content-overlay__body p:last-child {
  margin-bottom: 0;
}

.content-overlay__body ul,
.content-overlay__body ol {
  margin: 0 0 0.75em;
  padding-left: 1.5em;
}

.content-overlay__body a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.content-overlay__body a:hover {
  opacity: 0.7;
}

/* Blog carousel section */
.blog-carousel-section {
  position: relative;
  z-index: 1;
  background: #111;
  padding: 4rem 2rem;
  text-align: center;
}

.blog-carousel-section__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem;
  color: #fff;
}

.blog-carousel-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.blog-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0;
}

.blog-carousel::-webkit-scrollbar {
  display: none;
}

.blog-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.blog-carousel__arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.blog-carousel__arrow--left {
  left: -1rem;
}

.blog-carousel__arrow--right {
  right: -1rem;
}

.carousel-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  text-align: left;
  padding: 0;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.carousel-card:hover {
  transform: scale(1.04);
}

.carousel-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.5rem;
  display: block;
}

.carousel-card__placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
}

.carousel-card__title {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.blog-carousel-section__link {
  display: inline-block;
  margin-top: 2rem;
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.blog-carousel-section__link:hover {
  opacity: 1;
}

/* Preview banner */
.preview-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.6rem 1rem;
  background: #b45309;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
}

.preview-banner__exit {
  color: #fff;
  text-decoration: underline;
  white-space: nowrap;
}

.preview-banner__exit:hover {
  opacity: 0.8;
}

/* Blog page */
.blog-page {
  background: #111;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.blog-filters__btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
}

.blog-filters__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.blog-filters__btn--active {
  background: #fff;
  color: #000;
}

.blog-page__message {
  font-size: 1.1rem;
  opacity: 0.6;
  margin-top: 2rem;
}

.blog-masonry {
  columns: 3 300px;
  column-gap: 1.5rem;
}

.blog-card {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  text-align: left;
  padding: 0;
  text-decoration: none;
  transition: transform 0.3s ease, background 0.2s ease;
  animation: filterCardIn 0.35s ease both;
}

.blog-card:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.1);
}

.blog-card__image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.blog-card__text {
  padding: 1rem 1.25rem 1.25rem;
}

.blog-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.blog-card__excerpt {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.7;
  margin: 0;
}

/* Footer */
.site-footer {
  background: #111;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 2rem;
}

.site-footer__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer__link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.site-footer__link:hover {
  color: #fff;
}

.site-footer__copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 1rem 1.5rem;
  }

  .header-burger {
    display: block;
    pointer-events: auto;
  }

  .header-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.95);
    z-index: 11;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .header-nav--open {
    opacity: 1;
    pointer-events: auto;
  }

  .header-nav a,
  .header-nav .header-nav__link {
    font-size: 1.5rem;
  }

  .page {
    padding-top: 5rem;
  }

  .projets-grid {
    grid-template-columns: 1fr;
  }

  .projects-section__cards {
    grid-template-columns: 1fr;
  }

  .projects-section__card {
    min-height: 200px;
  }

  .projects-section {
    padding: 3rem 1rem;
  }

  .project-card {
    min-height: 120px;
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
  }

  .project-card__overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.65);
  }

  .project-card__tag,
  .project-card__title {
    opacity: 1;
    transform: translateY(0);
    text-align: left;
  }

  .project-card__tag {
    font-size: 0.7rem;
  }

  .project-card__title {
    font-size: 1rem;
  }

  .project-card:hover .project-card__thumbnail {
    filter: none;
  }

  .network-section {
    padding: 3rem 1rem;
  }

  .network-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
  }

  /* Blog carousel mobile */
  .blog-carousel-section {
    padding: 3rem 1rem;
  }

  .blog-carousel__arrow {
    display: none;
  }

  .carousel-card {
    flex: 0 0 180px;
  }

  /* Blog page mobile */
  .blog-masonry {
    columns: 1;
  }

  .site-footer__content {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .blog-card,
  .network-card {
    animation: none;
  }
}
