/* ============================================================
   Cabinet infirmier du Blanquet — style.css
   Design : médical contemporain, chaleureux, premium sobre.
   Mobile-first. Public cible : patients + aidants, souvent seniors.
   Tokens centralisés ci-dessous.
   ============================================================ */

:root {
  /* Couleurs */
  --encre: #14383a;        /* titres, texte fort */
  --texte: #2a3733;        /* texte courant */
  --texte-doux: #5a6a64;   /* texte secondaire */
  --fond: #fcfbf8;         /* fond général, blanc naturel */
  --carte: #ffffff;        /* fond des cartes */
  --lin: #f1eee6;          /* bandes de section, rappel "Blanquet" */
  --garonne: #16696b;      /* couleur principale (liens, accents) */
  --garonne-fonce: #0f4d4f;
  --appel: #157a3f;        /* vert "décrocher" — bouton Appeler */
  --appel-fonce: #0e5c2e;
  --erreur: #a3341f;
  --trait: #dcd6c9;

  /* Typo */
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, sans-serif;

  /* Rythme */
  --rayon: 14px;
  --max: 68rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--f-body);
  font-size: 1.125rem;          /* 18px : lisibilité seniors */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 5.25rem;      /* place pour la barre CTA mobile */
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

h1, h2, h3 {
  font-family: var(--f-display);
  color: var(--encre);
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 3.5vw, 2rem); font-weight: 650; }
h3 { font-size: 1.2rem; font-weight: 650; }
p  { margin: 0 0 1em; }
a  { color: var(--garonne); text-underline-offset: 3px; }
a:hover { color: var(--garonne-fonce); }

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.1rem; }

/* ---------- En-tête ---------- */
.site-header {
  background: var(--fond);
  border-bottom: 1px solid var(--trait);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; flex-wrap: wrap;
}
.marque {
  font-family: var(--f-display);
  font-weight: 700; font-size: 1.15rem; color: var(--encre);
  text-decoration: none; line-height: 1.25;
}
.marque small { display: block; font-weight: 450; font-size: .8rem; color: var(--texte-doux); }
.nav-simple { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.nav-simple a { font-size: 1rem; text-decoration: none; color: var(--encre); padding: .35rem 0; }
.nav-simple a[aria-current="page"] { border-bottom: 3px solid var(--garonne); }
.header-tel { display: none; }
@media (min-width: 900px) {
  .header-tel {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--appel); color: #fff; text-decoration: none;
    font-weight: 700; padding: .65rem 1.1rem; border-radius: 999px;
  }
  .header-tel:hover { background: var(--appel-fonce); color: #fff; }
}

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 2.2rem; }
.hero .sous-titre { font-size: 1.2rem; color: var(--texte); max-width: 38rem; }
.hero .precision { color: var(--texte-doux); font-size: 1rem; max-width: 38rem; }

/* Ligne de tournée : signature du site — le trajet à domicile */
.tournee { margin: 1.6rem 0 0; }
.tournee svg { width: 100%; max-width: 40rem; height: auto; display: block; }
.tournee text { font-family: var(--f-body); font-size: 13px; fill: var(--encre); font-weight: 600; }
.tournee .route { stroke: var(--garonne); stroke-width: 2.5; fill: none; stroke-dasharray: 5 6; stroke-linecap: round; }
.tournee .pt { fill: var(--garonne); }
.tournee .maison { fill: var(--appel); }

/* ---------- Boutons ---------- */
.cta-groupe { display: flex; flex-direction: column; gap: .8rem; margin: 1.8rem 0 0; max-width: 26rem; }
@media (min-width: 640px) { .cta-groupe { flex-direction: row; max-width: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--f-body); font-weight: 700; font-size: 1.15rem;
  padding: 1rem 1.4rem; border-radius: var(--rayon);
  text-decoration: none; text-align: center; border: 2px solid transparent;
  min-height: 3.4rem; cursor: pointer;
}
.btn-appel { background: var(--appel); color: #fff; }
.btn-appel:hover { background: var(--appel-fonce); color: #fff; }
.btn-demande { background: var(--carte); color: var(--garonne-fonce); border-color: var(--garonne); }
.btn-demande:hover { background: var(--garonne); color: #fff; }
.btn-large { width: 100%; }

/* Barre CTA mobile persistante */
.barre-cta {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
  padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(252, 251, 248, .96);
  border-top: 1px solid var(--trait);
  backdrop-filter: blur(4px);
}
.barre-cta .btn { font-size: 1rem; padding: .8rem .5rem; min-height: 3.1rem; }
@media (min-width: 900px) { .barre-cta { display: none; } }

/* ---------- Sections ---------- */
.section { padding: 2.6rem 0; }
.section-lin { background: var(--lin); }
.eyebrow {
  font-size: .85rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--garonne); margin-bottom: .5rem;
}

.cartes { display: grid; gap: 1rem; margin: 1.4rem 0 0; }
@media (min-width: 700px) { .cartes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cartes.trois { grid-template-columns: 1fr 1fr 1fr; } }

.carte {
  background: var(--carte); border: 1px solid var(--trait);
  border-radius: var(--rayon); padding: 1.3rem 1.3rem 1.1rem;
}
.carte h3 { margin-top: 0; }
.carte p:last-child { margin-bottom: 0; }
.carte .lien-soin { font-weight: 650; }

/* Étapes "comment ça se passe" */
.etapes { display: grid; gap: 1rem; margin: 1.4rem 0 0; counter-reset: etape; }
@media (min-width: 800px) { .etapes { grid-template-columns: 1fr 1fr 1fr; } }
.etape {
  background: var(--carte); border: 1px solid var(--trait);
  border-radius: var(--rayon); padding: 1.2rem; position: relative;
}
.etape::before {
  counter-increment: etape; content: counter(etape);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--garonne); color: #fff; font-weight: 700;
  font-family: var(--f-display); margin-bottom: .6rem;
}

/* Liste de communes */
.communes { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 1rem 0; list-style: none; }
.communes li {
  background: var(--carte); border: 1px solid var(--trait);
  border-radius: 999px; padding: .45rem 1rem; font-weight: 600; color: var(--encre);
}

/* Encadré information */
.note {
  border-left: 4px solid var(--garonne); background: var(--carte);
  border-radius: 0 var(--rayon) var(--rayon) 0;
  padding: .9rem 1.1rem; margin: 1.2rem 0; font-size: 1rem; color: var(--texte);
}
.note-urgence { border-left-color: var(--erreur); }

/* ---------- Formulaire ---------- */
.form-demande { max-width: 40rem; }
.form-section {
  background: var(--carte); border: 1px solid var(--trait);
  border-radius: var(--rayon); padding: 1.3rem; margin: 0 0 1.1rem;
}
.form-section legend, .form-section .q {
  font-family: var(--f-display); font-weight: 650; font-size: 1.15rem;
  color: var(--encre); padding: 0; margin: 0 0 .8rem;
}
fieldset.form-section { border: 1px solid var(--trait); }

.choix { display: grid; gap: .55rem; }
@media (min-width: 560px) { .choix.deux-col { grid-template-columns: 1fr 1fr; } }
.choix label {
  display: flex; align-items: center; gap: .7rem;
  border: 2px solid var(--trait); border-radius: 10px;
  padding: .75rem .9rem; cursor: pointer; background: var(--fond);
  font-size: 1.05rem;
}
.choix label:hover { border-color: var(--garonne); }
.choix input { width: 1.35rem; height: 1.35rem; accent-color: var(--garonne); flex: none; }
.choix label:has(input:checked) { border-color: var(--garonne); background: #eaf3f2; }

.champ { margin: 0 0 .9rem; }
.champ:last-child { margin-bottom: 0; }
.champ label { display: block; font-weight: 650; margin-bottom: .35rem; color: var(--encre); }
.champ .aide { display: block; font-size: .95rem; color: var(--texte-doux); font-weight: 450; margin-top: .15rem; }
.champ input[type="text"],
.champ input[type="tel"],
.champ input[type="email"],
.champ input[type="date"],
.champ select,
.champ textarea {
  width: 100%; font: inherit; color: var(--texte);
  padding: .85rem .9rem; border: 2px solid var(--trait); border-radius: 10px;
  background: var(--fond); min-height: 3.1rem;
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
  border-color: var(--garonne); outline: 3px solid rgba(22, 105, 107, .25); outline-offset: 0;
}
.champ .erreur-msg { display: none; color: var(--erreur); font-weight: 600; font-size: 1rem; margin-top: .35rem; }
.champ.invalide input { border-color: var(--erreur); }
.champ.invalide .erreur-msg { display: block; }

.masque { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--encre); color: #e8ece9; margin-top: 3rem;
  padding: 2.2rem 0 2.6rem; font-size: 1rem;
}
.site-footer a { color: #cfe0dc; }
.site-footer h2 { color: #fff; font-size: 1.15rem; }
.footer-cols { display: grid; gap: 1.6rem; }
@media (min-width: 800px) { .footer-cols { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer .legal { margin-top: 1.8rem; font-size: .9rem; color: #b7c4bf; }

/* ---------- Divers ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--encre);
  color: #fff; padding: .7rem 1rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.succes {
  background: #eaf3ec; border: 2px solid var(--appel);
  border-radius: var(--rayon); padding: 1.4rem;
}
.todo-owner { background: #fff3cd; padding: 0 .3rem; border-radius: 4px; }

/* Utilitaires (CSP stricte : pas de styles inline) */
.mt-2 { margin-top: 2.2rem; }
.mt-1 { margin-top: 1.4rem; }
.mt-petit { margin-top: .8rem; }
.wrap-etroit { max-width: 46rem; }

/* Carte du secteur centrée sur le cabinet */
.tournee svg { margin: .4rem auto 0; }
.tournee .t-centre { font-weight: 700; font-size: 14px; }
.tournee .t-cab { font-weight: 450; font-size: 11px; fill: #5a6a64; }
