/* ============================================================
   Senaria — senaria.net
   Accueil : artwork plein cadre, contenu ancré en bas.
   Pages de texte : noir plat.
   Display : Clash Display. Corps : Inter. Un seul accent rouge.
   ============================================================ */

@font-face {
  font-family: 'Clash Display';
  src: url('/assets/fonts/clash-display-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clash Display';
  src: url('/assets/fonts/clash-display-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #09090b;
  --surface: #111113;
  --surface-2: #18181b;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #fafaf9;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #c3151f;
  --accent-hover: #e0252f;
  --accent-press: #9e1118;
  --success: #22c55e;
  --error: #f87171;

  --font-display: 'Clash Display', 'Inter', sans-serif;
  --chamfer: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  --pad: 48px;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   1. Accueil
   ============================================================ */

.home {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  overflow-x: hidden;
}

/* --- Artwork ------------------------------------------------------------- */

.hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}

/* Fondu vers le noir : le texte du bas doit rester lisible sur n'importe
   quelle zone de l'image, y compris le soleil. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 9, 11, 0.72) 0%, rgba(9, 9, 11, 0) 26%),
    linear-gradient(
      0deg,
      #09090b 0%,
      rgba(9, 9, 11, 0.94) 22%,
      rgba(9, 9, 11, 0.62) 44%,
      rgba(9, 9, 11, 0.12) 68%,
      rgba(9, 9, 11, 0) 100%
    ),
    linear-gradient(90deg, rgba(9, 9, 11, 0.55) 0%, rgba(9, 9, 11, 0) 55%);
}

/* --- Barre supérieure ---------------------------------------------------- */

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.lockup img {
  width: 28px;
  height: 28px;
  display: block;
}

.lockup .mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin: 0;
}

.langs {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.langs a {
  color: rgba(250, 250, 249, 0.45);
  text-decoration: none;
  transition: color 150ms ease;
}

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

.langs a[aria-current='true'] {
  color: var(--text);
}

.langs .sep {
  color: rgba(255, 255, 255, 0.18);
}

/* --- Bloc d'inscription -------------------------------------------------- */

.dock {
  position: relative;
  z-index: 1;
  margin-top: auto;
  width: 100%;
  max-width: 560px;
}

.title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.1;
  /* Clash Display a une espace-mot étroite : sans ça les mots se collent. */
  word-spacing: 0.06em;
  max-width: 20ch;
}

/* Porte l'appel à l'inscription : c'est la seule phrase de la page. */
.lead {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(250, 250, 249, 0.78);
  max-width: 42ch;
}

/* --- Formulaire ---------------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.field {
  display: flex;
  gap: 8px;
}

.input {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(9, 9, 11, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 150ms ease, background 150ms ease;
}

.input::placeholder {
  color: rgba(250, 250, 249, 0.4);
}

.input:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(9, 9, 11, 0.75);
}

/* La seule action accentuée de la page. */
.submit {
  height: 54px;
  padding: 0 28px;
  border: 0;
  clip-path: var(--chamfer);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, transform 150ms ease;
}

.submit:hover {
  background: var(--accent-hover);
}

.submit:active {
  background: var(--accent-press);
  transform: translateY(1px);
}

.submit:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

.submit[disabled] {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* Piège à robots : rempli = requête ignorée. Jamais visible, jamais tabulable. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.turnstile:not(:empty) {
  margin-top: 4px;
}

.status {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(250, 250, 249, 0.75);
}

.status[data-state='ok'] {
  color: var(--success);
}

.status[data-state='error'] {
  color: var(--error);
}

.status:empty {
  display: none;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -1px;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Pied de page -------------------------------------------------------- */

.foot {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 12px;
  color: rgba(250, 250, 249, 0.35);
}

.foot a {
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease;
}

.foot a:hover {
  color: rgba(250, 250, 249, 0.7);
}

.foot .sep {
  color: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   2. Pages de texte (légales, 404)
   ============================================================ */

.doc {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
}

/* L'en-tête suit la colonne de texte, sinon elle flotte seule contre le bord. */
.doc .topbar {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 64px;
}

/* Les liens de contenu sont soulignés ; ceux de l'en-tête, jamais. */
.doc .topbar a {
  border-bottom: 0;
}

.doc main {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  flex: 1;
}

.doc h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  word-spacing: 0.06em;
}

.doc .updated {
  margin: 0 0 40px;
  font-size: 12px;
  color: var(--text-3);
}

.doc h2 {
  margin: 36px 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.doc p,
.doc li {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

.doc ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.doc strong {
  color: var(--text);
  font-weight: 500;
}

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text);
}

.doc a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
}

.doc a:hover {
  border-bottom-color: var(--accent);
}

.doc .footer {
  width: 100%;
  max-width: 680px;
  margin: 64px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--text-3);
}

.doc .footer a {
  color: inherit;
  border: 0;
}

.doc .footer a:hover {
  color: var(--text-2);
}

.doc .footer .sep {
  color: rgba(255, 255, 255, 0.15);
}

/* 404 : même enveloppe que les pages de texte, contenu centré. */
.notfound main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.notfound main {
  margin: 0 auto;
}

.notfound .code {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--accent);
}

/* ============================================================
   3. Petits écrans
   ============================================================ */

@media (max-width: 720px) {
  :root {
    --pad: 24px;
  }

  .title {
    max-width: none;
  }

  .field {
    flex-direction: column;
  }

  .submit {
    width: 100%;
  }

  .hero img {
    object-position: 62% 45%;
  }

  .doc .topbar {
    margin-bottom: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
