/* Ma campagne — tableau de bord annonceur (inspiré Google Ads) */
:root {
  --mc-emerald: #009879;
  --mc-emerald-dark: #007a62;
  --mc-ink: #14201c;
  --mc-muted: #5a6b64;
  --mc-line: #e2ddd2;
  --mc-paper: #fffcf7;
  --mc-blue: #1a73e8;
  --mc-sidebar: #f8f9fa;
}

.mc-hidden, .hidden { display: none !important; }

.mc-app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 120px);
  max-width: 1200px;
  margin: 0 auto;
  background: var(--mc-paper);
  border: 1px solid var(--mc-line);
  border-radius: 16px;
  overflow: hidden;
}

.mc-sidebar {
  background: var(--mc-sidebar);
  border-right: 1px solid var(--mc-line);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-sidebar-brand {
  font-weight: 800;
  color: var(--mc-emerald);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 8px;
}

.mc-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--mc-ink);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.mc-nav-item.is-active {
  background: #e8f6f0;
  color: var(--mc-emerald-dark);
}

.mc-nav-item:hover:not(.is-active) {
  background: rgba(0, 0, 0, 0.04);
}

.mc-nav-cta {
  margin-top: auto;
  background: var(--mc-emerald) !important;
  color: #fff !important;
  justify-content: center;
}

.mc-nav-cta:hover {
  background: var(--mc-emerald-dark) !important;
}

.mc-main {
  padding: 24px 28px 32px;
  min-width: 0;
}

.mc-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.mc-topbar h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--mc-ink);
  margin: 0;
}

.mc-account {
  font-size: 0.88rem;
  color: var(--mc-muted);
}

.mc-account strong { color: var(--mc-ink); }

.mc-lookup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mc-lookup input {
  padding: 9px 12px;
  border: 1px solid var(--mc-line);
  border-radius: 8px;
  font: inherit;
  min-width: 220px;
}

.mc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.mc-btn-primary {
  background: var(--mc-blue);
  color: #fff;
}

.mc-btn-primary:hover { background: #1557b0; }

.mc-btn-ghost {
  background: #fff;
  color: var(--mc-ink);
  border: 1px solid var(--mc-line);
}

.mc-btn-emerald {
  background: var(--mc-emerald);
  color: #fff;
}

.mc-btn-emerald:hover { background: var(--mc-emerald-dark); }

.mc-demo-banner {
  background: linear-gradient(90deg, #e8f6f0, #fff8e6);
  border: 1px solid #c5e8dc;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: #065f48;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.mc-kpi {
  background: #fff;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  padding: 14px 16px;
}

.mc-kpi-val {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--mc-ink);
  line-height: 1.1;
}

.mc-kpi-lbl {
  font-size: 0.78rem;
  color: var(--mc-muted);
  font-weight: 600;
}

.mc-kpi--live .mc-kpi-val { color: #0d9488; }
.mc-kpi--review .mc-kpi-val { color: #d97706; }
.mc-kpi--paused .mc-kpi-val { color: #6b7280; }

.mc-layout {
  display: grid;
  grid-template-columns: minmax(260px, 34%) 1fr;
  gap: 20px;
  align-items: start;
}

.mc-panel {
  background: #fff;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  overflow: hidden;
}

.mc-panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--mc-line);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--mc-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mc-list { padding: 8px; }

.mc-campaign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  margin-bottom: 4px;
}

.mc-campaign-row:hover { background: #f3f4f6; }

.mc-campaign-row.is-selected {
  background: #e8f6f0;
  outline: 2px solid rgba(0, 152, 121, 0.25);
}

.mc-campaign-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mc-campaign-row-main strong {
  font-size: 0.92rem;
  color: var(--mc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-detail { padding: 20px; }

.mc-detail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.mc-detail-head h2 {
  font-size: 1.15rem;
  margin: 0 0 4px;
  font-weight: 800;
}

.mc-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.mc-detail-block {
  background: #f8faf9;
  border-radius: 10px;
  padding: 12px;
}

.mc-lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mc-muted);
  margin-bottom: 4px;
}

.mc-detail-section {
  margin-bottom: 20px;
}

.mc-detail-section h3 {
  font-size: 0.95rem;
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--mc-emerald);
}

.mc-detail-section p {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: var(--mc-muted);
  line-height: 1.5;
}

.mc-muted { color: var(--mc-muted); font-size: 0.88rem; }

.mc-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.mc-status--lg { font-size: 0.82rem; padding: 6px 14px; }

.mc-status--live { background: #d1fae5; color: #065f46; }
.mc-status--review { background: #fef3c7; color: #92400e; }
.mc-status--paused { background: #f3f4f6; color: #4b5563; }
.mc-status--rejected { background: #fee2e2; color: #991b1b; }
.mc-status--approved { background: #dbeafe; color: #1e40af; }

.mc-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.mc-alert--ok { background: #e8f6f0; color: #065f48; }
.mc-alert--info { background: #eff6ff; color: #1e40af; }
.mc-alert--err { background: #fef2f2; color: #991b1b; }

.mc-preview-hint { margin-bottom: 12px; }

.mc-serp-mock {
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  overflow: hidden;
  background: #fafafa;
}

.mc-serp-bar {
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--mc-line);
  font-size: 0.85rem;
  color: var(--mc-muted);
}

.mc-preview-card { margin: 12px; border-radius: 10px; }

.mc-serp-organic {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-serp-organic span {
  display: block;
  height: 10px;
  background: #e5e7eb;
  border-radius: 4px;
}

.mc-serp-organic span:nth-child(1) { width: 70%; }
.mc-serp-organic span:nth-child(2) { width: 90%; }
.mc-serp-organic span:nth-child(3) { width: 55%; }

.mc-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.mc-empty-state {
  text-align: center;
  padding: 48px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.mc-empty-state i {
  font-size: 3rem;
  color: var(--mc-emerald);
  opacity: 0.5;
  margin-bottom: 16px;
}

.mc-empty-state h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.mc-loading {
  text-align: center;
  padding: 64px 24px;
  color: var(--mc-muted);
}

.mc-page-wrap {
  max-width: 1200px;
  margin: 24px auto 48px;
  padding: 0 20px;
}

.mc-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mc-page-header a.logo {
  font-weight: 800;
  color: var(--mc-emerald);
  text-decoration: none;
  font-size: 1.2rem;
}

@media (max-width: 900px) {
  .mc-app { grid-template-columns: 1fr; }
  .mc-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--mc-line);
  }
  .mc-nav-cta { margin-top: 0; width: auto; }
  .mc-layout { grid-template-columns: 1fr; }
  .mc-kpis { grid-template-columns: repeat(2, 1fr); }
  .mc-detail-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Aperçu annonce sponsorisée (SERP) */
.sponsored-card {
  position: relative;
  background: #f8faf9;
  border: 1px solid #d5e5df;
  border-left: 3px solid var(--mc-emerald);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.sponsored-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5a6f68;
  background: #e8f2ef;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.sponsored-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a3a32;
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 4px;
}
.sponsored-title:hover { text-decoration: underline; color: var(--mc-emerald); }
.sponsored-url {
  display: block;
  font-size: 0.82rem;
  color: var(--mc-emerald);
  margin-bottom: 6px;
  word-break: break-all;
}
.sponsored-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #5a6f68;
}
