/* ╔══════════════════════════════════════════════════════════╗
   ║  LibExplorer — CSS Page d'accueil                        ║
   ╚══════════════════════════════════════════════════════════╝ */

/* ══ HERO ══════════════════════════════════════════════════════════════════ */
.hp-hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    overflow: hidden;
}
.hp-hero__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(255,45,107,.18) 0%, transparent 70%),
                radial-gradient(ellipse 50% 40% at 80% 80%, rgba(139,92,246,.10) 0%, transparent 60%),
                var(--color-bg);
    z-index: 0;
}
.hp-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,45,107,.08) 1px, transparent 1px);
    background-size: 32px 32px;
}
.hp-hero__inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hp-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,45,107,.12);
    border: 1px solid rgba(255,45,107,.3);
    border-radius: 999px;
    padding: .3rem .9rem;
    font-size: .75rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1.25rem;
}
.hp-hero__title {
    font-family: 'Barlow Condensed', var(--font-display), sans-serif;
    font-size: clamp(1.75rem, 4.5vw, 3rem);
    font-weight: 900;
    color: white;
    line-height: 1.1;
    margin: 0 0 .75rem;
    letter-spacing: -.01em;
}
.hp-hero__title em {
    font-style: normal;
    color: var(--color-primary);
}
.hp-hero__sub {
    font-size: clamp(.875rem, 2vw, 1.05rem);
    color: var(--color-text-muted);
    margin: 0 0 2rem;
    line-height: 1.6;
}
.hp-search {
    display: flex;
    gap: 0;
    max-width: 620px;
    margin: 0 auto 1.5rem;
    position: relative;
}
.hp-search__input {
    flex: 1;
    height: 54px;
    padding: 0 1.25rem 0 3rem;
    background: var(--color-bg-elevated);
    border: 1.5px solid var(--color-border);
    border-right: none;
    border-radius: 999px 0 0 999px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color .2s;
}
.hp-search__input:focus { border-color: var(--color-primary); }
.hp-search__icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: .95rem;
    pointer-events: none;
    z-index: 1;
}
.hp-search__btn {
    height: 54px;
    padding: 0 1.2rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0 999px 999px 0;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
    flex-shrink: 0;
}
.hp-search__btn:hover { opacity: .85; }
.hp-search__suggestions {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    z-index: 100;
    display: none;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

/* ══ SECTION GÉNÉRIQUE ══════════════════════════════════════════════════ */
.hp-section { padding: 2rem 0; }
.hp-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .5rem;
}
.hp-section__title {
    font-family: 'Barlow Condensed', var(--font-display), sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    margin: 0;
    letter-spacing: -.01em;
}
.hp-section__link { font-size: .82rem; color: var(--color-primary); text-decoration: none; }
.hp-section__link:hover { text-decoration: underline; }

/* ══ CATÉGORIES HERO ═════════════════════════════════════════════════ */
.hp-hero-cats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .5rem;
    margin-top: 1.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}
.hp-hero-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    cursor: pointer;
}
.hp-hero-cat__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform .15s, opacity .15s;
}
.hp-hero-cat:hover .hp-hero-cat__icon {
    transform: scale(1.12);
    opacity: .85;
}
.hp-hero-cat__name {
    font-size: .65rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.hp-hero-cat:hover .hp-hero-cat__name { color: white; }

/* ══ CATÉGORIES ══════════════════════════════════════════════════════ */
.hp-cats {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}
.hp-cat {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: .85rem;
    font-weight: 600;
    transition: all .15s;
}
.hp-cat:hover { border-color: var(--color-primary); color: white; background: rgba(255,45,107,.08); }
.hp-cat__icon { font-size: .8rem; }
.hp-cat__count { font-size: .72rem; color: var(--color-text-subtle); margin-left: .2rem; }

/* ══ CARDS ÉTABLISSEMENTS ════════════════════════════════════════════ */
.hp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.hp-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    transition: border-color .15s, transform .15s;
    display: block;
}
.hp-card:hover { border-color: rgba(255,45,107,.4); transform: translateY(-2px); }
.hp-card__img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--color-bg-elevated);
    display: block;
}
.hp-card__body { padding: .875rem 1rem; }
.hp-card__cat {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .3rem;
}
.hp-card__name {
    font-weight: 700;
    color: white;
    font-size: .95rem;
    margin: 0 0 .25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hp-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .75rem;
    color: var(--color-text-muted);
}
.hp-card__stars { color: #FFD700; font-size: .72rem; }
.hp-card__score { font-weight: 700; color: white; margin-left: .3rem; }

/* ══ AVIS RÉCENTS ═══════════════════════════════════════════════════ */
.hp-reviews { display: flex; flex-direction: column; gap: .75rem; }
.hp-review {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    display: flex;
    gap: .875rem;
    align-items: flex-start;
}
.hp-review__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: .85rem;
    flex-shrink: 0;
    overflow: hidden;
}
.hp-review__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hp-review__body { flex: 1; min-width: 0; }
.hp-review__top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .25rem; }
.hp-review__pseudo { font-weight: 700; color: white; font-size: .85rem; }
.hp-review__estab { font-size: .78rem; color: var(--color-primary); text-decoration: none; }
.hp-review__estab:hover { text-decoration: underline; }
.hp-review__stars { color: #FFD700; font-size: .7rem; }
.hp-review__comment { font-size: .82rem; color: var(--color-text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hp-review__date { font-size: .7rem; color: var(--color-text-subtle); margin-top: .3rem; }

/* ══ COMMENT ÇA MARCHE ══════════════════════════════════════════════ */
.hp-how {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    text-align: center;
}
.hp-how__title { font-family: 'Barlow Condensed', var(--font-display), sans-serif; font-size: 1.6rem; font-weight: 900; color: white; margin: 0 0 1.5rem; letter-spacing: -.01em; }
.hp-how__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.hp-step__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,45,107,.12);
    border: 1.5px solid rgba(255,45,107,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .875rem;
    font-size: 1.2rem;
    color: var(--color-primary);
}
.hp-step__title { font-weight: 700; color: white; font-size: .9rem; margin: 0 0 .3rem; }
.hp-step__desc { font-size: .8rem; color: var(--color-text-muted); line-height: 1.5; }
.hp-step__num { font-family: var(--font-display); font-size: .7rem; font-weight: 900; color: var(--color-text-subtle); margin-bottom: .3rem; }

/* ══ TITRE ANIMÉ ════════════════════════════════════════════════════ */
.hp-rotate-word {
    display: inline-block;
    color: var(--color-primary);
    min-width: 200px;
}

/* ══ BÊTA — compteur de places ══════════════════════════════════════ */
.hp-beta-spots {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(255,45,107,.1);
    border: 1px solid rgba(255,45,107,.3);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}
.hp-beta-spots__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: betaPulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes betaPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .4; transform: scale(.7); }
}

/* ══ BÊTA — bloc code d'invitation ══════════════════════════════════ */
.hp-beta-code {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin: 0 auto 1rem;
}
.hp-beta-code__input {
    flex: 1;
    height: 50px;
    padding: 0 1rem;
    background: var(--color-bg-elevated);
    border: 1.5px solid var(--color-border);
    border-right: none;
    border-radius: 999px 0 0 999px;
    color: white;
    font-size: .95rem;
    font-family: monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
    outline: none;
    transition: border-color .2s;
}
.hp-beta-code__input:focus { border-color: var(--color-primary); }
.hp-beta-code__input::placeholder { text-transform: none; letter-spacing: normal; font-family: inherit; color: var(--color-text-subtle); }
.hp-beta-code__btn {
    height: 50px;
    padding: 0 1.25rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0 999px 999px 0;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
}
.hp-beta-code__btn:hover { opacity: .85; }
.hp-beta-code__msg {
    font-size: .8rem;
    margin-top: .4rem;
    min-height: 1.2em;
    text-align: center;
}
.hp-beta-code__msg.valid   { color: #22c55e; }
.hp-beta-code__msg.invalid { color: var(--color-primary); }

/* ══ RESPONSIVE ═════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .hp-hero { min-height: auto; padding: 2.5rem 1rem 1.5rem; }
    .hp-hero-cats { grid-template-columns: repeat(6, 1fr); gap: .3rem; margin-top: 1.25rem; max-width: 100%; }
    .hp-hero-cat__icon { width: 42px; height: 42px; font-size: 1rem; }
    .hp-hero-cat__name { font-size: .6rem; }
    .hp-search { flex-direction: row; gap: 0; max-width: 100%; }
    .hp-search__input { border-radius: 999px 0 0 999px; border-right: none; height: 48px; font-size: .95rem; }
    .hp-search__btn { border-radius: 0 999px 999px 0; width: auto; height: 48px; padding: 0 1rem; font-size: .8rem; }
    .hp-stats { gap: 1.25rem; }
    .hp-stat__val { font-size: 1.3rem; }
    .hp-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .hp-how__steps { grid-template-columns: 1fr; gap: 1.25rem; }
    .hp-how { padding: 1.5rem 1rem; }
    .hp-reviews-section { display: none; }
    .hp-grid .hp-card:nth-child(n+5) { display: none; }
    .hp-beta-code { flex-direction: column; gap: .5rem; max-width: 100%; }
    .hp-beta-code__input { border-right: 1.5px solid var(--color-border); border-radius: 999px; height: 46px; }
    .hp-beta-code__btn { border-radius: 999px; height: 46px; }
}
@media (min-width: 641px) and (max-width: 900px) {
    .hp-grid { grid-template-columns: repeat(2, 1fr); }
}
