@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

/* ============================================================
   Perform Studio — design system commun
   Mobile-first (base 375 px) · points de rupture 768 px / 1080 px
   Maquette statique : aucune dépendance, aucun build.
   ============================================================ */

/* ---------- 1. Variables ---------- */
:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --surface-2: #1f1f26;
  --border: #2a2a32;
  --accent: #ff6b1a;
  --accent-soft: rgba(255, 107, 26, 0.12);
  --text: #f5f5f2;
  --muted: #9a9aa3;
  --ok: #3ecf6e;
  --danger: #e5484d;
  --radius: 14px;
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "Inter", sans-serif;
}

/* ---------- 2. Reset léger ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 3. Typographie ---------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: #12100e;
}

/* Utilitaires typographiques */
.muted {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

.surtitle {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.center {
  text-align: center;
}

/* ---------- 4. Structure ---------- */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.section {
  padding-top: 42px;
  padding-bottom: 42px;
}

.stack > * + * {
  margin-top: 12px;
}

.is-hidden {
  display: none !important;
}

/* ---------- 5. Barre de navigation ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 15, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}

.topbar__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
}

.topbar__logo:hover {
  color: var(--text);
}

/* Le point final du logo « Perform. » */
.dot {
  color: var(--accent);
}

/* Sur mobile les liens restent en ligne (4 max, libellés courts) : pas de burger.
   Le défilement horizontal n'est qu'un garde-fou si un libellé déborde. */
.topbar__links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  min-width: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.topbar__links::-webkit-scrollbar {
  display: none;
}

.topbar__links a {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.topbar__links a:hover,
.topbar__links a.is-active {
  color: var(--accent);
}

/* ---------- 6. Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.btn:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #12100e;
}

.btn--primary:hover {
  background: #ff7f3a;
  border-color: #ff7f3a;
  color: #12100e;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--danger {
  background: rgba(229, 72, 77, 0.12);
  border-color: rgba(229, 72, 77, 0.35);
  color: var(--danger);
}

.btn--danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.72rem;
}

/* État désactivé : grisé, non cliquable */
.btn:disabled,
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  filter: grayscale(0.6);
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* ---------- 7. Cartes ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.card--flat {
  background: var(--surface-2);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card__meta {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- 8. Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.badge--new {
  background: var(--accent-soft);
  border-color: rgba(255, 107, 26, 0.3);
  color: var(--accent);
}

.badge--ok {
  background: rgba(62, 207, 110, 0.12);
  border-color: rgba(62, 207, 110, 0.3);
  color: var(--ok);
}

.badge--full {
  background: rgba(229, 72, 77, 0.12);
  border-color: rgba(229, 72, 77, 0.3);
  color: var(--danger);
}

/* ---------- 9. Jauge de places (6 pastilles) ---------- */
.gauge {
  display: flex;
  align-items: center;
  gap: 5px;
}

.gauge__dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.gauge__dot {
  width: 11px;
  height: 11px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  flex: 0 0 auto;
}

.gauge__dot.is-filled {
  background: var(--accent);
  border-color: var(--accent);
}

.gauge__label {
  margin-left: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- 10. Modale ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal__close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover {
  color: var(--accent);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- 11. Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 85vh;
  overflow: hidden;
  background: linear-gradient(160deg, #1a1a20 0%, #0d0d0f 100%);
}

/* Halo orange discret, en pur CSS (aucune image dans la maquette) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    62% 52% at 76% 16%,
    rgba(255, 107, 26, 0.18) 0%,
    rgba(255, 107, 26, 0) 68%
  );
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero__surtitle {
  display: block;
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.hero h1,
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.94;
  font-size: clamp(2.9rem, 15vw, 4rem);
}

.hero__baseline {
  margin-top: 16px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* ---------- 12. Grilles ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ---------- 13. Formulaires ---------- */
.field {
  display: block;
  margin-bottom: 14px;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.input,
.select,
select.input {
  width: 100%;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.92rem;
}

.input::placeholder {
  color: var(--muted);
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------- 14. Divers ---------- */
.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 22px 0;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.tab.is-active {
  background: var(--accent-soft);
  border-color: rgba(255, 107, 26, 0.35);
  color: var(--accent);
}

.stat {
  text-align: left;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
}

.stat__label {
  margin-top: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ============================================================
   Tablette et plus — ≥ 768 px
   ============================================================ */
@media (min-width: 768px) {
  body {
    font-size: 16px;
  }

  .container {
    padding-left: 28px;
    padding-right: 28px;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .topbar__inner {
    min-height: 66px;
  }

  .topbar__logo {
    font-size: 1.4rem;
  }

  .topbar__links {
    gap: 22px;
    overflow: visible;
  }

  .topbar__links a {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
  }

  .card {
    padding: 22px;
  }

  .modal {
    padding: 28px;
  }

  .hero h1,
  .hero__title {
    font-size: clamp(4rem, 9vw, 5.6rem);
  }

  .hero__baseline {
    font-size: 1.05rem;
  }

  .grid {
    gap: 20px;
  }

  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   Desktop — ≥ 1080 px
   ============================================================ */
@media (min-width: 1080px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }

  .section {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .hero h1,
  .hero__title {
    font-size: 6.2rem;
  }

  .hero__baseline {
    font-size: 1.1rem;
  }

  .grid {
    gap: 24px;
  }
}

/* Accessibilité : respect de la préférence « moins d'animations » */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
