/* Norexa Studio — page temporaire. Mise en page du design (canvas « Norexa Studio — Landing page »),
   couleurs du design system uniquement : toute nouvelle couleur passe d'abord par tokens.json. */

@font-face {
  font-family: Oxanium;
  src: url("../fonts/Oxanium-Variable-Iij5dSN.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("../fonts/Inter-Variable-nkPbRhd.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Tokens du design system Norexa Studio (tokens.json), noms identiques. Thème sombre par défaut. */
:root {
  color-scheme: dark;
  --brand: #0384fc;
  --brand-strong: #359dfd;
  --on-brand: #111111;
  --ink: #f2f2f2;
  --ink-muted: #a6a6a6;
  --surface: #121212;
  --line: #4a4a4a;
  --line-strong: #8a8f96;
  --danger: #ff6b6b;
  --font-display: Oxanium, "Segoe UI", system-ui, sans-serif;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --caps-shift-display: .14em;

  /* Dérivés décoratifs : transparence appliquée aux tokens, aucune nouvelle couleur */
  --dot: color-mix(in srgb, var(--brand-strong) 35%, transparent);
  --veil: color-mix(in srgb, var(--surface) 60%, transparent);
  --card: color-mix(in srgb, var(--surface) 85%, transparent);
  --watermark: .06;
}

/* Thème clair */
:root[data-theme="light"] {
  color-scheme: light;
  --brand-strong: #026aca;
  --on-brand: #ffffff;
  --ink: #323232;
  --ink-muted: #6b6b6b;
  --surface: #ffffff;
  --line: #e2e4e7;
  --danger: #c62828;
  --dot: color-mix(in srgb, var(--brand) 22%, transparent);
  --veil: color-mix(in srgb, var(--surface) 75%, transparent);
  --card: color-mix(in srgb, var(--surface) 90%, transparent);
  --watermark: .05;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* La page remplit la hauteur du viewport en partageant l'espace avec ses
   éléments frères (ex. espaceur de la toolbar Symfony en dev) au lieu de
   l'ajouter, ce qui évite une barre de défilement parasite. */
body {
  margin: 0;
  background: var(--surface);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

[hidden] {
  display: none !important;
}

/* Page */
.nx-page {
  position: relative;
  overflow: hidden;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  transition: background-color .2s, color .2s;
}

.nx-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.4px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 0%, transparent 75%);
}

.nx-watermark {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: 56vw;
  max-width: 760px;
  height: auto;
  opacity: var(--watermark);
}

.nx-mark path {
  fill: var(--brand);
}

.nx-container {
  position: relative;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
}

/* En-tête */
.nx-header {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nx-brand {
  display: flex;
  align-items: stretch;
  gap: 10px;
  text-decoration: none;
}

.nx-brand .nx-mark {
  width: 46px;
  height: 52px;
  flex: none;
}

.nx-brand__rule {
  width: 2px;
  background: var(--ink);
  flex: none;
}

.nx-brand__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  align-self: center;
}

.nx-brand__name,
.nx-brand__slogan {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: .75;
  text-transform: uppercase;
  white-space: nowrap;
}

.nx-brand__name {
  font-size: clamp(16px, 2.9vw, 23px);
  letter-spacing: .08em;
  color: var(--ink);
}

.nx-brand__slogan {
  font-size: clamp(8px, 1.4vw, 10.2px);
  letter-spacing: .1em;
  color: var(--ink-muted);
}

:root[lang="en"] .nx-brand__slogan {
  font-size: clamp(8px, 1.4vw, 11.5px);
}

.nx-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nx-navlink {
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.nx-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--veil);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.nx-toggle--lang {
  width: auto;
  min-width: 44px;
  /* Centrage optique des capitales Oxanium (règle du design system) */
  padding: calc(2 * var(--caps-shift-display)) 10px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Éléments propres à un thème (icône et libellé du bouton de thème) */
.nx-when-light,
:root[data-theme="light"] .nx-when-dark {
  display: none;
}

:root[data-theme="light"] .nx-when-light {
  display: inline;
}

:root[data-theme="light"] svg.nx-when-light {
  display: block;
}

/* Texte réservé aux lecteurs d'écran */
.nx-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nx-burger {
  display: none;
  flex: none;
}

.nx-icon-close,
.nx-burger[aria-expanded="true"] .nx-icon-menu {
  display: none;
}

.nx-burger[aria-expanded="true"] .nx-icon-close {
  display: block;
}

.nx-toggle:focus-visible,
.nx-btn:focus-visible,
.nx-mobile-menu__item:focus-visible,
.nx-navlink:focus-visible,
.nx-brand:focus-visible {
  outline: 2px solid var(--brand-strong);
  outline-offset: 2px;
}

/* Menu mobile */
.nx-mobile-menu {
  position: relative;
  display: none;
  flex-direction: column;
  margin: 0 clamp(16px, 4vw, 32px) 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.nx-mobile-menu__item {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  font: 500 16px/24px var(--font-sans);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nx-mobile-menu__item:last-child {
  border-bottom: 0;
}

.nx-mobile-menu__item--split {
  justify-content: space-between;
}

.nx-mobile-menu__code {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@media (max-width: 640px) {
  .nx-actions {
    display: none;
  }

  .nx-burger {
    display: inline-flex;
  }

  .nx-mobile-menu {
    display: flex;
  }
}

/* Contenu */
.nx-main {
  flex: 1 1 auto;
  padding-top: 40px;
  padding-bottom: 96px;
  display: flex;
  align-items: center;
}

.nx-main--center {
  justify-content: center;
}

.nx-hero {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nx-hero__title {
  margin: 0;
  max-width: 720px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--ink);
}

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

.nx-hero__desc {
  margin: 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 26px;
  color: var(--ink-muted);
}

.nx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nx-chip {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  /* Centrage optique des capitales Oxanium (règle du design system) */
  padding: calc(6px + var(--caps-shift-display)) 10px calc(6px - var(--caps-shift-display));
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink-muted);
  background: var(--veil);
  white-space: nowrap;
}

.nx-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.nx-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  background: var(--brand-strong);
  color: var(--on-brand);
  border: 0;
  border-radius: 4px;
  font: 600 15px/20px var(--font-sans);
  text-decoration: none;
  cursor: pointer;
}

.nx-btn:hover {
  filter: brightness(1.08);
}

.nx-btn--submit {
  height: 48px;
}

.nx-btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  filter: none;
}

/* Bouton secondaire (contour) */
.nx-btn--secondary {
  height: 48px;
  padding: 0 24px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.nx-btn--secondary:hover {
  filter: none;
  border-color: var(--ink);
}

/* Pages d'erreur (docs/features/pages-erreur.md) */
.nx-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 640px;
  text-align: center;
}

.nx-error__label {
  margin: 0;
  font: 600 13px/16px var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Grand code décoratif, en bleu du logo (taille display : contraste suffisant) */
.nx-error__code {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(96px, 20vw, 180px);
  line-height: .9;
  letter-spacing: .02em;
  color: var(--brand);
}

.nx-error__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.22;
  color: var(--ink);
}

.nx-error__text {
  margin: 0;
  max-width: 480px;
  font-size: 17px;
  line-height: 26px;
  color: var(--ink-muted);
}

.nx-error__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.nx-error__actions .nx-btn {
  height: 48px;
}

/* Galerie filtrable de l'accueil (docs/features/galerie.md)
   Sans JavaScript : bande d'images à faire défiler à la main. Avec : pages, filtres et lightbox (gallery.js). */
.nx-gal {
  --per-page: 4;
  --gal-gap: 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.nx-filter {
  min-height: 32px;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}

.nx-filter:hover {
  color: var(--ink);
}

.nx-filter[aria-pressed="true"] {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: var(--on-brand);
}

.nx-gal__carousel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 8px;
}

.nx-gal__frame {
  position: relative;
}

.nx-gal__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 8px;
}

.nx-gal.is-enhanced .nx-gal__viewport {
  overflow: hidden;
  scroll-snap-type: none;
}

.nx-gal__track {
  display: flex;
  gap: var(--gal-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nx-gal.is-enhanced .nx-gal__track {
  transition: transform .5s ease;
}

.nx-gal__item {
  flex: 0 0 calc((100% - (var(--per-page) - 1) * var(--gal-gap)) / var(--per-page));
  scroll-snap-align: start;
}

.nx-gal__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--card);
  cursor: zoom-in;
}

.nx-gal__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Contour de focus à l'intérieur : la fenêtre de la galerie masque ce qui dépasse */
.nx-gal__thumb:focus-visible {
  outline: 2px solid var(--brand-strong);
  outline-offset: -3px;
}

.nx-gal__arrow {
  position: absolute;
  top: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, #000 55%, transparent);
  color: #fff;
  transform: translateY(-50%);
  cursor: pointer;
}

.nx-gal__arrow--prev {
  left: 8px;
}

.nx-gal__arrow--next {
  right: 8px;
}

.nx-gal__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
}

/* Une seule page : rien à paginer, mais la hauteur reste réservée (le bouton de contact ne bouge pas) */
.nx-gal__pager.is-single {
  visibility: hidden;
}

.nx-gal__dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nx-pager__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nx-pager__dot span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width .35s ease, background-color .35s ease;
}

.nx-pager__dot[aria-current="true"] span {
  width: 28px;
  background: var(--brand-strong);
}

/* Point de bord réduit : d'autres pages existent au-delà des 5 points affichés */
.nx-pager__dot.is-more span {
  width: 4px;
  height: 4px;
}

.nx-pager__pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 8px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}

.nx-pager__pause[data-state="running"] .nx-gal__icon-play,
.nx-pager__pause[data-state="paused"] .nx-gal__icon-pause {
  display: none;
}

.nx-filter:focus-visible,
.nx-pager__dot:focus-visible,
.nx-pager__pause:focus-visible,
.nx-gal__arrow:focus-visible,
.nx-lightbox__btn:focus-visible {
  outline: 2px solid var(--brand-strong);
  outline-offset: 2px;
}

/* Lightbox : toujours sombre, avec les valeurs du thème sombre du design system */
.nx-lightbox {
  --ink: #f2f2f2;
  --ink-muted: #a6a6a6;
  --brand-strong: #359dfd;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 48px 72px;
  border: 0;
  background: color-mix(in srgb, #000 88%, transparent);
  color: var(--ink);
}

.nx-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nx-lightbox::backdrop {
  background: transparent;
}

.nx-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin: 0;
}

.nx-lightbox__img {
  display: block;
  max-width: min(1000px, 100%);
  max-height: 75vh;
  border-radius: 4px;
}

.nx-lightbox__caption {
  font-size: 14px;
  color: var(--ink-muted);
}

.nx-lightbox__btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nx-lightbox__close {
  top: 16px;
  right: 16px;
  border-radius: 4px;
}

.nx-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.nx-lightbox__nav--prev {
  left: 16px;
}

.nx-lightbox__nav--next {
  right: 16px;
}

@media (max-width: 1024px) {
  .nx-gal {
    --per-page: 3;
  }
}

@media (max-width: 640px) {
  .nx-gal {
    --per-page: 1;
  }

  .nx-gal__thumb {
    cursor: default;
  }

  .nx-gal__arrow {
    display: inline-flex;
  }
}

/* Carte du formulaire */
.nx-card {
  max-width: 720px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: clamp(20px, 5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nx-card__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nx-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.22;
  color: var(--ink);
}

.nx-card__intro {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink-muted);
}

.nx-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px 16px;
}

.nx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.nx-field--wide,
.nx-form__footer {
  grid-column: 1 / -1;
}

.nx-label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink);
}

.nx-label__optional {
  font-weight: 400;
  color: var(--ink-muted);
}

.nx-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font: 400 16px/24px var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

textarea.nx-input {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

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

.nx-input:focus {
  outline: 2px solid var(--brand-strong);
  outline-offset: 1px;
  border-color: var(--brand-strong);
}

.nx-input[aria-invalid="true"] {
  border-color: var(--danger);
}

.nx-field__error {
  font-size: 14px;
  line-height: 20px;
  color: var(--danger);
}

.nx-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.nx-form__privacy {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
}

/* Champ anti-spam : hors écran, ignoré par les lecteurs d'écran */
.nx-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nx-status,
.nx-alert {
  padding: 20px;
  border: 1px solid var(--brand-strong);
  border-radius: 4px;
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
}

.nx-alert {
  border-color: var(--danger);
}

.nx-status:focus,
.nx-alert:focus {
  outline: none;
}

/* Pied de page */
.nx-footer {
  position: relative;
  border-top: 1px solid var(--line);
}

.nx-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Bouton de thème : bouton texte discret, zone cliquable de 44 px */
.nx-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font: 13px/1 var(--font-sans);
  cursor: pointer;
}

.nx-theme-toggle:hover {
  color: var(--ink);
}

.nx-theme-toggle:focus-visible {
  outline: 2px solid var(--brand-strong);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .nx-page,
  .nx-filter,
  .nx-gal.is-enhanced .nx-gal__track,
  .nx-pager__dot span {
    transition: none;
  }
}
