/* ==========================================================================
   OfficeMetrics · landing V7 · haut de page (section #haut de index.html, scripts/hero.js)
   SPEC-V7 § 1 : le titre, la barre sur une seule ligne, « Comment ça marche ». Le groupe est
   centré dans le premier écran, entre le bas de l'en-tête et le bas de l'écran. Rien d'autre.
   Barre : invite fixe à gauche ; à droite, sur la même ligne, « Continuer avec Google » ;
   le rond noir d'envoi n'apparaît qu'une fois la barre remplie, à droite de la pilule ;
   trois idées au clic, par-dessus « Comment ça marche ».
   ========================================================================== */

/* Le premier écran : le groupe au milieu de l'espace sous l'en-tête (64 px, 56 px sur téléphone).
   Même marge de 24 px en haut et en bas : le milieu du contenu = le milieu de [bas de l'en-tête, bas de l'écran]. */
.partie-hero {
  --entete-h: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100svh;   /* svh : l'écran visible avec la barre du navigateur du téléphone */
  padding: calc(var(--entete-h) + 24px) var(--gutter) 24px;
  text-align: center;
}

/* --- Titre : Source Serif 4, 56 px (36 px sur téléphone : --fs-cta, base.css), deux lignes écrites. */
.partie-hero .hero-titre {
  font: 420 var(--fs-cta)/var(--lh-display) var(--font-voice);
  font-variation-settings: "opsz" 28; letter-spacing: var(--ls-display);
}
.partie-hero .hero-titre .ligne { display: block; }

/* --- La barre : une seule rangée, comme un champ de recherche généreux (64 px de haut).
   Coins concentriques : 32 px dehors, 12 px de marge, 20 px pour la pilule et le rond (40 px). */
.partie-hero .hero-barre {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: min(100%, var(--bar-w)); height: var(--bar-h); margin-top: 40px;
  padding: 0 12px 0 24px;
  background: var(--surface); border-radius: var(--r-pill);
  box-shadow: 0 0 0 .5px var(--line), var(--sh-bar);
  text-align: left; cursor: text;
  transition: box-shadow 150ms var(--om-out);
}
.partie-hero .hero-barre:has(.hero-champ:focus) { box-shadow: 0 0 0 .5px var(--faint), 0 0 0 3px rgba(26, 26, 26, .05), var(--sh-bar); }
.partie-hero .hero-champ {
  flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0;
  border: 0; outline: none; background: transparent; color: var(--ink);
  font: 400 16px/24px var(--font-ui);   /* 16 px : le téléphone ne zoome pas au focus */
  text-overflow: ellipsis;
}
.partie-hero .hero-champ::placeholder { color: var(--hint); opacity: 1; }   /* 4,6:1 sur blanc */

/* À droite : la pilule Google, puis la place du rond d'envoi */
.partie-hero .hero-outils { position: relative; flex: none; display: flex; }

/* « Continuer avec Google » : thème clair de Google (fond blanc, filet 1 px #747775, texte #1F1F1F,
   G de 18 px non modifié, 12 px de marge, 10 px entre le G et le texte), 40 px de haut. */
.partie-hero .hero-google {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 40px; padding: 0 12px;
  border: 1px solid #747775; border-radius: var(--r-pill);
  background: #fff; color: #1f1f1f;
  font: 500 var(--fs-ui)/20px var(--font-ui); white-space: nowrap; text-decoration: none;
  transition: background 150ms var(--om-out), translate 220ms var(--om-out);
}
.partie-hero .hero-google:hover { background: #f2f2f2; }
.partie-hero .hero-google svg { width: 18px; height: 18px; }

/* Le rond noir d'envoi : caché barre vide ; barre remplie, il grandit à droite de la pilule,
   qui glisse de 48 px (40 + 8). Le champ rend aussitôt ces 48 px : rien ne se chevauche.
   Rien ne bouge en mouvement réduit (base.css). */
.partie-hero .hero-envoi {
  position: absolute; top: 0; right: 0;
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--btn); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(0, 0, 0, .18);
  visibility: hidden; opacity: 0; scale: .5;
  transition: opacity 180ms var(--om-out), scale 220ms var(--om-out), visibility 0s linear 220ms;
}
.partie-hero .hero-envoi:hover { background: var(--btn-hover); }
.partie-hero .hero-envoi .ic { width: 16px; height: 16px; stroke-width: 1.75; }
.partie-hero .hero-barre:has(.hero-champ:not(:placeholder-shown)) .hero-envoi {
  visibility: visible; opacity: 1; scale: 1;
  transition-delay: 60ms, 60ms, 0s;     /* la pilule glisse d'abord */
}
.partie-hero .hero-barre:has(.hero-champ:not(:placeholder-shown)) .hero-google { translate: -48px 0; }
.partie-hero .hero-barre:has(.hero-champ:not(:placeholder-shown)) .hero-outils { margin-left: 48px; }

/* --- Les trois idées : un panneau sous la barre, par-dessus « Comment ça marche » -----
   Fermé par défaut (et sans JS) ; .idees-ouvertes est posé par hero.js.
   Apparition : opacité et léger glissement (160 ms), rien en mouvement réduit. */
.partie-hero .hero-idees {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  display: grid; padding: 6px;
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 0 0 .5px var(--line), var(--sh-float);
  visibility: hidden; opacity: 0; translate: 0 -4px;
  transition: opacity 160ms var(--om-out), translate 160ms var(--om-out), visibility 0s linear 160ms;
}
.partie-hero .hero-barre.idees-ouvertes .hero-idees {
  visibility: visible; opacity: 1; translate: 0 0;
  transition-delay: 0s;
}
.partie-hero .hero-idee {
  display: block; width: 100%; min-height: 44px; padding: 10px 18px;   /* 6 + 18 = 24 px : le texte part sous l'invite */
  border: 0; border-radius: 10px; background: none;
  font: 400 15px/22px var(--font-ui); color: var(--ink); text-align: left;
  transition: background 150ms var(--om-out);
}
.partie-hero .hero-idee:hover { background: #f6f6f4; }
.partie-hero .hero-idee:focus-visible { outline-offset: -2px; background: #f6f6f4; }

/* --- « Comment ça marche » : un lien discret, gris foncé, avec une petite flèche vers le bas.
   Il mène à #trouver ; le défilement doux est celui du navigateur (html { scroll-behavior: smooth },
   base.css), coupé en mouvement réduit. 44 px de haut pour le doigt. */
.partie-hero .hero-suite {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; margin-top: 28px; padding: 0 12px;   /* 28 + 12 de vide dans le lien = les 40 px au-dessus de la barre */
  border-radius: var(--r-pill);
  font: 400 var(--fs-ui)/20px var(--font-ui); color: var(--stone);   /* 6,6:1 sur blanc */
  text-decoration: none;
  transition: color 150ms var(--om-out);
}
.partie-hero .hero-suite:hover { color: var(--ink); }
.partie-hero .hero-suite .ic { width: 14px; height: 14px; transition: translate 200ms var(--om-out); }
.partie-hero .hero-suite:hover .ic { translate: 0 2px; }

/* --- Téléphone ---------------------------------------------------------------- */
@media (max-width: 639px) {
  .partie-hero { --entete-h: 56px; padding-bottom: 16px; padding-top: calc(var(--entete-h) + 16px); }
  .partie-hero .hero-barre { --bar-h: 56px; margin-top: 28px; gap: 8px; padding: 0 8px 0 18px; }
  .partie-hero .hero-idee { padding: 11px 12px; }
  .partie-hero .hero-suite { margin-top: 16px; }
}
/* Téléphone : la pilule (ou le rond G) et le rond d'envoi font 40 px ; leur zone tactile fait 44 px.
   La pilule a un filet de 1 px : sa zone part de 3 px autour ; le rond d'envoi, sans filet, de 2 px. */
@media (max-width: 639px) {
  .partie-hero .hero-google::after { content: ""; position: absolute; inset: -3px; }
  .partie-hero .hero-envoi::after { content: ""; position: absolute; inset: -2px; }
}
/* Sous 520 px, la pilule ne tient plus à côté de l'invite : elle devient un rond blanc avec le seul G
   (Google l'autorise ; même lien, nom « Continuer avec Google » par son aria-label). */
@media (max-width: 519px) {
  .partie-hero .hero-google { width: 40px; padding: 0; }
  .partie-hero .hero-google span { display: none; }
}
@media (max-width: 359px) {
  .partie-hero .hero-barre { padding-left: 14px; gap: 6px; }
  .partie-hero .hero-idee { padding-inline: 8px; }   /* 6 + 8 = 14 px : toujours sous l'invite */
}
