/* ============================================
   HERO — accroche + recherche (plein écran centré)
   ============================================ */
.hero { padding: 4.5rem 0 3rem; text-align: center; }

.hero h1 {
    font-size: clamp(2.6rem, 5vw, 3.7rem);
    font-weight: 600;
    line-height: 1.06;
    margin-bottom: 1.25rem;
    color: var(--ink);
    /* Pas d'animation sur le H1 : c'est l'élément LCP, il doit s'afficher
       immédiatement (un fondu opacity:0 retarderait mécaniquement le LCP). */
}
.hero h1 span {
    color: var(--terracotta);
    font-style: italic;
}

.hero-lead {
    font-size: 1.18rem;
    color: var(--ink-soft);
    max-width: 580px;
    margin: 0 auto 2rem;
    animation: heroFadeInUp 0.7s 0.12s ease both;
}

/* Recherche d'éligibilité */
.hero-search-wrapper { max-width: 600px; margin: 0 auto; position: relative; z-index: 3; animation: heroFadeInUp 0.7s 0.24s ease both; }
.hero-search-group { position: relative; margin-bottom: 0.85rem; }

.hero-search-icon {
    position: absolute;
    left: 1.2rem; top: 50%;
    transform: translateY(-50%);
    color: var(--terracotta);
    pointer-events: none;
    z-index: 1;
}
.hero-search-placeholder {
    position: absolute;
    left: 3.1rem; top: 50%;
    transform: translateY(-50%);
    color: var(--ink-mute);
    font-size: 1.02rem;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    white-space: nowrap;
    overflow: hidden;
}
.hero-search-placeholder.slide-out { opacity: 0; transform: translateY(-50%) translateX(20px); }
.hero-search-placeholder.slide-in { animation: slideInFromLeft 0.5s ease forwards; }
@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateY(-50%) translateX(-20px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.hero-search-group input {
    width: 100%;
    padding: 1.1rem 1.2rem 1.1rem 3.1rem;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 1.02rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--card);
    transition: border-color 0.25s, box-shadow 0.25s, opacity 0.35s ease;
    box-shadow: var(--shadow);
}
.hero-search-group input:disabled { cursor: default; }
.hero-search-group input:focus ~ .hero-search-placeholder,
.hero-search-group input:not(:placeholder-shown) ~ .hero-search-placeholder { opacity: 0; }
.hero-search-group input:focus {
    outline: none;
    border-color: var(--terracotta);
    box-shadow: 0 0 0 4px var(--terracotta-soft), var(--shadow);
}
/* Pulse déclenché quand on arrive via « Lancer mon projet » de la navbar */
.hero-search-group.pulse input {
    animation: heroSearchPulse 1.2s ease;
}
@keyframes heroSearchPulse {
    0%   { box-shadow: 0 0 0 0 var(--terracotta-soft), var(--shadow); border-color: var(--terracotta); }
    35%  { box-shadow: 0 0 0 8px var(--terracotta-soft), var(--shadow); border-color: var(--terracotta); }
    100% { box-shadow: 0 0 0 4px var(--terracotta-soft), var(--shadow); border-color: var(--terracotta); }
}

.hero-search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    padding: 6px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
    transform-origin: top center;
    z-index: 100;
}
/* Ouverture du menu : émergence depuis le champ (fade + léger scale) */
.hero-search-dropdown.open { display: block; animation: heroDropdownIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes heroDropdownIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Items du dropdown hero (scopés pour ne pas toucher le formulaire de contact) --- */
.hero-search-dropdown .search-result-item {
    position: relative;
    border-bottom: none;
    border-radius: 12px;
    padding: 0.7rem 2.2rem 0.7rem 0.85rem;
    transition: background 0.18s ease, transform 0.18s ease;
}
.hero-search-dropdown .search-result-name { transition: color 0.18s ease; }
.hero-search-dropdown .search-result-item:hover {
    background: var(--cream);
    transform: translateX(2px);
}
.hero-search-dropdown .search-result-item:hover .search-result-name { color: var(--terracotta-dark); }

/* Chevron révélé au survol */
.hero-search-dropdown .search-result-item::after {
    content: "→";
    position: absolute;
    right: 0.9rem; top: 50%;
    transform: translateY(-50%) translateX(-6px);
    color: var(--terracotta);
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.hero-search-dropdown .search-result-item:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

/* Apparition en cascade des items (backwards : ne verrouille pas le transform du hover) */
.hero-search-dropdown.open .search-result-item { animation: heroItemIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.hero-search-dropdown.open .search-result-item:nth-child(1) { animation-delay: 0.03s; }
.hero-search-dropdown.open .search-result-item:nth-child(2) { animation-delay: 0.06s; }
.hero-search-dropdown.open .search-result-item:nth-child(3) { animation-delay: 0.09s; }
.hero-search-dropdown.open .search-result-item:nth-child(4) { animation-delay: 0.12s; }
.hero-search-dropdown.open .search-result-item:nth-child(5) { animation-delay: 0.15s; }
.hero-search-dropdown.open .search-result-item:nth-child(6) { animation-delay: 0.18s; }
.hero-search-dropdown.open .search-result-item:nth-child(n+7) { animation-delay: 0.2s; }
@keyframes heroItemIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* État de chargement — spinner terracotta */
.hero-search-dropdown .search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.hero-search-dropdown .search-loading::before {
    content: "";
    width: 16px; height: 16px;
    border: 2px solid var(--terracotta-soft);
    border-top-color: var(--terracotta);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Révélation lissée du tunnel (validation + email) */
@keyframes heroReveal {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Message teaser de validation */
.hero-validation {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--sage-bg);
    border: 1.5px solid rgba(63, 156, 124, 0.4);
    border-radius: var(--radius-sm);
    color: #2c6e58;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.45;
    animation: heroReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    margin-bottom: 0.85rem;
}
.hero-validation svg { flex-shrink: 0; stroke-width: 2.5; margin-top: 2px; color: var(--sage); }

/* Bloc email + bouton révélé après sélection du commerce */
.hero-cta-form { animation: heroReveal 0.4s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both; margin-bottom: 0.85rem; }
.hero-cta-form #hero-email {
    width: 100%;
    padding: 1.1rem 1.2rem;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 1.02rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--card);
    box-shadow: var(--shadow);
    transition: border-color 0.25s, box-shadow 0.25s;
    margin-bottom: 0.6rem;
}
.hero-cta-form #hero-email:focus {
    outline: none;
    border-color: var(--terracotta);
    box-shadow: 0 0 0 4px var(--terracotta-soft), var(--shadow);
}
.hero-form-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--ink-mute);
    margin-top: 0.6rem;
}

.hero-whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 0.75rem;
    color: var(--ink-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s;
}
.hero-whatsapp-link:hover { color: var(--terracotta-dark); }

.scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 1.5rem;
    color: var(--ink-mute);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s;
    animation: heroFadeInUp 0.7s 0.38s ease both, bounce 2s 1.08s infinite;
}
.scroll-down:hover { color: var(--terracotta-dark); }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ============================================
   BANDEAU BADGES DE CONFIANCE (sous le hero)
   ============================================ */
.trust-bar {
    margin-top: 3rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    animation: heroFadeInUp 0.7s 0.4s ease both;
}
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    row-gap: 0.6rem;
}
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-soft);
}
/* Séparateur vertical fin entre items (pas de cadres) */
.trust-badge + .trust-badge { border-left: 1px solid var(--border); }
.trust-badge svg { flex-shrink: 0; }
.trust-badge .flag { font-size: 1rem; line-height: 1; }

/* Logo Google multicolore (texte stylisé) */
.g-logo { font-weight: 700; font-family: 'Inter', sans-serif; letter-spacing: -0.5px; }
.g-logo .g-b { color: #4285F4; } .g-logo .g-r { color: #EA4335; }
.g-logo .g-y { color: #FBBC05; } .g-logo .g-g { color: #34A853; }
.stars { color: var(--amber); letter-spacing: -1px; }
.stripe-logo { font-weight: 700; color: #635BFF; font-size: 0.92rem; }

@media (max-width: 900px) {
    .hero-lead { max-width: none; }
    .hero-search-wrapper { max-width: none; }
    .trust-badge + .trust-badge { border-left: none; }
}

/* Mobile : un badge de confiance par ligne */
@media (max-width: 600px) {
    .trust-badges { flex-direction: column; }
}
