/* ==========================================================================
   harry.immo — feuille de style unique
   Design : épuré clair, senior-friendly (corps 18px min, contrastes AA+,
   cibles tactiles 52px, aucune animation d'entrée).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --paper: #FBFAF7;
  --ink: #23282E;
  --accent: #24537D;
  --accent-hover: #1C4262;
  --hair: #E2E0D9;
  --gray: #545B64;
  --ok: #2E6B4F;

  /* Dérivés : fond teinté accent ~6 % et bordure de champ (contraste 3:1 AA
     non-textuel, --hair étant trop clair sur blanc pour un contour de champ). */
  --tint: #EDF0F4;
  --field-line: #8C8880;
  --white: #FFFFFF;

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  --radius: 6px;
  --wrap: 1080px;
  --touche: 52px;
}

/* --------------------------------------------------------------------------
   2. Reset léger
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4,
p, ul, ol, figure, fieldset, legend { margin: 0; padding: 0; }

fieldset { border: 0; min-width: 0; }

ul { list-style: none; }

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

/* --------------------------------------------------------------------------
   3. Base typographique
   -------------------------------------------------------------------------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;          /* 18px plancher */
  line-height: 1.65;
  font-weight: 400;
  scroll-behavior: smooth;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

h1 { font-size: 1.9rem; letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; margin-bottom: 0.6em; }
h3 { font-size: 1.25rem; margin-bottom: 0.35em; }
h4 { font-size: 1.1rem; margin-bottom: 0.2em; }

p { max-width: 70ch; }
p + p { margin-top: 0.9em; }

strong { font-weight: 600; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--white);
  padding: 12px 20px;
  z-index: 50;
}
.skip-link:focus { left: 0; color: var(--white); }

/* --------------------------------------------------------------------------
   4. Mise en page
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 48px 0; border-top: 1px solid var(--hair); }
.section-tint { background: var(--tint); border-top: 1px solid var(--hair); }

.section-intro { margin-bottom: 1.6em; }

.note {
  color: var(--gray);
  font-size: 1rem;
  margin-top: 1.2em;
}

.aide {
  color: var(--gray);
  font-size: 1rem;
  margin-top: 0.4em;
}

/* --------------------------------------------------------------------------
   5. En-tête / navigation collante
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}

.nav { width: 100%; }

.nav-list {
  display: flex;
  gap: 4px;
  overflow-x: auto;                 /* mobile : rangée scrollable */
  scrollbar-width: thin;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 12px;
  white-space: nowrap;
}

.nav-list a {
  display: block;
  padding: 14px 12px;
  min-height: var(--touche);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.nav-list a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
}

/* --------------------------------------------------------------------------
   6. Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touche);
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn-plein {
  background: var(--accent);
  color: var(--white);
  border: 2px solid var(--accent);
}
.btn-plein:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--white); }
.btn-plein:focus-visible { outline-color: var(--ink); outline-offset: 3px; }

.btn-contour {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-contour:hover { background: var(--white); color: var(--accent-hover); border-color: var(--accent-hover); }

.btn-large { width: 100%; font-size: 1.125rem; padding: 14px 24px; }

.btn[disabled] { opacity: .65; cursor: default; }

.cta-rangee {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.4em;
  max-width: none;
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero { padding: 40px 0 48px; }

.hero-grille { display: grid; gap: 28px; }

.hero-texte { min-width: 0; }

.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.wordmark-sous {
  color: var(--gray);
  font-size: 1rem;
  margin-bottom: 1.2em;
}

.hero h1 { margin-bottom: 0.5em; }

.lead { font-size: 1.1875rem; }

.portrait {
  aspect-ratio: 4 / 5;
  background: var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 360px;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   8. Biens
   -------------------------------------------------------------------------- */
.biens-grille {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.bien {
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bien-photo {
  aspect-ratio: 4 / 3;
  background: var(--hair);
}

.bien-photo img { width: 100%; height: 100%; object-fit: cover; }

.bien-corps {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.bien-corps h3 { margin: 0; font-size: 1.15rem; }

.bien-lieu { color: var(--gray); }

.bien-prix {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.bien-meta {
  color: var(--gray);
  font-size: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-block;
  font-size: .9375rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  color: var(--accent);
}

.badge-compromis {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--white);
}

.bien-action { margin-top: auto; padding-top: 6px; }
.bien-action .btn { width: 100%; font-size: 1rem; }

/* --------------------------------------------------------------------------
   9. Formulaires
   -------------------------------------------------------------------------- */
.carte-formulaire {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 24px 20px;
  max-width: 640px;
}

.formulaire[hidden] { display: none; }

.groupe { margin-bottom: 28px; }
.groupe:last-of-type { margin-bottom: 20px; }

.groupe-titre {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--hair);
}

.champ { margin-bottom: 20px; }

.champ label,
.champ legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;             /* label TOUJOURS visible au-dessus */
}

.champ input[type="text"],
.champ input[type="email"],
.champ input[type="number"],
.champ select,
.champ textarea {
  width: 100%;
  min-height: var(--touche);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--field-line);
  border-radius: var(--radius);
}

.champ textarea { min-height: 140px; resize: vertical; }

.champ select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 15px) 50%;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
  padding-right: 44px;
}

.champ input:hover,
.champ select:hover,
.champ textarea:hover { border-color: var(--accent); }

.champ-radios { margin-bottom: 8px; }

.radio-ligne,
.champ-case {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: var(--touche);
  padding: 6px 0;
}

.radio-ligne input,
.champ-case input {
  width: 26px;
  height: 26px;
  margin: 4px 0 0;
  accent-color: var(--accent);
  flex: none;
}

.radio-ligne label,
.champ-case label {
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}

.champ-case { margin-top: 6px; }

/* Pot de miel anti-spam */
.pot-de-miel {
  display: none;
}

/* Zone de statut (succès / erreur) */
.form-statut:empty { display: none; }

.form-statut {
  padding: 16px 18px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border-left: 6px solid var(--ok);
  background: var(--white);
  font-weight: 600;
}

.form-statut p { max-width: none; }
.form-statut p + p { margin-top: .5em; font-weight: 400; }

.form-erreur { border-left-color: var(--accent); }

/* --------------------------------------------------------------------------
   10. FAQ
   -------------------------------------------------------------------------- */
.faq { margin-top: 40px; max-width: 70ch; }
.faq h3 { margin-bottom: 0.6em; }
.faq-item { padding: 16px 0; border-top: 1px solid var(--hair); }
.faq-item h4 { color: var(--accent); }

/* --------------------------------------------------------------------------
   11. Secteur (communes)
   -------------------------------------------------------------------------- */
.communes-grille {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.commune {
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 20px;
}

.commune h3 { color: var(--accent); }

.prix-median {
  margin-top: 0.8em;
  padding-top: 0.8em;
  border-top: 1px solid var(--hair);
  color: var(--gray);
  font-size: 1rem;
}

.prix-median strong {
  color: var(--ink);
  font-size: 1.125rem;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   12. À propos / Contact
   -------------------------------------------------------------------------- */
.liste-points {
  margin-top: 1em;
  max-width: 70ch;
}

.liste-points li {
  padding: 14px 0 14px 22px;
  border-top: 1px solid var(--hair);
  position: relative;
}

.liste-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  width: 10px;
  height: 3px;
  background: var(--accent);
}

.contact-email {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 0.2em;
}

.contact-email a { text-decoration-thickness: 2px; }

.contact-tel {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 1.6em;
}

.contact-tel a { text-decoration-thickness: 2px; }

/* Rappel téléphone sous les boutons du hero */
.hero-tel {
  margin-top: 1.1em;
  color: var(--gray);
}

.hero-tel a {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  text-decoration-thickness: 2px;
}

/* --------------------------------------------------------------------------
   13. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--hair);
  padding: 40px 0 48px;
  background: var(--paper);
}

.wordmark-pied { font-size: 1.3rem; }

.bloc-legal {
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: var(--white);
  margin-top: 14px;
}

.bloc-legal summary {
  padding: 14px 18px;
  min-height: var(--touche);
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.bloc-legal summary:hover { color: var(--accent-hover); text-decoration: underline; }

.bloc-legal[open] summary { border-bottom: 1px solid var(--hair); }

.bloc-legal-contenu {
  padding: 16px 18px 20px;
  font-size: 1rem;
  color: var(--gray);
}

.bloc-legal-contenu strong { color: var(--ink); }

.copyright {
  margin-top: 28px;
  color: var(--gray);
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   14. Points de rupture
   -------------------------------------------------------------------------- */
@media (min-width: 700px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.9rem; }

  .section { padding: 64px 0; }
  .hero { padding: 56px 0 64px; }

  .biens-grille { grid-template-columns: repeat(2, 1fr); }
  .communes-grille { grid-template-columns: repeat(2, 1fr); }

  .carte-formulaire { padding: 32px 30px; }
  .btn-large { width: auto; }
}

@media (min-width: 980px) {
  .nav-list { overflow-x: visible; padding: 0 20px; }

  .hero-grille {
    grid-template-columns: 1.35fr 1fr;
    align-items: center;
    gap: 48px;
  }

  .hero-media { justify-self: end; }

  .biens-grille { grid-template-columns: repeat(3, 1fr); }
  .communes-grille { grid-template-columns: repeat(3, 1fr); }
}

/* --------------------------------------------------------------------------
   15. Mouvement réduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
