/* ==========================================================
   Site viager – Raphaël Azot
   Charte : blanc cassé, bleu marine, touche terracotta.
   Texte de base 20 px, interlignage 1.6, aucune animation.
   ========================================================== */

:root {
  --bg: #FAF6EF;          /* blanc cassé */
  --surface: #FFFFFF;
  --soft: #F1EADF;
  --line: #E3DACB;
  --ink: #1C2333;         /* texte courant */
  --muted: #4A5162;       /* texte secondaire (contraste 7:1 sur fond) */
  --navy: #1E2A44;
  --navy-deep: #16203A;
  --terra: #A84A28;       /* terracotta (contraste 5,7:1 avec texte blanc) */
  --terra-deep: #8E3C1D;
  --terra-light: #F3C9B5;
  --serif: "Source Serif 4", "Source Serif Pro", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

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

a {
  color: var(--navy);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { color: var(--terra-deep); }

:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.4rem; }

p, li, dd { max-width: 70ch; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.5em; }
strong { color: var(--navy); }

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Lien d'évitement ---------- */
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- En-tête ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--navy);
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand span {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
}
.phone {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--terra);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  min-height: 60px;
  white-space: nowrap;
  line-height: 1.2;
}
.phone:hover { background: var(--terra-deep); color: #fff; }
.phone small { font-size: 1rem; font-weight: 500; }

.site-nav { background: var(--navy); }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 1.1rem;
  min-height: 56px;
  font-weight: 500;
  border-bottom: 5px solid transparent;
}
.site-nav a:hover { background: var(--navy-deep); color: #fff; }
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--terra-light);
  font-weight: 700;
}
.site-nav a:focus-visible { outline-color: #fff; outline-offset: -5px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 60px;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  border: 3px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--terra);
  color: #fff;
  border-color: var(--terra);
}
.btn-primary:hover {
  background: var(--terra-deep);
  border-color: var(--terra-deep);
  color: #fff;
}
.btn-secondary {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ---------- Sections ---------- */
.hero { padding: 3rem 0 2.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.portrait {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
}
.portrait img {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 auto 1rem;
}
.portrait strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
}
.portrait p { margin: 0; max-width: none; }

.section { padding: 2.5rem 0; }
.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section h2 + .lede { margin-top: -0.3rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 6px solid var(--navy);
  border-radius: 14px;
  padding: 1.5rem;
  margin: 0;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--terra);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.notice {
  background: var(--soft);
  border-left: 8px solid var(--terra);
  padding: 1.25rem 1.5rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
}
.notice p:last-child { margin-bottom: 0; }

/* Listes de garanties / numérotées */
.steps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  counter-reset: etape;
}
.steps > li {
  counter-increment: etape;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.5rem 5rem;
  position: relative;
  margin-bottom: 1.25rem;
  max-width: none;
}
.steps > li::before {
  content: counter(etape);
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h2, .steps h3 { margin-top: 0; font-size: 1.5rem; }
.steps p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .steps > li { padding: 4.5rem 1.25rem 1.5rem; }
  .steps > li::before { left: 1.25rem; top: 1.25rem; }
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.checklist li {
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 0.9rem;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--terra);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.3;
}

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
}
caption {
  text-align: left;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy);
  padding: 0 0 0.6rem;
  caption-side: top;
}
th, td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th { background: var(--soft); color: var(--navy); }
tbody th { background: transparent; font-weight: 600; }
td.who {
  font-weight: 700;
  white-space: nowrap;
}
td.who-you { color: var(--navy); }
td.who-me { color: var(--terra-deep); }
tr.highlight td, tr.highlight th { background: #FDF3EC; }

/* ---------- Accordéon (details natif) ---------- */
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 1rem;
}
summary {
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 2rem;
  line-height: 1;
  color: var(--terra);
  flex-shrink: 0;
}
details[open] summary::after { content: "–"; }
details[open] summary { border-bottom: 1px solid var(--line); }
summary:hover { background: var(--soft); border-radius: 12px; }
details .answer { padding: 1rem 1.25rem 1.25rem; }
details .answer p:last-child { margin-bottom: 0; }

/* ---------- Formulaire ---------- */
.field { margin-bottom: 1.25rem; }
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--navy);
}
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  padding: 0.8rem 1rem;
  border: 2px solid var(--navy);
  border-radius: 10px;
  background: #fff;
  min-height: 60px;
  color: var(--ink);
}
textarea { min-height: 180px; resize: vertical; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  min-height: 48px;
}
.check input {
  width: 30px;
  height: 30px;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  accent-color: var(--terra);
}
.hint { color: var(--muted); margin: 0.3rem 0 0; }
.form-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem;
  max-width: 720px;
}
.required { color: var(--terra-deep); }

.phone-huge {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
  text-decoration: none;
  margin: 0.4rem 0 0.8rem;
}
.phone-huge:hover { color: var(--terra-deep); text-decoration: underline; }

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 2.5rem 0;
  margin-top: 3rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--terra-light); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.footer-phone a {
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
  display: inline-block;
  min-height: 48px;
}
.footer-note { opacity: 0.95; }
.site-footer p { margin-bottom: 0.6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4em; }
.site-footer li a { display: inline-block; min-height: 44px; padding: 0.3rem 0; }

/* ---------- Divers ---------- */
figure { margin: 0 0 1.5rem; }
.photo-large {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2.5rem;
  align-items: start;
}
.legal h2 { font-size: 1.5rem; margin-top: 2rem; }
address { font-style: normal; }

@media (max-width: 820px) {
  .hero-grid, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; margin: 0 auto; }
  .hero { padding-top: 2rem; }
}
@media (max-width: 560px) {
  .header-inner { justify-content: center; text-align: center; }
  .brand { align-items: center; }
  .phone { font-size: 1.3rem; width: 100%; justify-content: center; }
  .btn { width: 100%; }
  .site-nav a { padding: 0.8rem 0.9rem; }
}

@media print {
  .site-nav, .skip, .btn-row { display: none; }
  body { background: #fff; }
}

/* Texte lu par les lecteurs d'écran, invisible à l'écran */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mt { margin-top: 1.5rem; }

/* ---------- Bloc d'appel unique ---------- */
.cta {
  flex-basis: 100%;
  background: var(--surface);
  border: 2px solid var(--navy);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0 0;
  max-width: 720px;
}
.cta-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.9rem;
  max-width: none;
}
.cta .btn { width: 100%; font-size: clamp(1.15rem, 2.4vw, 1.5rem); min-height: 68px; }
.cta-sub {
  margin: 0.8rem 0 0;
  font-weight: 600;
  color: var(--navy);
  max-width: none;
}
.cta-sub span { font-weight: 400; color: var(--muted); }
.btn-row .btn-secondary { margin-top: 0.25rem; }

/* Déroulé de l'appel */
.call-steps {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 820px;
}
.call-steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.5rem 1.25rem 4.6rem;
  position: relative;
  margin: 0;
  max-width: none;
  font-size: 1.1rem;
}
.call-steps li::before {
  content: attr(data-n);
  position: absolute;
  left: 1.1rem;
  top: 1.1rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--terra);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.call-steps strong { display: block; margin-bottom: 0.2rem; font-size: 1.3rem; font-family: var(--serif); }

.big-figure {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--terra-deep);
  line-height: 1.15;
  margin: 0 0 0.3rem;
  max-width: none;
}
