@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #14161A;
  --bg-dot: #1E2126;
  --panel: #1B1E23;
  --panel-2: #22262C;
  --border: #2E3239;
  --text: #E8EAED;
  --text-dim: #8B9099;
  --amber: #F2A65A;
  --danger: #F16E6E;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; min-height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  background-image: radial-gradient(var(--bg-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--text);
}

body {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px; gap: 18px;
}

.carte {
  width: 100%; max-width: 420px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 36px 30px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: apparition 0.4s ease;
}
@keyframes apparition {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.logo {
  font-size: 30px; color: var(--amber); margin-bottom: 10px;
}

h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; letter-spacing: 0.5px; margin: 0 0 8px;
}

.tagline {
  font-size: 13px; color: var(--text-dim); margin: 0 0 26px; line-height: 1.5;
}

.etat {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--text-dim); margin-bottom: 14px; min-height: 16px;
}
.etat.erreur { color: var(--danger); }

.spinner {
  flex: none;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--amber);
  animation: tourner 0.7s linear infinite;
}
@keyframes tourner { to { transform: rotate(360deg); } }

.bouton-telecharger {
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 15px 20px; border-radius: 12px;
  background: linear-gradient(155deg, #FFC988, var(--amber) 65%);
  color: #14161A; text-decoration: none;
  font-family: 'Inter', sans-serif;
  box-shadow:
    0 10px 24px -8px color-mix(in srgb, var(--amber) 65%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.bouton-telecharger:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow:
    0 14px 30px -8px color-mix(in srgb, var(--amber) 75%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.4);
}
.bouton-telecharger:active { transform: translateY(0) scale(0.99); }
.bouton-telecharger.disabled {
  pointer-events: none; opacity: 0.4; box-shadow: none; filter: none;
}

.icone-telecharger {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(20,22,26,0.14);
  display: flex; align-items: center; justify-content: center;
}

.bouton-texte { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.bouton-titre { font-weight: 700; font-size: 15px; letter-spacing: 0.1px; }

.version {
  font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 10.5px;
  color: #14161A; opacity: 0.6;
}

.details {
  font-size: 11px; color: var(--text-dim); margin: 16px 0 0;
  font-family: 'JetBrains Mono', monospace;
}

.note-securite {
  margin-top: 20px; padding: 14px 16px;
  background: color-mix(in srgb, var(--amber) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  border-radius: 10px;
  font-size: 12px; line-height: 1.55; color: var(--text-dim); text-align: left;
}
.note-securite-titre {
  color: var(--amber); font-weight: 600; font-size: 12px; margin-bottom: 8px;
}
.note-securite p { margin: 0 0 8px; }
.note-securite p:last-child { margin-bottom: 0; }
.note-securite em { color: var(--text); font-style: normal; font-weight: 600; }

.appareil-incompatible {
  display: none; flex-direction: column; align-items: center; gap: 10px;
  width: 100%; padding: 22px 20px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: 12px; text-align: center;
  animation: apparition 0.4s ease;
}
.appareil-incompatible-icone { font-size: 26px; color: var(--danger); }
.appareil-incompatible p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-dim); }
.appareil-incompatible p em { color: var(--text); font-style: normal; font-weight: 600; }

.en-savoir-plus {
  margin-top: 16px; text-align: left;
  font-size: 11px; color: var(--text-dim);
}
.en-savoir-plus summary {
  cursor: pointer; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--text-dim); user-select: none; list-style: none;
  display: flex; align-items: center; gap: 6px;
}
.en-savoir-plus summary::-webkit-details-marker { display: none; }
.en-savoir-plus summary::before {
  content: '▸'; display: inline-block; transition: transform 0.15s ease; color: var(--text-dim);
}
.en-savoir-plus[open] summary::before { transform: rotate(90deg); }
.en-savoir-plus summary:hover { color: var(--text); }
.en-savoir-plus summary:hover::before { color: var(--text); }

.en-savoir-plus dl {
  margin: 10px 0 0; padding: 4px 14px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
}
.en-savoir-plus dl div { padding: 8px 0; border-bottom: 1px solid var(--border); }
.en-savoir-plus dl div:last-child { border-bottom: none; }
.en-savoir-plus dt {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-dim); margin-bottom: 3px;
}
.en-savoir-plus dd {
  margin: 0; color: var(--text); font-family: 'JetBrains Mono', monospace;
  font-size: 12px; line-height: 1.4;
}

footer {
  font-size: 11px; color: var(--text-dim); text-align: center; max-width: 420px; line-height: 1.7;
}
.lien-admin { color: var(--text-dim); text-decoration: underline; }
.lien-admin:hover { color: var(--amber); }
