/* =========================================================
   gtfhomecatalognav - Front CSS
   Adaptation visuelle du module sur l'esprit HomeBox
   sans changer la structure ni le JS.
   ========================================================= */

.gtf-hcn {
    --gtf-bg: #f7f7f5;
    --gtf-card-bg: #ffffff;
    --gtf-border: #ece8e0;
    --gtf-border-strong: #b6a27a;
    --gtf-accent: #b6a27a;
    --gtf-accent-soft: rgba(182, 162, 122, 0.08);
    --gtf-accent-soft-open: rgba(182, 162, 122, 0.06);
    --gtf-text: #2c2c2c;
    --gtf-muted: rgba(90, 90, 90, 0.78);
    --gtf-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    --gtf-shadow-hover: 0 6px 18px rgba(182, 162, 122, 0.12);
    --gtf-shadow-open: 0 10px 26px rgba(182, 162, 122, 0.16);
    --gtf-radius: 16px;

    width: 100%;
    max-width: 1780px;
    margin: 28px auto;
    padding-left: 22px;
    padding-right: 22px;
    box-sizing: border-box;
    background: transparent;
    color: var(--gtf-text);
    font-family: inherit;
}

.gtf-hcn *,
.gtf-hcn *::before,
.gtf-hcn *::after {
    box-sizing: border-box;
}

.gtf-hcn__inner {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: flex-start;
}

/* ============ Sidebar ============ */

.gtf-hcn__sidebar {
    box-sizing: border-box;
    min-width: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #e9e4db;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.gtf-hcn__sidebar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 12px;
    margin: 0;
    color: var(--gtf-muted);
    font-size: 1.02rem;
    font-weight: 550;
    letter-spacing: 0;
    opacity: 0.92;
    line-height: 1.2;
}

.gtf-hcn__sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 10px;
    background: transparent;
    color: var(--gtf-accent);
    line-height: 1;
}

.gtf-hcn__sidebar-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    max-width: 20px;
    max-height: 20px;
    flex: 0 0 auto;
}

.gtf-hcn__groups {
    list-style: none;
    margin: 0;
    padding: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gtf-hcn__group {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--gtf-radius);
    box-shadow: var(--gtf-shadow);
    overflow: hidden;
    transition: border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

/* état fermé */
.gtf-hcn__group:not(.is-active):not(.is-open) {
    background: #fff;
    border-color: #eee;
    box-shadow: var(--gtf-shadow);
}

/* hover uniquement sur fermés */
.gtf-hcn__group:not(.is-active):not(.is-open):hover {
    border-color: rgba(182, 162, 122, 0.55);
    box-shadow: var(--gtf-shadow-hover);
    background: rgba(182, 162, 122, 0.03);
}

/* état ouvert / actif */
.gtf-hcn__group.is-active,
.gtf-hcn__group.is-open {
    border-color: var(--gtf-border-strong);
    background: var(--gtf-accent-soft-open);
    box-shadow: var(--gtf-shadow-open);
}

.gtf-hcn__group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    min-height: 62px;
    padding: 14px 16px;
    margin: 0;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: #3a3a3a;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.28;
}

.gtf-hcn__group-head:hover {
    background: transparent;
}

.gtf-hcn__group.is-active > .gtf-hcn__group-head,
.gtf-hcn__group.is-open > .gtf-hcn__group-head {
    color: #222;
}

.gtf-hcn__group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    min-width: 20px;
    height: 20px;
    color: #555;
    line-height: 1;
}

.gtf-hcn__group.is-active .gtf-hcn__group-icon svg,
.gtf-hcn__group.is-open .gtf-hcn__group-icon svg {
    opacity: 0.95;
}

.gtf-hcn__group-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    max-width: 20px;
    max-height: 20px;
    flex: 0 0 auto;
}

.gtf-hcn__group-label {
    display: inline-block;
    flex: 1 1 auto;
    min-width: 0;
}

/* ============ Entrées de sous-menu ============ */

.gtf-hcn__entries {
    list-style: none;
    margin: 0;
    padding: 10px 0 15px 15px;
}

/* no-JS : toutes visibles */
.gtf-hcn--nojs .gtf-hcn__entries {
    display: block;
}

/* JS : seules celles du groupe ouvert */
.gtf-hcn--js .gtf-hcn__entries {
    display: none;
}

.gtf-hcn--js .gtf-hcn__group.is-open .gtf-hcn__entries {
    display: block;
}

.gtf-hcn__entry {
    position: relative;
    margin: 0 0 2px 0;
    padding-left: 20px;
}

.gtf-hcn__entry-link {
    display: block;
    position: relative;
    padding: 6px 14px 6px 0;
    color: #555;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.35;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.gtf-hcn__entry-link::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 5px;
    height: 5px;
    border-top: 1.5px solid var(--gtf-accent);
    border-right: 1.5px solid var(--gtf-accent);
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.gtf-hcn__entry-link:hover {
    color: var(--gtf-accent);
    text-decoration: none;
    padding-left: 5px;
    background: transparent;
}

.gtf-hcn__entry-link:hover::before {
    left: -12px;
    opacity: 1;
}

.gtf-hcn__entry-arrow {
    display: none !important;
}

.gtf-hcn__entry-label {
    display: block;
}

/* ============ Content / panels ============ */

.gtf-hcn__content {
    min-width: 0;
    position: relative;
}

.gtf-hcn--nojs .gtf-hcn__panel {
    display: block;
    margin-bottom: 30px;
}

.gtf-hcn--js .gtf-hcn__panel {
    display: none;
}

.gtf-hcn--js .gtf-hcn__panel.is-active {
    display: block;
}

.gtf-hcn__panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px 0;
    padding: 0;
}

.gtf-hcn__panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: #2b2b2b;
    font-size: 1.1rem;
    font-weight: 650;
    line-height: 1.25;
}

.gtf-hcn__panel-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 10px;
    background: var(--gtf-accent-soft);
    color: var(--gtf-accent);
    font-size: 16px;
    line-height: 1;
}

.gtf-hcn__panel-subtitle {
    flex-basis: 100%;
    margin: 0;
    color: var(--gtf-muted);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.4;
}

.gtf-hcn__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    background: #fff;
    border: 1px solid var(--gtf-border);
    border-radius: 10px;
    color: #444;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    line-height: 1;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.gtf-hcn__back:hover {
    border-color: rgba(182, 162, 122, 0.55);
    color: var(--gtf-accent);
    background: rgba(182, 162, 122, 0.03);
    box-shadow: 0 4px 12px rgba(182, 162, 122, 0.08);
}

/* ============ Cards ============ */

.gtf-hcn__cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.gtf-hcn__card-wrap {
    display: flex;
}

.gtf-hcn__card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--gtf-card-bg);
    border: 1px solid var(--gtf-border);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    text-decoration: none;
    color: var(--gtf-text);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.gtf-hcn__card:hover {
    box-shadow: 0 6px 18px rgba(182, 162, 122, 0.12);
    border-color: #B6A27A;
    text-decoration: none;
    color: var(--gtf-text);
}

.gtf-hcn__card-img {
    display: block;
    width: 100%;
    aspect-ratio: 300 / 381;
    overflow: hidden;
    background: #efe8dc;
}

.gtf-hcn__card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1) translateZ(0);
    transform-origin: center center;
    backface-visibility: hidden;
    will-change: transform;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gtf-hcn__card:hover .gtf-hcn__card-img img {
    transform: scale(1.04) translateZ(0);
}

.gtf-hcn__card-label {
    display: block;
    padding: 14px 10px 15px;
    color: #2c2c2c;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    opacity: 1;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
    transition: none;
}

.gtf-hcn__card:hover .gtf-hcn__card-label {
    color: var(--gtf-accent);
    opacity: 1;
}

.gtf-hcn__card-sub {
    display: block;
    margin-top: -10px;
    padding: 0 12px 14px;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    color: var(--gtf-muted);
}

.gtf-hcn__empty {
    padding: 22px;
    background: #fff;
    border: 1px dashed var(--gtf-border);
    border-radius: var(--gtf-radius);
    color: var(--gtf-muted);
    text-align: center;
}

/* ============ Liens globaux anti "danse" ============ */

.gtf-hcn a,
.gtf-hcn a:hover,
.gtf-hcn a:focus,
.gtf-hcn a:active {
    font-weight: inherit;
    letter-spacing: inherit;
}

/* ============ Responsive ============ */

@media (max-width: 1599px) {
    .gtf-hcn {
        max-width: 1680px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .gtf-hcn__cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1199px) {
    .gtf-hcn {
        padding-left: 18px;
        padding-right: 18px;
    }

    .gtf-hcn__inner {
        grid-template-columns: 300px 1fr;
        gap: 18px;
    }

    .gtf-hcn__cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .gtf-hcn {
        padding-left: 16px;
        padding-right: 16px;
    }

    .gtf-hcn__inner {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gtf-hcn__groups {
        padding: 8px 0 0;
    }

    .gtf-hcn__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479px) {
    .gtf-hcn {
        margin: 20px auto;
        padding-left: 12px;
        padding-right: 12px;
    }

    .gtf-hcn__sidebar {
        padding: 8px;
    }

    .gtf-hcn__sidebar-title {
        padding: 4px 6px 10px;
        font-size: 0.98rem;
    }

    .gtf-hcn__group-head {
        min-height: 58px;
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .gtf-hcn__entries {
        padding: 8px 0 12px 14px;
    }

    .gtf-hcn__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .gtf-hcn__card-label {
        padding: 12px 9px 13px;
        font-size: 0.85rem;
    }
}