/* ============================================================
   VIDEO GAME INDUSTRY B2B EVENTS — design system « instrument d'observation »
   Brief design (prime sur tout).
   Pas d'Inter, pas de dégradé, pas de cartes 3-up, pas d'emoji déco.
   ============================================================ */

:root {
  /* Couleur — 6 valeurs nommées (carte/almanach, ni crème-cliché ni noir) */
  --paper:    #E7E3D6;
  --paper-2:  #EDEADF;   /* tint de ligne alternée */
  --ink:      #16181A;
  --signal:   #E4431B;   /* SIGNATURE : urgence, deadlines, CTA — RARE */
  --azimuth:  #1F3D7A;   /* liens, structure */
  --verified: #3C7A4E;   /* ouverte / vérifiée UNIQUEMENT */
  --mist:     #9A9486;   /* filets, secondaire, fermé */
  --amber:    #C0632A;   /* deadline 8–30 j (mélange signal/azimuth) */

  --rule:     rgba(22, 24, 26, .14);  /* filet de carte */
  --rule-2:   rgba(22, 24, 26, .07);

  --display: "Clash Grotesk", "General Sans", system-ui, sans-serif;
  --body:    "Switzer", "Supreme", system-ui, sans-serif;
  --mono:    "Space Mono", "JetBrains Mono", ui-monospace, monospace;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;  --sp-4: 20px;  --sp-5: 32px;  --sp-6: 52px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  font-feature-settings: "tnum" 1;   /* chiffres tabulaires partout */
  -webkit-font-smoothing: antialiased;
}

/* Grain papier discret — overlay fixe ~5 % (provenance, anti-lisse) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--azimuth); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

.wrap { width: min(1180px, 94vw); margin-inline: auto; }
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }

/* ============================ BANDEAU DÉFILANT (Sur le circuit) ============================ */
.ticker {
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--rule); background: var(--paper);
  padding: 7px 0; overflow: hidden;
}
.ticker__label {
  flex: 0 0 auto; padding-left: max(3vw, 16px);
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mist); white-space: nowrap;
}
.ticker__viewport {
  flex: 1 1 auto; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 3%, #000 94%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: ticker-scroll 64s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; align-items: center; flex: 0 0 auto; }
.ticker__item {
  flex: 0 0 auto;
  font-family: var(--display); font-weight: 500; font-size: .82rem; letter-spacing: .01em;
  text-transform: uppercase; color: var(--ink); padding: 0 14px; white-space: nowrap;
}
.ticker__item:hover { color: var(--signal); text-decoration: none; }
.ticker__logo { height: 18px; width: auto; display: block; }
.ticker__sep { flex: 0 0 auto; color: var(--mist); font-size: .6rem; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .ticker__viewport { overflow-x: auto; }
}

/* ============================ MASTHEAD ============================ */
.masthead { padding-top: var(--sp-5); }
.mast-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.7rem);
  letter-spacing: -.01em; text-transform: uppercase;
}
.readout {
  font-size: .82rem; color: var(--ink); letter-spacing: .01em;
  white-space: nowrap;
}
.readout .sep { color: var(--mist); }
.readout b { color: var(--signal); font-weight: 700; }

/* nav onglets fins — actif souligné --signal (pas de pilule) */
.tabs { display: flex; gap: var(--sp-4); margin: var(--sp-3) 0 var(--sp-2); flex-wrap: wrap; }
.tabs a {
  font-family: var(--body); font-weight: 500; font-size: .92rem;
  color: var(--ink); padding-bottom: 4px; border-bottom: 2px solid transparent;
  text-decoration: none;
}
.tabs a:hover { color: var(--azimuth); }
.tabs a.active { border-bottom-color: var(--signal); }

.rule-full { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.tagline {
  font-size: .95rem; color: #3a3c3e; max-width: 64ch;
  margin: var(--sp-4) 0 0;
}

/* ============================ CONTROLS (instrument) ============================ */
.controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4);
  padding: var(--sp-4) 0; border-bottom: 1px solid var(--rule);
}
.field { display: flex; align-items: center; gap: 6px; }
.field label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mist); }
.controls select,
.controls .search input {
  font-family: var(--body); font-size: .88rem; color: var(--ink);
  background: transparent; border: 1px solid var(--rule);
  padding: 6px 10px; border-radius: 2px;
}
.controls select:focus,
.controls .search input:focus { outline: 2px solid var(--azimuth); outline-offset: 1px; }

.search { display: flex; align-items: center; gap: 6px; flex: 1 1 200px; min-width: 160px; }
.search::before { content: "⌕"; color: var(--mist); font-size: 1.1rem; }
.search input { width: 100%; border: 0; border-bottom: 1px solid var(--rule); padding: 6px 2px; }

/* segmented control (tri) */
.segmented { display: inline-flex; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.segmented button {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .02em;
  background: transparent; color: var(--ink); border: 0; padding: 6px 10px; cursor: pointer;
  border-right: 1px solid var(--rule);
}
.segmented button:last-child { border-right: 0; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* switch (Ouvertes seulement) */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .82rem; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 34px; height: 18px; border: 1px solid var(--mist); border-radius: 2px;
  position: relative; transition: background .15s, border-color .15s;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px;
  background: var(--mist); transition: transform .15s, background .15s;
}
.switch input:checked + .track { border-color: var(--verified); }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--verified); }
.switch input:focus-visible + .track { outline: 2px solid var(--azimuth); outline-offset: 2px; }

.count-line { font-family: var(--mono); font-size: .76rem; color: var(--mist); padding: var(--sp-3) 0; }

/* ============================ LISTE = INDEX / CAHIER DE BORD ============================ */
.index { margin: 0 0 var(--sp-6); }

.entry {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-3) var(--sp-2);
  border-top: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry:nth-child(even) { background: var(--rule-2); }
.entry:hover { background: rgba(31, 61, 122, .05); }

/* anneau-deadline (signature) */
.ring { width: 44px; height: 44px; display: block; }
.ring .track { fill: none; stroke: var(--rule); stroke-width: 3; }
.ring .arc { fill: none; stroke-width: 3; stroke-linecap: butt; transform: rotate(-90deg); transform-origin: center; }
.ring .jx { font-family: var(--mono); font-size: 10px; fill: var(--ink); }
.ring.past .jx { fill: var(--mist); text-decoration: line-through; }
.ring .dot { fill: var(--mist); }

.entry__main { min-width: 0; }
.entry__head { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; }
.entry__title {
  font-family: var(--display); font-weight: 500; font-size: 1.05rem;
  margin: 0; letter-spacing: -.005em; line-height: 1.2;
}
.entry__title.is-cancelled { text-decoration: line-through; text-decoration-color: var(--signal); color: var(--mist); }
.entry__meta {
  font-family: var(--mono); font-size: .74rem; color: #4a4c4d; letter-spacing: .01em;
  margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center;
}
.entry__meta .k { color: var(--ink); text-transform: uppercase; }
.entry__meta .due { color: var(--ink); }
.entry__notes { font-size: .82rem; color: #4a4c4d; margin-top: 4px; font-family: var(--body); }

.entry__action { white-space: nowrap; }
.entry__action a {
  font-family: var(--mono); font-size: .78rem; color: var(--azimuth);
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.entry__action a:hover { color: var(--signal); }

/* badges quasi carrés (états d'instrument, pas pilules) */
.badges { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--rule); border-radius: 2px; padding: 2px 5px; color: var(--ink);
  white-space: nowrap;
}
.tag--open    { color: var(--verified); border-color: var(--verified); }
.tag--closed  { color: var(--mist); border-color: var(--mist); text-decoration: line-through; }
.tag--verified{ color: var(--verified); border-color: var(--verified); }
.tag--unverif { color: var(--mist); border-color: var(--mist); }
.tag--fr      { color: var(--signal); border-color: var(--signal); }
.tag--star    { color: var(--signal); border-color: var(--signal); }

.empty { font-family: var(--mono); font-size: .82rem; color: var(--mist); padding: var(--sp-6) 0; }

/* ============================ FOOTER ============================ */
.site-footer { border-top: 1px solid var(--rule); margin-top: var(--sp-6); padding: var(--sp-5) 0 var(--sp-6); }
.foot-grid { display: flex; flex-wrap: wrap; gap: var(--sp-5); justify-content: space-between; }
.foot-cta h2 { font-family: var(--display); font-weight: 500; font-size: 1.05rem; margin: 0 0 6px; }
.foot-cta p { margin: 0 0 var(--sp-3); font-size: .9rem; color: #4a4c4d; }
.btn-signal {
  display: inline-block; font-family: var(--mono); font-size: .78rem; letter-spacing: .03em;
  color: var(--paper); background: var(--signal); padding: 8px 14px; border-radius: 2px;
}
.btn-signal:hover { text-decoration: none; background: #c5380f; }
.disclaimer { font-size: .78rem; color: var(--mist); max-width: 60ch; line-height: 1.5; }
.disclaimer strong { color: #4a4c4d; }
.disclaimer a { color: var(--mist); text-decoration: underline; }

/* ============================ TOURNÉE (simulateur) ============================ */
.tour-total {
  position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; align-items: center;
  background: var(--paper); border-bottom: 1px solid var(--rule); padding: 10px 0; font-size: .82rem;
}
.tour-total .sep { color: var(--mist); }
.tour-total .tt-money b { color: var(--signal); font-size: 1.05rem; }
.tt-fit { font-size: .72rem; margin-left: auto; }
.tt-fit.ok { color: var(--verified); }
.tt-fit.over { color: var(--signal); font-weight: 700; }

/* bandeau avertissement estimations */
.notice {
  border: 1px solid var(--signal); border-left-width: 3px; border-radius: 2px;
  background: rgba(228, 67, 27, .05); color: #3a2018;
  padding: 10px 14px; margin: var(--sp-4) auto 0; font-size: .82rem; line-height: 1.5;
}
.notice strong { color: var(--signal); }

/* boutons tournée */
.chip-clear { color: var(--signal); border-color: rgba(228,67,27,.4); }
.chip-prompt { background: var(--azimuth); color: #fff; border-color: var(--azimuth); font-weight: 700; }
.chip-prompt:hover { background: #16305f; }
.controls input[type="date"] { font-family: var(--mono); font-size: .8rem; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 2px; background: #fff; color: var(--ink); }

/* boîte de prompt */
.prompt-box { border: 1px solid var(--azimuth); border-radius: 2px; margin: var(--sp-4) 0; padding: 12px; background: rgba(31,61,122,.03); }
.pb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pb-head h2 { font-family: var(--display); font-weight: 500; font-size: 1rem; margin: 0; flex: 1 1 auto; }
#prompt-out { width: 100%; box-sizing: border-box; font-family: var(--mono); font-size: .76rem; line-height: 1.5; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 2px; padding: 10px; resize: vertical; }

.budget { border-bottom: 1px solid var(--rule); padding: var(--sp-3) 0 var(--sp-4); }
.bg-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bg-main input[type="range"] { flex: 1 1 260px; min-width: 200px; accent-color: var(--signal); }
.bg-out { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--signal); min-width: 92px; }
.bg-hint { font-size: .64rem; color: var(--mist); }
.bg-tune { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.bg-tune .pf-group { margin-bottom: 0; }
.bg-tune .pf-label { flex: 0 0 auto; }
.bg-tune input[type="range"] { width: 118px; accent-color: var(--azimuth); }
.bg-tune output { font-family: var(--mono); font-size: .7rem; color: var(--ink); }
.cal-section {
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  margin: var(--sp-5) 0 var(--sp-2); padding: 6px 10px;
  border: 1px solid var(--rule); border-left: 3px solid var(--mist); border-radius: 2px;
  color: var(--mist);
}
.cal-section--rec { border-left-color: var(--verified); color: var(--verified); background: rgba(60,122,78,.05); }
.cal-section .mono { font-size: .72rem; font-weight: 400; }
.tag--rec { color: var(--verified); border-color: var(--verified); background: rgba(60,122,78,.07); }

.cal-month {
  font-family: var(--display); font-weight: 500; font-size: .84rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--mist); margin: var(--sp-4) 0 0; border-bottom: 1px solid var(--rule); padding-bottom: 4px;
}
.cal-row { border-top: 1px solid var(--rule); }
.cal-row.is-selected { background: rgba(31, 61, 122, .06); }
.cal-head { display: flex; align-items: center; gap: 10px; padding: 9px 4px; cursor: pointer; flex-wrap: wrap; }
.cal-head input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--signal); flex: 0 0 auto; }
.cal-name { font-family: var(--display); font-weight: 500; font-size: .98rem; }
.cal-meta { font-size: .72rem; color: #4a4c4d; flex: 1 1 auto; }
.cal-cost { font-size: .8rem; font-weight: 700; flex: 0 0 auto; }
.costs { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 0 4px 11px 32px; }
.cl { display: flex; flex-direction: column; gap: 2px; }
.cl > span { font-family: var(--mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mist); }
.cl input {
  width: 94px; font-family: var(--mono); font-size: .8rem; padding: 4px 6px;
  border: 1px solid var(--rule); border-radius: 2px; background: #fff; color: var(--ink);
}
.cl-sub { font-size: .74rem; color: var(--mist); margin-left: auto; }
.cl-sub b { color: var(--signal); font-size: .92rem; }

/* impression / PDF */
.print-only { display: none; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  body::after { display: none; }
  .print-only { display: block; }
  .print-head { padding: 0 0 10px; border-bottom: 2px solid #16181A; margin-bottom: 12px; }
  .print-head h1 { font-family: var(--display); font-size: 18pt; margin: 0 0 6px; }
  .print-date { font-size: 9pt; color: #666; }
  .tour-total { position: static; border: 0; padding: 0 0 8px; }
  .cal-row:not(.is-selected) { display: none; }
  .cal-month { page-break-after: avoid; }
  .cal-row { page-break-inside: avoid; }
  .cl input { border: 0; padding: 0; width: auto; }
  .wrap { width: 100%; }
}

/* ============================ MON PROFIL ============================ */
.profile { border-bottom: 1px solid var(--rule); padding: var(--sp-4) 0 var(--sp-3); }
.pf-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 9px; }
.pf-label { flex: 0 0 132px; font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .07em; color: var(--mist); }
.chip {
  font-family: var(--body); font-size: .8rem; color: var(--ink); cursor: pointer;
  background: transparent; border: 1px solid var(--rule); border-radius: 2px; padding: 5px 11px;
}
.chip:hover { border-color: var(--azimuth); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pf-actions { margin-top: 4px; }
#pf-reset { font-family: var(--mono); font-size: .7rem; color: var(--mist); }

.match-score { flex-direction: column; font-family: var(--mono); font-weight: 700; font-size: 1.02rem; color: var(--azimuth); line-height: 1; }
.match-score small { font-size: .46rem; font-weight: 400; color: var(--mist); letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }
.why { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.why span { font-family: var(--mono); font-size: .62rem; color: var(--verified); border: 1px solid rgba(60,122,78,.4); border-radius: 2px; padding: 1px 5px; }
.tag-kind { font-weight: 700; }
.k-appel { color: var(--azimuth); border-color: var(--azimuth); }
.k-event { color: var(--signal); border-color: var(--signal); }
.k-media { color: var(--verified); border-color: var(--verified); }

/* ============================ MÉDIAS ============================ */
.badge-region { color: var(--azimuth); border-color: rgba(31,61,122,.4); }
.m-marker { display: flex; align-items: center; justify-content: center; }
.m-star { color: var(--signal); font-family: var(--mono); font-size: .78rem; letter-spacing: -1px; }
.m-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mist); display: block; }
.m-press { font-family: var(--mono); font-size: .66rem; color: var(--mist); margin-top: 4px; }

/* ============================ GLOBE / PLANÈTE ============================ */
.globe-stage { display: flex; gap: var(--sp-5); align-items: flex-start; flex-wrap: wrap; padding: var(--sp-4) 0 var(--sp-6); }
.globe-holder { flex: 0 0 auto; }
#globe { display: block; touch-action: none; cursor: grab; }
.globe-legend { font-size: .72rem; color: var(--mist); margin: var(--sp-3) 0 0; max-width: 560px; }

.globe-panel { flex: 1 1 280px; min-width: 240px; border-left: 1px solid var(--rule); padding-left: var(--sp-4); align-self: stretch; }
.globe-panel__hint { font-size: .76rem; color: var(--mist); }
.gp-title { font-family: var(--display); font-weight: 500; font-size: 1.1rem; margin: 0 0 var(--sp-3); }
.gp-title .mono { font-size: .72rem; color: var(--mist); text-transform: uppercase; }
.gp-list { list-style: none; margin: 0; padding: 0; }
.gp-list li { border-top: 1px solid var(--rule); padding: var(--sp-2) 0; font-size: .88rem; }
.gp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.gp-date { font-size: .72rem; color: #4a4c4d; }

.globe-tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 2px;
  padding: 6px 9px; font-size: .72rem; line-height: 1.45; color: var(--ink);
  max-width: 280px; box-shadow: 0 2px 0 rgba(22,24,26,.08);
}
.globe-tooltip b { font-family: var(--display); font-weight: 600; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 680px) {
  .entry { grid-template-columns: 40px 1fr; grid-template-areas: "ring main" "action action"; gap: var(--sp-3); }
  .ring { width: 36px; height: 36px; }
  .entry__action { grid-area: action; padding-left: 52px; }
  .readout { white-space: normal; }
}

