/* =========================================================
   nephro.ca — feuille de style principale
   Police: Source Serif 4 (titres) + Inter (texte/interface)
   ========================================================= */

:root{
  --ink:        #142E2B;
  --ink-soft:   #44605B;
  --ink-faint:  #7A9A93;
  --bg:         #F7F7F3;
  --bg-alt:     #EFF2ED;
  --white:      #FFFFFF;
  --teal:       #2B6E64;
  --teal-deep:  #17453D;
  --teal-pale:  #E3ECE8;
  --gold:       #B4863F;
  --brick:      #A24E3C;
  --brick-pale: #F3E4DF;
  --line:       #DBDED4;
  --line-soft:  #E7E9E1;

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

  --radius: 3px;
  --shadow-soft: 0 1px 3px rgba(20,46,43,0.08);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4{
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--teal-deep);
}

h1{ font-size: clamp(2.1rem, 4vw, 3.1rem); font-weight: 600; }
h2{ font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3{ font-size: 1.2rem; font-family: var(--sans); font-weight: 600; color: var(--ink); }

p{ margin: 0 0 1em; max-width: 68ch; }
p.lede{ font-size: 1.15rem; color: var(--ink-soft); max-width: 54ch; }

a{ color: var(--teal-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.container{
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow{ max-width: 760px; }

/* ---------- Header / nav ---------- */
.site-header{
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}
.logo{
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--teal-deep);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.logo-img{
  height: 42px;
  width: auto;
  display: block;
}
.logo span{ color: var(--gold); }

.nav{
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a{
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.96rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:hover, .nav a.active{
  color: var(--teal-deep);
  border-bottom-color: var(--gold);
}
.nav-toggle{ display: none; }

@media (max-width: 760px){
  .site-header .container{ flex-wrap: wrap; }
  .nav{ width: 100%; justify-content: flex-start; gap: 18px 22px; padding-top: 6px; }
}

/* ---------- Secondary (hub) nav — used on Médecins / Patients hub pages ---------- */
.subnav{
  background: var(--teal-pale);
  border-bottom: 1px solid var(--line);
}
.subnav .container{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.subnav a{
  text-decoration: none;
  color: var(--teal-deep);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.subnav a:hover{ background: rgba(23,69,61,0.08); }
.subnav a.active{ background: var(--teal-deep); color: var(--white); }

/* ---------- Hero ---------- */
.hero{
  position: relative;
  padding: 88px 0 76px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .container{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 48px;
  align-items: end;
}
.hero-copy{ max-width: 620px; }
.hero-motif{
  align-self: center;
  justify-self: end;
}
.hero-motif-img{
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
}
.hero-actions{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
@media (max-width: 820px){
  .hero .container{ grid-template-columns: 1fr; }
  .hero-motif{ display: none; }
  .hero{ padding: 56px 0 48px; }
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 12px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary{
  background: var(--teal-deep);
  color: var(--white);
}
.btn-primary:hover{ background: var(--teal); }
.btn-outline{
  background: transparent;
  border-color: var(--teal-deep);
  color: var(--teal-deep);
}
.btn-outline:hover{ background: var(--teal-pale); }
.btn-gold{
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover{ background: #9c7134; }
.btn[disabled]{ opacity: 0.55; cursor: not-allowed; }

/* ---------- Sections ---------- */
section{ padding: 64px 0; }
section.alt{ background: var(--bg-alt); }
.section-head{ max-width: 640px; margin-bottom: 40px; }

/* ---------- Fork cards (home: Médecins / Patients) ---------- */
.fork{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.fork-card{
  background: var(--white);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fork-card .kicker{
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 1rem;
}
.fork-card h2{ margin-bottom: 4px; }
.fork-card ul{ margin: 4px 0 8px; padding-left: 20px; color: var(--ink-soft); }
.fork-card ul li{ margin-bottom: 6px; }
@media (max-width: 760px){
  .fork{ grid-template-columns: 1fr; }
}

/* ---------- Tool cards (patient tools grid) ---------- */
.tools-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
}
.tool-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool-card h3{ margin-bottom: 2px; }
.tool-card p{ color: var(--ink-soft); font-size: 0.96rem; margin-bottom: 6px; }
.tool-card .btn{ margin-top: auto; align-self: flex-start; }
@media (max-width: 860px){
  .tools-grid{ grid-template-columns: 1fr; }
}

/* ---------- Info panel / callout ---------- */
.panel{
  background: var(--white);
  border: 1px solid var(--line);
  padding: 26px 28px;
}
.panel + .panel{ margin-top: 18px; }
.panel h3{ margin-bottom: 8px; }

.notice{
  border-left: 3px solid var(--gold);
  background: var(--teal-pale);
  padding: 16px 20px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.notice strong{ color: var(--teal-deep); }

.notice-brick{
  border-left: 3px solid var(--brick);
  background: var(--brick-pale);
  padding: 16px 20px;
  font-size: 0.95rem;
  color: #6E362A;
}
.notice-brick strong{ color: var(--brick); }

/* ---------- Steps list ---------- */
.steps{
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.steps li{
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  align-items: baseline;
}
.steps li::before{
  content: counter(step);
  font-family: var(--serif);
  font-weight: 600;
  color: var(--teal);
  border: 1px solid var(--line);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
.steps h4{ font-family: var(--sans); font-weight: 600; margin: 0 0 2px; }
.steps p{ margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Forms ---------- */
form.card-form{
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px;
  max-width: 620px;
}
.field{ margin-bottom: 20px; }
.field label{
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field .hint{ font-size: 0.82rem; color: var(--ink-faint); margin-top: 4px; }
.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field input[type="email"],
.field select,
.field textarea{
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus{
  border-color: var(--teal);
  background: var(--white);
}
.field-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px){ .field-row{ grid-template-columns: 1fr; } }

/* ---------- Embed frame (Jotform etc.) ---------- */
.embed-frame{
  border: 1px solid var(--line);
  background: var(--white);
  padding: 6px;
}
.embed-frame iframe{
  width: 100%;
  border: 0;
  display: block;
  min-height: 640px;
}

/* ---------- Table (documentation lists) ---------- */
.doc-list{ list-style: none; margin: 0; padding: 0; }
.doc-list li{
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.doc-list .doc-meta{ color: var(--ink-faint); font-size: 0.85rem; }
.doc-list a.doc-link{ font-weight: 600; text-decoration: none; }
.doc-list a.doc-link:hover{ text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer{
  background: var(--teal-deep);
  color: #DDEAE5;
  padding: 48px 0 28px;
  margin-top: 40px;
}
.site-footer a{ color: #F2E9D8; text-decoration: none; }
.site-footer a:hover{ text-decoration: underline; }
.footer-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4{ color: #F2E9D8; font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.02em; margin-bottom: 12px; }
.footer-grid ul{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 18px;
  font-size: 0.82rem;
  color: #9FBBB4;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 760px){
  .footer-grid{ grid-template-columns: 1fr; }
}

/* ---------- Utility ---------- */
.mt-0{ margin-top: 0; }
.text-center{ text-align: center; }
.badge{
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-deep);
  background: var(--teal-pale);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
