:root {
  --rouge-japon: #c8102e;
  --noir-karate: #1a1a1a;
  --blanc-gi: #ffffff;
  --or-tradition: #d4af37;
  --or-clair: #e7cb6d;
  --gris-pierre: #4a4a4a;
  --beige-dojo: #f5e6d3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Calibri", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #ffffff;
  min-height: 100vh;
}

/* BOUTON TRANSLATE FLOTTANT */
.translate-button {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--rouge-japon), #8b0000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  border: 3px solid var(--or-tradition);
}

.translate-button:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 25px rgba(200, 16, 46, 0.6);
}

.translate-button svg {
  width: 30px;
  height: 30px;
  fill: var(--blanc-gi);
}

.translate-button .tooltip {
  position: absolute;
  right: 70px;
  background: var(--noir-karate);
  color: var(--blanc-gi);
  padding: 8px 15px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: 0.9rem;
  border: 2px solid var(--or-tradition);
}

.translate-button:hover .tooltip {
  opacity: 1;
}

.translate-button .tooltip::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 10px solid var(--or-tradition);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

/* PANNEAU DE LANGUES */
.language-panel {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: var(--blanc-gi);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
  border: 3px solid var(--rouge-japon);
  max-width: 300px;
}

.language-panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.language-panel h3 {
  color: var(--rouge-japon);
  margin-bottom: 15px;
  font-size: 1.2rem;
  text-align: center;
  border-bottom: 2px solid var(--or-tradition);
  padding-bottom: 10px;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.language-option {
  padding: 10px;
  background: var(--beige-dojo);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.language-option:hover {
  background: var(--rouge-japon);
  color: var(--blanc-gi);
  border-color: var(--or-tradition);
}

.language-option.selected {
  background: var(--noir-karate);
  color: var(--blanc-gi);
  border-color: var(--or-tradition);
}

.language-option .flag {
  font-size: 1.3rem;
}

.close-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 25px;
  height: 25px;
  background: var(--rouge-japon);
  color: var(--blanc-gi);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.2s ease;
}

.close-panel:hover {
  background: var(--noir-karate);
  transform: rotate(90deg);
}

/* Popup de traduction en cours */
#translation-loader {
  position: fixed;
  z-index: 10000;
  background: linear-gradient(135deg, var(--rouge-japon), #8b0000);
  color: var(--blanc-gi);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 30px 50px;
  border: 3px solid var(--or-tradition);
  border-radius: 15px;
  font-size: 1.2rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: none;
}

#translation-loader.active {
  display: block;
}

/* SECTIONS AVEC IMAGES */
.section-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin: 4rem 0;
}

.section-with-image.reverse {
  direction: rtl;
}

.section-with-image.reverse > * {
  direction: ltr;
}

.image-container {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
}

.image-container:hover {
  transform: scale(1.05);
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  max-height: 500px;
}

.image-container:hover img {
  transform: scale(1.1);
}

/* Google Translate Widget personnalisé */
/* Masquer la barre Google Translate */
.goog-te-banner-frame.skiptranslate {
  display: none !important;
}

.skiptranslate iframe {
  display: none !important;
  visibility: hidden !important;
}

/* Positionner comme le bouton flottant */
#google_translate_element {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 1000;
}

.goog-te-gadget-simple {
  background: linear-gradient(135deg, var(--rouge-japon), #8b0000) !important;
  border: 3px solid var(--or-tradition) !important;
  border-radius: 50% !important;
  width: 60px !important;
  height: 60px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* .goog-te-gadget-simple::before {
  content: "🌐";
  font-size: 28px;
  position: absolute;
} */

.goog-te-gadget-simple::before {
  content: "";
  background-image: url("https://www.gstatic.com/images/branding/product/1x/translate_24dp.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 28px;
  height: 28px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Cacher le texte, garder juste l'icône */
.goog-te-gadget-simple a span:first-child {
  display: none !important;
}

.goog-te-gadget-simple a span[aria-hidden="true"] {
  display: none !important;
}

/* Tooltip au survol */
.goog-te-gadget-simple::after {
  position: absolute;
  right: 70px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.goog-te-gadget-simple:hover::after {
  opacity: 1;
}
.goog-te-gadget-icon {
  display: none;
}

body {
  top: 0 !important;
  position: static !important;
}

/* HERO SECTION */
.hero {
  background: linear-gradient(
    135deg,
    var(--noir-karate) 0%,
    var(--gris-pierre) 100%
  );
  color: var(--blanc-gi);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "試し割り";
  position: absolute;
  font-size: 20rem;
  opacity: 0.05;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-content {
  z-index: 2;
  padding: 2rem;
  max-width: 1200px;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  border-bottom: 5px solid var(--rouge-japon);
  display: inline-block;
  padding-bottom: 1rem;
}

.hero .subtitle {
  font-size: 1.8rem;
  color: var(--or-tradition);
  margin-bottom: 2rem;
  font-style: italic;
}

.hero .japanese {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--rouge-japon);
}

.cta-button {
  display: inline-block;
  padding: 1.5rem 3rem;
  background: var(--rouge-japon);
  color: var(--blanc-gi);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
  border: 3px solid var(--blanc-gi);
  transition: all 0.3s ease;
  margin-top: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

.cta-button:hover {
  background: var(--blanc-gi);
  color: var(--rouge-japon);
  border-color: var(--rouge-japon);
  transform: scale(1.05);
}

.logo {
  height: 400px;
}

.content-section {
  max-width: 1200px;
  margin: 0 auto;
}

/* SECTION COMMUNE */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.container {
  margin: 0 auto;
}

section.highlight {
  max-width: 100%;
}

section.hero {
  max-width: 100%;
}

h2 {
  font-size: 3rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--rouge-japon);
  text-transform: uppercase;
  position: relative;
  padding-bottom: 1rem;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 4px;
  background: var(--or-tradition);
}

.container p {
  font-size: 1.3rem;
  max-width: 1000px;
  margin: 0 auto 1rem;
  text-align: justify;
}

/* TECHNIQUE SECTION */
.technique {
  background: var(--blanc-gi);
}

.technique-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.comparison-box {
  padding: 2rem;
  border: 3px solid var(--noir-karate);
  position: relative;
}

.comparison-box.avec {
  border-color: var(--rouge-japon);
}

.comparison-box.sans {
  border-color: var(--rouge-japon);
}

.comparison-box a {
  color: var(--rouge-japon);
}

.comparison-box h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  text-transform: uppercase;
}

.comparison-box ul {
  list-style: none;
  padding-left: 0;
}

.comparison-box li {
  padding: 0.3rem 0;
  padding-left: 2rem;
  position: relative;
  text-align: left;
  font-size: 20px;
}

.comparison-box li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--rouge-japon);
}

.highlight-box {
  background: var(--rouge-japon);
  color: var(--blanc-gi);
  padding: 2rem;
  margin: 3rem 0;
  border-radius: 10px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.technique .container {
  max-width: 1200px;
}

/* CITATION */
.citation {
  background: linear-gradient(
    135deg,
    var(--noir-karate) 0%,
    var(--gris-pierre) 100%
  );
  color: var(--blanc-gi);
  padding: 4rem 2rem;
  text-align: center;
}

.citation blockquote {
  font-size: 2rem;
  font-style: italic;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
  position: relative;
  padding: 2rem;
}

.citation blockquote::before {
  content: '"';
  font-size: 6rem;
  color: var(--rouge-japon);
  position: absolute;
  top: -1rem;
  left: -1rem;
}

.citation .author {
  margin-top: 2rem;
  font-size: 1.3rem;
  color: var(--or-tradition);
}

/* FOOTER */
footer {
  background: var(--noir-karate);
  color: var(--blanc-gi);
  text-align: center;
  padding: 3rem 2rem;
}

footer .japanese-footer {
  font-size: 2rem;
  color: var(--rouge-japon);
  margin-bottom: 1rem;
}

/* RESPONSIVE */
@media (max-width: 968px) {
  .section-with-image {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-with-image.reverse {
    direction: ltr;
  }

  .image-container {
    max-height: 400px;
  }

  .technique-comparison {
    grid-template-columns: 1fr;
  }

  .img-materiau {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .subtitle {
    font-size: 1.2rem;
  }

  .hero .japanese {
    font-size: 2rem;
  }

  h2 {
    font-size: 2rem;
  }

  .citation blockquote {
    font-size: 1.5rem;
  }

  .translate-button {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .translate-button svg {
    width: 25px;
    height: 25px;
  }

  .language-panel {
    right: 20px;
    bottom: 80px;
    max-width: calc(100vw - 40px);
  }

  .language-grid {
    grid-template-columns: 1fr;
  }

  .content-container {
    padding: 1rem;
  }

  .content-container h3 {
    font-size: 1.5rem;
  }
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 1s ease-out;
}

/* SCROLL INDICATOR */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--rouge-japon);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-20px);
  }
  60% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Animation du bouton translate */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
  }
  50% {
    box-shadow: 0 4px 25px rgba(200, 16, 46, 0.7);
  }
  100% {
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
  }
}

.translate-button {
  animation: pulse 2s infinite;
}
