/* ============================================================
   VÉLIA — Feuille de style des pages secondaires
   Reprend le design system de index.html (tokens, nav, footer,
   formulaires, toasts) pour les pages contact / confidentialité.
   ============================================================ */

:root {
  --font-display: 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --cream-base:    #FFFFFF;
  --cream-card:    #FFFFFF;
  --cream-accent:  #F4F5F4;
  --cream-solid:   #FFFFFF;

  --forest-base:   #01696F;
  --forest-hover:  #014E53;
  --sage-pale:     rgba(1, 105, 111, 0.08);
  --gold:          #01696F;

  --rule:          rgba(11, 18, 16, 0.13);
  --rule-strong:   rgba(11, 18, 16, 0.26);
  --border-color:  rgba(11, 18, 16, 0.13);

  --text-ink:      #0B1210;
  --text-muted:    rgba(11, 18, 16, 0.58);
  --text-faint:    rgba(11, 18, 16, 0.40);

  --radius-xs:     4px;
  --radius-sm:     5px;
  --radius-md:     6px;
  --radius-full:   9999px;

  --shadow-md:     none;
  --shadow-lg:     none;

  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --dur:           180ms;

  --gut:           clamp(20px, 5vw, 64px);
  --maxw:          1240px;
}

[data-theme="dark"] {
  --cream-base:    #080C0B;
  --cream-card:    #0D1211;
  --cream-accent:  #151B19;
  --cream-solid:   #0D1211;

  --forest-base:   #4FC3C9;
  --forest-hover:  #74D4D9;
  --sage-pale:     rgba(79, 195, 201, 0.12);
  --gold:          #4FC3C9;

  --rule:          rgba(255, 255, 255, 0.11);
  --rule-strong:   rgba(255, 255, 255, 0.24);
  --border-color:  rgba(255, 255, 255, 0.11);

  --text-ink:      #ECF2F0;
  --text-muted:    rgba(236, 242, 240, 0.60);
  --text-faint:    rgba(236, 242, 240, 0.40);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  font-family: var(--font-body);
  background-color: var(--cream-base);
  color: var(--text-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; outline: none; }
a { text-decoration: none; color: inherit; transition: color var(--dur) var(--ease); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.032em;
  text-wrap: balance;
  color: var(--text-ink);
}

p { text-wrap: pretty; }
input, select, textarea { font: inherit; color: inherit; background: none; border: none; }

:focus-visible {
  outline: 2px solid var(--forest-base);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cream-base); }
::-webkit-scrollbar-thumb {
  background: var(--cream-accent);
  border-radius: var(--radius-full);
  border: 2px solid var(--cream-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* Repère structurel mono, comme sur la page d'accueil */
.ref {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- Navigation ---------- */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--cream-base);
  border-bottom: 1px solid var(--rule);
  padding: 0 var(--gut);
}
#site-nav.scrolled { border-bottom-color: var(--rule-strong); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 61px;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav-brand { display: flex; align-items: center; gap: 9px; }
.nav-mark {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  background: var(--forest-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-mark svg { width: 15px; height: 15px; }
.nav-mark svg path { stroke: #FFFFFF; }
.nav-wordmark {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-ink);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
  margin-left: 40px;
}
.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  font-weight: 450;
  color: var(--text-muted);
}
.nav-link:hover { color: var(--text-ink); }
.nav-link.current { color: var(--text-ink); }

.nav-actions { display: flex; align-items: center; gap: 6px; }
.btn-nav-ghost {
  padding: 7px 12px;
  font-size: 0.8125rem;
  font-weight: 450;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
}
.btn-nav-ghost:hover { color: var(--text-ink); }
.btn-nav-cta {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 550;
  background: var(--text-ink);
  color: var(--cream-base);
  transition: opacity var(--dur) var(--ease);
}
.btn-nav-cta:hover { opacity: 0.82; }

.theme-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.theme-btn:hover { color: var(--text-ink); background: var(--cream-accent); }

@media (max-width: 1000px) { .nav-links { display: none; } }

/* ---------- Structure de page ---------- */
.section {
  padding: clamp(56px, 8vw, 104px) var(--gut);
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.section:last-of-type { border-bottom: 0; }
.container { max-width: var(--maxw); margin: 0 auto; }

.page-head {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 6px;
}
.page-title {
  font-size: clamp(1.65rem, 2.9vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.033em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.page-title em { font-style: normal; color: var(--forest-base); }
.page-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .page-head { grid-template-columns: 1fr; gap: 12px; }
  .page-eyebrow { padding-top: 0; }
}

/* ---------- Grille contact : formulaire + colonne d'infos ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 160px 1fr 300px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 1000px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-aside { display: flex; flex-direction: column; gap: 28px; }
.aside-block { border-top: 1px solid var(--rule); padding-top: 14px; }
.aside-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.aside-value { font-size: 0.9rem; color: var(--text-ink); line-height: 1.5; }
.aside-value a { color: var(--forest-base); }
.aside-value a:hover { color: var(--forest-hover); }
.aside-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- Formulaire ---------- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-ink);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--cream-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.form-textarea { resize: vertical; min-height: 160px; line-height: 1.6; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--forest-base);
  background: var(--cream-solid);
  box-shadow: 0 0 0 3px var(--sage-pale);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-hint { font-size: 0.78rem; color: var(--text-faint); margin-top: 6px; }
.form-count { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

.btn-submit {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--forest-base);
  color: #FFFFFF;
  transition: background var(--dur) var(--ease), opacity var(--dur) var(--ease);
  margin-top: 8px;
}
.btn-submit:hover:not(:disabled) { background: var(--forest-hover); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Piège à robots : invisible pour un humain, rempli par les bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* État de confirmation après envoi */
.form-success {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--forest-base);
  border-radius: var(--radius-sm);
  padding: 28px 30px;
  background: var(--cream-accent);
}
.form-success h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.form-success p { font-size: 0.92rem; color: var(--text-muted); }
.form-success button {
  margin-top: 16px;
  color: var(--forest-base);
  font-size: 0.875rem;
  font-weight: 550;
}
.form-success button:hover { text-decoration: underline; }

/* ---------- Contenu légal ---------- */
.legal { max-width: 760px; }
.legal h2 {
  font-size: 1.15rem;
  letter-spacing: -0.022em;
  margin: 44px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.legal h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h2 .legal-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-right: 10px;
}
.legal p, .legal li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.legal p + p { margin-top: 12px; }
.legal ul { list-style: none; margin: 14px 0; }
.legal li { position: relative; padding-left: 18px; margin-bottom: 8px; }
.legal li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 5px;
  height: 1px;
  background: var(--text-faint);
}
.legal strong { color: var(--text-ink); font-weight: 550; }
.legal a { color: var(--forest-base); }
.legal a:hover { color: var(--forest-hover); }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.9rem;
}
.legal-table th, .legal-table td {
  text-align: left;
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--text-muted);
  line-height: 1.6;
}
.legal-table th {
  color: var(--text-ink);
  font-weight: 550;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-right: 28px;
  width: 34%;
}
@media (max-width: 620px) {
  .legal-table th { white-space: normal; width: 40%; }
}

.legal-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  margin-top: 6px;
}

/* ---------- Pied de page ---------- */
footer {
  padding: 26px var(--gut);
  background-color: var(--cream-base);
  border-top: 1px solid var(--rule);
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand-text {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
}
.footer-note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.footer-link:hover { color: var(--text-ink); }

/* ---------- Toasts ---------- */
#toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: auto;
  animation: toastIn 0.4s var(--ease) both;
  max-width: 360px;
  background: var(--text-ink);
  color: var(--cream-solid);
  border-left: 4px solid var(--forest-base);
}
.toast.error { border-left-color: #D32F2F; }
.toast.warning { border-left-color: var(--gold); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  #toast-container { left: 20px; right: 20px; bottom: 20px; }
  .toast { max-width: none; }
}
