/* ============================================================
   LEMELTING · Vitrine publique — main.css
   Stack : CSS3 vanilla, variables, grid, flexbox, clamp()
   Budget : ≤ 30 KB
   ============================================================ */

/* === 1. DESIGN TOKENS ======================================= */
:root {
  /* Palette de marque */
  --brand-teal:       #127A7A;
  --brand-teal-dark:  #063a3a;
  --brand-teal-light: #2dd4bf;
  --brand-marine:     #1A3C5A;
  --brand-gold:       #BF8F00;
  --brand-navy:       #1F3864;

  /* Textes */
  --color-text-primary:   #18140F;
  --color-text-secondary: #635D55;
  --color-text-muted:     #A8A49C;
  --color-text-inverse:   #FFFFFF;

  /* Fonds */
  --color-bg-page:        #FAFAF8;
  --color-bg-section-alt: #F5F5F2;
  --color-bg-card:        #FFFFFF;
  --color-bg-hero:        #063a3a;
  --color-bg-footer:      #1A3C5A;

  /* États */
  --color-status-success: #1C8A4A;
  --color-status-error:   #C0392B;

  /* Bordures */
  --color-border-subtle: #E2E0DC;
  --color-border-focus:  #127A7A;

  /* Typographie */
  --font-heading: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  --text-h1:      clamp(2rem, 5.5vw, 3rem);
  --text-h2:      clamp(1.5rem, 3.5vw, 2.25rem);
  --text-h3:      clamp(1.125rem, 2vw, 1.375rem);
  --text-body:    1rem;
  --text-lead:    1.125rem;
  --text-caption: 0.8125rem;

  --lh-heading: 1.15;
  --lh-body:    1.65;
  --lh-caption: 1.45;

  /* Espacements */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --section-py: clamp(48px, 8vw, 96px);
  --section-px: clamp(20px, 5vw, 80px);
  --content-max: 1080px;

  /* Rayons */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  /* Ombres */
  --shadow-card:       0 1px 3px rgba(24,20,15,.08), 0 1px 2px rgba(24,20,15,.04);
  --shadow-card-hover: 0 4px 16px rgba(24,20,15,.10), 0 2px 4px rgba(24,20,15,.06);
  --shadow-cta:        0 2px 8px rgba(18,122,122,.28);
}

/* === 2. RESET & BASE ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-teal-dark);
}

/* Focus visible global */
:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* === 3. TYPOGRAPHIE ========================================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  color: var(--color-text-primary);
  font-weight: 700;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p { margin-block-start: 0; }

/* === 4. LAYOUT UTILITAIRES ================================== */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

.section {
  padding-block: var(--section-py);
}

.section--alt {
  background-color: var(--color-bg-section-alt);
}

/* === 5. FONT FACE — DM Sans variable, self-hosted ===========
   1 seul WOFF2 (Google Fonts v17, subset latin) couvre tous les
   weights 100..1000 via font-variation-settings. ~37 KB. */
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/dmsans-variable.woff2') format('woff2-variations'),
       url('../fonts/dmsans-variable.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* === 6. NAVIGATION ========================================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(6, 58, 58, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

.site-nav__logo {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-inverse);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav__logo:hover {
  color: var(--brand-teal-light);
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
}

.site-nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav__links a:hover {
  color: var(--color-text-inverse);
}

.site-nav__cta {
  background-color: var(--brand-teal) !important;
  color: var(--color-text-inverse) !important;
  padding: var(--space-2) var(--space-5) !important;
  border-radius: var(--radius-pill) !important;
  font-weight: 600 !important;
  transition: background-color 0.15s, box-shadow 0.15s !important;
}

.site-nav__cta:hover {
  background-color: var(--brand-teal-light) !important;
  color: var(--brand-teal-dark) !important;
  box-shadow: var(--shadow-cta) !important;
}

/* Nav mobile */
@media (max-width: 640px) {
  .site-nav__links {
    display: none;
  }
}

/* === 7. SECTION HERO ======================================= */
.hero {
  background-color: var(--color-bg-hero);
  padding-block: clamp(96px, 15vw, 160px);
  padding-inline: var(--section-px);
  padding-top: calc(clamp(96px, 15vw, 160px) + 60px); /* compense nav fixe */
  position: relative;
  overflow: hidden;
}

/* Motif décoratif géométrique léger */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(45,212,191,0.06) 0%, transparent 55%),
    radial-gradient(circle at 15% 80%, rgba(18,122,122,0.12) 0%, transparent 45%);
  pointer-events: none;
}

.hero__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background-color: rgba(191,143,0,0.15);
  border: 1px solid rgba(191,143,0,0.35);
  color: #d4a800;
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-5);
}

.hero__h1 {
  color: var(--color-text-inverse);
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: 1.12;
  max-width: 700px;
  margin-bottom: var(--space-5);
}

.hero__subtitle {
  font-size: var(--text-lead);
  color: rgba(255,255,255,0.78);
  max-width: 600px;
  line-height: var(--lh-body);
  margin-bottom: var(--space-7);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background-color: var(--brand-teal-light);
  color: var(--brand-teal-dark);
  font-weight: 700;
  font-size: 1rem;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-cta);
  min-height: 48px;
}

.hero__cta:hover {
  background-color: #ffffff;
  color: var(--brand-teal-dark);
  box-shadow: 0 4px 20px rgba(45,212,191,0.4);
}

.hero__cta:active {
  transform: scale(0.98);
}

.hero__cta svg {
  display: inline;
  vertical-align: middle;
}

/* === 8. SECTION MANIFESTE ================================== */
.manifeste {
  background-color: var(--color-bg-page);
}

.manifeste__header {
  margin-bottom: var(--space-7);
}

.manifeste__h2 {
  margin-bottom: var(--space-4);
}

.manifeste__lead {
  font-size: var(--text-lead);
  color: var(--color-text-secondary);
  max-width: 640px;
}

.manifeste__body {
  display: grid;
  gap: var(--space-5);
  max-width: 760px;
}

.manifeste__body p {
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.manifeste__body p strong {
  color: var(--color-text-primary);
}

/* === 9. SECTION BRIQUES (outils) =========================== */
.briques {
  background-color: var(--color-bg-section-alt);
}

.briques__header {
  text-align: center;
  margin-bottom: var(--space-7);
}

.briques__subtitle {
  color: var(--color-text-secondary);
  font-size: var(--text-lead);
  margin-top: var(--space-3);
}

.briques__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.brique-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.brique-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-teal-light));
}

.brique-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.brique-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-5);
  color: var(--brand-teal);
}

.brique-card__name {
  font-size: var(--text-h3);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.brique-card__desc {
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
}

/* === 10. SECTION PREUVE ==================================== */
.preuve {
  background-color: var(--color-bg-page);
}

.preuve__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 768px) {
  .preuve__inner {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
}

.preuve__text p {
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
  margin-top: var(--space-5);
  max-width: 520px;
}

.preuve__bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.preuve__bullet {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background-color: var(--color-bg-section-alt);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--brand-teal);
}

.preuve__bullet-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--brand-teal);
  margin-top: 2px;
}

.preuve__bullet-text {
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* === 11. SECTION CONTACT =================================== */
.contact {
  background-color: var(--color-bg-hero);
  color: var(--color-text-inverse);
}

.contact h2 {
  color: var(--color-text-inverse);
}

.contact__subtitle {
  color: rgba(255,255,255,0.75);
  font-size: var(--text-lead);
  max-width: 600px;
  margin-top: var(--space-4);
  margin-bottom: var(--space-7);
}

.contact-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-field label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}

.form-field input,
.form-field textarea {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text-primary);
  background-color: rgba(255,255,255,0.96);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  line-height: var(--lh-body);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 48px;
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--color-text-muted);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand-teal-light);
  box-shadow: 0 0 0 3px rgba(45,212,191,0.25);
}

/* Honeypot — invisible, mais pas display:none pour screen readers */
.field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-submit-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background-color: var(--brand-teal-light);
  color: var(--brand-teal-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-cta);
  min-height: 48px;
  width: fit-content;
}

.btn-submit:hover {
  background-color: #ffffff;
  color: var(--brand-teal-dark);
  box-shadow: 0 4px 20px rgba(45,212,191,0.35);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-submit--loading {
  opacity: 0.8;
  cursor: wait;
}

.form-rgpd {
  font-size: var(--text-caption);
  color: rgba(255,255,255,0.55);
  line-height: var(--lh-caption);
}

/* Messages feedback formulaire */
.form-feedback {
  display: none;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
}

.form-feedback--success {
  background-color: rgba(28,138,74,0.20);
  border: 1px solid rgba(28,138,74,0.45);
  color: #6ee7b0;
}

.form-feedback--error {
  background-color: rgba(192,57,43,0.20);
  border: 1px solid rgba(192,57,43,0.45);
  color: #fca5a5;
}

.form-feedback[aria-live] {
  display: block;
}

/* === 12. FOOTER ============================================ */
.site-footer {
  background-color: var(--color-bg-footer);
  color: rgba(255,255,255,0.75);
  padding-block: var(--space-7);
  padding-inline: var(--section-px);
}

.site-footer__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: start;
}

@media (max-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-footer__logo {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-inverse);
  text-decoration: none;
}

.site-footer__meta {
  font-size: var(--text-caption);
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
}

.site-footer__meta .ninea-rc {
  /* Masqué si contient placeholder "[À RENSEIGNER...]" — JS le gère */
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}

@media (max-width: 640px) {
  .site-footer__nav {
    align-items: flex-start;
  }
}

.site-footer__nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  list-style: none;
}

.site-footer__nav-links a {
  font-size: var(--text-caption);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer__nav-links a:hover {
  color: var(--brand-teal-light);
}

.site-footer__copy {
  font-size: var(--text-caption);
  color: rgba(255,255,255,0.4);
}

/* === 13. RESPONSIVE COMPLÉMENTAIRE ========================= */
@media (max-width: 480px) {
  .hero {
    padding-inline: var(--space-5);
  }

  .hero__cta {
    width: 100%;
    justify-content: center;
  }

  .briques__grid {
    grid-template-columns: 1fr;
  }
}

/* === 14. REDUCED MOTION ==================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === 15. SKIP LINK (accessibilité) ======================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background-color: var(--brand-teal);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  z-index: 999;
  transition: top 0.1s;
}

.skip-link:focus {
  top: 0;
}

/* === 16. MENTIONS LÉGALES / CONFIDENTIALITÉ (pages simples) */
.page-static {
  padding-top: calc(var(--section-py) + 60px);
  padding-bottom: var(--section-py);
  padding-inline: var(--section-px);
  max-width: var(--content-max);
  margin-inline: auto;
}

.page-static h1 {
  margin-bottom: var(--space-6);
}

.page-static h2 {
  margin-top: var(--space-7);
  margin-bottom: var(--space-4);
  font-size: var(--text-h3);
}

.page-static p,
.page-static li {
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
  margin-bottom: var(--space-4);
}

/* ============================================================
   FIN main.css
   ============================================================ */
