/* shared.css — Styles communs Récits partagés */

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

/* Variables */
:root {
  --brun-fonce:  #90462F;
  --brun-moyen:  #DF8350;
  --brun-clair:  #FEC7A0;
  --creme:       #FDF6EF;
  --creme-fonce: #F2E8DC;
  --texte:       #2A1A10;
  --texte-doux:  #8C6A55;
}

/* Base */
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", sans-serif;
  background-color: var(--creme);
  color: var(--texte);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}

/* Accessibilité */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
*:focus-visible {
  outline: 2px solid var(--brun-moyen);
  outline-offset: 2px;
}

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 18px 44px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 100;
  background: linear-gradient(to bottom, var(--creme) 55%, transparent);
}
.logo {
  display: flex; align-items: center; gap: 11px;
  font-family: "Crimson Pro", serif; font-size: 20px; font-weight: 600;
  color: var(--brun-fonce); text-decoration: none;
}
.logo img { width: 36px; height: 36px; object-fit: contain; }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-engagements {
  font-family: "Inter", sans-serif; font-size: 13px; font-weight: 400;
  color: var(--texte-doux); text-decoration: underline;
  text-decoration-color: var(--brun-clair); text-underline-offset: 3px;
  background: none; border: none; cursor: pointer; padding: 8px 4px;
  transition: color 0.2s;
}
.nav-engagements:hover { color: var(--brun-fonce); text-decoration-color: var(--brun-moyen); }

/* Nav links (desktop) */
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-link {
  font-family: "Inter", sans-serif; font-size: 14px; font-weight: 400;
  color: var(--texte-doux); text-decoration: none;
  background: none; border: none; cursor: pointer;
  padding: 8px 12px; border-radius: 8px;
  transition: color 0.2s, background 0.2s; white-space: nowrap;
}
.nav-link:hover { color: var(--brun-fonce); background: var(--creme-fonce); }

/* Burger */
.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: 8px; transition: background 0.2s;
}
.nav-burger:hover { background: var(--creme-fonce); }
.nav-burger span {
  display: block; width: 100%; height: 1.5px;
  background: var(--texte); border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
@keyframes menuSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-mobile-menu {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--creme); border-bottom: 1.5px solid var(--creme-fonce);
  box-shadow: 0 16px 48px rgba(42,26,16,0.10);
  padding: 8px 24px 24px;
}
.nav-mobile-menu.open { display: block; animation: menuSlideDown 0.22s ease forwards; }
.nav-mobile-menu ul { list-style: none; }
.nav-mobile-link {
  display: block; width: 100%; text-align: left;
  font-family: "Inter", sans-serif; font-size: 16px; font-weight: 400;
  color: var(--texte); text-decoration: none;
  background: none; border: none; border-bottom: 1px solid var(--creme-fonce);
  cursor: pointer; padding: 16px 0; transition: color 0.2s;
}
.nav-mobile-link:hover { color: var(--brun-fonce); }
.nav-mobile-menu li:last-child .nav-mobile-link { border-bottom: none; }
.nav-mobile-cta {
  display: block; width: 100%; margin-top: 20px;
  background: var(--brun-fonce); color: white;
  border: none; border-radius: 12px; padding: 14px 24px;
  font-family: "Inter", sans-serif; font-size: 15px; font-weight: 500;
  cursor: pointer; text-align: center; transition: background 0.2s;
}
.nav-mobile-cta:hover { background: #7a3a26; }

/* Footer */
footer {
  text-align: center; padding: 32px 24px;
  font-size: 12px; color: var(--texte-doux);
  border-top: 1px solid var(--creme-fonce);
}
footer span { color: var(--brun-moyen); font-weight: 500; }
.footer-links {
  margin-top: 10px;
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
}
.footer-link {
  font-family: "Inter", sans-serif; font-size: 12px; font-weight: 400;
  color: var(--texte-doux); background: none; border: none;
  cursor: pointer; padding: 0; transition: color 0.2s;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
}
.footer-link:hover { color: var(--brun-fonce); text-decoration-color: var(--brun-moyen); }
.footer-sep { color: var(--creme-fonce); }

/* Sticky CTA */
.sticky-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: white; border-top: 1.5px solid var(--creme-fonce);
  padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 90; box-shadow: 0 -6px 24px rgba(144,70,47,0.10);
}
.sticky-inner { display: flex; gap: 8px; align-items: center; max-width: 680px; margin: 0 auto; }
.sticky-form { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.sticky-cta input[type=email] {
  flex: 1; min-width: 0; border: 1.5px solid var(--brun-clair); border-radius: 10px;
  padding: 9px 12px; font-family: "Inter", sans-serif; font-size: 14px;
  color: var(--texte); background: var(--creme); outline: none; transition: border-color 0.2s;
}
.sticky-cta input[type=email]:focus { border-color: var(--brun-moyen); }
.sticky-cta input[type=email]::placeholder { color: var(--texte-doux); }
.btn-sticky {
  background: var(--brun-fonce); color: white; border: none; border-radius: 10px;
  padding: 9px 16px; font-family: "Inter", sans-serif; font-size: 14px;
  font-weight: 500; cursor: pointer; white-space: nowrap; transition: background 0.2s; flex-shrink: 0;
}
.btn-sticky:hover { background: #7a3a26; }
.btn-sticky:disabled { opacity: 0.6; cursor: not-allowed; }
.sticky-success { font-size: 13px; color: var(--brun-fonce); text-align: center; display: none; padding: 4px 0; }
.sticky-error { font-size: 11px; color: #c0392b; text-align: center; display: none; margin-top: 4px; }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.fade-in {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Responsive — sticky CTA */
@media (max-width: 1024px) {
  .sticky-cta { display: block; }
  body { padding-bottom: 70px; }
}

/* Responsive — mobile */
@media (max-width: 768px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 600px) {
  nav { padding: 14px 20px; }
  .logo span { display: none; }
}
