@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #14532d;         /* Vert forêt patrimonial */
  --primary-light: #166534;
  --primary-soft: #ecfdf5;
  --accent: #b45309;          /* Ambre chaud */
  --bg-page: #faf9f6;         /* Ivoire papier */
  --bg-card: #ffffff;
  --bg-subtle: #f5f3ef;       /* Sable clair */
  --text-main: #1c1917;       /* Anthracite chaud */
  --text-muted: #57534e;
  --border: #e7e5e4;
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(28, 25, 23, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* --- Navigation --- */
header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.logo::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 3px;
  transform: rotate(45deg);
}

.menu-toggle {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-size: 1.2rem;
  color: var(--text-main);
  cursor: pointer;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav-links a:hover {
  color: var(--primary);
  background: var(--bg-subtle);
}

.nav-links a.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0.85rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    width: 100%;
    padding: 0.65rem 0.4rem;
    border-bottom: 1px solid var(--bg-subtle);
  }
}

/* --- Conteneur & Titres --- */
main {
  max-width: 860px;
  margin: 2.75rem auto;
  padding: 0 1.25rem;
}

h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  font-size: 1.05rem;
  max-width: 680px;
}

/* --- Grille Page d'accueil --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.35rem;
  margin-top: 1.5rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.65rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.tool-card h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.22rem;
  color: var(--text-main);
  margin-bottom: 0.55rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-card h2::after {
  content: "→";
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.tool-card:hover h2::after {
  transform: translateX(4px);
}

.tool-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* --- Emplacements Publicitaires --- */
.ad-slot {
  width: 100%;
  min-height: 95px;
  background: var(--bg-subtle);
  border: 1px dashed #d6d3d1;
  border-radius: 10px;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a8a29e;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- Boîte du Calculateur --- */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 640px) {
  .calc-card { padding: 1.35rem; }
  .calc-grid { grid-template-columns: 1fr; }
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-page);
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}

.form-group input:hover,
.form-group select:hover {
  border-color: #a8a29e;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 83, 45, 0.12);
}

/* --- Zone de résultats (Signature visuelle) --- */
.results-box {
  background: linear-gradient(135deg, #14532d 0%, #0f3d21 100%);
  color: #faf9f6;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 10px 25px -5px rgba(20