/************************************************************
	SECTION « LE GUIDE » (template-parts/home-guide.php)
	Page d'accueil — voir functions.php.
	Préfixe hg- : aucune règle ne touche les autres sections.
	Reprend le hero de /guide/ (css/guide.css : .gd-hero, .gd-rules).
************************************************************/
.hg-guide {
    --hg-ease: cubic-bezier(0.65, 0, 0.35, 1);

    position: relative;
    overflow: hidden;
    padding-block: clamp(5rem, 10vw, 10rem) clamp(3rem, 6vw, 5rem);
    background: #000;
    color: #fff;
}

.hg-grid {
    align-items: center;
    row-gap: 3rem;
}

.hg-kicker {
    margin: 0 0 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.hg-title {
    margin: 0;
    font-size: clamp(2.8rem, 7.4vw, 8.4rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: #fff;
}

/* Masque ligne par ligne pour l'apparition (comme .trf-hero-line) */
.hg-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.hg-line > span {
    display: block;
}

.hg-grey {
    color: #8a8a8a;
}

.hg-text {
    max-width: 50ch;
    margin: clamp(1.5rem, 3vw, 2.5rem) 0 2rem;
    font-size: clamp(1rem, 1.15vw, 1.15rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

/* Boutons (même dessin que .trf-btn de /guide/) */
.hg-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.hg-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.4rem 0.4rem 0.4rem 1.5rem;
    border: 1px solid #fff;
    border-radius: 50px;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.45s var(--hg-ease);
}

.hg-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #fff;
    transform: translateY(101%);
    transition: transform 0.45s var(--hg-ease);
}

.hg-btn:hover,
.hg-btn:focus-visible {
    color: #000 !important;
    text-decoration: none;
}

.hg-btn:hover::before,
.hg-btn:focus-visible::before {
    transform: translateY(0);
}

.hg-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.hg-btn-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    transition: background-color 0.45s var(--hg-ease), color 0.45s var(--hg-ease);
}

.hg-btn-icon svg {
    width: 14px;
    height: 14px;
}

.hg-btn:hover .hg-btn-icon,
.hg-btn:focus-visible .hg-btn-icon {
    background: #000;
    color: #fff;
}

/* Bouton plein (CTA principal) */
.hg-btn--solid {
    background: #fff;
    color: #000;
}

.hg-btn--solid::before {
    background: #000;
}

.hg-btn--solid:hover,
.hg-btn--solid:focus-visible {
    color: #fff !important;
}

.hg-btn--solid .hg-btn-icon {
    background: #000;
    color: #fff;
}

.hg-btn--solid:hover .hg-btn-icon,
.hg-btn--solid:focus-visible .hg-btn-icon {
    background: #fff;
    color: #000;
}

/* Couverture de la brochure */
.hg-cover a {
    display: block;
}

.hg-cover img {
    display: block;
    width: 100%;
    max-width: 380px;
    height: auto;
    margin-inline: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    box-shadow: 0 50px 90px -40px rgba(255, 255, 255, 0.18);
    transform: rotate(2deg);
    transition: transform 0.8s var(--hg-ease);
}

.hg-cover a:hover img {
    transform: rotate(0deg) translateY(-6px);
}

/* Les 30 règles en couleurs (comme .gd-rules) */
.hg-rules {
    display: grid;
    grid-template-columns: repeat(30, minmax(0, 1fr));
    gap: 4px;
    margin: clamp(3rem, 6vw, 5rem) 0 0;
    padding: 0;
    list-style: none;
}

.hg-rules li {
    height: 10px;
    border-radius: 2px;
    background: var(--c);
    transform-origin: bottom;
}

@media (max-width: 991.98px) {
    .hg-cover img {
        max-width: 240px;
    }
}

@media (max-width: 575.98px) {
    .hg-btn {
        width: 100%;
    }

    .hg-rules {
        gap: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hg-btn,
    .hg-btn::before,
    .hg-btn-icon,
    .hg-cover img {
        transition: none;
    }
}
