/* ── Recipe Index ── */
.tcd-ri-wrap {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    align-items: stretch;
}

/* Sidebar */
.tcd-ri-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    background: #f7f5f4;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    min-height: 100%;
}

/* Scrollbar discret */
.tcd-ri-sidebar::-webkit-scrollbar {
    width: 4px;
}
.tcd-ri-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.tcd-ri-sidebar::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.tcd-ri-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
}

.tcd-ri-search-wrap {
    margin-bottom: 1.5rem;
}

#tcd-ri-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    background: #fff;
}

#tcd-ri-search:focus {
    border-color: #aaa;
}

/* Hint */
.tcd-ri-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #444;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.tcd-ri-hint-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Accordion */
.tcd-ri-acc-item {
    border-top: 1px solid #e0d8d8;
}

.tcd-ri-acc-item:last-of-type {
    border-bottom: 1px solid #e0d8d8;
}

.tcd-ri-acc-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: inherit;
    font-family: inherit;
}

.tcd-ri-acc-trigger:hover,
.tcd-ri-acc-trigger:focus,
.tcd-ri-acc-item:focus-within .tcd-ri-acc-trigger {
    color: inherit;
    background: none !important;
}

.tcd-ri-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.tcd-ri-acc-item.is-open .tcd-ri-chevron {
    transform: rotate(180deg);
}

.tcd-ri-acc-content {
    display: none;
    padding-bottom: 0.75rem;
    flex-direction: column;
    gap: 2px;
}

.tcd-ri-acc-item.is-open .tcd-ri-acc-content {
    display: flex;
}

.tcd-ri-pill {
    background: none;
    border: none;
    padding: 4px 0 4px 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    color: #444;
    text-align: left;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.15s;
    display: block;
    width: 100%;
}

.tcd-ri-pill:hover {
    color: #CCAFAB;
    background: none !important;
}

.tcd-ri-pill.is-active {
    color: inherit;
    background: none !important;
}

.tcd-ri-reset {
    background: none;
    border: none;
    font-size: 0.78rem;
    color: #aaa;
    cursor: pointer;
    padding: 1rem 0 0;
    font-family: inherit;
    display: block;
}

.tcd-ri-reset:hover {
    color: #333;
}

/* Main grid */
.tcd-ri-main {
    flex: 1;
    min-width: 0;
    padding: 2rem 1.5rem;
}

.tcd-ri-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.tcd-ri-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tcd-ri-img-wrap {
    overflow: hidden;
    aspect-ratio: 3/4;
    margin-bottom: 0.5rem;
    border-radius: 0;
}

.tcd-ri-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

.tcd-ri-item:hover img {
    transform: scale(1.03);
}

.tcd-ri-item h4 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    line-height: 1.4;
    margin: 0.5rem 0 0;
    color: #333;
    letter-spacing: 0.02em;
    text-transform: none !important;
    text-align: center;
}

.tcd-ri-item.is-hidden {
    display: none;
}

.tcd-ri-noresult {
    text-align: center;
    color: #999;
    padding: 3rem 0;
    grid-column: 1 / -1;
}

/* Tablet */
@media (max-width: 1024px) {
    .tcd-ri-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .tcd-ri-wrap {
        flex-direction: column;
    }
    .tcd-ri-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
        min-height: unset;
    }
    .tcd-ri-hint {
        order: -1;
    }
    .tcd-ri-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tcd-ri-item h4 {
        font-size: 0.90rem !important;
        font-weight: 700 !important;
    }
}

/* Placeholder gris foncé */
#tcd-ri-search::placeholder {
    color: #888 !important;
}
