/* app/static/css/theme-midnight.css */

/* =========================
   Theme: Midnight (dark, glossy silver titles)
   Scope: <body class="theme-midnight">
   ========================= */

/* 1) Tokens + fond */
body.theme-midnight {
  /* backgrounds */
  --page-bg: #000000;
  --bg: #0b0b0c;

  /* text */
  --fg: #e7e7e7;
  --muted: #b3b3b3;

  /* lines/borders */
  --line: #262629;

  /* actions */
  --primary: #e7e7e7;
  --primary-contrast: #000000;
  --accent: #cfcfcf;

  /* states */
  --success-bg: #083d2c;
  --success-fg: #d7f9ea;
  --success-border: #10b981;

  --danger: #ff4444;
  --error-bg: #471616;
  --error-fg: #ffd9d9;
  --error-border: #ff5a5a;

  /* nav */
  --nav-hover-bg: rgba(255, 255, 255, 0.06);
  --nav-hover-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  --nav-active-bg: rgba(255, 255, 255, 0.12);

  --focus-outline: #9a9a9a;

  /* page bg effect */
  background: radial-gradient(ellipse at center, #5e5d5d 0%, #000000 100%);
  min-height: 100%;
}

/* 2) Titres argentés + typographie display */
/* =========================
   H1/H2 — Chrome identique au .brand
   ========================= */
body.theme-midnight h1,
body.theme-midnight h2 {
  /* Typo display (pas Unifraktur) */
  font-family: var(--font-display, serif);
  font-weight: 400;
  font-variant-caps: small-caps;
  font-feature-settings: "smcp" 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin: 0;

  /* Texte découpé */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;

  /* MÊME dégradé chrome que .brand */
  background-image: linear-gradient(
      180deg,
      #d8d8d8 0%,
      #6c6c6c 22%,
      #ffffff 36%,
      #ffffff 52%,
      #f2f2f2 72%,
      #9c9c9c 100%
    ),
    linear-gradient(
      22deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.1) 18%,
      rgba(255, 255, 255, 0) 32%
    );
  background-blend-mode: normal, normal;
  background-size: 100% 200%;
  background-position: 0 34%;

  /* Relief identique */
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 0.15px rgba(255, 255, 255, 0.2);

  /* Rendu */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tailles (adapte si besoin) */
body.theme-midnight h1 {
  font-size: clamp(2.2rem, 3.5vw, 5.5rem);
}
body.theme-midnight h2 {
  font-size: clamp(1.6rem, 2.2vw, 3.2rem);
}

/* Soulignement violet sous H1 (identité du thème) */
body.theme-midnight h1::after {
  content: "";
  display: block;
  height: 2px;
  width: min(220px, 50%);
  margin-top: 0.35rem;
  border-radius: 2px;
  background: #998fcf;
  margin: 0.35rem auto 0;
}

/* H3 violet inchangé */
body.theme-midnight h3 {
  color: #998fcf;
}

/* Fallback si clip non supporté */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  body.theme-midnight h1,
  body.theme-midnight h2 {
    color: #d4d4d4;
    -webkit-text-fill-color: currentColor;
    background: none;
    text-shadow: none;
  }
}

/* 3) Surfaces / cartes */
body.theme-midnight .subcard,
body.theme-midnight .team-card,
body.theme-midnight .container,
body.theme-midnight .contact-item,
body.theme-midnight .callout,
body.theme-midnight .box {
  border-radius: 0;
  box-shadow: none !important;
  background: #000;
}

/* Barre décorative des subcards → argent */
body.theme-midnight .subcard::before {
  background: linear-gradient(90deg, #dcdcdc, rgba(220, 220, 220, 0.2));
}

/* 4) Topnav (desktop) */
@media (min-width: 992px) {
  body.theme-midnight .topnav-list {
    background: rgba(255, 255, 255, 0.04);
    border-color: #2b2b2d;
  }
  body.theme-midnight .topnav a[aria-current="page"] {
    background: transparent;
    text-decoration: none;
    font-weight: 600;
  }
}

/* 5) Boutons */
body.theme-midnight .btn.primary {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}
body.theme-midnight .btn.primary:hover {
  filter: brightness(0.96);
}

/* 6) Pills */
body.theme-midnight .section-nav a {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}
body.theme-midnight .section-nav a:hover {
  border-color: #dcdcdc;
}

/* 7) Sidenav mobile */
@media (max-width: 991px) {
  body.theme-midnight .mnav-fab {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.22);
  }
  body.theme-midnight .mnav-panel {
    background: #0b0b0c;
    border-right-color: #2b2b2d;
  }
}

/* 8) Formulaires */
body.theme-midnight input[type="text"],
body.theme-midnight input[type="email"],
body.theme-midnight input[type="password"],
body.theme-midnight input[type="datetime-local"],
body.theme-midnight input[type="time"],
body.theme-midnight textarea,
body.theme-midnight select {
  background: #0b0b0c;
  color: #ffffff;
  border: 1px solid #bbbbbb;
}
body.theme-midnight input:focus,
body.theme-midnight select:focus,
body.theme-midnight textarea:focus {
  border-color: #dcdcdc;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

/* 9) Callouts neutres */
body.theme-midnight .callout.info {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: #dcdcdc;
}
body.theme-midnight .callout.note {
  border-left-color: #dcdcdc;
}

/* 10) Horaires header — today */
body.theme-midnight .header-hours .hours-line.today {
  background: rgba(255, 255, 255, 0.15);
}
body.theme-midnight .header-hours .hours-line.today strong {
  color: #e6e6e6;
}

/* 11) Focus visible */
body.theme-midnight :focus-visible {
  outline-color: #9a9a9a;
}

/* 12) Footer — overrides Midnight (le style de base est dans styles.css) */
body.theme-midnight .site-footer {
  background: #000;
  border-top-color: #2b2b2d;
}
body.theme-midnight .site-footer .footer-meta {
  border-top-color: #2b2b2d;
  color: #bdbdbd;
}
body.theme-midnight .site-footer a:hover,
body.theme-midnight .site-footer a:focus-visible {
  color: #e6e6e6;
}
