body {
  margin: 0;
  font-family: 'Lato', 'Noto Sans JP', Arial, sans-serif;
  background: #111214;
  color: #fff;
  min-height: 100vh;
}

/* Email contact link */
.email-contact {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 1000;
}

.email-contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.email-contact a:hover {
  background: #e6007a;
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(230, 0, 122, 0.4);
}

.email-contact .email-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.email-contact a:hover .email-icon {
  filter: brightness(0) invert(1);
}

/* Responsive for mobile */
@media (max-width: 700px) {
  .email-contact {
    top: 16px;
    left: 16px;
  }
  
  .email-contact a {
    width: 40px;
    height: 40px;
  }
  
  .email-contact .email-icon {
    width: 20px;
    height: 20px;
  }
}

.language-switcher,
.language-switcher.dropdown {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 1000;
}
.language-switcher button {
  background: #222;
  color: #fff;
  border: none;
  padding: 8px 16px;
  margin-left: 8px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.language-switcher button:hover {
  background: #e6007a;
  color: #fff;
}
.language-switcher button.active-lang,
.language-switcher button:focus {
  background: #e6007a;
  color: #fff;
}
.dropdown-toggle {
  background: #e6007a;
  color: #fff;
  border: none;
  padding: 10px 28px;
  font-size: 1.1rem;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  transition: background 0.2s, color 0.2s;
  outline: none;
  position: relative;
}
.dropdown-toggle:after {
  content: '\25BC';
  margin-left: 12px;
  font-size: 0.8em;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  background: #181a1b;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  min-width: 160px;
  padding: 8px 0;
  flex-direction: column;
  align-items: stretch;
  animation: fadeIn 0.2s;
  border: none;
}
.dropdown.open .dropdown-menu {
  display: flex;
}
.dropdown-item {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  padding: 10px 24px;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  font-weight: 600;
}
.dropdown-item.active-lang,
.dropdown-item:hover {
  background: #e6007a;
  color: #fff;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.main-header {
  position: relative;
  display: block;
  background-image: url('img/header_bg.webp');
  background-size: cover;
  background-position: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 64px 32px;
  min-height: 760px;
}
.header-photo img {
  width: auto;
  height: auto;
  object-fit: contain;
}
.header-text {
  max-width: 500px;
  color: #fff;
  padding-top: 36px;
}
.header-logo {
  height: 79px;
  width: auto;
  transform: scale(1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.highlight {
  color: #e6007a;
}
.header-text h1 {
  font-size: 2.8rem;
  margin: 0 0 10px 0;
  font-weight: 700;
  line-height: 1.1;
}
.header-text h2.jp {
  font-size: 1.3rem;
  color: #e6007a;
  margin: 0 0 18px 0;
  font-weight: 400;
}
.header-text .desc {
  font-size: 1.15rem;
  margin-bottom: 0;
  color: #fff;
  opacity: 0.85;
}

/* Logos Bar */
.logos-bar {
  background: #0e0e0e;
  padding: 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.logos img {
  height: 48px;
  width: auto;
  object-fit: contain;
  opacity: 1;
  margin: 0 8px;
  vertical-align: middle;
  transform: scale(1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.logos a {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.logos a:hover {
  opacity: 0.8;
  transform: scale(0.95);
}
.logos img:hover {
  opacity: 0.8;
  transform: scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
}

main {
  width: 100%;
  margin: 0 auto;
}
.portfolio {
  display: flex;
  flex-direction: column;
}

.project {
  position: relative;
  min-height: 360px;
  height: 30vw;
  max-height: 440px;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,1);
}
.project .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.4s, background 0.3s;
  opacity: 1;
}
.overlay.transparent-bg {
  background: rgba(0,0,0,0) !important;
  transition: background 0.3s;
}
.overlay .platform-links {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.overlay .project-logo {
  opacity: 1;
  transition: opacity 0.3s;

}
.project-logo:hover {
  opacity: 0;
  pointer-events: none;
}
.project-logo:hover + .platform-links {
  opacity: 1;
  pointer-events: auto;
}
.project-logo {
  display: block;
  width: 352px !important;
  height: 142px !important;
  padding-bottom: 32px;
  max-width: none !important;
  max-height: none !important;
  z-index: 2;
  transition: opacity 0.3s;
  position: relative;
  transform: scale(1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.project .roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 50px 0;
  padding: 0;
  gap: 8px;
}

.project .roles span {
  background: #fff;
  color: #000 !important;
  opacity: 1 !important;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  text-align: center;
  line-height: 1.2;
  width: fit-content;
}
footer {
  background: #181a1b;
  padding: 48px 8px ;
  text-align: center;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.2);
}
.footer-logo img {
  height: 60px;
  width: auto;
  margin-bottom: 12px;
  transform: scale(1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.footer-text {
  font-size: 0.95rem;
  color: #b3b3b3;
  margin-bottom: 8px;
  text-align: center;
}

.footer-text p {
  color: #b3b3b3;
}

.footer-text .legal {
  color: #999;
  font-size: 0.7rem;
}

.footer-image {
  margin: 15px 0;
  text-align: center;
}

.footer-image img {
  max-width: 200px;
  height: auto;
  opacity: 1;
}

.footer-text a {
  color: #e6007a;
  text-decoration: underline;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s ease;
}

/* Responsive uniquement pour mobile */
@media (max-width: 700px) {
  .main-header {
    min-height: 60vh;
    padding: 0;
  }
  .header-content {
    padding: 96px 8px 64px 8px;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
    max-width: 100%;
  }
  .header-photo img {
    width: 212px;
    height: 315px;
    margin-bottom: 16px;
  }
  .header-text {
    max-width: 100%;
  }
  .header-text h1 {
    font-size: 1.5rem;
  }
  .portfolio {
    gap: 20px;
    margin: 24px 0 24px 0;
  }

  #contribution-portfolio .project {
    min-height: 400px!important;
    height: 60vw!important;
    max-height: 400px!important;
  }

  .project {
    min-height: 200px;
    height: 48vw;
    max-height: 200px;
  }
  .project .overlay {
    padding: 12px 0 8px 0;
  }
  .project-logo {
    max-width: 160px;
    width: 90%;
  }
  .logos {
    gap: 8px;
    margin: 0;
    flex-direction: column;
  }
  .logos img {
    height: 40px;
    width: auto;
    object-fit: contain;
    opacity: 1;
    margin: 0!important;
    vertical-align: middle;
    transform: scale(1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .footer-logo img {
    height: 28px;
  }
  .language-switcher,
  .language-switcher.dropdown {
    left: 50%;
    right: auto;
    top: 16px;
    transform: translateX(-50%);
    margin-bottom: 24px;
  }
  .dropdown-toggle {
    padding: 8px 16px;
    font-size: 1rem;
  }
  .dropdown-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 320px;
    min-width: 160px;
  }
  .portfolio-tabs {
    margin: 0 auto;
    padding: 0;
    text-align: center;
  }
  .tab-btn {
    text-align: center;
    font-size: 1rem;
    text-wrap-mode: nowrap;
    margin: 0!important
  }
  .logo-platform-wrapper {
    width: 70% !important;
    height: auto !important;
    max-width: 70vw !important;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .project-logo {
    width: 70% !important;
    height: auto !important;
    max-width: 70vw !important;
    max-height: 30vw !important;
    object-fit: contain;
  }
  .logo-platform-wrapper.platforms-open .platform-links {
    opacity: 1;
    pointer-events: auto;
  }
  .logo-platform-wrapper.platforms-open .project-logo {
    opacity: 0;
  }
  /* Désactive le hover sur mobile */
  .logo-platform-wrapper:hover .platform-links,
  .logo-platform-wrapper:focus-within .platform-links,
  .logo-platform-wrapper:hover .project-logo,
  .logo-platform-wrapper:focus-within .project-logo {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Hide/show language blocks */
.lang {
  display: none;
}
.lang-en {
  display: block;
}

.portfolio-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  text-align: center;
}

.tab-btn {
  background: black;
  color: #fff;
  border: none;
  border-radius: 5px 5px 0 0;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 16px 124px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin: 0;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}
.tab-btn.active,
.tab-btn:hover {
  background: #e6007a;
  color: #fff;
}
.portfolio-list {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.logo-platform-wrapper {
  position: relative;
  width: 352px;
  height: auto !important;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: auto;
  padding: 0 !important;
}
.logo-platform-wrapper::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: auto;
}
.platform-links {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 4;
}
.logo-platform-wrapper:hover .platform-links,
.logo-platform-wrapper:focus-within .platform-links {
  opacity: 1;
  pointer-events: auto;
}
.logo-platform-wrapper:hover .project-logo,
.logo-platform-wrapper:focus-within .project-logo {
  opacity: 0;
}

.platform-container {
  background-color: rgba(0,0,0,0.8);
  padding: 16px 48px;
  border-radius: 10px;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}
.platform-icon img {
  max-width: 96px;
  height: 52px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 8px #000);
  transition: transform 0.2s;
  display: block;
}
.platform-icon img:hover {
  transform: scale(0.88);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.8s cubic-bezier(.23,1.02,.32,1) forwards;
  will-change: opacity, transform;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .tab-btn {
    font-size: 0.95rem;
    padding: 8px 16px;
  }
}

/* Styles spécifiques pour les projets de contributions avec platform-links */
#contribution-portfolio .project .overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#contribution-portfolio .project .logo-platform-wrapper {
  width: 352px;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: auto;
  padding: 0 !important;
}

#contribution-portfolio .project .platform-links {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 4;
}

#contribution-portfolio .project .roles {
  z-index: 1;
  position: relative;
}

.project-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 352px;
  max-height: 142px;
  margin: 0;
}