/* inter-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  src: url("./fonts/inter-v20-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  src: url("./fonts/inter-v20-latin-500.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  src: url("./fonts/inter-v20-latin-600.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  src: url("./fonts/inter-v20-latin-700.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-800 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  src: url("./fonts/inter-v20-latin-800.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* playfair-display-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  src: url("./fonts/playfair-display-v40-latin-600.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* playfair-display-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  src: url("./fonts/playfair-display-v40-latin-700.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
:root {
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --page-pad: clamp(12px, 3vw, 24px);
}
html[data-theme="dark"] {
  --bg: #0a0b0f;
  --bg-gradient: radial-gradient(circle at 20% 0%, #1a1408 0%, #0a0b0f 45%);
  --panel: rgba(23, 26, 33, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f2f0;
  --muted: #8b909c;
  --gold: #e6c158;
  --gold-soft: #d4af37;
  --gold-dark: #9c7d24;
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  --input-bg: rgba(255, 255, 255, 0.04);
  --up: #4ade80;
  --down: #f87171;
}
html[data-theme="light"] {
  --bg: #f4f2ec;
  --bg-gradient: radial-gradient(circle at 20% 0%, #fff9e8 0%, #f4f2ec 45%);
  --panel: rgba(255, 255, 255, 0.75);
  --border: rgba(20, 20, 20, 0.08);
  --border-strong: rgba(20, 20, 20, 0.14);
  --text: #1b1c1f;
  --muted: #6b6f78;
  --gold: #a9791a;
  --gold-soft: #b8942c;
  --gold-dark: #8a6414;
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  --input-bg: rgba(0, 0, 0, 0.03);
  --up: #16a34a;
  --down: #dc2626;
}
a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  background-image: linear-gradient(135deg, var(--gold-soft), var(--gold));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--transition), color var(--transition);
  padding-bottom: 1px;
}

a:hover,
a:focus-visible {
  background-size: 100% 2px;
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

a:visited {
  color: var(--gold-dark);
}
* {
  box-sizing: border-box;
  min-width: 0;
}
html,
body {
  overflow-x: hidden;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
header {
  padding: 28px var(--page-pad) 18px;
  text-align: center;
  position: relative;
}
.header-actions {
  position: absolute;
  top: 18px;
  right: var(--page-pad);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.theme-toggle {
  position: static;
  top: 18px;
  right: var(--page-pad);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
  font-size: 1.1rem;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-inline: 56px;
  flex-wrap: wrap;
}
.brand-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 6px rgba(212, 175, 55, 0.35));
}
header h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.1;
}
header h1 span {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
header p {
  margin: 10px auto 0;
  color: var(--muted);
  font-size: clamp(0.85rem, 2.6vw, 0.95rem);
  line-height: 1.45;
  max-width: 60ch;
  padding-inline: 8px;
}
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px var(--page-pad) 32px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: stretch;
}
.container-a-propos {
  max-width:1180px;
  margin:0 auto;
  padding:12px var(--page-pad) 32px;
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
  align-items:start;
}
.container-contact{
  max-width:820px;
  margin:0 auto;
  padding:12px var(--page-pad) 32px;
}
.card {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 2.5vw, 22px);
  box-shadow: var(--shadow);
}
#chart-container {
  height: clamp(280px, 46vw, 440px);
  width: 100%;
}
.tools-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.tools-box {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px 12px;
  overflow: hidden;
  cursor: pointer;
}
.tools-box .label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  color: var(--gold);
  letter-spacing: 0.7px;
  font-weight: 600;
}
.tools-box .value {
  font-size: 14px;
  margin-top: 4px;
  color: var(--muted);
  font-family: "Playfair Display", serif;
  overflow-wrap: anywhere;
}
.price-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.price-box {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px 12px;
  overflow: hidden;
}
.price-box .label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
}
.price-box .value {
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  font-weight: 700;
  color: var(--gold);
  margin-top: 4px;
  font-family: "Playfair Display", serif;
  overflow-wrap: anywhere;
}
.price-box .delta {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.delta.up {
  color: var(--up);
}
.delta.down {
  color: var(--down);
}
.converter h2 {
  margin: 0 0 18px;
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
}
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field input,
.field select {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}

html[data-theme="dark"] .field select {
  color-scheme: dark;
}

html[data-theme="light"] .field select {
  color-scheme: light;
}
.unit-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.unit-btn {
  min-height: 44px;
  padding: 10px 8px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.unit-btn.active {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-dark));
  color: white;
  border-color: transparent;
}
.result {
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.14),
    rgba(212, 175, 55, 0.03)
  );
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
  margin-top: 8px;
  min-height: 60px;
}
.result .amount {
  font-size: clamp(1.45rem, 6vw, 1.9rem);
  font-weight: 800;
  color: var(--gold);
  font-family: "Playfair Display", serif;
  overflow-wrap: anywhere;
}
.result .sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.quick-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
}
.quick-card .q-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.quick-card .q-value {
  font-size: clamp(0.95rem, 3.2vw, 1rem);
  color: var(--gold);
  font-weight: 700;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
footer {
  text-align: center;
  padding: 16px var(--page-pad) 24px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}
.footer-links {
  display: flex; 
  flex-wrap: wrap; 
  gap: 14px; 
  justify-content: center; 
  padding: 8px 0 6px
}
.status {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.4;
}
.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 8px var(--up);
  animation: pulse 2s infinite;
  flex: 0 0 auto;
}
.status.error .dot {
  background: var(--down);
  box-shadow: 0 0 8px var(--down);
  animation: none;
}
.chart-description {
  font-family: "Inter" sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: #888;
  margin: 10px 0;
}
.chart-context {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 68ch;
}

figure {
  margin: 0;
}

.chart-caption {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}
.news-item p em {
  font-style: normal;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
@media (max-width: 980px) {
  .container {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 44px auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
    padding-top: 16px;
    padding-bottom: 14px;
    text-align: left;
    position: static;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-inline: 0;
    gap: 8px;
    min-width: 0;
    height: 44px;
  }

  .brand-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex: 0 0 auto;
  }

  header h1 {
    font-size: clamp(1.05rem, 5vw, 1.3rem);
    line-height: 1;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
    position: static;
    top: auto;
    right: auto;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
  }

  header p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    text-align: left;
    padding-inline: 0;
  }
  .price-row {
    grid-template-columns: 1fr;
  }
  .tools-row {
    grid-template-columns: 1fr;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .chart-caption {
    font-size: 0.78rem;
    padding-top: 6px;
  }
  .header-actions {
    top: 14px;
  }
  .theme-toggle {
    width: 40px;
    height: 40px;
  }
  .brand {
    padding-inline: 70px;
  }
  .container {
    padding-top: 8px;
    gap: 14px;
  }
  .card {
    border-radius: 14px;
  }
  .unit-toggle {
    grid-template-columns: 1fr;
  }
  #chart-container {
    min-height: 300px;
  }
}
@media (max-width: 480px) {
  header {
    grid-template-rows: 38px auto;
  }

  .brand,
  .header-actions {
    height: 38px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  header h1 {
    font-size: clamp(0.95rem, 4.8vw, 1.15rem);
  }

  .brand-icon {
    font-size: 1.15rem;
  }

  .brand {
    padding-inline: 12px;
  }
}
.news-history {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: stretch;
}
.news-card,
.history-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section-head h2 {
  margin: 0;
}
.section-head .meta {
  font-size: 1rem;
  font-weight:bold;
  color: var(--muted);
}
.news-list {
  display: grid;
  gap: 12px;
}
.news-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--input-bg);
}
.news-item h3 {
  font-size: 1rem;
  line-height: 1.35;
  margin: 0;
}
.news-item a {
  color: inherit;
  text-decoration: none;
}
.news-item a:hover {
  text-decoration: underline;
}
.news-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.news-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--muted);
}
.news-empty {
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  color: var(--muted);
  background: var(--input-bg);
}
.history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.history-stat {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--input-bg);
}
.history-stat .label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.history-stat .value {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.history-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.history-stat .value.trend-up {
  color: var(--up);
}

.history-stat .value.trend-down {
  color: var(--down);
}
.history-stat .value.trend-up::before {
  content: "▲ ";
  font-size: 0.75em;
}

.history-stat .value.trend-down::before {
  content: "▼ ";
  font-size: 0.75em;
}
.h3href {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  background-image: linear-gradient(135deg, var(--gold-soft), var(--gold));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--transition), color var(--transition);
  padding-bottom: 1px;
}
.rating-card {
  margin-top: 20px;
}
.rating-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--input-bg);
  margin-bottom: 16px;
}
.rating-score {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  font-family: "Playfair Display", serif;
}
.rating-stars {
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 1.1rem;
}
.rating-count {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}
.rating-form .hp {
  display: none;
}
.rating-inputs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.star-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.star-btn.active,
.star-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
}
.rating-field {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.rating-field legend {
  display: block;
  padding: 0;
  margin: 0 0 7px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
@media (max-width: 640px) {
  .rating-summary {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .rating-count {
    text-align: center;
  }
  .rating-inputs {
    justify-content: center;
  }
}
.field textarea,
#rating-message {
  width: 100%;
  max-width: 100%;
  min-height: 140px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    background 0.25s ease;
}

.field textarea::placeholder,
#rating-message::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
html[data-theme="dark"] select,
html[data-theme="dark"] select option {
  background-color: #1d1f25;
  color: #f2f2f0;
}

html[data-theme="dark"] select option:checked,
html[data-theme="dark"] select option:hover {
  background-color: #a9791a;
  color: #0a0b0f;
}

html[data-theme="light"] select,
html[data-theme="light"] select option {
  background-color: #ffffff;
  color: #1b1c1f;
}

html[data-theme="light"] select option:checked,
html[data-theme="light"] select option:hover {
  background-color: #b8942c;
  color: #1b1c1f;
}

.submit-btn {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-dark));
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.25s ease, transform 0.15s ease;
}

.submit-btn:hover {
  filter: brightness(1.06);
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .news-history {
    grid-template-columns: 1fr;
  }
  .history-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .history-grid {
    grid-template-columns: 1fr;
  }
}

.live-price-banner{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:14px 18px;
  align-items:start;
  background:linear-gradient(135deg, rgba(212,175,55,0.14), rgba(212,175,55,0.03));
  border:1px solid var(--gold-dark);border-radius:var(--radius-md);
  padding:16px 18px;margin-bottom:20px;
  text-align:center;
}
.live-price-banner .lp-main{
  display:flex;flex-direction:column;gap:4px;
  min-width:0;
}
.live-price-banner .lp-label{font-size:.72rem;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;font-weight:600;white-space:nowrap;}
.live-price-banner .lp-value{font-family:'Playfair Display',serif;font-size:clamp(1.1rem,3.4vw,1.5rem);font-weight:800;color:var(--gold);overflow-wrap:anywhere;line-height:1.15;}
.live-price-banner .lp-delta{font-size:.8rem;font-weight:600;}
.live-price-banner .lp-delta.up{color:var(--up);} .live-price-banner .lp-delta.down{color:var(--down);}
.live-price-banner .lp-updated{
  grid-column:1 / -1;
  font-size:.72rem;color:var(--muted);display:flex;align-items:center;gap:6px;
  margin-top:4px;padding-top:10px;
}
.live-price-banner .lp-updated .dot{width:6px;height:6px;border-radius:50%;background:var(--up);box-shadow:0 0 6px var(--up);animation:pulse 2s infinite;flex:0 0 auto;}

@media (max-width:640px){
  .live-price-banner{grid-template-columns:1fr 1fr;}
  .live-price-banner .lp-main:first-child{grid-column:1 / -1;}
}
@media (max-width:380px){
  .live-price-banner{grid-template-columns:1fr;}
}

.contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:8px;}
.contact-box{background:var(--input-bg);border:1px solid var(--border);border-radius:var(--radius-md);padding:16px;}
.contact-box .c-label{font-size:.72rem;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;font-weight:600;margin-bottom:6px;}
.contact-box .c-value{font-size:.95rem;color:var(--text);font-weight:600;word-break:break-word;}

.form-status{margin-top:12px;font-size:.85rem;text-align:center;color:var(--muted);min-height:1.2em;}
.form-status.success{color:var(--up);}
.form-status.error{color:var(--down);}

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

.card-contact{background:var(--panel);backdrop-filter:blur(16px);border:1px solid var(--border);border-radius:var(--radius-lg);padding:clamp(16px,3vw,28px);box-shadow:var(--shadow);margin-bottom:20px;}
.card-contact h2{margin:0 0 14px;font-family:'Playfair Display',serif;font-size:1.15rem;font-weight:700;color:var(--gold);}
.card-contact p{line-height:1.6;color:var(--text);margin:0 0 10px;}

#consent-banner,
#consent-banner *,
#consent-modal,
#consent-modal * {
  box-sizing: border-box;
}

#consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  width: 100%;
  max-width: 100vw;
  background: var(--panel, rgba(23, 26, 33, 0.96));
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
  padding: clamp(16px, 3vw, 24px) var(--page-pad, clamp(12px, 3vw, 24px));
  padding-bottom: calc(clamp(16px, 3vw, 24px) + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  color: var(--text, #f2f2f0);
  transform: translateY(0);
  transition: transform 0.35s ease, opacity 0.35s ease;
  overflow-x: hidden;
}
#consent-banner[hidden] {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
#consent-banner .consent-text {
  flex: 1 1 320px;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted, #8b909c);
  max-width: 68ch;
  overflow-wrap: anywhere;
}
#consent-banner .consent-text strong {
  color: var(--text, #f2f2f0);
}
#consent-banner .consent-text a {
  color: var(--gold, #e6c158);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.25s ease;
}
#consent-banner .consent-text a:hover {
  text-decoration-color: var(--gold, #e6c158);
}
#consent-banner .consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.consent-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  background: var(--input-bg, rgba(255, 255, 255, 0.04));
  color: var(--text, #f2f2f0);
  transition: background 0.25s ease, transform 0.15s ease,
    border-color 0.25s ease;
  white-space: nowrap;
  flex: 0 0 auto;
  width: auto;
}
.consent-btn:hover {
  border-color: var(--gold-soft, #d4af37);
}
.consent-btn:active {
  transform: scale(0.97);
}
.consent-btn.primary {
  background: linear-gradient(
    135deg,
    var(--gold-soft, #d4af37),
    var(--gold-dark, #9c7d24)
  );
  color: white;
  border-color: transparent;
}
.consent-btn.ghost {
  background: transparent;
  text-decoration: underline;
  border-color: transparent;
  color: var(--muted, #8b909c);
}

/* Panneau de préférences détaillées */
#consent-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 11, 15, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
#consent-modal[hidden] {
  display: none;
}
#consent-modal .modal-box {
  background: var(--panel, #171a21);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 18px);
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: clamp(16px, 4vw, 24px);
  color: var(--text, #f2f2f0);
  font-family: Inter, sans-serif;
}
#consent-modal h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  margin: 0 0 14px;
  color: var(--gold, #e6c158);
}
.consent-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.consent-option:last-of-type {
  border-bottom: none;
}
.consent-option-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.consent-option-text strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.consent-option-text span {
  font-size: 0.8rem;
  color: var(--muted, #8b909c);
  line-height: 1.5;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch label {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--input-bg, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  border-radius: 999px;
  transition: background 0.25s ease;
}
.switch label::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f2f2f0;
  transition: transform 0.25s ease;
}
.switch input:checked + label {
  background: linear-gradient(
    135deg,
    var(--gold-soft, #d4af37),
    var(--gold-dark, #9c7d24)
  );
}
.switch input:checked + label::after {
  transform: translateX(20px);
  background: #0a0b0f;
}
.switch input:disabled + label {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.modal-actions .consent-btn {
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  #consent-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 12px;
  }
  #consent-banner .consent-text {
    flex: 1 1 auto;
    max-width: 100%;
  }
  #consent-banner .consent-actions {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .consent-btn {
    width: 100%;
    flex: 1 1 auto;
  }
}

@media (max-width: 400px) {
  #consent-banner {
    padding: 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  #consent-banner .consent-text {
    font-size: 0.82rem;
  }
}

.converter .field{ margin-bottom:16px; }
.converter label{
  display:block; font-size:.85rem; color:var(--muted); margin-bottom:6px;
}
.converter input[type=number], .converter select{
  width:100%; padding:12px 14px; border-radius:10px; border:1px solid var(--border);
  background:var(--bg); color:var(--text); font-size:1rem;
}
.amount-row{
  width:100%;
}
.amount-row .field{
  width:100%;
}
.swap-row{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:16px 0;
}
.swap-btn{
  background:var(--gold); color:#0a0b0f; border:none; border-radius:50%;
  width:44px; height:44px; cursor:pointer; font-size:1.1rem; font-weight:700;
  display:flex; align-items:center; justify-content:center; margin-bottom:2px;
}
.swap-btn:hover{ background:var(--gold-dark); }
.result{
  margin-top:20px; text-align:center; padding:20px; border-radius:12px;
  background:rgba(212,175,55,0.08); border:1px solid var(--border);
}
.result .amount{ font-size:2rem; font-weight:700; color:var(--gold); }
.result .sub{ color:var(--muted); font-size:.9rem; margin-top:6px; }
.quick-grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:12px; margin-top:20px;
}
.quick-card{
  background:var(--bg); border:1px solid var(--border); border-radius:10px;
  padding:12px; text-align:center;
}
.quick-card .q-label{ font-size:.75rem; color:var(--muted); }
.quick-card .q-value{ font-weight:600; margin-top:4px; }
.status{
  display:flex; align-items:center; gap:8px; font-size:.85rem; color:var(--muted);
  margin-top:12px;
}
.dot{
  width:8px; height:8px; border-radius:50%; background:var(--gold); display:inline-block;
  animation:pulse 1.5s infinite;
}
.content-section p{ color:var(--muted); line-height:1.7; }
.or-content {margin-top: 16px;}
.or-content p{ color:var(--muted); line-height:1.7; }
.or-content h2{ color: #0a0b0f }

.diff-box{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:20px;
  text-align:center;
  margin-top:16px;
  transition:background .3s, border-color .3s;
}

.diff-label{
  font-size:.8rem;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.03em;
  margin-bottom:8px;
}

.diff-amount{
  font-size:1.8rem;
  font-weight:700;
  color:var(--text);
  line-height:1.2;
}

.diff-pct{
  font-size:.95rem;
  font-weight:600;
  margin-top:6px;
  color:var(--muted);
}

/* ==========================================================================
   Diff Box — Différence avec le prix d'achat
   Classes pilotées par calculerValeur() : .up / .down sur #diffBox
   ========================================================================== */

.diff-box{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:20px;
  text-align:center;
  margin-top:16px;
  transition:background .3s, border-color .3s;
}

.diff-label{
  font-size:.8rem;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.03em;
  margin-bottom:8px;
}

.diff-amount{
  font-size:1.8rem;
  font-weight:700;
  color:var(--text);
  line-height:1.2;
}

.diff-pct{
  font-size:.95rem;
  font-weight:600;
  margin-top:6px;
  color:var(--muted);
}

/* État hausse : classe "up" ajoutée par calculerValeur() quand diff >= 0 */
.diff-box.up{
  background:rgba(63,191,107,0.08);
  border-color:rgba(63,191,107,0.25);
}
.diff-box.up .diff-amount,
.diff-box.up .diff-pct{
  color:var(--up);
}
.diff-box.up .diff-pct::before{
  content:"▲ ";
  font-size:.8em;
}

/* État baisse : classe "down" ajoutée par calculerValeur() quand diff < 0 */
.diff-box.down{
  background:rgba(224,90,90,0.08);
  border-color:rgba(224,90,90,0.25);
}
.diff-box.down .diff-amount,
.diff-box.down .diff-pct{
  color:var(--down);
}
.diff-box.down .diff-pct::before{
  content:"▼ ";
  font-size:.8em;
}

/* État neutre (aucun prix d'achat renseigné) */
.diff-box:not(.up):not(.down) .diff-pct{
  font-style:italic;
  color:var(--muted);
}

@media (max-width:480px){
  .diff-amount{ font-size:1.5rem; }
  .diff-box{ padding:16px; }
}