/* TomCat Soft v2 — Dark Retro-Futuriste — PHP 8 / OVH */
/* Palette cohérente etherioo.com + accents vert-émeraude shareware */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Rajdhani:wght@400;500;600;700&family=Exo+2:ital,wght@0,300;0,400;0,600;1,300&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --bg-base:       #0a0c0f;
  --bg-surface:    #111418;
  --bg-card:       #161b22;
  --bg-card-hover: #1c2330;
  --border:        #2a3140;
  --border-accent: #1e7a4a;

  --text-primary:  #e2e8f0;
  --text-muted:    #8896a8;
  --text-dim:      #4a5568;

  --accent:        #00d16c;   /* vert émeraude — couleur historique shareware */
  --accent-dim:    #00994e;
  --accent-glow:   rgba(0, 209, 108, 0.15);
  --accent2:       #0ea5e9;   /* bleu ciel pour variantes */
  --warn:          #f59e0b;

  --font-display:  'Rajdhani', sans-serif;
  --font-body:     'Exo 2', sans-serif;
  --font-mono:     'Share Tech Mono', monospace;

  --radius:        6px;
  --radius-lg:     12px;
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --shadow-accent: 0 0 20px rgba(0, 209, 108, 0.2);
  --transition:    0.2s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  /* Subtle scanline texture */
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.04) 2px,
      rgba(0,0,0,0.04) 4px
    );
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); color: var(--accent); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent);
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HEADER / NAV ===== */
header {
  background: linear-gradient(180deg, #0d1117 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo img {
  height: 42px;
  width: auto;
  image-rendering: pixelated; /* respect du GIF original */
  filter: drop-shadow(0 0 6px var(--accent));
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.06em;
}

.logo-text span { color: var(--accent); }

nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}

nav a:hover, nav a.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border);
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: normal;
  color: var(--text-dim);
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn:hover, .lang-btn.active {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

/* Hamburger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-muted);
  transition: all var(--transition);
}

/* ===== HERO ===== */
.hero {
  padding: 5rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0,209,108,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  background: var(--accent-glow);
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* ===== SECTION ===== */
section {
  padding: 3.5rem 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-accent), transparent);
}

/* ===== PRODUCT CARDS ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.product-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
  color: inherit;
}

.product-card:hover::before { opacity: 1; }

.product-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.product-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.75rem;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag.freeware { border-color: var(--accent-dim); color: var(--accent); }
.tag.shareware { border-color: #0ea5e960; color: var(--accent2); }

.product-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== BOUTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: #00ff84;
  color: #000;
  box-shadow: 0 0 20px rgba(0,209,108,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}
.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--accent);
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
}

/* ===== PRODUCT PAGE ===== */
.product-hero {
  padding: 3rem 0 2rem;
}

.product-header {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.product-screenshot {
  flex: 0 0 auto;
  max-width: 320px;
}

.product-screenshot img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform var(--transition);
}
.product-screenshot img:hover { transform: scale(1.02); }

.product-info { flex: 1; min-width: 280px; }

.product-info h1 { margin-bottom: 0.5rem; }

.product-specs {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.product-specs span::before {
  content: '▸ ';
  color: var(--accent);
}

.product-features {
  list-style: none;
  margin: 1.5rem 0;
}
.product-features li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.product-features li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.download-box {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.download-info {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.download-counter {
  font-size: 1.1rem;
  color: var(--accent);
}

/* ===== PENDU GAME ===== */
.pendu-container {
  max-width: 800px;
  margin: 0 auto;
}

.pendu-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.pendu-gallows {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

#pendu-svg {
  width: 100%;
  height: 200px;
}

.pendu-word-zone {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.pendu-letter-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 44px;
  border-bottom: 2px solid var(--border-accent);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  transition: all var(--transition);
}

.pendu-letter-box.space { border-bottom-color: transparent; width: 16px; }

.pendu-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 1rem 0;
}

.pendu-key {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-primary);
  text-transform: uppercase;
  transition: all var(--transition);
}

.pendu-key:hover:not(:disabled) {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: var(--accent-glow);
}

.pendu-key:disabled { opacity: 0.25; cursor: not-allowed; }
.pendu-key.good { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.pendu-key.bad  { border-color: #ef444460; color: #ef4444; background: rgba(239,68,68,0.08); }

.pendu-definition {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1rem;
  padding: 0.75rem;
  border-left: 2px solid var(--border-accent);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pendu-status {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  padding: 0.75rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  display: none;
}
.pendu-status.win { background: var(--accent-glow); color: var(--accent); display: block; }
.pendu-status.lose { background: rgba(239,68,68,0.1); color: #ef4444; display: block; }

.tries-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
}

/* ===== PRESS ===== */
.press-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.press-entry h3 {
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.press-source {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: block;
}

.press-entry p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== SUPPORT / CONTACT ===== */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 640px;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea { resize: vertical; min-height: 120px; }

.form-notice {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

footer a { color: var(--text-dim); }
footer a:hover { color: var(--accent); }

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== UTILITIES ===== */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-mono   { font-family: var(--font-mono); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.wrap { flex-wrap: wrap; }
.align-center { align-items: center; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; background: var(--bg-surface);
        border-bottom: 1px solid var(--border); padding: 1rem; }
  nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .pendu-layout { grid-template-columns: 1fr; }
  .product-header { flex-direction: column; }
  .product-screenshot { max-width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
}
