/* ==========================================================
   Planet Inter — Accueil V2
   CSS spécifique à template-home-v2.php
   Les utilitaires de layout restent fournis par Tailwind
   pendant la phase de préproduction.
   ========================================================== */

.pi-home-v2-page {
  margin: 0;
  background: #fff;
  color: #0E1726;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.pi-home-v2,
.pi-home-v2 * {
  box-sizing: border-box;
}

.pi-home-v2 ::selection {
  background: #FF6A1A;
  color: #fff;
}

/* Slider logos */
.pi-home-v2 .marquee {
  display: flex;
  width: max-content;
  animation: pi-home-scroll-x 32s linear infinite;
}

.pi-home-v2 .marquee-wrap:hover .marquee {
  animation-play-state: paused;
}

@keyframes pi-home-scroll-x {
  to { transform: translateX(-50%); }
}

/* Reveal */
.pi-home-v2 .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}

.pi-home-v2 .reveal.in {
  opacity: 1;
  transform: none;
}

.pi-home-v2 .d1 { transition-delay: .06s; }
.pi-home-v2 .d2 { transition-delay: .14s; }
.pi-home-v2 .d3 { transition-delay: .22s; }
.pi-home-v2 .d4 { transition-delay: .30s; }

/* Machine à écrire */
.pi-home-v2 .caret {
  display: inline-block;
  width: .5ch;
  height: .9em;
  background: #FF6A1A;
  margin-left: .05em;
  transform: translateY(.08em);
  animation: pi-home-blink 1s steps(1) infinite;
}

@keyframes pi-home-blink {
  50% { opacity: 0; }
}

/* Cadre photo Hero */
.pi-home-v2 .bracket {
  position: relative;
}

.pi-home-v2 .bracket::before,
.pi-home-v2 .bracket::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 44px;
  border: 3px solid #FF6A1A;
  z-index: 2;
  pointer-events: none;
}

.pi-home-v2 .bracket::before {
  top: -10px;
  left: -10px;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 6px;
}

.pi-home-v2 .bracket::after {
  right: -10px;
  bottom: -10px;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 6px;
}

/* Images N&B -> couleur */
.pi-home-v2 .duo {
  filter: grayscale(1) contrast(1.02);
  transition: filter .6s ease;
}

.pi-home-v2 .group:hover .duo {
  filter: grayscale(0);
}

/* Cartes */
.pi-home-v2 .lift {
  transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .5s;
}

.pi-home-v2 .lift:hover {
  transform: translateY(-6px);
}

/* Boutons */
.pi-home-v2 .btn-mag {
  transition: transform .25s cubic-bezier(.16,1,.3,1), background-color .25s ease;
}

.pi-home-v2 .u-anim {
  background-image: linear-gradient(#FF6A1A,#FF6A1A);
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .3s ease;
}

.pi-home-v2 .u-anim:hover {
  background-size: 100% 2px;
}

/* Couleurs de marque — règles verrouillées */
.pi-home-v2 h1,
.pi-home-v2 h2 {
  color: #0A2A5E;
}

.pi-home-v2 .brand-blue-grad {
  background: linear-gradient(120deg, #0A2A5E 0%, #003670 42%, #0095DB 100%);
}

.pi-home-v2 .brand-blue-grad-soft {
  background: linear-gradient(120deg, rgba(0,54,112,.06) 0%, rgba(0,149,219,.14) 58%, rgba(0,149,219,.20) 100%);
}

/* Bloc entreprise : image chantier visible à droite */
.pi-home-v2 .home-v2-company-overlay {
  background: linear-gradient(100deg,
    #0A2A5E 0%,
    rgba(0,54,112,.97) 40%,
    rgba(0,88,155,.76) 60%,
    rgba(0,149,219,.18) 100%
  );
}

/* CTA final */
.pi-home-v2 .home-v2-grid-pattern {
  opacity: .07;
  background-image:
    linear-gradient(#fff 1px, transparent 1px),
    linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Richtext ACF : éviter les marges ajoutées par TinyMCE */
.pi-home-v2 .pi-richtext p {
  margin: 0;
}

.pi-home-v2 .pi-richtext strong {
  color: #0E1726;
  font-weight: 500;
}

.pi-home-v2 .pi-richtext-on-dark strong {
  color: #FF6A1A;
  font-weight: 600;
}

/* Footer temporaire de preview */
.pi-home-v2-footer {
  font-family: Inter, sans-serif;
}

/* Responsive double cible */
@media (max-width: 767px) {
  .pi-home-v2 [class*="max-w-[62%]"],
  .pi-home-v2 [class*="max-w-[52%]"],
  .pi-home-v2 [class*="max-w-[48%]"] {
    max-width: 72%;
  }

  .pi-home-v2 .home-v2-company-overlay {
    background: linear-gradient(100deg,
      #0A2A5E 0%,
      rgba(0,54,112,.97) 52%,
      rgba(0,88,155,.78) 72%,
      rgba(0,149,219,.28) 100%
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  .pi-home-v2 *,
  .pi-home-v2 *::before,
  .pi-home-v2 *::after {
    animation: none !important;
    transition: none !important;
  }

  .pi-home-v2 .reveal {
    opacity: 1;
    transform: none;
  }
}

.pi-home-v2-footer .pi-footer-cert-fallback {
  display: none;
}


/* ==========================================================
   V3 — Correctifs après test WordPress / Divi
   ========================================================== */

/* Moteur de recherche : UI plus propre et plus lisible */
.pi-home-v2 .home-v2-search-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  background: #fff;
  border: 1px solid rgba(10, 42, 94, .12);
  border-radius: 18px;
  box-shadow: 0 14px 38px -22px rgba(10, 42, 94, .35);
}

.pi-home-v2 .home-v2-search-field {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 0 6px;
}

.pi-home-v2 .home-v2-search-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #EAF2FD;
  color: #0A2A5E;
}

.pi-home-v2 .home-v2-search-icon svg {
  width: 18px;
  height: 18px;
}

.pi-home-v2 .home-v2-search-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #0E1726;
  font: inherit;
  font-size: 14px;
}

.pi-home-v2 .home-v2-search-field input::placeholder {
  color: #7B8492;
  opacity: 1;
}

.pi-home-v2 .home-v2-search-button {
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 13px;
  background: #FF6A1A;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none !important;
}

.pi-home-v2 .home-v2-search-button:hover {
  background: #E85D10;
  color: #fff !important;
}

.pi-home-v2 .home-v2-search-button svg {
  width: 16px;
  height: 16px;
}

/* Profils recherchés : cartes + liens métiers */
.pi-home-v2 .home-v2-needs-card {
  isolation: isolate;
}

.pi-home-v2 .home-v2-needs-card-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
}

.pi-home-v2 .home-v2-location-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.pi-home-v2 .home-v2-location-title,
.pi-home-v2 .home-v2-location-subtitle {
  margin: 0 !important;
  padding: 0 !important;
}

.pi-home-v2 .home-v2-location-subtitle {
  line-height: 1.25;
}

.pi-home-v2 .home-v2-job-chip {
  position: relative;
  z-index: 20;
  text-decoration: none !important;
}

.pi-home-v2 .home-v2-job-chip:hover {
  border-color: #FF6A1A;
  color: #FF6A1A !important;
}

/* Divi peut imposer ses couleurs sur h2/h3 : verrouillage uniquement sur fonds foncés. */
.pi-home-v2 .home-v2-news-card h3,
.pi-home-v2 .home-v2-news-card h3 a,
.pi-home-v2 .home-v2-on-dark-title,
.pi-home-v2 .home-v2-final-cta .home-v2-final-cta-title {
  color: #fff !important;
}

.pi-home-v2 .home-v2-news-card p {
  color: rgba(255,255,255,.82) !important;
}

/* Actualités : moins de vide entre le titre et les cartes */
.pi-home-v2 .home-v2-news-heading {
  margin-bottom: 30px !important;
}

.pi-home-v2 .home-v2-news-section {
  padding-top: 64px !important;
  padding-bottom: 72px !important;
}

/* Titre CTA final toujours blanc malgré la règle globale h2 */
.pi-home-v2 .home-v2-final-cta h2 {
  color: #fff !important;
}

@media (max-width: 640px) {
  .pi-home-v2 .home-v2-search-shell {
    align-items: stretch;
    flex-direction: column;
    border-radius: 16px;
  }

  .pi-home-v2 .home-v2-search-button {
    width: 100%;
    min-height: 48px;
  }

  .pi-home-v2 .home-v2-news-heading {
    margin-bottom: 24px !important;
  }

  .pi-home-v2 .home-v2-news-section {
    padding-top: 48px !important;
    padding-bottom: 56px !important;
  }
}


/* ==========================================================
   V4 — Liens profils/chantiers, contrastes et espacements
   ========================================================== */

.pi-home-v2 .home-v2-reactivity-card .home-v2-reactivity-title,
.pi-home-v2 .home-v2-reactivity-card h3 { color:#fff !important; }
.pi-home-v2 .home-v2-reactivity-card .home-v2-reactivity-text,
.pi-home-v2 .home-v2-reactivity-card .home-v2-reactivity-text p { color:rgba(255,255,255,.92) !important; }
.pi-home-v2 .home-v2-reactivity-card .home-v2-reactivity-text strong { color:#FF6A1A !important; }

.pi-home-v2 .home-v2-location-copy { gap:2px !important; }
.pi-home-v2 .home-v2-location-link { display:flex; flex-direction:column; gap:2px; color:inherit !important; text-decoration:none !important; cursor:pointer; }
.pi-home-v2 .home-v2-location-link:hover .home-v2-location-title { color:#0095DB !important; }
.pi-home-v2 .home-v2-location-title,
.pi-home-v2 .home-v2-location-subtitle { display:block; margin:0 !important; padding:0 !important; }
.pi-home-v2 .home-v2-location-title { line-height:1.12 !important; }
.pi-home-v2 .home-v2-location-subtitle { margin-top:2px !important; line-height:1.2 !important; }

.pi-home-v2 .home-v2-jobs-list { position:relative; z-index:5; }
.pi-home-v2 a.home-v2-job-chip { cursor:pointer; color:#0E1726 !important; }
.pi-home-v2 a.home-v2-job-chip:hover { color:#FF6A1A !important; border-color:rgba(255,106,26,.55) !important; transform:translateY(-1px); }
.pi-home-v2 .home-v2-job-arrow { font-size:11px; line-height:1; opacity:.55; transition:transform .2s ease,opacity .2s ease; }
.pi-home-v2 a.home-v2-job-chip:hover .home-v2-job-arrow { opacity:1; transform:translate(1px,-1px); }
.pi-home-v2 .home-v2-job-chip-disabled { cursor:default; }

.pi-home-v2 .home-v2-news-section { padding-top:48px !important; padding-bottom:56px !important; }
.pi-home-v2 .home-v2-news-heading { margin-top:0 !important; margin-bottom:18px !important; }
.pi-home-v2 .home-v2-news-heading h2,
.pi-home-v2 .home-v2-news-heading p { margin-top:0 !important; }
.pi-home-v2 .home-v2-news-card h3 { color:#fff !important; opacity:1 !important; }

.pi-home-v2 .home-v2-logos-section { padding-top:40px !important; padding-bottom:40px !important; }

@media (max-width:640px) {
  .pi-home-v2 .home-v2-news-section { padding-top:40px !important; padding-bottom:48px !important; }
  .pi-home-v2 .home-v2-news-heading { margin-bottom:16px !important; }
}