/* partenaire-pub.css */

:root {
  --topbar-h: 74px;
  --brand-teal: #0d9488;
  --brand-gold: #c8a96e;
}

html,
body {
  overflow-x: hidden;
  /* min-height (et non height:100%) : sinon html ET body deviennent des
     conteneurs de défilement de hauteur fixe (overflow-x:hidden force
     overflow-y:auto), d'où un double scroll imbriqué qui « bloque » sur mobile.
     Le mode desktop « zéro scroll » re-déclare height:100% + overflow:hidden. */
  min-height: 100%;
}

body.partenaire-pub-page {
  background: linear-gradient(150deg, #e6f7f4 0%, #f5fbfa 45%, #fdf8ef 100%);
  min-height: 100vh;
  margin: 0;
}

/* On est déjà sur la page « Publier une annonce » → on masque le bouton orange
   de la navbar desktop (doublon inutile). Le clone mobile (dans le burger) reste. */
body.partenaire-pub-page .post-ad-btn--nav { display: none; }

.partenaire-pub-page,
.partenaire-pub-page *,
.partenaire-pub-page *::before,
.partenaire-pub-page *::after {
  box-sizing: border-box;
}

.partenaire-pub-page img,
.partenaire-pub-page svg {
  max-width: 100%;
  display: block;
}

/* ── Halos lumineux sur fond clair ── */
.pub-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: transparent;
}

.pub-bg__blob--1 {
  position: absolute;
  top: -140px;
  right: -140px;
  width: 750px;
  height: 750px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.22) 0%, transparent 65%);
  filter: blur(70px);
}

.pub-bg__blob--2 {
  position: absolute;
  bottom: -120px;
  left: -120px;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 169, 110, 0.22) 0%, transparent 65%);
  filter: blur(70px);
}

.pub-bg__blob--3 {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(13, 148, 136, 0.08) 0%, transparent 70%);
  filter: blur(60px);
}

.pub-bg__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(13, 148, 136, 0.1) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ── Main ── */
.partenaire-pub-page main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--topbar-h));
  padding-top: var(--topbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Intro header ── */
.pub-intro {
  text-align: center;
  margin-bottom: 10px;
  padding: 0 20px;
}

.pub-intro__title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f1f2e;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  text-decoration: underline;
  text-decoration-color: #0f766e;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.pub-intro__sub {
  font-size: 1.05rem;
  color: #4b6075;
  margin: 0;
  line-height: 1.7;
}

/* ── Grille de cartes ── */
.pub-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  max-width: 1180px;
  width: 100%;
  padding: 32px 20px 48px;
}

/* ── Carte ── */
.pub-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  box-shadow:
    0 8px 32px rgba(13, 148, 136, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(13, 148, 136, 0.12);
  transition: all .4s cubic-bezier(.165, .84, .44, 1);
}

.pub-card:hover {
  transform: translateY(-12px);
  box-shadow:
    0 16px 48px rgba(13, 148, 136, 0.18),
    0 40px 80px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(13, 148, 136, 0.28);
}

.pub-card__img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.08);
  transition: transform .6s ease;
}

.pub-card:hover .pub-card__img {
  transform: scale(1.04);
}

.pub-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(4, 22, 40, 0.90) 0%,
    rgba(4, 22, 40, 0.45) 45%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 48px 30px;
}

.pub-card__title {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  text-decoration: underline;
  text-decoration-color: #0f766e;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.pub-card__btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-gold) 0%, #e8d4a2 100%);
  color: #1a0f00;
  padding: 15px 38px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 28px rgba(200, 169, 110, 0.38);
}

.pub-card__btn:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 40px rgba(200, 169, 110, 0.55);
}

/* ── Desktop : zéro scroll ── */
@media (min-width: 1025px) {
  html, body {
    overflow: hidden;
    height: 100%;
  }

  .partenaire-pub-page main {
    height: calc(100vh - var(--topbar-h));
    min-height: unset;
    padding-bottom: 0;
    overflow: hidden;
  }

  .pub-intro {
    margin-bottom: 6px;
    padding-top: 8px;
  }

  .pub-intro__title {
    font-size: 1.9rem;
    margin-bottom: 8px;
  }

  .pub-cards {
    flex: 1;
    min-height: 0;
    padding: 12px 20px 18px;
    align-items: stretch;
  }

  .pub-card {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .pub-card__img {
    flex: 1;
    min-height: 0;
    height: 100%;
  }

  .pub-card__overlay {
    padding: 32px 28px;
  }
}

/* ── Mobile ── */
@media (max-width: 1024px) {
  .pub-intro__title {
    font-size: 1.7rem;
  }

  .pub-cards {
    grid-template-columns: 1fr;
  }

  .pub-card__img {
    height: 400px;
  }

  #cardProprietaire {
    order: -1;
  }

  /* Mobile : le soulignement natif se brise sur plusieurs lignes (rendu
     brouillon). On le remplace par un liseré net sous le titre, on réduit la
     taille et on équilibre les retours à la ligne (évite les mots orphelins). */
  .pub-card__title {
    font-size: 1.45rem;
    text-decoration: none;
    text-wrap: balance;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 20px;
  }

  .pub-card__title::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 64px;
    height: 3px;
    border-radius: 2px;
    background: #0f766e;
  }
}

/* ── WhatsApp Float ── */
.partenaire-pub-page .whatsapp-float {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  right: auto;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9999;
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: radial-gradient(circle at center, #25d366 0 58%, rgba(255, 255, 255, 0.30) 59% 100%);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(37, 211, 102, 0.28), 0 0 0 10px rgba(37, 211, 102, 0.14);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.partenaire-pub-page .whatsapp-float:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 22px 46px rgba(37, 211, 102, 0.34), 0 0 0 12px rgba(37, 211, 102, 0.18);
}

@media (max-width: 1024px) {
  .partenaire-pub-page .whatsapp-float {
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 68px;
    height: 68px;
  }
}
