/* ===================================================================
   PhoneLigne - Hero d'accueil "pro" (bandeau + carte de recherche)
   À charger APRÈS components.css et annuaire.css.
   Ne change AUCUN identifiant ni nom de classe utilisé par recherche.js
   (.pastille, .pastille--active, #recherche-fournisseur, #stat-*, etc.).
   Compatible mode clair / mode sombre (variables de main.css).
   =================================================================== */

/* -------------------- Bandeau -------------------- */

.hero.hero--pro {
    padding-block: clamp(56px, 9vw, 96px) clamp(44px, 7vw, 72px);
    margin-bottom: clamp(32px, 5vw, 56px);
    background-color: #0D1530;
    background-image:
        radial-gradient(900px 420px at 88% -8%, rgba(240, 165, 55, 0.20), transparent 60%),
        radial-gradient(760px 420px at -4% 104%, rgba(94, 118, 214, 0.24), transparent 62%),
        radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.4px),
        linear-gradient(180deg, #0D1530 0%, #16213F 100%);
    background-size: auto, auto, 26px 26px, auto;
}

.hero--pro .conteneur {
    max-width: 920px;
}

/* Apparition douce, décalée (désactivée si "mouvement réduit", voir main.css) */
@keyframes hero-entree {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.hero--pro .conteneur > * {
    animation: hero-entree 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero--pro .conteneur > *:nth-child(2) { animation-delay: 0.06s; }
.hero--pro .conteneur > *:nth-child(3) { animation-delay: 0.12s; }
.hero--pro .conteneur > *:nth-child(4) { animation-delay: 0.18s; }
.hero--pro .conteneur > *:nth-child(5) { animation-delay: 0.26s; }
.hero--pro .conteneur > *:nth-child(6) { animation-delay: 0.34s; }

/* -------------------- Pastille d'accroche -------------------- */

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 16px 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #E4E8F7;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero__eyebrow-point {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3DDC97;
    box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
    animation: hero-pulse 2.2s ease-out infinite;
}

@keyframes hero-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

/* -------------------- Titre et sous-titre -------------------- */

.hero--pro .hero__titre {
    margin: 22px auto 0;
    max-width: 24ch;
    font-family: var(--font-logo);
    font-weight: 800;
    font-size: clamp(2rem, 5.4vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #FFFFFF;
    text-wrap: balance;
}

.hero--pro .hero__titre em {
    font-style: normal;
    color: #F5B95A; /* repli si background-clip non pris en charge */
    background: linear-gradient(100deg, #FFD08A 0%, #F0A537 55%, #E8892B 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    white-space: nowrap;
}

.hero--pro .hero__sous-titre {
    margin: 18px auto 0;
    max-width: 52ch;
    font-size: clamp(1rem, 2.1vw, 1.15rem);
    line-height: 1.6;
    color: #B9C1DE;
}

/* -------------------- Chiffres clés (pastille vitrée) -------------------- */

.hero--pro .hero__stats {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0;
    margin-top: 28px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero--pro .hero__stats > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px clamp(14px, 3vw, 26px);
    text-align: left;
}

.hero--pro .hero__stats > div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.hero--pro .hero__stat-valeur {
    display: inline;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    color: #F0A537;
}

.hero--pro .hero__stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

/* -------------------- Carte de recherche -------------------- */

.hero--pro .hero__recherche {
    width: 100%;
    max-width: 780px;
    margin: 36px auto 0;
    padding: clamp(18px, 3.2vw, 30px);
    border-radius: 22px;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 36px 70px -24px rgba(3, 8, 24, 0.7),
        0 0 0 6px rgba(255, 255, 255, 0.06);
    text-align: left;
}

[data-theme="dark"] .hero--pro .hero__recherche {
    border-color: rgba(255, 255, 255, 0.08);
}

.hero--pro .hero__recherche > label {
    display: block;
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-ink);
}

.recherche-champ {
    position: relative;
}

.recherche-champ > svg {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    color: var(--color-muted);
    pointer-events: none;
    transition: color 0.18s ease;
}

.recherche-champ:focus-within > svg {
    color: var(--color-marigold-dark);
}

.hero--pro .hero__recherche input[type="search"] {
    width: 100%;
    height: 60px;
    padding: 0 18px 0 54px;
    font-family: var(--font-principale);
    font-size: 1.05rem;
    color: var(--color-ink);
    background: var(--color-paper);
    border: 1.5px solid var(--color-mist);
    border-radius: 16px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.hero--pro .hero__recherche input[type="search"]::placeholder {
    color: var(--color-muted);
    opacity: 0.85;
}

.hero--pro .hero__recherche input[type="search"]:focus {
    outline: none;
    background: var(--color-surface);
    border-color: var(--color-marigold);
    box-shadow: 0 0 0 4px rgba(240, 165, 55, 0.24);
}

/* -------------------- Groupes de filtres -------------------- */

.filtre-groupe {
    margin-top: 22px;
}

.filtre-groupe__titre {
    margin: 0 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.hero--pro .hero__recherche .pastilles {
    justify-content: flex-start;
    margin-top: 0;
    gap: 8px;
}

.hero--pro .hero__recherche .pastille {
    min-height: 38px;
    padding: 8px 16px;
    font-family: var(--font-principale);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--color-ink);
    background: var(--color-surface);
    border: 1px solid var(--color-mist);
    transition: border-color 0.16s ease, background 0.16s ease,
                box-shadow 0.16s ease, transform 0.16s ease;
}

.hero--pro .hero__recherche .pastille:hover {
    border-color: var(--color-marigold);
    background: var(--color-paper);
    transform: translateY(-1px);
}

.hero--pro .hero__recherche .pastille--active,
.hero--pro .hero__recherche .pastille--active:hover {
    color: #10151C;
    background: var(--color-marigold);
    border-color: var(--color-marigold);
    box-shadow: 0 8px 18px -8px rgba(240, 165, 55, 0.85);
    transform: none;
}

/* Type de vente : contrôle segmenté */
.hero--pro .hero__recherche .pastilles--segment {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 2px;
    max-width: 100%;
    padding: 4px;
    overflow-x: auto;
    background: var(--color-paper);
    border: 1px solid var(--color-mist);
    border-radius: 999px;
    scrollbar-width: none;
}

.pastilles--segment::-webkit-scrollbar {
    display: none;
}

.hero--pro .hero__recherche .pastilles--segment .pastille {
    background: transparent;
    border-color: transparent;
}

.hero--pro .hero__recherche .pastilles--segment .pastille:hover {
    background: rgba(128, 138, 160, 0.14);
    border-color: transparent;
}

.hero--pro .hero__recherche .pastilles--segment .pastille--active,
.hero--pro .hero__recherche .pastilles--segment .pastille--active:hover {
    color: #FFFFFF;
    background: var(--color-signal);
    border-color: var(--color-signal);
    box-shadow: 0 6px 14px -6px rgba(16, 26, 48, 0.7);
}

/* -------------------- Filtres avancés -------------------- */

.hero--pro .filtres-avances {
    margin-top: 22px;
    padding: 0;
    background: none;
    border: 0;
    border-top: 1px solid var(--color-mist);
    border-radius: 0;
}

.hero--pro .filtres-avances summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 2px 2px;
    cursor: pointer;
    list-style: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-ink);
    user-select: none;
}

.hero--pro .filtres-avances summary::-webkit-details-marker {
    display: none;
}

.hero--pro .filtres-avances summary:hover {
    color: var(--color-marigold-dark);
}

.hero--pro .filtres-avances summary > svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hero--pro .filtres-avances__chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.hero--pro .filtres-avances[open] .filtres-avances__chevron {
    transform: rotate(180deg);
}

.hero--pro .filtres-avances__contenu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.hero--pro .filtres-avances__champ label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--color-muted);
}

.hero--pro .filtres-avances__champ input,
.hero--pro .filtres-avances__champ select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font-family: var(--font-principale);
    font-size: 0.9rem;
    color: var(--color-ink);
    background: var(--color-paper);
    border: 1.5px solid var(--color-mist);
    border-radius: 12px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.hero--pro .filtres-avances__champ input:focus,
.hero--pro .filtres-avances__champ select:focus {
    outline: none;
    border-color: var(--color-marigold);
    box-shadow: 0 0 0 3px rgba(240, 165, 55, 0.22);
}

.hero--pro .filtres-avances__note {
    margin: 12px 0 0;
    max-width: none;
    font-size: 0.78rem;
    color: var(--color-muted);
}

/* -------------------- Garanties (sous la carte) -------------------- */

.hero__garanties {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 30px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.hero__garanties li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
}

.hero__garanties svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #F0A537;
}

/* -------------------- Mobile -------------------- */

@media (max-width: 639px) {

    .hero--pro .hero__stats > div {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
    }

    .hero--pro .hero__stat-label {
        font-size: 0.78rem;
    }

    .hero--pro .hero__recherche input[type="search"] {
        height: 56px;
        font-size: 1rem;
    }

    /* Catégories : une seule ligne défilante au doigt, bord à bord */
    .hero--pro .hero__recherche #filtre-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-inline: calc(clamp(18px, 3.2vw, 30px) * -1);
        padding-inline: clamp(18px, 3.2vw, 30px);
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .hero--pro #filtre-categories::-webkit-scrollbar {
        display: none;
    }

    .hero--pro .hero__recherche .pastilles--segment .pastille {
        padding: 8px 9px;
        font-size: 0.79rem;
    }

    .hero__garanties {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* ===================================================================
   Décor flottant : téléphones Android, téléphones à touches et
   accessoires (illustrations SVG, purement décoratives).
   =================================================================== */

.hero--pro .conteneur {
    position: relative;
    z-index: 1;
}

.hero__decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hd {
    position: absolute;
    display: block;
    --rot: 0deg;
    transform: rotate(var(--rot));
    filter: drop-shadow(0 20px 26px rgba(2, 6, 20, 0.45));
    animation: hd-flotte var(--dur, 9s) ease-in-out infinite;
    animation-delay: var(--delai, 0s);
    will-change: transform;
}

.hd svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

@keyframes hd-flotte {
    0%, 100% { transform: translateY(0) rotate(var(--rot)); }
    50%      { transform: translateY(-18px) rotate(calc(var(--rot) + 3deg)); }
}

/* Traits des illustrations */
.hd-corps {
    fill: rgba(255, 255, 255, 0.05);
    stroke: rgba(255, 255, 255, 0.62);
    stroke-width: 2.6;
}

.hd-ecran {
    fill: rgba(255, 255, 255, 0.08);
    stroke: none;
}

.hd-plein {
    fill: rgba(255, 255, 255, 0.55);
    stroke: none;
}

.hd-doux {
    opacity: 0.5;
}

.hd-accent {
    fill: rgba(240, 165, 55, 0.2);
    stroke: #F0A537;
    stroke-width: 2.6;
}

.hd-accent-plein {
    fill: #F0A537;
    stroke: none;
}

/* Position, taille et profondeur de chaque objet */
.hd--a { left: 3%;   top: 12%; width: clamp(70px, 8vw, 120px);  --rot: -14deg; --dur: 9s;  opacity: 0.95; }
.hd--b { right: 3%;  top: 6%;  width: clamp(84px, 10vw, 140px); --rot: 12deg;  --dur: 10s; --delai: -3s; opacity: 0.95; }
.hd--c { left: 13%;  top: 50%; width: clamp(56px, 6vw, 84px);   --rot: 9deg;   --dur: 8s;  --delai: -5s; opacity: 0.6; }
.hd--d { right: 14%; top: 46%; width: clamp(46px, 5.4vw, 76px); --rot: -10deg; --dur: 11s; --delai: -2s; opacity: 0.6; }
.hd--e { left: 2%;   top: 72%; width: clamp(80px, 9vw, 130px);  --rot: -8deg;  --dur: 10s; --delai: -4s; opacity: 0.9; }
.hd--f { right: 2%;  top: 70%; width: clamp(90px, 10vw, 150px); --rot: 10deg;  --dur: 9s;  --delai: -6s; opacity: 0.9; }
.hd--g { left: 16%;  top: 5%;  width: clamp(44px, 5vw, 70px);   --rot: 18deg;  --dur: 12s; --delai: -1s; opacity: 0.55; }
.hd--h { right: 17%; top: 3%;  width: clamp(60px, 7vw, 100px);  --rot: -12deg; --dur: 11s; --delai: -7s; opacity: 0.6; }

.hd--c, .hd--d, .hd--g, .hd--h {
    filter: blur(0.8px) drop-shadow(0 14px 20px rgba(2, 6, 20, 0.4));
}

/* Tablette et mobile : on ne garde que quelques objets, discrets */
@media (max-width: 899px) {
    .hd--c, .hd--d, .hd--g, .hd--h {
        display: none;
    }

    .hd--a { left: -8%;  top: -1%; width: 58px; opacity: 0.32; }
    .hd--b { right: -8%; top: -2%; width: 66px; opacity: 0.32; }
    .hd--e { left: -4%;  top: 86%; width: 84px; opacity: 0.35; }
    .hd--f { right: -4%; top: 88%; width: 92px; opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .hd {
        animation: none;
    }
}
