
.recipe-rpcard {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}

.page-title {
    width: fit-content;
    max-width: 100%;
    margin-bottom: 10px;
    font-size: clamp(22px, 5.5vw, 36px);
    font-weight: bold;
    line-height: 1.2;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, .5);
    border-bottom: 1px solid #ccc;
    overflow-wrap: break-word;
}

.intro-paragraph {
    max-width: 100%;
    margin: 20px auto;
    padding: 1.3rem 1.8rem;
    border-left: 4px solid var(--rp-mc);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    line-height: 1.7;
    font-size: 1.05rem;
}

p.intro-paragraph span {
    display: block;
    margin-bottom: 10px;
}

p.intro-paragraph span:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   2. Sliders
   -------------------------------------------------------------------------- */

.rpslider-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.rpslider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}

.rpslider-title {
    position: relative;
    min-width: 0;
    font-size: clamp(19px, 3.6vw, 28px);
    font-weight: 500;
    line-height: 1.25;
    overflow-wrap: break-word;
    text-wrap: balance;
}

.rpslider-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--rp-mc);
}

.rprpslider-nav {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

.rpnav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .3s ease, transform .3s ease;
}

.rpnav-btn:hover:not(.disabled) {
    background: var(--rp-mc);
    transform: scale(1.1);
}

.rpnav-btn:hover:not(.disabled) svg {
    fill: #fff;
}

.rpnav-btn.disabled {
    opacity: .3;
    cursor: not-allowed;
    border-color: #ccc;
}

.rpnav-btn svg {
    width: 30px;
    height: 30px;
    fill: var(--rp-mc);
    transition: fill .3s ease;
}

/* Le padding vertical laisse la place au translateY(-5px) + ombre du survol,
   qui étaient auparavant rognés par overflow: hidden. */
.rpslider-wrapper {
    margin: 0 -10px;
    padding: 10px 0 20px;
    overflow: hidden;
}

.rpslider {
    display: flex;
    gap: 10px;
    padding: 0 10px;
    transition: transform .5s ease;
}

.recette-rpcard {
    flex: 0 0 280px;
    background: var(--bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
}

.recette-rpcard:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.rpcard-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.rpcard-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.recette-rpcard:hover .rpcard-image {
    transform: scale(1.1);
}

.rpcard-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: #4caf50;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.rpcard-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    cursor: pointer;
    transition: transform .3s ease;
}

.rpcard-favorite:hover {
    transform: scale(1.1);
}

.rpcard-favorite svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #666;
    stroke-width: 2;
    transition: stroke .3s ease;
}

.rpcard-favorite.active svg {
    stroke: #fff;
}

.rpcard-content {
    padding: 15px;
}

.recette-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 15px;
    font-size: 13px;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: #999;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star {
    width: 14px;
    height: 14px;
    fill: var(--rp-mc);
}

.recette-icons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.recette-icon {
    width: 18px;
    height: 18px;
    fill: #999;
}


.voirplus {
    display: flex;
    align-items: center;        
    justify-content: center;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
    padding: 8px 20px;
    border: 1px solid var(--rp-mc);
    border-radius: 6px;
    font-family: 'Roboto Condensed';
    font-size: 12px;
    text-transform: uppercase;
    text-align: center;
    fill: var(--rp-mc);
    transition: background .2s ease, color .2s ease;
}

.voirplus:hover {
    background: var(--rp-mc);
    color: #fff;
    fill: #fff;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.rlblock {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
}

/* --------------------------------------------------------------------------
   5. Onglets
   -------------------------------------------------------------------------- */

.tabs-container {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
    overflow: hidden;
}

.tabs-nav {
    display: flex;
}


.tabs-nav > * {
    flex: 1 1 auto;
    min-width: 0;
}

.tab-button {
    position: relative;
    flex: 0 0 160px;
    padding: 18px 5px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    opacity: .5;
    transition: color .3s ease, opacity .3s ease, border-color .3s ease;
}

.tab-button:hover {
    color: var(--rp-mc);
}

.tab-button.active {
    color: var(--rp-mc);
    border-bottom-color: var(--tt);
    opacity: 1;
}

.tabs-content {
    padding: 30px 10px;
}

.tab-pane {
    display: none;
    animation: fadeIn .4s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tbhd svg {
    fill: var(--tt);
}

.tbhd:hover:not(.disabled) {
    background: var(--tt);
    fill: var(--bg);
    transform: scale(1.1);
}

.nvtb {
    justify-content: end;
    margin-right: 10px;
}


.ing-bsci {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(128, 128, 128, .22);
    border-radius: 8px;
    overflow: hidden;
}

.bsci-dv {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;      
    gap: 8px 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(128, 128, 128, .16);
    font-size: 15px;
    line-height: 1.6;            
}

.bsci-dv:last-child {
    border-bottom: 0;
}

.bsci-dv > svg {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 2px;
}

.bsci-dv .bscit {
    flex: 0 0 auto;
    font-weight: 700;
    white-space: nowrap;
}

.bsci-dv p {
    flex: 1 1 240px;
    min-width: 0;
    margin: 0;
    overflow-wrap: break-word;
}

.bscit {
    font-weight: 700;
}


.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 0 0 10px;
    font-family: 'Roboto Condensed';
    font-size: clamp(21px, 4.2vw, 30px);
    line-height: 1.25;
    color: var(--rp-mc);
    text-wrap: balance;
}

.section-header h2 > svg {
    flex: 0 0 auto;
    width: clamp(24px, 4.6vw, 32px);
    height: clamp(24px, 4.6vw, 32px);
    margin-top: .12em;
}

.section-header p {
    margin: 0;
    font-size: clamp(14px, 2.6vw, 16px);
    line-height: 1.6;
    color: #666;
}


.faq-list {
    max-width: 900px;
    margin-top: 30px;
}

.faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.faq-item summary {
    padding: 20px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    list-style: none;
    cursor: pointer;
    transition: background .3s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}


.faq-item summary::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 12px;
    vertical-align: middle;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--rp-mc);
    transition: transform .3s;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item p {
    padding: 0 20px 20px;
    line-height: 1.8;
}

.faq-item a {
    color: var(--rp-mc);
    text-decoration: none;
}

.faq-item a:hover {
    text-decoration: underline;
}

::marker {
    color: var(--rp-mc);
    font-size: 18px;
}


.tips-section {
    margin: 60px 0;
    padding: 60px 40px;
    border-left: 5px solid #2fb84e;
    border-radius: 15px;
    /* Repli pour les navigateurs sans color-mix */
    background: #e8ffe3;
    color: #222;
    /* Teinte dérivée du thème : fonctionne en clair comme en sombre */
    background: color-mix(in srgb, #2fb84e 9%, var(--bg));
    color: var(--tt);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tip-card {
    padding: 30px;
    background: var(--bg);
    border: 1px solid rgba(128, 128, 128, .18);
    border-radius: 12px;
    color: var(--tt);
}

.tip-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.3em;
    line-height: 1.35;
    color: #2fb84e;
}

.tip-card p {
    margin: 0;
    line-height: 1.7;
}


.nutrition-highlight {
    margin: 60px 0;
    padding: 40px;
    border-left: 5px solid #0ea5e9;
    border-radius: 15px;
    background: #eaf6fe;
    color: #222;
    background: color-mix(in srgb, #0ea5e9 8%, var(--bg));
    color: var(--tt);
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.nutrition-item {
    padding: 20px;
    background: var(--bg);
    border: 1px solid rgba(128, 128, 128, .18);
    border-radius: 10px;
    text-align: center;
}

.nutrition-item h4 {
    margin-bottom: 10px;
    line-height: 1.35;
    color: #0ea5e9;
}

.nutrition-item p {
    margin: 0;
    line-height: 1.7;
    text-align: left;
}


.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

/* minmax en px : un minimum en % (12%) produisait ~8 colonnes de 43px
   sur un écran de 360px. */
.d-grid-items-mini {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 30px 25px;
    margin-top: 15px;
    padding: 20px;
}


.rp-mtb {
    margin: 40px 0;
    margin-left: 0;
}

.cstm-rltv {
    margin-top: 20px;
}


@media (max-width: 768px) {
    .recette-rpcard        { flex: 0 0 240px; }
    .tab-button            { flex: 0 0 140px; padding: 16px 8px; font-size: 14px; }
    .rpslider-header       { margin-bottom: 24px; }
}

@media (max-width: 640px) {
    .tabs-content          { padding: 20px 10px; }

    .tips-section          { margin: 36px 0; padding: 32px 16px; }
    .tips-grid             { gap: 18px; margin-top: 24px; }
    .tip-card              { padding: 20px; }

    .nutrition-highlight   { margin: 36px 0; padding: 24px 16px; }
    .nutrition-grid        { gap: 14px; margin-top: 20px; }
    .nutrition-item        { padding: 16px; }

    .section-header        { margin-bottom: 18px; }
    .section-header h2     { gap: 10px; }

    .bsci-dv               { padding: 12px 14px; gap: 6px 8px; font-size: 14.5px; }
    .bsci-dv > svg         { width: 20px; height: 20px; }
    .bsci-dv p             { flex: 1 1 100%; margin-left: 28px; }

    .intro-paragraph       { padding: 1rem 1.1rem; }
    .rp-mtb                { margin: 28px 0; }
    .faq-item summary      { padding: 16px; font-size: 15px; }
    .faq-item p            { padding: 0 16px 16px; }
}

@media (max-width: 480px) {
    .recette-rpcard        { flex: 0 0 200px; }
    .rpcard-image-wrapper  { height: 150px; }
    .tab-button            { flex: 0 0 118px; padding: 14px 6px; font-size: 13px; }
    .related-links         { gap: 10px; }
    .rlblock               { gap: 10px 16px; }
}

@media (max-width: 380px) {
    .bsci-dv               { padding: 10px 12px; font-size: 14px; }
    .bsci-dv p             { margin-left: 0; }
    .tips-section          { padding: 26px 14px; }
    .nutrition-highlight   { padding: 20px 14px; }
}


@media (prefers-reduced-motion: reduce) {
    .tab-pane,
    .rpslider,
    .rpcard-image,
    .recette-rpcard,
    .rpnav-btn,
    .rpcard-favorite,
    .faq-item summary::before {
        animation: none !important;
        transition: none !important;
    }

    .recette-rpcard:hover,
    .recette-rpcard:hover .rpcard-image,
    .rpnav-btn:hover:not(.disabled),
    .rpcard-favorite:hover {
        transform: none;
    }
}
