/* ========================================
 * PAGE-ACCUEIL.CSS
 * Styles spécifiques pour la page d'accueil
 * Importe les styles des cartes depuis components/recipe-card.css
 * ======================================== */

/* Import des styles centralisés des cartes */
@import url('components/recipe-card.css');

/* ============================================
   SECTION HERO
============================================ */
.hero {
    color: white;
    text-align: center;
    padding: 60px 20px 60px;
    border-radius: 0;
    margin-bottom: 0px;
    position: relative;
    overflow: visible;
    min-height: 400px; /* Hauteur fixe pour éviter les saccades lors de l'animation initiale */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-background.loaded {
    opacity: 1;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    line-height: 1.2;
}

/* Animation pour le Hero personnalisé */
.hero h1.hero-title {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero h1.hero-title.personalized {
    /* Style optionnel pour le titre personnalisé */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Réduire l'espacement entre les deux paragraphes du hero */
.hero p:first-of-type {
    margin-bottom: 10px;
    font-weight: 500;
}

.hero p:last-of-type {
    margin-bottom: 30px;
}

/* ============================================
   HERO FEATURES - Cercles avec icônes
============================================ */
.hero-features {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0px;
    max-width: 1100px;
    margin: 50px auto 0;
    padding: 0 80px;
}

.hero-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.hero-feature-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.hero-feature-circle i {
    font-size: 1.8rem;
    color: white;
    transition: transform 0.3s ease;
}

.hero-feature-circle .hero-feature-icon-svg {
    width: 2.2rem;
    height: 2.2rem;
    color: white;
    transition: transform 0.3s ease;
}

/* Animation du cercle nutrition - remplissage de 0 à 75% */
.hero-feature-circle .hero-feature-icon-svg .nutrition-circle {
    /* Circonférence = 2 * π * 160 = 1005.31 */
    stroke-dasharray: 1005.31;
    stroke-dashoffset: 1005.31; /* 0% visible par défaut */
    transform: rotate(-90deg);
    transform-origin: center;
}

/* Animation déclenchée quand le parent a la classe visible */
.hero-feature.visible .hero-feature-circle .hero-feature-icon-svg .nutrition-circle {
    animation: fillNutritionCircle 1000ms ease-out forwards;
}

@keyframes fillNutritionCircle {
    from {
        stroke-dashoffset: 1005.31; /* 0% visible */
    }
    to {
        stroke-dashoffset: 251.33; /* 75% visible */
    }
}

/* Le hover est géré plus bas avec la couleur #FF6B6B */

.hero-feature-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    text-align: center;
    line-height: 1.2;
    min-height: 2.4em; /* Hauteur fixe pour 2 lignes - évite les saccades */
    display: flex;
    align-items: flex-start; /* Aligner en haut pour que les cercles restent alignés */
    justify-content: center;
}

/* Tooltip pour desktop (hover) - Style Tooltipster */
.hero-feature .tooltip-text {
    position: absolute;
    bottom: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #2a3334;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid var(--savoor-coral, #FF6B6B);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: 240px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* Flèche du tooltip */
.hero-feature .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--savoor-coral, #FF6B6B);
}

/* Affichage au hover (desktop) */
.hero-feature:hover .tooltip-text,
.hero-feature.tooltip-visible .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* Tooltip actif pour mobile (via JS) */
.hero-feature.tooltip-visible .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* Cercle actif quand tooltip visible ou hover */
.hero-feature.tooltip-visible .hero-feature-circle,
.hero-feature:hover .hero-feature-circle {
    background: rgba(255, 107, 107, 0.95);
    border-color: #FF6B6B;
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5), 0 3px 10px rgba(255, 107, 107, 0.3);
    transform: scale(1.1);
}

.hero-feature.tooltip-visible .hero-feature-circle i,
.hero-feature:hover .hero-feature-circle i {
    transform: scale(1.05);
}

/* Animation pour la rotation des lignes */
.hero-feature {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease, background 0.3s ease;
}

.hero-feature.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-feature.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

/* ============================================
   HERO SEARCH BOX - Barre de recherche avec onglets
============================================ */
.hero-search-box {
    max-width: 700px;
    margin: 40px auto 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: visible;
}

.dark-mode .hero-search-box {
    background: linear-gradient(135deg, #232a2e 0%, #2f2929 100%) !important;
}

/* Onglets de type de recherche */
.hero-search-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-search-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: #f0f0f0;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark-mode .hero-search-tab {
    background: #3a4550;
    color: #aaa;
}

.hero-search-tab:hover {
    background: #e0e0e0;
    color: #333;
}

.dark-mode .hero-search-tab:hover {
    background: #4a5560;
    color: #fff;
}

.hero-search-tab.active {
    background: var(--primary-color, #FF6B6B);
    color: white;
}

.hero-search-tab i {
    font-size: 1rem;
}

/* Formulaire de recherche */
.hero-search-form {
    width: 100%;
}

.hero-search-input-wrapper {
    display: flex;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #eee;
    transition: all 0.2s ease;
}

.dark-mode .hero-search-input-wrapper {
    background: #2a3540;
    border-color: #3a4550;
}

.hero-search-input-wrapper:focus-within {
    border-color: var(--primary-color, #FF6B6B);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.hero-search-input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 1.1rem;
    background: transparent;
    outline: none;
    color: #333;
}

.dark-mode .hero-search-input {
    color: #fff;
}

.hero-search-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
    font-weight: 400;
}

.dark-mode .hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.hero-search-btn {
    background: linear-gradient(135deg, var(--primary-color, #FF6B6B) 0%, #e55c5c 100%);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    min-width: 45px;
    padding: 0;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

/* Effet de pulse sur le bouton */
.hero-search-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.hero-search-btn:hover::after {
    width: 100%;
    height: 100%;
}

.hero-search-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45);
}

.hero-search-btn:active {
    transform: scale(0.95);
}

.hero-search-btn svg {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* ============================================
   HERO FILTERS - Badges et dropdowns
============================================ */
.hero-filters-container {
    margin-top: 15px;
    position: relative;
    z-index: 100;
    padding-bottom: 10px;
}

.hero-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.hero-filter-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    z-index: 10;
}

.hero-filter-badge > i:first-child {
    font-size: 0.95rem;
    color: #777;
    transition: color 0.2s ease;
}

.dark-mode .hero-filter-badge {
    background: #3a4550;
    color: #bbb;
}

.dark-mode .hero-filter-badge > i:first-child {
    color: #999;
}

.hero-filter-badge:hover {
    background: #e5e5e5;
    color: #333;
}

.hero-filter-badge:hover > i:first-child {
    color: #555;
}

.dark-mode .hero-filter-badge:hover {
    background: #4a5560;
    color: #fff;
}

.dark-mode .hero-filter-badge:hover > i:first-child {
    color: #ccc;
}

.hero-filter-badge.active {
    background: var(--primary-color, #FF6B6B);
    border-color: var(--primary-color, #FF6B6B);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.hero-filter-badge.active > i:first-child {
    color: white;
}

.dark-mode .hero-filter-badge.active {
    background: var(--primary-color, #FF6B6B);
    color: white;
}

.hero-filter-badge.open {
    background: #e0e0e0;
    z-index: 1001;
}

.dark-mode .hero-filter-badge.open {
    background: #4a5560;
}

.hero-filter-badge i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

/* Dropdown des filtres */
.hero-filter-dropdown {
    position: absolute;
    top: calc(100% + 13px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 15px;
    min-width: 320px;
    max-width: 480px;
    width: max-content;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.dark-mode .hero-filter-dropdown {
    background: #2a3540;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.hero-filter-badge.open .hero-filter-dropdown {
    opacity: 1;
    visibility: visible;
}

/* Flèche du dropdown */
.hero-filter-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: white;
    border-top: 0;
}

.dark-mode .hero-filter-dropdown::before {
    border-bottom-color: #2a3540;
}

/* Options de filtres */
.hero-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.hero-filter-options::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.hero-filter-options label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #f0f0f0;
    background: #3a3a3a;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    user-select: none;
}

.dark-mode .hero-filter-options label {
    color: #f0f0f0;
    background: #3a3a3a;
}

.hero-filter-options label:hover {
    background: #4a4a4a;
    color: #fff;
}

.dark-mode .hero-filter-options label:hover {
    background: #4a4a4a;
    color: #fff;
}

/* Cacher les inputs, garder le style */
.hero-filter-options input[type="checkbox"],
.hero-filter-options input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Style quand sélectionné - Identique à la modale de recherche.php */
.hero-filter-options label:has(input:checked),
.hero-filter-options label.selected {
    background: var(--primary-color, #FF6B6B) !important;
    color: white !important;
    border-color: var(--primary-color, #FF6B6B) !important;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.dark-mode .hero-filter-options label:has(input:checked),
.dark-mode .hero-filter-options label.selected {
    background: var(--primary-color, #FF6B6B) !important;
    color: white !important;
    border-color: var(--primary-color, #FF6B6B) !important;
}

/* Compteur de filtres actifs */
.hero-filter-badge .filter-count {
    display: none;
    background: var(--primary-color, #FF6B6B);
    color: white !important;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 4px;
    flex-shrink: 0;
    min-width: 25px;
    height: 25px;
    text-align: center;
    line-height: 1;
}

.hero-filter-badge.has-filters .filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Masquer les chevrons dans les badges de filtres */
.hero-filter-badge > i.fa-chevron-down,
.hero-filter-badge > i.fa-chevron-up {
    display: none;
}

/* Responsive filtres */
@media (max-width: 768px) {
    .hero-filters {
        gap: 6px;
    }
    
    .hero-filter-badge {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .hero-filter-badge span {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .hero-filter-dropdown {
        min-width: 280px;
        max-width: 320px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .hero-filter-dropdown::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .hero-filters-container {
        margin-top: 12px;
    }
    
    .hero-filter-badge {
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    .hero-filter-badge i {
        font-size: 0.8rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-search-box {
        margin: 30px 15px 0;
        padding: 15px;
    }
    
    .hero-search-tabs {
        gap: 6px;
    }
    
    .hero-search-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .hero-search-tab span {
        display: none;
    }
    
    .hero-search-tab i {
        margin: 0;
    }
    
    .hero-search-input {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .hero-search-btn {
        padding: 12px 18px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-search-box {
        margin: 25px 10px 0;
        padding: 12px;
        border-radius: 12px;
    }
    
    .hero-search-input-wrapper {
        border-radius: 25px;
    }
}

/* Barre de recherche dans la section Hero (ancien style - conservé pour compatibilité) */
.hero-search-container {
    position: relative;
    width: 80%;
    max-width: 600px;
    margin: 25px auto 0;
    z-index: 100;
    transition: all 0.3s ease-in-out;
}

.hero-search-container .search-input-wrapper {
    display: flex;
    background-color: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    height: 52px;
    position: relative;
}

.dark-mode .hero-search-container .search-input-wrapper {
    background-color: #444;
}

.hero-search-container .search-input-wrapper:focus-within {
    box-shadow: 0 0 8px var(--primary-color);
    border-color: transparent;
}

.hero-search-container .search-input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1.1rem;
    background: transparent;
    outline: none;
}

.dark-mode .hero-search-container .search-input {
    color: white;
}

.hero-search-container .search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.hero-search-container .search-btn:hover {
    background-color: #e55c5c;
}

/* Filtres avancés dans la section Hero */
.hero-advanced-filters {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    z-index: 99;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    transform: translateY(-10px);
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    width: 100%;
    text-align: center;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0px;
    width: 100%;
    padding: 5px 0 10px;
}

.dark-mode .hero-advanced-filters {
    background-color: var(--dark-color);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .filter-title {
    color: var(--light-color);
    border-bottom: 1px solid #444;
}

.hero-search-container:focus-within .hero-advanced-filters {
    max-height: 250px;
    opacity: 1;
    visibility: visible;
    padding: 20px 25px;
    border-color: #eee;
    transform: translateY(0);
}

.dark-mode .hero-search-container:focus-within .hero-advanced-filters {
    border-color: #444;
}

.hero-advanced-filters .filter-tag {
    padding: 10px 20px;
    background-color: #f5f5f5;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.dark-mode .hero-advanced-filters .filter-tag {
    background-color: #3a3a3a;
}

.hero-advanced-filters .filter-tag:hover {
    background-color: #ededed;
    transform: translateY(-2px);
}

.dark-mode .hero-advanced-filters .filter-tag:hover {
    background-color: #444;
}

.hero-advanced-filters .filter-tag.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
    font-weight: 600;
}

/* ============================================
   STYLES POUR LES THÈMES (GRILLE DE THÈMES)
============================================ */
.themes-section{
    margin-bottom: 60px;
}

.themes-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 25px;
}

.theme-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.dark-mode .theme-card {
    background-color: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.theme-card:hover .icon-circle {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.icon-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 1;
}

.dark-mode .icon-circle::after {
    background-color: rgba(46, 56, 58, 0.9);
}

.icon-circle svg {
    width: 60%;
    height: 60%;
    position: relative;
    z-index: 2;
}

.dark-mode .icon-circle svg path,
.dark-mode .icon-circle svg line,
.dark-mode .icon-circle svg polyline,
.dark-mode .icon-circle svg rect,
.dark-mode .icon-circle svg circle,
.dark-mode .icon-circle svg polygon {
    stroke: white;
}

.theme-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0;
}

.dark-mode .theme-name {
    color: #f0f0f0;
}

/* Gestion des thèmes cachés */
.hidden {
    display: none;
}

/* Boutons d'action */
.themes-actions {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

.themes-actions .btn {
    min-width: 160px;
    text-align: center;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 1.1rem;
}

/* États de focus pour l'accessibilité */
.theme-card:focus-within {
    outline: none;
    box-shadow: 0 0 0 2px #FF6B6B, 0 8px 16px rgba(0, 0, 0, 0.1);
}

.theme-card:focus-within .icon-circle {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

/* Couleurs des cercles - plus intenses pour un meilleur contraste */
.temps-rapide { background-color: #FF8E6E; }
.cout-economique { background-color: #F9D649; }
.nutrition-sansgluten { background-color: #33A39B; }
.difficulte-facile { background-color: #41BFB6; }
.quotidien { background-color: #5CB3E4; }
.ustensile-four { background-color: #94A3AC; }
.nutrition-proteines { background-color: #33A39B; }
.ustensile-airfryer { background-color: #94A3AC; }
.difficulte-etapes { background-color: #41BFB6; }
.occasion-fetes { background-color: #C06CCA; }
.internaute-enfants { background-color: #5CB3E4; }
.popularite-vues { background-color: #FF8E9C; }
.popularite-classiques { background-color: #FF8E9C; }
.ustensile-barbecue { background-color: #94A3AC; }
.nutrition-sanslactose { background-color: #33A39B; }
.nutrition-sanssucre { background-color: #7CCD8C; }
.nutrition-vegan { background-color: #33A39B; }
.ustensile-microondes { background-color: #94A3AC; }
.nutrition-vegetarien { background-color: #33A39B; }
.ingredient-viandes { background-color: #9CCE71; }
.couleur-fruitsrouges { background-color: #FF8E6E; }
.sans-cuisson { background-color: #41BFB6; }
.couleur-fruitsjaunes { background-color: #FF8E6E; }
.couleur-vegetaliens { background-color: #33A39B; }

/* ============================================
   INGRÉDIENTS DE SAISON
============================================ */
.seasonal-ingredients-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    margin-top: 20px;
}

.ingredient-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode .ingredient-card {
    background-color: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ingredient-img {
    height: 155px !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    padding: 5px;
    flex: 1;
}

.ingredient-img img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    object-position: center;
    transition: var(--transition);
    margin: auto;
    display: block;
}

.ingredient-card:hover .ingredient-img img {
    transform: scale(1.1);
}

.ingredient-name {
    padding: 30px 5px;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.25rem;
    margin: 0;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode .ingredient-name {
    background-color: var(--card-bg);
}

/* Hauterur ajustée pour les ingrédients de saison */
.seasonal-ingredients-grid .ingredient-card .ingredient-img {
    height: 155px !important;
    min-height: 155px !important;
    max-height: 155px !important;
}

/* ============================================
   GRILLES DE RECETTES - PAGE D'ACCUEIL
============================================ */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
    margin-top: 20px;
}

/* La hauteur des images est gérée par components/recipe-card.css */

/* ============================================
   GRILLE DE CATÉGORIES SUR PAGE D'ACCUEIL
============================================ */
.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
    margin-top: 20px;
}

.category-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dark-mode .category-card {
    background-color: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.category-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.category-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-content {
    padding: 10px 8px;
    text-align: center;
    background-color: transparent;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: inset 0 5px 6px -3px rgba(0, 0, 0, 0.3); 
}

.category-content h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark-mode .category-content h3 {
    color: white;
}

/* Couleurs des catégories */
.categories .category-card.category-Accompagnements .category-content { background: linear-gradient(to right, #6AAE7B, #4B935B); }
.categories .category-card.category-Apéritifs .category-content { background: linear-gradient(to right, #F78C50, #FABA50); }
.categories .category-card.category-Bases .category-content { background: linear-gradient(to right, #84939E, #6B7A85); }
.categories .category-card.category-Boissons .category-content { background: linear-gradient(to right, #4AA0D1, #248ABD); }
.categories .category-card.category-Desserts .category-content { background: linear-gradient(to right, #B35FBC, #C879C8); }
.categories .category-card.category-Entrées .category-content { background: linear-gradient(to right, #F05B5B, #E87A7A); }
.categories .category-card.category-Fast-Food .category-content { background: linear-gradient(to right, #F7C833, #EAA80F); }
.categories .category-card.category-Pâtisseries .category-content { background: linear-gradient(to right, #C97B61, #A65C44); }
.categories .category-card.category-Petits-Déjeuners .category-content { background: linear-gradient(to right, #E88D5A, #D96C3F); }
.categories .category-card.category-Plats .category-content { background: linear-gradient(to right, #41B3A9, #1F9088); }
.categories .category-card.category-Salades .category-content { background: linear-gradient(to right, #8DBF58, #6A9E3E); }
.categories .category-card.category-Sauces .category-content { background: linear-gradient(to right, #D9534F, #C9302C); }

/* ============================================
   BADGES DE CATÉGORIES (version compacte)
============================================ */
.categories-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background-color: var(--badge-color, #666);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

/* ============================================
   GRILLE DE CATÉGORIES HOMEPAGE (tuiles)
============================================ */
.categories-grid-home {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 15px;
}

/* États révélation progressive (6 visibles + 6 cachées via bouton "Voir plus").
   Fade-in pur (opacity uniquement). Le scale + translateY qu'on avait
   au départ provoquait un pop visuel ; ici seule l'opacité anime, donc
   rendu doux sans saut de layout. */
.category-tile-hidden {
    display: none !important;
}

.category-tile-reveal {
    display: flex !important;
    animation: categoryFadeIn 0.5s ease-out forwards;
}

@keyframes categoryFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    min-height: 70px;
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.category-tile-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.category-tile-count {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 4px;
}

/* Couleurs des catégories (mêmes que toutes-les-categories.php) */
.category-tile.category-Accompagnements { background: linear-gradient(to right, #6AAE7B, #4B935B); }
.category-tile.category-Apéritifs { background: linear-gradient(to right, #F78C50, #FABA50); }
.category-tile.category-Bases { background: linear-gradient(to right, #84939E, #6B7A85); }
.category-tile.category-Boissons { background: linear-gradient(to right, #4AA0D1, #248ABD); }
.category-tile.category-Desserts { background: linear-gradient(to right, #B35FBC, #C879C8); }
.category-tile.category-Entrées { background: linear-gradient(to right, #F05B5B, #E87A7A); }
.category-tile.category-Fast-Food { background: linear-gradient(to right, #F7C833, #EAA80F); }
.category-tile.category-Pâtisseries { background: linear-gradient(to right, #C97B61, #A65C44); }
.category-tile.category-Petits-Déjeuners { background: linear-gradient(to right, #E88D5A, #D96C3F); }
.category-tile.category-Plats { background: linear-gradient(to right, #41B3A9, #1F9088); }
.category-tile.category-Salades { background: linear-gradient(to right, #8DBF58, #6A9E3E); }
.category-tile.category-Sauces { background: linear-gradient(to right, #D9534F, #C9302C); }

.categories-actions {
    margin-top: 5px;
    margin-bottom: 30px;
}

.categories-actions .btn-outline-primary {
    display: inline-block;
    color: var(--primary-color, #FF6B6B);
    border: 2px solid var(--primary-color, #FF6B6B);
    background: transparent;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.categories-actions .btn-outline-primary:hover {
    background: var(--primary-color, #FF6B6B);
    color: white;
}

.dark-mode .categories-actions .btn-outline-primary {
    color: #FF8A8A;
    border-color: #FF8A8A;
}

.dark-mode .categories-actions .btn-outline-primary:hover {
    background: #FF8A8A;
    color: #1a1a1a;
}

/* Responsive grille catégories */
@media (max-width: 1024px) {
    .categories-grid-home {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-grid-home {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .category-tile {
        padding: 16px 12px;
        min-height: 60px;
    }
    
    .category-tile-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .categories-grid-home {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-tile {
        padding: 14px 10px;
        min-height: 55px;
    }
    
    .category-tile-title {
        font-size: 0.9rem;
    }
    
    .categories-badges {
        gap: 8px;
    }
    
    .category-badge {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* Les styles de placeholders AJAX sont dans components/recipe-card.css */
