/* La Frontière futée — feuille de style partagée */
:root {
  --bleu: #1b3a5c;
  --bleu-fonce: #12283f;
  --rouge: #c0392b;
  --accent: #e67e22;
  --fond: #faf8f4;
  --carte: #ffffff;
  --texte: #2c2c2c;
  --texte-doux: #5a5a5a;
  --bordure: #e4ddd2;
  --vert: #1e7e34;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--texte);
  background: var(--fond);
}

/* ---------- En-tête ---------- */
.site-header {
  background: var(--bleu-fonce);
  color: #fff;
  padding: 0;
}
.site-header .wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.1rem 1rem 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.site-nom {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.site-nom a { color: #fff; text-decoration: none; }
.site-nom .etoile { color: var(--accent); }
.site-slogan {
  font-size: 0.85rem;
  color: #c9d6e3;
  margin: 0.15rem 0 0;
}
nav.site-nav {
  background: var(--bleu);
}
nav.site-nav .wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
nav.site-nav a {
  color: #eaf0f7;
  text-decoration: none;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}
nav.site-nav a:hover { background: rgba(255,255,255,0.08); }
nav.site-nav a.actif { border-bottom-color: var(--accent); font-weight: 700; color: #fff; }

/* ---------- Emplacements publicitaires (vides pour l'instant) ---------- */
.ad-slot {
  border: 2px dashed #c9c2b4;
  background: #f4f1ea;
  color: #a09a8c;
  text-align: center;
  font-size: 0.8rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-header { min-height: 90px; margin: 1rem auto; max-width: 960px; }
.ad-article { min-height: 120px; margin: 1.75rem 0; }

/* ---------- Contenu ---------- */
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
main .wrap { max-width: 760px; }

.hero {
  background: linear-gradient(135deg, var(--bleu) 0%, var(--bleu-fonce) 100%);
  color: #fff;
  padding: 2.5rem 1rem;
  margin-bottom: 1.5rem;
}
.hero h1 { margin: 0 0 0.5rem; font-size: 2rem; line-height: 1.25; }
.hero p { color: #d7e2ef; font-size: 1.08rem; max-width: 640px; }
.hero .cta {
  display: inline-block;
  margin-top: 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
}
.hero .cta:hover { background: #cf6d1a; }

h1 { font-size: 1.9rem; line-height: 1.3; margin: 1.6rem 0 0.8rem; color: var(--bleu-fonce); }
h2 { font-size: 1.35rem; margin: 1.8rem 0 0.6rem; color: var(--bleu); }
h3 { font-size: 1.1rem; margin: 1.3rem 0 0.4rem; color: var(--bleu-fonce); }
p { margin: 0.7rem 0; }

.carte {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 8px;
  padding: 1.2rem 1.3rem;
  margin: 1rem 0;
}
.carte h2, .carte h3 { margin-top: 0.2rem; }

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}
.grille .carte { margin: 0; }
.grille .carte a { text-decoration: none; color: inherit; }
.grille .carte:hover { border-color: var(--accent); }

.exemple {
  border-left: 4px solid var(--accent);
  background: #fff8ef;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
  font-size: 0.97rem;
}
.avertissement {
  border-left: 4px solid var(--rouge);
  background: #fdf0ef;
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
}
.astuce {
  border-left: 4px solid var(--vert);
  background: #effaf1;
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
  background: #fff;
}
th, td { border: 1px solid var(--bordure); padding: 0.6rem 0.7rem; text-align: left; }
th { background: var(--bleu); color: #fff; }
tr:nth-child(even) td { background: #faf8f4; }

/* ---------- Calculateur ---------- */
.calc-form label { display: block; font-weight: 600; margin: 0.9rem 0 0.3rem; }
.calc-form input[type="number"],
.calc-form select {
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid var(--bordure);
  border-radius: 6px;
}
.calc-form .rangee { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.calc-form .case { margin: 0.7rem 0; font-weight: normal; }
.calc-form .case input { margin-right: 0.5rem; }
.btn-calculer {
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 1rem;
}
.btn-calculer:hover { background: #cf6d1a; }
#resultats { display: none; margin-top: 1.2rem; }
#resultats.visible { display: block; }
.ligne-total {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--bordure);
}
.ligne-total.grand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--bleu-fonce);
  border-bottom: 2px solid var(--bleu);
  margin-top: 0.5rem;
}
.note-calcul { font-size: 0.88rem; color: var(--texte-doux); }

/* ---------- FAQ ---------- */
details.faq {
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin: 0.6rem 0;
}
details.faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--bleu);
}
details.faq summary:hover { color: var(--accent); }

/* ---------- Pied de page ---------- */
footer.site-footer {
  background: var(--bleu-fonce);
  color: #c9d6e3;
  margin-top: 2.5rem;
  padding: 1.8rem 1rem 2.2rem;
  font-size: 0.9rem;
}
footer.site-footer .wrap { max-width: 960px; }
footer.site-footer a { color: #fff; }
footer.site-footer nav { margin-bottom: 0.8rem; }
footer.site-footer nav a { margin-right: 1rem; text-decoration: none; }
footer.site-footer nav a:hover { text-decoration: underline; }
footer.site-footer .legal { color: #9fb0c3; font-size: 0.82rem; }

.fil-ariane { font-size: 0.85rem; color: var(--texte-doux); margin: 1rem 0 0; }
.fil-ariane a { color: var(--bleu); }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.55rem; }
  h1 { font-size: 1.55rem; }
  .calc-form .rangee { grid-template-columns: 1fr; }
  nav.site-nav a { padding: 0.6rem 0.55rem; font-size: 0.88rem; }
}
