/* ============================================================
   Consulter les recettes — Design Claude (galerie éditoriale)
   Préfixe .rc- pour éviter tout conflit avec EasyAdmin et les
   autres pages custom (ex. .ri- pour l'import de recette)
   ============================================================ */

.rc-wrap {
    --rc-brand:        #6366f1;
    --rc-brand-d:      #4f46e5;
    --rc-brand-soft:   #eef0fe;
    --rc-brand-tint:   rgba(99, 102, 241, .12);
    --rc-brand-2:      #8b5cf6;
    --rc-ink:          #23263a;
    --rc-mut:          #6b7080;
    --rc-faint:        #9aa0b4;
    --rc-line:         #e6e7f1;
    --rc-line-2:       #d7d9ea;
    --rc-card:         #fff;
    --rc-macro-protein:#6366f1;
    --rc-macro-carbs:  #f59e0b;
    --rc-macro-sugars: #fbbf24;
    --rc-macro-fat:    #f43f5e;
    --rc-macro-satur:  #fb7185;
    --rc-macro-fiber:  #10b981;
    --rc-macro-sodium: #64748b;

    font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: var(--rc-ink);
    font-size: 15px;
    box-sizing: border-box;
}

.rc-wrap *, .rc-wrap *::before, .rc-wrap *::after {
    box-sizing: border-box;
}

/* ════ En-tête + outils (index) ════ */
.rc-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 22px;
}
.rc-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
.rc-head p  { margin: 5px 0 0; color: var(--rc-mut); font-size: 14px; }

.rc-tools {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.rc-search {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--rc-line);
    border-radius: 11px;
    color: var(--rc-faint);
    min-width: 240px;
}
.rc-search svg { flex: none; }
.rc-search input {
    border: 0;
    background: transparent;
    outline: none;
    font: inherit;
    font-family: inherit;
    font-size: 14px;
    color: var(--rc-ink);
    width: 100%;
}
.rc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rc-chip {
    border: 1px solid var(--rc-line);
    background: #fff;
    color: var(--rc-mut);
    font: inherit;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 99px;
    cursor: pointer;
    transition: all .12s;
}
.rc-chip:hover { border-color: var(--rc-line-2); color: var(--rc-ink); }
.rc-chip.on { background: var(--rc-brand-soft); border-color: var(--rc-brand); color: var(--rc-brand-d); }

.rc-tools__actions { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.rc-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 16px;
    border-radius: 11px;
    border: 1px solid transparent;
    font: inherit;
    font-family: inherit;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .12s, border-color .12s;
}
.rc-btn--ghost { background: #fff; border-color: var(--rc-line); color: var(--rc-ink); }
.rc-btn--ghost:hover { border-color: var(--rc-line-2); background: #fafafe; }
.rc-btn--primary { background: var(--rc-brand); color: #fff; }
.rc-btn--primary:hover { background: var(--rc-brand-d); }

/* ════ Popins (saisie rapide) ════ */
.rc-modal-scrim {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(35, 38, 58, .45);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.rc-modal-scrim[hidden] { display: none; }
.rc-modal {
    position: relative;
    width: min(520px, 100%);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(20, 20, 45, .28);
    padding: 26px;
}
.rc-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 99px;
    border: 1px solid var(--rc-line);
    background: #fff;
    color: var(--rc-mut);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.rc-modal__close:hover { background: #fafafe; color: var(--rc-ink); }
.rc-modal__title { margin: 0 0 8px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.rc-modal__help { margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--rc-mut); }
.rc-modal__ta {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--rc-line);
    border-radius: 11px;
    padding: 12px 14px;
    font: inherit;
    font-family: inherit;
    font-size: 14px;
    color: var(--rc-ink);
    outline: none;
    box-sizing: border-box;
}
.rc-modal__ta:focus { border-color: var(--rc-brand); box-shadow: 0 0 0 3px var(--rc-brand-tint); }
.rc-modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.rc-modal--wide { width: min(760px, 100%); max-height: 85vh; overflow-y: auto; }
.rc-stock-search { display: flex; gap: 10px; margin-bottom: 16px; }
.rc-stock-search__input {
    flex: 1;
    border: 1px solid var(--rc-line);
    border-radius: 11px;
    padding: 0 14px;
    height: 42px;
    font: inherit;
    font-family: inherit;
    font-size: 14px;
    color: var(--rc-ink);
    outline: none;
    box-sizing: border-box;
}
.rc-stock-search__input:focus { border-color: var(--rc-brand); box-shadow: 0 0 0 3px var(--rc-brand-tint); }
.rc-stock-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rc-stock-empty, .rc-stock-error { grid-column: 1 / -1; padding: 30px 10px; text-align: center; color: var(--rc-mut); font-size: 13.5px; }
.rc-stock-error { color: #dc2626; }
.rc-stock-item {
    position: relative;
    border: 0;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: var(--rc-line-2, #eee);
}
.rc-stock-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .15s; }
.rc-stock-item:hover img { transform: scale(1.05); }
.rc-stock-item:hover::after {
    content: 'Choisir cette photo';
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 45, .55);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
}
.rc-stock-credit {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3px 6px;
    font-size: 10px;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent);
    text-align: left;
}
.rc-stock-item.is-loading { opacity: .5; pointer-events: none; }

@media (max-width: 640px) {
    .rc-stock-results { grid-template-columns: repeat(2, 1fr); }
}

.rc-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--rc-mut);
    border: 1px dashed var(--rc-line-2);
    border-radius: 14px;
}
.rc-empty p { margin: 0; font-size: 14.5px; }

/* ════ Bascule "Mes recettes" / "Toute la base" ════ */
.rc-scope-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #f1f1f7;
    border-radius: 11px;
    margin-bottom: 20px;
}
.rc-scope-tab {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--rc-mut);
    text-decoration: none;
    transition: all .12s;
}
.rc-scope-tab:hover { color: var(--rc-ink); }
.rc-scope-tab.on { background: #fff; color: var(--rc-brand-d); box-shadow: 0 1px 3px rgba(40, 40, 90, .1); }

/* ════ Grille de cartes ════ */
.rc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.rc-card-wrap { position: relative; }
.rc-fav-form { position: absolute; top: 12px; right: 12px; z-index: 1; }
.rc-fav-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, .92);
    color: #41465c;
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: color .12s, transform .1s;
}
.rc-fav-btn:hover { transform: scale(1.08); }
.rc-fav-btn.on { color: #e11d48; }
.rc-del-btn:hover { color: #dc2626; }
.rc-owner { margin: -4px 0 0; font-size: 12px; font-weight: 600; color: var(--rc-faint); }
.rc-card {
    background: var(--rc-card);
    border: 1px solid var(--rc-line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform .14s, box-shadow .14s;
}
.rc-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(40, 40, 90, .12); }

.rc-thumb {
    height: 172px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rc-thumb-hi {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 18% 12%, rgba(255, 255, 255, .32), transparent 55%);
}
.rc-thumb svg { width: 34%; height: 34%; color: #fff; opacity: .92; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .18)); }
.rc-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .92);
    font-size: 11.5px;
    font-weight: 800;
    color: #41465c;
    backdrop-filter: blur(4px);
}

.rc-card .bd {
    padding: 15px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}
.rc-card h3 { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.rc-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rc-mut);
}
.rc-meta svg { color: var(--rc-faint); flex: none; }
.rc-metarow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.rc-tag {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    white-space: nowrap;
}
.rc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 11px;
    border-top: 1px solid #f1f1f7;
}
.rc-kcal { font-size: 13px; font-weight: 800; color: var(--rc-brand-d); }
.rc-kcal span { color: var(--rc-faint); font-weight: 600; font-size: 11.5px; }

/* ════ Détail ════ */
.rc-d-hero {
    position: relative;
    height: 300px;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 24px;
}
.rc-d-hero .ov { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, .05) 60%); }
.rc-d-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; }
.rc-d-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 15px;
    border-radius: 11px;
    border: 0;
    background: rgba(255, 255, 255, .95);
    color: var(--rc-ink);
    font: inherit;
    font-family: inherit;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(6px);
}
.rc-d-cap { position: absolute; left: 26px; right: 26px; bottom: 22px; color: #fff; }
.rc-d-over { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
/* color: #fff explicite obligatoire — Bootstrap (via EasyAdmin) définit
   `h1,h2,h3,h4,h5,h6{color:var(--bs-heading-color)}` (gris/noir) sur l'élément
   nu ; une déclaration explicite gagne toujours sur une couleur héritée de
   `.rc-d-cap`, même avec une spécificité plus faible, donc sans cette ligne
   le titre reste noir sur le fond dégradé. */
.rc-d-cap h1 { margin: 6px 0 12px; font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.rc-d-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.rc-d-chips > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.rc-serv-btn {
    border: 0; background: rgba(255, 255, 255, .25); color: #fff; width: 18px; height: 18px;
    border-radius: 50%; font-weight: 800; font-size: 12px; line-height: 1; cursor: pointer;
    display: grid; place-items: center; padding: 0; font-family: inherit;
}
.rc-serv-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .4); }
.rc-serv-btn:disabled { opacity: .4; cursor: not-allowed; }

.rc-d-body { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.rc-d-body--full { grid-template-columns: 1fr; }
.rc-sec { margin-bottom: 28px; }
.rc-sec-t {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--rc-brand-d);
    margin: 0 0 16px;
}
.rc-sec-t--between { justify-content: space-between; text-transform: none; }
.rc-sec-t-label { display: inline-flex; align-items: center; gap: 9px; }
.rc-ing-count { color: var(--rc-faint); font-weight: 700; letter-spacing: 0; }
.rc-tags-row { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 24px; }
.rc-tags-row .rc-tag { font-size: 12px; padding: 5px 12px; }

.rc-tabs { display: flex; gap: 4px; padding: 4px; background: #f1f1f7; border-radius: 12px; margin-bottom: 22px; }
.rc-tab {
    flex: 1;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font: inherit;
    font-family: inherit;
    font-weight: 700;
    font-size: 13.5px;
    color: var(--rc-mut);
    padding: 10px 0;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.rc-tab:hover { color: var(--rc-ink); }
.rc-tab.on { background: #fff; color: var(--rc-ink); box-shadow: 0 1px 4px rgba(40, 40, 90, .12); }

/* aperçu (bento) */
.rc-bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 28px; }
.rc-bento-tile { background: #f7f7fb; border-radius: 16px; padding: 16px; }
.rc-bento-tile b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.rc-bento-tile span { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--rc-mut); }
.rc-bento-tile--accent { background: var(--rc-brand-soft); }
.rc-bento-tile--accent b { color: var(--rc-brand-d); }

.rc-steps { display: flex; flex-direction: column; gap: 12px; }
.rc-step { display: flex; gap: 14px; align-items: flex-start; padding: 15px 16px; border: 1px solid var(--rc-line); border-radius: 13px; background: #fff; }
.rc-step .n { flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--rc-brand-soft); color: var(--rc-brand-d); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.rc-step p { margin: 0; font-size: 14.5px; line-height: 1.55; }

/* résumé diététique */
.rc-diet { border: 1px solid var(--rc-line); border-radius: 16px; background: #fff; padding: 22px; box-shadow: 0 1px 2px rgba(40, 40, 90, .03); }
.rc-diet-top { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid #f1f1f7; }
.rc-diet-donut { display: flex; align-items: center; gap: 20px; }
.rc-diet-note { margin: 12px 0 0; font-size: 13.5px; color: var(--rc-mut); line-height: 1.5; }
.rc-diet-sub { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--rc-faint); margin: 24px 0 14px; }

.rc-donut { position: relative; flex: none; }
.rc-donut .ctr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.rc-donut .ctr b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.rc-donut .ctr small { font-size: 10px; font-weight: 700; color: var(--rc-faint); text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }

.rc-leg { display: flex; flex-direction: column; gap: 8px; }
.rc-leg .it { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--rc-mut); }
.rc-leg .sw { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.rc-leg .g { margin-left: auto; font-weight: 800; color: var(--rc-ink); font-variant-numeric: tabular-nums; }

.rc-bars { display: flex; flex-direction: column; gap: 13px; }
.rc-bar .top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.rc-bar .nm { font-size: 13.5px; font-weight: 700; color: var(--rc-ink); }
.rc-bar .nm em { font-style: normal; font-weight: 600; color: var(--rc-faint); font-size: 12px; margin-left: 5px; }
.rc-bar .vl { font-size: 12.5px; font-weight: 700; color: var(--rc-mut); font-variant-numeric: tabular-nums; }
.rc-bar .vl span { color: var(--rc-faint); font-weight: 600; margin-left: 6px; }
.rc-bar .track { height: 8px; border-radius: 99px; background: #eef0f4; overflow: hidden; }
.rc-bar .track i { display: block; height: 100%; border-radius: 99px; }
.rc-bar.sub .nm { font-weight: 600; color: var(--rc-mut); font-size: 12.5px; }
.rc-bar.sub .track { height: 6px; }

.rc-brk { display: flex; flex-direction: column; gap: 9px; }
.rc-brk .row { display: grid; grid-template-columns: 1fr 120px 70px; align-items: center; gap: 12px; }
.rc-brk .nm { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--rc-ink); min-width: 0; }
.rc-brk .nm .q { color: var(--rc-faint); font-weight: 600; font-size: 12px; white-space: nowrap; }
.rc-brk .track { height: 7px; border-radius: 99px; background: #eef0f4; overflow: hidden; }
.rc-brk .track i { display: block; height: 100%; border-radius: 99px; background: var(--rc-brand); }
.rc-brk .kc { text-align: right; font-size: 12.5px; font-weight: 700; color: var(--rc-mut); font-variant-numeric: tabular-nums; }

/* aside */
.rc-aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 14px; }
.rc-panel { border: 1px solid var(--rc-line); border-radius: 16px; background: #fff; padding: 20px; }
.rc-panel h4 { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--rc-brand-d); display: flex; align-items: center; gap: 8px; }
.rc-panel h4 .sp { margin-left: auto; color: var(--rc-faint); font-weight: 700; text-transform: none; letter-spacing: 0; }
.rc-ings { display: flex; flex-direction: column; }
.rc-ing {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 4px;
    border: 0;
    border-bottom: 1px solid #f4f4fa;
    background: transparent;
    font: inherit;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.rc-ing:last-child { border-bottom: 0; }
.rc-ing-check {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--rc-line-2);
    color: #fff;
    font-size: 11px;
    display: grid;
    place-items: center;
}
.rc-ing.on .rc-ing-check { background: var(--rc-brand); border-color: var(--rc-brand); }
.rc-ing.on .rc-ing-check::after { content: '✓'; }
.rc-ing b { flex: 1; font-weight: 600; color: var(--rc-ink); }
.rc-ing.on b { color: var(--rc-mut); text-decoration: line-through; font-weight: 500; }
.rc-ing span[data-rc-ing-qty] { color: var(--rc-mut); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-apps { display: flex; gap: 8px; flex-wrap: wrap; }
.rc-app { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; background: #f3f3fa; font-size: 13px; font-weight: 600; color: #41465c; }
.rc-links { display: flex; flex-direction: column; gap: 8px; }
.rc-links a { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--rc-brand-d); text-decoration: none; }
.rc-links a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
    .rc-grid { grid-template-columns: repeat(2, 1fr); }
    .rc-d-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .rc-grid { grid-template-columns: 1fr; }
}
