/* ==========================================================
   PETSCOMPARE — Home hero refonte (septembre 2026)
   ==========================================================
   Nouveau hero mobile-first avec duo mascottes chien + chat.
   Ton "expert accessible" : titre pose, chiffres precis,
   search bar prominent (intent commercial fort).

   Preserver le duonav-fadeIn du push 2 : ce hero se lit
   correctement en dessous de la nouvelle nav marine.
   ========================================================== */

/* --- Base mobile --- */
.hh {
    background: var(--cream, #faf7f2);
    padding: 32px 20px 40px;
    position: relative;
    overflow: hidden;
}

.hh-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    text-align: center;
}

.hh-text {
    width: 100%;
    max-width: 640px;
}

.hh-eyebrow {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--brand-primary, #1e3a5f);
    background: var(--brand-accent-light, #a3d4c5);
    padding: 4px 12px;
    border-radius: var(--r-pill, 999px);
    margin-bottom: 20px;
    font-weight: 600;
}

.hh-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(30px, 6vw, 54px);
    font-weight: 400;
    line-height: 1.1;
    color: var(--brand-primary-dark, #0a1929);
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}
.hh-title em {
    font-style: italic;
    font-weight: 600;
    color: var(--brand-primary, #1e3a5f);
    position: relative;
}
.hh-title em::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 6px;
    background: var(--brand-accent, #7cb9a3);
    opacity: 0.4;
    z-index: -1;
}

.hh-sub {
    font-family: 'Inter', sans-serif;
    font-size: clamp(15px, 2.4vw, 18px);
    line-height: 1.55;
    color: var(--ink, #0a1929);
    opacity: 0.82;
    margin: 0 0 24px;
}
.hh-sub strong {
    color: var(--amber, #d96b27);
    font-weight: 700;
}

/* --- Search bar hero --- */
.hh-search {
    display: flex;
    gap: 8px;
    background: #fff;
    padding: 6px;
    border-radius: var(--r-md, 12px);
    box-shadow: var(--shadow-card, 0 2px 12px rgba(10, 25, 41, 0.06));
    border: 2px solid var(--brand-primary, #1e3a5f);
    max-width: 560px;
    margin: 0 auto 24px;
    transition: box-shadow var(--t-fast, .15s), transform var(--t-fast, .15s);
}
.hh-search:focus-within {
    box-shadow: var(--shadow-card-hover, 0 8px 28px rgba(10, 25, 41, 0.10));
    transform: translateY(-1px);
}
.hh-search-input {
    flex: 1;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    color: var(--ink, #0a1929);
    outline: none;
    min-width: 0;
}
.hh-search-input::placeholder {
    color: var(--muted, #6b7a8a);
    opacity: 0.9;
}
.hh-search-btn {
    padding: 12px 20px;
    border: 0;
    background: var(--amber, #d96b27);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--r-sm, 6px);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--t-fast, .15s), transform var(--t-fast, .15s);
    box-shadow: var(--shadow-btn);
}
.hh-search-btn:hover {
    background: var(--amber-light, #f08847);
    transform: translateY(-1px);
}

/* --- Metrics (chiffres cles) --- */
.hh-metrics {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.hh-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.hh-metric strong {
    font-family: 'Fraunces', serif;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 600;
    color: var(--brand-primary, #1e3a5f);
    line-height: 1;
}
.hh-metric span {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    color: var(--muted, #6b7a8a);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.hh-metric-highlight strong {
    color: var(--amber, #d96b27);
}

/* --- Photo hero (chien + chat dans l herbe) --- */
.hh-visual {
    position: relative;
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}
.hh-photo {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--r-lg, 20px);
    box-shadow: 0 12px 40px rgba(10, 25, 41, 0.16);
    display: block;
}
/* Badge chiffres cles en overlay sur la photo */
.hh-photo-badge {
    position: absolute;
    bottom: -12px;
    right: -12px;
    background: var(--brand-primary, #1e3a5f);
    color: #fff;
    padding: 14px 18px;
    border-radius: var(--r-md, 12px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    box-shadow: var(--shadow-card, 0 2px 12px rgba(10, 25, 41, 0.16));
    border: 3px solid #fff;
}
.hh-photo-badge-num {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    color: var(--brand-accent-light, #a3d4c5);
}
.hh-photo-badge-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================
   Desktop (>= 900px)
   ========================================================== */
@media (min-width: 900px) {
    .hh {
        padding: 56px 40px 72px;
    }
    .hh-inner {
        flex-direction: row;
        gap: 60px;
        align-items: center;
        text-align: left;
        justify-content: space-between;
    }
    .hh-text {
        flex: 1;
        max-width: 620px;
    }
    .hh-search {
        margin: 0 0 28px;
    }
    .hh-metrics {
        justify-content: flex-start;
        gap: 40px;
    }
    .hh-visual {
        flex-shrink: 0;
        width: auto;
    }
    .hh-mascots {
        max-width: 400px;
    }
    .hh-mascot {
        width: 180px;
        height: 180px;
    }
}

/* ==========================================================
   NOUVEAU : section "Nos services" (3 cards)
   ========================================================== */
.home-services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
}

.home-service-card {
    display: block;
    padding: 28px 24px;
    background: #fff;
    border: 1px solid var(--cream-2, #ebe6dd);
    border-radius: var(--r-md, 12px);
    text-decoration: none;
    color: var(--ink, #0a1929);
    transition: border-color var(--t-base, .25s), transform var(--t-base, .25s), box-shadow var(--t-base, .25s);
}
.home-service-card:hover {
    border-color: var(--brand-primary, #1e3a5f);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover, 0 8px 28px rgba(10, 25, 41, 0.10));
    text-decoration: none;
    color: var(--ink, #0a1929);
}

.home-service-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--r-md, 12px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
    color: #fff;
}
.home-service-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--brand-primary-dark, #0a1929);
    margin: 0 0 8px;
    line-height: 1.25;
}
.home-service-card p {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink, #0a1929);
    opacity: 0.82;
    margin: 0 0 14px;
}
.home-service-cta {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-primary, #1e3a5f);
    transition: transform var(--t-fast, .15s);
}
.home-service-card:hover .home-service-cta {
    transform: translateX(3px);
    color: var(--amber, #d96b27);
}

@media (min-width: 780px) {
    .home-services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* ==========================================================
   MOBILE (< 900px) — titre en surimpression sur la photo
   ----------------------------------------------------------
   Ordre voulu sur telephone :
     1. pastille "Comparateur independant"
     2. photo chien+chat, avec le titre pose dessus (voile marine)
     3. paragraphe, 4. barre de recherche, 5. chiffres cles
   Meme principe que le header des pages categorie : .hh-text passe en
   display:contents, ses enfants deviennent des items de la grille
   .hh-inner et le titre peut occuper la meme cellule que la photo.
   Aucun changement de HTML, donc desktop (>=900px) strictement intact.
   ========================================================== */
@media (max-width: 899px) {
    .hh-inner {
        display: grid;
        /* minmax(0, 1fr) et pas 1fr : la barre de recherche a une largeur
           minimale intrinseque (~379px : input + bouton "Comparer") qui
           elargirait sinon toute la colonne au-dela de l'ecran. */
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 20px;
    }
    .hh-text { display: contents; }

    .hh-eyebrow { grid-area: 1 / 1; margin: 0; }

    .hh-visual {
        grid-area: 2 / 1;
        width: 100%;
        max-width: 640px;
        height: 300px;
        margin: 0;
    }
    /* mobile.css impose plus haut un img { height:auto !important } global :
       on le recadre ici pour que object-fit:cover remplisse le cadre */
    .hh-photo {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
    }
    .hh-visual::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        border-radius: var(--r-lg, 20px);
        background: linear-gradient(
            to top,
            rgba(10, 25, 41, 0.90) 0%,
            rgba(10, 25, 41, 0.78) 45%,
            rgba(10, 25, 41, 0.45) 72%,
            rgba(10, 25, 41, 0.10) 92%,
            rgba(10, 25, 41, 0) 100%
        );
        pointer-events: none;
    }
    /* Le badge chiffre se posait en bas a droite de la photo : il entrerait
       en collision avec le titre. L'info est deja dans .hh-metrics juste
       en dessous, on le retire sur mobile. */
    .hh-photo-badge { display: none; }

    .hh-title {
        grid-area: 2 / 1;
        z-index: 2;
        align-self: end;
        justify-self: stretch;
        width: 100%;
        max-width: 640px;
        margin: 0;
        padding: 0 20px 22px;
        text-align: left;
        color: var(--cream, #faf7f2);
        font-size: clamp(26px, 6.8vw, 38px);
        text-wrap: balance;
    }
    .hh-title em { color: var(--brand-accent-light, #a3d4c5); }
    .hh-title em::after {
        background: var(--brand-accent-light, #a3d4c5);
        opacity: 0.35;
    }

    .hh-sub     { grid-area: 3 / 1; width: 100%; max-width: 640px; margin: 0; }
    .hh-search  { grid-area: 4 / 1; width: 100%; max-width: 560px; margin: 0; }
    .hh-metrics { grid-area: 5 / 1; width: 100%; max-width: 640px; margin: 0; }
}
