/* ============================================================
   AVENUE BELMONT — PAGE RECHERCHE SUR MESURE
   ============================================================ */

/* ══════════════════════════════════════════
   HERO — image plein cadre, texte à gauche
══════════════════════════════════════════ */
.ab-sourcing-hero {
  position: relative;
  display: flex;
  align-items: center;
  /* #ab-content a un padding-top de 80px (hauteur du header fixe) : sans en
     tenir compte, 83vh laissait toujours une bande de la section suivante
     visible en bas d'écran (ligne de flottaison "coupée"). */
  height: calc(100vh - 80px);
  min-height: 520px;
  padding: 16px;
  background-color: #000;
  overflow: hidden;
}

/* Calque image dédié : permet de zoomer (transform) le fond indépendamment
   du texte, sans jamais risquer de bande vide (même technique que Montres/Vendre). */
.ab-sourcing-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Voile directionnel — lisibilité du texte côté gauche */
.ab-sourcing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.80) 0%,
    rgba(0,0,0,0.50) 35%,
    rgba(0,0,0,0.15) 60%,
    rgba(0,0,0,0) 100%
  );
  pointer-events: none;
}

/* Voile "anti-hautes-lumières" — indépendant du précédent : en mode
   multiply, un même gris assombrit fortement les zones déjà claires de la
   photo et reste presque invisible sur les zones déjà sombres. S'adapte
   donc automatiquement à l'image, sans avoir à cibler des coordonnées. */
.ab-sourcing-hero__bg-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(20, 20, 20, 0.35);
  mix-blend-mode: multiply;
  pointer-events: none;
  display: none; /* activé uniquement sur mobile, cf. @media plus bas */
}

.ab-sourcing-hero__text {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 760px;
}
.ab-sourcing-hero__text .type-h1 {
  color: #fff !important;
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 3.5rem);
  white-space: nowrap;
}
.ab-sourcing-hero__subtitle {
  color: #fff !important;
  font-family: var(--font-body); /* Hauora — le h2 hérite sinon de la police de titre (Red Rose) */
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.5;
  max-width: 540px;
  margin: 0;
}
.ab-sourcing-hero__cta {
  margin-top: 0.5rem;
  align-self: flex-start;
}
.ab-sourcing-form {
  scroll-margin-top: 100px; /* évite que l'ancre du CTA arrive cachée sous le header fixe */
  /* Section aussi haute qu'un écran + contenu centré verticalement : au clic
     sur "Trouver une montre", on atterrit pile sur le formulaire, sans voir
     la fin du hero au-dessus ni le début de "Comment ça fonctionne" en dessous. */
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 6vw, 5rem);
}

@media (max-width: 768px) {
  /* Hero plein écran : la ligne de flottaison tombe en bas de section, comme
     sur Montres/Vendre. */
  .ab-sourcing-hero { height: 100svh; min-height: 0; }

  .ab-sourcing-hero__bg {
    background-image: var(--hero-img-mobile, var(--hero-img));
    background-position: center;   /* à ajuster une fois le rendu vérifié à l'écran */
    transform: scale(1.06);        /* zoom très léger, sans risque de bande vide */
  }

  .ab-sourcing-hero__bg-veil { display: block; }

  /* Texte positionné aux 3/4 de la hauteur (cohérent avec la page Vendre) :
     position absolue + translateY(-50%) ancre précisément le CENTRE du bloc
     à 75%, quelle que soit sa taille réelle une fois le texte sur 2 lignes. */
  .ab-sourcing-hero__text {
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    top: 75%;
    transform: translateY(-50%);
    max-width: none;
  }

  /* Le nowrap hérité du desktop faisait déborder le H1 hors de l'écran. */
  .ab-sourcing-hero__text .type-h1 {
    font-size: clamp(1.9rem, 9.5vw, 2.75rem);
    white-space: normal;
    line-height: 1.1;
  }
  .ab-sourcing-hero__subtitle {
    font-size: 1rem;
    max-width: none;
  }
}

/* ══════════════════════════════════════════
   FORMULAIRE DE RECHERCHE (wfr-*)
══════════════════════════════════════════ */
.wfr-wrap * { box-sizing: border-box; }
.wfr-wrap {
  --accent:  #51161F;
  --accent2: #3d0f17;
  --blush:   #f7eef0;
  --ink:     #000000;
  --dim:     #666666;
  --line:    #e0e0e0;
  --bg:      #ffffff;
  --err:     #b91c1c;
  font-family: var(--font-body, 'Hauora', sans-serif);
  color: var(--ink);
  background: var(--bg);
  max-width: 100%;
  margin: 0 auto;
  padding: 48px 0 64px;
}
.wfr-progress { display: flex; align-items: center; margin-bottom: 52px; max-width: 560px; margin-left: auto; margin-right: auto; }
.wfr-dot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wfr-dot-circle {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading, 'Red Rose', serif);
  font-size: 1rem; font-weight: 600; color: var(--dim); background: var(--bg);
  transition: all 0.35s;
}
.wfr-dot-label { font-family: var(--font-body, 'Hauora', sans-serif); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); white-space: nowrap; transition: color 0.35s; }
.wfr-dot.active .wfr-dot-circle { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(81,22,31,0.28); }
.wfr-dot.active .wfr-dot-label  { color: var(--ink); font-weight: 600; }
.wfr-dot.done .wfr-dot-circle   { background: var(--blush); border-color: var(--accent); color: var(--accent); }
.wfr-dot.done .wfr-dot-label    { color: var(--accent); }
.wfr-connector { flex: 1; height: 1.5px; background: var(--line); margin: 0 12px 28px; transition: background 0.35s; }
.wfr-connector.done { background: var(--accent); opacity: 0.35; }
.wfr-step { display: none; }
.wfr-step.active { display: block; animation: wfrIn 0.35s cubic-bezier(.4,0,.2,1); }
@keyframes wfrIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.wfr-step-title {
  font-family: var(--font-heading, 'Red Rose', serif);
  font-size: 1.05rem; font-weight: 500; color: var(--ink);
  margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.wfr-step-title::before { content: ''; width: 3px; height: 16px; background: var(--accent); border-radius: 2px; flex-shrink: 0; }
.wfr-field { margin-bottom: 22px; }
.wfr-label { display: block; font-family: var(--font-body, 'Hauora', sans-serif); font-size: 0.67rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.wfr-label .req { color: var(--accent); margin-left: 2px; }
.wfr-field input[type="text"],
.wfr-field input[type="email"],
.wfr-field input[type="tel"],
.wfr-field select,
.wfr-field textarea {
  width: 100%; font-family: var(--font-body, 'Hauora', sans-serif);
  font-size: 0.9rem; color: var(--ink);
  background: #fafafa; border: 1.5px solid var(--line);
  border-radius: 6px; padding: 12px 14px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none; -webkit-appearance: none;
}
.wfr-field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.wfr-field input:focus, .wfr-field textarea:focus { border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px rgba(81,22,31,0.08); }
.wfr-field.err input, .wfr-field.err textarea { border-color: var(--err); box-shadow: 0 0 0 3px rgba(185,28,28,0.08); }
.wfr-err-msg { display: none; font-family: var(--font-body, 'Hauora', sans-serif); font-size: 0.7rem; color: var(--err); margin-top: 5px; }
.wfr-field.err .wfr-err-msg { display: block; }
.wfr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wfr-slider-val { font-family: var(--font-heading, 'Red Rose', serif); font-size: 1.5rem; font-weight: 500; color: var(--accent); margin-bottom: 12px; }
.wfr-slider-val small { font-size: 0.75rem; color: var(--dim); font-family: var(--font-body, 'Hauora', sans-serif); font-weight: 400; margin-left: 4px; }
.wfr-range-wrap { position: relative; padding: 8px 0; }
input[type="range"]#wfr-budget-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px; outline: none;
  border: none !important; padding: 0 !important; box-shadow: none !important;
  background: var(--line); cursor: pointer; display: block;
}
input[type="range"]#wfr-budget-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 2px 8px rgba(81,22,31,0.3); border: 2px solid #fff; margin-top: -9px; transition: transform 0.15s;
}
input[type="range"]#wfr-budget-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]#wfr-budget-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 2px 8px rgba(81,22,31,0.3); border: 2px solid #fff; }
.wfr-range-track { position: absolute; top: 50%; left: 0; transform: translateY(-50%); height: 4px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.wfr-slider-labels { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--font-body, 'Hauora', sans-serif); font-size: 0.65rem; color: var(--dim); }
.wfr-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.wfr-toggle { position: relative; }
.wfr-toggle input[type="radio"], .wfr-toggle input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; border: none; box-shadow: none; padding: 0; background: none; }
.wfr-toggle-lbl {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-body, 'Hauora', sans-serif);
  font-size: 0.78rem; font-weight: 500; color: var(--ink);
  padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 6px;
  cursor: pointer; transition: all 0.2s; background: #fafafa; white-space: nowrap;
}
.wfr-toggle-lbl::before { content: ''; width: 14px; height: 14px; border: 1.5px solid var(--line); border-radius: 3px; flex-shrink: 0; transition: all 0.2s; background: var(--bg); }
.wfr-toggle input:checked + .wfr-toggle-lbl { border-color: var(--accent); background: var(--blush); color: var(--accent); }
.wfr-toggle input:checked + .wfr-toggle-lbl::before {
  background: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath fill='white' stroke='white' stroke-width='0.5' d='M1 4l3 3 5-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.wfr-check-wrap { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.wfr-check-wrap input[type="checkbox"] {
  position: relative; opacity: 1; width: 18px; height: 18px; min-width: 18px;
  border: 1.5px solid var(--line); border-radius: 3px;
  appearance: none; -webkit-appearance: none; background: #fafafa; cursor: pointer;
  margin-top: 2px; padding: 0; box-shadow: none; transition: all 0.2s; flex-shrink: 0;
}
.wfr-check-wrap input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath fill='white' stroke='white' stroke-width='0.5' d='M1 4l3 3 5-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.wfr-check-text { font-family: var(--font-body, 'Hauora', sans-serif); font-size: 0.78rem; color: var(--ink); line-height: 1.55; }
.wfr-check-text .req { color: var(--accent); }
.wfr-check-err { display: none; font-family: var(--font-body, 'Hauora', sans-serif); font-size: 0.7rem; color: var(--err); margin-top: -8px; margin-bottom: 12px; }
.wfr-check-err.show { display: block; }
.wfr-alert { display: none; font-family: var(--font-body, 'Hauora', sans-serif); font-size: 0.78rem; color: var(--err); padding: 12px 16px; border-left: 3px solid var(--err); background: #fef2f2; border-radius: 0 6px 6px 0; margin-bottom: 24px; }
.wfr-alert.show { display: block; }
.wfr-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 36px; gap: 12px; }
.wfr-btn { font-family: var(--font-heading, 'Red Rose', serif); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 13px 32px; border-radius: 3px; border: none; cursor: pointer; transition: all 0.25s; line-height: 1; }
.wfr-btn-primary { background: var(--accent); color: #fff; }
.wfr-btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(81,22,31,0.25); }
.wfr-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.wfr-btn-back { font-family: var(--font-heading, 'Red Rose', serif); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); background: none; border: 1.5px solid var(--line); border-radius: 3px; padding: 13px 24px; cursor: pointer; transition: all 0.2s; line-height: 1; }
.wfr-btn-back:hover { border-color: #000; color: #000; background: #f5f5f5; }
.wfr-success { display: none; text-align: center; padding: 64px 0; animation: wfrIn 0.5s ease; }
.wfr-success.show { display: block; }
.wfr-success-title { font-family: var(--font-heading, 'Red Rose', serif); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 500; color: var(--ink); margin-bottom: 16px; }
.wfr-success-divider { width: 40px; height: 2px; background: var(--accent); margin: 16px auto; border-radius: 2px; }
.wfr-success-text { font-family: var(--font-body, 'Hauora', sans-serif); font-size: 0.88rem; color: var(--ink); line-height: 1.85; }
.wfr-success-text strong { font-weight: 700; }
.wfr-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: wfrSpin 0.7s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes wfrSpin { to { transform: rotate(360deg); } }
@media (max-width: 540px) {
  .wfr-wrap { padding: 32px 0 48px; }
  .wfr-row { grid-template-columns: 1fr; gap: 0; }
  .wfr-progress { max-width: 100%; }
  .wfr-dot-circle { width: 40px; height: 40px; font-size: 0.85rem; }
  .wfr-dot-label { font-size: 0.58rem; }
  .wfr-connector { margin: 0 6px 24px; }
  .wfr-toggles { gap: 6px; }
  .wfr-toggle-lbl { font-size: 0.72rem; padding: 7px 10px; }
  .wfr-actions { flex-direction: column-reverse; }
  .wfr-btn, .wfr-btn-back { width: 100%; text-align: center; }
}

/* ══════════════════════════════════════════
   COMMENT ÇA FONCTIONNE (grille 2×2, fond bordeaux)
══════════════════════════════════════════ */
.ccf-section * { box-sizing: border-box; }
.ccf-section {
  width: 100%;
  background-color: #290B0B;
  padding: 80px 60px 0;
  font-family: var(--font-body, 'Hauora', sans-serif);
  overflow-x: hidden;
}

/* Cible du lien "Comment ça fonctionne" depuis /montres/ : le scroll-margin
   doit être sur l'élément ciblé par l'ancre (#ccf-heading) lui-même, pas sur
   sa section parente, pour que le navigateur en tienne compte au clic. */
#ccf-heading {
  scroll-margin-top: 100px;
}
.ccf-inner { max-width: 1100px; margin: 0 auto; }
.ccf-section h2 {
  font-family: var(--font-heading, 'Red Rose', serif);
  font-size: 32px; font-weight: 700; color: #FFFFFF;
  text-align: left; margin-bottom: 50px; line-height: 1.15;
}
.ccf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 80px; list-style: none; margin: 0; padding: 0; }
.ccf-card h3 { font-family: var(--font-body, 'Hauora', sans-serif); font-size: 1.25rem; font-weight: 700; color: #FFFFFF; text-transform: uppercase; margin-bottom: 18px; letter-spacing: 0.02em; line-height: 1.3; }
.ccf-card p { font-family: var(--font-body, 'Hauora', sans-serif); font-weight: 300; font-size: 15px; color: #FFFFFF; line-height: 1.85; overflow-wrap: break-word; max-width: 420px; }
.ccf-footer { margin-top: 64px; padding-bottom: 48px; }
.ccf-footer-line { width: 100%; height: 1px; background: rgba(255, 255, 255, 0.3); }
.ccf-footer-right { text-align: right; padding-top: 18px; }
.ccf-footer-link, .ccf-footer-link:visited {
  font-family: var(--font-body, 'Hauora', sans-serif); font-weight: 400; font-size: 0.85rem;
  color: #FFFFFF; text-decoration: none; letter-spacing: 0.03em; white-space: nowrap;
  position: relative; display: inline-block; padding-bottom: 2px;
}
.ccf-footer-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background: #FFFFFF; transform-origin: right; transform: scaleX(1); transition: transform 0.35s ease; }
.ccf-footer-link:hover::after { transform-origin: left; transform: scaleX(0); }
@media (max-width: 900px) {
  .ccf-section { padding: 60px 32px 0; }
  .ccf-grid { gap: 44px 48px; }
  .ccf-section h2 { font-size: 32px; margin-bottom: 48px; }
  .ccf-card p { font-size: 14px; max-width: 100%; }
}
@media (max-width: 600px) {
  .ccf-section { padding: 44px 20px 0; }
  .ccf-section h2 { font-size: 26px; margin-bottom: 36px; }
  .ccf-grid { grid-template-columns: 1fr; gap: 32px; }
  .ccf-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
  .ccf-card p { font-size: 13.5px; line-height: 1.7; max-width: 100%; }
  .ccf-footer { margin-top: 40px; padding-bottom: 36px; }
  .ccf-footer-link { font-size: 0.8rem; }
}
