/* ======================================================
   WALL PHOTOS — v0.8.1 UI (corrigé)
   Feuille de style globale (Upload / Galerie / Polaroid)
   Thème sombre moderne, boutons uniformes sans soulignement
   ====================================================== */

:root {
  --bg: #0f1115;
  --panel: #151821;
  --panel-2: #1b1f2b;
  --text: #e6e7ea;
  --muted: #9aa2b1;
  --accent: #69b4ff;
  --accent-2: #8ee3a1;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px;
}

h1, h2, h3 { margin: 0 0 14px; }

/* Liens globaux (pas les boutons) */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Cartes */
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.spacer { height: 18px; }

/* ================================
   BUTTONS (uniformisés)
   ================================ */
.button,
a.button,
button.button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 600;
  color: #0b0d12;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(105,180,255,.35);
  transition: transform .08s ease, filter .2s ease, box-shadow .2s ease;
  text-decoration: none !important;
  display: inline-block;
}

/* État de survol/actif */
.button:hover,
a.button:hover {
  filter: brightness(1.05);
  text-decoration: none !important;
  transform: translateY(-1px);
}
.button:active,
a.button:active {
  transform: translateY(1px);
}

/* Variantes */
.button.secondary,
a.button.secondary {
  background: #2a3142;
  color: var(--text);
  box-shadow: none;
}
.button.danger,
a.button.danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255,107,107,.35);
}

/* Inputs */
.input, .file {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  background: #0d0f14;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  outline: none;
}
.label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 14px;
}

/* Upload page layout */
.form {
  display: grid;
  gap: 14px;
}

/* Gallery grid */
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.figure {
  background: #0d0f14;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.figure img {
  width: 100%;
  display: block;
}
.figcap {
  padding: 10px;
  font-size: 14px;
  color: var(--muted);
}
.figcap b {
  color: var(--text);
  font-weight: 600;
  display: block;
}

/* Polaroid page base */
#stage {
  position: relative;
  width: 100vw;
  height: 100vh;
}
.polaroid {
  position: absolute;
  width: clamp(180px, 22vw, 260px);
  background: #fff;
  color: #222;
  padding: 10px 10px 22px; /* bas = légende */
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.40);
  transform-origin: center center;
  transition: transform 360ms ease, opacity 420ms ease;
  opacity: 0;
}
.polaroid img {
  width: 100%;
  display: block;
  border-radius: 6px;
}
.polaroid .caption {
  margin-top: 8px;
  font-size: 14px;
  text-align: center;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Subtle float animation for variety */
@keyframes float {
  0%   { transform: translate(var(--x), var(--y)) rotate(var(--rot)); }
  50%  { transform: translate(calc(var(--x) + 6px), calc(var(--y) - 6px)) rotate(calc(var(--rot) + .8deg)); }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--rot)); }
}
.polaroid.float {
  animation: float 14s ease-in-out infinite;
}

/* HUD / toolbar */
.hud {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(0,0,0,.45);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
}
.hud a {
  color: #fff;
  text-decoration: none;
}
.badge {
  color: #c9d1e2;
  font-size: 13px;
}

/* Fullscreen hint button */
.fullscreen {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 9999;
}

/* --- v0.8.2: Auto-hide UI in fullscreen --- */
.autohide {
  transition: opacity .35s ease;
}
.autohide.hidden {
  opacity: 0;
  pointer-events: none;
}
body.idle {
  cursor: none;
}

/* [FORCE LINK RESET — version corrigée et propre] */
a.button[href],
a.button[href]:link,
a.button[href]:visited,
a.button[href]:hover,
a.button[href]:focus,
a.button[href]:active {
  all: unset;
  display: inline-block;
  cursor: pointer;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 600;
  border-radius: 12px;
  padding: 11px 16px;
  box-shadow: 0 6px 18px rgba(105,180,255,.35);
  transition: transform .08s ease, filter .2s ease, box-shadow .2s ease;
  text-decoration: none !important; /* <== RESTAURÉ ICI */
}

a.button[href]:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  text-decoration: none !important; /* <== RESTAURÉ ICI */
}
a.button[href]:active {
  transform: translateY(1px);
}
