@font-face {
  font-family: "Minecraft-Font";
  src: url("assets/fonts/Minecraft-Font.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Minecraft inventory tones */
  --inv-panel: #c6c6c6;
  --inv-line: #ffffff;
  --slot: #8b8b8b;
  --slot-dark: rgba(55, 55, 55, 0.72);
  --slot-light: rgba(248, 248, 248, 0.62);

  /* Wooden crafting table */
  --wood-dark: #4a3015;
  --wood: #7a4f25;
  --wood-light: #9c6a35;
  --wood-corner: #cda774;
  --wood-cell: #38240f;

  /* Tooltip / dark panels */
  --tip: rgba(26, 26, 26, 0.92);
  --tip-line: rgba(255, 255, 255, 0.08);
  --ink: #f0f0f0;
  --muted: #c4c4c4;

  --orange: #f5a623;
  --green: #54924b;
  --green-light: #7bb86a;
  --shadow: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Minecraft-Font", monospace;
  font-size: 17px;
  color: var(--ink);
  /* Desert village backdrop: night sky fading into warm sandstone blocks */
  background:
    linear-gradient(180deg, rgba(22, 18, 36, 0.62) 0%, rgba(22, 18, 36, 0) 24%),
    radial-gradient(140% 95% at 50% 4%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(rgba(12, 9, 16, 0.16), rgba(12, 9, 16, 0.3)),
    repeating-linear-gradient(0deg, rgba(74, 54, 30, 0.16) 0 2px, transparent 2px 74px),
    repeating-linear-gradient(90deg, rgba(74, 54, 30, 0.16) 0 2px, transparent 2px 74px),
    linear-gradient(180deg, #b99b65 0%, #c4a56b 46%, #a9874f 100%);
  background-attachment: fixed;
  background-size: cover, cover, cover, 74px 74px, 74px 74px, cover;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat, no-repeat;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 26px 26px 48px;
}

/* --- Tool row (above the table) + buttons (Minecraft stone) --- */
.tool-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 0 auto 18px;
}

.rail-button,
.mode-button,
.pixel-button {
  border: 3px solid #1c1c1c;
  border-radius: 7px;
  background: linear-gradient(#a8a8a8, #8c8c8c);
  color: #161616;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.45),
    inset -2px -2px 0 rgba(0, 0, 0, 0.3),
    0 4px 0 rgba(0, 0, 0, 0.34);
}

.rail-button:active,
.mode-button:active,
.pixel-button:active {
  transform: translateY(2px);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.45),
    inset -2px -2px 0 rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(0, 0, 0, 0.34);
}

.rail-button {
  width: 46px;
  height: 46px;
  font-size: 1.2rem;
}

/* --- Topbar --- */
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  width: min(1100px, 100%);
  margin: 0 auto 30px;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.95;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), 0 0 18px rgba(0, 0, 0, 0.45);
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.mode-button,
.pixel-button {
  min-height: 44px;
  padding: 8px 16px;
}

.mode-button[aria-pressed="true"] {
  background: linear-gradient(var(--green-light), var(--green));
  color: #0d1c0b;
}

.pixel-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.result-slot:disabled {
  cursor: default;
}

/* --- Layout --- */
.game-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.play-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

/* --- Discovery banner (dark Minecraft tooltip) --- */
.discovery-banner {
  width: min(760px, 100%);
  margin: 0 auto 26px;
  padding: 15px 24px;
  background: var(--tip);
  border: 1px solid var(--tip-line);
  border-radius: 15px;
  box-shadow: 0 14px 36px var(--shadow);
  text-align: center;
}

.discovery-count {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #fff;
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  letter-spacing: 1px;
}

/* --- Crafting table (wooden table on a Minecraft GUI panel) --- */
.crafting-zone {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 4vw, 52px);
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px);
  background: var(--inv-panel);
  border-radius: 6px;
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.8),
    inset -3px -3px 0 rgba(125, 125, 125, 0.85),
    0 0 0 3px #2c2c2c,
    0 18px 40px var(--shadow);
}

.workbench {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: clamp(244px, 46vw, 326px);
  aspect-ratio: 1;
  padding: 18px;
  border-radius: 7px;
  /* tan corner brackets + wood body */
  background:
    linear-gradient(var(--wood-corner), var(--wood-corner)) 6px 6px / 26px 26px no-repeat,
    linear-gradient(var(--wood-corner), var(--wood-corner)) calc(100% - 6px) 6px / 26px 26px no-repeat,
    linear-gradient(var(--wood-corner), var(--wood-corner)) 6px calc(100% - 6px) / 26px 26px no-repeat,
    linear-gradient(var(--wood-corner), var(--wood-corner)) calc(100% - 6px) calc(100% - 6px) / 26px 26px no-repeat,
    linear-gradient(155deg, var(--wood-light), var(--wood) 52%, var(--wood-dark));
  box-shadow:
    inset 0 0 0 4px var(--wood-dark),
    0 0 0 4px #281a0c,
    0 16px 34px var(--shadow);
  touch-action: none;
  user-select: none;
}

.craft-cell,
.result-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  border-radius: 4px;
  background: var(--wood-cell);
  box-shadow:
    inset 3px 3px 0 rgba(0, 0, 0, 0.5),
    inset -2px -2px 0 rgba(165, 115, 60, 0.4);
}

.craft-cell.is-focused {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
  z-index: 2;
}

.craft-cell.is-filled:hover,
.search-chip:hover {
  filter: brightness(1.08);
}

.craft-cell .item-icon,
.result-slot .item-icon {
  width: 82%;
  height: 82%;
}

/* Flat arrow */
.craft-arrow {
  display: grid;
  place-items: center;
  width: clamp(46px, 8vw, 80px);
}

.craft-arrow::before {
  content: "";
  display: block;
  width: clamp(40px, 7vw, 70px);
  height: clamp(34px, 6vw, 52px);
  background: #5c5c5c;
  clip-path: polygon(0 36%, 60% 36%, 60% 12%, 100% 50%, 60% 88%, 60% 64%, 0 64%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}

.result-slot {
  width: clamp(92px, 14vw, 116px);
  aspect-ratio: 1;
  padding: 0;
  border: 6px solid var(--wood);
  box-shadow:
    inset 3px 3px 0 rgba(0, 0, 0, 0.5),
    inset -2px -2px 0 rgba(165, 115, 60, 0.4),
    0 0 0 4px var(--wood-dark),
    0 12px 26px var(--shadow);
}


/* --- Item tray = Minecraft inventory panel (6 slots) --- */
.hex-ring {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: fit-content;
  margin: 34px auto 10px;
  padding: 10px;
  background: var(--inv-panel);
  border-radius: 5px;
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.8),
    inset -3px -3px 0 rgba(125, 125, 125, 0.85),
    0 0 0 3px #2c2c2c,
    0 14px 30px var(--shadow);
}

.hex-row {
  display: flex;
  gap: 7px;
}

.hex-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  padding: 0;
  border: 0;
  background: transparent;
}

.hex-shape {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: var(--slot);
  box-shadow:
    inset 3px 3px 0 var(--slot-dark),
    inset -3px -3px 0 var(--slot-light);
}

.hex-slot:hover .hex-shape {
  filter: brightness(1.08);
}

.hex-slot[aria-pressed="true"] .hex-shape {
  box-shadow:
    inset 0 0 0 3px var(--orange),
    inset 3px 3px 0 var(--slot-dark),
    inset -3px -3px 0 var(--slot-light);
}

.hex-slot .item-icon {
  z-index: 2;
  width: 80px;
  height: 80px;
  transform: none;
}

.hex-number,
.hex-name {
  display: none;
}

/* --- Action row --- */
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

/* --- Info panel --- */
.info-panel {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 16px;
  padding: 16px;
  background: rgba(24, 24, 24, 0.86);
  border: 1px solid var(--tip-line);
  border-radius: 15px;
  box-shadow: 0 16px 40px var(--shadow);
}

.panel-section {
  padding: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.section-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.found-list,
.search-results {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

/* Recettes trouvées : uniquement les icônes, sans cadre ni texte */
.found-list {
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 10px;
}

.found-chip {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 58px;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.found-chip:hover {
  background: rgba(255, 255, 255, 0.08);
}

.found-chip .item-icon {
  width: 50px;
  height: 50px;
}

/* Éditeur : la recherche garde le nom + le type */
.search-chip {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #f2f2f2;
  text-align: left;
}

.search-chip .item-icon {
  width: 38px;
  height: 38px;
}

.search-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-meta {
  color: var(--muted);
  font-size: 0.76rem;
}

.field-label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#itemSearch,
#shareCode {
  width: 100%;
  border: 2px solid #3a3a3a;
  border-radius: 7px;
  outline: none;
  background: rgba(255, 255, 255, 0.94);
  color: #1a1a1a;
}

#itemSearch {
  height: 42px;
  padding: 0 10px;
}

#shareCode {
  resize: vertical;
  padding: 8px;
  line-height: 1.4;
}

.editor-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.editor-panel[hidden] {
  display: none;
}

/* --- Item icons --- */
.item-icon {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  overflow: visible;
}

.item-icon img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

/* --- Dialog --- */
.shortcut-dialog {
  max-width: 520px;
  border: 1px solid var(--tip-line);
  border-radius: 14px;
  background: var(--tip);
  color: var(--ink);
  box-shadow: 0 24px 70px var(--shadow);
}

.shortcut-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

/* --- Responsive --- */
@media (max-width: 1080px) {
  .app-shell {
    padding: 18px;
  }

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

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .topbar {
    align-items: start;
  }

  .mode-tabs {
    justify-content: start;
  }

  .crafting-zone {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .craft-arrow {
    transform: rotate(90deg);
  }

  .info-panel {
    grid-template-columns: 1fr;
  }

  .hex-slot {
    width: 72px;
    height: 72px;
  }

  .hex-slot .item-icon {
    width: 62px;
    height: 62px;
  }
}

/* ===== Home / hub (landing page) ===== */
.home-link {
  display: inline-block;
  margin-bottom: 4px;
  color: #ffe5a8;
  font-size: 0.85rem;
  text-decoration: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.home-link:hover {
  text-decoration: underline;
}

.hub {
  width: min(620px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hub-head {
  text-align: center;
}

.hub-title {
  margin: 0;
  line-height: 0;
}

.hub-logo {
  width: min(460px, 86vw);
  height: auto;
  image-rendering: auto;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.35)) drop-shadow(0 0 24px rgba(0, 0, 0, 0.5));
}

.hub-subtitle {
  margin: 22px 0 20px;
  color: #f2f2f2;
  font-size: clamp(1.2rem, 3.4vw, 1.8rem);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.mode-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.mode-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: rgba(22, 22, 22, 0.9);
  border: 2px solid #3a3a3a;
  border-radius: 14px;
  box-shadow: 0 12px 28px var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.1s ease, border-color 0.1s ease, background 0.1s ease;
}

.mode-card:not(.is-locked):hover {
  transform: translateY(-3px);
  border-color: var(--orange);
  background: rgba(34, 34, 34, 0.96);
}

.mode-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 66px;
  height: 66px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.mode-icon img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  image-rendering: auto;
}

.mode-icon--q {
  font-size: 2.6rem;
  color: #b9b9b9;
}

.mode-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.mode-title {
  color: var(--orange);
  font-size: clamp(1.3rem, 3.6vw, 1.7rem);
  line-height: 1;
}

.mode-desc {
  color: #c8c8c8;
  font-size: clamp(0.85rem, 2.3vw, 1rem);
}

.mode-card.is-locked {
  cursor: not-allowed;
  opacity: 0.6;
  filter: grayscale(0.3);
}

.mode-card.is-locked .mode-title {
  color: #d0d0d0;
}

/* Blockarium card on the home page (distinct from game modes) */
.wiki-card .mode-title {
  color: #8fe39b;
}

.wiki-card:not(.is-locked):hover {
  border-color: #8fe39b;
}

/* ===== Blockarium (wiki page) ===== */
.wiki-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 26px 24px 64px;
}

.wiki-head {
  text-align: center;
  margin-bottom: 28px;
}

.wiki-title {
  margin: 6px 0 0;
  font-size: clamp(2.2rem, 7vw, 4rem);
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.45), 0 0 22px rgba(0, 0, 0, 0.5);
}

.wiki-sub {
  margin: 10px 0 20px;
  color: #ffe5a8;
  font-size: clamp(0.9rem, 2.4vw, 1.1rem);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

#wikiSearch {
  width: min(480px, 100%);
  height: 46px;
  padding: 0 14px;
  border: 3px solid #2c2c2c;
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
}

.wiki-count {
  margin-top: 12px;
  color: #f0f0f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: rgba(22, 22, 22, 0.9);
  border: 2px solid #3a3a3a;
  border-radius: 14px;
  box-shadow: 0 12px 28px var(--shadow);
}

.recipe-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
  padding: 5px;
  background: var(--inv-panel);
  border-radius: 5px;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.7),
    inset -2px -2px 0 rgba(120, 120, 120, 0.85);
}

.mini-cell {
  display: grid;
  place-items: center;
  background: var(--slot);
  border-radius: 2px;
  box-shadow:
    inset 2px 2px 0 var(--slot-dark),
    inset -2px -2px 0 var(--slot-light);
}

.mini-cell .item-icon {
  width: 88%;
  height: 88%;
}

.mini-arrow {
  flex: 0 0 auto;
  width: 30px;
  height: 22px;
  background: #cdcdcd;
  clip-path: polygon(0 36%, 58% 36%, 58% 12%, 100% 50%, 58% 88%, 58% 64%, 0 64%);
}

.recipe-result {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
}

.recipe-result .item-icon {
  width: 70px;
  height: 70px;
}

.recipe-name {
  color: var(--orange);
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .recipe-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Ad zone (placeholder, prêt pour AdSense) ===== */
.ad-zone {
  width: min(1100px, 100%);
  margin: 30px auto 0;
  padding: 0 20px;
}

/* Conteneur de pub : aucun cadre ni fond — la pub se fond dans la page.
   Tant qu'aucune annonce n'est chargée, le bloc est invisible (aucune trace). */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot:empty {
  display: none;
}

.ad-zone:has(.ad-slot:empty) {
  display: none;
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 38px;
  padding: 26px 20px 30px;
  background: rgba(14, 14, 14, 0.92);
  border-top: 2px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.footer-id {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.footer-name {
  color: #fff;
  font-size: 1.3rem;
}

.footer-tag {
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-nav a {
  color: #e9e9e9;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-nav a:hover {
  color: var(--orange);
}

.footer-legal {
  width: min(1100px, 100%);
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

/* ===== Footer legal links ===== */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 18px;
  width: min(1100px, 100%);
  margin: 16px auto 0;
}

.footer-links a,
.footer-link-btn {
  color: #cfcfcf;
  font-size: 0.85rem;
  text-decoration: none;
}

.footer-link-btn {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.footer-links a:hover,
.footer-link-btn:hover {
  color: var(--orange);
  text-decoration: underline;
}

/* ===== Legal pages (mentions / confidentialité) ===== */
.legal {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 26px 22px 56px;
  color: var(--ink);
}

.legal h1 {
  margin: 14px 0 4px;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
}

.legal-updated {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.85rem;
}

.legal section {
  margin: 0 0 22px;
  padding: 18px 20px;
  background: rgba(20, 20, 20, 0.86);
  border: 1px solid var(--tip-line);
  border-radius: 12px;
}

.legal h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--orange);
}

.legal p {
  margin: 0 0 10px;
  line-height: 1.6;
}

.legal ul {
  margin: 0 0 10px;
  padding-left: 22px;
  line-height: 1.6;
}

.legal a {
  color: #8fbdf0;
}

.legal code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9em;
}

.legal-links-inline {
  margin-top: 26px;
  text-align: center;
  color: var(--muted);
}

/* ===== Cookie consent banner ===== */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  width: min(720px, calc(100% - 24px));
  padding: 16px 20px;
  background: var(--tip);
  border: 1px solid var(--tip-line);
  border-radius: 14px;
  box-shadow: 0 18px 44px var(--shadow);
}

.cookie-text {
  flex: 1 1 280px;
  margin: 0;
  color: #e9e9e9;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-text a {
  color: #8fbdf0;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.cookie-accept {
  background: linear-gradient(var(--green-light), var(--green));
  color: #0d1c0b;
}

/* ===== Écran de chargement ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: linear-gradient(180deg, #211b12 0%, #15110b 100%);
  transition: opacity 0.4s ease;
}

.loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  image-rendering: auto;
  animation: loader-pulse 1.1s ease-in-out infinite;
}

@keyframes loader-pulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.08); opacity: 1; }
}

.loader-bar {
  width: 180px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.loader-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 4px;
  background: var(--orange);
  animation: loader-slide 1s ease-in-out infinite;
}

@keyframes loader-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-logo,
  .loader-bar span {
    animation: none;
  }
}
