/* Hero commun Blog / Glossaire — 6 optimisations visuelles */

/* 1. Gradient enrichi avec profondeur (radial overlays) */
/* 2. Support thème clair/sombre */
.page-hero {
    position: relative;
    overflow: hidden;
    color: white;
    padding: 5rem 1.25rem 4rem;
    margin-bottom: 3rem;
    text-align: center;
    /* Gradient de base */
    background: linear-gradient(135deg, #5a5fca 0%, #6d73e0 40%, #8b5cf6 100%);
    /* Radiaux pour profondeur */
    background-image:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse 100% 60% at 50% 100%, rgba(0, 0, 0, 0.08) 0%, transparent 60%),
        linear-gradient(135deg, #5a5fca 0%, #6d73e0 40%, #8b5cf6 100%);
    /* 6. Ombre douce et espacement */
    box-shadow: 0 4px 24px rgba(90, 95, 202, 0.15), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

/* Thème clair — hero plus doux, tons pastel */
[data-theme="light"] .page-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    background-image:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #6366f1 0%, #7c3aed 50%, #8b5cf6 100%);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.2);
}

/* 5. Motif décoratif subtil (points discrets) */
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.15) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.6;
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* 3. Animation d'entrée (fade-in + slide-up) */
.page-hero-inner {
    animation: page-hero-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Label (À propos / Services) */
.page-hero-label {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 0.75rem;
}

/* Bloc titre + sous-titre réorganisé */
.page-hero-content {
    display: grid;
    gap: 1.5rem;
    align-items: start;
    text-align: left;
}
@media (min-width: 768px) {
    .page-hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        align-items: center;
    }
}

.page-hero .page-hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: 1.15;
}

.page-hero-subtitle-wrap {
    padding-left: 1rem;
    border-left: 3px solid rgba(255, 255, 255, 0.5);
}
@media (min-width: 768px) {
    .page-hero-subtitle-wrap {
        padding-left: 1.25rem;
        padding-top: 0.25rem;
    }
}

.page-hero p.page-hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
    max-width: 36rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.95);
}
@media (min-width: 768px) {
    .page-hero p.page-hero-subtitle {
        max-width: none;
    }
}

/* 4. Champ de recherche glassmorphism */
.page-hero-search {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.page-hero-search .search {
    position: relative;
    display: flex;
    align-items: center;
}

.page-hero-search .search-icon {
    position: absolute;
    left: 1.25rem;
    color: #6b7280;
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 2;
}

.page-hero-search input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    font-size: 1rem;
    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1f2937;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.page-hero-search input:hover {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.page-hero-search input::placeholder {
    color: #6b7280;
}

.page-hero-search input:focus {
    outline: none;
    border-color: #5a5fca;
    box-shadow: 0 0 0 4px rgba(90, 95, 202, 0.25), 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

@keyframes page-hero-enter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 768px) {
    .page-hero {
        padding: 3rem 1rem 3rem;
        text-align: center;
    }
    .page-hero-label {
        text-align: center;
    }
    .page-hero-content {
        text-align: center;
    }
    .page-hero-subtitle-wrap {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        border-left: none;
        border-top: 3px solid rgba(255, 255, 255, 0.5);
        padding-left: 0;
        padding-top: 1rem;
    }
    .page-hero .page-hero-title {
        font-size: 1.875rem;
        text-align: center;
    }
    .page-hero p.page-hero-subtitle {
        font-size: 1rem;
        text-align: center;
    }
    .page-hero-search input {
        padding: 0.875rem 1rem 0.875rem 3.25rem;
    }
}

/* Hero style FAQ (Blog, Glossaire) — même mise en page que /faq */
.page-hero-faq-style {
    background: linear-gradient(135deg, rgba(90, 95, 202, 0.08) 0%, rgba(243, 126, 5, 0.05) 100%) !important;
    background-image: none !important;
    color: #2d2d41;
    border-bottom: 1px solid rgba(90, 95, 202, 0.1);
    box-shadow: none !important;
    padding: 4rem 1.25rem 3rem;
    margin-bottom: 0;
    text-align: center;
    overflow: visible; /* permet au dropdown des suggestions de s'afficher sous le hero */
}
.page-hero-faq-style::before {
    display: none;
}
.page-hero-faq-style .page-hero-inner,
.page-hero-faq-style .page-hero-search,
.page-hero-faq-style .page-hero-search .search {
    overflow: visible;
}
.page-hero-faq-style .page-hero-inner {
    max-width: 100%;
    text-align: center;
}
.page-hero-faq-style .page-hero-title {
    color: #5a5fca;
    font-size: clamp(2rem, 4vw, 3rem);
    background: linear-gradient(135deg, #5a5fca 0%, #F37E05 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin: 0 0 1rem;
}
.page-hero-faq-style .page-hero-subtitle {
    color: #6b7280 !important;
    opacity: 1;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    font-size: 1.125rem;
}
.page-hero-faq-style .page-hero-search {
    max-width: 600px;
    margin: 0 auto 3rem;
}
.page-hero-faq-style .page-hero-search .search input,
.page-hero-faq-style .page-hero-search input {
    padding: 1rem 1rem 1rem 3.5rem;
    border: 2px solid rgba(90, 95, 202, 0.2);
    border-radius: 16px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(90, 95, 202, 0.08);
}
.page-hero-faq-style .page-hero-search .search input:focus,
.page-hero-faq-style .page-hero-search input:focus {
    outline: none;
    border-color: #5a5fca;
    box-shadow: 0 4px 16px rgba(90, 95, 202, 0.15), 0 0 0 4px rgba(90, 95, 202, 0.1);
    background: #fff;
}
.page-hero-faq-style .page-hero-search .search-icon {
    color: #9ca3af;
}
[data-theme="dark"] .page-hero-faq-style {
    background: linear-gradient(135deg, rgba(90, 95, 202, 0.12) 0%, rgba(243, 126, 5, 0.08) 100%) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}
[data-theme="dark"] .page-hero-faq-style .page-hero-title {
    background: linear-gradient(135deg, #a5b4fc 0%, #fdba74 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="dark"] .page-hero-faq-style .page-hero-subtitle {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .page-hero-faq-style .page-hero-search .search input,
[data-theme="dark"] .page-hero-faq-style .page-hero-search input {
    background: var(--color-bg-tertiary, #1a162e);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f3f4f6;
}
[data-theme="dark"] .page-hero-faq-style .page-hero-search input::placeholder {
    color: #9ca3af;
}
/* FAQ page : champ recherche en dark */
[data-theme="dark"] .faq-hero .search input {
    background: var(--color-bg-tertiary, #1a162e);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f3f4f6;
}
[data-theme="dark"] .faq-hero .search input::placeholder {
    color: #9ca3af;
}
@media (max-width: 768px) {
    .page-hero-faq-style {
        padding: 3rem 1rem 2rem;
    }
    .page-hero-faq-style .page-hero-subtitle {
        font-size: 1rem;
    }
    .page-hero-faq-style .page-hero-search {
        margin-bottom: 2rem;
    }
}

/* Suggestions recherche intelligente (FAQ, Blog, Glossaire) */
.smart-search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--color-bg, #fff);
    border: 2px solid rgba(90, 95, 202, 0.2);
    border-radius: 0 0 14px 14px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(90, 95, 202, 0.12);
}
.smart-search-suggestions.is-open {
    display: block;
}
.smart-search-suggestion-item {
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(90, 95, 202, 0.08);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.smart-search-suggestion-item:last-child {
    border-bottom: none;
}
.smart-search-suggestion-item:hover,
.smart-search-suggestion-item.active {
    background: rgba(90, 95, 202, 0.08);
}
.smart-search-term,
.smart-search-title {
    font-weight: 600;
    color: var(--color-text, #1f2937);
    flex: 1;
    min-width: 0;
}
.smart-search-category {
    font-size: 0.8125rem;
    color: var(--color-text-secondary, #6b7280);
    background: rgba(90, 95, 202, 0.12);
    padding: 0.25rem 0.625rem;
    border-radius: 10px;
    flex-shrink: 0;
}
[data-theme="dark"] .smart-search-suggestions {
    background: var(--color-bg-tertiary, #1a162e);
    border-color: rgba(255, 255, 255, 0.15);
}
[data-theme="dark"] .smart-search-suggestion-item {
    border-bottom-color: var(--color-border);
}
[data-theme="dark"] .smart-search-suggestion-item:hover,
[data-theme="dark"] .smart-search-suggestion-item.active {
    background: rgba(90, 95, 202, 0.2);
}
[data-theme="dark"] .smart-search-term,
[data-theme="dark"] .smart-search-title {
    color: #f3f4f6;
}
[data-theme="dark"] .smart-search-category {
    color: #c9ceda;
    background: rgba(255, 255, 255, 0.1);
}
