/* ============================================================
   Patrimoine en Ligne — feuille de style principale
   Identité : conseil patrimonial sobre (marine + or, papier crème)
   ============================================================ */

:root {
  --navy:        #0e2a47;
  --navy-deep:   #0a1f35;
  --gold:        #c2982f;
  --gold-soft:   #d9b85e;
  --cream:       #f7f4ee;
  --paper:       #ffffff;
  --ink:         #1c2430;
  --muted:       #5b6675;
  --line:        #e6ddcf;
  --line-soft:   #efe9dd;
  --shadow:      0 18px 40px -24px rgba(14, 42, 71, .45);
  --radius:      14px;
  --max:         1140px;
  --serif:       "Fraunces", Georgia, "Times New Roman", serif;
  --sans:        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.18; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.eyebrow {
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 .6rem;
}
.lead { font-size: 1.18rem; color: var(--muted); }

/* ── Boutons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-weight: 600;
  font-size: .98rem; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--gold); color: #2a2206; }
.btn-primary:hover { background: var(--gold-soft); color: #2a2206; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { border-color: var(--gold); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-deep); color: #fff; transform: translateY(-2px); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ── En-tête ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 238, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand b { font-family: var(--serif); font-size: 1.32rem; color: var(--navy); font-weight: 600; }
.brand span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav > a, .nav .has-sub > a { font-weight: 500; font-size: .97rem; color: var(--ink); }
.nav > a:hover { color: var(--gold); }
.has-sub { position: relative; }
.has-sub > a::after { content: "▾"; font-size: .7rem; margin-left: .3rem; color: var(--muted); }
.submenu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: .6rem; min-width: 250px;
  opacity: 0; visibility: hidden; transition: .18s ease;
}
.has-sub:hover .submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(4px); }
.submenu a { display: block; padding: .55rem .8rem; border-radius: 8px; font-size: .95rem; color: var(--ink); }
.submenu a:hover { background: var(--cream); color: var(--navy); }
.nav .phone { font-weight: 600; color: var(--navy); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--navy); cursor: pointer; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy) 60%, #143a5e);
  color: #f4eee0; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(194,152,47,.25), transparent 45%);
}
.hero .wrap { position: relative; z-index: 1; padding: 92px 22px 96px; max-width: 880px; }
.hero h1 { color: #fff; }
.hero p { font-size: 1.25rem; color: #d7e0ea; max-width: 620px; margin: 1.2rem 0 2rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ── Sections ────────────────────────────────────────────── */
section { padding: 72px 0; }
.section-head { max-width: 680px; margin-bottom: 2.6rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* présentation */
.intro-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.intro-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.fact { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.fact b { font-family: var(--serif); font-size: 2rem; color: var(--gold); display: block; }
.fact span { font-size: .9rem; color: var(--muted); }

/* solutions */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; transition: transform .18s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-soft); }
.card h3 { margin: 0 0 .5rem; }
.card p { margin: 0 0 1.1rem; color: var(--muted); font-size: .97rem; flex: 1; }
.card .more { font-weight: 600; color: var(--gold); font-size: .92rem; }
.card-num { font-family: var(--serif); color: var(--line); font-size: 1.4rem; margin-bottom: .4rem; }

/* articles */
.bg-paper { background: var(--paper); }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.post {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .2s ease;
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post .thumb { aspect-ratio: 16 / 10; background: var(--cream) center/cover no-repeat; }
.post .body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post .tag { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.post h3 { font-size: 1.15rem; margin: .5rem 0 .6rem; }
.post p { color: var(--muted); font-size: .94rem; margin: 0 0 1rem; flex: 1; }
.post .meta { font-size: .82rem; color: var(--muted); display: flex; gap: .8rem; }

/* bande CTA */
.cta-band { background: var(--navy); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cdd8e4; max-width: 580px; margin: .8rem auto 1.8rem; }

/* ── Page article (contenu migré) ────────────────────────── */
.article-hero { background: var(--navy-deep); color: #fff; }
.article-hero .wrap { padding: 64px 22px 48px; max-width: 820px; }
.article-hero .tag { color: var(--gold-soft); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; }
.article-hero h1 { color: #fff; margin: .6rem 0; }
.article-hero .meta { color: #aebccb; font-size: .9rem; }
.article-cover { max-width: 980px; margin: -40px auto 0; padding: 0 22px; position: relative; z-index: 2; }
.article-cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.prose { max-width: 760px; margin: 0 auto; padding: 48px 22px 8px; }
.prose h2 { margin: 2.2rem 0 .8rem; }
.prose h3 { margin: 1.8rem 0 .6rem; font-size: 1.18rem; }
.prose p { margin: 0 0 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose img { border-radius: 10px; margin: 1.4rem 0; }
.prose figure { margin: 1.6rem 0; }
.prose figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .5rem; }
.prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--navy); }
.prose .icon-list { list-style: none; padding-left: 0; }
.prose .icon-list li { padding-left: 1.5rem; position: relative; }
.prose .icon-list li::before { content: "✦"; color: var(--gold); position: absolute; left: 0; }
.prose .callout {
  background: var(--cream); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.3rem; margin: 1.6rem 0;
}
.prose .btn-article {
  display: inline-block; background: var(--navy); color: #fff !important; text-decoration: none;
  padding: .7rem 1.4rem; border-radius: 999px; font-weight: 600;
}
.prose .btn-article:hover { background: var(--gold); color: #2a2206 !important; }
.prose table.av-table, .prose table {
  width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .95rem;
}
.prose table td, .prose table th { border: 1px solid var(--line); padding: .65rem .8rem; }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; margin: 1.6rem 0; }
.prose .gallery img { margin: 0; height: 100%; object-fit: cover; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.article-foot { max-width: 760px; margin: 0 auto; padding: 0 22px 40px; }
.back-link { display: inline-flex; gap: .4rem; color: var(--navy); font-weight: 600; }

/* aside solutions (siblings) */
.page-layout { display: grid; grid-template-columns: 1fr 260px; gap: 3rem; align-items: start; max-width: var(--max); margin: 0 auto; padding: 48px 22px; }
.side-nav { position: sticky; top: 100px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.side-nav h4 { margin: 0 0 .8rem; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-nav a { display: block; padding: .45rem .2rem; font-size: .95rem; border-bottom: 1px solid var(--line-soft); }
.side-nav a:last-child { border-bottom: 0; }
.side-nav a.active { color: var(--gold); font-weight: 600; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--navy); }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .95rem; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: var(--paper); color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .9rem; padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; display: none; }
.form-note.ok { display: block; background: #e8f3e8; color: #1f5130; border: 1px solid #b9dcb9; }
.form-note.err { display: block; background: #fbeaea; color: #7a2222; border: 1px solid #e6bcbc; }
.contact-info { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 2rem; }
.contact-info h3 { color: #fff; }
.contact-info a { color: var(--gold-soft); }
.contact-info .row { display: flex; gap: .7rem; margin: .9rem 0; align-items: flex-start; }
.contact-info .row b { color: #fff; }

/* ── Pied de page ────────────────────────────────────────── */
.site-footer { background: var(--navy-deep); color: #c4d0dd; padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 1rem; }
.site-footer a { color: #c4d0dd; display: block; padding: .25rem 0; font-size: .94rem; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-brand b { font-family: var(--serif); color: #fff; font-size: 1.3rem; }
.footer-brand p { font-size: .92rem; line-height: 1.6; margin: .8rem 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.4rem; padding-top: 1.4rem; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }

/* ── 404 ─────────────────────────────────────────────────── */
.notfound { text-align: center; padding: 110px 22px; }
.notfound .code { font-family: var(--serif); font-size: 6rem; color: var(--gold); line-height: 1; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 920px) {
  .intro-grid, .contact-grid { grid-template-columns: 1fr; }
  .cards, .article-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; }
}
@media (max-width: 680px) {
  .nav { position: fixed; inset: 78px 0 auto; flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 1rem 22px; gap: .4rem;
    display: none; }
  .nav.open { display: flex; }
  .nav .has-sub > a { display: block; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 1rem; min-width: 0; }
  .nav-toggle { display: block; }
  .cards, .article-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Chapeau « réponse d'abord » sous le titre des pages métier */
.article-hero .lead { color: #cdd8e4; margin: .4rem 0 0; }

/* FAQ (balisée FAQPage) — cartes accordéon dans l'esprit des .card */
.faq { margin-top: 3rem; }
.faq > h2 { margin: 0 0 .3rem; }
.faq > h2::after { content: ""; display: block; width: 48px; height: 3px; background: var(--gold); border-radius: 2px; margin: .7rem 0 1.4rem; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 .8rem;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item:hover, .faq-item[open] { border-color: var(--gold-soft); border-left-color: var(--gold); box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1.08rem; line-height: 1.35; }
.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cream) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e2a47' stroke-width='2.2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>") center / 16px no-repeat;
  transition: transform .25s, background-color .2s;
}
.faq-item[open] summary::after { transform: rotate(180deg); background-color: var(--gold-soft); }
.faq-item p { margin: 0; padding: 0 1.2rem 1.15rem; color: var(--muted); line-height: 1.65; border-top: 1px solid var(--line-soft); padding-top: .9rem; }

/* ── Vérification e-mail du formulaire de contact ───────── */
.contact-flow { min-width: 0; }
.contact-otp,
.contact-success {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
}
.contact-otp[hidden],
.contact-success[hidden],
#contactForm[hidden] { display: none; }
.contact-otp__head h2 { margin: 0 0 .55rem; font-size: 1.45rem; }
.contact-otp__head p { margin: 0; color: var(--muted); line-height: 1.55; }
.contact-otp__actions {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  gap: .75rem;
  align-items: center;
  margin-top: 1.35rem;
}
.contact-otp__input {
  width: 100%;
  min-width: 0;
  padding: .82rem .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  color: var(--navy);
  font: 700 1.7rem/1 var(--sans);
  letter-spacing: .32em;
  text-align: center;
}
.contact-otp__input:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.contact-otp__status { min-height: 1.4em; margin: 1rem 0 0; color: var(--muted); font-size: .9rem; }
.contact-otp__status.ok { color: #1f5130; }
.contact-otp__status.err { color: #7a2222; }
.contact-otp .btn:disabled,
#contactForm .btn:disabled { cursor: wait; opacity: .62; transform: none; }
.contact-success p { margin: 0 0 1.2rem; color: #1f5130; line-height: 1.6; }

@media (max-width: 680px) {
  .contact-otp__actions { grid-template-columns: 1fr 1fr; }
  .contact-otp__input { grid-column: 1 / -1; }
  .contact-otp__actions .btn { justify-content: center; padding-inline: 1rem; }
}
