/* ========== SKIP LINK (RGAA) ========== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  font-family: 'Metamorphous', serif;
  text-decoration: none;
  font-size: 14px;
}
.skip-link:focus {
  top: 0;
}

/* ========== BASE ========== */
html, body {
  font-family: 'Metamorphous', serif;
  height: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  background-color: #000;
}
a {
  color: white;
  text-decoration: none;
}
h1, h3, h4 {
  color: white;
  text-shadow: 2px 6px 4px rgba(0, 0, 0, 1);
}

h1 { font-size: 60px; margin: 0; }
h3 { font-size: 65px; margin: 0; }
h4 { font-size: 40px !important; margin: 0;}

p {
  color: white;
  font-size: 16px;
  line-height: 1.5;
}

/* ========== HEADER ========== */
.header {
  position: relative;
  width: 100%;
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: visible;
  z-index: 100;
  margin-bottom: -80px;
}

.header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 110%;
  object-fit: cover;
  z-index: 1;
}

.header-top {
  position: absolute;
  top: 10px;
  width: 100%;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  box-sizing: border-box;
}

.logo img { height: 180px; width: auto; }

/* ========== NAVIGATION ========== */
.nav { display: flex; overflow: hidden; align-items: center; }

.nav a {
  display: inline-flex;
  align-items: center;
}

.nav img {
  padding: 0 20px 0 0;
  height: 90px;
  width: auto;
}

.nav img:hover { animation: vibrate 0.25s linear; }
.nav a:focus img { outline: 3px solid #fff; outline-offset: 2px; }

@keyframes vibrate {
  0%   { transform: translate(0); }
  20%  { transform: translate(-2px, 2px); }
  40%  { transform: translate(-2px, -2px); }
  60%  { transform: translate(2px, 2px); }
  80%  { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

.title {
  position: relative;
  z-index: 10;
  font-size: 60px;
}

/* ========== SLIDESHOW BACKGROUND ========== */
.mainboard {
  margin: 0;
  z-index: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 380px;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: slideshow 30s infinite;
}

@keyframes slideshow {
  0%, 33%   { background-image: url('./image/main1.jpg'); }
  33.1%, 66% { background-image: url('./image/main2.jpeg'); }
  66.1%, 100% { background-image: url('./image/main3.jpg'); }
}

/* ========== TEXTE ROTATIF ========== */
.mainboard-text {
  text-align: center;
  color: white;
  font-size: 65px;
  font-family: 'Metamorphous', serif;
  text-shadow: 2px 6px 4px rgba(0, 0, 0, 1);
  margin: 0;
  animation: h3text 30s infinite;
}

@keyframes h3text {
  0%, 33%   { opacity: 1; }
  33.1%, 66% { opacity: 1; }
  66.1%, 100% { opacity: 1; }
}

/* Hack CSS pour changer le texte via ::after */
.mainboard-text {
  font-size: 0; /* cache le contenu HTML */
}

.mainboard-text::after {
  content: "COMPARER";
  font-size: 65px;
  animation: h3text-content 30s infinite;
  display: block;
}

@keyframes h3text-content {
  0%, 33%   { content: "COMPARER"; }
  33.1%, 66% { content: "PROGRESSER"; }
  66.1%, 100% { content: "JOUER"; }
}

/* ========== BOARD ========== */
.board {
  position: relative;
  z-index: 50;
  background-image: url('./image/sousboard2.png');
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: top center;
  background-color: #1a0e06; /* bois sombre - comble si le contenu dépasse l'image */
}

/* On cache l'img tag - le fond est géré en background-image */
.board > img.board-bg {
  display: none;
}

/* ========== FOOTER ========== */
.footer {
  position: relative;
  width: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* ========== ZONES PUBLICITAIRES FOOTER ========== */
.footer-ad {
  position: relative;
  z-index: 5;
  width: 160px;
  min-width: 120px;
  flex-shrink: 0;
  display: none ;
}

.footer-ad-left  { margin-left: 20px; }
.footer-ad-right { margin-right: 20px; }

.footer-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 300px;
  background-image: url('./image/taf2.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  contain: layout style;
}

.footer-content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 40px 20px;
}

.footer-links a {
  display: block;
  font-size: 22px;
  color: white;
  text-decoration: none;
  padding: 4px;
}
.footer-links a:hover,
.footer-links a:focus {
  background-color: rgba(142,142,142,0.45);
  border-radius: 6px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.footer-email {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  gap: 8px;
  margin-top: 10px;
}
.footer-email a {
  font-size: 22px;
  color: white;
  text-decoration: none;
}
.footer-email a:hover,
.footer-email a:focus {
  background-color: rgba(142,142,142,0.45);
  border-radius: 6px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ========== RESPONSIVE ========== */
@media (prefers-reduced-motion: reduce) {
  .mainboard { animation: none; background-image: url('./image/main1.jpg'); }
  .mainboard-text::after { animation: none; content: "COMPARER"; }
  .nav img:hover { animation: none; }
}

@media (max-width: 1024px) {
  .header { height: 200px; margin-bottom: -50px; }
  .logo img { height: 90px; }
  .nav img { height: 60px; padding: 0 10px 0 0; }
  .title { font-size: 30px; }
  .mainboard { min-height: 180px; }
  .mainboard-text::after { font-size: 32px; }
}

@media (max-width: 600px) {
  .header { height: 160px; margin-bottom: -30px; }
  .logo img { height: 60px; }
  .nav img { height: 44px; padding: 0 8px 0 0; }
  .title { font-size: 22px; }
  .mainboard { min-height: 120px; max-height: 35vh; }
  .mainboard-text::after { font-size: 20px; }
  .footer { min-height: 250px; }
  .footer-links a { font-size: 16px; }
  .footer-email a { font-size: 14px; }
  .footer-email img { height: 20px; }
  /* Cacher les pubs sur mobile pour ne pas écraser le footer */
  .footer-ad { display: none; }
}

/* ========== COMPARATEUR — OVERRIDES MOBILE ========== */
#ship-comparator-wrapper {
  padding: clamp(16px, 4vw, 80px) clamp(10px, 3vw, 20px) !important;
}

#ship-comparator h2 {
  font-size: clamp(20px, 5.5vw, 36px) !important;
  margin-bottom: clamp(12px, 3vw, 32px) !important;
}

#ship-comparator .max-w-5xl {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Sélecteurs : 1 colonne mobile → 2 colonnes desktop */
#ship-comparator .grid.md\:grid-cols-2 {
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(12px, 3vw, 24px) !important;
}

@media (min-width: 768px) {
  #ship-comparator .grid.md\:grid-cols-2 {
    flex-direction: row !important;
  }
  #ship-comparator .grid.md\:grid-cols-2 > * {
    flex: 1;
    min-width: 0;
  }
}

#ship-comparator button[aria-haspopup="true"] {
  font-size: clamp(12px, 3vw, 15px) !important;
  min-height: 48px;
  white-space: normal !important;
  word-break: break-word;
}

#ship-comparator [role="listbox"] {
  max-height: clamp(240px, 50vh, 380px) !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
}

#ship-comparator [role="listbox"] button {
  font-size: clamp(12px, 3vw, 14px) !important;
  min-height: 44px;
}

#ship-comparator [role="option"] {
  font-size: clamp(11px, 2.8vw, 13px) !important;
  min-height: 40px;
}

#ship-comparator .text-center.mb-8 {
  display: flex;
  justify-content: center;
}

#ship-comparator .text-center.mb-8 button {
  font-size: clamp(14px, 4vw, 20px) !important;
  padding: clamp(10px, 2.5vw, 16px) clamp(16px, 4vw, 40px) !important;
  width: 100%;
  max-width: 460px;
}

#ship-comparator .grid.grid-cols-2 .text-lg {
  font-size: clamp(12px, 3vw, 18px) !important;
  word-break: break-word;
}

#ship-comparator [role="row"] {
  padding: clamp(6px, 2vw, 12px) !important;
}

#ship-comparator .text-2xl {
  font-size: clamp(15px, 4.5vw, 26px) !important;
}

#ship-comparator .flex.items-center.gap-3 {
  gap: clamp(4px, 1.5vw, 12px) !important;
}

#ship-comparator [role="status"] p {
  font-size: clamp(13px, 3.5vw, 18px) !important;
}
