/* Styles modernes pour les pages */

/* Page headers modernes */
.page-header-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.page-header-modern h1 {
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.page-header-modern .lead {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 0;
}

/* Menu images et placeholders */
.menu-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.menu-image-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-image-modern:hover {
    transform: scale(1.05);
}

.menu-image-placeholder {
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: white;
    position: relative;
}

.menu-image-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.menu-image-placeholder span {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 0 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Avatars utilisateur */
.user-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.profile-photo-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.creator-info-modern {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.profile-link-modern {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.profile-link-modern:hover {
    color: #007bff;
    text-decoration: none;
}

/* Ingrédients grid pour show_edit */
.ingredient-card-edit {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 1rem;
}

.ingredient-card-edit:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.2);
}

.ingredient-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ingredient-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ingredient-info {
    flex: 1;
}

.ingredient-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.ingredient-details {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quantity-badge,
.unit-badge {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 500;
}

.quantity-badge {
    background: #fff3cd;
    color: #856404;
}

.unit-badge {
    background: #d1ecf1;
    color: #0c5460;
}

.ingredient-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.btn-remove-ingredient {
    background: #dc3545;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-ingredient:hover {
    background: #c82333;
    transform: scale(1.1);
}

.remove-form {
    margin: 0;
}

/* Menu actions section */
.menu-actions-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.action-buttons-primary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-buttons-secondary {
    display: flex;
    justify-content: flex-end;
}

.danger-zone {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 10px;
    padding: 1.5rem;
}

/* Responsive adjustments for menu images */
@media (max-width: 768px) {
    .menu-image-container {
        height: 200px;
    }
    
    .menu-image-placeholder i {
        font-size: 3rem;
    }
    
    .menu-image-placeholder span {
        font-size: 1.2rem;
    }
    
    .ingredient-card-edit {
        padding: 1rem;
    }
    
    .ingredient-content {
        flex-direction: column;
        text-align: center;
    }
    
    .ingredient-actions {
        position: static;
        margin-top: 1rem;
        text-align: center;
    }
}

/* Cards modernes */
.card-modern {
    background: white;
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.card-modern .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
}

.card-modern .card-body {
    padding: 2rem;
}

.card-modern .card-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 1.5rem 2rem;
    border-radius: 0 0 20px 20px;
}

/* Boutons modernes */
.btn-modern {
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-modern:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover:before {
    left: 100%;
}

.btn-modern.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.btn-modern.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.btn-modern.btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
    background: transparent;
}

.btn-modern.btn-outline-primary:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.btn-modern.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40,167,69,0.3);
}

.btn-modern.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
    background: transparent;
}

.btn-modern.btn-outline-secondary:hover {
    background: #6c757d;
    transform: translateY(-2px);
}

/* Grilles modernes */
.grid-card-modern {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.grid-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Alertes modernes */
.alert-modern {
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.alert-modern.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-modern.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-modern.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-modern.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

/* Formulaires modernes */
.form-modern {
    margin: 0;
}

.form-modern-content {
    margin: 0;
}

.form-modern-fields .form-control,
.form-modern-fields .form-select {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-modern-fields .form-control:focus,
.form-modern-fields .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
    transform: translateY(-1px);
}

.form-modern-fields .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-modern-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section de titre moderne */
.section-title-modern {
    color: #495057;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #e9ecef;
    display: flex;
    align-items: center;
}

/* Grille d'ingrédients moderne */
.ingredients-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ingredient-card-modern {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.ingredient-card-modern:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.1);
}

.ingredient-info {
    flex: 1;
}

.ingredient-name {
    color: #495057;
    font-weight: 600;
    margin: 0;
}

.ingredient-quantity {
    color: #6c757d;
    font-size: 0.9rem;
}

.quantity-value {
    font-weight: 600;
    color: #007bff;
}

.quantity-unit {
    margin-left: 0.25rem;
}

/* État vide moderne */
.empty-state-modern {
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 20px;
    border: 2px dashed #dee2e6;
}

/* Image de carte moderne */
.card-image-modern {
    position: relative;
    overflow: hidden;
}

.card-image-modern img {
    transition: transform 0.3s ease;
}

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

/* Lien de profil moderne */
.profile-link {
    transition: all 0.3s ease;
    border-radius: 25px;
    padding: 0.25rem 0.5rem;
}

.profile-link:hover {
    background: rgba(0,123,255,0.1);
    transform: translateY(-1px);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .page-header-modern {
        padding: 2rem 1rem;
    }
    
    .card-modern .card-body,
    .card-modern .card-header,
    .card-modern .card-footer {
        padding: 1.5rem;
    }
    
    .ingredients-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .form-modern-actions {
        flex-direction: column;
    }
    
    .form-modern-actions .btn {
        width: 100%;
    }
}

/* Styles spécifiques au profil */
.profile-photo-modern {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    object-fit: cover;
    transition: all 0.3s ease;
}

.profile-photo-modern:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.profile-photo-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-zone-modern {
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-zone-modern:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
    transform: translateY(-2px);
}

.upload-zone-modern.dragover {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff8 0%, #e6ffe6 100%);
}

.info-card-modern {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.info-card-modern:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.1);
}

.info-label-modern {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.info-value-modern {
    font-size: 1.1rem;
    color: #212529;
    word-break: break-word;
}

/* Styles pour les modales modernes */
.modal-modern .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-modern .modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 2rem;
}

.modal-modern .modal-body {
    padding: 2rem;
}

.modal-modern .modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
}
