/* assets/css/page-recette.css - Page d'une recette (en-tête, photo, informations, sections) et fenêtre « liste de courses » : uniquement les jetons de la charte */

.recipe-detail { display: grid; gap: var(--r-espace-5); }
.recipe-detail-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--r-espace-4);
}
.recipe-detail-header h1 { flex: 1 1 18rem; }
.recipe-actions-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--r-espace-2); }

.recipe-image-large {
    display: grid;
    place-items: center;
    max-height: 26rem;
    overflow: hidden;
    border-radius: var(--r-rayon-lg);
    background: var(--r-image-vide);
}
.recipe-image-large img { width: 100%; max-height: 26rem; object-fit: cover; display: block; }
.recipe-image-large > i { padding: var(--r-espace-7); font-size: 5rem; color: var(--r-surface); }

.recipe-description-compact { color: var(--r-texte); }
.recipe-meta-inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--r-espace-2); }
.meta-item strong { color: var(--r-texte); }

.recipe-section > h2 { margin-bottom: var(--r-espace-4); }
.recipe-section-vide { color: var(--r-texte-doux); }
.recipe-footer-actions { padding-top: var(--r-espace-5); border-top: 1px solid var(--r-filet); }

@media (max-width: 767px) {
    .recipe-detail { padding: var(--r-espace-5) var(--r-espace-4); }
    .recipe-actions-top { width: 100%; }
    .recipe-actions-top .btn, .recipe-actions-top .inline-form { flex: 1 1 100%; }
    .recipe-actions-top .inline-form .btn { width: 100%; }
}

/* Fenêtre « Ajouter à la liste de courses » */
.modal-box-shopping { max-width: 32rem; }
.modal-body-shopping { max-height: 60dvh; overflow-y: auto; overscroll-behavior: contain; }
.modal-shopping-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--r-espace-3);
    padding-bottom: var(--r-espace-3);
    margin-bottom: var(--r-espace-2);
    border-bottom: 1px solid var(--r-filet);
}
.modal-shopping-count { color: var(--r-texte-doux); font-size: var(--r-taille-sm); }
.modal-ingredients-list { margin: 0; padding: 0; list-style: none; }
.modal-ingredient-item label {
    display: flex;
    align-items: center;
    gap: var(--r-espace-3);
    min-height: var(--r-cible);
    padding: var(--r-espace-1) var(--r-espace-2);
    border-radius: var(--r-rayon);
    cursor: pointer;
}
.modal-ingredient-item label:hover { background: var(--r-fond); }
.modal-ingredient-item.unchecked .modal-ingredient-text { text-decoration: line-through; color: var(--r-texte-doux); }
.modal-ingredient-text { flex: 1; }
.modal-ingredient-qty { font-weight: var(--r-graisse-forte); color: var(--r-terra-fonce); }

@media (max-width: 480px) {
    .modal-overlay:has(.modal-box-shopping) { align-items: flex-end; padding-bottom: 0; }
    .modal-box-shopping { border-radius: var(--r-rayon-lg) var(--r-rayon-lg) 0 0; }
    .modal-body-shopping { max-height: calc(85dvh - 9rem); }
}
