/* ==========================================================================
   Hexa Immo Invest — Feuille de style principale
   Design : moderne, minimaliste, accent terracotta.
   Dépendances : Inter + Fraunces via Google Fonts (chargées dans le layout).
   ========================================================================== */

/* ---- 1. Variables globales ---------------------------------------------- */
:root {
  --accent:       #B85C3E;   /* terracotta principale        */
  --accent-dark:  #8F4530;   /* hover / accents marqués      */
  --accent-soft:  #F4EEE6;   /* fonds chaleureux             */
  --text:         #1F1B1A;   /* corps de texte               */
  --text-muted:   #6B6360;   /* texte secondaire             */
  --bg:           #FBFAF7;   /* fond de page                 */
  --bg-alt:       #F5EFE7;   /* fond de section alternée     */
  --border:       #E5DCD2;   /* bordures discrètes           */
  --max-w:        72rem;     /* largeur de contenu max       */
  --radius:       6px;
  --transition:   180ms cubic-bezier(.2,.6,.2,1);
  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif:   "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---- 2. Reset léger ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---- 3. Base ------------------------------------------------------------ */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---- 4. Header + navigation -------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 72px;
  padding-block: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  transition: opacity var(--transition);
}
.brand:hover { opacity: .75; }
.brand img { height: 34px; width: auto; }

.primary-nav ul {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}
.primary-nav a {
  position: relative;
  font-weight: 500;
  font-size: .95rem;
  color: var(--text);
  padding: .25rem 0;
  transition: color var(--transition);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.primary-nav a:hover,
.primary-nav a.active { color: var(--accent-dark); }
.primary-nav a:hover::after,
.primary-nav a.active::after { transform: scaleX(1); }

@media (max-width: 780px) {
  .header-inner { flex-direction: column; gap: 1rem; align-items: flex-start; padding-block: 1.25rem; }
  .primary-nav ul { flex-wrap: wrap; gap: 1rem 1.25rem; }
  .primary-nav a { font-size: .9rem; }
}

/* ---- 5. Hero (accueil) ------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 480px at 90% -10%, rgba(184, 92, 62, .10), transparent 60%),
    radial-gradient(900px 420px at 0% 110%, rgba(184, 92, 62, .06), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-inner { padding-block: clamp(4rem, 10vw, 8rem); max-width: 56rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent-dark);
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin-bottom: 1.5rem;
  max-width: 22ch;
}
.hero-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 2.5rem;
  line-height: 1.55;
}

/* ---- 6. Boutons -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.5rem;
  font-weight: 600;
  font-size: .95rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn span { transition: transform var(--transition); }
.btn:hover span { transform: translateX(3px); }

/* ---- 7. Page intérieure : en-tête -------------------------------------- */
.page-header {
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.page-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.015em;
  max-width: 26ch;
  margin-bottom: 1.25rem;
}
.page-intro {
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--text-muted);
  max-width: 62ch;
  line-height: 1.6;
}

/* ---- 8. Sections et "prose" (contenu Markdown) ------------------------- */
.section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.prose { max-width: 68ch; }
.prose h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.2;
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -.01em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: .75rem;
  color: var(--text);
}
.prose h4 {
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent-dark);
}
.prose p {
  margin-bottom: 1.15rem;
  color: var(--text);
}
.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.prose a:hover { color: var(--accent); }

.prose strong { font-weight: 600; color: var(--text); }
.prose em { font-style: italic; }

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--accent-soft);
  padding: .12em .4em;
  border-radius: 4px;
}

.prose ul {
  margin-bottom: 1.25rem;
  padding-left: 0;
}
.prose ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: .6rem;
  line-height: 1.55;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .75rem;
  width: 12px;
  height: 1px;
  background: var(--accent);
}

.prose hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin-block: 2.5rem;
}

/* ---- 9. Footer --------------------------------------------------------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-block: 3rem;
  margin-top: 4rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1fr 1fr; align-items: start; }
}
.footer-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: .25rem;
}
.footer-baseline { color: var(--text-muted); font-size: .95rem; }
.footer-meta {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.footer-meta p { margin-bottom: .75rem; }
.footer-meta a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-meta a:hover { color: var(--accent-dark); }
.footer-copy { font-size: .82rem; opacity: .8; }
@media (min-width: 720px) {
  .footer-meta { text-align: right; }
}

/* ---- 10. Focus visible (a11y) ------------------------------------------ */
a:focus-visible,
.btn:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- 11. Préférences réduites ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
