/**
 * 🍳 Recipe Styles - Styles spécifiques aux recettes
 * Styles pour l'affichage et la mise en forme des recettes
 */

/* ===== NOUVELLE STRUCTURE AVEC INGRÉDIENTS EN SIDEBAR ===== */
.recipe-content-with-ingredients {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.recipe-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ===== CONTRÔLES COMPACTS DANS LA SIDEBAR ===== */
.sidebar-controls {
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    border: 2px solid var(--primary-200);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.portion-controls-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--primary-200);
}

.portion-btn-compact {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portion-btn-compact:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.portion-btn-compact:active {
    transform: scale(0.95);
}

.portion-display-compact {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 600;
}

.current-number-compact {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-600);
    min-width: 24px;
    text-align: center;
}

.portion-label-compact {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.cooking-tools-compact {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.tool-btn-compact {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.tool-btn-compact:hover {
    background: var(--primary-100);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.tool-icon-compact {
    font-size: 1.2rem;
}

.tool-btn-compact.has-notes {
    background: var(--primary-100);
    border-color: var(--primary-300);
    position: relative;
}

.tool-btn-compact.has-notes::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--primary-500);
    border-radius: 50%;
    border: 2px solid white;
}

.tool-btn-compact.site-tool {
    background: var(--secondary-100);
    border-color: var(--secondary-300);
}

.tool-btn-compact.site-tool:hover {
    background: var(--secondary-200);
    border-color: var(--secondary-400);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.tool-btn-compact.favorite-tool {
    background: var(--surface-light);
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.tool-btn-compact.favorite-tool:hover {
    background: var(--error-50);
    border-color: var(--error-200);
    color: var(--error-600);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.tool-btn-compact.favorite-tool.active {
    background: var(--error-100);
    border-color: var(--error-300);
    color: var(--error-600);
}

.tool-btn-compact.favorite-tool.active:hover {
    background: var(--error-200);
    border-color: var(--error-400);
    color: var(--error-700);
}

/* Métadonnées condensées (maintenant dans la sidebar) */
.recipe-metadata-compact {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--surface-warm);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    border: 1px solid var(--secondary-200);
    box-shadow: var(--shadow-sm);
}

.recipe-image-compact {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.recipe-image-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.recipe-image-compact img:hover {
    transform: scale(1.1);
}

.recipe-info-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.info-item {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.tags-compact {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    margin-top: var(--space-xs);
}

.tag-compact {
    background: var(--primary-100);
    color: var(--primary-700);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border: 1px solid var(--primary-200);
}

.share-compact {
    flex-shrink: 0;
}

.share-btn-compact {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary-500);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn-compact:hover {
    background: var(--primary-600);
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Instructions dans le contenu principal */
.instructions-main {
    background: linear-gradient(135deg, var(--secondary-50) 0%, white 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    border-left: 6px solid var(--secondary-500);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-lg);
}

.instructions-main h3:first-child {
    margin-top: 0;
}

.instructions-main h3 {
    color: var(--text-primary);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    margin-top: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--secondary-200);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Ingrédients en sidebar */
.ingredients-section-sidebar {
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    border: 2px solid var(--primary-200);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.ingredients-section-sidebar h4 {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--primary-200);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.ingredients-list-compact {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.ingredient-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm);
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-100);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.ingredient-compact:hover {
    background: var(--primary-50);
    transform: translateX(var(--space-xs));
    box-shadow: var(--shadow-md);
}

.ingredient-name-compact {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    text-transform: capitalize;
}

.quantity-compact {
    font-weight: 700;
    color: var(--primary-700);
    background: var(--primary-100);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    min-width: 60px;
    text-align: center;
    border: 1px solid var(--primary-200);
}

/* ===== STYLES RECETTE ACTIVE (ANCIENS) ===== */
.recipe-main-image {
    margin-bottom: var(--space-lg);
    text-align: center;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.recipe-main-image img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.recipe-main-image img:hover {
    transform: scale(1.05);
}

.recipe-metadata {
    background: var(--surface-warm);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--primary-200);
}

.recipe-metadata p {
    margin-bottom: var(--space-md);
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.recipe-metadata p:last-child {
    margin-bottom: 0;
}

/* ===== SECTION INGRÉDIENTS ===== */
.ingredients-section {
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
    border-radius: var(--radius-2xl);
    padding: 0 var(--space-xl) var(--space-xl);
    margin: var(--space-2xl) 0;
    border-left: 6px solid var(--primary-500);
    box-shadow: var(--shadow-lg);
}

.ingredients-section h3 {
    color: var(--text-primary);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--primary-200);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.ingredient {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-sm);
    margin-bottom: var(--space-sm);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary-100);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.ingredient:hover {
    background: var(--primary-50);
    transform: translateX(var(--space-sm));
    box-shadow: var(--shadow-md);
}

.ingredient:last-child {
    margin-bottom: 0;
}

.ingredient-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    text-transform: capitalize;
}

.quantity {
    font-weight: 700;
    color: var(--primary-700);
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-200) 100%);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    min-width: 80px;
    text-align: center;
    border: 1px solid var(--primary-300);
    box-shadow: var(--shadow-sm);
}

/* ===== SECTION INSTRUCTIONS ===== */
.instructions {
    background: linear-gradient(135deg, var(--secondary-50) 0%, white 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    border-left: 6px solid var(--secondary-500);
    white-space: pre-line;
    line-height: 1.6;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    margin: var(--space-lg) 0;
}

.instructions h3 {
    color: var(--text-primary);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xl);
    margin-top: 0;
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--secondary-200);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.instructions h4 {
    color: var(--secondary-700);
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: var(--space-xl) 0 var(--space-lg) 0;
}

.instructions p {
    margin-bottom: var(--space-lg);
}

.instructions ol,
.instructions ul {
    margin: var(--space-lg) 0;
    padding-left: var(--space-2xl);
}

.instructions li {
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.instructions strong {
    color: var(--secondary-700);
    font-weight: 700;
}

.instructions em {
    color: var(--secondary-600);
    font-style: italic;
}

/* ===== RESPONSIVE POUR NOUVELLE STRUCTURE ===== */
@media (max-width: 1024px) {
    .recipe-content-with-ingredients {
        grid-template-columns: 1fr 250px;
        gap: var(--space-lg);
    }

    .ingredients-section-sidebar {
        padding: var(--space-md);
        max-height: 350px;
    }

    .instructions-main {
        padding: var(--space-lg);
    }

    .ingredient-name-compact {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 768px) {
    .recipe-content-with-ingredients {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .recipe-metadata-compact {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
        text-align: center;
    }

    .recipe-image-compact {
        width: 60px;
        height: 60px;
        align-self: center;
    }

    .recipe-info-compact {
        align-items: center;
    }

    .tags-compact {
        justify-content: center;
    }

    .share-compact {
        align-self: center;
    }

    .recipe-sidebar-right {
        order: -1;
        /* Sidebar en premier sur mobile */
    }

    .ingredients-section-sidebar {
        max-height: none;
    }

    .instructions-main {
        padding: var(--space-lg);
        margin-bottom: 0;
    }

    .instructions-main h3 {
        font-size: var(--font-size-xl);
    }

    .ingredients-list-compact {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-sm);
    }

    .ingredient-compact {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: var(--space-xs);
    }

    .quantity-compact {
        align-self: center;
        min-width: 80px;
    }
}

/* ===== RESPONSIVE POUR RECETTES (ANCIENS STYLES) ===== */
@media (max-width: 768px) {
    .recipe-metadata {
        padding: var(--space-lg);
    }

    .ingredients-section,
    .instructions {
        padding: var(--space-lg);
        margin: var(--space-lg) 0;
    }

    .ingredient {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .quantity {
        align-self: flex-end;
        min-width: 60px;
    }

    .recipe-main-image img {
        max-height: 250px;
    }

    .ingredients-section h3,
    .instructions h3 {
        font-size: var(--font-size-xl);
    }

    .ingredient-name {
        font-size: var(--font-size-base);
    }

    .instructions {
        font-size: var(--font-size-base);
    }
}

@media (max-width: 480px) {
    .recipe-metadata-compact {
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .recipe-image-compact {
        width: 50px;
        height: 50px;
    }

    .info-item {
        font-size: var(--font-size-xs);
    }

    .tag-compact {
        font-size: 10px;
        padding: 2px var(--space-xs);
    }

    .share-btn-compact {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .ingredients-section-sidebar {
        padding: var(--space-sm);
        border-width: 1px;
    }

    .ingredients-section-sidebar h4 {
        font-size: var(--font-size-base);
        margin-bottom: var(--space-sm);
    }

    .ingredients-list-compact {
        grid-template-columns: 1fr;
    }

    .ingredient-compact {
        padding: var(--space-xs);
    }

    .ingredient-name-compact {
        font-size: var(--font-size-xs);
    }

    .quantity-compact {
        font-size: 10px;
        padding: 2px var(--space-xs);
        min-width: 50px;
    }

    /* Anciens styles */
    .recipe-metadata p {
        font-size: var(--font-size-base);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .ingredient {
        padding: var(--space-sm);
    }

    .ingredients-section,
    .instructions {
        padding: var(--space-md);
        border-left-width: 4px;
    }

    .quantity {
        font-size: var(--font-size-sm);
        padding: var(--space-xs) var(--space-md);
    }
}

/* ===== ANIMATIONS POUR RECETTES ===== */
@keyframes ingredientSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes recipeContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animations pour la nouvelle structure */
.instructions-main {
    animation: recipeContentFadeIn 0.5s ease-out;
}

.ingredients-section-sidebar {
    animation: slideInFromRight 0.6s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.recipe-metadata-compact {
    animation: slideInFromRight 0.7s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.ingredient-compact {
    animation: ingredientSlideIn 0.4s ease-out;
    animation-delay: calc(var(--ingredient-index, 0) * 0.05s);
    animation-fill-mode: both;
}

/* Anciens styles d'animation */
.recipe-metadata,
.ingredients-section,
.instructions {
    animation: recipeContentFadeIn 0.6s ease-out;
}

.ingredients-section {
    animation-delay: 0.2s;
}

.instructions {
    animation-delay: 0.4s;
}

/* ===== STYLES POUR INSTRUCTIONS FORMATÉES ===== */
.instructions-content {
    line-height: 1.4;
}

.instruction-step {
    margin-bottom: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--secondary-400);
    transition: all var(--transition-normal);
}

.instruction-step:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(var(--space-xs));
    box-shadow: var(--shadow-sm);
}

.instruction-step:last-child {
    margin-bottom: 0;
}

/* Numérotation personnalisée */
.instruction-step {
    counter-increment: step-counter;
    position: relative;
    padding-left: var(--space-xl);
}

.instruction-step::before {
    content: counter(step-counter);
    position: absolute;
    left: var(--space-sm);
    top: var(--space-sm);
    background: var(--secondary-500);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: bold;
}

.instructions-content {
    counter-reset: step-counter;
}

/* Responsive pour les instructions */
@media (max-width: 640px) {
    .instruction-step {
        padding: var(--space-xs) var(--space-sm);
        padding-left: var(--space-lg);
        margin-bottom: var(--space-xs);
    }

    .instruction-step::before {
        width: 18px;
        height: 18px;
        font-size: var(--font-size-xs);
        left: var(--space-xs);
        top: var(--space-xs);
    }

    .instructions-content {
        line-height: 1.3;
    }
}

/* ===== IMAGES D'ÉTAPES ===== */
.recipe-step-image {
    position: relative;
    margin: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--surface-warm);
    cursor: pointer;
    transition: all var(--transition-normal);
    max-width: 250px;
    width: 250px;
}

.recipe-step-image:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.recipe-step-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    transition: transform var(--transition-normal);
    display: block;
}

.recipe-step-image img:hover {
    transform: scale(1.05);
}

.recipe-step-image.default-image {
    padding: var(--space-md);
    background: var(--surface-light);
    border: 2px dashed var(--border-light);
}

.recipe-step-image.default-image svg {
    max-width: 100%;
    height: auto;
}

/* Positionnement alterné des images */
.recipe-step-image {
    float: right;
    margin-right: 20px;
    margin-bottom: 15px;
}

/* Conteneur robuste pour les étapes */
.instruction-step {
    display: block;
    margin: 15px 0;
    line-height: 1.6;
    overflow: hidden;
    /* Force le clearfix */
}

/* Images flottantes plus stables */
.recipe-step-image {
    max-width: 300px;
    margin: 10px 15px;
    display: block;
}

.recipe-step-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Clearfix pour le conteneur parent */
.instructions-content::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== LIGHTBOX POUR AGRANDISSEMENT ===== */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: lightboxZoom 0.3s ease-out;
}

.lightbox-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

[data-theme="dark"] .lightbox-close {
    color:rgba(0, 0, 0, 0.7);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive pour les images d'étapes */
@media (max-width: 768px) {
    .recipe-step-image {
        float: none !important;
        clear: none !important;
        margin: var(--space-md) auto;
        max-width: 200px;
        width: 200px;
        display: block;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .lightbox-close {
        top: -50px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

/*
 ===== FALLBACK POUR IMAGES D'ÉTAPES ===== */
.default-image-fallback {
    padding: var(--space-md);
    background: var(--surface-light);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-lg);
    text-align: center;
}

.default-image-svg {
    max-width: 100%;
    height: auto;
}

/* ==
=== CLEARFIX POUR LES IMAGES FLOTTANTES ===== */
.instructions-content::after {
    content: "";
    display: table;
    clear: both;
}

.instruction-step {
    overflow: hidden;
    /* Pour contenir les images flottantes */
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

/* ===== AMÉLIORATIONS POUR LE TEXTE AUTOUR DES IMAGES ===== */
.instructions-content p {
    text-align: justify;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

/* ===== INDICATEUR VISUEL POUR LES IMAGES CLIQUABLES ===== */
.recipe-step-image::before {
    content: "🔍";
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.recipe-step-image:hover::before {
    opacity: 1;
}

/* ===== MODAL NOTES ===== */
.notes-modal {
    max-width: 600px;
    width: 90vw;
}

.notes-body {
    padding: var(--space-lg);
}

.notes-input-section {
    margin-bottom: var(--space-lg);
}

.notes-textarea {
    width: 100%;
    min-height: 200px;
    padding: var(--space-md);
    border: 2px solid var(--primary-200);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: var(--font-size-base);
    line-height: 1.5;
    resize: vertical;
    background: var(--surface-light);
    transition: all var(--transition-normal);
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(var(--primary-500-rgb), 0.1);
    background: white;
}

.notes-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-md);
}

.btn-notes {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.btn-notes.save {
    background: var(--gradient-primary);
    color: white;
}

.btn-notes.save:hover {
    background: var(--primary-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-notes.clear {
    background: var(--surface-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-notes.clear:hover {
    background: var(--error-50);
    color: var(--error-600);
    border-color: var(--error-200);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.notes-info {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== RESPONSIVE AMÉLIORÉ ===== */
@media (max-width: 768px) {
    .instructions-content p {
        text-align: left;
    }

    .recipe-step-image::before {
        width: 28px;
        height: 28px;
        font-size: 14px;
        top: 12px;
        right: 12px;
    }

    .notes-modal {
        width: 95vw;
        max-width: none;
    }

    .notes-body {
        padding: var(--space-md);
    }

    .notes-textarea {
        min-height: 150px;
        font-size: var(--font-size-sm);
    }

    .notes-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-notes {
        justify-content: center;
    }
}

/* =
==== IMAGES PAR DÉFAUT NON CLIQUABLES ===== */
.recipe-step-image.default-image {
    cursor: default;
}

.recipe-step-image.default-image::before {
    display: none;
}

.default-image-fallback {
    cursor: default;
}