/* =========================================================
   Page — Contact
   Étend le design system de styles.css (tokens, .wrap, .label-tech,
   .display-*, .reveal, .btn-solid, .nav-*, footer...).

   Rouge DEL verrouillé sur cette page : #c9370c (variable locale,
   n'affecte pas --thermal-red ni les autres pages).
   ========================================================= */

:root { --del-red: #c9370c; }

.contact-accent { color: var(--del-red); }

/* ---------- breadcrumb ---------- */
.contact-breadcrumb { padding-top: 6.5rem; }
@media (min-width: 768px) { .contact-breadcrumb { padding-top: 8rem; } }
.contact-breadcrumb nav { display: flex; align-items: center; gap: 0.625rem; color: var(--muted-foreground); }
.contact-breadcrumb a { transition: color 0.2s ease; }
.contact-breadcrumb a:hover { color: var(--ink); }
.contact-breadcrumb .sep { opacity: 0.5; }
.contact-breadcrumb .current { color: var(--ink-soft); }

/* ---------- hero / form grid ---------- */
#contact-hero { border-bottom: 1px solid var(--rule); padding-bottom: 6rem; }
@media (min-width: 768px) { #contact-hero { padding-bottom: 9rem; } }

.contact-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr; gap: 3.5rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: repeat(12, 1fr); gap: 2.5rem; align-items: start; } }

.contact-intro { grid-column: 1 / -1; }
@media (min-width: 1024px) { .contact-intro { grid-column: span 5; } }
.contact-intro h1 { margin-top: 1rem; }
.contact-lead { margin-top: 1.5rem; max-width: 30rem; font-size: 1.0625rem; line-height: 1.65; color: var(--ink-soft); }

.contact-coords { margin-top: 3rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.contact-coords .rule { display: block; height: 2px; width: 2.5rem; background: var(--del-red); margin-bottom: 0.875rem; }
.contact-coords .label-tech { color: var(--muted-foreground); }
.contact-coords ul { margin-top: 0.875rem; display: flex; flex-direction: column; gap: 0.5rem; }
.contact-coords li { font-family: var(--font-display); font-size: 1.0625rem; letter-spacing: -0.015em; color: var(--ink); }
.contact-coords a { transition: color 0.2s ease; }
.contact-coords a:hover { color: var(--del-red); }

/* ---------- form ---------- */
.contact-form { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 1024px) { .contact-form { grid-column: 7 / span 6; } }

.contact-field { display: flex; flex-direction: column; gap: 0.625rem; }
.contact-field label { color: var(--muted-foreground); }

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  padding: 0.75rem 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--ink);
  transition: border-color 0.25s ease;
}
.contact-field textarea { resize: vertical; min-height: 6rem; font-family: inherit; }
.contact-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 4px) 1.1rem, calc(100% - 0px) 1.1rem; background-size: 6px 6px; background-repeat: no-repeat; }
.contact-field select:invalid { color: var(--muted-foreground); }
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus { outline: none; border-color: var(--ink); }
.contact-field input::placeholder,
.contact-field textarea::placeholder { color: var(--muted-foreground); }

.contact-field-optional { text-transform: none; letter-spacing: 0; }
.contact-field input[type="file"] { padding: 0.75rem 0; font-family: var(--font-mono); font-size: 0.875rem; cursor: pointer; }
.contact-field input[type="file"]::file-selector-button {
  margin-right: 1rem;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 0.5rem 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.contact-field input[type="file"]::file-selector-button:hover { background: var(--ink); color: var(--paper); }

.contact-form .btn-solid { margin-top: 0.5rem; align-self: flex-start; }

/* ---------- etats serveur : erreurs, aide, confirmation ---------- */
.contact-alert {
  border: 1px solid var(--del-red);
  background: color-mix(in srgb, var(--del-red) 8%, transparent);
  color: var(--ink);
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.contact-field-error {
  color: var(--del-red);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}

.contact-field-hint {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}

.contact-field input[aria-invalid="true"],
.contact-field select[aria-invalid="true"],
.contact-field textarea[aria-invalid="true"] {
  border-color: var(--del-red);
}

/* Champ piege : retire visuellement sans display:none/visibility:hidden
   (certains robots les ignorent), hors flux clavier et hors lecteurs
   d'ecran via aria-hidden sur le conteneur + tabindex="-1" sur le champ. */
.contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- liste des fichiers selectionnes ---------- */
.contact-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.contact-file-list:empty { display: none; }
.contact-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.contact-file-list .contact-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-file-list .contact-file-size { color: var(--muted-foreground); flex-shrink: 0; }
.contact-file-list button {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}
.contact-file-list button:hover { background: var(--ink); color: var(--paper); }
.contact-file-list li[data-rejected="true"] { border-color: var(--del-red); color: var(--del-red); }

.contact-privacy {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}
.contact-privacy a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- etat d'envoi ---------- */
.contact-form .btn-solid[data-loading="true"] { opacity: 0.7; pointer-events: none; }

/* ---------- confirmation ---------- */
#contact-success { grid-column: 1 / -1; }
@media (min-width: 1024px) { #contact-success { grid-column: 7 / span 6; } }
