/* Two-column recipe grid (work version): same tile in a basket and in Recettes. */
.rg-tile{position:relative;display:flex;flex-direction:column;gap:6px;min-width:0;padding:0 0 8px;border:1px solid var(--line,#c7d5d9);border-radius:16px;background:var(--surface,#fffdf9);overflow:hidden;box-sizing:border-box}
.rg-photo{position:relative;display:block;height:0;padding-top:83.333%;overflow:hidden;background:#e9eef0}
.rg-photo img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;border-radius:0!important}
.rg-open{position:absolute;left:0;right:0;top:0;height:0;padding-top:83.333%;border:0;background:none;cursor:pointer}
.rg-text{display:grid;gap:4px;padding:0 10px;min-width:0}
.rg-title{font:700 .95rem/1.2 Georgia,serif;height:2.4em;color:var(--ink,#203448);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-align:left;border:0;background:none;padding:0;width:100%;cursor:pointer}
.rg-title:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.rg-author{display:flex;align-items:center;gap:6px;height:20px;min-width:0;font:.78rem Arial,sans-serif;color:var(--muted,#5b6b78)}
.rg-author img{width:20px;height:20px;border-radius:50%;object-fit:cover;flex:none}
.rg-author span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rg-add{margin:auto 10px 0!important;min-height:36px;padding:6px 8px!important;font-size:.85rem!important;border-radius:999px!important;width:auto!important}
.rg-tile .wide-recipe-social{display:flex!important;justify-content:space-between;align-items:center;gap:0;margin:0!important;padding:2px 6px 0!important;border:0!important}
.rg-tile .wide-recipe-social button{display:inline-flex;align-items:center;gap:3px;min-width:0;min-height:32px;padding:2px 4px;border:0;background:none;color:var(--muted,#5b6b78);font:.78rem Arial,sans-serif}
.rg-tile .wide-recipe-social svg{width:17px;height:17px}
.rg-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px;align-items:stretch}
/* Recettes in « Grille »: shelves scroll sideways two tiles at a time, full lists show two columns. */
html[data-recipe-layout=grid] #main#main#main#main .catalog-grid:has(>.rg-tile){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px 10px!important;align-items:stretch!important}
html[data-recipe-layout=grid] #main#main#main#main .recipe-carousel:has(>.rg-tile){grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:calc(50% - 5px)!important;overflow-x:auto!important;scroll-snap-type:x mandatory}
html[data-recipe-layout=grid] #main#main#main#main .recipe-carousel>.rg-tile{scroll-snap-align:start}
.rg-switch{display:inline-flex;gap:4px;margin:10px 0 0;padding:4px;border:1px solid var(--line,#c7d5d9);border-radius:999px;background:var(--surface,#fffdf9)}
.rg-switch button{min-height:34px;padding:5px 14px;border:0;border-radius:999px;background:none;color:var(--ink,#203448);font:600 .9rem Arial,sans-serif;cursor:pointer}
.rg-switch button[aria-pressed=true]{background:var(--accent,#a4512c);color:#fff}
/* Computer: more, smaller tiles (about 220 px wide); phones keep two columns. */
@media(min-width:700px){
 .rg-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
 html[data-recipe-layout=grid] #main#main#main#main .catalog-grid:has(>.rg-tile){grid-template-columns:repeat(auto-fill,minmax(200px,1fr))!important}
 html[data-recipe-layout=grid] #main#main#main#main .recipe-carousel:has(>.rg-tile){grid-auto-columns:220px!important}
}
/* Author on top of the tile, clickable (opens the profile). */
.rg-tile>.rg-author{display:flex;align-items:center;gap:7px;height:36px;min-height:36px;margin:0;padding:6px 10px;border:0;background:none;color:var(--ink,#203448);font:600 .82rem Arial,sans-serif;text-align:left;cursor:pointer;box-sizing:border-box;width:100%;min-width:0}
.rg-tile>.rg-author img{width:22px;height:22px;border-radius:50%;object-fit:cover;flex:none}
.rg-tile>.rg-author span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.rg-tile>button.rg-author:hover span{text-decoration:underline}
.rg-photo .rg-open{position:absolute;inset:0;height:auto;padding:0;border:0;background:none;cursor:pointer}
/* Likes, comments, reposts: same colours as the classic cards (liked heart in the accent colour). */
.rg-tile .wide-recipe-social button{color:rgb(87,109,120)!important}
.rg-tile .wide-recipe-social .wide-recipe-like[aria-pressed=true]{color:var(--accent,#a4512c)!important}
/* Tiles as tall as the classic cards: tighter rows and a lower « Ajouter » button. */
.rg-tile{gap:4px;padding-bottom:4px}
.rg-tile>.rg-author{height:32px;min-height:32px;padding:5px 10px}
.rg-title{font-size:.92rem}
.rg-add{min-height:30px!important;height:30px;padding:3px 8px!important;font-size:.82rem!important;line-height:1!important;margin-top:2px!important}
.rg-tile .wide-recipe-social button{min-height:28px;padding:1px 4px}
.rg-tile{gap:3px}.rg-tile>.rg-author{height:29px;min-height:29px;padding:4px 10px}.rg-tile .wide-recipe-social button{min-height:26px}
/* Author line with the paid badge at its end; « Ajouter » beside the category button. */
.rg-top{display:flex;align-items:center;gap:4px;min-width:0;padding-right:8px}
.rg-top>.rg-author{flex:1;width:auto!important}
.rg-paid{flex:none;display:inline-flex}.rg-paid .sub-pill{width:24px;height:24px;min-width:24px;margin:0!important}.rg-paid .sub-pill svg{width:13px;height:13px}
.rg-actions{display:flex;align-items:center;gap:6px;margin:auto 10px 0;min-width:0}
.rg-actions .rg-add{flex:1;margin:0!important;min-width:0}
.rg-category{flex:none;display:inline-flex}
.rg-category button{width:36px!important;min-width:36px!important;height:30px!important;min-height:30px!important;padding:0!important;display:grid!important;place-items:center;border-radius:10px!important}
.rg-category button svg{width:18px;height:18px}
/* Display choice in the top bar: two icons side by side, the current one filled. */
.rg-switch-top{display:inline-flex;align-items:center;gap:2px;padding:3px;margin-right:8px;border:1px solid var(--line,#c7d5d9);border-radius:999px;background:var(--surface,#fffdf9);flex:none}
.rg-switch-top button{display:grid;place-items:center;width:38px;height:34px;padding:0;border:0;border-radius:999px;background:none;color:var(--ink,#203448);cursor:pointer}
.rg-switch-top button svg{width:20px;height:20px}
.rg-switch-top button[aria-pressed=true]{background:var(--accent,#a4512c);color:#fff}
.rg-top>.rg-author{border:0!important;background:none!important;box-shadow:none!important;border-radius:0!important;padding:4px 0 4px 10px!important;margin:0!important;height:29px!important;min-height:29px!important}
/* Category button: the classic cards' look (pale blue-grey, thin border, rounded), same height as « Ajouter ». */
.rg-category button{width:44px!important;min-width:44px!important;height:32px!important;min-height:32px!important;padding:0!important;display:grid!important;place-items:center;background:rgb(226,235,239)!important;border:1px solid rgb(190,208,216)!important;border-radius:10px!important;color:rgb(87,109,120)!important;box-shadow:none!important}
.rg-category button svg{width:18px!important;height:18px!important}
.rg-actions .rg-add{height:32px!important;min-height:32px!important}
/* 01/12/2026: the display choice sits at the end of the « Rechercher / Filtres » row; own-profile cards are wrapped. */
.catalog-search-filter-row>.rg-switch-top{margin:0 0 0 8px;padding:3px}
.catalog-search-filter-row>.rg-switch-top button{width:34px;height:34px}
.catalog-search-filter-row>.rg-switch-top button svg{width:19px;height:19px}
html[data-recipe-layout=grid] #main#main#main#main .catalog-grid:has(>.personal-card-wrap>.rg-tile){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px 10px!important;align-items:stretch!important}
html[data-recipe-layout=grid] #main .personal-card-wrap:has(>.rg-tile){position:relative;display:flex;min-width:0}
html[data-recipe-layout=grid] #main .personal-card-wrap>.rg-tile{flex:1}
@media(min-width:700px){html[data-recipe-layout=grid] #main#main#main#main .catalog-grid:has(>.personal-card-wrap>.rg-tile){grid-template-columns:repeat(auto-fill,minmax(200px,1fr))!important}}
@media(max-width:760px){.catalog-search-filter-row>.rg-switch-top{margin-left:6px;padding:2px;gap:0}.catalog-search-filter-row>.rg-switch-top button{width:30px;height:32px}.catalog-search-filter-row>.rg-switch-top button svg{width:17px;height:17px}.catalog-search-filter-row:has(>.rg-switch-top) .catalog-search-main{min-width:0;flex:1 1 auto}.catalog-search-filter-row:has(>.rg-switch-top) .catalog-filter-toggle{padding-inline:12px!important}}
/* 01/12/2026: the creator's name on the tiles in a darker ink, easier to read. */
#main .rg-tile .rg-author,#main .rg-tile .rg-author span{color:var(--ink,#203448)!important;font-weight:600!important}
html[data-recipe-layout=grid] #main#main#main#main .catalog-grid>.personal-card-wrap:has(>.rg-tile){width:auto!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:0!important;left:auto!important;transform:none!important}html[data-recipe-layout=grid] #main .personal-card-wrap:has(>.rg-tile)>.wide-recipe-tools-personal{top:40px!important;left:8px!important;right:8px!important;width:auto!important}
