:root {
  --bg: #121212;
  --surface: #181818;
  --interactive: #1f1f1f;
  --elevated: #242424;
  --border: #3a3a3a;
  --text: #ffffff;
  --text-muted: #b3b3b3;
  --accent: #ff6b35;
  --accent-dark: #e85a2a;
  --success: #3ecf8e;
  --warning: #ffb020;
  --error: #f2555d;
  --info: #4da8da;

  --font-display: 'Cabinet Grotesk', 'Instrument Sans', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
  --font-data: 'Geist', sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
}
.site-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}
.site-logo span { color: var(--accent); }
.site-nav-links { display: flex; gap: 28px; font-size: 14px; }
.site-nav-links a { color: var(--text-muted); text-decoration: none; }
.site-nav-links a.active { color: var(--text); font-weight: 600; }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.page-wide {
  max-width: 1100px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.page-header p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 32px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-group { margin-bottom: 20px; }
.input-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  background: var(--interactive);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}
textarea.input { resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); }
.input.error { border-color: var(--error); }
.input-error-msg { color: var(--error); font-size: 12px; margin-top: 4px; }

.input-file { padding: 10px 12px; }
.input-file::file-selector-button {
  background: var(--elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  margin-right: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #121212; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--interactive); color: var(--text); border: 1px solid var(--border); }
.btn + .btn { margin-top: 12px; }

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: rgba(62,207,142,0.12); color: var(--success); border-color: rgba(62,207,142,0.3); }
.alert-error { background: rgba(242,85,93,0.12); color: var(--error); border-color: rgba(242,85,93,0.3); }

/* Accueil */

.hero {
  text-align: center;
  padding: 120px 40px 96px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -56px;
  position: relative;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255,107,53,0.10), transparent 70%),
    linear-gradient(180deg, rgba(18,18,18,0.55) 0%, rgba(18,18,18,0.88) 65%, rgba(18,18,18,1) 100%),
    url('https://images.unsplash.com/photo-1734255026082-82fdc81991f0?fm=jpg&q=60&w=1600&auto=format&fit=crop&ixlib=rb-4.1.0')
      center / cover no-repeat;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-muted); font-size: 16px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; }
.hero-actions .btn { margin-top: 0; }

.section-title {
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* Annuaire */

.search-form {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}
.search-form .input { flex: 1; }
.search-form .btn { margin-top: 0; }

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

.business-card {
  background: var(--interactive);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.business-card.featured {
  border-color: rgba(255,107,53,0.4);
  box-shadow: rgba(255,107,53,0.25) 0px 0px 32px;
}
.business-photo {
  height: 120px;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  position: relative;
}
.business-photo img { width: 100%; height: 100%; object-fit: cover; }
.business-photo .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #121212;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.business-info { padding: 16px; }
.business-info h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 16px; }
.business-info h3 a { text-decoration: none; }
.business-info .meta { font-size: 13px; color: var(--text-muted); margin: 0 0 12px; }
.business-info .contact-btn { font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; }

.empty-state { color: var(--text-muted); grid-column: 1 / -1; }

/* Fiche entreprise */

.entreprise-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.entreprise-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
}
.entreprise-header h1 { font-family: var(--font-display); font-size: 28px; margin: 0 0 4px; }
.entreprise-header .meta { color: var(--text-muted); font-size: 14px; margin: 0; }

.entreprise-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.entreprise-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* Variante galerie (Sans Pub / Sponsor) : la premiere photo sert de hero large */
.entreprise-photos-hero {
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 32px;
}
.entreprise-photos-hero img:first-child {
  grid-column: span 4;
  aspect-ratio: 21/9;
}
.entreprise-detail-galerie .entreprise-header { margin-top: 0; }

.sponsor-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  position: relative;
}
.sponsor-promo img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.sponsor-promo-badge {
  position: absolute;
  top: -10px;
  left: 14px;
  background: var(--accent);
  color: #121212;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.sponsor-promo strong { display: block; font-size: 14px; }
.sponsor-promo .meta { font-size: 12px; color: var(--text-muted); }

.entreprise-description { color: var(--text); line-height: 1.7; margin-bottom: 16px; }
.entreprise-horaires { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

.ad-slot {
  margin-top: 32px;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

/* Tarifs */

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

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.plan-card-featured {
  border-color: rgba(255,107,53,0.4);
  box-shadow: rgba(255,107,53,0.25) 0px 0px 32px;
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--accent);
  color: #121212;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}
.plan-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 8px;
}
.plan-price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px;
}
.plan-price span { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}
.plan-features li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.plan-features li:last-child { border-bottom: none; }
.plan-card .btn { width: 100%; }

.addons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.addon-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.addon-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0 0 16px;
}

@media (max-width: 860px) {
  .plans-grid { grid-template-columns: 1fr; }
  .addons-grid { grid-template-columns: 1fr; }
}

/* Admin */

.section-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 32px 0 12px;
}

.mcp-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.mcp-panel summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.mcp-panel-body { margin-top: 16px; }
.mcp-panel-body p { color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.mcp-panel-body code {
  font-family: var(--font-data);
  background: var(--interactive);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 12px;
}
.mcp-copy-row { display: flex; gap: 8px; }
.mcp-copy-row .input { flex: 1; }

.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.admin-list-row strong { display: block; margin-bottom: 4px; }
.admin-list-row .meta { font-size: 13px; color: var(--text-muted); }

.stats-row { display: flex; gap: 16px; }
.stat-tile {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.stat-value {
  display: block;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 700;
}
.stat-label { display: block; font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 0; border-bottom: 1px solid var(--border); }

.prompt-box {
  display: block;
  width: 100%;
  height: 60vh;
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-data);
  font-size: 13px;
  line-height: 1.6;
  padding: 20px;
  resize: vertical;
  white-space: pre-wrap;
}

@media (max-width: 860px) {
  .business-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .input-row { grid-template-columns: 1fr; }
  .site-nav { padding: 16px 20px; }
  .site-nav-links { display: none; }
  .business-grid { grid-template-columns: 1fr; }
  .entreprise-photos { grid-template-columns: repeat(2, 1fr); }
}
