/* Accueil (SWAN-93) : bandeau, barre de recherche, cartes et arguments.
   S'appuie sur unified-search.css (classes us-*), qui doit être chargé avant ce fichier. */

/* Bandeau : plus haut que sur la page de recherche, l'image est décalée pour garder la diagonale à droite du texte */
.uh-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 550px;
  padding: 130px 0 110px;
  background: #131f3b;
  /* Bas du bandeau en arc doux, bombé vers le bas. Le rayon vertical est fixe (520px) : la courbe a la même hauteur
     sur tous les écrans, et son point le plus bas touche toujours le bas du bandeau, quelle que soit la hauteur de celui-ci. */
  clip-path: ellipse(118% 520px at 50% calc(100% - 520px));
}

.uh-hero .us-container { position: relative; z-index: 1; }

/* Bandes en biais, à droite, sur toute la hauteur du bandeau */
.uh-hero__bands {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48%;
  height: 100%;
  pointer-events: none;
}

/* Scène : sur mobile et tablette, seule la ligne animée s'affiche sous le sous-titre */
.uh-scene-wrap { position: relative; z-index: 1; width: 100%; max-width: 1320px; margin: 32px auto 0; padding: 0 32px; }
/* Chiffres clés sous le sous-titre : sur mobile et tablette, ils passent à la ligne si besoin */
.uh-statline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}
.uh-statline span { display: inline-flex; align-items: center; gap: 6px; }
.uh-statline i { display: inline-flex; color: var(--us-teal); }
.uh-statline svg { width: 18px; height: 18px; }
.uh-statline b { font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }

@media (max-width: 750px) {
  .uh-hero { clip-path: ellipse(145% 420px at 50% calc(100% - 420px)); }
  .uh-scene-wrap { padding: 0 16px; margin-top: 26px; }
}

/* Halo turquoise très diffus : seul décor du bandeau, il dérive lentement */
.uh-hero::before {
  content: "";
  position: absolute;
  top: -35%;
  right: -8%;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.20) 0%, rgba(94, 234, 212, 0) 68%);
  pointer-events: none;
  animation: uh-halo 18s ease-in-out infinite alternate;
}
@keyframes uh-halo {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-90px, 40px, 0) scale(1.12); }
}

/* Carte en verre sombre, sans fond blanc. Version compacte (sans la phrase) sur mobile et tablette. */
.uh-pitch {
  padding: 20px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
}
.uh-pitch__body { display: flex; flex-direction: column; align-items: flex-start; min-height: 112px; transition: opacity 0.35s ease, transform 0.35s ease; }
.uh-pitch__body.is-out { opacity: 0; transform: translateY(6px); }
.uh-pitch__badge { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--us-teal); }
.uh-pitch__title { margin: 8px 0 14px; font-size: 20px; font-weight: 800; line-height: 1.25; color: #fff; }
.uh-pitch__text { display: none; }
.uh-pitch__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--us-teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(94, 234, 212, 0.4);
  padding-bottom: 3px;
}
.uh-pitch__cta:hover { color: var(--us-teal); border-color: var(--us-teal); }
.uh-pitch__cta:focus-visible { outline: 2px solid var(--us-teal); outline-offset: 4px; border-radius: 2px; }
.uh-pitch__cta i { font-style: normal; }
@media (max-width: 400px) { .uh-pitch__title { font-size: 18px; } }

/* Ordinateur : titre à gauche, carte en verre à droite */
@media (min-width: 992px) {
  .uh-hero { --uh-card-w: min(430px, 32vw); }
  .uh-hero__bands { display: none; }

  .uh-scene-wrap {
    position: absolute;
    top: calc(50% + 10px); /* même centre que le texte de gauche (le bandeau a 130px de marge en haut et 110px en bas) */
    right: max(24px, calc((100vw - 1320px) / 2 + 24px));
    transform: translateY(-50%);
    width: var(--uh-card-w);
    margin: 0;
    padding: 0;
  }

  .uh-hero .us-hero__title {
    max-width: calc(min(100vw, 1320px) - 64px - var(--uh-card-w) - 56px);
    margin-bottom: 16px;
    font-size: clamp(36px, 3.7vw, 54px);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }
  .uh-hero .us-hero__subtitle { max-width: min(500px, calc(min(100vw, 1320px) - 64px - var(--uh-card-w) - 56px)); font-size: 17px; }

  .uh-statline { gap: 6px 24px; margin-top: 22px; font-size: 14px; color: rgba(255, 255, 255, 0.62); }
  .uh-statline span { gap: 8px; }
  .uh-statline svg { width: 20px; height: 20px; }
  .uh-statline b { margin-right: 0; color: var(--us-teal); }

  .uh-pitch { padding: 24px 26px 22px; border-radius: 20px; }
  .uh-pitch__body { min-height: 176px; }
  .uh-pitch__badge { font-size: 12px; }
  .uh-pitch__title { margin: 10px 0 8px; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
  .uh-pitch__text { display: block; margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.72); }
  .uh-pitch__cta { transition: gap 0.15s ease, border-color 0.15s ease; }
  .uh-pitch__cta:hover { gap: 12px; }
}

/* Le champ "Je cherche" a besoin de plus de place pour son texte d'exemple */
.uh-search .us-field:first-child { flex-grow: 1.4; }

/* Barre de recherche à cheval sur le bas du bandeau */
.uh-search {
  --uh-overlap: 52px;
  position: relative;
  margin-top: calc(-1 * var(--uh-overlap));
  background: linear-gradient(to bottom, transparent var(--uh-overlap), #fff var(--uh-overlap));
}

/* Sur ordinateur, la barre (89px de haut) est centrée là où le bleu rejoint ses deux extrémités : l'arc y est remonté d'environ 34px, d'où 78px d'empiétement au centre */
@media (min-width: 992px) {
  .uh-search { --uh-overlap: 78px; }

  /* La barre reste sur une seule ligne dès 992px : les champs rétrécissent (leur texte se coupe avec « … ») au lieu de faire tomber le bouton à la ligne.
     Sa hauteur reste ainsi de 89px, ce qui garde le centrage ci-dessus exact. */
  .uh-search .us-bar { flex-wrap: nowrap; }
  .uh-search .us-field { min-width: 0; }
  .uh-search .us-field--languages { min-width: 290px; }
}

/* Les trois cartes de services font double emploi avec la barre et la carte du bandeau : masquées partout */
.uh-offers .uh-cards { display: none; }
.uh-offers { padding: 28px 0 24px; background: #fff; }

.uh-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.uh-card {
  --uh-tint: #e8f0ff;
  --uh-ink: #2563eb;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--us-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(11, 27, 51, 0.07);
  color: var(--us-navy);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.uh-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(11, 27, 51, 0.12); color: var(--us-navy); }
.uh-card:focus-visible { outline: 2px solid var(--us-teal-dark); outline-offset: 3px; }
.uh-card--purple { --uh-tint: #efe9ff; --uh-ink: #7c3aed; }
.uh-card--teal { --uh-tint: #dff7f1; --uh-ink: #0f9d86; }

.uh-card__icon,
.uh-card__arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--uh-tint);
  color: var(--uh-ink);
}

.uh-card__icon { width: 64px; height: 64px; border-radius: 14px; }
.uh-card__icon svg { width: 30px; height: 30px; }
.uh-card__arrow { width: 40px; height: 40px; border-radius: 50%; }
.uh-card__arrow svg { width: 18px; height: 18px; }

.uh-card__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.uh-card__body strong { font-size: 18px; font-weight: 800; line-height: 1.25; }
.uh-card__body span { font-size: 14px; line-height: 1.4; color: var(--us-muted); }

/* Arguments */
.uh-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.uh-benefits li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 24px;
}

.uh-benefits li + li { border-left: 1px solid var(--us-border); }

.uh-benefits__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e6f6f4;
  color: var(--us-teal-dark);
}

.uh-benefits__icon svg { width: 26px; height: 26px; }
.uh-benefits li > span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--us-muted); }
.uh-benefits li strong { font-size: 16px; font-weight: 800; color: var(--us-navy); }

/* Tablette */
@media (max-width: 991px) {
  .uh-hero { display: block; min-height: 0; padding: 120px 0 100px; }
  .uh-hero__bands { display: none; }
  .uh-cards { grid-template-columns: 1fr; gap: 14px; }
  .uh-benefits { grid-template-columns: 1fr; gap: 14px; }
  .uh-benefits li { padding: 4px 0; }
  .uh-benefits li + li { border-left: 0; }
  .uh-hero .us-hero__title, .uh-hero .us-hero__subtitle { max-width: none; }

  /* Seuls les chiffres clés sont centrés */
  .uh-statline { justify-content: center; }
}

/* Mobile : fond bleu uni sans image, comme sur la page de recherche */
@media (max-width: 750px) {
  .uh-hero { padding: 92px 0 84px; }
  .uh-hero__bands { display: none; }
  .uh-hero .us-hero__title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .uh-hero::before { animation: none; }
  .uh-pitch__body { transition: none; }
  .uh-card { transition: none; }
  .uh-card:hover { transform: none; }
}
