/* ==========================================================================
   Terence Singh — Agent général AXA Prévoyance & Patrimoine
   Feuille de style unique. Palette et typographie alignées sur l'identité AXA.
   ========================================================================== */

:root {
  --blue: #00008f;
  --blue-700: #000063;
  --blue-050: #eeeef8;
  --blue-100: #dcdcf0;
  --red: #ff1721;
  --ink: #1b1b2f;
  --slate: #565672;
  --line: #d8d8e4;
  --paper: #ffffff;
  --wash: #f5f5fa;
  --ok: #007a52;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --wrap: 1140px;
  --gap: clamp(1.5rem, 4vw, 3.5rem);
  --radius: 3px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums lining-nums;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.35rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

img, svg { max-width: 100%; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--gap) 0;
}

/* --------------------------------------------------------- mise en page --- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.band { padding-block: clamp(2.75rem, 6vw, 5rem); }
.band--wash { background: var(--wash); }
.band--blue { background: var(--blue); color: #fff; }
.band--blue h2, .band--blue h3 { color: #fff; }
.band--blue a { color: #fff; }
.band--tight { padding-block: clamp(2rem, 4vw, 3rem); }

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  color: var(--slate);
  max-width: 62ch;
}

.band--blue .lede { color: #cfcfe9; }

.rule-red {
  width: 56px;
  height: 4px;
  background: var(--red);
  border: 0;
  margin: 0 0 1.5rem;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  z-index: 99;
  background: #fff; color: var(--blue);
  padding: 0.6rem 1rem;
  border: 2px solid var(--blue);
}

/* ------------------------------------------------------------- en-tête --- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

/* Marque provisoire : à remplacer par le logo officiel AXA (voir README) */
.brand__mark {
  display: block;
  width: 46px;
  height: 46px;
  flex: none;
  object-fit: contain;
  object-position: center;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.2;
  display: block;
}
.brand__role {
  font-size: 0.78rem;
  color: var(--slate);
  display: block;
}

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.9rem); }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.97rem;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.nav__list a:hover { color: var(--blue); border-bottom-color: var(--blue-100); }
.nav__list a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--red); }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--blue);
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem clamp(1.1rem, 4vw, 2rem) 1.25rem;
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 0.9rem; text-align: center; }
}

/* ------------------------------------------------------------- boutons --- */

.btn {
  display: inline-block;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.72rem 1.35rem;
  border: 2px solid var(--blue);
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.btn:hover { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }

.btn--ghost { background: transparent; color: var(--blue); }
.btn--ghost:hover { background: var(--blue-050); color: var(--blue-700); }

.btn--light { background: #fff; border-color: #fff; color: var(--blue); }
.btn--light:hover { background: var(--blue-050); border-color: var(--blue-050); color: var(--blue-700); }

.btn--wide { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.link-more {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid var(--blue-100);
}
.link-more:hover { border-bottom-color: var(--red); }

/* ---------------------------------------------------------------- hero --- */

.hero {
  background: var(--blue);
  color: #fff;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.hero__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  align-items: start;
}
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero h1 { color: #fff; margin-bottom: 0.35em; }
.hero__kicker {
  font-size: 1.02rem;
  color: #b9b9e0;
  margin-bottom: 1.1rem;
}
.hero__text { color: #dcdcf0; font-size: 1.1rem; max-width: 46ch; }

.hero__facts {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.97rem;
  color: #cfcfe9;
}
.hero__facts li { padding-left: 1.1rem; position: relative; }
.hero__facts li::before {
  content: "";
  position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; background: var(--red);
}

/* carte de visite */
.vcard {
  background: #fff;
  color: var(--ink);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 4px solid var(--red);
}

/* carte de visite avec photo */
.vcard__portrait {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.vcard__portrait img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex: none;
  border: 3px solid var(--blue-050);
}

.vcard h2 { font-size: 1.25rem; margin-bottom: 0.35em; }
.vcard p { font-size: 0.97rem; color: var(--slate); }
.vcard__hours {
  font-size: 0.92rem;
  color: var(--slate);
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 0.9rem;
}
.vcard__hours strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------- blocs contenu --- */

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

.head { max-width: 62ch; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.head p { color: var(--slate); }

/* rubrique d'offre */
.offer {
  border-left: 3px solid var(--blue);
  padding: 0.15rem 0 0.15rem 1.15rem;
}
.offer h3 { margin-bottom: 0.35em; }
.offer p { font-size: 0.99rem; color: var(--slate); margin-bottom: 0.6em; }
.offer--alt { border-left-color: var(--red); }

/* fiche audience */
.who {
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(1.2rem, 2.2vw, 1.6rem);
  display: flex;
  flex-direction: column;
}
.who h3 { font-size: 1.3rem; }
.who p { color: var(--slate); font-size: 0.99rem; }
.who ul {
  margin: 0 0 1.35rem;
  padding-left: 1.1rem;
  font-size: 0.97rem;
  color: var(--slate);
}
.who ul li { margin-bottom: 0.3rem; }
.who .link-more { margin-top: auto; align-self: start; }

/* étapes numérotées (séquence réelle) */
.steps {
  list-style: none;
  counter-reset: s;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.steps li { counter-increment: s; }
.steps li::before {
  content: counter(s);
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--red);
  border-top: 2px solid currentColor;
  padding-top: 0.35rem;
  margin-bottom: 0.5rem;
  width: 2.2rem;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 0.3em; }
.steps p { font-size: 0.97rem; color: var(--slate); margin: 0; }
.band--blue .steps p { color: #cfcfe9; }

/* tableau de repères */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
  min-width: 460px;
}
table.data caption {
  text-align: left;
  font-size: 0.9rem;
  color: var(--slate);
  padding-bottom: 0.6rem;
}
table.data th,
table.data td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data thead th {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
}
table.data tbody tr:nth-child(even) { background: var(--wash); }

/* FAQ */
.faq { max-width: 76ch; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0;
}
.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.75rem 2rem 0.75rem 0;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 0.65rem;
  font-family: var(--sans);
  font-size: 1.4rem;
  color: var(--red);
  line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { font-size: 0.99rem; color: var(--slate); margin-bottom: 1rem; }

/* sous-navigation d'ancres */
.subnav {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 76px;
  z-index: 30;
}
.subnav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
}
.subnav a {
  display: block;
  padding: 0.85rem 0;
  font-size: 0.94rem;
  text-decoration: none;
  color: var(--slate);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--blue); border-bottom-color: var(--red); }
@media (max-width: 900px) { .subnav { top: 0; } }

/* note / avertissement */
.note {
  background: var(--blue-050);
  border-left: 3px solid var(--blue);
  padding: 1rem 1.15rem;
  font-size: 0.93rem;
  color: var(--slate);
}
.note p { margin-bottom: 0.5em; }
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }

/* ---------------------------------------------------------- simulateur --- */

.sim {
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}
@media (max-width: 940px) {
  .sim { grid-template-columns: 1fr; }
}

.sim__form {
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border-right: 1px solid var(--line);
}
@media (max-width: 940px) {
  .sim__form { border-right: 0; border-bottom: 1px solid var(--line); }
}
.sim__out {
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: var(--wash);
}

.sim__title {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 1.25rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--blue);
}

.field { margin-bottom: 1.15rem; }
.field label,
.field legend {
  display: block;
  font-size: 0.93rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.field .hint {
  font-size: 0.84rem;
  color: var(--slate);
  margin: 0.3rem 0 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  outline: 2px solid var(--blue-100);
  outline-offset: 0;
}
textarea { min-height: 150px; resize: vertical; }

.field-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

details.advanced {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin-top: 0.5rem;
}
details.advanced summary {
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue);
}
details.advanced .field { margin-top: 1rem; }

/* résultats */
.result { margin-bottom: 1.4rem; }
.result__label {
  font-size: 0.9rem;
  color: var(--slate);
  margin: 0 0 0.15rem;
}
.result__value {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--blue);
  display: block;
}
.result__value small {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--slate);
}
.result__value--gap { color: var(--red); }

.rows { list-style: none; margin: 0 0 1.4rem; padding: 0; font-size: 0.97rem; }
.rows li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.rows li span:last-child { font-weight: 600; text-align: right; white-space: nowrap; }
.rows li.rows__total {
  border-bottom: 0;
  border-top: 2px solid var(--blue);
  padding-top: 0.7rem;
  font-weight: 600;
}
.rows .muted { color: var(--slate); font-weight: 400; font-size: 0.9rem; }

/* barre de couverture */
.bar {
  height: 30px;
  display: flex;
  background: var(--red);
  overflow: hidden;
  margin: 0.35rem 0 0.6rem;
}
.bar__fill {
  background: var(--blue);
  height: 100%;
  transition: width 0.35s ease;
}
.bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  font-size: 0.87rem;
  color: var(--slate);
  margin-bottom: 1.4rem;
}
.bar-legend span { display: flex; align-items: center; gap: 0.4rem; }
.bar-legend i {
  width: 12px; height: 12px; display: block; flex: none;
}
.bar-legend .k-blue { background: var(--blue); }
.bar-legend .k-red { background: var(--red); }

.sim__cta { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.sim__cta p { font-size: 0.94rem; color: var(--slate); }

.disclaimer {
  font-size: 0.85rem;
  color: var(--slate);
  border-top: 1px solid var(--line);
  margin-top: 1.2rem;
  padding-top: 0.9rem;
}

/* ------------------------------------------------------------- contact --- */

.contact-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card {
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.reveal {
  border: 1px solid var(--line);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  background: #fff;
}
.reveal p { margin: 0; font-size: 0.9rem; color: var(--slate); }
.reveal__value {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0.25rem 0 0;
  word-break: break-word;
}
.reveal__value a { text-decoration: none; }
.reveal button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.5rem 0.95rem;
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  cursor: pointer;
}
.reveal button:hover { background: var(--blue-050); }

.honey {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 1.2rem;
}
.consent input { margin-top: 0.35rem; flex: none; width: auto; }

.form-msg {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: none;
}
.form-msg[data-state="error"] {
  display: block;
  background: #fdecec;
  border-left: 3px solid var(--red);
  color: #8a0b12;
}
.form-msg[data-state="ok"] {
  display: block;
  background: #e8f5ef;
  border-left: 3px solid var(--ok);
  color: #045138;
}

.hours-list { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}
.hours-list li span:last-child { color: var(--slate); }

/* ------------------------------------------------------- pied de page --- */

.footer {
  background: var(--ink);
  color: #c9c9d8;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  font-size: 0.94rem;
}
.footer h2, .footer h3 {
  color: #fff;
  font-size: 1.05rem;
  font-family: var(--sans);
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.footer a { color: #fff; }
.footer a:hover { color: #ff8b91; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.45rem; }
.footer__grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.footer__legal {
  border-top: 1px solid #35354d;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  padding-top: 1.5rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #9a9ab0;
}
.footer__legal p { max-width: 100ch; }

/* -------------------------------------------------------------- divers --- */

.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.75rem; font-size: 1.1rem; }
.prose ul { padding-left: 1.2rem; color: var(--slate); }
.prose li { margin-bottom: 0.4rem; }
.prose { max-width: 74ch; }

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-050);
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.6rem;
}

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
