/* =========================================================
   MinePixel — thème "Premium" doré / violet / ivoire
   Thème sombre par défaut. Le thème clair s'active via
   <html data-theme="light"> (voir le bouton de bascule).
   ========================================================= */

:root {
  --ivory: #16101f;
  --ivory-soft: #1c1529;
  --surface: #221a33;
  --surface-alt: #2a2140;

  --purple: #a377ff;
  --purple-dark: #8455f2;
  --purple-light: #bd9bff;

  --gold: #e8c25a;
  --gold-light: #f5dd9a;
  --gold-dark: #d3a935;
  --gold-grad: linear-gradient(135deg, #f7e2a3 0%, #e3b73f 35%, #b9862a 65%, #f5dd9a 100%);
  --gold-grad-soft: linear-gradient(90deg, rgba(232,194,90,0) 0%, rgba(232,194,90,.9) 50%, rgba(232,194,90,0) 100%);

  --text: #f3edde;
  --text-muted: #beb0d6;
  --border: #3c2f57;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* ----- Thème clair (activé via <html data-theme="light">) ----- */
html[data-theme="light"] {
  --ivory: #faf6ec;
  --ivory-soft: #fffdf6;
  --surface: #ffffff;
  --surface-alt: #f4ecd8;

  --purple: #6a3fd1;
  --purple-dark: #4b2a99;
  --purple-light: #8a63e8;

  --gold: #c9a227;
  --gold-light: #f2d27a;
  --gold-dark: #9c7a1e;
  --gold-grad: linear-gradient(135deg, #f6e2a0 0%, #d9ad38 35%, #a97e1a 65%, #f2d27a 100%);

  --text: #2c2440;
  --text-muted: #746a8a;
  --border: #e6d9b0;

  --shadow: 0 10px 30px rgba(90, 63, 20, 0.10);
}

html[data-theme="light"] body {
  background-image:
    radial-gradient(circle at 15% 0%, rgba(138,99,232,.08), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(201,162,39,.12), transparent 45%);
}

* {
  box-sizing: border-box;
  font-family: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1, h2, h3, .brand, .logo-font {
  font-family: "Cinzel", "Playfair Display", Georgia, serif;
}

body, html {
  background-color: var(--ivory);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(163, 119, 255, 0.14), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(232, 194, 90, 0.10), transparent 45%);
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100%;
  transition: background-color .25s ease, color .25s ease;
}

body, .site-header, .site-footer, .gilded, .form-input, .ip-row, .collab-type, .feature-card {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

h1, h2, h3 {
  margin: 0;
  padding: 0;
  color: var(--purple-dark);
}

a {
  color: var(--purple);
  text-decoration: none;
}

p { line-height: 1.6; color: var(--text-muted); }

.wrapper {
  width: 1000px;
  max-width: 92%;
  margin: 0 auto;
}


/* ----- Fil doré décoratif en haut de page ----- */
.gold-shimmer-line {
  height: 4px;
  width: 100%;
  background: var(--gold-grad);
  background-size: 200% auto;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* ----- En-tête / navigation ----- */

.site-header {
  background-color: var(--ivory-soft);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 14px rgba(90,63,20,.05);
}

.site-header .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand .brand-crown {
  color: var(--gold-dark);
  -webkit-text-fill-color: var(--gold-dark);
  font-size: 20px;
}

.brand.small { font-size: 17px; }

.menu {
  display: flex;
  align-items: center;
  gap: 26px;
}

.menu a {
  color: var(--purple-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  position: relative;
  padding: 4px 0;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--gold-grad);
  transition: width .25s ease;
}

.menu a:hover::after { width: 100%; }

.menu a.nav-cta {
  background: var(--purple);
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--gold);
}
.menu a.nav-cta::after { display: none; }
.menu a.nav-cta:hover { background: var(--purple-dark); }

/* ----- Bouton bascule thème clair / sombre ----- */

.theme-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--surface-alt);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 50%;
  text-align: center;
  font-size: 12px;
  line-height: 1;
  color: var(--gold-dark);
  z-index: 1;
  pointer-events: none;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-grad);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: transform .25s ease;
  transform: translateX(24px);
}

html[data-theme="light"] .theme-toggle::before {
  transform: translateX(0);
}

/* ----- Boutons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  border-radius: 8px;
  height: 46px;
  margin-top: 10px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn.purple {
  background: linear-gradient(135deg, var(--purple-light), var(--purple-dark));
  color: #fff;
  border: 1px solid var(--gold);
  box-shadow: 0 6px 18px rgba(106,63,209,.28);
}
.btn.purple:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(106,63,209,.35); }

.btn.gold {
  background: var(--gold-grad);
  color: #3c2c05;
  border: 1px solid var(--gold-dark);
}
.btn.gold:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(201,162,39,.35); }

.btn.outline {
  background-color: transparent;
  color: var(--purple-dark);
  border: 1px solid var(--border);
}
.btn.outline:hover { border-color: var(--gold); color: var(--gold-dark); }

/* ----- Cadre "doré" (gilded) réutilisable ----- */

.gilded {
  position: relative;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.gilded::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201,162,39,.35);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}

.gilded .corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
  pointer-events: none;
}
.gilded .corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.gilded .corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: var(--radius); }
.gilded .corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: var(--radius); }
.gilded .corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }

/* ----- Formulaires (connexion / inscription) ----- */

.login {
  display: flex;
  flex-flow: column;
  width: 400px;
  max-width: 92%;
  margin: 70px auto;
  padding: 34px;
}

.login h1 {
  text-align: center;
  font-size: 24px;
  padding-bottom: 6px;
}

.login .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.form {
  display: flex;
  flex-flow: column;
}

.form-label {
  padding: 15px 0 6px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple-dark);
}

.form-group {
  display: flex;
  width: 100%;
}

.form-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  background-color: var(--ivory-soft);
  color: var(--text);
  padding: 0 14px;
  border-radius: 8px;
}

.form-input::placeholder {
  color: #a89cc0;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,.18);
}

.form-link {
  text-decoration: none;
  font-weight: 700;
  color: var(--purple);
}

.register-link {
  margin: 0;
  padding: 18px 0 0 0;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.form-message {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--purple-dark);
  margin-bottom: 6px;
}

/* ----- Page d'accueil ----- */

.home-hero {
  text-align: center;
  margin: 70px auto 40px;
  max-width: 92%;
}

.home-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: var(--surface-alt);
  border: 1px solid var(--gold);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.home-hero h1 {
  font-size: 46px;
  margin-bottom: 14px;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero p {
  color: var(--text-muted);
  margin: 0 auto 28px;
  max-width: 520px;
  font-size: 16px;
}

.home-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ----- Boîte IP serveur ----- */

.ip-box {
  display: flex;
  flex-flow: column;
  gap: 10px;
  width: 480px;
  max-width: 100%;
  margin: 36px auto 0;
  padding: 20px;
}

.ip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ivory-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 8px 8px 14px;
}

.ip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: var(--purple);
  border-radius: 6px;
  padding: 4px 8px;
  flex-shrink: 0;
}

.ip-value {
  flex: 1;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.ip-value .port { color: var(--gold-dark); }

.copy-btn {
  border: 1px solid var(--gold);
  background: var(--surface);
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.copy-btn:hover { background: var(--gold-grad); color: #3c2c05; }
.copy-btn.outline { border-color: var(--border); color: var(--purple); }

/* ----- Grilles de fonctionnalités ----- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 10px auto 60px;
}

.feature-card {
  text-align: left;
}

.feature-card .icon {
  font-size: 22px;
  color: var(--gold-dark);
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  margin: 0;
}

/* ----- Contenu général ----- */

.content {
  width: 1000px;
  max-width: 92%;
  margin: 40px auto;
}

.page-title {
  margin-bottom: 26px;
}

.page-title .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 6px;
}

.page-title h2 {
  font-size: 30px;
}

.page-title p {
  margin-top: 6px;
}

.block {
  margin-bottom: 22px;
}

.block h2 {
  font-size: 18px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.profile-detail {
  display: flex;
  flex-flow: column;
  padding: 10px 0;
  font-size: 16px;
  border-bottom: 1px dashed var(--border);
}
.profile-detail:last-child { border-bottom: 0; }

.profile-detail strong {
  display: block;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ----- Films / galerie ----- */

.grid-films {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.film-card { padding: 0; overflow: hidden; }

.film-thumb {
  aspect-ratio: 16/9;
  width: 100%;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 34px;
}

.film-body { padding: 18px 20px 22px; }

.film-body h3 { font-size: 16px; margin-bottom: 6px; }
.film-body p { font-size: 13px; margin-bottom: 10px; }

.film-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gold-dark);
}

/* ----- Récompenses ----- */

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

.reward-card { text-align: center; }
.reward-card .rank {
  font-family: "Cinzel", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: var(--gold-grad);
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  color: #3c2c05;
}
.reward-card h3 { font-size: 18px; margin-bottom: 10px; }
.reward-card ul { text-align: left; margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 13px; line-height: 1.9; }

/* ----- Formulaire collaboration ----- */

.collab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}

.collab-types {
  display: flex;
  flex-flow: column;
  gap: 12px;
  margin: 16px 0 0;
}

.collab-type {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--ivory-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.collab-type .icon { color: var(--gold-dark); font-size: 18px; }
.collab-type h3 { font-size: 14px; margin-bottom: 4px; }
.collab-type p { font-size: 12px; margin: 0; }

textarea.form-input {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  min-height: 110px;
}

select.form-input {
  height: 44px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* ----- Pied de page ----- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--ivory-soft);
  margin-top: 60px;
  padding: 40px 0 20px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-grid p { font-size: 13px; max-width: 280px; }

.footer-ips .ip-box { margin: 0; padding: 0; width: 340px; }
.footer-ips .ip-row { padding: 7px 7px 7px 12px; }

.copyright {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: 30px 0 0;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--purple-dark);
  color: #fff;
  border: 1px solid var(--gold);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ----- Responsive ----- */

@media (max-width: 720px) {
  .site-header .wrapper { flex-flow: column; height: auto; padding: 14px 0; gap: 12px; }
  .menu { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .features { grid-template-columns: 1fr; }
  .grid-films { grid-template-columns: 1fr; }
  .grid-rewards { grid-template-columns: 1fr; }
  .collab-grid { grid-template-columns: 1fr; }
  .home-hero h1 { font-size: 32px; }
  .footer-grid { justify-content: center; text-align: center; }
  .footer-ips .ip-box { margin: 0 auto; }
}

/* ----- Administration ----- */

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table th {
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.admin-table tbody tr:hover {
  background: var(--surface-alt);
}

.badge-admin {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #3c2c05;
  background: var(--gold-grad);
  padding: 3px 10px;
  border-radius: 999px;
}

.badge-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--purple-dark);
  background: var(--surface-alt);
  border: 1px solid var(--purple);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-status.is-treated {
  color: var(--gold-dark);
  border-color: var(--gold);
}

.admin-self-note {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-btn-small {
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
  margin-top: 0;
}

.admin-btn-danger {
  color: #e07a72;
  border-color: #e07a72;
}
.admin-btn-danger:hover {
  background: #e07a72;
  color: #2c1010;
}

.collab-req-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

h2.no-border {
  border: 0;
  padding: 0;
  margin-bottom: 0;
}
