/* === RECETTE - STRUCTURE GÉNÉRALE === */
.krg-recipe-article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* === BOUTONS D'ACTION === */
.krg-recipe-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0 40px;
    flex-wrap: wrap;
}

.krg-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.krg-btn-print {
    background: #3498db;
    color: white;
}

.krg-btn-print:hover {
    background: #2980b9;
}

.krg-btn-adjust {
    background: #9b59b6;
    color: white;
}

.krg-btn-adjust:hover {
    background: #8e44ad;
}

.krg-btn-rate {
    background: #f39c12;
    color: white;
}

.krg-btn-rate:hover {
    background: #e67e22;
}

.krg-btn-primary {
    background: #27ae60;
    color: white;
    padding: 12px 30px;
    margin-top: 20px;
}

.krg-btn-primary:hover {
    background: #229954;
}

/* === EN-TÊTE === */
.krg-recipe-header {
    text-align: center;
    margin-bottom: 40px;
}

.krg-recipe-meta-top {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.krg-cuisine,
.krg-type-plat {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.krg-recipe-description {
    font-size: 1.1em;
    color: #555;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* === NOTATION === */
.krg-rating-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.krg-stars {
    display: flex;
    gap: 2px;
}

.krg-star {
    font-size: 24px;
    color: #ddd;
}

.krg-star.filled {
    color: #f39c12;
}

.krg-rating-text {
    font-size: 1em;
    color: #666;
}

.krg-rating-stars-input {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 20px 0;
}

.krg-star-input {
    font-size: 40px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
}

.krg-star-input:hover,
.krg-star-input.selected {
    color: #f39c12;
    transform: scale(1.1);
}

/* === INFOS RAPIDES === */
.krg-recipe-quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    margin: 30px 0;
}

.krg-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.krg-info-item .krg-icon {
    font-size: 1.5em;
}

.krg-info-content {
    display: flex;
    flex-direction: column;
}

.krg-label {
    font-size: 0.85em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.krg-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

.krg-recipe-times {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    font-size: 0.95em;
    color: #666;
}

/* === IMAGE === */
.krg-recipe-image {
    margin: 40px 0;
    text-align: center;
}

.krg-recipe-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* === CONTENU PRINCIPAL === */
.krg-recipe-content {
    max-width: 900px;
    margin: 40px auto 0;
}

/* === SECTIONS === */
.krg-recipe-ingredients-section,
.krg-recipe-preparation-section {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.krg-section-title {
    font-size: 1.6em;
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.krg-subsection-title {
    font-size: 1.2em;
    margin: 30px 0 15px;
    color: #34495e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === INGRÉDIENTS === */
.krg-recipe-ingredients {
    margin-bottom: 30px;
}

.krg-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px 20px;
}

.krg-ingredient-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.krg-ingredient-item:last-child {
    border-bottom: none;
}

.krg-quantity {
    font-weight: 600;
    color: #e74c3c;
    min-width: 60px;
}

.krg-name {
    flex: 1;
    color: #2c3e50;
}

.krg-notes {
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
}

/* === ÉQUIPEMENT === */
.krg-recipe-equipment {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.krg-equipment-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.krg-equipment-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.krg-equipment-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* === RÉGIME === */
.krg-regime-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.krg-regime-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #27ae60;
    color: white;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

/* === ÉTAPES === */
.krg-recipe-steps {
    margin-bottom: 30px;
}

.krg-steps-list {
    margin-top: 20px;
}

.krg-step-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.krg-step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.krg-step-content {
    flex: 1;
}

.krg-step-title {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #2c3e50;
}

.krg-step-instruction {
    line-height: 1.7;
    color: #555;
    margin-bottom: 8px;
}

.krg-step-duration {
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
}

/* === CONSEILS === */
.krg-recipe-tips {
    margin-top: 40px;
    padding: 25px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
}

.krg-tips-list {
    margin: 15px 0 0;
    padding-left: 20px;
}

.krg-tips-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* === CONSERVATION === */
.krg-recipe-conservation {
    margin-top: 30px;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
}

/* === CONTENU ORIGINAL === */
.krg-recipe-original-content {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

/* === MODALS === */
.krg-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}

.krg-modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    animation: krgModalFadeIn 0.3s;
}

@keyframes krgModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.krg-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.krg-modal-close:hover {
    color: #333;
}

.krg-modal-content h2 {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
}

.krg-modal-content p {
    color: #555;
    margin: 10px 0;
}

/* === AJUSTEUR === */
.krg-servings-adjuster {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.krg-btn-adjust-minus,
.krg-btn-adjust-plus {
    width: 40px;
    height: 40px;
    border: none;
    background: #3498db;
    color: white;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.krg-btn-adjust-minus:hover,
.krg-btn-adjust-plus:hover {
    background: #2980b9;
    transform: scale(1.1);
}

#krg-servings-input {
    width: 80px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #3498db;
    border-radius: 8px;
}

#krg-rating-comment {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
}

/* === IMPRESSION === */
@media print {
    .no-print,
    .krg-recipe-actions,
    .krg-modal,
    header,
    footer,
    nav,
    .krg-rating-display,
    .krg-recipe-meta-top,
    .krg-regime-tags,
    .krg-recipe-original-content {
        display: none !important;
    }
    
    .krg-recipe-article {
        padding: 0;
        max-width: 100%;
    }
    
    .krg-recipe-content {
        display: block;
        max-width: 100%;
    }
    
    .krg-recipe-ingredients-section,
    .krg-recipe-preparation-section {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .krg-step-item {
        page-break-inside: avoid;
        background: white !important;
        border-left: 2px solid #3498db !important;
    }
    
    .krg-recipe-image {
        max-height: 400px;
        overflow: hidden;
        page-break-after: always;
    }
    
    .krg-recipe-image img {
        box-shadow: none;
    }
    
    .krg-step-number {
        background: #3498db !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .krg-recipe-tips {
        background: #fff3cd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .krg-recipe-equipment {
        background: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .krg-modal-content {
        padding: 30px 20px;
    }
    
    .krg-recipe-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .krg-btn {
        width: 100%;
    }
}
