/* ==========================================================================
   POPImmo Sàrl — feuille de style unique, partagée par toutes les pages.
   Couleurs officielles relevées dans le logo :
     bleu marine #1C3864  → identité, mot coloré des titres, liens, boutons
     orange     #D88A3D  → action et alerte uniquement (offre + urgence)
   Principe : fond blanc pur, beaucoup de vide, aucune ombre, aucun dégradé.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables
   -------------------------------------------------------------------------- */
:root {
  --navy: #1c3864;
  --navy-dark: #142845;
  --orange: #d88a3d;
  --orange-dark: #b8712d;
  --ink: #0a0a0a;
  --grey: #6e6e73;
  --grey-light: #a1a1a6;
  --hairline: #e6e6e8;
  --surface: #f5f5f7;
  --white: #ffffff;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
    "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --wrap-narrow: 760px;
  --radius: 18px;
  --radius-photo: 22px;
}

/* --------------------------------------------------------------------------
   2. Bases
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); /* 17px → 19px */
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

p {
  margin: 0 0 1.2em;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.5em;
}

/* Focus clavier toujours visible */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. Conteneurs et rythme vertical
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  width: 100%;
  max-width: var(--wrap-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: clamp(88px, 14vw, 184px) 0;
}

.section-tight {
  padding: clamp(56px, 8vw, 104px) 0;
}

.section-line {
  border-top: 1px solid var(--hairline);
}

/* Fond gris très clair, sur toute la largeur de l'écran : une ou deux
   sections par page au maximum, pour donner un rythme sans rien encadrer. */
.section-surface {
  background: var(--surface);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 14px 20px;
  border-radius: 0 0 var(--radius) 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   4. En-tête
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.logo-link:hover {
  text-decoration: none;
}

.logo {
  height: 30px;
  width: auto;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  padding: 12px;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  margin: 5px 0;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav-list li {
  margin: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--grey);
  font-size: 0.95rem;
  font-weight: 400;
  border-radius: 999px;
}

.nav-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. Titres
   -------------------------------------------------------------------------- */
.page-head {
  text-align: center;
}

/* La largeur du titre est mesurée sur la taille du titre lui-même,
   pour qu'il tienne sur deux ou trois lignes bien équilibrées. */
.h1 {
  font-size: clamp(2.375rem, 7.2vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 auto;
  max-width: 17ch;
  text-wrap: balance;
}

.page-head-wide .h1 {
  max-width: 21ch;
}

/* Le mot mis en valeur dans chaque grand titre : orange du logo.
   Le bleu marine reste la couleur des liens, des boutons et de la structure. */
.accent {
  color: var(--orange);
}

.lead {
  max-width: 46ch;
  margin: clamp(24px, 3vw, 34px) auto 0;
  color: var(--grey);
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: pretty;
}

.h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 clamp(20px, 2.5vw, 30px);
  max-width: 20ch;
  text-wrap: balance;
}

.h2-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 12px;
}

.text {
  max-width: 62ch;
  color: var(--ink);
  text-align: left;
}

.text-muted {
  color: var(--grey);
}

.eyebrow {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--grey);
  margin: 0 0 14px;
  text-transform: none;
}

/* --------------------------------------------------------------------------
   6. Boutons
   -------------------------------------------------------------------------- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(30px, 4vw, 44px);
}

.btn-row-center {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease,
    border-color 0.25s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--navy-dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

/* Orange : réservé au bouton « Demander une offre » et à l'urgence sinistre. */
.btn-orange {
  background: var(--orange);
  color: var(--white);
}

.btn-orange:hover {
  background: var(--orange-dark);
  color: var(--white);
}

.link-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. Grilles et blocs
   -------------------------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

/* Dans une grille, les colonnes commencent toutes à la même hauteur :
   l'écart vertical entre blocs empilés ne doit pas s'y appliquer. */
.grid-2 .block + .block {
  margin-top: 0;
}

/* Respiration entre un paragraphe d'introduction et la grille qui suit. */
.text + .grid-2 {
  margin-top: clamp(32px, 4vw, 56px);
}

.block {
  max-width: 62ch;
  text-align: left;
}

.block + .block {
  margin-top: clamp(56px, 8vw, 110px);
}

.block-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.block-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  color: var(--ink);
}

.block-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy);
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  max-width: 62ch;
}

.step {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 56px;
  margin: 0 0 clamp(28px, 4vw, 44px);
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   8. Photos et emplacements provisoires
   -------------------------------------------------------------------------- */
.photo {
  width: 100%;
  border-radius: var(--radius-photo);
  overflow: hidden;
  display: block;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 220px;
  padding: 40px 24px;
  background: var(--surface);
  border: 2px dashed var(--grey-light);
  border-radius: var(--radius-photo);
  color: var(--grey);
  text-align: center;
}

.photo-placeholder-hero {
  aspect-ratio: 16 / 9;
  min-height: 260px;
}

.photo-placeholder-square {
  aspect-ratio: 4 / 3;
}

.photo-placeholder-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.photo-placeholder-note {
  font-size: 0.9375rem;
  margin: 0;
  max-width: 42ch;
}

/* Emplacement d'information manquante — à compléter par POPImmo */
.todo {
  border: 2px dashed var(--orange);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
  margin: 24px 0;
  background: var(--white);
  max-width: 62ch;
}

.todo-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 10px;
}

.todo p {
  color: var(--grey);
  font-size: 1rem;
}

/* Mention discrète « texte proposé ».
   Mise en réserve : tous les textes du site sont validés, plus aucune page ne
   s'en sert. Ces règles resservent si un nouveau texte doit être relu. */
.draft-note {
  display: block;
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--grey-light);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   9. Bloc urgence sinistre (orange — usage exclusif)
   -------------------------------------------------------------------------- */
.urgence {
  background: var(--orange);
  color: var(--white);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
}

.urgence-title {
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 12px;
}

.urgence-text {
  color: var(--white);
  max-width: 60ch;
  margin: 0 0 22px;
}

.urgence-phone {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.urgence-phone:hover {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   10. Questions fréquentes
   -------------------------------------------------------------------------- */
.faq {
  max-width: 62ch;
  border-top: 1px solid var(--hairline);
}

.faq-item {
  border-bottom: 1px solid var(--hairline);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  padding: 22px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1;
}

.faq-item[open] .faq-q::after {
  content: "–";
}

.faq-a {
  padding: 0 0 24px;
  color: var(--grey);
  max-width: 58ch;
}

/* --------------------------------------------------------------------------
   10 bis. Documents à télécharger (modèles de lettres, formulaires)
   Listés sobrement, séparés par un simple filet, sans encadré.
   Mise en réserve : aucune page ne s'en sert pour l'instant, les fichiers PDF
   n'étant pas encore disponibles. Ces règles servent dès leur mise en ligne.
   -------------------------------------------------------------------------- */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 62ch;
}

.doc-item {
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--hairline);
  margin: 0;
}

.doc-item:first-child {
  border-top: 1px solid var(--hairline);
}

.doc-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--navy);
}

.doc-note {
  display: block;
  font-size: 0.9375rem;
  color: var(--grey);
  margin: 0;
}

/* Message affiché quand il n'y a rien à montrer (aucun objet à louer). */
.empty-note {
  max-width: 46ch;
  margin: 0 auto;
  text-align: center;
  color: var(--grey);
}

.empty-note-title {
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 10px;
}

/* --------------------------------------------------------------------------
   11. Coordonnées
   -------------------------------------------------------------------------- */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  margin: 0;
}

.info-item:first-child {
  border-top: 1px solid var(--hairline);
}

.info-label {
  display: block;
  font-size: 0.9375rem;
  color: var(--grey);
  margin-bottom: 4px;
}

.info-value {
  display: block;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
}

.info-value a {
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   12. Formulaire
   -------------------------------------------------------------------------- */
.form {
  max-width: 620px;
}

.field {
  margin-bottom: 26px;
}

.field-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.field-optional {
  color: var(--grey);
  font-weight: 400;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: 12px;
  transition: border-color 0.2s ease;
}

.field-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--navy);
}

.field-input[aria-invalid="true"],
.field-select[aria-invalid="true"],
.field-textarea[aria-invalid="true"] {
  border-color: var(--orange-dark);
}

.field-error {
  display: none;
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--orange-dark);
}

.field-error.is-shown {
  display: block;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 26px;
}

.check-input {
  width: 24px;
  height: 24px;
  margin: 4px 0 0;
  flex: 0 0 auto;
  accent-color: var(--navy);
}

.check-label {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.55;
}

.check-label a {
  text-decoration: underline;
}

/* Champ piège anti-spam : invisible pour les humains, laissé vide. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: none;
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: 12px;
  font-size: 1rem;
  max-width: 620px;
}

.form-status.is-shown {
  display: block;
}

.form-status.is-ok {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.form-status.is-error {
  background: var(--white);
  color: var(--orange-dark);
  border: 1px solid var(--orange);
}

/* --------------------------------------------------------------------------
   13. Bas de page
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(56px, 7vw, 88px) 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
}

.footer-logo {
  height: 30px;
  width: auto;
  margin-bottom: 18px;
}

.footer-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
}

.footer-text {
  font-size: 1rem;
  color: var(--grey);
  margin: 0 0 8px;
  line-height: 1.6;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 4px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
  color: var(--grey);
}

.footer-link:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.footer-legal {
  font-size: 0.9375rem;
  color: var(--grey-light);
  margin: 0;
}

/* --------------------------------------------------------------------------
   14. Apparitions douces au défilement
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Si le JavaScript est désactivé, tout reste visible. */
@media (scripting: none) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Respect du réglage « réduire les animations » du système. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   15. Tablette
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   16. Téléphone (vérifié à 375 px de large)
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .wrap,
  .wrap-narrow {
    padding: 0 20px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--hairline);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, visibility 0.3s;
  }

  .nav.is-open {
    max-height: 540px;
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
  }

  .nav-link {
    min-height: 52px;
    padding: 0 4px;
    font-size: 1.0625rem;
    border-radius: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .nav-list li:last-child .nav-link {
    border-bottom: 0;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .h1,
  .page-head-wide .h1 {
    max-width: 100%;
  }

  .h2 {
    max-width: 100%;
  }

  .btn {
    width: 100%;
  }

  .btn-row {
    flex-direction: column;
  }

  .step {
    padding-left: 48px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Sans JavaScript, le menu du téléphone reste ouvert et utilisable. */
@media (max-width: 760px) and (scripting: none) {
  .nav-toggle {
    display: none;
  }
  .nav {
    position: static;
    max-height: none;
    opacity: 1;
    visibility: visible;
    border-bottom: 0;
  }
}
