/* c_recettes.css */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #FDF6F0;
    --bg-card: #FFFFFF;
    --bg-dark: #1A1A2E;
    --text-primary: #2D2D3A;
    --text-secondary: #8E8E9A;
    --text-light: #FFFFFF;
    --accent: #E85D4A;
    --accent-hover: #D14A38;
    --accent-soft: #FDEAE7;
    --border: #F0E6DF;
    --radius-sm: 5px;
    --radius-md: 5px;
    --radius-lg: 5px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', 'Segoe UI', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.r-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 246, 240, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.r-header-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.r-logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.r-logo span {
    color: var(--accent);
}

.r-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.r-header-btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ===== MAIN CONTAINER ===== */
.r-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px 100px;
}

/* ===== HERO SECTION ===== */
.r-hero {
    margin-bottom: 32px;
}

.r-hero h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.r-hero p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== CATEGORIES GRID ===== */
.r-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ===== CATEGORY CARD ===== */
.r-cat-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: block;
}

.r-cat-card:active {
    transform: scale(0.97);
}

.r-cat-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.r-cat-card:hover .r-cat-card-img {
    transform: scale(1.05);
}

.r-cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(26, 26, 46, 0.85) 0%,
        rgba(26, 26, 46, 0.3) 50%,
        rgba(26, 26, 46, 0.05) 100%
    );
}

.r-cat-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px;
}

.r-cat-card-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.r-cat-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.3;
}

/* ===== PLACEHOLDER CARD (pas d'image) ===== */
.r-cat-card--placeholder {
    background: linear-gradient(135deg, var(--accent-soft) 0%, #FFF0EB 100%);
}

.r-cat-card--placeholder .r-cat-card-overlay {
    background: linear-gradient(
        to top,
        rgba(232, 93, 74, 0.8) 0%,
        rgba(232, 93, 74, 0.1) 100%
    );
}

/* ===== LOADER ===== */
.r-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.r-loader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    margin: 0 5px;
    animation: r-bounce 1.4s ease-in-out infinite;
}

.r-loader-dot:nth-child(2) { animation-delay: 0.16s; }
.r-loader-dot:nth-child(3) { animation-delay: 0.32s; }

@keyframes r-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== EMPTY STATE ===== */
.r-empty {
    text-align: center;
    padding: 60px 20px;
}

.r-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.r-empty-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.r-empty-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== ANIMATION ENTREE ===== */
.r-fade-in {
    animation: r-fadeUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes r-fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SEARCH BAR ===== */
.r-search-bar {
    position: relative;
    margin-bottom: 28px;
}
.r-search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-card);
    outline: none;
    transition: var(--transition);
}
.r-search-input:focus {
    border-color: var(--accent);
}
.r-search-input::placeholder {
    color: var(--text-secondary);
}
.r-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.95rem;
    pointer-events: none;
    transition: var(--transition);
}
.r-search-bar:focus-within .r-search-icon {
    color: var(--accent);
}
.r-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.r-search-clear.visible {
    display: flex;
}
.r-search-clear:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* RESULTATS RECHERCHE */
.r-search-results {
    display: none;
    flex-direction: column;
    gap: 14px;
	margin-bottom:20px;
}
.r-search-results.active {
    display: flex;
}
.r-search-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* RECETTE CARDS (réutilisé depuis categorie.html) */
.r-rec-card {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}
.r-rec-card:active {
    transform: scale(0.98);
}
.r-rec-card:hover {
    border-color: var(--accent);
}
.r-rec-card-img {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--accent-soft);
}
.r-rec-card-placeholder {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.8rem;
    flex-shrink: 0;
}
.r-rec-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.r-rec-card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}
.r-rec-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.r-rec-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.r-rec-card-meta i {
    margin-right: 4px;
    color: var(--accent);
    font-size: 0.7rem;
}
.r-rec-card-badge {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
}

/* ===== FAVORIS ===== */
.r-fav-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex-shrink: 0;
}
.r-fav-btn:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.55);
}
.r-fav-btn.active {
    color: var(--accent);
    background: rgba(255,255,255,0.95);
}
.r-fav-btn.active i {
    animation: r-heartPop 0.4s ease;
}
@keyframes r-heartPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Fav sur les cards recette dans categorie/recherche */
.r-rec-card-fav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--accent-soft);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.r-rec-card-fav:hover {
    transform: scale(1.1);
}
.r-rec-card-fav.active {
    background: var(--accent);
    color: #fff;
}
.r-rec-card-fav.active i {
    animation: r-heartPop 0.4s ease;
}

/* Section favoris accueil */
.r-favs-section {
    display: none;
    margin-bottom: 32px;
}
.r-favs-section.active {
    display: block;
}
.r-favs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.r-favs-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
}
.r-favs-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.r-favs-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.r-favs-scroll::-webkit-scrollbar {
    display: none;
}
.r-favs-card {
    flex: 0 0 160px;
    scroll-snap-align: start;
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.r-favs-card:active {
    transform: scale(0.97);
}
.r-favs-card:hover {
    border-color: var(--accent);
}
.r-favs-card-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
    background: var(--accent-soft);
}
.r-favs-card-body {
    padding: 12px;
}
.r-favs-card-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.r-favs-card-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.r-favs-card-meta i {
    color: var(--accent);
    margin-right: 3px;
}

/* ===== BOUTON PARTAGE ===== */
.r-share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.r-share-btn:hover {
    background: rgba(0,0,0,0.55);
}
.r-share-btn:active {
    transform: scale(0.92);
}
.r-hero-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 10px;
}

/* TOAST NOTIFICATION */
.r-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
}
.r-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.r-toast i {
    margin-right: 8px;
    color: var(--accent);
}

/* ===== RECETTE DETAIL PAGE ===== */
.r-rec-hero {
    position: relative;
    width: calc(100% + 40px);
    margin: -24px -20px 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.r-rec-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.r-rec-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
}
.r-rec-hero-back {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}
.r-rec-hero-back:hover {
    background: rgba(0,0,0,0.55);
}
.r-rec-hero-no-img {
    width: calc(100% + 40px);
    margin: -24px -20px 0;
    height: 120px;
    background: linear-gradient(135deg, var(--accent-soft) 0%, #FFF0EB 100%);
    display: flex;
    align-items: center;
    padding: 0 20px;
}
.r-rec-header {
    padding: 24px 0 20px;
}
.r-rec-breadcrumb {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.r-rec-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}
.r-rec-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.r-rec-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}
.r-rec-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.r-rec-meta-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    text-align: center;
}
.r-rec-meta-icon {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 6px;
}
.r-rec-meta-value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.r-rec-meta-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.r-rec-cuisson {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}
.r-rec-cuisson-item {
    flex: 1;
    background: var(--bg-dark);
    color: var(--text-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    text-align: center;
}
.r-rec-cuisson-item i {
    font-size: 1rem;
    margin-bottom: 6px;
    display: block;
    color: var(--accent);
}
.r-rec-cuisson-value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
}
.r-rec-cuisson-label {
    font-size: 0.7rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}
.r-rec-section {
    margin-bottom: 28px;
}
.r-rec-section-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

/* SELECTEUR PERSONNES */
.r-pers-selector {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.r-pers-selector-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.r-pers-control {
    display: flex;
    align-items: stretch;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.r-pers-btn {
    width: 42px;
    height: 38px;
    border: none;
    background: none;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
    line-height: 1;
}
.r-pers-btn:hover {
    background: var(--accent-soft);
}
.r-pers-btn:active {
    transform: scale(0.9);
}
.r-pers-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.r-pers-btn:disabled:hover {
    background: none;
}
.r-pers-value {
    min-width: 44px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0;
    user-select: none;
    border-left: 2px solid var(--border);
    border-right: 2px solid var(--border);
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* INGREDIENTS LIST */
.r-ing-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.r-ing-item:last-child {
    border-bottom: none;
}
.r-ing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.r-ing-name {
    flex: 1;
    font-size: 0.95rem;
}
.r-ing-qty {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent);
    white-space: nowrap;
}

/* INSTRUCTIONS */
.r-instructions {
    line-height: 1.8;
    font-size: 0.95rem;
}
.r-instructions p {
    margin-bottom: 12px;
}
.r-step {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}
.r-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-light);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.r-step-text {
    flex: 1;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* NOTES */
/* ===== NOTES / ASTUCES ===== */
.r-notes {
    position: relative;
    background: #fff5c3;
    border: 1px solid #f0e4c8;
    border-radius: var(--radius-md);
    padding: 44px 20px 20px 20px;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #5a4a28;
    margin-top: 16px;
}
.r-notes-ribbon {
    position: absolute;
    top: 0;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 7px 14px;
    border-radius: 0 0 8px 8px;
}
.r-notes-icon { display: none; }
.r-notes-title { display: none; }
body.dark-mode .r-notes {
    background: #fff5c3 !important;
    border-color: #3d351e;
    color: #5a4a28 !important;
}

/* ===== DRAG & DROP ADMIN ===== */
.r-admin-card-drag {
    cursor: grab;
    padding: 8px;
    color: var(--text-secondary);
    font-size: 1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.r-admin-card-drag:active {
    cursor: grabbing;
}
.r-admin-card.dragging {
    opacity: 0.4;
    border-style: dashed;
}
.r-admin-card.drag-over {
    border-color: var(--accent);
    border-width: 2px;
    background: var(--accent-soft);
}
.r-drag-saved {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #27ae60;
    animation: r-fadeUp 0.3s ease;
}
.r-drag-saved.visible {
    display: flex;
}

/* ===== SPLASH SCREEN ===== */
.r-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.r-splash.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.r-splash-logo {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: r-splashLogo 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}
.r-splash-logo span {
    color: var(--accent);
}
.r-splash-bar {
    width: 120px;
    height: 4px;
    border-radius: 4px;
    background: var(--border);
    overflow: hidden;
    opacity: 0;
    animation: r-splashFade 0.3s ease 0.5s forwards;
}
.r-splash-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: var(--accent);
    animation: r-splashBar 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}
.r-splash-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 16px;
    opacity: 0;
    animation: r-splashFade 0.3s ease 0.4s forwards;
}

@keyframes r-splashLogo {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes r-splashFade {
    to {
        opacity: 1;
    }
}
@keyframes r-splashBar {
    to {
        width: 100%;
    }
}

/* Cacher le contenu pendant le splash */
.r-page-hidden {
    opacity: 0;
}
.r-page-reveal {
    animation: r-pageReveal 0.5s ease forwards;
}
@keyframes r-pageReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== DARK MODE ===== */
body.dark-mode {
    --bg-primary: #121218;
    --bg-card: #1C1C26;
    --bg-dark: #0A0A10;
    --text-primary: #E8E8EC;
    --text-secondary: #8888A0;
    --text-light: #FFFFFF;
    --accent: #E85D4A;
    --accent-hover: #F06E5C;
    --accent-soft: rgba(232, 93, 74, 0.15);
    --border: #2A2A3A;
}

body.dark-mode .r-header {
    background: rgba(18, 18, 24, 0.85);
    border-bottom-color: var(--border);
}

body.dark-mode .r-search-input {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border);
}
body.dark-mode .r-search-input::placeholder {
    color: var(--text-secondary);
}

body.dark-mode .r-form-input,
body.dark-mode .r-form-select,
body.dark-mode .r-form-textarea {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border);
}
body.dark-mode .r-form-input:focus,
body.dark-mode .r-form-select:focus,
body.dark-mode .r-form-textarea:focus {
    background: var(--bg-card);
    border-color: var(--accent);
}

body.dark-mode .r-badge-inactive {
    background: #2A2A3A;
    color: #666;
}

body.dark-mode .r-search-clear {
    background: var(--border);
    color: var(--text-secondary);
}

body.dark-mode .r-pers-control {
    background: var(--bg-card);
    border-color: var(--border);
}
body.dark-mode .r-pers-value {
    border-color: var(--border);
    color: var(--text-primary);
}

body.dark-mode .r-modal {
    background: var(--bg-card);
}

body.dark-mode .r-login-box {
    background: var(--bg-card);
    border-color: var(--border);
}

body.dark-mode .r-notes {
    background: rgba(232, 93, 74, 0.1);
}

body.dark-mode .r-splash {
    background: var(--bg-primary);
}

/* Toggle button */
.r-darkmode-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.r-darkmode-toggle:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ===== BOTTOM NAV MOBILE ===== */
.r-bottomnav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    transition: transform 0.3s ease;
}
.r-bottomnav.hidden {
    transform: translateY(100%);
}
@media (max-width: 600px) {
    .r-bottomnav {
        display: flex;
    }
    .r-container {
        padding-bottom: 100px;
    }
}
.r-bottomnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 4px 0;
    transition: var(--transition);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-body);
}
.r-bottomnav-item:hover,
.r-bottomnav-item.active {
    color: var(--accent);
}
.r-bottomnav-item i {
    font-size: 1.15rem;
    transition: var(--transition);
}
.r-bottomnav-item.active i {
    transform: scale(1.1);
}
.r-bottomnav-badge {
    position: relative;
}
.r-bottomnav-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.r-bottomnav-badge[data-count="0"]::after {
    display: none;
}

/* ===== SECTIONS INGREDIENTS ===== */
.r-ing-section-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    padding: 16px 0 8px;
    margin-top: 8px;
    border-top: 1px dashed var(--border);
}
.r-ing-section-title:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

/* ===== FILTRES ===== */
.r-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 20px;
}
.r-filters::-webkit-scrollbar {
    display: none;
}
.r-filter-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.r-filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.r-filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ===== MODE CUISINE ===== */
.r-cook-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent) 0%, #D14A38 100%);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 28px;
}
.r-cook-btn:hover {
    transform: scale(1.02);
}
.r-cook-btn:active {
    transform: scale(0.98);
}
.r-cook-btn i {
    font-size: 1.2rem;
}

/* OVERLAY PLEIN ECRAN */
.r-cook-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    flex-direction: column;
    overflow: hidden;
}
.r-cook-overlay.active {
    display: flex;
}
body.dark-mode .r-cook-overlay {
    background: var(--bg-primary);
}

/* HEADER CUISINE */
.r-cook-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.r-cook-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.r-cook-close:hover {
    background: var(--accent-soft);
    color: var(--accent);
}
.r-cook-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    flex: 1;
    padding: 0 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.r-cook-voice {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.r-cook-voice.active {
    background: var(--accent);
    color: #fff;
    animation: r-voicePulse 1.5s ease infinite;
}
@keyframes r-voicePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* PROGRESS BAR */
.r-cook-progress {
    height: 4px;
    background: var(--border);
    flex-shrink: 0;
}
.r-cook-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CONTENU ETAPE */
.r-cook-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    overflow-y: auto;
    text-align: center;
}
.r-cook-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.r-cook-step-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 8px;
}
.r-cook-step-text {
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--text-primary);
    max-width: 500px;
}
.r-cook-step-text.large {
    font-size: 1.5rem;
}

/* TIMER DANS ETAPE */
.r-cook-timer {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
}
.r-cook-timer.visible {
    display: flex;
}
.r-cook-timer-display {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 100px;
    text-align: center;
}
.r-cook-timer-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.r-cook-timer-btn:hover {
    background: var(--accent-hover);
}
.r-cook-timer-btn.reset {
    background: var(--border);
    color: var(--text-secondary);
}
.r-cook-timer-btn.reset:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* FOOTER NAVIGATION */
.r-cook-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    gap: 12px;
}
.r-cook-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.r-cook-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.r-cook-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.r-cook-nav-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.r-cook-nav-btn.primary:hover {
    background: var(--accent-hover);
}
.r-cook-step-counter {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* PAGE INGREDIENTS EN MODE CUISINE */
.r-cook-ingredients {
    text-align: left;
    width: 100%;
    max-width: 500px;
}
.r-cook-ingredients .r-ing-item {
    padding: 10px 0;
}
.r-cook-ingredients .r-ing-name {
    font-size: 1.05rem;
}
.r-cook-ingredients .r-ing-qty {
    font-size: 1rem;
}

/* PAGE FIN */
.r-cook-finish {
    text-align: center;
}
.r-cook-finish-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}
.r-cook-finish-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.r-cook-finish-text {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
}

/* ===== TABS INGREDIENTS / NUTRITION ===== */
.r-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.r-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.r-tab:not(:last-child) {
    border-right: 2px solid var(--border);
}
.r-tab:hover {
    color: var(--accent);
}
.r-tab.active {
    background: var(--accent);
    color: #fff;
}
.r-tab-content {
    display: none;
}
.r-tab-content.active {
    display: block;
}

/* ===== NUTRITION DISPLAY ===== */
.r-nutri-header {
    text-align: center;
    margin-bottom: 24px;
}
.r-nutri-calories {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.r-nutri-calories-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}
.r-nutri-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.r-nutri-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}
.r-nutri-card-value {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.r-nutri-card-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.r-nutri-bar {
    height: 6px;
    border-radius: 6px;
    background: var(--border);
    margin-top: 10px;
    overflow: hidden;
}
.r-nutri-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.r-nutri-bar-fill.proteines { background: #3498db; }
.r-nutri-bar-fill.lipides { background: #e67e22; }
.r-nutri-bar-fill.glucides { background: #2ecc71; }
.r-nutri-bar-fill.fibres { background: #9b59b6; }

.r-nutri-card.proteines .r-nutri-card-value { color: #3498db; }
.r-nutri-card.lipides .r-nutri-card-value { color: #e67e22; }
.r-nutri-card.glucides .r-nutri-card-value { color: #2ecc71; }
.r-nutri-card.fibres .r-nutri-card-value { color: #9b59b6; }

.r-nutri-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.r-nutri-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}
.r-nutri-per {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 16px;
    font-style: italic;
}

/* ===== RECETTE DU JOUR ===== */
.r-daily {
    display: none;
    margin-bottom: 32px;
}
.r-daily.active {
    display: block;
}
.r-daily-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.r-daily-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-light);
    display: block;
    aspect-ratio: 16 / 9;
}
.r-daily-card:active {
    transform: scale(0.98);
}
.r-daily-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.r-daily-card-noimg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, #D14A38 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.r-daily-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}
.r-daily-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
}
.r-daily-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.r-daily-card-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}
.r-daily-card-meta {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    opacity: 0.85;
}
.r-daily-card-meta i {
    margin-right: 4px;
}

/* ===== ANIMATION COEURS FAVORIS ===== */
.r-hearts-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}
.r-heart-float {
    position: absolute;
    color: var(--accent);
    font-size: 1.4rem;
    opacity: 0;
    animation: r-heartFloat 1.5s ease forwards;
    pointer-events: none;
}
@keyframes r-heartFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.5) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: translateY(-40px) scale(1.2) rotate(-15deg);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-120px) scale(1) rotate(10deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-250px) scale(0.6) rotate(-20deg);
    }
}

/* ===== HERO SLIDER RECETTE DU JOUR ===== */
.r-daily {
    display: none;
    margin-bottom: 32px;
}
.r-daily.active {
    display: block;
}
.r-daily-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.r-daily-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
}
.r-daily-dots {
    display: flex;
    gap: 8px;
}
.r-daily-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}
.r-daily-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--accent);
}

.r-daily-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}
.r-daily-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.r-daily-slide {
    flex: 0 0 100%;
    min-width: 0;
}
.r-daily-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: var(--text-light);
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.r-daily-card:active {
    opacity: 0.95;
}
.r-daily-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.r-daily-card-noimg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, #D14A38 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.r-daily-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}
.r-daily-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
}
.r-daily-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.r-daily-card-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}
.r-daily-card-meta {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    opacity: 0.85;
}
.r-daily-card-meta i {
    margin-right: 4px;
}

/* FLECHES NAV SLIDER */
.r-daily-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
    opacity: 0;
}
.r-daily-slider:hover .r-daily-arrow {
    opacity: 1;
}
.r-daily-arrow:hover {
    background: rgba(0,0,0,0.6);
}
.r-daily-arrow.prev {
    left: 10px;
}
.r-daily-arrow.next {
    right: 10px;
}
@media (max-width: 600px) {
    .r-daily-arrow {
        display: none;
    }
}

/* BARRE DE PROGRESSION AUTO */
.r-daily-progress {
    height: 3px;
    background: rgba(255,255,255,0.2);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}
.r-daily-progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: none;
}
.r-daily-progress-fill.animate {
    transition: width linear;
    width: 100%;
}

/* ===== FIX LOGO INLINE ===== */
.r-logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.r-logo span {
    color: var(--accent);
}
.r-logo-mono {
    flex-shrink: 0;
    margin-right: 10px;
}