/* ========================================
 * PAGE-RECETTE-SIDEBAR.CSS
 * Styles optimisés pour la sidebar de la page recette
 * Mise à jour : harmonisation avec index.php
 * ======================================== */

/* ======================================
 * VARIABLES ET RESET
 * ====================================== */

:root {
    --star-empty-color: #dddddd;
    --star-full-color: #FFD700;
    --card-bg-light: white;
    --card-bg-dark: #232a2e;
    --text-light: #333;
    --text-dark: #f0f0f0;
    --text-secondary-light: #888;
    --text-secondary-dark: #aaa;
    --border-light: #f0f0f0;
    --border-dark: #444;
    --btn-bg-light: #f8f8f8;
    --btn-bg-dark: #333;
    --btn-border-light: #ddd;
    --btn-border-dark: #444;
    --btn-hover-light: #f0f0f0;
    --btn-hover-dark: #3a3a3a;
}

/* Reset pour éviter les conflits */
.sidebar-card-content p {
    margin: 0;
}

/* Empêche le débordement horizontal */
.sidebar-card-content {
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ======================================
 * STRUCTURE GLOBALE DE LA SIDEBAR
 * ====================================== */

.sidebar-section {
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.sidebar-card {
    border-radius: 0;
}

.sidebar-card-content {
    padding: 20px 20px 25px 20px;
}

.sidebar-title-styled {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
    position: relative;
    padding-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.dark-mode .sidebar-title-styled {
    color: #f0f0f0;
}

.sidebar-title-styled::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #ff6b6b;
}

/* ======================================
 * TAGS DE LA SIDEBAR - STYLE GLASSMORPHISM SOMBRE
 * Inspiré des badges nutritionnels mais avec couleur unique
 * ====================================== */

.tags-section {
    margin-bottom: 1.5rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* Style sobre et sombre pour les tags de la sidebar */
.sidebar-section .tag-pill,
.tags-section .tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0.3px;
    
    /* Couleur unique sobre et sombre - Gris ardoise */
    background: rgba(55, 65, 81, 0.95) !important;
    
    /* Effet glassmorphism subtil */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    
    /* Transition pour hover */
    transition: all 0.25s ease;
    cursor: default;
}

.sidebar-section .tag-pill:hover,
.tags-section .tag-pill:hover {
    background: rgba(75, 85, 99, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Mode sombre - légèrement plus clair pour contraster */
.dark-mode .sidebar-section .tag-pill,
.dark-mode .tags-section .tag-pill {
    background: rgba(75, 85, 99, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.12);
}

.dark-mode .sidebar-section .tag-pill:hover,
.dark-mode .tags-section .tag-pill:hover {
    background: rgba(107, 114, 128, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ======================================
 * SAISONNALITÉ
 * ====================================== */

.saisonnalite-section {
    margin-bottom: 2rem;
    position: relative;
}

/* Indicateur de saisonnalité */
.saisonnalite-indicator {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    background: transparent;
    position: relative;
    border: none;
    color: #333; /* Couleur fixe pour le mode clair */
}

/* Icône indicateur de saisonnalité */
.saisonnalite-indicator-icon {
    font-size: 1rem;
    line-height: 0.5;
    flex-shrink: 0;
    margin-top: 0.35rem; /* Aligner avec la première ligne du texte */
}

.saisonnalite-indicator-icon.icon-en-saison {
    color: #4CAF50;
}

.saisonnalite-indicator-icon.icon-hors-saison {
    color: #ff6b6b;
}

.dark-mode .saisonnalite-indicator {
    color: #f0f0f0; /* Couleur fixe pour le mode sombre */
}

/* Conteneur pour le texte et le bouton */
.saisonnalite-indicator-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.saisonnalite-indicator-text {
    font-weight: 500;
    color: #333; /* Couleur fixe mode clair */
    font-size: 0.9rem;
    line-height: 1.4;
}

.dark-mode .saisonnalite-indicator-text {
    color: #f0f0f0; /* Couleur fixe mode sombre */
}

/* Lien "voir détails" entre parenthèses - Style harmonisé avec nutrition */
.saisonnalite-details-link {
    color: var(--text-color-secondary, #666);
    font-size: 0.85rem;
    text-decoration: none;
    margin-left: 5px;
    opacity: 0.7;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline;
}

.saisonnalite-details-link:hover {
    color: var(--primary-color, #ff5a5f);
    opacity: 1;
    text-decoration: underline;
}

/* Badge "Plus d'infos" pour la saisonnalité - Style moderne et élégant */
.saisonnalite-details-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    margin-left: 0;
    margin-top: 12px;
    background: #FF6B6B;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.35);
    position: relative;
    overflow: hidden;
}

.saisonnalite-details-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.saisonnalite-details-badge:hover {
    background: #ff5252;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
}

.saisonnalite-details-badge:hover::before {
    left: 100%;
}

.saisonnalite-details-badge:active {
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

.saisonnalite-details-badge i {
    font-size: 0.75rem;
}

/* Mode sombre */
.dark-mode .saisonnalite-details-badge {
    background: #FF6B6B;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.dark-mode .saisonnalite-details-badge:hover {
    background: #ff5252;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.55);
}

/* Responsive - Tablettes et mobile (≤ 1024px) */
@media screen and (max-width: 1024px) {
    .saisonnalite-details-badge {
        padding: 7px 14px;
        font-size: 0.75rem;
        margin-top: 0;
        margin-left: 10px;
    }
    
    /* Aligner les 3 éléments horizontalement */
    .saisonnalite-indicator {
        align-items: center;
    }
    
    .saisonnalite-indicator-icon {
        margin-top: 0;
    }
    
    .saisonnalite-indicator-content {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }
}

/* Responsive - Mobile */
@media screen and (max-width: 768px) {
    .saisonnalite-details-badge {
        padding: 6px 12px;
        font-size: 0.72rem;
        border-radius: 16px;
    }
}

/* Responsive - Petit mobile */
@media screen and (max-width: 480px) {
    .saisonnalite-details-badge {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}

/* ======================================
 * LIGHTBOX SAISONNALITÉ - REFONTE COMPLÈTE
 * ====================================== */

/* Overlay de fond */
.saisonnalite-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    overflow: hidden;
}

.saisonnalite-lightbox-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

/* Bloquer le scroll du body tout en gardant la scrollbar visible */
html.lightbox-open {
    overflow-y: scroll !important;
}

body.lightbox-open {
    overflow: hidden !important;
    height: 100vh;
}

/* Conteneur principal de la lightbox */
.saisonnalite-lightbox {
    background: #f9fafb;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.dark-mode .saisonnalite-lightbox {
    background: var(--card-bg);
}

/* Bouton fermer - Style moderne */
.saisonnalite-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: #FF6B6B;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.saisonnalite-lightbox-close:hover {
    background: #ff5252;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.5);
}

.saisonnalite-lightbox-close:active {
    transform: scale(0.95);
}

.saisonnalite-lightbox-close svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Contenu de la lightbox */
.saisonnalite-lightbox-content {
    padding: 0;
    overflow-y: auto;
    max-height: 85vh;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar stylée pour la modale */
.saisonnalite-lightbox-content::-webkit-scrollbar {
    width: 8px;
}

.saisonnalite-lightbox-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.saisonnalite-lightbox-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.saisonnalite-lightbox-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

/* Scrollbar Firefox */
.saisonnalite-lightbox-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}

/* Scrollbar mode sombre */
.dark-mode .saisonnalite-lightbox-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .saisonnalite-lightbox-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.dark-mode .saisonnalite-lightbox-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.dark-mode .saisonnalite-lightbox-content {
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

/* Style du contenu article */
.saisonnalite-lightbox-content .article-content,
.saisonnalite-lightbox-content .mini-article-saisonnalite-content {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
}

.dark-mode .saisonnalite-lightbox-content .article-content,
.dark-mode .saisonnalite-lightbox-content .mini-article-saisonnalite-content {
    color: #e0e0e0;
}

/* Paragraphes */
.saisonnalite-lightbox-content p {
    margin: 0 0 0.8rem 0;
}

.saisonnalite-lightbox-content p:last-child {
    margin-bottom: 0;
}

/* Images dans la lightbox */
.saisonnalite-lightbox-content .article-content img,
.saisonnalite-lightbox-content .mini-article-saisonnalite-content img {
    max-height: 35vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 1rem auto;
    border-radius: 10px;
}

.saisonnalite-lightbox-content .article-image-block {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Titres dans la lightbox */
.saisonnalite-lightbox-content h2 {
    font-size: 1.15rem;
    color: #222;
    margin: 1rem 0 0.5rem 0;
}

.saisonnalite-lightbox-content h3 {
    font-size: 1.05rem;
    color: #222;
    margin: 0.8rem 0 0.4rem 0;
}

.saisonnalite-lightbox-content h4 {
    font-size: 0.95rem;
    color: #222;
    margin: 0.6rem 0 0.3rem 0;
}

.dark-mode .saisonnalite-lightbox-content h2,
.dark-mode .saisonnalite-lightbox-content h3,
.dark-mode .saisonnalite-lightbox-content h4 {
    color: #f0f0f0;
}

/* Listes dans la lightbox */
.saisonnalite-lightbox-content ul,
.saisonnalite-lightbox-content ol {
    padding-left: 1.25rem;
    margin: 0.5rem 0;
}

.saisonnalite-lightbox-content li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ======================================
 * RESPONSIVE - TABLETTES
 * ====================================== */
@media screen and (max-width: 1024px) {
    .saisonnalite-lightbox {
        width: 95%;
        max-width: 600px;
        max-height: 80vh;
    }
    
    .saisonnalite-lightbox-content {
        padding: 0 20px;
    }
    
    .saisonnalite-lightbox-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
    }
    
    .saisonnalite-lightbox-close svg {
        width: 16px;
        height: 16px;
    }
}

/* ======================================
 * RESPONSIVE - MOBILE
 * ====================================== */
@media screen and (max-width: 768px) {
    .saisonnalite-lightbox-overlay.active {
        padding: 0;
        align-items: stretch;
    }
    
    .saisonnalite-lightbox {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        animation: slideUpMobile 0.3s ease;
        display: flex;
        flex-direction: column;
    }
    
    .saisonnalite-lightbox-content {
        padding: 0;
        flex: 1;
        overflow-y: auto;
        max-height: none;
        box-sizing: border-box;
    }
    
    .saisonnalite-lightbox-close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        z-index: 10;
    }
    
    .saisonnalite-lightbox-close svg {
        width: 16px;
        height: 16px;
    }
    
    .saisonnalite-lightbox-content .article-content img,
    .saisonnalite-lightbox-content .mini-article-saisonnalite-content img {
        max-height: 28vh;
        border-radius: 8px;
        margin: 0.75rem auto;
    }
    
    .saisonnalite-lightbox-content .article-content,
    .saisonnalite-lightbox-content .mini-article-saisonnalite-content {
        font-size: 1.05rem;
        line-height: 1.8;
    }
}

/* Animation spécifique mobile (slide depuis le bas) */
@keyframes slideUpMobile {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================================
 * RESPONSIVE - PETIT MOBILE
 * ====================================== */
@media screen and (max-width: 480px) {
    .saisonnalite-lightbox-content {
        padding: 50px 16px 0 16px;
        max-height: calc(100vh - 50px);
    }
    
    .saisonnalite-lightbox-content .article-content,
    .saisonnalite-lightbox-content .mini-article-saisonnalite-content {
        font-size: 0.88rem;
        line-height: 1.55;
    }
}



.ingredients-season-group {
    margin-bottom: 1.5rem;
}

.ingredients-season-group:last-child {
    margin-bottom: 0;
}

.ingredients-season-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.ingredients-season-title.en-saison {
    color: #4CAF50;
}

.ingredients-season-title.hors-saison {
    color: #ff6b6b;
}

/* Compteur d'ingrédients */
.ingredients-count {
    font-weight: 400;
    font-size: 0.9rem;
    opacity: 0.8;
}

.ingredients-season-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

/* ======================================
 * SÉLECTEUR DE MOIS DANS LA LIGHTBOX
 * ====================================== */

.saisonnalite-month-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 4rem 24px 1rem 24px;
    margin-bottom: 10px;
}

.month-selector-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 55px;
}

.month-selector-btn.en-saison {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.3);
}

.month-selector-btn.hors-saison {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
}

.month-selector-btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.month-selector-btn.active.en-saison {
    background: #4CAF50;
    border-color: #4CAF50;
}

.month-selector-btn.active.hors-saison {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

.month-selector-btn.active .month-selector-num,
.month-selector-btn.active .month-selector-name {
    color: white;
}

.month-selector-btn:hover:not(.active) {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.month-selector-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.month-selector-name {
    font-size: 0.65rem;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Titre du mois sélectionné */
.saisonnalite-selected-month {
    text-align: center;
    padding: 10px 24px 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    margin: 0 24px 20px 24px;
}

.saisonnalite-selected-month span {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
}

/* Message de statut */
.saisonnalite-status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 15px;
}

.saisonnalite-status-message.en-saison {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
}

/* Conteneur des ingrédients - padding pour recette.php */
#ingredients-list-container {
    padding: 0 24px 3rem 24px;
}

/* Mode sombre - Sélecteur de mois */
.dark-mode .month-selector-btn {
    background: #3a3a3a;
}

.dark-mode .month-selector-btn.en-saison {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
}

.dark-mode .month-selector-btn.hors-saison {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
}

.dark-mode .month-selector-btn.active.en-saison {
    background: #4CAF50;
}

.dark-mode .month-selector-btn.active.hors-saison {
    background: #ff6b6b;
}

.dark-mode .month-selector-num {
    color: #f0f0f0;
}

.dark-mode .month-selector-name {
    color: #aaa;
}

.dark-mode .saisonnalite-selected-month {
    border-bottom-color: #444;
}

.dark-mode .saisonnalite-selected-month span {
    color: #f0f0f0;
}

.dark-mode .saisonnalite-status-message.en-saison {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
}

/* Responsive - Tablettes */
@media screen and (max-width: 768px) {
    .saisonnalite-month-selector {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        padding: 15px 15px 10px 15px;
    }
    
    .month-selector-btn {
        padding: 8px 4px;
        min-height: 50px;
        border-radius: 8px;
    }
    
    .month-selector-num {
        font-size: 1rem;
    }
    
    .month-selector-name {
        font-size: 0.6rem;
    }
    
    .saisonnalite-selected-month {
        padding: 8px 15px 15px 15px;
    }
    
    .saisonnalite-selected-month span {
        font-size: 1.2rem;
    }
    
    #ingredients-list-container {
        padding: 0 15px 20px 15px;
    }
    
    .ingredients-season-list {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.5rem;
    }
}

/* Responsive - Petit mobile */
@media screen and (max-width: 480px) {
    .saisonnalite-month-selector {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        padding: 12px 12px 8px 12px;
    }
    
    .month-selector-btn {
        padding: 6px 3px;
        min-height: 45px;
    }
    
    .month-selector-num {
        font-size: 0.9rem;
    }
    
    .month-selector-name {
        font-size: 0.55rem;
    }
    
    .saisonnalite-selected-month span {
        font-size: 1.1rem;
    }
    
    #ingredients-list-container {
        padding: 0 12px 15px 12px;
    }
}

/* Désactiver la grille UNIQUEMENT pour la lightbox de saisonnalité dans ingredient.php */
#mobile-saisonnalite-lightbox-overlay-ingredient .ingredients-season-list {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
}

.ingredient-season-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid;
    background: white;
    min-height: 52px; /* Hauteur fixe pour 2 lignes */
    box-sizing: border-box;
}

.ingredient-season-item span:last-child {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    flex: 1;
}

.ingredient-season-item.en-saison {
    border-color: #4CAF50;
    color: #2e7d32;
    background: #f1f8f4;
}

.ingredient-season-item.hors-saison {
    border-color: #ff6b6b;
    color: #c62828;
    background: #fff5f5;
}

.ingredient-icon {
    font-size: 0.85rem;
}

.current-month-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #666;
    margin-top: 1rem;
}

/* Badge sur le titre - DEPRECATED (conservé pour compatibilité) */
/*
.sidebar-title-with-badge {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.8rem;
}

.season-badge {
    padding: 0.3rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.season-badge.en-saison {
    background: #4CAF50;
    color: white;
    animation: fadeInScale 0.5s ease;
}

.season-badge.hors-saison {
    background: #ff6b6b;
    color: white;
    animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
*/

.saisonnalite-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    width: 100%;
    box-sizing: border-box;
}

.mois-item {
    padding: 0.8rem 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    background: var(--card-bg-light);
    border: 1px solid transparent;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mois-item .mois-num {
    display: block;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.mois-item .mois-nom {
    display: block;
    font-size: 0.7rem;
    text-transform: capitalize;
}

.mois-actif {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    position: relative;
}

.mois-actif.mois-courant {
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.mois-actif:not(.mois-courant) {
    opacity: 0.4;
}

.mois-inactif {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.mois-inactif.mois-courant {
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.mois-inactif:not(.mois-courant) {
    opacity: 0.4;
}

/* Mode sombre pour saisonnalité */
.dark-mode .mois-item {
    background: var(--card-bg-dark);
    border-color: var(--border-dark);
}

.dark-mode .mois-actif {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.dark-mode .mois-actif.mois-courant {
    opacity: 1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.dark-mode .mois-actif:not(.mois-courant) {
    opacity: 0.4;
}

.dark-mode .mois-inactif {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.dark-mode .mois-inactif.mois-courant {
    opacity: 1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.dark-mode .mois-inactif:not(.mois-courant) {
    opacity: 0.4;
}

.dark-mode .saisonnalite-indicator {
    background: transparent;
    border: none;
    color: #f0f0f0; /* Couleur fixe pour le mode sombre */
}

.dark-mode .saisonnalite-indicator-text {
    color: #f0f0f0; /* Couleur fixe mode sombre */
}

.dark-mode .saisonnalite-details-link {
    color: rgba(255, 255, 255, 0.5);
}

.dark-mode .saisonnalite-details-link:hover {
    color: var(--primary-color, #ff5a5f);
    opacity: 1;
}

.dark-mode .saisonnalite-lightbox {
    background: var(--card-bg);
    color: #f0f0f0;
}

.dark-mode .saisonnalite-lightbox-header {
    border-bottom-color: #444;
}

.dark-mode .saisonnalite-lightbox-close:hover {
    background: #3a3a3a;
}

.dark-mode .saisonnalite-lightbox-close svg {
    fill: #aaa;
}

.dark-mode .ingredient-season-item {
    background: #2a3334;
}

.dark-mode .ingredient-season-item.en-saison {
    border-color: #4CAF50;
    color: #81c784;
    background: rgba(76, 175, 80, 0.1);
}

.dark-mode .ingredient-season-item.hors-saison {
    border-color: #ff6b6b;
    color: #ef5350;
    background: rgba(255, 107, 107, 0.1);
}

.dark-mode .current-month-indicator {
    background: #3a3a3a;
    color: #aaa;
}

/* ======================================
 * THÈMES ASSOCIÉS
 * ====================================== */

.themes-associes-section {
    margin-bottom: 2rem;
}

.themes-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.theme-item {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.theme-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    opacity: 0.95;
}

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

.theme-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.theme-item:hover .theme-image-container img {
    transform: scale(1.05);
}

.theme-item h4 {
    padding: 1rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mode sombre pour thèmes associés */
.dark-mode .theme-item {
    background: var(--card-bg-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dark-mode .theme-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.dark-mode .theme-item h4 {
    color: var(--text-dark);
}

/* ======================================
 * RECETTES SIMILAIRES - VERSION SIMPLIFIÉE
 * ====================================== */

.recettes-similaires-section {
    margin-bottom: 2rem;
}

.recettes-list-simple {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.recette-item-simple {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recette-item-simple:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    opacity: 0.95;
}

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

.recette-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recette-item-simple:hover .recette-image-container img {
    transform: scale(1.05);
}

.recette-meta-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recette-meta-overlay .time {
    color: white;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.recette-meta-overlay .time::before {
    content: '⏱';
}

.difficulty-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.difficulty-badge.facile {
    background: #4CAF50;
    color: white;
}

.difficulty-badge.moyen {
    background: #FF9800;
    color: white;
}

.difficulty-badge.difficile {
    background: #F44336;
    color: white;
}

.recette-item-simple h4 {
    padding: 1rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mode sombre pour recettes similaires */
.dark-mode .recette-item-simple {
    background: var(--card-bg-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dark-mode .recette-item-simple:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.dark-mode .recette-item-simple h4 {
    color: var(--text-dark);
}

/* ======================================
 * SECTION AUTEUR (conservée de l'original)
 * ====================================== */

.recipe-author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-radius: 6px;
    background-color: var(--card-bg-light);
}

.author-avatar {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--card-bg-light);
    box-shadow: 0 0px 8px rgba(0, 0, 0, 0.1);
}

.author-avatar img {
    width: 80%;
    height: auto;
    object-fit: contain;
}

.author-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-prefix {
    font-weight: normal;
    color: var(--text-secondary-light);
}

.author-name {
    font-size: 0.95em;
    margin-bottom: 4px;
}

.author-name strong {
    font-weight: 600;
    color: var(--text-light);
}

.recipe-date {
    font-size: 0.8em;
    color: var(--text-secondary-light);
}

/* ======================================
 * SECTION NOTATION ET ÉTOILES (conservée)
 * ====================================== */

.recipe-rating-average {
    margin-bottom: 12px;
    padding: 12px 15px;
    background-color: var(--card-bg-light);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stars-and-rating {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-evenly;
    margin-bottom: 6px;
}

.enhanced-stars-container {
    font-size: 1.2em;
}

.star-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--star-full-color);
    line-height: 1;
    letter-spacing: 2px;
}

.star {
    font-size: 24px;
    margin: 0 2px;
    line-height: 1;
}

.star.full {
    color: var(--star-full-color);
}

.star.empty {
    color: var(--star-empty-color);
}

.star.partial {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 1;
    text-align: center;
}

.star.partial span:first-child {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: var(--star-full-color);
    height: 100%;
}

.star.partial span:last-child {
    color: var(--star-empty-color);
}

.enhanced-rating-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.enhanced-rating-value {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 0;
}

.reviews-count {
    font-size: 0.85em;
    color: var(--text-secondary-light);
    text-align: center;
    width: 100%;
    margin-top: 8px;
}

.enhanced-like-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.enhanced-like-value {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-light);
    margin-right: 8px;
}

.enhanced-like-label {
    font-size: 1em;
}

/* ======================================
 * BOUTONS D'ACTION RECETTE (conservés)
 * ====================================== */

.recipe-action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px; /* Augmenté de 8px à 12px pour plus d'espace */
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-light, #e0e0e0);
    width: 100%;
    box-sizing: border-box;
}

.btn-action-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0; /* Les 2 boutons prennent chacun 50% de l'espace */
    padding: 18px 12px; /* Augmenté de 14px 8px à 18px 12px */
    background-color: var(--btn-bg-light, #f9f9f9);
    border: 1px solid var(--btn-border-light, #eee);
    border-radius: 10px; /* Légèrement plus arrondi */
    color: var(--text-secondary-light, #555);
    font-size: 0.95rem; /* Augmenté de 0.8rem à 0.95rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease-out;
    text-align: center;
    min-height: 85px; /* Augmenté de 75px à 85px */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    width: auto;
    min-width: 0;
    max-width: none;
    gap: 10px; /* Augmenté de 8px à 10px */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.btn-action-sidebar.rate-btn {
    flex-direction: column-reverse;
}

.btn-action-sidebar .rate-btn-label {
    order: 1;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.btn-action-sidebar .rate-btn-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    order: 2;
}

.btn-action-sidebar .rate-btn-icons svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Styles spécifiques quand l'utilisateur a noté */
.btn-action-sidebar.rate-btn.user-has-rated {
    background: #fff8e1;
    border-color: rgba(255, 215, 0, 0.5);
}

.btn-action-sidebar.rate-btn.user-has-rated .rate-btn-label {
    color: #666;
    font-size: 0.95rem;
}

.btn-action-sidebar.rate-btn.user-has-rated .rate-btn-icons svg {
    fill: #FFD700;
    width: 26px;
    height: 26px;
}

.btn-action-sidebar.rate-btn.user-has-rated .user-given-rating {
    font-weight: bold;
    font-size: 1.5em;
    line-height: 1;
    color: #666;
    margin-top: 2px;
}

.btn-action-sidebar.rate-btn.user-has-rated:hover {
    background: #fff3cc;
    border-color: rgba(255, 215, 0, 0.5);
    color: #666;
}

.btn-action-sidebar.rate-btn.user-has-rated:hover svg {
    fill: #FFD700;
}

.btn-action-sidebar svg {
    width: 28px; /* Augmenté de 24px à 28px */
    height: 28px; /* Augmenté de 24px à 28px */
    fill: var(--text-secondary-light, #555);
    transition: fill 0.25s ease-out;
    margin-bottom: 0px; /* Augmenté de 4px à 6px */
}

.btn-action-sidebar:hover {
    background-color: var(--btn-hover-light, #f0f0f0);
    border-color: var(--primary-color, #ff6b6b);
    color: var(--primary-color, #ff6b6b);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-action-sidebar:hover svg {
    fill: var(--primary-color, #ff6b6b);
}

.btn-action-sidebar:active {
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ======================================
 * MODE SOMBRE
 * ====================================== */

.dark-mode .sidebar-section,
.dark-mode .sidebar-card-content,
.dark-mode .sidebar-card {
    background-color: var(--card-bg-dark);
}

.dark-mode .sidebar-section h2 {
    background-color: var(--card-bg-dark);
    color: var(--text-dark);
}

.dark-mode .sidebar-card-content > * {
    background-color: var(--card-bg-dark);
}

.dark-mode .recipe-author-info,
.dark-mode .recipe-rating-average,
.dark-mode .enhanced-quick-rating {
    background-color: var(--card-bg-dark);
}

.dark-mode .author-avatar {
    background-color: var(--card-bg-dark);
    border-color: var(--border-dark);
}

.dark-mode .author-name strong,
.dark-mode .enhanced-rating-value,
.dark-mode .enhanced-like-value {
    color: var(--text-dark);
}

.dark-mode .author-prefix,
.dark-mode .recipe-date,
.dark-mode .reviews-count,
.dark-mode .enhanced-rating-count {
    color: var(--text-secondary-dark);
}

.dark-mode .enhanced-btn {
    background-color: var(--btn-bg-dark);
    border-color: var(--btn-border-dark);
    color: var(--text-dark);
}

.dark-mode .enhanced-btn:hover {
    background-color: var(--btn-hover-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.dark-mode .star.empty {
    color: rgba(255, 255, 255, 0.3);
}

.dark-mode .enhanced-rating-title {
    color: var(--text-dark);
}

.dark-mode .recipe-action-buttons {
    border-top-color: var(--border-dark, #444);
}

.dark-mode .btn-action-sidebar {
    background-color: var(--card-bg-dark, #2a3334);
    border-color: var(--btn-border-dark, #404040);
    color: var(--text-secondary-dark, #bbb);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    gap: 8px;
}

.dark-mode .btn-action-sidebar svg {
    fill: var(--text-secondary-dark, #bbb);
}

.dark-mode .btn-action-sidebar:hover {
    background-color: var(--btn-hover-dark, #33383b);
    border-color: var(--primary-color, #ff6b6b);
    color: var(--primary-color, #ff6b6b);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.dark-mode .btn-action-sidebar:hover svg {
    fill: var(--primary-color, #ff6b6b);
}

/* Mode sombre - Bouton noté */
.dark-mode .btn-action-sidebar.rate-btn.user-has-rated {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.5);
}

.dark-mode .btn-action-sidebar.rate-btn.user-has-rated .rate-btn-label {
    color: #aaa;
}

.dark-mode .btn-action-sidebar.rate-btn.user-has-rated .user-given-rating {
    color: #FFD700;
}

.dark-mode .btn-action-sidebar.rate-btn.user-has-rated .rate-btn-icons svg {
    fill: #FFD700;
}

.dark-mode .btn-action-sidebar.rate-btn.user-has-rated:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
}

.dark-mode .btn-action-sidebar.rate-btn.user-has-rated:hover svg {
    fill: #FFD700;
}

/* ======================================
 * ANIMATIONS (sans translateY)
 * ====================================== */

.count-updated,
.rating-updated {
    animation: flash-highlight 1s ease;
}

@keyframes flash-highlight {
    0% { color: var(--star-full-color); transform: scale(1.1); }
    100% { color: inherit; transform: scale(1); }
}

@keyframes star-selected {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--star-full-color); text-shadow: 0 0 5px rgba(255, 215, 0, 0.7); }
    100% { transform: scale(1); }
}

.rating-saved label.fixed-star {
    animation: star-selected 0.5s ease-in-out;
}

@keyframes star-cleared {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.rating-cleared label.fixed-star {
    animation: star-cleared 0.5s ease-in-out;
}

/* ======================================
 * MODALE DE PARTAGE (conservée)
 * ====================================== */

.custom-share-modal {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    width: 280px;
    padding: 15px;
    font-size: 0.9rem;
    transform-origin: top center;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.custom-share-modal.visible {
    opacity: 1;
    transform: scale(1);
}

.dark-mode .custom-share-modal {
    background-color: var(--card-bg-dark, #2a3334);
    border-color: var(--border-dark, #444);
    color: var(--text-dark, #f0f0f0);
}

.custom-share-modal-content h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
}

.dark-mode .custom-share-modal-content h4 {
    color: var(--text-dark, #f0f0f0);
}

.custom-share-close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.custom-share-close-btn:hover {
    color: #333;
}

.dark-mode .custom-share-close-btn {
    color: #777;
}

.dark-mode .custom-share-close-btn:hover {
    color: #fff;
}

.custom-share-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-share-options li button,
.custom-share-options li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 5px;
    text-decoration: none;
    color: var(--text-light, #333);
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
}

.dark-mode .custom-share-options li button,
.dark-mode .custom-share-options li a {
    color: var(--text-dark, #f0f0f0);
}

.custom-share-options li button:hover,
.custom-share-options li a:hover {
    background-color: #f0f0f0;
}

.dark-mode .custom-share-options li button:hover,
.dark-mode .custom-share-options li a:hover {
    background-color: var(--btn-hover-dark, #3a3a3a);
}

.custom-share-options img {
    width: 20px;
    height: 20px;
}

.custom-share-modal-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: white;
    border: 1px solid #ddd;
    transform: rotate(45deg);
    z-index: -1;
    transition: all 0.3s ease;
}

.dark-mode .custom-share-modal-arrow {
    background-color: var(--card-bg-dark, #2a3334);
    border-color: var(--border-dark, #444);
}

.custom-share-modal-arrow.arrow-top {
    bottom: -8px;
    border-top: none;
    border-left: none;
}

.custom-share-modal-arrow.arrow-bottom {
    top: -8px;
    border-bottom: none;
    border-right: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1040;
    display: none;
}

/* ======================================
 * MEDIA QUERIES (RESPONSIVE)
 * ====================================== */

/* Écrans moyens (entre 768px et 1200px) */
@media screen and (max-width: 1200px) {
    /* Grille de saisonnalité avec colonnes égales */
    .sidebar-card-content {
        padding: 15px;
    }

    .dark-mode .sidebar-card-content {
        padding: 15px;
    }

    .saisonnalite-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
        padding: 0;
    }
    
    .mois-item {
        min-width: 0; /* Permet le rétrécissement */
        padding: 0.7rem 0.4rem;
    }
    
    .mois-item .mois-num {
        font-size: 1.05rem;
    }
    
    .mois-item .mois-nom {
        font-size: 0.65rem;
    }

    .star-rating {
        font-size: 22px;
    }

    .star {
        font-size: 22px;
    }

    .enhanced-rating-value {
        font-size: 1.2em;
    }

    /* Boutons d'action - avec seulement 2 boutons maintenant */
    .recipe-action-buttons {
        gap: 10px;
        padding: 0 5px;
        margin-top: 25px;
        padding-top: 22px;
    }

    .recipe-rating-average {
        padding: 0px;
    }

    .btn-action-sidebar .rate-btn-label {
        font-size: 0.85rem;
    }

    .btn-action-sidebar.rate-btn.user-has-rated .rate-btn-label {
        font-size: 0.85rem;
    }


    .btn-action-sidebar {
        padding: 16px 10px; /* Augmenté pour 2 boutons */
        font-size: 0.85rem; /* Un peu plus grand */
        min-height: 80px; /* Augmenté */
    }
    
    .btn-action-sidebar svg {
        width: 26px; /* Légèrement plus grand */
        height: 26px;
    }
    
    .btn-action-sidebar span {
        font-size: 0.85rem; /* Plus lisible */
    }
}


@media screen and (max-width: 480px) {
    .star {
        font-size: 16px;
    }
}


/* Sidebar masquée pour écrans ≤ 1024px */
@media screen and (max-width: 1024px) {
    /* La sidebar est masquée via display: none dans page-recette-layout.css */
    /* Les styles ci-dessous sont conservés mais commentés au cas où on voudrait les réactiver */
    
    /*
    .sidebar-section {
        margin-top: 20px;
        margin-bottom: 1.5rem;
    }
    
    .saisonnalite-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }
    
    .mois-item {
        padding: 0.6rem 0.3rem;
    }
    
    .mois-item .mois-num {
        font-size: 1rem;
    }
    
    .mois-item .mois-nom {
        font-size: 0.6rem;
    }
    
    .tags-container {
        gap: 0.4rem;
    }
    
    .tag-pill {
        padding: 0.3rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .recette-image-container {
        height: 150px;
    }
    
    .recipe-action-buttons {
        gap: 5px;
        padding: 0 3px;
        margin-top: 22px;
        padding-top: 20px;
    }
    
    .btn-action-sidebar {
        padding: 10px 5px;
        min-height: 65px;
        border-radius: 6px;
    }
    
    .btn-action-sidebar svg {
        width: 18px;
        height: 18px;
    }
    
    .btn-action-sidebar span {
        font-size: 0.65rem;
        letter-spacing: -0.3px;
    }
    */
}

/* Les styles pour mobiles ne sont plus nécessaires car la sidebar est masquée à partir de 1024px */

/* ============================================
   CARTES DE THÈMES - SIDEBAR
   Style compact avec image en fond (identique à themes.php)
============================================ */

.sidebar-themes-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-theme-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.sidebar-theme-card {
    position: relative;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1E2A3B;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.dark-mode .sidebar-theme-card {
    background-color: var(--card-bg, #1a1a2e);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.03);
}

.sidebar-theme-card:hover {
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Hover : scale sur l'image de fond uniquement (desktop) */
@media (min-width: 1025px) {
    .sidebar-theme-card:hover .sidebar-theme-card-bg {
        transform: scale(1.1);
    }
}

/* Image de fond */
.sidebar-theme-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--theme-bg-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    z-index: 0;
    transition: transform 0.3s ease;
}

/* Overlay sombre */
.sidebar-theme-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 25, 40, 0.65);
    z-index: 1;
}

/* Overlays colorés par type de thème */
.sidebar-theme-card.tag-allergenes .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(180, 60, 60, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-nutrition .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(50, 140, 65, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-temps .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(45, 110, 180, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-prix .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(180, 150, 30, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-difficulte .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(130, 45, 155, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-etapes .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(180, 100, 25, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-ustensiles .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(20, 130, 150, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-ingredients .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(100, 150, 25, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-personnes .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(219, 112, 147, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-regimes .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(46, 139, 87, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-saisons .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(210, 105, 30, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-occasions .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-regions .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(139, 90, 43, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-groupes_age .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-conditions .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(186, 85, 211, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-objectifs .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-popularite .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-recettes .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(255, 87, 51, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}
.sidebar-theme-card.tag-types_ingredients .sidebar-theme-card-overlay {
    background: linear-gradient(135deg, rgba(107, 142, 35, 0.3) 0%, rgba(10, 15, 25, 0.8) 100%);
}

/* Contenu */
.sidebar-theme-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.sidebar-theme-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* ============================================
   CARTES DE RECETTES SIMILAIRES - SIDEBAR
   Style compact avec image en fond (identique aux thèmes)
============================================ */

.sidebar-recipes-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-recipe-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Adaptation des cartes recipe-card pour la sidebar */
.sidebar-recipes-grid .recipe-card.sidebar-recipe-card {
    height: auto;
}

.sidebar-recipes-grid .recipe-card .recipe-image {
    height: 140px;
}

.sidebar-recipes-grid .recipe-card .recipe-header {
    padding: 12px 15px 15px 15px;
    min-height: auto;
}

.sidebar-recipes-grid .recipe-card .recipe-title {
    font-size: 0.95rem;
    min-height: auto;
    -webkit-line-clamp: 2;
}