/* ProPilot · base commune à toutes les pages de la refonte
   1. Réinitialisation  2. Utilitaires  3. Mouvement  4. Typographie  5. Boutons  6. Navigation et menu mobile
   7. Barre d’action mobile  8. Pied de page  9. Bannière cookies
   Les jetons (couleurs, polices, formes) viennent de css/tokens.css. */

/* 1. Réinitialisation */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --focus: var(--blue);   /* contour de focus : bleu sur fond clair (3:1 minimum), cyan sur fond sombre */
  --on-cyan: var(--navy);    /* texte sur fond cyan : navy (6,65:1, conforme AA) ; le blanc de la maquette ne fait que 2,77:1 */
}
.nav, .menu, .stickybar, .consent, .on-dark { --focus: var(--cyan); }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);   /* les ancres s’arrêtent sous la navigation, aussi au chargement et au retour arrière */
}
html.is-menu-open { overflow: hidden; }   /* menu mobile ouvert : le fond ne défile plus */
body {
  margin: 0;
  min-width: 320px;
  background: var(--navy);
  color: var(--navy);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--cyan); color: var(--on-cyan); }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
[hidden] { display: none !important; }
:where(a, button, input, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* 2. Utilitaires */
.container { max-width: var(--container); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--white); color: var(--navy); font-size: 14px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* 3. Mouvement : courbe signature var(--ease) ; transform et opacity seulement */
@keyframes ppIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes ppRise { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes ppMask { from { clip-path: inset(18% 8% 18% 8% round 14px); opacity: .4; } to { clip-path: inset(0 0 0 0 round 14px); opacity: 1; } }
@keyframes ppFade { from { opacity: 0; } to { opacity: 1; } }

/* Apparition liée au défilement (CSS seul). Sans prise en charge de animation-timeline, le contenu s’affiche directement. */
@supports (animation-timeline: view()) {
  .rise { animation: ppRise linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  .rise--b { animation-range: entry 10% cover 40%; }
  .rise--25 { animation-range: entry 0% cover 25%; }
  .rise--35 { animation-range: entry 0% cover 35%; }
  .rise--wm { animation-range: entry 0% entry 100%; }
  .rise--mask { animation-name: ppMask; animation-fill-mode: backwards; animation-range: entry 0% cover 40%; }   /* « backwards » : le masque ne reste pas appliqué une fois la carte entrée */
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 4. Typographie */
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; line-height: 1.4; color: var(--blue); }
.on-dark .kicker { color: var(--cyan-light); }
.display {
  font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h2);
  line-height: .98; letter-spacing: -.025em; text-wrap: balance;
}
.display em { font-style: italic; color: var(--blue); }
.on-dark .display em { color: var(--cyan); }

/* 5. Boutons : pilules de 52 à 56 px */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border: 1.5px solid transparent; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center; white-space: nowrap;
  cursor: pointer; transition: background .3s, color .3s, border-color .3s;
}
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--cyan { background: var(--cyan); color: var(--on-cyan); }
.btn--white { background: var(--white); color: var(--navy); }
.btn--outline { border-color: rgba(255, 255, 255, .3); color: var(--white); }
.btn--line { border-color: var(--navy); color: var(--navy); }
@media (hover: hover) {
  .btn--navy:hover { background: var(--blue); }
  .btn--cyan:hover { background: var(--white); color: var(--navy); }
  .btn--white:hover { background: var(--cyan); color: var(--on-cyan); }
  .btn--outline:hover { border-color: var(--white); }
  .btn--line:hover { background: var(--navy); color: var(--white); }
}

/* 6. Navigation : sticky 64 px, fond navy flouté */
.nav {
  position: sticky; top: 0; z-index: 70;
  background: var(--nav-overlay);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);   /* filet sous la barre, hors de sa hauteur : --nav-h reste exact */
  color: var(--white);
}
.nav__in {
  max-width: var(--container); height: var(--nav-h); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav__logo { display: flex; flex: none; align-items: center; height: 44px; }   /* zone de toucher de 44 px, sans changer la hauteur de la barre */
.nav__logo img { display: block; height: 22px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--mist); transition: color .3s;
}
.nav__links a::after {   /* soulignement cyan du lien actif */
  content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 1.5px;
  background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.nav__links a[aria-current] { color: var(--white); }
.nav__links a[aria-current]::after { transform: scaleX(1); }
@media (hover: hover) { .nav__links a:hover { color: var(--white); } }
.nav__actions { display: flex; align-items: center; gap: 14px; }
.nav__login { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--white); }
.btn--nav { min-height: 44px; padding: 0 18px; font-size: 14px; }

.burger {
  display: none; flex: none; width: 44px; height: 44px; margin-right: -8px;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.burger span {
  display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--white);
  transition: transform .4s var(--ease);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Menu plein écran (sous la navigation) */
.menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 65;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 32px 24px calc(28px + env(safe-area-inset-bottom));
  background: var(--navy); color: var(--white); overflow-y: auto;
  animation: ppFade .3s ease both;
}
.menu__links { display: flex; flex-direction: column; }
.menu__link {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--font-serif); font-size: 36px; line-height: 1.1; letter-spacing: -.02em; color: var(--white);
  animation: ppIn .6s var(--ease) both;
}
.menu__link:nth-child(1) { animation-delay: .05s; }
.menu__link:nth-child(2) { animation-delay: .11s; }
.menu__link:nth-child(3) { animation-delay: .17s; }
.menu__link:nth-child(4) { animation-delay: .23s; }
.menu__arrow { font-family: var(--font-ui); font-size: 20px; color: var(--cyan); }
.menu__foot { display: flex; flex-direction: column; gap: 12px; padding-top: 28px; animation: ppIn .6s var(--ease) .3s both; }
.menu__foot .btn--outline { border-color: rgba(255, 255, 255, .25); }
.menu__contact { padding-top: 6px; text-align: center; font-size: 14px; color: var(--mist-2); }
.menu__contact a { color: var(--white); font-weight: 700; }
/* Bouton « Fermer le menu » : invisible tant qu’il n’a pas le focus (clavier, lecteur d’écran) ; la souris et le doigt utilisent la croix de la navigation */
.menu__close {
  position: absolute; top: 8px; right: 16px; z-index: 1;
  width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--white); color: var(--navy); font-size: 14px; font-weight: 700;
}
.menu__close:focus-visible { width: auto; height: auto; overflow: visible; clip-path: none; }

@media (max-width: 1079.98px) {
  .nav__links, .nav__login { display: none; }
  .burger { display: flex; }
  .nav__more {   /* « Essayer » seul à l’écran, mais le nom accessible reste « Essayer sur mon annonce » */
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
@media (min-width: 1080px) { .menu { display: none !important; } }
@media (max-width: 359.98px) {   /* 320 px : la navigation tient sans défilement horizontal */
  .nav__in { gap: 10px; }
  .nav__actions { gap: 8px; }
  .nav__logo img { height: 20px; }
  .btn--nav { padding: 0 14px; }
}

/* 7. Barre d’action collante (mobile) : animée en translateY, pilotée par PP.stickybar (js/nav.js) */
.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(11, 20, 36, .9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, .1);
  transform: translateY(100%); visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s linear .5s;
}
.stickybar.is-visible { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
.stickybar__in { display: flex; align-items: center; gap: 12px; }
.stickybar__cta { flex: 1; min-height: 52px; font-size: 16px; }
.stickybar__recap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.stickybar__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--white); }
.stickybar__titre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--mist-2); }
.stickybar__prix { white-space: nowrap; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stickybar__ht { font-size: 12px; font-weight: 600; color: var(--mist-2); }
.stickybar__book { flex: none; min-height: 50px; padding: 0 20px; font-size: 15px; }
@media (min-width: 760px) { .stickybar { display: none; } }

/* 8. Pied de page commun (accueil et tarifs) */
.foot { padding: clamp(80px, 12vw, 180px) var(--gutter) 0; background: var(--navy); color: var(--white); overflow: hidden; }
.foot__in { max-width: var(--container); margin: 0 auto; display: flex; flex-direction: column; gap: clamp(48px, 7vw, 96px); }
.foot__top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 28px 64px; align-items: end; }
.foot__title { font-size: clamp(42px, 6vw, 92px); line-height: .96; letter-spacing: -.03em; }
.foot__actions { display: flex; flex-direction: column; gap: 16px; }
.foot__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.foot__contact { font-size: 15px; line-height: 1.6; color: var(--mist); }
.foot__contact a { color: var(--white); font-weight: 700; }
.foot__cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 28px;
  padding-top: 36px; border-top: 1px solid rgba(255, 255, 255, .12);
}
.foot__brand { display: flex; flex-direction: column; gap: 12px; }
.foot__logo { display: block; align-self: flex-start; height: 22px; width: auto; }
.foot__tag { font-size: 13px; line-height: 1.6; color: var(--mist-2); }
.foot__col { display: flex; flex-direction: column; gap: 10px; }
.foot__h { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan-light); }
.foot__links { display: flex; flex-direction: column; }
.foot__links a, .foot__links button {
  display: inline-flex; align-items: center; padding: 4px 0;
  font-size: 14px; line-height: 1.5; text-align: left; color: var(--mist); transition: color .3s;
}
@media (hover: hover) { .foot__links a:hover, .foot__links button:hover, .foot__contact a:hover { color: var(--cyan-light); } }
@media (pointer: coarse) { .foot__links a, .foot__links button { min-height: 44px; min-width: 44px; } }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; font-size: 12px; color: var(--mist-2); }
.foot__word {   /* « propilot.immo » géant, coupé en bas du pied de page */
  padding: clamp(24px, 4vw, 48px) 0 .04em;
  font-family: var(--font-serif); font-size: clamp(40px, 14.5vw, 210px); line-height: .78; letter-spacing: -.05em;
  color: var(--navy-2); text-align: center; white-space: nowrap; user-select: none;
}
.foot__word::before { content: attr(data-word); }   /* décoratif : généré en CSS, hors de l'arbre d'accessibilité et du contrôle de contraste */

/* 9. Bannière cookies (affichée seulement si un identifiant Meta Pixel est renseigné) */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 560px; margin: 0 auto; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--navy-2); color: var(--white);
  border: 1px solid var(--line-dark); border-radius: var(--r-card);
  box-shadow: 0 24px 60px rgba(11, 20, 36, .35);
}
.consent__text { font-size: 14px; line-height: 1.55; color: var(--mist); }
.consent__text a { color: var(--cyan-light); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.consent__actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* Accepter et Refuser : même gabarit, même style (CNIL) */
.consent__btn {
  min-height: 44px; padding: 0 22px; border: 1.5px solid var(--white); border-radius: var(--r-pill);
  background: var(--white); color: var(--navy); font-size: 14px; font-weight: 700;
  transition: background .3s, border-color .3s;
}
@media (hover: hover) { .consent__btn:hover { background: var(--sky); border-color: var(--sky); } }
