:root {
  color-scheme: dark;
  --bg: #101620;
  --surface: #172034;
  --surface-strong: #1f2a48;
  --text: #edf2ff;
  --muted: #9ab1d4;
  --accent: #5ec5a8;
  --danger: #eb6f6f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #0d1324 0%, #11192f 100%);
  color: var(--text);
}

.app-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

header h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 3vw, 3rem);
}

header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.controls,
.status-panel,
.log-panel,
.audio-note {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 22px;
}

.controls {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
}

.field-note {
  color: var(--muted);
  font-size: 0.85rem;
}

select,
input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

button {
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #5ec5a8 0%, #3cb39d 100%);
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button.secondary {
  background: linear-gradient(135deg, #d95a6c 0%, #c64555 100%);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status-panel {
  display: grid;
  gap: 14px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.status-row .label {
  color: var(--muted);
}

.log-panel h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

#log {
  min-height: 140px;
  max-height: 260px;
  overflow-y: auto;
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.log-entry {
  margin: 0 0 10px;
  line-height: 1.5;
}

.audio-note p,
.audio-note ul {
  margin: 0;
  color: var(--muted);
}

.audio-note ul {
  margin-top: 10px;
  padding-left: 18px;
}

code {
  color: var(--accent);
  font-family: monospace;
}

/* ==========================================================================
   ZONE PARTENAIRE & AFFILIATION PREMIUM
   ========================================================================== */

.zone-partenaire {
  margin-top: 32px;
  background: linear-gradient(185deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 28px 24px;
  backdrop-filter: blur(8px);
}

.zone-partenaire h3 {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-partenaire {
  margin: 0 0 28px 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.grille-produits {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}

.carte-produit {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease;
}

.carte-produit:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 153, 0, 0.4);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

.carte-produit h4 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffb03a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.carte-produit p {
  margin: 0 0 20px 0;
  font-size: 0.88rem;
  color: #b4c6e4;
  line-height: 1.6;
  flex-grow: 1;
}

.bouton-amazon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff9900 0%, #e67e22 100%);
  color: #0b0f19 !important;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: opacity 0.2s ease, filter 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.2);
}

.bouton-amazon:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 16px rgba(255, 153, 0, 0.3);
}

.mention-legale {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(154, 177, 212, 0.4);
  line-height: 1.4;
}

/* Media Queries pour la mise en page responsive */
@media (min-width: 720px) {
  .controls {
    grid-template-columns: 1fr 1fr;
  }
  .controls > button {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .grille-produits {
    grid-template-columns: repeat(3, 1fr);
  }
}